Wróć na poprzednią stronę
ALIENS RPG -> KSIĘGA GOŚCI

Kliknij ">tutaj aby dodać swój wpis. 0) $jml_page++; $no = $page*$max_entry_per_page-$max_entry_per_page; $noRem = $jmlrec%$max_entry_per_page; $noNew = ($jml_page-$page)*$max_entry_per_page+$noRem+1; if ($jmlrec == 0) echo ""; $w = 0; //--Color $start = $no; $stop = $max_entry_per_page + $no; $sql = "select id,time,nick,email,comment,www,ip from comments order by id DESC limit $start, $max_entry_per_page"; $res = dbquery($sql, $dbtype); while($row = dbfetch_array($res,$dbtype)){ $noNew--; 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 "". // ""; if($display_admin){ echo ""; } echo ""; }; echo ""; ?>
There is no entry yet.
//$row[id] // "; echo "
"; echo "
"; echo " $row[time]
". (prepare_body($row[comment])). "
".(prepare_body($row[nick]))." "; if($row[email]!=""){ $emailstr = str_replace('@','(at)',$row[email]); echo "($emailstr)"; }; if($row[www]!=""){ echo " $row[www]"; }; echo "
"; echo "
\"Delete
"; 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 "


Księga gości w oparciu o SQLite oraz " size="1">">Ard Guestbook 1.6 Aliens RPG by Ender & Voytass

Wróć na poprzednią stronę
ALIENS RPG -> KSIĘGA GOŚCI

">Zobacz wpisy
"> ">
"> "> "> "> "> ">
Imię*:
Email:
WWW:
Kod:
Wpisz w to pole słowo: alien
Treść*:

* wymagane pola
'">
70) $vname = substr($vname,0,70); if (strlen($vemail) > 100) $vemail = substr($vemail,0,100); if (strlen($vurl) > 150) $vurl = substr($vurl,0,150); if ($vkod!="alien") { echo "

Error !

Pamiętaj aby wypełnić pole z kodem !!! Please click here and try again."; exit; } if ($vname=="" or $vcomment=="") { echo "

Error !

You may left some fields. Please click here and try again."; exit; } if ($vmemail!= "" && !preg_match("/([\w\.\-]+)(\@[\w\.\-]+)(\.[a-z]{2,4})+/i", $vemail)) { echo "

Error !

Invalid email address. Please click here and try again."; exit; } if (trim($vurl) <> "") { if (strtolower(trim($vurl)) <> "http://") { if (!preg_match ("#^http://[_a-z0-9-]+\\.[_a-z0-9-]+#i", $vurl)) { echo "

Error !

Invalid URL format. Please click here and try again."; exit; } } else{ $vurl=""; } } $test_comment = explode(" ",$vcomment); $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($vcomment) > $maxchar) $vcomment = substr($vcomment,0,$maxchar)."..."; $idx = date("YmdHis"); $tgl = date("Y-m-d H:i:s"); $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); if (strtoupper($os) == "WIN") { $vcomment = str_replace("\r\n","
",$vcomment); $vcomment = str_replace("\r","",$vcomment); $vcomment = str_replace("\n","",$vcomment); } else { $vcomment = str_replace("\n","
",$vcomment); $vcomment = str_replace("\r","",$vcomment); } $sql = "INSERT INTO comments (id, comment, nick, email, www, time, ip) values (NULL, \"$vcomment\", \"$vname\", \"$vemail\", \"$vurl\", \"$tgl\", \"$ipaddress\");"; $res = dbquery($sql, $dbtype); //--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"); } ?> Aliens RPG by Ender & Voytass

Wróć na poprzednią stronę
ALIENS RPG -> KSIĘGA GOŚCI

Komentarz został dodany...

... proszę czekać na przekierowanie... Delete record
Delete Confirmation

$row[time]
$row[nick]

$row[email]

$row[comment]
"; } echo "
Admin password :

"; break; case "del2": $pwd = isset($_POST['pwd']) ? trim($_POST['pwd']) : ""; $id = isset($_POST['id']) ? trim($_POST['id']) : ""; $page = isset($_POST['page']) ? $_POST['page'] : 1; if ($pwd <> $admin_password) { echo "

Invalid admin password !

Please wait...
"; exit; } $sql = "DELETE FROM comments where id=$id"; dbquery($sql, $dbtype); echo "

Record has been deleted !

Please wait...
"; break; } //--end switch function dbfetch_array($res,$dbtype){ global $db; if($dbtype=="sqlite"){ $row = sqlite_fetch_array($res); } elseif($dbtype=="mysql"){ $row = mysql_fetch_array($res); } return $row; } function dbquery($sql,$dbtype){ global $db; if($dbtype=="sqlite"){ $res = sqlite_query($sql,$db); } elseif($dbtype=="mysql"){ $res = mysql_query($sql); } return $res; } //print gethostbyaddr($ipaddress); function prepare_body($txt){ $txt = stripslashes($txt); return $txt; }