Пример #1
0
 * @author gdxkc
 * @copyright 2012
 */
error_reporting(0);
session_start();
if ($_SESSION['logtag'] != 'in') {
    header("location:login.php");
}
include_once 'class.isay.php';
include_once 'config.php';
if ($_GET['action'] == 'add') {
    if ($content = $_POST['content']) {
        $isay = new isay();
        $isay->config($server, $user, $password, $db);
        if ($isay->connect()) {
            if ($isay->addItem($content)) {
                header("location:error.php?info=3");
            } else {
                header("location:error.php?info=4");
            }
        } else {
            header("location:error.php?info=1");
        }
    } else {
        header("location:error.php?info=2");
    }
}
?>

<?php 
include_once 'head.php';