some code refactoring, there is no any warnings now

This commit is contained in:
ivan 2017-09-30 11:14:00 +03:00
parent 15ad0e3e09
commit 8d36e4b584
5 changed files with 278 additions and 271 deletions

View File

@ -15,8 +15,8 @@ function ReadEntries() {
$Entries["$e"]=$entrydata;
$Entries["$e"][10]=$e+1;
} fclose($fhandle);
if (!$Entries[0]) $DataStatus="empty";
return $Entries;
if (!isset($Entries[0])) $DataStatus="empty";
else return $Entries;
}
function SaveEntries() {
@ -50,10 +50,10 @@ function Search($SearchQuery) {
function AddSearchBar() {
global $Titles;
global $GBsearch;
if (!(($_SESSION["EditStatus"]) or ($_SESSION["DeleteStatus"]=="deletion"))) if ($GBsearch) {
if ($GBsearch) if (!(isset($_SESSION["EditStatus"]) or ($_SESSION["DeleteStatus"]=="deletion"))) {
echo "<form action=administration.php method=post>";
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255>";
echo "<input type=submit name=\"search\" value=\"$Titles[Search]\">";
echo "<input type=submit name=\"search\" value=\"",$Titles["Search"],"\">";
echo "</form>";
}
}
@ -62,13 +62,13 @@ function AdminHeaderView() {
global $Titles;
global $GBadmin;
global $GBpassword;
echo "<h2><a href=\"index.php\">$Titles[AdminHeader]</a></h2>\n";
echo "<h2><a href=\"index.php\">",$Titles["AdminHeader"],"</a></h2>\n";
if ($_SESSION["SessionStatus"]==(md5($GBadmin.$GBpassword))) {
echo "<div style=\"position: absolute; right: 127px; top: 59px;\">",AddSearchBar(),"</div>";
echo "<form action=administration.php method=post>\n";
echo " <p align=\"right\"><input type=submit name=\"exit\" value=\"$Titles[AdminExit]\"></p>\n";
echo " <p align=\"right\"><input type=submit name=\"exit\" value=\"",$Titles["AdminExit"],"\"></p>\n";
echo "</form>\n";
echo " $Titles[AdminHello], $GBadmin!\n";
echo " ",$Titles["AdminHello"],", $GBadmin!\n";
}
}
@ -80,10 +80,10 @@ function SingleEntry($Entry) {
global $GBcategoryfield;
echo " <tr><td>",($Entry[10]),"<input type=checkbox name=\"cb",($Entry[10]-1),"\" value=\"checked\"></td><td>$Entry[0]</td>";
if ($GBcityfield) echo "<td>$Entry[1]</td>";
if ($HBlinkfield) echo "<td>$Entry[2]</td>";
if ($GBlinkfield) echo "<td>$Entry[2]</td>";
if ($GBsubjectfield) echo "<td>$Entry[7]</td>";
if ($GBcategoryfield) echo "<td>$Entry[8]</td>";
echo "<td>$Entry[3]</td><td>",nl2br($Entry[4]),"</td><td>",nl2br($Entry[6]),"</td><td>",date("j.m.Y, H:i",$Entry[5]),"</td><td><input type=submit name=\"submit",($Entry[10]-1),"\" value=\"$Titles[AdminEdit]\"></td></tr>\n";
echo "<td>$Entry[3]</td><td>",nl2br($Entry[4]),"</td><td>",nl2br($Entry[6]),"</td><td>",date("j.m.Y, H:i",$Entry[5]),"</td><td><input type=submit name=\"submit",($Entry[10]-1),"\" value=\"",$Titles["AdminEdit"],"\"></td></tr>\n";
}
function AdminEntriesView() {
@ -98,23 +98,23 @@ function AdminEntriesView() {
global $GBlinkfield;
global $GBsubjectfield;
global $GBcategoryfield;
if ($_SESSION["SessionStatus"]==(md5($GBadmin.$GBpassword))) if ($DataStatus=="empty") echo "$Titles[EmptyFile]\n";
if ($_SESSION["SessionStatus"]==(md5($GBadmin.$GBpassword))) if ($DataStatus=="empty") echo $Titles["EmptyFile"],"\n";
else if ($_SESSION["DeleteStatus"]=="deletion") {
echo " $Titles[AdminSureDel] ",count($_SESSION["DeleteEntries"])," $Titles[AdminSureDelMessages]?\n";
echo " ",$Titles["AdminSureDel"]," ",count($_SESSION["DeleteEntries"])," ",$Titles["AdminSureDelMessages"],"?\n";
echo "<form action=administration.php method=post>\n";
echo " <input type=submit name=\"applydelete\" value=\"$Titles[AdminDelete]\">\n";
echo " <input type=submit name=\"canceldelete\" value=\"$Titles[AdminCancel]\">\n";
echo " <input type=submit name=\"applydelete\" value=\"",$Titles["AdminDelete"],"\">\n";
echo " <input type=submit name=\"canceldelete\" value=\"",$Titles["AdminCancel"],"\">\n";
echo "</form>\n";
} else if ($_SESSION["EditStatus"]) {
echo " $Titles[AdminMessage] ", ($_SESSION["EditStatus"]),", ",date("j.m.Y, H:i",$AdminEntries[($_SESSION["EditStatus"]-1)][5]),":<br>\n";
} else if (isset($_SESSION["EditStatus"])) {
echo " ",$Titles["AdminMessage"]," ", ($_SESSION["EditStatus"]),", ",date("j.m.Y, H:i",$AdminEntries[($_SESSION["EditStatus"]-1)][5]),":<br>\n";
echo "<form action=administration.php method=post>\n";
echo " $Titles[AdminName]: <input type=text name=\"editname\" value=\"",$AdminEntries[($_SESSION["EditStatus"]-1)][0],"\" maxlength=255><br>\n";
if ($GBcityfield) echo " $Titles[City] <input type=text name=\"editfrom\" value=\"",$AdminEntries[($_SESSION["EditStatus"]-1)][1],"\" maxlength=255><br>\n";
if ($GBlinkfield) echo " $Titles[Link] <input type=text name=\"editlink\" value=\"",$AdminEntries[($_SESSION["EditStatus"]-1)][2],"\" maxlength=255><br>\n";
echo " $Titles[Email] <input type=text name=\"editmail\" value=\"",$AdminEntries[($_SESSION["EditStatus"]-1)][3],"\" maxlength=255><br>\n";
if ($GBsubjectfield) echo " $Titles[Subject] <input type=text name=\"editsubj\" value=\"",$AdminEntries[($_SESSION["EditStatus"]-1)][7],"\" maxlength=255><br>\n";
echo " ",$Titles["AdminName"],": <input type=text name=\"editname\" value=\"",$AdminEntries[($_SESSION["EditStatus"]-1)][0],"\" maxlength=255><br>\n";
if ($GBcityfield) echo " ",$Titles["City"]," <input type=text name=\"editfrom\" value=\"",$AdminEntries[($_SESSION["EditStatus"]-1)][1],"\" maxlength=255><br>\n";
if ($GBlinkfield) echo " ",$Titles["Link"]," <input type=text name=\"editlink\" value=\"",$AdminEntries[($_SESSION["EditStatus"]-1)][2],"\" maxlength=255><br>\n";
echo " ",$Titles["Email"]," <input type=text name=\"editmail\" value=\"",$AdminEntries[($_SESSION["EditStatus"]-1)][3],"\" maxlength=255><br>\n";
if ($GBsubjectfield) echo " ",$Titles["Subject"]," <input type=text name=\"editsubj\" value=\"",$AdminEntries[($_SESSION["EditStatus"]-1)][7],"\" maxlength=255><br>\n";
if ($GBcategoryfield) {
echo " $Titles[Category] <select name=\"editcategory\">";
echo " ",$Titles["Category"]," <select name=\"editcategory\">";
foreach($GBcategoryfield as $Category) {
echo " <option value=\"$Category\"";
if ($AdminEntries[($_SESSION["EditStatus"]-1)][8]==$Category) echo " selected=\"selected\"";
@ -122,43 +122,43 @@ function AdminEntriesView() {
}
echo "</select><br>\n";
}
echo " $Titles[AdminMessage]:<br>\n <textarea name=\"edittext\" wrap=virtual cols=50 rows=5 maxlength=$GBtextlenght>",$AdminEntries[($_SESSION["EditStatus"]-1)][4],"</textarea><br>\n";
echo " $Titles[Response]:<br>\n <textarea name=\"editresp\" wrap=virtual cols=50 rows=5 maxlength=$GBtextlenght>",$AdminEntries[($_SESSION["EditStatus"]-1)][6],"</textarea><br>\n";
echo " <input type=submit name=\"submiteedit\" value=\"$Titles[AdminApply]\"> ";
echo "<input type=submit name=\"applydelete\" value=\"$Titles[AdminDelete]\"> ";
echo "<input type=submit name=\"canceledit\" value=\"$Titles[AdminCancel]\">\n";
echo " ",$Titles["AdminMessage"],":<br>\n <textarea name=\"edittext\" wrap=virtual cols=50 rows=5 maxlength=$GBtextlenght>",$AdminEntries[($_SESSION["EditStatus"]-1)][4],"</textarea><br>\n";
echo " ",$Titles["Response"],":<br>\n <textarea name=\"editresp\" wrap=virtual cols=50 rows=5 maxlength=$GBtextlenght>",$AdminEntries[($_SESSION["EditStatus"]-1)][6],"</textarea><br>\n";
echo " <input type=submit name=\"submiteedit\" value=\"",$Titles["AdminApply"],"\"> ";
echo "<input type=submit name=\"applydelete\" value=\"",$Titles["AdminDelete"],"\"> ";
echo "<input type=submit name=\"canceledit\" value=\"",$Titles["AdminCancel"],"\">\n";
echo "</form>\n";
} else {
if($_POST['search']&&$_POST['serachq']) {
$SearchResult=Search($_POST['serachq']);
if(isset($_POST["search"])&&$_POST["serachq"]) {
$SearchResult=Search($_POST["serachq"]);
if ($SearchResult) {
$GBpagination=0;
unset($AdminEntries);
foreach($SearchResult as $n=>$Entry) $AdminEntries[$n]=$Entry[1];
} else echo "$Titles[NoResult]: '",$_POST['serachq'],"'.<br>\n";
} else echo $Titles["NoResult"],": '",$_POST["serachq"],"'.<br>\n";
}
if (($GBpagination>0)&&(count($AdminEntries)>$GBpagination)) {
$Entries=array_reverse($AdminEntries);
if ($_GET['page']) switch ($_GET['page']) {
case $Titles[First]:
if (isset($_GET["page"])) switch ($_GET["page"]) {
case $Titles["First"]:
$CurrentPage=0;
break;
case $Titles[Last]:
case $Titles["Last"]:
$CurrentPage=intdiv(count($Entries),$GBpagination);
break;
case "$Titles[Previous]":
$CurrentPage=$_SESSION['currentpage']-1;
case $Titles["Previous"]:
$CurrentPage=$_SESSION["currentpage"]-1;
break;
case "$Titles[Next]":
$CurrentPage=$_SESSION['currentpage']+1;
case $Titles["Next"]:
$CurrentPage=$_SESSION["currentpage"]+1;
break;
default:
$CurrentPage=$_GET['page']-1;
$CurrentPage=$_GET["page"]-1;
} else $CurrentPage=0;
echo "<form action=administration.php method=\"get\">\n";
if ($CurrentPage>0) {
echo " <input type=\"submit\" value=\"$Titles[First]\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"$Titles[Previous]\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"",$Titles["First"],"\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"",$Titles["Previous"],"\" name=\"page\"/>\n";
}
for ($p = ($CurrentPage-2); $p <= ($CurrentPage+2); $p++) {
$page = $p+1;
@ -169,74 +169,79 @@ function AdminEntriesView() {
}
}
if ($CurrentPage<((count($Entries)/$GBpagination)-1)) {
echo " <input type=\"submit\" value=\"$Titles[Next]\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"$Titles[Last]\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"",$Titles["Next"],"\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"",$Titles["Last"],"\" name=\"page\"/>\n";
}
echo "</form>\n";
echo "<form action=administration.php method=post>\n";
echo "<table border=1 width=\"100%\">\n <tr><th></th><th>$Titles[AdminName]</th>";
if ($GBcityfield) echo "<th>$Titles[City]</th>";
if ($HBlinkfield) echo "<th>$Titles[Link]</th>";
if ($GBsubjectfield) echo "<th>$Titles[Subject]</th>";
if ($GBcategoryfield) echo "<th>$Titles[Category]</th>";
echo "<th>$Titles[Email]</th><th>$Titles[AdminMessage]</th><th>$Titles[Response]</th><th>$Titles[AdminDate]</th><th></th></tr>\n";
echo "<table border=1 width=\"100%\">\n <tr><th></th><th>",$Titles["AdminName"],"</th>";
if ($GBcityfield) echo "<th>",$Titles["City"],"</th>";
if ($GBlinkfield) echo "<th>",$Titles["Link"],"</th>";
if ($GBsubjectfield) echo "<th>",$Titles["Subject"],"</th>";
if ($GBcategoryfield) echo "<th>",$Titles["Category"],"</th>";
echo "<th>",$Titles["Email"],"</th><th>",$Titles["AdminMessage"],"</th><th>",$Titles["Response"],"</th><th>",$Titles["AdminDate"],"</th><th></th></tr>\n";
for ($e = ($GBpagination*$CurrentPage); $e < ($GBpagination*($CurrentPage+1)); $e++) {
if ($e>=count($Entries)) break;
$Entry = $Entries[$e];
SingleEntry($Entry);
}
$_SESSION['currentpage']=$CurrentPage;
$_SESSION["currentpage"]=$CurrentPage;
} else {
echo "<form action=administration.php method=post>\n";
echo "<table border=1 width=\"100%\">\n <tr><th></th><th>$Titles[AdminName]</th>";
if ($GBcityfield) echo "<th>$Titles[City]</th>";
if ($HBlinkfield) echo "<th>$Titles[Link]</th>";
if ($GBsubjectfield) echo "<th>$Titles[Subject]</th>";
if ($GBcategoryfield) echo "<th>$Titles[Category]</th>";
echo "<th>$Titles[Email]</th><th>$Titles[AdminMessage]</th><th>$Titles[Response]</th><th>$Titles[AdminDate]</th><th></th></tr>\n";
echo "<table border=1 width=\"100%\">\n <tr><th></th><th>",$Titles["AdminName"],"</th>";
if ($GBcityfield) echo "<th>",$Titles["City"],"</th>";
if ($GBlinkfield) echo "<th>",$Titles["Link"],"</th>";
if ($GBsubjectfield) echo "<th>",$Titles["Subject"],"</th>";
if ($GBcategoryfield) echo "<th>",$Titles["Category"],"</th>";
echo "<th>",$Titles["Email"],"</th><th>",$Titles["AdminMessage"],"</th><th>",$Titles["Response"],"</th><th>",$Titles["AdminDate"],"</th><th></th></tr>\n";
$Entries=array_reverse($AdminEntries);
foreach($Entries as $e=>$Entry) SingleEntry($Entry);
}
echo "</table>\n";
echo " <input type=submit name=\"submitdelete\" value=\"$Titles[AdminDeleteChecked]\">\n";
echo " <input type=submit name=\"submitdelete\" value=\"",$Titles["AdminDeleteChecked"],"\">\n";
echo "</form>\n";
} else {
if (($_POST["login"])&&(!$_SESSION["SessionStatus"])) echo "$Titles[WrongLogin]<br>\n";
if (isset($_POST["login"])&&(!$_SESSION["SessionStatus"])) echo $Titles["WrongLogin"],"<br>\n";
echo "<form action=administration.php method=post>\n";
echo " $Titles[Login] <input type=text name=\"adminlogin\" maxlength=255><br>\n";
echo " $Titles[Password] <input type=password name=\"adminpass\" maxlength=255><br>\n";
echo " <input type=submit name=\"login\" value=\"$Titles[Enter]\">\n";
echo " ",$Titles["Login"]," <input type=text name=\"adminlogin\" maxlength=255><br>\n";
echo " ",$Titles["Password"]," <input type=password name=\"adminpass\" maxlength=255><br>\n";
echo " <input type=submit name=\"login\" value=\"",$Titles["Enter"],"\">\n";
echo "</form>\n";
}
}
if (isset($_POST["adminlogin"]))
if ((($_POST["adminlogin"])==$GBadmin)&&(($_POST["adminpass"])==$GBpassword)) $_SESSION["SessionStatus"]=(md5($GBadmin.$GBpassword));
if ($_POST["exit"]) $_SESSION["SessionStatus"]="";
if ($_POST["canceldelete"]) {
if (isset($_POST["exit"])) $_SESSION["SessionStatus"]="";
if (isset($_POST["canceldelete"])) {
$_SESSION["DeleteStatus"]="";
Unset($_SESSION["DeleteEntries"]);
}
if ($_POST["canceledit"]) Unset($_SESSION["EditStatus"]);
if (isset($_POST["canceledit"])) Unset($_SESSION["EditStatus"]);
if ($_SESSION["SessionStatus"]==(md5($GBadmin.$GBpassword))) {
$AdminEntries=ReadEntries();
if ($_POST["submitdelete"]) {
if (isset($_POST["submitdelete"])) {
$_SESSION["DeleteStatus"]="deletion";
foreach($AdminEntries as $e=>$Entry) if ($_POST["cb$e"]) $_SESSION["DeleteEntries"][]=$e;
foreach($AdminEntries as $e=>$Entry) if (isset($_POST["cb$e"])) $_SESSION["DeleteEntries"][]=$e;
if (!count($_SESSION["DeleteEntries"])) $_SESSION["DeleteStatus"]="";
} if (($_POST["submiteedit"])&&($_SESSION["EditStatus"])) {
} if (isset($_POST["submiteedit"])) if (($_POST["submiteedit"])&&($_SESSION["EditStatus"])) {
$AdminEntries[($_SESSION["EditStatus"]-1)][0]=$_POST["editname"];
$AdminEntries[($_SESSION["EditStatus"]-1)][1]=$_POST["editfrom"];
$AdminEntries[($_SESSION["EditStatus"]-1)][2]=$_POST["editlink"];
if (isset($_POST["editfrom"])) $AdminEntries[($_SESSION["EditStatus"]-1)][1]=$_POST["editfrom"];
else $AdminEntries[($_SESSION["EditStatus"]-1)][1]="";
if (isset($_POST["editlink"])) $AdminEntries[($_SESSION["EditStatus"]-1)][2]=$_POST["editlink"];
else $AdminEntries[($_SESSION["EditStatus"]-1)][2]="";
$AdminEntries[($_SESSION["EditStatus"]-1)][3]=$_POST["editmail"];
$AdminEntries[($_SESSION["EditStatus"]-1)][4]=$_POST["edittext"];
$AdminEntries[($_SESSION["EditStatus"]-1)][6]=$_POST["editresp"];
$AdminEntries[($_SESSION["EditStatus"]-1)][7]=$_POST["editsubj"];
$AdminEntries[($_SESSION["EditStatus"]-1)][8]=$_POST["editcategory"];
if (isset($_POST["editsubj"])) $AdminEntries[($_SESSION["EditStatus"]-1)][7]=$_POST["editsubj"];
else $AdminEntries[($_SESSION["EditStatus"]-1)][7]="";
if (isset($_POST["editcategory"])) $AdminEntries[($_SESSION["EditStatus"]-1)][8]=$_POST["editcategory"];
else $AdminEntries[($_SESSION["EditStatus"]-1)][8]="";
SaveEntries();
Unset($_SESSION["EditStatus"]);
$AdminEntries=ReadEntries();
} if ($_POST["applydelete"]) {
if ($_SESSION["EditStatus"]) {
} if (isset($_POST["applydelete"])) if ($_POST["applydelete"]) {
if (isset($_SESSION["EditStatus"])) {
Unset($AdminEntries[($_SESSION["EditStatus"]-1)]);
SaveEntries();
Unset($_SESSION["EditStatus"]);
@ -248,11 +253,11 @@ if ($_SESSION["SessionStatus"]==(md5($GBadmin.$GBpassword))) {
$_SESSION["DeleteStatus"]="";
$AdminEntries=ReadEntries();
}
} if (!$_SESSION["EditStatus"]) for ($e=0;$e<count($AdminEntries);$e++) if ($_POST["submit$e"]) $_SESSION["EditStatus"]=($e+1);
} if (!isset($_SESSION["EditStatus"])) for ($e=0;$e<count($AdminEntries);$e++) if (isset($_POST["submit$e"])) $_SESSION["EditStatus"]=($e+1);
}
?><html>
<head>
<title><?php echo $Titles[HeadTitle];?></title>
<title><?php echo $Titles["HeadTitle"];?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu:regular&amp;subset=Latin,Cyrillic">
<link rel="stylesheet" type="text/css" href="anthrstlsht.css">

186
index.php
View File

@ -16,15 +16,15 @@ function SendMail() {
global $GBlinkfield;
global $GBsubjectfield;
global $GBcategoryfield;
$message=$_POST['name'];
if ($GBcityfield) $message=$message." ".$Titles[From]." ".$_POST['from'];
$message=$_POST["name"];
if ($GBcityfield) $message=$message." ".$Titles["From"]." ".$_POST["from"];
$message=$message."(";
if ($GBlinkfield) $message=$message.$_POST['link'].", ";
$message=$message.$_POST['email'].") ".$Titles[Wrote];
if ($GBsubjectfield) $message=$message." ".$_POST['subj'];
if ($GBcategoryfield) $message=$message." [".$_POST['category']."]";
$message=$message.":\r\n\r\n".$_POST['text']."\r\n\r\n_____\r\n".$Titles[MailAdmin];
mail($GBnotificationmailto, $Titles[MailSubject], $message,
if ($GBlinkfield) $message=$message.$_POST["link"].", ";
$message=$message.$_POST["email"].") ".$Titles["Wrote"];
if ($GBsubjectfield) $message=$message." ".$_POST["subj"];
if ($GBcategoryfield) $message=$message." [".$_POST["category"]."]";
$message=$message.":\r\n\r\n".$_POST["text"]."\r\n\r\n_____\r\n".$Titles["MailAdmin"];
mail($GBnotificationmailto, $Titles["MailSubject"], $message,
"From: ".$GBnotificationmailfrom." \r\n"."Content-type: text/plain; charset=utf-8\r\n"
."X-Mailer: PHP/".phpversion());
}
@ -38,15 +38,15 @@ function ReadEntries() {
$Entries["$e"][10]=$e+1;
}
fclose($fhandle);
if (!$Entries[0]) $DataStatus="empty";
return $Entries;
if (!isset($Entries[0])) $DataStatus="empty";
else return $Entries;
}
function SaveFile() {
$filename = substr(md5(uniqid()), 0, 13).'.'.pathinfo($_FILES['uploadedfile']['name'], PATHINFO_EXTENSION);
$uploaddir = 'upload/';
$filename = substr(md5(uniqid()), 0, 13).'.'.pathinfo($_FILES["uploadedfile"]["name"], PATHINFO_EXTENSION);
$uploaddir = "upload/";
$uploadfile = $uploaddir.$filename;
if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $uploadfile)) {
if (move_uploaded_file($_FILES["uploadedfile"]["tmp_name"], $uploadfile)) {
return $uploadfile;
} else {
return false;
@ -55,8 +55,8 @@ function SaveFile() {
function CheckFile() {
global $GBimagesize;
if (getimagesize($_FILES['uploadedfile']['tmp_name'])) {
if ((filesize($_FILES['uploadedfile']['tmp_name']))<($GBimagesize)) return SaveFile();
if (getimagesize($_FILES["uploadedfile"]["tmp_name"])) {
if ((filesize($_FILES["uploadedfile"]["tmp_name"]))<($GBimagesize)) return SaveFile();
else return false;
} else return false;
}
@ -71,34 +71,34 @@ function AddEntry() {
global $GBsubjectfield;
global $GBcategoryfield;
global $GBstriptags;
if (!$GBstriptags) $NewEntry[name]=$_POST['name'];
else $NewEntry[name]=strip_tags($_POST['name']);
if (!$GBstriptags) $NewEntry["name"]=$_POST["name"];
else $NewEntry["name"]=strip_tags($_POST["name"]);
if ($GBcityfield) {
if (!$GBstriptags) $NewEntry[from]=$_POST['from'];
else $NewEntry[from]=strip_tags($_POST['from']);
} else $NewEntry[from]="";
if (!$GBstriptags) $NewEntry["from"]=$_POST["from"];
else $NewEntry["from"]=strip_tags($_POST["from"]);
} else $NewEntry["from"]="";
if ($GBlinkfield) {
if (!$GBstriptags) $NewEntry[link]=$_POST['link'];
else $NewEntry[link]=strip_tags($_POST['link']);
} else $NewEntry[link]="";
$NewEntry[email]=$_POST['email'];
if (!$GBstriptags) $NewEntry[text]=$_POST['text'];
else $NewEntry[text]=strip_tags($_POST['text']);
if ($UploadedFile) $NewEntry[text]=$NewEntry[text]." <br><img src=\"$UploadedFile\">";
$NewEntry[datetime]=time();
$NewEntry[response]="";
if (!$GBstriptags) $NewEntry["link"]=$_POST["link"];
else $NewEntry["link"]=strip_tags($_POST["link"]);
} else $NewEntry["link"]="";
$NewEntry["email"]=$_POST["email"];
if (!$GBstriptags) $NewEntry["text"]=$_POST["text"];
else $NewEntry["text"]=strip_tags($_POST["text"]);
if ($UploadedFile) $NewEntry["text"]=$NewEntry["text"]." <br><img src=\"$UploadedFile\">";
$NewEntry["datetime"]=time();
$NewEntry["response"]="";
if ($GBsubjectfield) {
if (!$GBstriptags) $NewEntry[subj]=$_POST['subj'];
else $NewEntry[subj]=strip_tags($_POST['subj']);
} else $NewEntry[subj]="";
if ($GBcategoryfield) $NewEntry[category]=strip_tags($_POST['category']);
else $NewEntry[category]="";
$NewEntry[parameters]="";
if (!$GBstriptags) $NewEntry["subj"]=$_POST["subj"];
else $NewEntry["subj"]=strip_tags($_POST["subj"]);
} else $NewEntry["subj"]="";
if ($GBcategoryfield) $NewEntry["category"]=strip_tags($_POST["category"]);
else $NewEntry["category"]="";
$NewEntry["parameters"]="";
$fhandle=fopen($GBdata,"a");
fputcsv($fhandle,$NewEntry);
fclose($fhandle);
$PageStatus="added";
$_SESSION['captcha']="";
$_SESSION["captcha"]="";
}
function AddEntryView() {
@ -112,21 +112,21 @@ function AddEntryView() {
global $GBlinkfield;
global $GBsubjectfield;
global $GBcategoryfield;
echo "<h2>",$Titles[Page],"</h2><br>\n";
if ($PageStatus=="added") echo "$Titles[Added]"."<br>\n";
echo "<h2>",$Titles["Page"],"</h2><br>\n";
if ($PageStatus=="added") echo $Titles["Added"]."<br>\n";
$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)));
$_SESSION["captcha"]=md5(base64_encode(($captchanumber11.$captchanumber12)+($captchanumber21.$captchanumber22)));
echo "<form action=index.php method=post enctype=\"multipart/form-data\">\n";
echo " $Titles[Name]: <input type=text name=\"name\" value=\"",$Values["name"],"\" maxlength=255> ($Titles[Required])<br>\n";
if ($GBcityfield) echo " $Titles[City]: <input type=text name=\"from\" value=\"",$Values["from"],"\" maxlength=255><br>\n";
if ($GBlinkfield) echo " $Titles[Link]: <input type=text name=\"link\" value=\"",$Values["link"],"\" maxlength=255><br>\n";
echo " $Titles[Email]: <input type=text name=\"email\" value=\"",$Values["email"],"\" maxlength=255> ($Titles[NotPublic])<br>\n";
if ($GBsubjectfield) echo " $Titles[Subject]: <input type=text name=\"subj\" value=\"",$Values["subj"],"\" maxlength=255><br>\n";
echo " ",$Titles["Name"],": <input type=text name=\"name\" value=\"",$Values["name"],"\" maxlength=255> (",$Titles["Required"],")<br>\n";
if ($GBcityfield) echo " ",$Titles["City"],": <input type=text name=\"from\" value=\"",$Values["from"],"\" maxlength=255><br>\n";
if ($GBlinkfield) echo " ",$Titles["Link"],": <input type=text name=\"link\" value=\"",$Values["link"],"\" maxlength=255><br>\n";
echo " ",$Titles["Email"],": <input type=text name=\"email\" value=\"",$Values["email"],"\" maxlength=255> ($Titles[NotPublic])<br>\n";
if ($GBsubjectfield) echo " ",$Titles["Subject"],": <input type=text name=\"subj\" value=\"",$Values["subj"],"\" maxlength=255><br>\n";
if ($GBcategoryfield) {
echo " $Titles[Category]: <select name=\"category\">";
echo " ",$Titles["Category"],": <select name=\"category\">";
foreach($GBcategoryfield as $Category) {
echo " <option value=\"$Category\"";
if ($Values["category"]==$Category) echo " selected=\"selected\"";
@ -134,18 +134,18 @@ function AddEntryView() {
}
echo "</select><br>\n";
}
echo " $Titles[Text]:<br>\n <textarea name=\"text\" wrap=virtual cols=50 rows=5 maxlength=$GBtextlenght>",$Values["text"],"</textarea><br>\n";
echo " ",$Titles["Text"],":<br>\n <textarea name=\"text\" wrap=virtual cols=50 rows=5 maxlength=$GBtextlenght>",$Values["text"],"</textarea><br>\n";
if ($GBupload) {
echo " <label for=\"file\">".$Titles[FileUpload]."</label>\n";
echo " <label for=\"file\">".$Titles["FileUpload"]."</label>\n";
echo " <input type=\"file\" name=\"uploadedfile\"><br>\n";
}
if ($GBcaptcha) echo " $Titles[Captcha]: <font class=\"text\">$captchanumber11</font><font>$captchanumber11</font><font>$captchanumber12</font> $Titles[CaptchaPlus] <font>$captchanumber21</font><font>$captchanumber22</font><font class=\"text\">$captchanumber21</font> = <input type=text name=\"captcha\" size=2 maxlength=2> ?<br>\n";
echo " <input type=submit name=\"submit\" value=\"$Titles[Submit]\">\n";
if ($GBcaptcha) echo " ",$Titles["Captcha"],": <font class=\"text\">$captchanumber11</font><font>$captchanumber11</font><font>$captchanumber12</font> ",$Titles["CaptchaPlus"]," <font>$captchanumber21</font><font>$captchanumber22</font><font class=\"text\">$captchanumber21</font> = <input type=text name=\"captcha\" size=2 maxlength=2> ?<br>\n";
echo " <input type=submit name=\"submit\" value=\"",$Titles["Submit"],"\">\n";
echo "</form>\n";
if ($PageStatus=="emptyname") echo "$Titles[EmptyName]<br>\n";
if ($PageStatus=="emptytext") echo "$Titles[EmptyText]<br>\n";
if ($PageStatus=="wrongimage") echo "$Titles[WrongImage]<br>\n";
if ($PageStatus=="wrongcaptcha") echo "$Titles[WrongCaptcha]<br>\n";
if ($PageStatus=="emptyname") echo $Titles["EmptyName"],"<br>\n";
if ($PageStatus=="emptytext") echo $Titles["EmptyText"],"<br>\n";
if ($PageStatus=="wrongimage") echo $Titles["WrongImage"],"<br>\n";
if ($PageStatus=="wrongcaptcha") echo $Titles["WrongCaptcha"],"<br>\n";
}
function Search($SearchQuery) {
@ -171,7 +171,7 @@ function AddSearchBar() {
if ($GBsearch) {
echo "<form action=index.php method=post>";
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255>";
echo "<input type=submit name=\"search\" value=\"$Titles[Search]\">";
echo "<input type=submit name=\"search\" value=\"",$Titles["Search"],"\">";
echo "</form>";
}
}
@ -187,9 +187,9 @@ function SinlgeEntry($Entry) {
if ($Entry[2]) echo "<a href=\"",$Entry[2],"\">";
echo "<b>",$Entry[0],"</b>";
if ($Entry[2]) echo "</a>";
if ($Entry[1]) echo " ",$Titles[From]," <b>",$Entry[1],"</b>";
echo ", ",date("j.m.Y, H:i",$Entry[5]),", ",$Titles[Wrote];
if (($GBsubjectfield)&&($Entry[7])) echo " ",$Titles[About]," '",$Entry[7],"'";
if ($Entry[1]) echo " ",$Titles["From"]," <b>",$Entry[1],"</b>";
echo ", ",date("j.m.Y, H:i",$Entry[5]),", ",$Titles["Wrote"];
if (($GBsubjectfield)&&($Entry[7])) echo " ",$Titles["About"]," '",$Entry[7],"'";
if (($GBcategoryfield)&&($Entry[8])) echo " [",$Entry[8],"]";
echo ":</div></h4><br>\n";
if ($GBreadmore>0) {
@ -199,12 +199,12 @@ function SinlgeEntry($Entry) {
if ($_POST[$readmorenumber]) echo " ",nl2br($Entry[4]),"<br>\n";
else {
$Message = substr($Message, 0, $GBreadmore);
$Message = substr($Message, 0, strrpos($Message, ' '))."... <form action=\"\" method=\"post\"><button type=\"submit\" name=\"readmore".$Entry[10]."\" value=\"read\" class=\"btn-link\">".$Titles[ReadMore]."</button></form>";
$Message = substr($Message, 0, strrpos($Message, ' '))."... <form action=\"\" method=\"post\"><button type=\"submit\" name=\"readmore".$Entry[10]."\" value=\"read\" class=\"btn-link\">".$Titles["ReadMore"]."</button></form>";
echo " ",nl2br($Message),"<br>\n";
}
} else echo " ",nl2br($Entry[4]),"<br>\n";
} else echo " ",nl2br($Entry[4]),"<br>\n";
if ($Entry[6]) echo "<br><i><b>$Titles[Response]:</b><br>\n";
if ($Entry[6]) echo "<br><i><b>",$Titles["Response"],":</b><br>\n";
if ($Entry[6]) echo nl2br($Entry[6]),"</i><br>\n";
echo "</div><hr>\n";
}
@ -219,32 +219,32 @@ function EntriesView() {
global $GBlinkfield;
global $GBsubjectfield;
global $GBcategoryfield;
if ($DataStatus=="empty") echo "$Titles[EmptyFile]";
else if($_POST['search']&&$_POST['serachq']) {
$SearchResult=Search($_POST['serachq']);
if ($DataStatus=="empty") echo $Titles["EmptyFile"];
else if(isset($_POST["search"])&&isset($_POST["serachq"])) {
$SearchResult=Search($_POST["serachq"]);
if ($SearchResult) {
$GBpagination=0;
unset($Entries);
foreach($SearchResult as $n=>$Entry) $Entries[$n]=$Entry[1];
} else echo "$Titles[NoResult]: '",$_POST['serachq'],"'.<br>\n";
} else echo $Titles["NoResult"].": '",$_POST["serachq"],"'.<br>\n";
}
if (($GBpagination>0)&&(count($Entries)>$GBpagination)) {
$Entries=array_reverse($Entries);
if ($_GET['page']) switch ($_GET['page']) {
case $Titles[First]:
if (isset($_GET["page"])) switch ($_GET["page"]) {
case $Titles["First"]:
$CurrentPage=0;
break;
case $Titles[Last]:
case $Titles["Last"]:
$CurrentPage=(int)((count($Entries)-1)/$GBpagination);
break;
case "$Titles[Previous]":
$CurrentPage=$_SESSION['currentpage']-1;
case $Titles["Previous"]:
$CurrentPage=$_SESSION["currentpage"]-1;
break;
case "$Titles[Next]":
$CurrentPage=$_SESSION['currentpage']+1;
case $Titles["Next"]:
$CurrentPage=$_SESSION["currentpage"]+1;
break;
default:
$CurrentPage=$_GET['page']-1;
$CurrentPage=$_GET["page"]-1;
}
else $CurrentPage=0;
for ($e = ($GBpagination*$CurrentPage); $e < ($GBpagination*($CurrentPage+1)); $e++) {
@ -253,8 +253,8 @@ function EntriesView() {
}
echo "<form action=index.php method=\"get\">\n";
if ($CurrentPage>0) {
echo " <input type=\"submit\" value=\"$Titles[First]\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"$Titles[Previous]\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"",$Titles["First"],"\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"",$Titles["Previous"],"\" name=\"page\"/>\n";
}
for ($p = ($CurrentPage-2); $p <= ($CurrentPage+2); $p++) {
$page = $p+1;
@ -265,50 +265,52 @@ function EntriesView() {
}
}
if ($CurrentPage<((count($Entries)/$GBpagination)-1)) {
echo " <input type=\"submit\" value=\"$Titles[Next]\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"$Titles[Last]\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"",$Titles["Next"],"\" name=\"page\"/>\n";
echo " <input type=\"submit\" value=\"",$Titles["Last"],"\" name=\"page\"/>\n";
}
echo "</form>\n";
$_SESSION['currentpage']=$CurrentPage;
$_SESSION["currentpage"]=$CurrentPage;
} else {
if (isset($Entries[0])) {
$Entries=array_reverse($Entries);
foreach($Entries as $e=>$Entry) SinlgeEntry($Entry);
}
}
}
if($_POST['submit']) {
if (!$_POST['text']) $PageStatus="emptytext";
if (!$_POST['name']) $PageStatus="emptyname";
if(isset($_POST["submit"])) {
if (!$_POST["text"]) $PageStatus="emptytext";
if (!$_POST["name"]) $PageStatus="emptyname";
if ($GBupload) {
if ($_FILES['uploadedfile']['tmp_name']) {
if ($_FILES["uploadedfile"]["tmp_name"]) {
$UploadedFile=CheckFile();
if (!$UploadedFile) {
$PageStatus="wrongimage";
}
}
}
if (($_POST['name'])&&($_POST['text']))
if ($_POST["captcha"]&&(md5(base64_encode($_POST["captcha"]))==$_SESSION["captcha"])) {
if (!$PageStatus=="wrongimage") {
if (($_POST["name"])&&($_POST["text"]))
if (isset($_POST["captcha"])&&(md5(base64_encode($_POST["captcha"]))==$_SESSION["captcha"])) {
if (!isset($PageStatus)=="wrongimage") {
AddEntry();
if ($GBnotificationmailto) SendMail();
}
} else if (!$GBcaptcha) {
if (!$PageStatus=="wrongimage") {
if (!isset($PageStatus)=="wrongimage") {
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"]["subj"]=$_POST['subj'];
$SESSION["value"]["category"]=$_POST['category'];
$SESSION["value"]["email"]=$_POST['email'];
$SESSION["value"]["text"]=$_POST['text'];
$SESSION["value"]["name"]=$_POST["name"];
$SESSION["value"]["from"]=$_POST["from"];
$SESSION["value"]["link"]=$_POST["link"];
$SESSION["value"]["subj"]=$_POST["subj"];
$SESSION["value"]["category"]=$_POST["category"];
$SESSION["value"]["email"]=$_POST["email"];
$SESSION["value"]["text"]=$_POST["text"];
$Values=$SESSION["value"];
} else Unset($SESSION["value"]);
} else if (isset($SESSION["value"])) Unset($SESSION["value"]);
}
$Entries=ReadEntries();

View File

@ -7,7 +7,7 @@
?><!DOCTYPE html>
<html>
<head>
<title><?php echo $Titles[HeadTitle];?></title>
<title><?php echo $Titles["HeadTitle"];?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu:regular&amp;subset=Latin,Cyrillic">
<link rel="stylesheet" type="text/css" href="anthrstlsht.css">

View File

@ -30,55 +30,55 @@ $GBcategoryfield=array(
4=>"Order",
5=>"Other");
$GBstriptags=true; // enable or disable strip tags function during adding new entry
$Titles[HeadTitle]="Guestbook";
$Titles[Page]="Guestbook";
$Titles[Name]="Your name";
$Titles[Required]="required";
$Titles[City]="City";
$Titles[Email]="E-mail";
$Titles[NotPublic]="will not be published";
$Titles[Link]="Homepage";
$Titles[Text]="Your message";
$Titles[Captcha]="Security question";
$Titles[CaptchaPlus]="plus";
$Titles[Submit]="Submit";
$Titles[Added]="Your message has been added.";
$Titles[EmptyName]="Please, type your name.";
$Titles[EmptyText]="Please, type your message.";
$Titles[WrongCaptcha]="Please, type correct security answer.";
$Titles[From]="from";
$Titles[Wrote]="wrote";
$Titles[Response]="Response";
$Titles[EmptyFile]="Guestbook is empty yet.";
$Titles[Login]="Administrator login:";
$Titles[Password]="Password:";
$Titles[Enter]="Enter";
$Titles[WrongLogin]="Wrong login or password.";
$Titles[AdminHeader]="Guestbook administration";
$Titles[AdminExit]="Exit";
$Titles[AdminHello]="Hello";
$Titles[AdminName]="Name";
$Titles[AdminMessage]="Message";
$Titles[AdminDate]="Date";
$Titles[AdminApply]="Apply changes";
$Titles[AdminDeleteChecked]="Delete checked";
$Titles[AdminEdit]="Edit";
$Titles[AdminDelete]="Delete";
$Titles[AdminCancel]="Cancel";
$Titles[AdminSureDel]="Are you sure to delete";
$Titles[AdminSureDelMessages]="messages";
$Titles[MailSubject]="New entry in your guestbook";
$Titles[MailAdmin]="You can edit, delete or reply this message via admin page";
$Titles[First]="First";
$Titles[Last]="Last";
$Titles[Previous]="<<";
$Titles[Next]=">>";
$Titles[Search]="Search";
$Titles[NoResult]="No search result";
$Titles[ReadMore]="Read more";
$Titles[FileUpload]="Upload image:";
$Titles[WrongImage]="Can't upload image.";
$Titles[Subject]="Subject";
$Titles[Category]="Category";
$Titles[About]="about";
$Titles["HeadTitle"]="Guestbook";
$Titles["Page"]="Guestbook";
$Titles["Name"]="Your name";
$Titles["Required"]="required";
$Titles["City"]="City";
$Titles["Email"]="E-mail";
$Titles["NotPublic"]="will not be published";
$Titles["Link"]="Homepage";
$Titles["Text"]="Your message";
$Titles["Captcha"]="Security question";
$Titles["CaptchaPlus"]="plus";
$Titles["Submit"]="Submit";
$Titles["Added"]="Your message has been added.";
$Titles["EmptyName"]="Please, type your name.";
$Titles["EmptyText"]="Please, type your message.";
$Titles["WrongCaptcha"]="Please, type correct security answer.";
$Titles["From"]="from";
$Titles["Wrote"]="wrote";
$Titles["Response"]="Response";
$Titles["EmptyFile"]="Guestbook is empty yet.";
$Titles["Login"]="Administrator login:";
$Titles["Password"]="Password:";
$Titles["Enter"]="Enter";
$Titles["WrongLogin"]="Wrong login or password.";
$Titles["AdminHeader"]="Guestbook administration";
$Titles["AdminExit"]="Exit";
$Titles["AdminHello"]="Hello";
$Titles["AdminName"]="Name";
$Titles["AdminMessage"]="Message";
$Titles["AdminDate"]="Date";
$Titles["AdminApply"]="Apply changes";
$Titles["AdminDeleteChecked"]="Delete checked";
$Titles["AdminEdit"]="Edit";
$Titles["AdminDelete"]="Delete";
$Titles["AdminCancel"]="Cancel";
$Titles["AdminSureDel"]="Are you sure to delete";
$Titles["AdminSureDelMessages"]="messages";
$Titles["MailSubject"]="New entry in your guestbook";
$Titles["MailAdmin"]="You can edit, delete or reply this message via admin page";
$Titles["First"]="First";
$Titles["Last"]="Last";
$Titles["Previous"]="<<";
$Titles["Next"]=">>";
$Titles["Search"]="Search";
$Titles["NoResult"]="No search result";
$Titles["ReadMore"]="Read more";
$Titles["FileUpload"]="Upload image:";
$Titles["WrongImage"]="Can't upload image.";
$Titles["Subject"]="Subject";
$Titles["Category"]="Category";
$Titles["About"]="about";
?>

View File

@ -31,55 +31,55 @@ $GBcategoryfield=array(
4=>"Order",
5=>"Other");
$GBstriptags=true; // включение или отключение функции обрезания тегов при добавлении новой записи
$Titles[HeadTitle]="Гостевая книга";
$Titles[Page]="Гостевая книга";
$Titles[Name]="Ваше имя";
$Titles[Required]="обязательно";
$Titles[City]="Город";
$Titles[Email]="Электронная почта";
$Titles[NotPublic]="не будет публиковаться";
$Titles[Link]="Домашняя страница";
$Titles[Text]="Ваше сообщение";
$Titles[Captcha]="Вопрос безопасности";
$Titles[CaptchaPlus]="плюс";
$Titles[Submit]="Отправить";
$Titles[Added]="Ваше сообщение было добавлено.";
$Titles[EmptyName]="Пожалуйста, введите Ваше имя.";
$Titles[EmptyText]="Пожалуйста, введите текст сообщения.";
$Titles[WrongCaptcha]="Пожалуйста, введите верный ответ на вопрос безопасности.";
$Titles[From]="из";
$Titles[Wrote]="написал";
$Titles[Response]="Ответ";
$Titles[EmptyFile]="Гостевая книга пока пуста.";
$Titles[Login]="Имя администратора:";
$Titles[Password]="Пароль:";
$Titles[Enter]="Войти";
$Titles[WrongLogin]="Неверные имя администратора или пароль.";
$Titles[AdminHeader]="Администрация гостевой книги";
$Titles[AdminExit]="Выход";
$Titles[AdminHello]="Приветствую";
$Titles[AdminName]="Имя";
$Titles[AdminMessage]="Сообщение";
$Titles[AdminDate]="Дата";
$Titles[AdminApply]="Принять изменения";
$Titles[AdminDeleteChecked]="Удалить отмеченные";
$Titles[AdminEdit]="Редактирование";
$Titles[AdminDelete]="Удалить";
$Titles[AdminCancel]="Отменить";
$Titles[AdminSureDel]="Вы уверены, что хотите удалить";
$Titles[AdminSureDelMessages]="сообщений";
$Titles[MailSubject]="Новая запись в вашей гостевой книге";
$Titles[MailAdmin]="Вы можете редактировать, удалить или ответить на эту запись через страницу администрирования";
$Titles[First]="В начало";
$Titles[Last]="В конец";
$Titles[Previous]="Назад";
$Titles[Next]="Вперед";
$Titles[Search]="Поиск";
$Titles[NoResult]="Ничего не найдено";
$Titles[ReadMore]="Читать далее";
$Titles[FileUpload]="Загрузить изображение:";
$Titles[WrongImage]="Не могу загрузить изображение.";
$Titles[Subject]="Тема";
$Titles[Category]="Категория";
$Titles[About]="о";
$Titles["HeadTitle"]="Гостевая книга";
$Titles["Page"]="Гостевая книга";
$Titles["Name"]="Ваше имя";
$Titles["Required"]="обязательно";
$Titles["City"]="Город";
$Titles["Email"]="Электронная почта";
$Titles["NotPublic"]="не будет публиковаться";
$Titles["Link"]="Домашняя страница";
$Titles["Text"]="Ваше сообщение";
$Titles["Captcha"]="Вопрос безопасности";
$Titles["CaptchaPlus"]="плюс";
$Titles["Submit"]="Отправить";
$Titles["Added"]="Ваше сообщение было добавлено.";
$Titles["EmptyName"]="Пожалуйста, введите Ваше имя.";
$Titles["EmptyText"]="Пожалуйста, введите текст сообщения.";
$Titles["WrongCaptcha"]="Пожалуйста, введите верный ответ на вопрос безопасности.";
$Titles["From"]="из";
$Titles["Wrote"]="написал";
$Titles["Response"]="Ответ";
$Titles["EmptyFile"]="Гостевая книга пока пуста.";
$Titles["Login"]="Имя администратора:";
$Titles["Password"]="Пароль:";
$Titles["Enter"]="Войти";
$Titles["WrongLogin"]="Неверные имя администратора или пароль.";
$Titles["AdminHeader"]="Администрация гостевой книги";
$Titles["AdminExit"]="Выход";
$Titles["AdminHello"]="Приветствую";
$Titles["AdminName"]="Имя";
$Titles["AdminMessage"]="Сообщение";
$Titles["AdminDate"]="Дата";
$Titles["AdminApply"]="Принять изменения";
$Titles["AdminDeleteChecked"]="Удалить отмеченные";
$Titles["AdminEdit"]="Редактирование";
$Titles["AdminDelete"]="Удалить";
$Titles["AdminCancel"]="Отменить";
$Titles["AdminSureDel"]="Вы уверены, что хотите удалить";
$Titles["AdminSureDelMessages"]="сообщений";
$Titles["MailSubject"]="Новая запись в вашей гостевой книге";
$Titles["MailAdmin"]="Вы можете редактировать, удалить или ответить на эту запись через страницу администрирования";
$Titles["First"]="В начало";
$Titles["Last"]="В конец";
$Titles["Previous"]="Назад";
$Titles["Next"]="Вперед";
$Titles["Search"]="Поиск";
$Titles["NoResult"]="Ничего не найдено";
$Titles["ReadMore"]="Читать далее";
$Titles["FileUpload"]="Загрузить изображение:";
$Titles["WrongImage"]="Не могу загрузить изображение.";
$Titles["Subject"]="Тема";
$Titles["Category"]="Категория";
$Titles["About"]="о";
?>