Пример #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>
Пример #2
0
<?php
  require_once $_SERVER["DOCUMENT_ROOT"]."/config.php";
require_once $_SERVER["DOCUMENT_ROOT"]."/includes/DataManager.php";
use ArcherSys\Data\DataManager;
DataManager::initUserRegConnection(array(
"dbhost" => "localhost",
"dbuser" => "root",
"dbpass" => "aco1234"
)
);
DataManager::useDatabase("acosever_acoserver");
$name = $_POST["gamename"];
$path = $_POST["path"];
DataManager::QueryRegistry("INSERT INTO 'cplive_games' ('name','Path') VALUES('".$name."','".$path."')");
?>
Пример #3
0
<?php
require_once $_SERVER["DOCUMENT_ROOT"]."/config.php";
require_once $_SERVER["DOCUMENT_ROOT"]."/includes/DataManager.php";
use ArcherSys\Data\DataManager;
DataManager::Connect($config);
echo "<!DOCTYPE HTML><html><head><title>Setting up Server</title></head><body>";
echo "Installing Table";
DataManager::QueryRegistry("SOURCE cplive_games.sql");
echo "Done.";
echo "</body>";
echo "</html>";
?>
 static function installTable()
 {
     DataManager::makeTable("users'", " 'ID' mediumint(9) NOT NULL,\n  'username' varchar(60) DEFAULT NULL,\n  'password' varchar(60) DEFAULT NULL)");
 }
Пример #5
0
<?php
require_once $_SERVER["DOCUMENT_ROOT"]."/config.php";
  require_once $_SERVER["DOCUMENT_ROOT"]."/includes/DataManager.php";
  use ArcherSys\Data\DataManager;
  DataManager::initUserRegConnection($config);
  DataManager::useDatabase("acoserver_acoserver");
   if(!$_POST["timezone"]){
  if($_FILES){
  $name = $_FILES["pic"]["name"];
  move_uploaded_file($_FILES["pic"]["tmp_name"], $_POST["profile_name"]);
  DataManager::QueryRegistry("UPDATE users SET profile_image = '".$_POST["profile_name"]."' WHERE 1");
  }}else{
      
  DataManager::QueryRegistry("UPDATE users SET timezone = '".$_POST["timezone"]."' WHERE 1");
  echo "<div class='update'>Timezone Saved</div>";
  }
  ?>