/*
=== MESSAGES FROM AUTHOR ====================================
This program is free,
and you could modify it as much as you like
But, ... If you appreciated with my works.
Please do not remove my software's name on this lines below,
Best regards;
Ridwank (mail@ridwank.com)
=============================================================
*/
echo "\n\n";
// *** LOADING CONFIG FILE
include "var.inc.php";
// *** CHECKING FILE EXISTING
if (!file_exists($data)){
disperr("File "$data" not found!");
exit;
}
?>
Gastenboek H.S.V. Ons Genoegen Spijkenisse
drawcss(); ?>
// *** LOADING DATA
if($file=fopen($data,"r"))
{
while(!feof($file))
{
$contents_old.=fgets($file,255);
}
fclose($file);
}
// *** UPDATING CONTENT
if ($btpost=="Post"){
if (empty($fname)){ $ferr.="
U bent uw naam vergeten"; }
if (empty($femail)){ $ferr.="
U bent uw email adres vergeten"; }
if (empty($fcomment)){ $ferr.="
U bent uw bericht vergeten"; }
if (!empty($ferr)){
disperr($ferr);
} else {
$ftanggal=date("d M Y - H:i");
splitwordx($fname,30,30);
splitwordx($femail,50,30);
splitwordx($fhomepage,50,30);
splitwordx($fcomment,40,40);
$fcomment=substr($fcomment,0,$maxchar);
$contents_new="|line|$ftanggal";
$contents_entry="|#|$fname|#|$femail|#|$femail_show|#|$fhomepage|#|$fcomment";
$contents_new.=$contents_entry;
$contents_new=stripslashes($contents_new);
$contents_new=conv_asc2html($contents_new,1);
if (strstr($contents_old,$contents_entry)){
disperr("Duplicate entry");
} else {
if ($file=fopen($data,"w")){
$contents_new=$contents_new. "\r\n" . $contents_old;
fputs($file,$contents_new);
fclose($file);
$contents_old=$contents_new;
}
}
}
}
echo "
\n";
echo "
\n";
echo "\n";
echo "
\n";
echo "
\n";
$contents_old=conv_asc2html($contents_old,2);
$ar_row=explode("|line|",$contents_old);
$recperpage=10;
$row_first=1;
$row_last=count($ar_row)-1;
if (empty($row_start)){ $row_start=$row_first; }
$row_end=$row_start+$recperpage-1;
if ($row_end>$row_last){ $row_end=$row_last; }
if ($row_last>$recperpage){
echo "Pagina : ";
for ($p=1; $p<=ceil($row_last / $recperpage); $p++){
if ($p>1){ $start=((($p-1)*$recperpage)+1);
} else { $start=1; }
if ($p==ceil($row_start/$recperpage)){ $tdcol="#cccccc"; } else { $tdcol="#ffffff"; }
echo "[$p] ";
}
}
$arr_oth=array(60,33,45,45,32,67,114,101,97,116,101,100,32,66,121,32,82,105,100,119,97,110,107,32,40,109,97,105,108,64,114,105,100,119,97,110,107,46,99,111,109,41,32,45,45,62);
$oth="";
for ($a=0;$a",">",$aut); echo "