//verify user-agent if ($_SESSION['cmtx_user_agent'] != $_SERVER['HTTP_USER_AGENT']) { cmtx_log_out('exit'); } //verify user-language if ($_SESSION['cmtx_user_lang'] != $_SERVER['HTTP_ACCEPT_LANGUAGE']) { cmtx_log_out('exit'); } //verify ip-address if ($_SESSION['cmtx_ip_address'] != cmtx_get_ip_address()) { //cmtx_log_out('exit'); } } else { if (isset($_SESSION['cmtx_username']) && isset($_SESSION['cmtx_password']) && cmtx_valid_account($_SESSION['cmtx_username'], $_SESSION['cmtx_password']) != '3') { //logged in, but shouldn't be cmtx_log_out('exit'); } else { if (isset($_GET['page']) && $_GET['page'] == 'reset') { ?> <!DOCTYPE html> <html> <head> <title>Commentics: Reset</title> <meta name="robots" content="noindex"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="stylesheet" type="text/css" href="css/login.css"/> <link rel="stylesheet" type="text/css" href="css/general.css"/> </head> <body> <div style="position:absolute; height:auto; width:auto; margin-top:-70px; margin-left:-120px; top:50%; left:50%;"> <form name="reset" id="reset" action="index.php?page=reset" method="post">
require 'includes/language/' . cmtx_setting('language_backend') . '/tables.php'; //load language file for tables require 'includes/language/' . cmtx_setting('language_backend') . '/buttons.php'; //load language file for buttons require 'includes/language/' . cmtx_setting('language_backend') . '/prompts.php'; //load language file for prompts require 'includes/language/' . cmtx_setting('language_backend') . '/locale.php'; //load language file for locale cmtx_error_reporting('includes/logs/errors.log'); //error reporting cmtx_set_time_zone(cmtx_setting('time_zone')); //set the time zone require_once 'includes/auth.php'; //authorise login if (isset($_GET['page']) && $_GET['page'] == 'log_out') { cmtx_log_out('logout'); } if (!isset($_GET['page']) || !file_exists('includes/pages/' . basename($_GET['page']) . '.php')) { header('Location: ' . 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/index.php?page=dashboard'); die; } ?> <!DOCTYPE html> <html> <head> <title>Commentics: Admin Panel</title> <meta name="robots" content="noindex"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>