include 'config.html'; ?>
$ilosc_wp = "6";
if ($dodaj) {
$blad = '0';
if ($imie == '' || $komentarz == '') {
echo "Wypełnij wszystkie pola!
} else {
$ilosc_wp=mysql_query("select * from ksiega order by nr");
$ile=mysql_num_rows($ilosc_wp);
if ($ile =='1' ) {
$t1 = "jest";
$t2 = "wpis";
} else {
$ile3 = substr(strrev($ile) ,0,1);
$ile2 = strrev(substr(strrev($ile) ,0,2));
if (($ile3 =='2' || $ile3 =='3' || $ile3 =='4') && $ile2 != '12' && $ile2 != '13' && $ile2 != '14') {
$t1 = "są";
$t2 = "wpisy";
} else {
$t1 = "jest";
$t2 = "wpisów";
}
}
?>
Witam w mojej księdze gości."; $blad = '1'; } if (!ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'. '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $mail)) { echo "Podany email jest nieprawidłowy! "; $blad = '1'; } if ($blad == '0') { include 'zmianadaty.html'; $komentarz = ereg_replace("'", "", $komentarz); $komentarz = ereg_replace("<", "<", $komentarz); $komentarz = ereg_replace(">", ">", $komentarz); $godzina = date("H:i"); if(!$host){ $host = getenv('REMOTE_HOST'); } if(!$host){ $host = getenv('REMOTE_ADDR'); } $host = @GetHostByAddr($host); $mysql = "Insert into ksiega (imie,mail,komentarz,data,host) VALUES ('$imie','$mail','$komentarz','$data ($godzina)','$host')"; $result = mysql_query($mysql); ?> Wpis dodany do naszej księgi gości. Dziękujemy. Zobacz wpisy Powrót } else { ?> Wpis nie dodany do naszej księgi gości. Powrót } } else { if ($ksiega == "dodaj") { ?> } else { if ($ksiega == "wpisy") { if (!$arch) { $arch = '0'; } include "archiwum.html"; ?>
if ($nr_arch<=$ilosc_arch) { ?> [Zobacz starsze wpis] } ?> Powrót Aktualnie echo "$t1 $ile $t2"; ?>. Dodaj wpis do księgi Zobacz wpisy } } } ?> |
|
||||||||
Copyright 2001 by Wojtek "SanczO" Sanecki. All rights reserved. |
|||||||||