| Server IP : 172.67.187.206 / Your IP : 172.71.28.156 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/news/elearning/configs/ |
Upload File : |
<?php
/**
* inoculate against hack attempts which waste CPU cycles
*/
$contaminated = (isset($_FILES['GLOBALS']) || isset($_REQUEST['GLOBALS'])) ? true : false;
$paramsToAvoid = array('GLOBALS', '_COOKIE', '_ENV', '_FILES', '_GET', '_POST', '_REQUEST', '_SERVER', '_SESSION', 'HTTP_COOKIE_VARS', 'HTTP_ENV_VARS', 'HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_POST_FILES', 'HTTP_RAW_POST_DATA', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS');
$paramsToAvoid[] = 'autoLoadConfig';
$paramsToAvoid[] = 'mosConfig_absolute_path';
$paramsToAvoid[] = 'hash';
$paramsToAvoid[] = 'main';
foreach ($paramsToAvoid as $key) {
if (isset($_GET[$key]) || isset($_POST[$key]) || isset($_COOKIE[$key])) {
$contaminated = true;
break;
}
}
if ($contaminated) {
header('HTTP/1.1 406 Not Acceptable');
exit(0);
}
unset($contaminated);
/* * ** END OF INNOCULATION *** */
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
//date_default_timezone_set('Asia/Kolkata');
date_default_timezone_set('Asia/Bangkok');
ob_start();
session_name("eexams");
session_start();
/*
* turn off magic-quotes support, for both runtime and sybase, as both will cause problems if enabled
*/
if (version_compare(PHP_VERSION, 5.3, '<') && function_exists('set_magic_quotes_runtime'))
set_magic_quotes_runtime(0);
if (version_compare(PHP_VERSION, 5.4, '<') && @ini_get('magic_quotes_sybase') != 0)
@ini_set('magic_quotes_sybase', 0);
/**
* must be included in the file for proper functioning
*/
require_once 'constants.php';
require_once 'database_tables.php';
if (!isset($PHP_SELF))
$PHP_SELF = $_SERVER['PHP_SELF'];
if (!isset($PAGE_NAME))
$PAGE_NAME = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);
try {
$DB = new PDO(DB_DRIVER . ':host=' . DB_SERVER . ';dbname=' . DB_DATABASE, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, $dboptions);
} catch (Exception $ex) {
echo $ex->getMessage();
die;
}
require_once LIBS_FOLDER . 'functions.php';
require_once LIBS_FOLDER . 'pagination_admin.php';
//get error Messages
if ($_SESSION["errorType"] != "" && $_SESSION["errorMsg"] != "") {
$ERROR_TYPE = $_SESSION["errorType"];
$ERROR_MSG = $_SESSION["errorMsg"];
$_SESSION["errorType"] = "";
$_SESSION["errorMsg"] = "";
}
//if ($PAGE_NAME != "login" && $PAGE_NAME != "logout" && $PAGE_NAME != "index" && $PAGE_NAME != "forgot_password" ) {
// if(!is_admin_logged_in()) redirect(generate_admin_link("login"));
//} else if ($PAGE_NAME == "login" && is_admin_logged_in() ) {
// redirect(generate_admin_link("home"));
//}
?>