ob_start(); if (!session_start()) { die; } require "Config/Main.php"; if (isset($MainMaintenance) && $MainMaintenance == true) { header('Content-Type: text/html; charset=utf-8'); require $_SERVER['DOCUMENT_ROOT'] . "/{$MainSiteFolder}" . "Language/{$MainLanguage}/GenericMessages.php"; die($GenericMessage10); } $_SESSION['SiteFolder'] = $MainSiteFolder; if (!isset($_SESSION['IP']) || empty($_SESSION['IP']) || $_SESSION['IP'] == $_SERVER['SERVER_ADDR']) { $_SESSION['IP'] = $_SERVER['REMOTE_ADDR']; } require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Sanity.class.php"; $sanity = new Sanity(); $sanity->IPFloodCheck(); if (isset($_GET['logout'])) { session_destroy(); header('Location: index.php'); } if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/Index.tpl.php")) { die("Template not found"); } if ($MainSiteDebug === true) { error_reporting(E_ALL); @ini_set('display_errors', 1); } else { error_reporting(E_ERROR); } require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Template.class.php";
<?php @session_start(); /*if(!isset($_POST['username']) || !isset($_POST['password'])) die();*/ require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php"; require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/SQL.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Sanity.class.php"; $sanity = new Sanity(); $sanity->IPFloodCheck(); $sanity->RefererCheck(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/MuDatabase.class.php"; $db = new MuDatabase(false); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Account.class.php"; $acc = new Account($db); $return = $acc->Authenticate($_POST['username'], $_POST['password'], $SQLMD5Password); if ($return === 1) { die('{"msg":"1","ok":"0"}'); } else { if ($return === 2) { die('{"msg":"2","ok":"0"}'); } else { die('{"ok":"1"}'); } }