Exemplo n.º 1
0
												<a tabindex="-1" href="#"><i class="icon-th-large <?php 
            echo formatIcon();
            ?>
"></i>&nbsp;<?php 
            echo htmlspecialchars($rowsCategoriesNav['name'], ENT_QUOTES);
            ?>
</a>
												<ul class="dropdown-menu">
<?php 
            /**
             * Processing Scripts
             */
            if (query_numrows("SELECT `scriptid` FROM `" . DBPREFIX . "script` WHERE `catid` = '" . $rowsCategoriesNav['id'] . "' AND `status` = 'Active'") != 0) {
                $scriptsNav = mysql_query("SELECT `scriptid`, `boxid`, `catid`, `groupid`, `name` FROM `" . DBPREFIX . "script` WHERE ( `catid` = '" . $rowsCategoriesNav['id'] . "' AND `status` = 'Active' ) ORDER BY `name`");
                while ($rowsScriptsNav = mysql_fetch_assoc($scriptsNav)) {
                    if (checkClientGroup($rowsScriptsNav['groupid'], $_SESSION['clientid']) != FALSE) {
                        ?>
													<li>
														<a tabindex="-1" href="scriptsummary.php?id=<?php 
                        echo $rowsScriptsNav['scriptid'];
                        ?>
">
															<i class="icon-arrow-right <?php 
                        echo formatIcon();
                        ?>
"></i>
															&nbsp;<?php 
                        echo htmlspecialchars($rowsScriptsNav['name'], ENT_QUOTES);
                        ?>
&nbsp;
														</a>
Exemplo n.º 2
0
         if ($status['panelstatus'] == 'Stopped') {
             $_SESSION['msg1'] = T_('Validation Error!');
             $_SESSION['msg2'] = T_('The server is already stopped!');
             $_SESSION['msg-type'] = 'error';
             header('Location: server.php');
             die;
         }
     }
 }
 ###
 $server = query_fetch_assoc("SELECT * FROM `" . DBPREFIX . "server` WHERE `serverid` = '" . $serverid . "' LIMIT 1");
 $serverIp = query_fetch_assoc("SELECT `ip` FROM `" . DBPREFIX . "boxIp` WHERE `ipid` = '" . $server['ipid'] . "' LIMIT 1");
 $box = query_fetch_assoc("SELECT `ip`, `login`, `password`, `sshport` FROM `" . DBPREFIX . "box` WHERE `boxid` = '" . $server['boxid'] . "' LIMIT 1");
 ###
 // Rights
 $checkGroup = checkClientGroup($server['groupid'], $_SESSION['clientid']);
 if ($checkGroup == FALSE) {
     $_SESSION['msg1'] = T_('Error!');
     $_SESSION['msg2'] = T_('This is not your server!');
     $_SESSION['msg-type'] = 'error';
     header('Location: index.php');
     die;
 }
 ###
 $aes = new Crypt_AES();
 $aes->setKeyLength(256);
 $aes->setKey(CRYPT_KEY);
 ###
 // Get SSH2 Object OR ERROR String
 $ssh = newNetSSH2($box['ip'], $box['sshport'], $box['login'], $aes->decrypt($box['password']));
 if (!is_object($ssh)) {
Exemplo n.º 3
0
                 query_basic("DELETE FROM `" . DBPREFIX . "groupMember` WHERE `clientid` = '" . $value . "' LIMIT 1");
             } else {
                 query_basic("UPDATE `" . DBPREFIX . "groupMember` SET `groupids` = '" . $groupids['groupids'] . "' WHERE `clientid` = '" . $value . "'");
             }
             unset($groupids);
         }
     }
     ###
     $_SESSION['msg1'] = T_('Group Updated Successfully!');
     $_SESSION['msg2'] = T_('Your changes to the group have been saved.');
     $_SESSION['msg-type'] = 'success';
 } else {
     // Adding a new client
     $clientid = query_fetch_assoc("SELECT `clientid` FROM `" . DBPREFIX . "client` WHERE `username` = '" . $newClient . "'");
     ###
     if (!checkClientGroup($groupid, $clientid['clientid'])) {
         if (query_numrows("SELECT `id` FROM `" . DBPREFIX . "groupMember` WHERE `clientid` = '" . $clientid['clientid'] . "'") == 0) {
             query_basic("INSERT INTO `" . DBPREFIX . "groupMember` SET `clientid` = '" . $clientid['clientid'] . "', `groupids` = '" . $groupid . ";'");
         } else {
             $groupids = query_fetch_assoc("SELECT `groupids` FROM `" . DBPREFIX . "groupMember` WHERE `clientid` = '" . $clientid['clientid'] . "'");
             ###
             query_basic("UPDATE `" . DBPREFIX . "groupMember` SET `groupids` = '" . $groupids['groupids'] . $groupid . ";' WHERE `clientid` = '" . $clientid['clientid'] . "'");
             ###
             unset($groupids);
         }
     }
     unset($clientid);
     ###
     $_SESSION['msg1'] = T_('New Client Successfully Added!');
     $_SESSION['msg2'] = $newClient . T_(' has been added to the group.');
     $_SESSION['msg-type'] = 'success';
Exemplo n.º 4
0
     die;
 } else {
     if ($status['status'] == 'Pending') {
         $_SESSION['msg1'] = T_('Validation Error!');
         $_SESSION['msg2'] = T_('The script is pending. ');
         $_SESSION['msg-type'] = 'error';
         header('Location: index.php');
         die;
     }
 }
 ###
 $script = query_fetch_assoc("SELECT * FROM `" . DBPREFIX . "script` WHERE `scriptid` = '" . $scriptid . "' LIMIT 1");
 $box = query_fetch_assoc("SELECT `ip`, `login`, `password`, `sshport` FROM `" . DBPREFIX . "box` WHERE `boxid` = '" . $script['boxid'] . "' LIMIT 1");
 ###
 // Rights
 $checkGroup = checkClientGroup($script['groupid'], $_SESSION['clientid']);
 if ($checkGroup == FALSE) {
     $_SESSION['msg1'] = T_('Error!');
     $_SESSION['msg2'] = T_('This is not your script!');
     $_SESSION['msg-type'] = 'error';
     header('Location: index.php');
     die;
 }
 ###
 if ($script['type'] == '0') {
     $_SESSION['msg1'] = T_('Error!');
     $_SESSION['msg2'] = T_('Non-interactive scripts are unstoppable!');
     $_SESSION['msg-type'] = 'error';
     header('Location: index.php');
     die;
 }
Exemplo n.º 5
0
require "configuration.php";
require "include.php";
require "./libs/lgsl/lgsl_class.php";
$title = T_('Server Summary');
if (query_numrows("SELECT `name` FROM `" . DBPREFIX . "server` WHERE `serverid` = '" . $serverid . "'") == 0) {
    exit('Error: ServerID is invalid.');
}
$rows = query_fetch_assoc("SELECT * FROM `" . DBPREFIX . "server` WHERE `serverid` = '" . $serverid . "' LIMIT 1");
$serverIp = query_fetch_assoc("SELECT `ip` FROM `" . DBPREFIX . "boxIp` WHERE `ipid` = '" . $rows['ipid'] . "' LIMIT 1");
$box = query_fetch_assoc("SELECT `name` FROM `" . DBPREFIX . "box` WHERE `boxid` = '" . $rows['boxid'] . "' LIMIT 1");
$type = query_fetch_assoc("SELECT `querytype` FROM `" . DBPREFIX . "game` WHERE `gameid` = '" . $rows['gameid'] . "' LIMIT 1");
$game = query_fetch_assoc("SELECT `game` FROM `" . DBPREFIX . "game` WHERE `gameid` = '" . $rows['gameid'] . "' LIMIT 1");
$group = query_fetch_assoc("SELECT `name` FROM `" . DBPREFIX . "group` WHERE `groupid` = '" . $rows['groupid'] . "' LIMIT 1");
$logs = mysql_query("SELECT * FROM `" . DBPREFIX . "log` WHERE `serverid` = '" . $serverid . "' ORDER BY `logid` DESC LIMIT 15");
//---------------------------------------------------------+
$checkGroup = checkClientGroup($rows['groupid'], $_SESSION['clientid']);
if ($checkGroup == FALSE) {
    $_SESSION['msg1'] = T_('Error!');
    $_SESSION['msg2'] = T_('This is not your server!');
    $_SESSION['msg-type'] = 'error';
    header('Location: index.php');
    die;
}
//---------------------------------------------------------+
include "./bootstrap/header.php";
/**
 * Notifications
 */
include "./bootstrap/notifications.php";
?>
			<div class="tabbable">
Exemplo n.º 6
0
</span></div></td>
									</tr>
<?php 
}
?>
									<tr>
										<td>#</td>
										<td>~</td>
										<td>~</td>
										<td>
											<select class="span3" name="newClient">
												<option>-Select-</option>
<?php 
$clients = mysql_query("SELECT `clientid`, `username` FROM `" . DBPREFIX . "client` WHERE `status` = 'Active'");
while ($rowsClients = mysql_fetch_assoc($clients)) {
    if (!checkClientGroup($groupid, $rowsClients['clientid'])) {
        ?>
												<option value="<?php 
        echo htmlspecialchars($rowsClients['username'], ENT_QUOTES);
        ?>
"><?php 
        echo htmlspecialchars($rowsClients['username'], ENT_QUOTES);
        ?>
</option>
<?php 
    }
}
unset($clients);
?>
											</select>
										</td>