"; echo "ERROR !
The Script can not find the language file $langfile.
Please check and change the language value: \"$language\" in the config area of fggbook.php.
"; exit; } else { include $langfile; } // +++ Start of Script +++ DO NOT EDIT BELOW THIS LINE ++++++++++++++++++++++++++++++++++++++++++ if (!empty($_GET)) { if (isset($_GET["do"])) $do = $_GET["do"]; if (isset($_GET["id"])) $id = $_GET["id"]; if (isset($_GET["page"])) $page = $_GET["page"]; } else if (!empty($HTTP_GET_VARS)) { if (isset($HTTP_GET_VARS["do"])) $do = $HTTP_GET_VARS["do"]; if (isset($HTTP_GET_VARS["id"])) $id = trim($HTTP_GET_VARS["id"]); if (isset($HTTP_GET_VARS["page"])) $page = trim($HTTP_GET_VARS["page"]); } if (isset($_POST["do"])) $do = $_POST["do"]; else if (isset($HTTP_POST_VARS["do"])) $do = $HTTP_POST_VARS["do"]; if (!isset($PHP_SELF)) { if (isset($_SERVER["PHP_SELF"])) $PHP_SELF = $_SERVER["PHP_SELF"]; else if (isset($HTTP_SERVER_VARS["PHP_SELF"])) $PHP_SELF = $HTTP_SERVER_VARS["PHP_SELF"]; } if (!isset($DOC_ROOT)) { if (isset($_SERVER['DOCUMENT_ROOT'])) $DOC_ROOT = $_SERVER['DOCUMENT_ROOT']; else if (isset($HTTP_SERVER_VARS['DOCUMENT_ROOT'])) $DOC_ROOT = $HTTP_SERVER_VARS['DOCUMENT_ROOT']; } // reverse strrchr() - PHP v4.0b3 and above function reverse_strrchr($haystack, $needle) { $pos = strrpos($haystack, $needle); if($pos === false) { return $haystack; } return substr($haystack, 0, $pos + 1); } $data1 = $DOC_ROOT; $data2 = reverse_strrchr($PHP_SELF, '/'); $data_path = "$data1$data2$data_file"; if (!isset($do)) $do = ""; else if (preg_match("/\W/",$do)) $do = ""; if (!isset($page) or $page == 0) $page=1; // Check if date file exists. if (!file_exists($data_path)) { echo "".$lang[$conf['lang']]['error']."
".$lang[$conf['lang']]['no-datafile']."
path : $data_path
"; exit; } else { if ($max_record_in_data_file <> 0) { $f = file($data_path); rsort($f); $j = count($f); if ($j > $max_record_in_data_file) { $rf = fopen($data_path,"w"); for ($i=0; $i<$max_record_in_data_file; $i++) { fwrite($rf,$f[$i]); } fclose($rf); } } } switch ($do) { case "": $record = file($data_path); rsort($record); $jmlrec = count($record); ?>

Monday 05th of January 2009 09:25:53 PM    

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; //$warna = "#c6d7ec"; $w=1; } else { $warna = $table_content_2a; //$warna = "#D9E4F2"; $w=0; } //---Displaying Records-- echo ""; echo ""; echo ""; } //--end if } //--end for echo "
".$lang[$conf['lang']]['no-messages']."
"; echo ""; echo ""; if ($row[4] == "") { echo " ";} else { echo ""; } echo ""; echo "
".$lang[$conf[  $row[3]
"; if (trim($row[7])<>"" and trim($row[7])<>"http://") { if (ereg("^http://", trim($row[7]))) echo "".$lang[$conf[  $row[7]"; else echo "".$lang[$conf[  $row[7]"; } echo "
".$lang[$conf[  $row[4]
".$lang[$conf[  $row[5]
".$lang[$conf["; echo "  ".$lang[$conf[  $row[2]"; echo "
$row[6]
"; echo ""; //--- Page Count Start echo ""; //---Page Count End echo "
"; if ($jml_page > 1) { if ($page <> 1) echo "[".$lang[$conf['lang']]['pagenum-top']."] "; else echo "[".$lang[$conf['lang']]['pagenum-top']."] "; echo $lang[$conf['lang']]['pagenum-a'] ; 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 "van $jml_page "; } else { for ($p=1; $p<=$jml_page; $p++) { if ($p == $page) echo "$p  "; else echo "$p  "; } } if ($page <> $jml_page) echo "[".$lang[$conf['lang']]['pagenum-bot']."]"; else echo "[".$lang[$conf['lang']]['pagenum-bot']."]"; } else echo $lang[$conf['lang']]['pagenum-b']; echo ".$lang[$conf['lang']]['sign-gbook-link']. ".$lang[$conf['lang']]['sign-gbook-link']."
" ?>

Flat-Guest script by: RP-Draw WebDesign - Version:


:
 *
 
 
 *
 *

*
Flat-Guest script by: RP-Draw WebDesign - Version:
70) $vname = substr($vname,0,70); } if (isset($_POST["vemail"])) { $vemail = $_POST["vemail"]; if (strlen($vemail) > 100) $vemail = substr($vemail,0,100); } if (isset($_POST["vurl"])) { $vurl = $_POST["vurl"]; if (strlen($vurl) > 150) $vurl = substr($vurl,0,150); } if (isset($_POST["vcountry"])) { $vcountry = $_POST["vcountry"]; if (strlen($vcountry) > 50) $vcountry = substr($vcountry,0,50); } if (isset($_POST["vcomment"])) $vcomment = $_POST["vcomment"]; } else if (!empty($HTTP_POST_VARS)) { if (isset($HTTP_POST_VARS["vname"])) { $vname = $HTTP_POST_VARS["vname"]; if (strlen($vname) > 70) $vname = substr($vname,0,70); } if (isset($HTTP_POST_VARS["vemail"])) { $vemail = $HTTP_POST_VARS["vemail"]; if (strlen($vemail) > 100) $vemail = substr($vemail,0,100); } if (isset($HTTP_POST_VARS["vurl"])) { $vurl = $HTTP_POST_VARS["vurl"]; if (strlen($vurl) > 150) $vurl = substr($vurl,0,150); } if (isset($HTTP_POST_VARS["vcountry"])) { $vcountry = $HTTP_POST_VARS["vcountry"]; if (strlen($vcountry) > 50) $vcountry = substr($vcountry,0,50); } if (isset($HTTP_POST_VARS["vcomment"])) $vcomment = $HTTP_POST_VARS["vcomment"]; } // ERROR - Empty fields if (trim($vname)=="" or trim($vcountry)=="" or trim($vcomment)=="") { echo " ".$lang[$conf['lang']]['error']." - $title> "; echo "

".$lang[$conf['lang']]['error']."

".$lang[$conf['lang']]['empty-fields']."".$lang[$conf['lang']]['click-here']." ".$lang[$conf['lang']]['try-again']." "; exit; } // ERROR - Wrong Email address if (trim($vemail)!="" and !preg_match("/([\w\.\-]+)(\@[\w\.\-]+)(\.[a-z]{2,4})+/i", $vemail)) { echo " ".$lang[$conf['lang']]['error']." - $title> "; echo "

".$lang[$conf['lang']]['error']."

".$lang[$conf['lang']]['wrong-email']."".$lang[$conf['lang']]['click-here']." ".$lang[$conf['lang']]['try-again']." "; exit; } // ERROR - Wrong URL address if (trim($vurl) <> "") { if (strtolower(trim($vurl)) <> "http://") { if (!preg_match ("#^http://[_a-z0-9-]+\\.[_a-z0-9-]+#i", $vurl)) { echo " ".$lang[$conf['lang']]['error']." - $title> "; echo "

".$lang[$conf['lang']]['error']."

".$lang[$conf['lang']]['wrong-url']."".$lang[$conf['lang']]['click-here']." ".$lang[$conf['lang']]['try-again']." "; exit; } } } // ERROR - Message to long $test_comment = explode(" ",$vcomment); $jmltest = count($test_comment); for ($t=0; $t<$jmltest; $t++) { if (strlen(trim($test_comment[$t])) > 35) { echo " ".$lang[$conf['lang']]['error']." - $title> "; echo "

".$lang[$conf['lang']]['error']."

".$lang[$conf['lang']]['no-abuse1']."$maxchar ".$lang[$conf['lang']]['no-abuse2']."".$lang[$conf['lang']]['click-here']." ".$lang[$conf['lang']]['try-again']." "; exit; } } 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); $vcomment = str_replace("\r\n","
",$vcomment); $vcomment = str_replace("\r","",$vcomment); $vcomment = str_replace("\n","",$vcomment); if (preg_match("#<|>|'\~#",$vcountry)) exit; if (preg_match("/[^a-z ,-]/i",$vcountry)) $vcountry = "..."; $newdata = "|~~|$idx|~~|$tgl|~~|$vname|~~|$vemail|~~|$vcountry|~~|$vcomment|~~|$vurl|~~|\n"; $newdata = stripslashes($newdata); $tambah = fopen($data_path,"a"); fwrite($tambah,$newdata); fclose($tambah); // Message added to Guestbook echo " $title "; echo "

".$lang[$conf['lang']]['added1']."

".$lang[$conf['lang']]['added2']."".$lang[$conf['lang']]['one-moment']."
"; break; case "del": $record = file($data_path); $jmlrec = count($record); for ($i=0; $i<$jmlrec; $i++) { $row = explode("|~~|",$record[$i]); if ($id == $row[1]) { echo " ".$lang[$conf['lang']]['delete-title']." - $title "; echo "

".$lang[$conf['lang']]['delete-title']."



$row[2]
$row[3]
".$lang[$conf['lang']]['from']." $row[5]
$row[4]  $row[7]

$row[6]

"; break; } } // echo "Demo version: Delete is disabled !

"; echo "
".$lang[$conf[ ".$lang[$conf['lang']]['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"]; // error - Wrong admin password if ($pwd <> $admin_password) { echo " ".$lang[$conf['lang']]['wrong-admin-password']." - $title "; echo "

".$lang[$conf['lang']]['wrong-admin-password']."

".$lang[$conf['lang']]['one-moment']."
"; exit; } $record = file($data_path); $jmlrec = count($record); for ($i=0; $i<$jmlrec; $i++) { $row = explode("|~~|",$record[$i]); if ($id==$row[1]) { $record[$i] = ""; break; } } $update_data = fopen($data_path,"w"); for ($j=0; $j<$jmlrec; $j++) { if ($record[$j] <> "") fputs($update_data,$record[$j]); } fclose($update_data); // report - message deleted echo " ".$lang[$conf['lang']]['deleted']." - $title "; echo "

".$lang[$conf['lang']]['deleted']."

".$lang[$conf['lang']]['one-moment']."
"; break; } //--end switch ?>