Exemple #1
0
        $content .= $jGrowls;
    }
    // send and out
    @header("Cache-Control: no-cache");
    @header("Pragma: no-cache");
    @header("Content-Type: text/plain");
    echo $content;
    exit;
}
// =============================================================================
// standard-index
// =============================================================================
// goodlookingstats-init
if ($cfg["enable_goodlookstats"] != "0") {
    $tmpl->setvar('enable_goodlookstats', 1);
    $settingsHackStats = convertByteToArray($cfg["hack_goodlookstats_settings"]);
}
// page refresh
if ($_SESSION['settings']['index_meta_refresh'] != 0) {
    $tmpl->setvar('page_refresh', $cfg["page_refresh"]);
    $tmpl->setvar('meta_refresh', $cfg["page_refresh"] . ';URL=index.php?iid=index');
    $onLoad .= "initRefresh(" . $cfg["page_refresh"] . ");";
    $tmpl->setvar('_PAGEWILLREFRESH', $cfg['_PAGEWILLREFRESH']);
} else {
    $tmpl->setvar('_TURNONREFRESH', $cfg['_TURNONREFRESH']);
}
// AJAX update
if ($_SESSION['settings']['index_ajax_update'] != 0) {
    $tmpl->setvar('index_ajax_update', $cfg["index_ajax_update"]);
    $ajaxInit = "ajax_initialize(";
    $ajaxInit .= intval($cfg['index_ajax_update']) * 1000;
/**
 * print form of good looking stats hack (0-63)
 *
 */
function printGoodLookingStatsForm()
{
    global $cfg;
    $settingsHackStats = convertByteToArray($cfg["hack_goodlookstats_settings"]);
    echo '<table>';
    echo '<tr><td align="right" nowrap>Download Speed: <input name="hack_goodlookstats_settings_0" type="Checkbox" value="1"';
    if ($settingsHackStats[0] == 1) {
        echo ' checked';
    }
    echo '></td>';
    echo '<td align="right" nowrap>Upload Speed: <input name="hack_goodlookstats_settings_1" type="Checkbox" value="1"';
    if ($settingsHackStats[1] == 1) {
        echo ' checked';
    }
    echo '></td>';
    echo '<td align="right" nowrap>Total Speed: <input name="hack_goodlookstats_settings_2" type="Checkbox" value="1"';
    if ($settingsHackStats[2] == 1) {
        echo ' checked';
    }
    echo '></td></tr>';
    echo '<tr><td align="right" nowrap>Connections: <input name="hack_goodlookstats_settings_3" type="Checkbox" value="1"';
    if ($settingsHackStats[3] == 1) {
        echo ' checked';
    }
    echo '></td>';
    echo '<td align="right" nowrap>Drive Space: <input name="hack_goodlookstats_settings_4" type="Checkbox" value="1"';
    if ($settingsHackStats[4] == 1) {
        echo ' checked';
    }
    echo '></td>';
    echo '<td align="right" nowrap>Server Load: <input name="hack_goodlookstats_settings_5" type="Checkbox" value="1"';
    if ($settingsHackStats[5] == 1) {
        echo ' checked';
    }
    echo '></td></tr>';
    echo '</table>';
}
/**
 * set vars for form of good looking stats (0-63)
 */
function tmplSetGoodLookingStatsForm()
{
    global $cfg, $tmpl;
    $settingsHackStats = convertByteToArray($cfg["hack_goodlookstats_settings"]);
    $tmpl->setvar('goodLookingStatsForm_settings_0', $settingsHackStats[0]);
    $tmpl->setvar('goodLookingStatsForm_settings_1', $settingsHackStats[1]);
    $tmpl->setvar('goodLookingStatsForm_settings_2', $settingsHackStats[2]);
    $tmpl->setvar('goodLookingStatsForm_settings_3', $settingsHackStats[3]);
    $tmpl->setvar('goodLookingStatsForm_settings_4', $settingsHackStats[4]);
    $tmpl->setvar('goodLookingStatsForm_settings_5', $settingsHackStats[5]);
}