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); } } } session_start(); $newline = (strtoupper($os) == "WIN") ? "\r\n" : "\n"; switch ($do) { case "": ?> ASB

News



Testimonials

" Dear Michael, Just a quick note to thank you for facilitating a session at our north East Regional Conference. Initial feedback has been very positive and I am pleased to let you know your session scored 4.92 (bearing in mind that a score of 5 is graded as very good) On behalf of TPAS thank you once again for your time and support in making this event a success."

Kind Regards
Janet Killilea
Conference Manager


Home :: View entry

*Name :
*News Text:

* Required field
Verification Code :
Please retype this code below :
Click the "x" below to delete a news item (password required)


PHP Guestbook ·
70) $vname = substr($vname,0,70); if (strlen($vemail) > 100) $vemail = substr($vemail,0,100); if (strlen($vurl) > 150) $vurl = substr($vurl,0,150); $_SESSION['name'] = $vname; $_SESSION['email'] = $vemail; $_SESSION['url'] = $vurl; $_SESSION['comment'] = stripslashes($vcomment); if ($vname != "admin") { input_err("Please enter the correct name."); } if ($vcomment == "") { input_err("Please add the news text."); } if ($vemail != "" && !preg_match("/([\w\.\-]+)(\@[\w\.\-]+)(\.[a-z]{2,4})+/i", $vemail)) { input_err("Invalid email address."); } if ($vurl != "" && strtolower($vurl) != "http://") { if (!preg_match ("#^http://[_a-z0-9-]+\\.[_a-z0-9-]+#i", $vurl)) { input_err("Invalid URL format."); } } $test_comment = preg_split("/[\s]+/",$vcomment); $jmltest = count($test_comment); for ($t=0; $t<$jmltest; $t++) { if (strlen(trim($test_comment[$t])) > 70) { input_err("Invalid word found on your entry : ".stripslashes($test_comment[$t])); } } //if (isset($_SESSION['add']) && $_SESSION['add'] >= $max_entry_per_session) { // input_err("Sorry, only $max_entry_per_session message(s) allowed per session.",false); // } else if (!isset($_SESSION['add'])) { exit; } if ($vsecc != $_SESSION['secc'] && strtoupper($imgcode) == "YES") { input_err("Invalid verification code"); } //--only 2000 characters allowed for comment, change this value if necessary $maxchar = 2000; if (strlen($vcomment) > $maxchar) $vcomment = substr($vcomment,0,$maxchar)."..."; $idx = date("YmdHis"); $tgl = date("F d, Y - h:i A"); $vname = str_replace("<","<",$vname); $vname = str_replace(">",">",$vname); $vname = str_replace("~","-",$vname); $vname = str_replace("\"",""",$vname); $vcomment = str_replace("<","<",$vcomment); $vcomment = str_replace(">",">",$vcomment); $vcomment = str_replace("|","",$vcomment); $vcomment = str_replace("\"",""",$vcomment); $vurl = str_replace("<","",$vurl); $vurl = str_replace(">","",$vurl); $vurl = str_replace("|","",$vurl); $vemail = str_replace("<","",$vemail); $vemail = str_replace(">","",$vemail); $vemail = str_replace("|","",$vemail); if (strtoupper($os) == "WIN") { $vcomment = str_replace($newline,"
",$vcomment); $vcomment = str_replace("\r","",$vcomment); $vcomment = str_replace("\n","",$vcomment); } else { $vcomment = str_replace($newline,"
",$vcomment); $vcomment = str_replace("\r","",$vcomment); } if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && eregi("^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$",$_SERVER['HTTP_X_FORWARDED_FOR'])) { $ipnum = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ipnum = getenv("REMOTE_ADDR"); } $newdata = "|~|$idx|~|$tgl|~|$vname|~|$vemail|~|$vcomment|~|$vurl|~|$ipnum|~|"; $newdata = stripslashes($newdata); $newdata .= $newline; if (!is_spam($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); //--send mail if (strtoupper($notify) == "YES") { $msgtitle = "Someone signed your guestbook"; $vcomment = str_replace(""","\"",$vcomment); $vcomment = stripslashes($vcomment); $vcomment = str_replace("
","\n",$vcomment); $msgcontent = "Local time : $tgl\n\nThe addition from $vname :\n----------------------------\n\n$vcomment\n\n-----End Message-----"; @mail($admin_email,$msgtitle,$msgcontent,"From: $vemail\n"); } //--clear session $_SESSION['name'] = ""; $_SESSION['email'] = ""; $_SESSION['url'] = "http://"; $_SESSION['comment'] = ""; $_SESSION['add']++; $_SESSION['secc'] = ""; redir($self,"Thank you, your entry has been added."); } else { redir($self,"Sorry, your entry can't be added into the guestbook."); } break; case "del": $record = file($data_file); $jmlrec = count($record); for ($i=0; $i<$jmlrec; $i++) { $row = explode("|~|",$record[$i]); if ($id == $row[1]) { ?> Delete record
Delete Confirmation


-



IP :
Admin password :

» Delete all records that using this IP :

Please wait...
Error !


Click here and try again.