$Entry) fputcsv($fhandle,$Entry);
fclose($fhandle);
}
function AdminHeaderView() {
global $Titles;
global $GBadmin;
global $GBpassword;
echo "
\n";
if ($_SESSION["SessionStatus"]==(md5($GBadmin.$GBpassword))) {
echo "\n";
echo " $Titles[AdminHello], $GBadmin!\n";
}
}
function AdminEntriesView() {
global $Titles;
global $DataStatus;
global $GBadmin;
global $GBpassword;
global $AdminEntries;
global $GBpagination;
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 "\n";
} else if ($_SESSION["EditStatus"]) {
echo " $Titles[AdminMessage] ", ($_SESSION["EditStatus"]),", ",date("j.m.Y, H:i",$AdminEntries[($_SESSION["EditStatus"]-1)][5]),":
\n";
echo "\n";
} else {
if (($GBpagination>0)&&(count($AdminEntries)>$GBpagination)) {
$Entries=array_reverse($AdminEntries);
if ($_GET['page']) switch ($_GET['page']) {
case $Titles[First]:
$CurrentPage=0;
break;
case $Titles[Last]:
$CurrentPage=intdiv(count($Entries),$GBpagination);
break;
case "$Titles[Previous]":
$CurrentPage=$_SESSION['currentpage']-1;
break;
case "$Titles[Next]":
$CurrentPage=$_SESSION['currentpage']+1;
break;
default:
$CurrentPage=$_GET['page']-1;
} else $CurrentPage=0;
echo "\n";
echo "