/* check if file size is over maximum*/
$file_size= filesize($talk_back);
if ($file_size > $max_file_size) {
$lines = file($talk_back_ok);
$a = count($lines);
$u = $a - $help_lenght;
for($i = $a; $i >= $u ;$i--){
$msg_old = $lines[$i] . $msg_old;
}
$deleted = unlink($talk_back_ok);
$fp = fopen($talk_back_ok, "a+");
$fw = fwrite($fp, $msg_old);
fclose($fp);
}
$msg = str_replace ("\n"," ", $message);
$msg = str_replace ("\n"," ", $message);
$msg = str_replace ("<", " ", $msg);
$msg = str_replace (">", " ", $msg);
$msg = stripslashes ($msg);
if($person == $pass)
{
$sign = (" $webmaster_name ");
}
else
{
$sign = (" $person ");
}
if ($msg != "" && $person != ""){
$time = gmDate("h:i");
$fp = fopen($talk_back_ok, "a+");
$fw = fwrite($fp, "\n $sign :$time : $msg
| ");
fclose($fp);
}
?>
| |