serverinfo/online.php
@@ -19,8 +19,12 @@
// 默认当天
$startDate = array_key_exists("startDate", $_POST) ? $_POST["startDate"] : date("Y-m-d");
$endDate = array_key_exists("endDate", $_POST) ? $_POST["endDate"] : date("Y-m-d");
$onlyServerIDHis  =  $_POST["onlyServerIDHis"];
$OnlyServerID = null;
if ($onlyServerIDHis == "on") {
    $OnlyServerID = 1; // 默认只查指定服
}
$OnlyServerID = 1; // 默认只查指定服
// 设置默认数据,开界面默认查选中服
$_POST["startDate"] = $startDate;
$_POST["endDate"] = $endDate;
@@ -61,6 +65,10 @@
        ~
        <input type="text" name="endDate" id="endDate" onclick="new Calendar().show(this);" readonly value="<?php echo $endDate; ?>" size="8" />
        <input type="submit" value="<?php echo \Lang\gettext("查询本服"); ?>" onclick="onCurSubmit()" />
        <?php
        echo "&nbsp;&nbsp;";
        echo '<input type="checkbox" name="onlyServerIDHis" id="onlyServerIDHis" ' . ($onlyServerIDHis == "on" ? "checked" : "") . ' onchange="onOnlyServerIDHisChange()" />' . \Lang\gettext("查询单服历史");
        ?>
        <div id="OnlinePlayerInfo"></div>
        <hr />
        <?php
@@ -107,6 +115,14 @@
        }
    }
    function onOnlyServerIDHisChange() {
        if (document.getElementById("onlyServerIDHis").checked) {
            document.getElementById("OnlyServerID").selectedIndex = 1;
        } else {
            document.getElementById("OnlyServerID").selectedIndex = 0;
        }
    }
    function drawChartLine(chartID, serverName, drData) {
        var backgroundColors = [