* * @categories Games/Entertainment, Systems Administration * @package Bright Game Panel * @author warhawk3407 <*****@*****.**> @NOSPAM * @copyleft 2013 * @license GNU General Public License version 3.0 (GPLv3) * @version (Release 0) DEVELOPER BETA 8 * @link http://www.bgpanel.net/ */ $page = 'login'; require "configuration.php"; require "include.php"; $title = T_('Client Login'); if (isset($_COOKIE['clientLanguage'])) { $cookie = htmlspecialchars($_COOKIE['clientLanguage'], ENT_QUOTES); defineLanguage($cookie); unset($cookie); } //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ if (isset($_GET['task'])) { $task = mysql_real_escape_string($_GET['task']); } //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ include "./bootstrap/header.php"; if (MAINTENANCE == 1) { ?> <div class="alert alert-block"> <h4 class="alert-heading"><?php echo T_('Maintenance Mode'); ?> </h4>
/** * SESSION check up (Test if the information stored in the globals $_SESSION are valid) */ if (isClientLoggedIn() == TRUE) { $clientverify = mysql_query("SELECT `username`, `firstname`, `lastname`, `token`, `lastip` FROM `" . DBPREFIX . "client` WHERE `clientid` = '" . $_SESSION['clientid'] . "' && `status` = 'Active'"); ### $clientverify = mysql_fetch_assoc($clientverify); if ($clientverify['username'] != $_SESSION['clientusername'] || $clientverify['firstname'] != $_SESSION['clientfirstname'] || $clientverify['lastname'] != $_SESSION['clientlastname'] || $clientverify['token'] != session_id() || $clientverify['lastip'] != $_SERVER['REMOTE_ADDR']) { session_destroy(); header("Location: login.php"); die; } /** * Define Language Using 'php gettext' */ defineLanguage($_SESSION['clientlang']); query_basic("UPDATE `" . DBPREFIX . "client` SET `lastactivity` = '" . $_SERVER['REQUEST_TIME'] . "' WHERE `clientid` = '" . $_SESSION['clientid'] . "'"); } /** * GET BrightGamePanel Database INFORMATION * Load 'values' from `config` Table */ $panelName = query_fetch_assoc("SELECT `value` FROM `" . DBPREFIX . "config` WHERE `setting` = 'panelname' LIMIT 1"); $panelVersion = query_fetch_assoc("SELECT `value` FROM `" . DBPREFIX . "config` WHERE `setting` = 'panelversion' LIMIT 1"); $template = query_fetch_assoc("SELECT `value` FROM `" . DBPREFIX . "config` WHERE `setting` = 'clienttemplate' LIMIT 1"); $maintenance = query_fetch_assoc("SELECT `value` FROM `" . DBPREFIX . "config` WHERE `setting` = 'maintenance' LIMIT 1"); /** * GET BGP CORE FILES INFORMATION * Load version.xml (ROOT/.version/version.xml) */ $bgpCoreInfo = simplexml_load_file('./.version/version.xml');
/** * SESSION check up (Test if the information stored in the globals $_SESSION are valid) */ if (isAdminLoggedIn() == TRUE) { $adminverify = mysql_query("SELECT `username`, `firstname`, `lastname`, `token`, `lastip` FROM `" . DBPREFIX . "admin` WHERE `adminid` = '" . $_SESSION['adminid'] . "' && `status` = 'Active'"); ### $adminverify = mysql_fetch_assoc($adminverify); if ($adminverify['username'] != $_SESSION['adminusername'] || $adminverify['firstname'] != $_SESSION['adminfirstname'] || $adminverify['lastname'] != $_SESSION['adminlastname'] || $adminverify['token'] != session_id() || $adminverify['lastip'] != $_SERVER['REMOTE_ADDR']) { session_destroy(); header("Location: login.php"); die; } /** * Define Language Using 'php gettext' */ defineLanguage($_SESSION['adminlang']); query_basic("UPDATE `" . DBPREFIX . "admin` SET `lastactivity` = '" . $_SERVER['REQUEST_TIME'] . "' WHERE `adminid` = '" . $_SESSION['adminid'] . "'"); } /** * GET BrightGamePanel Database INFORMATION * Load 'values' from `config` Table */ $panelName = query_fetch_assoc("SELECT `value` FROM `" . DBPREFIX . "config` WHERE `setting` = 'panelname' LIMIT 1"); $panelVersion = query_fetch_assoc("SELECT `value` FROM `" . DBPREFIX . "config` WHERE `setting` = 'panelversion' LIMIT 1"); $template = query_fetch_assoc("SELECT `value` FROM `" . DBPREFIX . "config` WHERE `setting` = 'admintemplate' LIMIT 1"); $maintenance = query_fetch_assoc("SELECT `value` FROM `" . DBPREFIX . "config` WHERE `setting` = 'maintenance' LIMIT 1"); /** * GET BGP CORE FILES INFORMATION * Load version.xml (ROOT/.version/version.xml) */ $bgpCoreInfo = simplexml_load_file('../.version/version.xml');