CODE:
<?
$secret = "zap";
$mode = "a";
// the module can\'t be called by itself
if ( basename($PHP_SELF) == "annotate.php") {
exit;
}
// if the password is correct we overwrite
if ($password == $secret) {
$mode = "w";
$fp = fopen (basename($PHP_SELF) . ".comment", $mode);
fwrite ($fp, $message);
fclose ($fp);
}
// if there is a message we append it to a file called file.comment
// make sure that file.comment belongs to the server id (or world writable)
if ($message) {
/* uncomment the next two lines to strip out html from input */
/* $name = strip_tags($name); */
/* $message = strip_tags($message); */
/* $mail = strip_tags($mail); */
$name = StripSlashes($name);
$message = StripSlashes($message);
$mail = StripSlashes($mail);
$message = ereg_replace("\r\n\r\n", "\n<P>", $message);
$date = date("l, F j Y");
$message = " <table><tr><td bgcolor=#6BAEE4 width=490><font color=#4E80CB face=verdana size=-1><b>Автор:</b> $name | <b> Почта:</b> $mail</font></td></tr><tr> <td bgcolor=#6BAEE4 width=490><font color=#4E80CB face=verdana size=-1><b>Дата:</b> $date </font></td></tr><tr><td bgcolor=#AEDEFF width=490><font color=#4E80CB face=verdana size=-1>$message</td></tr></table><BR><BR> ";
$fp = fopen (basename($PHP_SELF) . ".comment", $mode);
fwrite ($fp, $message);
fclose ($fp);
}
@readfile(basename(($PHP_SELF . ".comment")));
?>
$secret = "zap";
$mode = "a";
// the module can\'t be called by itself
if ( basename($PHP_SELF) == "annotate.php") {
exit;
}
// if the password is correct we overwrite
if ($password == $secret) {
$mode = "w";
$fp = fopen (basename($PHP_SELF) . ".comment", $mode);
fwrite ($fp, $message);
fclose ($fp);
}
// if there is a message we append it to a file called file.comment
// make sure that file.comment belongs to the server id (or world writable)
if ($message) {
/* uncomment the next two lines to strip out html from input */
/* $name = strip_tags($name); */
/* $message = strip_tags($message); */
/* $mail = strip_tags($mail); */
$name = StripSlashes($name);
$message = StripSlashes($message);
$mail = StripSlashes($mail);
$message = ereg_replace("\r\n\r\n", "\n<P>", $message);
$date = date("l, F j Y");
$message = " <table><tr><td bgcolor=#6BAEE4 width=490><font color=#4E80CB face=verdana size=-1><b>Автор:</b> $name | <b> Почта:</b> $mail</font></td></tr><tr> <td bgcolor=#6BAEE4 width=490><font color=#4E80CB face=verdana size=-1><b>Дата:</b> $date </font></td></tr><tr><td bgcolor=#AEDEFF width=490><font color=#4E80CB face=verdana size=-1>$message</td></tr></table><BR><BR> ";
$fp = fopen (basename($PHP_SELF) . ".comment", $mode);
fwrite ($fp, $message);
fclose ($fp);
}
@readfile(basename(($PHP_SELF . ".comment")));
?>