Error !! Can't find data file : $data_file.
"; exit; } else { if ($max_record_in_data_file <> 0) { $f = file($data_file); rsort($f); $j = count($f); if ($j > $max_record_in_data_file) { $rf = fopen($data_file,"w"); if (strtoupper($os)=="UNIX") { if (flock($rf,LOCK_EX)) { for ($i=0; $i<$max_record_in_data_file; $i++) { fwrite($rf,$f[$i]); } flock($rf,LOCK_UN); } } else { for ($i=0; $i<$max_record_in_data_file; $i++) { fwrite($rf,$f[$i]); } } fclose($rf); } } } switch ($do) { case "": $record = file($data_file); rsort($record); $jmlrec = count($record); ?> <?echo "$title"?>
Missy-Forever Remembered
Missy

G clef

Missy's Guestbook


">Back to Last Page   ">Sign Guestbook


0) $jml_page++; $no = $page*$max_entry_per_page-$max_entry_per_page; if ($jmlrec == 0) echo ""; $w = 0; //--Color for ($i=0; $i<$max_entry_per_page; $i++) { $no++; $recno = $no-1; if (isset($record[$recno])) { $row = explode("|~~|",$record[$recno]); if ($w==0) { $warna = $table_content_1a; $warna2 = $table_content_1b; $w=1; } else { $warna = $table_content_2a; $warna2 = $table_content_2b; $w=0; } echo ""; echo ""; } //--end if } //--end for echo ""; ?>
" COLOR="#660000">Missy's guestbook ">Contact webmaster
There is no entry yet.
$no "; echo "
$row[2]
$row[3] from $row[5]
"; /* \"$row[3]'s";*/ if (trim($row[7])<>"" and trim($row[7])<>"http://") { if (ereg("^http://", trim($row[7]))) echo " \"$row[3]'s"; else echo " \"$row[3]'s"; } echo "
"; echo "
  $row[6]
"; echo "
Delete entry # $no
"; if ($jml_page > 1) { if ($page <> 1) echo "[Top] "; else echo "[Top] "; echo "Page # "; if ($jml_page > 10) { if ($page < 5) { $start = 1; $stop = 10; } elseif ($jml_page - $page < 5) { $start = $jml_page - 9; $stop = $jml_page; } else { $start = $page-4; $stop = $page+5; } if ($start <> 1) echo "... "; for ($p=$start; $p<=$stop; $p++) { if ($p == $page) echo "$p  "; else echo "$p  "; } if ($stop <> $jml_page) echo "... "; echo "of $jml_page "; } else { for ($p=1; $p<=$jml_page; $p++) { if ($p == $page) echo "$p  "; else echo "$p  "; } } if ($page <> $jml_page) echo "[Bottom]"; else echo "[bottom]"; } else echo "Page #1 of 1"; echo "

" SIZE=1>">Ard Guestbook 1.6

<?echo "$title"?>
Missy-Forever Remembered
Missy

G clef

Sign Missy's Guestbook


">Back to Last Page   ">View Guestbook



"> ">
"> "> "> "> "> ">
Your Name
Your City
Your Email
Comment

Secret code:
I can't read that image...
give me an easier one!

Secret code in audio form (.wav file, typically 60kB)

Secret Code
* case sensitive
'">
70) $zname = substr($zname,0,70); } if (isset($_POST["zemail"])) { $zemail = $_POST["zemail"]; if (strlen($zemail) > 100) $zemail = substr($zemail,0,100); } if (isset($_POST["zcountry"])) { $zcountry = $_POST["zcountry"]; if (strlen($zcountry) > 50) $zcountry = substr($zcountry,0,50); } if (isset($_POST["zcomment"])) $zcomment = $_POST["zcomment"]; } else if (!empty($HTTP_POST_VARS)) { if (isset($HTTP_POST_VARS["zname"])) { $zname = $HTTP_POST_VARS["zname"]; if (strlen($zname) > 70) $zname = substr($zname,0,70); } if (isset($HTTP_POST_VARS["zemail"])) { $zemail = $HTTP_POST_VARS["zemail"]; if (strlen($zemail) > 100) $zemail = substr($zemail,0,100); } if (isset($HTTP_POST_VARS["zcountry"])) { $zcountry = $HTTP_POST_VARS["zcountry"]; if (strlen($zcountry) > 50) $zcountry = substr($zcountry,0,50); } if (isset($HTTP_POST_VARS["zcomment"])) $zcomment = $HTTP_POST_VARS["zcomment"]; } if (trim($zname)=="" or trim($zcomment=="") or trim($zemail)=="") { echo "You may have left some fields blank. Please click here and try again."; exit; } if (!preg_match("/([\w\.\-]+)(\@[\w\.\-]+)(\.[a-z]{2,4})+/i", $zemail)) { echo "

Error !

Invalid email address. Please click here and try again."; exit; } $test_comment = explode(" ",$zcomment); $jmltest = count($test_comment); for ($t=0; $t<$jmltest; $t++) { if (strlen(trim($test_comment[$t])) > 35) { echo "

Error!

Please don't abuse my guestbook. Click here and try again."; exit; } } //--only 2000 characters allowed for comment, change this value if necessary $maxchar = 2000; if (strlen($zcomment) > $maxchar) $zcomment = substr($zcomment,0,$maxchar)."..."; $idx = date("YmdHis"); $tgl = date("F d, Y - h:i A"); $zname = str_replace("<","",$zname); $zname = str_replace(">","",$zname); $zname = str_replace("~","-",$zname); $zname = str_replace("\"",""",$zname); $zcomment = str_replace("<","<",$zcomment); $zcomment = str_replace(">",">",$zcomment); $zcomment = str_replace("~","-",$zcomment); $zcomment = str_replace("\"",""",$zcomment); if (strtoupper($os) == "WIN") { $zcomment = str_replace("\r\n","
",$zcomment); $zcomment = str_replace("\r","",$zcomment); $zcomment = str_replace("\n","",$zcomment); } else { $zcomment = str_replace("\n","
",$zcomment); $zcomment = str_replace("\r","",$zcomment); } if (preg_match("#<|>|\"\~#",$zcountry)) exit; if (preg_match("/[^a-z ]/i",$zcountry)) $zcountry = "..."; $newdata = "\n"; $newdata = stripslashes($newdata); $tambah = fopen($data_file,"a"); if (strtoupper($os)=="UNIX") { if (flock($tambah,LOCK_EX)) { fwrite($tambah,$newdata); flock($tambah,LOCK_UN); } } else fwrite($tambah,$newdata); fclose($tambah); // Give brad a record of how they got in if (strtoupper($notify) == "YES") { $msgtitle = "GUESTBOOK"; $zcomment = str_replace(""","\"",$zcomment); $zcomment = stripslashes($zcomment); $zcomment = str_replace("
","\n",$zcomment); $sesid = session_id(); $scode = $_POST['captcha']; $scodereal = $_SESSION['captcha']; $msgcontent = "Code: $scode\nGen code: $scodereal\nSession ID: $sesid\nLocal time : $tgl\n\nThe addition from $zname :\n----------------------------\n\n$zcomment\n\n-----End Message-----"; mail("bokeh@yumbrad.com",$msgtitle,$msgcontent,"From: $zemail\n"); } // End recording if (strtoupper($notify) == "YES") { $msgtitle = "Someone signed your new guestbook"; $zcomment = str_replace(""","\"",$zcomment); $zcomment = stripslashes($zcomment); $zcomment = str_replace("
","\n",$zcomment); $msgcontent = "Local time : $tgl\n\nThe new addition from $zname :\n----------------------------\n\n$zcomment\n\n-----End Message-----"; mail($admin_email,$msgtitle,$msgcontent,"From: $zemail\n"); } echo "

Thank you, your entry has been added.

Please wait..."; } else { echo "

Error !

Invalid code. Please click here and try again."; exit; } break; case "del": $record = file($data_file); $jmlrec = count($record); for ($i=0; $i<$jmlrec; $i++) { $row = explode("|~~|",$record[$i]); if ($id == $row[1]) { echo " Delete record
Delete Confirmation

$row[2]
$row[3]
from $row[5]
$row[4]

$row[6]

"; break; } } echo "
Admin password :

"; break; case "del2": if (isset($_POST["pwd"])) $pwd = $_POST["pwd"]; else if (isset($HTTP_POST_VARS["pwd"])) $pwd = $HTTP_POST_VARS["pwd"]; if (isset($_POST["id"])) $id = $_POST["id"]; else if (isset($HTTP_POST_VARS["id"])) $id = $HTTP_POST_VARS["id"]; if (isset($_POST["page"])) $page = $_POST["page"]; else if (isset($HTTP_POST_VARS["page"])) $page = $HTTP_POST_VARS["page"]; if ($pwd <> $admin_password) { echo "

Invalid admin password !

Please wait..."; exit; } $record = file($data_file); $jmlrec = count($record); for ($i=0; $i<$jmlrec; $i++) { $row = explode("|~~|",$record[$i]); if ($id==$row[1]) { $record[$i] = ""; break; } } $update_data = fopen($data_file,"w"); if (strtoupper($os) == "UNIX") { if (flock($update_data,LOCK_EX)) { for ($j=0; $j<$jmlrec; $j++) { if ($record[$j] <> "") fputs($update_data,$record[$j]); } flock($update_data,LOCK_UN); } } else { for ($j=0; $j<$jmlrec; $j++) { if ($record[$j] <> "") fputs($update_data,$record[$j]); } } fclose($update_data); echo "

Record has been deleted !

Please wait..."; break; } //--end switch ?>