Beispiel #1
0
                if (str_in_array($item_type, array(ITEM_VALUE_TYPE_FLOAT, ITEM_VALUE_TYPE_UINT64))) {
                    array_push($new_row, $value);
                } else {
                    $pre = new CTag('pre', 'yes');
                    $pre->AddItem($value);
                    array_push($new_row, $pre);
                }
                if (!isset($_REQUEST["plaintext"])) {
                    $table->ShowRow($new_row);
                } else {
                    echo date("Y-m-d H:i:s", $row["clock"]);
                    echo "\t" . $row["clock"] . "\t" . htmlspecialchars($row["value"]) . "\n";
                }
            }
            if (!isset($_REQUEST["plaintext"])) {
                $table->ShowEnd();
                // to solve memory leak we call 'Show' method by steps
                echo SBR;
            } else {
                echo "</pre>";
            }
            COpt::profiling_stop("history");
        }
    }
}
if (!isset($_REQUEST["plaintext"])) {
    if (str_in_array($_REQUEST["action"], array("showvalues", "showgraph"))) {
        $stime = get_min_itemclock_by_itemid($_REQUEST["itemid"]);
        $stime = is_null($stime) ? 0 : $stime;
        $bstime = time() - $effectiveperiod;
        if (isset($_REQUEST['stime'])) {