This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ function ShowEntries($page) { if (!file_exists("output.php")) die ("Can't open output.php!"); include("output.php"); $output = new COutput($page); $output->Output_All(); unset($output); $action = "show"; } function NewEntry($newname, $newmail, $newurl, $newicq, $newaim, $newtext) { if (!file_exists("input.php")) die ("Can't open input.php!"); include("input.php"); $input = new CInput(); $input->Formular_Show(0, $newname, $newmail, $newurl, $newicq, $newaim, $newtext); unset($input); } function WriteEntry($newname, $newmail, $newicq, $newaim, $newurl, $newtext, $emotion = "no", $preview = 0, $write = 0, $random = -1) { if (!file_exists("input.php")) die ("Can't open input.php!"); include("input.php"); $input = new CInput($emotion); if ($preview != 0 && $write != 0) { $input->Write_Data($newname, $newmail, $newicq, $newaim, $newurl, $newtext, $random); header ("Location: guestbook.php?act=show"); } elseif ($preview != 0) { if (!file_exists("preview.php")) die ("Can't open preview.php!"); include("preview.php"); $preview = new CPreview($emotion); $preview->Show_Preview($newname, $newmail, $newicq, $newaim, $newurl, $newtext); } else { $input->Write_Data($newname, $newmail, $newicq, $newaim, $newurl, $newtext, $random); } unset($input); } ob_start(); error_reporting(0); #administration in progress? while (file_exists("data/lock.lck")) { usleep(500000); $i++; if ($i > 9) { echo ""; echo "Guestbook"; echo ""; echo ""; echo "
"; echo "Administration activities in progress.
Please try it later again!
"; echo "
Картаdra nzb i7 zi9 yh88 bog golos bog golos kone8 kon27
rss
Карта"; } } if (!ignore_user_abort()) ignore_user_abort(false); if (!isset($act) || $act == "" || $act == "show") { #show guestbook if (!isset($page)) $page = 1; call_user_func("ShowEntries", $page); } elseif ($act == "new") { #new guestbook entry if (!isset($newname)) $newname = ""; if (!isset($newmail)) $newmail = ""; if (!isset($newurl) || $newurl == "") $newurl = "http://"; if (!isset($newicq)) $newicq = ""; if (!isset($newaim)) $newaim = ""; if (!isset($newtext)) $newtext = ""; call_user_func("NewEntry", $newname, $newmail, $newurl, $newicq, $newaim, $newtext); } elseif ($act == "write") { if ($pre == "yes" && isset($presave)) { #save the preview data call_user_func("WriteEntry", $newname, $newmail, $newicq, $newaim, $newurl, $newtext, $emotion, 1, 1, $random); } elseif ($pre == "yes") { #save data with preview call_user_func("WriteEntry", $newname, $newmail, $newicq, $newaim, $newurl, $newtext, $emotion, 1); } else { #save data without preview call_user_func("WriteEntry", $newname, $newmail, $newicq, $newaim, $newurl, $newtext, $emotion); header ("Location: guestbook.php?act=show"); } } ob_end_flush(); ?>