コード例 #1
0
                    }
                    $query8->execute(array($row2['affectedID']));
                    $query5->execute(array($row2['jobID']));
                } else {
                    if ($row2['action'] == 're') {
                        $appServer->startApp();
                        $query5->execute(array($row2['jobID']));
                        $command = '(Re)Start gsswitchID: ' . $row2['affectedID'] . ' name: ' . $row2['name'];
                    } else {
                        if ($row2['action'] == 'st') {
                            $appServer->stopApp();
                            $query5->execute(array($row2['jobID']));
                            $command = 'Stop gsswitchID: ' . $row2['affectedID'] . ' name: ' . $row2['name'];
                        } else {
                            $query9->execute(array($row2['jobID']));
                            $command = 'Error: unknown command';
                        }
                    }
                }
            }
        } else {
            $query9->execute(array($row2['jobID']));
            $command = 'Error: can not find gsswitchID';
        }
        $theOutput->printGraph($command);
    }
    $appServer->execute();
    if (isset($dbConnect['debug']) and $dbConnect['debug'] == 1) {
        print_r($appServer->debug());
    }
}
コード例 #2
0
ファイル: reboot.php プロジェクト: nightcore125/developer
                         $appServer->getAppServerDetails($row3['switchID']);
                         $appServer->removeApp($row3['template']);
                         $appServer->addApp($row3['template']);
                     }
                     $appServer->startApp();
                     echo 'Restarting server: ' . $row2['server'] . "\r\n";
                 }
                 if ($row3['backup'] == 'Y') {
                     $appServer->backupCreate($row2['backup']);
                     echo 'Backup server: ' . $row2['server'] . "\r\n";
                 }
             }
         }
         $appServer->execute();
         if (isset($dbConnect['debug']) and $dbConnect['debug'] == 1) {
             print implode("\r\n", $appServer->debug()) . "\r\n";
         }
     }
 }
 $newsInclude = true;
 $printToConsole = true;
 print "Check for new news feeds\r\n";
 include EASYWIDIR . '/stuff/methods/feeds_function.php';
 if (isset($template_file)) {
     print $template_file . "\r\n";
 }
 print "Cleaning Logs\r\n";
 $query = $sql->prepare("DELETE FROM `userlog` WHERE DATEDIFF(NOW(),`logdate`)>31");
 $query->execute();
 $query = $sql->prepare("DELETE FROM `mail_log` WHERE DATEDIFF(NOW(),`date`)>31");
 $query->execute();
コード例 #3
0
ファイル: userpanel_gserver.php プロジェクト: Eun/developer
             }
             if ($updated) {
                 $appServer = new AppServer($rootID);
                 $appServer->getAppServerDetails($id);
                 if (isset($oldPass, $ftppass) and $ftppass != $oldPass) {
                     $appServer->userCud('add');
                 }
                 if (isset($oldID, $switchID, $oldServerTemplate, $serverTemplate) and ($oldID != $switchID or $oldServerTemplate != $serverTemplate)) {
                     $appServer->startApp();
                 }
                 $loguseraction = '%mod% %gserver% ' . $server;
                 $insertlog->execute();
                 $template_file = $spracheResponse->table_add;
                 $appServer->execute();
                 if (isset($dbConnect['debug']) and $dbConnect['debug'] == 1) {
                     $template_file .= '<br><pre>' . implode("\r\n", $appServer->debug()) . '</pre>';
                 }
             } else {
                 $template_file = $spracheResponse->error_table;
             }
         } else {
             $template_file = 'Error: No such game!';
         }
     }
 } else {
     if ($ui->st('d', 'get') == 'cf' and $ui->id('id', 10, 'get') and (!isset($_SESSION['sID']) or in_array($ui->id('id', 10, 'get'), $substituteAccess['gs']))) {
         $id = $ui->id('id', 10, 'get');
         $serverID = 0;
         $configs = array();
         $configCheck = array();
         $query = $sql->prepare("SELECT g.*,AES_DECRYPT(g.`ftppassword`,?) AS `dftppass`,AES_DECRYPT(g.`ppassword`,?) AS `dpftppass`,s.`anticheat`,s.`servertemplate`,t.`shorten`,t.`gamebinary`,t.`modfolder`,t.`binarydir`,u.`cname` FROM `gsswitch` g INNER JOIN `serverlist` s ON g.`serverid`=s.`id` INNER JOIN `servertypes` t ON s.`servertype`=t.`id` INNER JOIN `userdata` u ON g.`userid`=u.`id` WHERE g.`id`=? AND g.`userid`=? AND g.`resellerid`=? LIMIT 1");
コード例 #4
0
ファイル: lend.php プロジェクト: nightcore125/developer
     $key = $xml->createElement('slots', $slots);
     $element->appendChild($key);
     $key = $xml->createElement('lendtime', $lendtime);
     $element->appendChild($key);
     $key = $xml->createElement('rcon', $rcon);
     $element->appendChild($key);
     $key = $xml->createElement('password', $password);
     $element->appendChild($key);
     $key = $xml->createElement('timeleft', $timeleft);
     $element->appendChild($key);
     $xml->appendChild($element);
     $xml->formatOutput = true;
     header("Content-Type: text/xml; charset=UTF-8");
     echo $xml->saveXML();
 } else {
     $debug = (isset($dbConnect['debug']) and $dbConnect['debug'] == 1) ? '<br><pre>' . implode("\r\n", $appServer->debug()) . '</pre>' : '';
     if (!isset($nextfree)) {
         $nextfree = 0;
     }
     if (isset($page_include)) {
         $page_data->setCanonicalUrl($s);
         $template_file = 'page_lenddata.tpl';
     } else {
         if (is_file(EASYWIDIR . '/template/' . $template_to_use . '/standalone/lenddata.tpl')) {
             include EASYWIDIR . '/template/' . $template_to_use . '/standalone/lenddata.tpl';
         } else {
             if (is_file(EASYWIDIR . '/template/' . $template_to_use . '/lenddata.tpl')) {
                 include EASYWIDIR . '/template/' . $template_to_use . '/lenddata.tpl';
             } else {
                 if (is_file(EASYWIDIR . '/template/default/standalone/lenddata.tpl')) {
                     include EASYWIDIR . '/template/default/standalone/lenddata.tpl';