Example #1
0
 /**
  * init server stats
  * note : this can only be used after a call to update transfer-values in cfg-
  *        array (eg by getTransferListArray)
  */
 function _initServerStats()
 {
     // init labels
     $this->_serverLabels = array("Speed Down", "Speed Up", "Speed Total", "Connections", "Free Space", "Load", "Running", "Queued", "Speed Down (Percent)", "Speed Up (Percent)", "Drive Space (Percent)");
     $this->_serverStats = getServerStats();
 }
Example #2
0
        rename(XOOPS_ROOT_PATH . '/' . $file, XOOPS_ROOT_PATH . '/' . $file . '.svg');
        copy(XOOPS_ROOT_PATH . '/modules/mpmanager/Root/' . $file, XOOPS_ROOT_PATH . '/' . $file);
        break;
    case 'restore':
        unlink(XOOPS_ROOT_PATH . '/' . $file);
        rename(XOOPS_ROOT_PATH . '/' . $file . '.svg', XOOPS_ROOT_PATH . '/' . $file);
        break;
    case 'install_template':
        if (file_exists(XOOPS_ROOT_PATH . '/themes/' . $config_theme->getConfValueForOutput() . '/modules/' . $file)) {
            unlink(XOOPS_ROOT_PATH . '/themes/' . $config_theme->getConfValueForOutput() . '/modules/' . $file);
        }
        FS_Storage::dircopy(XOOPS_ROOT_PATH . '/modules/mpmanager/Root/themes/', XOOPS_ROOT_PATH . '/themes/' . $config_theme->getConfValueForOutput() . '/', $success, $error);
        include_once XOOPS_ROOT_PATH . '/class/template.php';
        $xoopsTpl = new XoopsTpl();
        $xoopsTpl->clear_cache('db:system_block_user.html');
        $xoopsTpl->clear_cache('db:system_userinfo.html');
        $xoopsTpl->clear_cache('db:profile_userinfo.html');
        break;
    case 'remove_template':
        unlink(XOOPS_ROOT_PATH . '/themes/' . $config_theme->getConfValueForOutput() . '/modules/' . $file);
        break;
}
/* Display admin header */
xoops_cp_header();
/* Display the menu */
mp_adminmenu(0, _MP_INSTALL);
/* Display some informations */
getServerStats();
getFilesStatus();
/* Display admin footer */
xoops_cp_footer();
Example #3
0
        $msgGrowl .= "<img src=images/msg_new.png width=16 height=16> You have new messages !<br/><br/><a href=index.php?iid=readmsg>Please read...</a>";
    } else {
        $msgGrowl .= "<img src=images/msg_new.png width=16 height=16> You have a new message !<br/><br/><a href=index.php?iid=readmsg>Please read...</a>";
    }
}
// =============================================================================
// ajax-index
// =============================================================================
if ($isAjaxUpdate) {
    $ajax_delim = "|#|";
    $content = "";
    $isFirst = true;
    // server stats
    if ($ajaxUpdateParams[0] == "1") {
        $isFirst = false;
        $serverStats = getServerStats();
        $serverCount = count($serverStats);
        for ($i = 0; $i < $serverCount; $i++) {
            $content .= $serverStats[$i];
            if ($i < $serverCount - 1) {
                $content .= $cfg['stats_txt_delim'];
            }
        }
    }
    // xfer
    if ($ajaxUpdateParams[1] == "1") {
        if ($isFirst) {
            $isFirst = false;
        } else {
            $content .= $ajax_delim;
        }
Example #4
0
<?php

$server_id = filter_input(INPUT_GET, 'server_id', FILTER_SANITIZE_SPECIAL_CHARS);
$from = filter_input(INPUT_GET, 'from', FILTER_SANITIZE_SPECIAL_CHARS);
$to = filter_input(INPUT_GET, 'to', FILTER_SANITIZE_SPECIAL_CHARS);
if ($server_id !== NULL && $server_id !== '') {
    if ($server_id === "unique") {
        echo json_encode(getServerStatsUnique($db_ip, $db_port, $db_login, $db_pass, 'soe-hlstats', $from, $to));
    } elseif ($server_id === "notunique") {
        echo json_encode(getServerStatsNotUnique($db_ip, $db_port, $db_login, $db_pass, 'soe-hlstats', $from, $to));
    } else {
        echo json_encode(getServerStats($db_ip, $db_port, $db_login, $db_pass, 'soe-hlstats', $from, $to, $server_id));
    }
} else {
    //$ip   = filter_input(INPUT_GET, 'ip', FILTER_SANITIZE_SPECIAL_CHARS);
    //$port = filter_input(INPUT_GET, 'port', FILTER_SANITIZE_SPECIAL_CHARS);
    //$out  = "";
    //$out  = getServerInfo($ip, $port);
    ////Classic #1 – csgo.ezpz.cz:27016
    //$out = getServerInfo("csgo.ezpz.cz", 27016);
    //Classic #1 – csgo.ezpz.cz:27015
    //$out .= getServerInfo("csgo.ezpz.cz", "27015");
    //Dust2 ONLY – csgo2.ezpz.cz:27015
    //$out .= getServerInfo("csgo2.ezpz.cz", 27015);
    ////AIM+AWP – csgo.ezpz.cz:27018
    //$out .= getServerInfo("csgo.ezpz.cz", "27018");
    //AIM+AWP DM – csgo2.ezpz.cz:27020
    //$out .= getServerInfo("csgo2.ezpz.cz", 27020);
    //ARENA 1vs1 – csgo2.ezpz.cz:27030
    //$out .= getServerInfo("csgo2.ezpz.cz", 27030);
    ////IDLE #1 – csgo.ezpz.cz:30016