$dbh=mysql_connect ("localhost", "leonstem_leonuse", "head1ache") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("leonstem_leon");
if ($addthispage == "all" or $addthispage == "") {
$query="SELECT * FROM comments ORDER BY id DESC";
} else {
$query="SELECT * FROM comments where page='$addthispage' ORDER BY id DESC";
}
$result=mysql_query($query);
mysql_close();
$num=mysql_numrows($result);
if ($num == 0) {
echo "No comments posted yet";
}
$i=0;
while ($i < 3 and $i < $num) {
$poster=mysql_result($result,$i,"poster");
$comment=mysql_result($result,$i,"comment");
$date=mysql_result($result,$i,"date");
$page=mysql_result($result,$i,"page");
$id=mysql_result($result,$i,"id");
// transform the date
$dateinnumbers = strtotime("$date");
$dateinletters = date("m-d-y", $dateinnumbers);
echo<<By: $poster on $dateinletters for $page:
Donate your cash to LeonsTemple.com. Help out by clicking the paypal button below.
* We're NOT a non-profit organization in the sense that your donation is tax-deductable, only non-profit in the sense that there are no profits to be made.
$postin=$_GET['postin'];
$aboutme=$_POST['aboutme'];
$poster=$_POST['poster'];
$code=$_POST['code'];
$today = date("Ymd");
if ($postin == "yes") {
if ($aboutme == "") {
Echo "
Oopsie! No data was added. Please go back and try again.
";
$test="fail";
}
$commentopen = substr($comment, 0, 5);
if ($code == "lt" or $code == "Lt" or $code == "LT" or $code == "lT") {
// do nothing
} else {
echo "You goofed up. Your message wasn't posted because you forgot the humaness code. You might have to dink with cases.";
$test="fail";
}
if ($test == "fail") {
// don't add the comment
} else {
$dbh=mysql_connect ("localhost", "leonstem_leonuse", "head1ache") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("leonstem_leon");
$query="INSERT INTO topten VALUES ('$today','$aboutme','$poster')";
mysql_query($query);
echo "
You have added a top ten album listing. Its posted to the list below. Thanks!
";
}
} // end postin
echo<<LeonsTemple Top Ten Lists
Add your list here
I was going to just post MY top 10, but then I thought it would be fun to let others do the same.
So this is an open invitation: Write your list of top 10 albums or songs here (or people, or parties, or venues, or Jason Fortier haircuts). Be mean whenever possible because its funny.
Or gush with endearment and affection towards your favorite music. Both are good.
Whoever is the latest will be on top. Enjoy!
END;
$dbh=mysql_connect ("localhost", "leonstem_leonuse", "head1ache") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("leonstem_leon");
$query="SELECT * FROM topten order by dateadded desc";
$result=mysql_query($query);
$num=mysql_numrows($result);
if ($num == 0) {
echo "Nobody has left a list yet.";
}
$i=0;
while ($i < $num) {
$aboutme=mysql_result($result,$i,"aboutme");
$poster=mysql_result($result,$i,"poster");
$dateadded=mysql_result($result,$i,"dateadded");
$displayaboutme=nl2br($aboutme);
echo<<