session_start(); require('config/define.php'); require('config/config.php'); require('library/php/mysql_v6.php'); require('library/php/emg.php'); require('library/php/login_v3.php'); require('library/php/pl_v2.php'); if(HTTPS == 'on'){ httpsOn(); } $_title = 'Eckx Media Group Projector'; //content $_p = $_GET['p']; if($_p != "login/reset_login.php"){//if page is not reset login page if($_p == ''){ $_p = 'project/main.php'; } if(!file_exists($_p)){ $_SESSION[PREFIX]['error'] = $_p; $_p = 'error.php'; } /*$file = explode('.php', $_p); $dir = explode('/', $file[0]); $_page = strtolower(str_replace('_', ' ', $dir[(count($dir) - 1)])); */ $_mysql = new mysql(); //login $_login = new login($_mysql); if( !$_login->protect(array(1)) ){ $_SESSION[PREFIX]['access'] = $_SERVER['REQUEST_URI']; died(CLIENTROOT.'/login/index.php'); } else{ $_username = $_login->login; } //data if(file_exists('data/'.$_p)){ include 'data/'.$_p; } $_mysql->close(); unset($_mysql, $_login); ?>
require('parts/head.php'); ?> if(file_exists('head/'.$_p)){ require 'head/'.$_p; } ?> require('parts/nav.php'); ?>