Example #1
0
     if ($setGame == FALSE) {
         continue;
     }
     $setRepoPath = $gameInstaller->setRepoPath($game['cachedir']);
     if ($setRepoPath == FALSE) {
         continue;
     }
     $repoCacheInfo = $gameInstaller->getCacheInfo($game['cachedir']);
     if ($repoCacheInfo['status'] != 'Ready') {
         continue;
     }
     $setGameServerPath = $gameInstaller->setGameServerPath(dirname($server['path']));
     if ($setGameServerPath == FALSE) {
         continue;
     }
     $opStatus = $gameInstaller->checkOperation('updateGame');
     if ($opStatus == TRUE) {
         continue;
     }
     $updateGameServer = $gameInstaller->updateGameServer();
     if ($updateGameServer == FALSE) {
         continue;
     }
     $ssh->disconnect();
     //Adding event to the database
     $message = 'Server Update : ' . mysql_real_escape_string($server['name']);
     $updatedServers .= "<li>{$server['name']}</li>";
     query_basic("INSERT INTO `" . DBPREFIX . "log` SET `serverid` = '" . $serverid . "', `message` = '" . $message . "', `name` = '" . mysql_real_escape_string($_SESSION['adminfirstname']) . " " . mysql_real_escape_string($_SESSION['adminlastname']) . "', `ip` = '" . $_SERVER['REMOTE_ADDR'] . "'");
 }
 $updatedServers .= '</ul>';
 $_SESSION['msg1'] = T_('The Following Servers Are Being Updated:');
Example #2
0
     $_SESSION['msg-type'] = 'error';
     header("Location: server.php?id=" . urlencode($serverid));
     die;
 }
 $gameInstaller = new GameInstaller($ssh);
 ###
 $setGameServerPath = $gameInstaller->setGameServerPath(dirname($server['path']));
 if ($setGameServerPath == FALSE) {
     $_SESSION['msg1'] = T_('Error!');
     $_SESSION['msg2'] = T_('Unable To Set Game Server Directory');
     $_SESSION['msg-type'] = 'error';
     header("Location: server.php?id=" . urlencode($serverid));
     die;
 }
 ###
 $opStatus = $gameInstaller->checkOperation('installGame');
 if ($opStatus == TRUE) {
     $_SESSION['msg1'] = T_('Unable To Install Game Server!');
     $_SESSION['msg2'] = T_('Operation in Progress!');
     $_SESSION['msg-type'] = 'error';
     header("Location: server.php?id=" . urlencode($serverid));
     die;
 }
 //We prepare the startline
 $startline = $server['startline'];
 ###
 if (preg_match("#\\{ip\\}#", $startline)) {
     $startline = preg_replace("#\\{ip\\}#", $serverIp['ip'], $startline);
     //IP replacement
 }
 if (preg_match("#\\{port\\}#", $startline)) {
Example #3
0
 ###
 // Get SSH2 Object OR ERROR String
 $ssh = newNetSSH2($box['ip'], $box['sshport'], $box['login'], $aes->decrypt($box['password']));
 if (!is_object($ssh)) {
     $_SESSION['msg1'] = T_('Connection Error!');
     $_SESSION['msg2'] = $ssh;
     $_SESSION['msg-type'] = 'error';
     header("Location: boxgamefile.php?id=" . urlencode($boxid));
     die;
 }
 ###
 $gameInstaller = new GameInstaller($ssh);
 ###
 $gameInstaller->setRepoPath($game['cachedir']);
 ###
 $opStatus = $gameInstaller->checkOperation('makeRepo');
 if ($opStatus == TRUE) {
     $_SESSION['msg1'] = T_('Unable To Delete Game Cache Repository!');
     $_SESSION['msg2'] = T_('Operation In Progress For This Repository Or Repository Locked For Server Side Operation!');
     $_SESSION['msg-type'] = 'error';
     header("Location: boxgamefile.php?id=" . urlencode($boxid));
     die;
 }
 ###
 $gameInstaller->deleteRepo();
 ###
 //Adding event to the database
 $message = "Repository Deleted for " . mysql_real_escape_string($game['game']) . " on " . mysql_real_escape_string($box['name']);
 query_basic("INSERT INTO `" . DBPREFIX . "log` SET `boxid` = '" . $boxid . "', `message` = '" . $message . "', `name` = '" . mysql_real_escape_string($_SESSION['adminfirstname']) . " " . mysql_real_escape_string($_SESSION['adminlastname']) . "', `ip` = '" . $_SERVER['REMOTE_ADDR'] . "'");
 ###
 $_SESSION['msg1'] = T_('Warning: Repository Deleted!');