<?php
/**
 * 
 * @file inc_admin.php
 * @copyright (c) 2005 - 2011 eifr.com
 * @license http://www.gnu.org/copyleft/gpl.html gnu/gpl
 * eifr is free software
 */
session_start();
require_once(dirname(__FILE__) . '/inc_base.php');
require_once(EIFR_ROOT . 'libraries/session.php');

$checklogin = true;
if ($checklogin && getCookie(COOKIE_USERNAME) == '') {
    $checklogin = false;
} 
if ($checklogin && IS_CHECK_ADMINSESSION) {
    if (getSession(SESSION_USERNAME) == '') {
        $checklogin = false;
    } 
} 

if (!$checklogin) {
    echo '<meta http-equiv="Content-Type" content="text/html; charset=' . SYS_CHARSET . '" />';
    echo "<SCRIPT LANGUAGE='JavaScript'>alert('" . $lang['isLogin'] . "');top.location='" . DIR_INSTALL . "admin/index.php';</SCRIPT>";
    exit();
} 

require_once(EIFR_ROOT . 'includes/table.php');
require_once(EIFR_ROOT . 'includes/conn.php');
require_once(EIFR_ROOT . 'libraries/function.php');
require_once(EIFR_ROOT . 'libraries/format.php');
require_once(EIFR_ROOT . 'libraries/db_helper.php');
require_once(EIFR_ROOT . 'libraries/cache.php');
require_once(EIFR_ROOT . 'libraries/common.php');
require_once(EIFR_ROOT . 'libraries/safedata.php');

?>