![]() |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||
|
Scrie in cartea de oaspeti a Satului Galoiesti
// Ttitle of the web page
$title = "- - - Welcome to my guestbook - -";
//####Change "admin" with your own password. It's required when you delete an entry
$admin_password = "onutza";
//Maximum entry per page when you view your guestbook
$max_entry_per_page = "8";
//Name of file used to store your entry
$data_file = "data.dat";
//Maximum entry stored in data file
$max_record_in_data_file = "500";
//Color & font setting
$background = "#ffffff";
$table_top = "#cdb79e ";
$table_content_1a = "#eedfcc";
$table_content_2a = "#D9E4F2";
$table_bottom = "#eee8cd";
$table_border = "#000000";
$link = "blue";
$visited_link = "blue";
$active_link = "red";
$font_face = "verdana";
$message_font_face = "arial";
$message_font_size = "2";
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($do)) $do = "";
else if (preg_match("/\W/",$do)) $do = "";
if (!isset($page) or $page == 0) $page=1;
if (!file_exists($data_file)) {
echo "Eroare !! Can't find data file : $data_file.
break; case "add_form": ?> Eroare!You may left some fields. Click aici si incearca din nou."; exit; } if (trim($vemail)!="" and !preg_match("/([\w\.\-]+)(\@[\w\.\-]+)(\.[a-z]{2,4})+/i", $vemail)) { echo "Eroare !Adresa de email invalida. Click aici si incearca din nou."; exit; } if (trim($vurl) <> "") { if (strtolower(trim($vurl)) <> "http://") { if (!preg_match ("#^http://[_a-z0-9-]+\\.[_a-z0-9-]+#i", $vurl)) { echo "Eroare !Website Invalid URL format. Click aicisi incearca din nou."; exit; } } } $test_comment = explode(" ",$vcomment); $jmltest = count($test_comment); for ($t=0; $t<$jmltest; $t++) { if (strlen(trim($test_comment[$t])) > 35) { echo "Eroare!Te rog nu abuza de guestbook. Click aici si incearca din nou."; exit; } } //--only 2000 characters allowed for comment $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); $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_file,"a"); fwrite($tambah,$newdata); fclose($tambah); echo " Multumesc,mesajul tau a fost inregistrat.Te rog asteapta...
Parola invalida !Te tog asteapta...Inregistrarea a fost stearsa !Te rog asteapta... |
|||||||||||||||||||||||||||||||||||||||||||
|
Copyright © GallNet Design |
|||||||||||||||||||||||||||||||||||||||||||