1) { echo " <<"; } ?>   >>  "; } ?>  valid numbers: 1  
id; if ($row->title) echo "

" . stripslashes($row->title) . "

\n\n"; echo "

$row->date

\n\n"; $row->text = ereg_replace("(\r|\n)+","

\n

",$row->text); $row->text = ereg_replace("

\n

(|$)","\n\\1",$row->text); $row->text = stripslashes($row->text); echo "

$row->text\n\n"; } } function comment($id) { global $PHP_SELF; $result = mysql("lisa","SELECT rant_comment.*,users.handle FROM rant_comment,users WHERE rant_comment.entry=$id AND users.id=rant_comment.user ORDER BY id") or die("Bad query: ".mysql_error()); while ($row = mysql_fetch_object($result)) { echo "


From: $row->handle
" . date("D M d, Y @ g:i a",$row->id) . "


\n\n"; $row->comment = ereg_replace("\n+","

\n\n

",$row->comment); $row->comment = stripslashes($row->comment); echo "

$row->comment

"; } } function comment_form() { global $RandomKeyPunchingsUser, $PHP_SELF, $comment, $handle, $text, $SetCookie; ?>
" METHOD="post">
"; ?> handle: ">   pass:
>Remember me, yo.
register?

"; comment_form(); } else { $user = mysql_fetch_object($result); if ($password) { $pass = mysql("lisa","SELECT PASSWORD('$password')"); $RandomKeyPunchingsPass = mysql_result($pass,0); } #if (mysql_result($pass,0) != $user->password) { if ($RandomKeyPunchingsPass != $user->password) { echo "Username and password don't match.

"; comment_form(); } else { echo "Thanks for your comment. Click here to see it."; mail("ben@oblivion.net", "comment", "$user->handle has commented on entry #$comment.\n\n$text"); $result = mysql("lisa","INSERT INTO rant_comment (id, entry,user,comment) VALUES('$id', '$comment','$user->id','" . addslashes($text) . "')"); } } } $f = mysql_pconnect("localhost","lisa","ben$91"); $high_entry = get_high_entry(); if (!$entry) $entry=$high_entry; #if ($list) # entry_list($start); #elseif ($submit) # comment_submit(); #elseif ($comment) # comment_form(); #else { entry($entry); # comment($entry); #} require("footer.phtml"); ?>