",$Titles[Page],"
\n";
if ($PageStatus=="added") echo "$Titles[Added]"; else {
$captchanumber11=rand(1, 4);
$captchanumber12=rand(0, 9);
$captchanumber21=rand(1, 4);
$captchanumber22=rand(0, 9);
$_SESSION['captcha']=md5(base64_encode(($captchanumber11.$captchanumber12)+($captchanumber21.$captchanumber22)));
echo "
\n";
if ($PageStatus=="emptyname") echo "$Titles[EmptyName]
\n";
if ($PageStatus=="emptytext") echo "$Titles[EmptyText]
\n";
if ($PageStatus=="wrongcaptcha") echo "$Titles[WrongCaptcha]
\n";
}
}
function EntriesView() {
global $Titles;
global $DataStatus;
global $Entries;
if ($DataStatus=="empty") echo "$Titles[EmptyFile]";
else {
$Entries=array_reverse($Entries);
foreach($Entries as $e=>$Entry) {
echo "
\n";
echo " ",nl2br($Entry[4]),"
\n";
if ($Entry[6]) echo "
$Titles[Response]:
\n";
if ($Entry[6]) echo nl2br($Entry[6]),"
\n";
echo "
\n";
}
}
}
if($_POST['submit']) {
if(!$_POST['text']) $PageStatus="emptytext";
if(!$_POST['name']) $PageStatus="emptyname";
if(($_POST['name'])&&($_POST['text']))
if ($_POST["captcha"]&&(md5(base64_encode($_POST["captcha"]))==$_SESSION["captcha"])) {
AddEntry();
if ($GBnotificationmailto) SendMail();
} else $PageStatus="wrongcaptcha";
if (($PageStatus)&&!($PageStatus=="added")) {
$SESSION["value"]["name"]=$_POST['name'];
$SESSION["value"]["from"]=$_POST['from'];
$SESSION["value"]["link"]=$_POST['link'];
$SESSION["value"]["email"]=$_POST['email'];
$SESSION["value"]["text"]=$_POST['text'];
$Values=$SESSION["value"];
} else Unset($SESSION["value"]);
}
$Entries=ReadEntries();
include "page.php";
?>