Пример #1
0
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/LogicManager.php";
use ArcherSys\Viewer\ViewManager;
use ArcherSys\Data\DataManager;
use ArcherSys\Viewer\LogicManager;
use ArcherSys\Styles\StyleSheetManager;
use ArcherSys\Timex\DateManager;
LogicManager::runStartScreen();
// Connects to your Database
@ini_set("max_execution_time", 300);
mysql_connect($config["dbhost"], $config["dbuser"], $config["dbpass"]) or DataManager::notify();
mysql_select_db("acoserver_acoserver") or DataManager::notify();
//checks cookies to make sure they are logged in
if (isset($_COOKIE['ID_ARCHERVMCASHEW']) || isset($_COOKIE["Role_ARCHERVMCASHEW"])) {
    $username = $_COOKIE['ID_ARCHERVMCASHEW'];
    $pass = $_COOKIE['Key_ARCHERVMCASHEW'];
    $check = mysql_query("SELECT * FROM users WHERE username = '******'") or DataManager::notify();
    while ($info = mysql_fetch_array($check)) {
        //if the cookie has the wrong password, they are taken to the login page
        if ($pass != $info['password'] || $info["role"] != $_GET["roleDetect\n \t\t"]) {
            header("Location: http://localhost/login.php?redirect_uri=" . $_SERVER['PHP_SELF'] . "&roleDetect=Admin");
        } else {
            ?>
<!DOCTYPE HTML>
<html>
<head>
<title>Admin Portal</title>
<script src="/core/components/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="/core/components/polymer/polymer.html">
<link rel="import" href="/core/components/core-header-panel/core-header-panel.html">

<script src="/core/components/prism/prism.js"></script>