Пример #1
0
<?php

//set error reporting level
if (version_compare(phpversion(), "5.3.0", ">=") == 1) {
    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
} else {
    error_reporting(E_ALL & ~E_NOTICE);
}
session_start();
require_once 'classes/login.class.php';
require_once 'classes/chat.class.php';
$oSimpleChatLogin = new SimpleChatLogin();
$oSimpleChat = new SimpleChat();
$oSimpleChatLogin->SimpleChatSetting();
$oSimpleChat->SimpleChatSetting();
$oSimpleChatLogin->loginCheck();
if ($oSimpleChatLogin->loggedIn == false) {
    $oSimpleChatLogin->getLoginBox();
} else {
    if ($oSimpleChatLogin->loggedIn == true) {
        if (isset($_GET['logout'])) {
            if ((int) $_GET['logout'] == 1) {
                $oSimpleChatLogin->logout();
            }
        } else {
            $oSimpleChat->getChatLog();
        }
    }
}