File: /home/httpd/html/nyloncams.com/public_html/admin/db.php
<?php
//start session and set cookie parameters
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING);
@session_set_cookie_params(86400, '/');
@session_start();
//debug data
$queryCount = 0;
$queryCountCached = 0;
$_mtime = explode(" ", microtime());
$_starttime = $_mtime[1] + $_mtime[0];
//prevent iframing the admin area from other domains.
if(stripos($_SERVER['REQUEST_URI'],'admin/') !== false) {
header('X-Frame-Options: SAMEORIGIN');
}
header("X-XSS-Protection: 1");
header('X-Content-Type-Options: nosniff');
header('content-type:text/html;charset=utf-8');
mb_regex_encoding('UTF-8');
mb_internal_encoding('UTF-8');
include('config.php');
if ($config['development_mode_admin_only'] && !isset($_SESSION['isAdmin'])) {
$config['development_mode'] = 0;
}
if ($config['development_mode']) {
ini_set('display_errors', 1);
}
include($basepath . "/admin/functions.mb.php"); //core functions
mysqli_set_charset($dblink,'utf8');
/* get language from subdomain */
$language = $config['default_language'];
if ($config['default_language'] != $config['core_language']) {
$language = $currentLang = $config['default_language'];
}
$subdomain = explode(".", $_SERVER['HTTP_HOST']);
if ($subdomain[0] != 'www' && strlen($subdomain[0]) == 2 && count($subdomain) > 2) {
@$validLanguages = json_decode(file_get_contents($basepath . '/admin/scripts/validLanguages.json', true));
if ((is_array($validLanguages) && in_array(strtoupper($subdomain[0]), $validLanguages)) || ($config['core_language'] != $config['default_language'] && strtoupper($subdomain[0]) === $config['core_language'])) {
$language = $currentLang = strtoupper($subdomain[0]);
}
}
/* EOF */
include($basepath . "/admin/functions.licensing.php"); //license functions
include($basepath . "/admin/functions.general.php"); //general functions
include($basepath . "/admin/functions.templating.php"); //template functions
include($basepath . "/admin/functions.multilang.php");
include($basepath . "/admin/functions.email.php"); //email system functions
include($basepath . "/admin/functions.bootstrap.php"); //altered connection functions
include($basepath . "/admin/functions.modules.php"); //modules functions
modulesInclude();
header_remove("Expires");
include($basepath . "/admin/functions.custom.php"); //custom functions (please put all new functions in here)
include($basepath . "/includes/transliterate.php");