/* nikkipost.php - Control panel for O-Kiraku Nikki Copyright (C) 2003 Javi Lavandeira (http://www.ag0ny.com) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ session_start(); require 'nikki.inc.php'; header('Content-Type: text/html; charset=UTF-8'); if (!connect_to_database()) { echo mb_convert_encoding(gettext("Cannot connect to the database server: "), 'UTF-8', 'auto'); echo mysql_error(); exit; } function check_auth() { if (isset($_SESSION['nikki_authenticated'])) { if (!$_SESSION['nikki_authenticated']) { header('Location: '.$GLOBALS['PHP_SELF'].'?action=login'); } } else { $_SESSION['nikki_authenticated'] = 0; header('Location: '.$GLOBALS['PHP_SELF'].'?action=login'); } } function html_header($title) { echo ''; echo '
'; echo '| '; echo ''; echo ' | '; echo '
| '.mb_convert_encoding(gettext("Date"), 'UTF-8', 'auto').' | '; echo ''.mb_convert_encoding(gettext("Message"), 'UTF-8', 'auto').' | '; echo '
| '; echo ' | '; echo ''; echo ''; echo ' | '; echo '
| '.mb_convert_encoding(gettext("Date"), 'UTF-8', 'auto').' | '; echo ''.mb_convert_encoding(gettext("Message"), 'UTF-8', 'auto').' | '; echo '
| '; echo ' | '; echo ''; echo ''; echo ' | '; echo '
| '.mb_convert_encoding(gettext("Date"), 'UTF-8', 'auto').' | '; echo ''.mb_convert_encoding(gettext("Message"), 'UTF-8', 'auto').' | '; echo ''.mb_convert_encoding(gettext("Options"), 'UTF-8', 'auto').' | '; echo '
| '.$entry->timestamp.' | '; echo ''; echo mb_convert_encoding(stripslashes($entry->text), 'UTF-8', 'auto'); echo ' | '; echo '';
echo ''.mb_convert_encoding(gettext("Delete"), 'UTF-8', 'auto').' '; echo ''.mb_convert_encoding(gettext("Modify"), 'UTF-8', 'auto').''; echo ' | ';
echo '