Esempio n. 1
0
 $protected = $ui->active('protected', 'post') ? $ui->active('protected', 'post') : 'N';
 $ramLimited = $ui->active('ramLimited', 'post') ? $ui->active('ramLimited', 'post') : 'N';
 $workShop = $ui->active('workShop', 'post') ? $ui->active('workShop', 'post') : 'N';
 $ftpAccess = $ui->active('ftpAccess', 'post') ? $ui->active('ftpAccess', 'post') : 'Y';
 $liveConsole = $ui->active('liveConsole', 'post') ? $ui->active('liveConsole', 'post') : 'Y';
 $copyStartBinary = $ui->active('copyStartBinary', 'post') ? $ui->active('copyStartBinary', 'post') : 'N';
 $os = $ui->w('os', 1, 'post') ? $ui->w('os', 1, 'post') : 'L';
 $iptables = $ui->startparameter('iptables', 'post');
 $protectedSaveCFGs = $ui->startparameter('protectedSaveCFGs', 'post');
 $steamAccount = $ui->username('steamAccount', 255, 'post');
 $steamPassword = $ui->password('steamPassword', 255, 'post');
 // Add jQuery plugin chosen to the header
 $htmlExtraInformation['css'][] = '<link href="css/default/chosen/chosen.min.css" rel="stylesheet" type="text/css">';
 $htmlExtraInformation['js'][] = '<script src="js/default/plugins/chosen/chosen.jquery.min.js" type="text/javascript"></script>';
 if (!$ui->smallletters('action', 2, 'post') or $ui->id('import', 1, 'post') == 1) {
     $protocols = array_unique(array_merge(getGameQ3List(), getGameQ2List()));
     ksort($protocols);
     // GameQ protocol listing done. Easy-WI Code again.
     if ($ui->st('d', 'get') == 'ad') {
         $table = array();
         $token = token();
         // Collect the shorten we need for game modification
         $query = $sql->prepare("SELECT DISTINCT(`shorten`) FROM `servertypes` WHERE `resellerid`=?");
         $query->execute(array($resellerLockupID));
         while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
             $table[] = array('shorten' => $row['shorten']);
         }
         if ($ui->id('import', 1, 'post') == 1 and $_FILES['file']['error'] == 0 and $_FILES['file']['type'] == 'text/xml') {
             try {
                 $xml = new DOMDocument();
                 if (@$xml->load($_FILES['file']['tmp_name']) !== false) {
Esempio n. 2
0
         $query3->execute(array($id, $resellerid));
         $query2->execute(array($row['serverid']));
         while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
             $loguserid = $row2['userid'];
             $reseller_id = $row['resellerid'];
             $loguseraction = "%stop% %gserver% {$row2['serverip']}:{$row2['port']} (Lend stop)";
             $insertlog->execute();
             $startStopList[$row['resellerid']][$row2['rootID']]['stop'][] = $id;
         }
         print "Time is up, stopping lendserver: {$id}\r\n";
     } else {
         print "Lendserver {$serverid} has {$timeleft} minutes left\r\n";
     }
 }
 // Define basic variables for GS status checks
 $gameQv3Protocols = getGameQ3List();
 $other = array();
 $rootID = 0;
 $iV2 = 1;
 $totalV2Count = 0;
 $serverBatchV2Array = array();
 $allServersV2Array = array();
 $iV3 = 1;
 $totalV3Count = 0;
 $serverBatchV3Array = array();
 $allServersV3Array = array();
 $query2 = $sql->prepare("SELECT g.`id`,g.`serverid`,g.`serverip`,g.`port`,g.`port2`,g.`port3`,g.`port4`,g.`port5`,t.`gameq`,t.`shorten`,t.`useQueryPort` FROM `gsswitch` g INNER JOIN `serverlist` s ON g.`serverid`=s.`id` INNER JOIN `servertypes` t ON s.`servertype`=t.`id` WHERE g.`rootID`=? AND g.`stopped`='N' AND g.`active`='Y'");
 $query = $sql->prepare("SELECT DISTINCT(`rootID`) AS `root_id` FROM `gsswitch` WHERE `active`='Y'");
 $query->execute();
 while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
     // Avoid that servers belonging to different roots are checked together