session_start(); include 'db.php'; include_once 'class.formelements_v2.php'; include_once 'class.general.php'; include_once 'class.phpmailer.php'; include_once 'functions.general_v5.php'; include_once 'functions.custom.php'; include_once 'class.custom.php'; define("SALT", "Take lots of photos"); $logged_user_id = decrypt($_SESSION['UserID'], SALT); $ADMIN = dbSelect("SELECT * FROM admin_user WHERE id = '$logged_user_id'", "single"); if(preg_match("/^cms\//i", $_SERVER['PHP_SELF']) && !$admin_override && !$ADMIN){ $_SESSION['UserMessage'] = "Your session has expired."; header("Location: /cms/index.php"); exit; } if($ADMIN) $_SESSION['isLoggedIn'] = true; $page_title_nm = "Page Title"; if(in_array($ADMIN['group_nbr'], array(1, 2))){ define("SUPER", true); }else{ define("SUPER", false); } define("IMGPATH", $_SERVER['DOCUMENT_ROOT'] . "/images/gallery/"); ?>