<?php
/**
 * This is a file used for validating the admin user.
 *
 * PHP version 5
 *
 * @category Admin_Tool
 * @package  Admin_Tool
 * @author   Aum Infosys <admin@auminfosys.com>
 * @license  ACE
 * @version  CVS:1.0.1
 * @link     http://auminfosys.com/
 * @filesource
 */
 
/**
 * This is security file 
 * Which check user login constrains
 *
 */

if (isset($_SESSION["cUserId"])) {
    if ($_SESSION["cUserId"] == 0 || $_SESSION["cUserId"]=="") {
        print "<script language='javascript'>location.href='".$SiteBaseUrl."index.php?verr=Expired'</script>";
    }
}
if ($_SESSION["cUserId"]=="") {
    print "<script language='javascript'>location.href='".$SiteBaseUrl."index.php?verr=Expired'</script>";
}
if (!$_SESSION["cUserId"]) {
    print "<script language='javascript'>location.href='".$SiteBaseUrl."index.php?verr=Expired'</script>";
}
if (!$_SESSION["cUserId"]) {
    print "<script language='javascript'>location.href='".$SiteBaseUrl."index.php?verr=Expired'</script>";
}
session_cache_expire(0.5*200);   // set the cache expire to 10 minutes
?>
<?php /*?>if (!isset($_SESSION["cUserMenuFile"]) || $_SESSION["cUserMenuFile"]=="" || (!file_exists("menu/".$_SESSION["cUserMenuFile"]))) {
    print "<script language='javascript'>location.href='logout.php?verr=Expired'</script>";
}
<?php */?>