vogelor
2008-11-24 7162553354e297f7c152144eed24aaecd28e7b43
interface/web/monitor/tools.inc.php
@@ -11,7 +11,7 @@
        /*
        Format the data
        */
        $html .=
        $html =
        '<table id="system_load">
            <tr>
            <td>' . $app->lng("Server online since").':</td>
@@ -53,7 +53,7 @@
        /*
        Format the data
        */
        $html .= '<table id="system_disk">';
        $html = '<table id="system_disk">';
        foreach($data as $line) {
            $html .= '<tr>';
            foreach ($line as $item) {
@@ -84,7 +84,7 @@
        /*
        Format the data
        */
        $html .= '<table id="system_memusage">';
        $html = '<table id="system_memusage">';
        foreach($data as $key => $value){
            if ($key != '') {
@@ -115,7 +115,7 @@
        /*
        Format the data
        */
        $html .= '<table id="system_cpu">';
        $html = '<table id="system_cpu">';
        foreach($data as $key => $value){
            if ($key != '') {
                $html .= '<tr>
@@ -145,7 +145,7 @@
        /*
        Format the data
        */
        $html .= '<table id="system_services">';
        $html = '<table id="system_services">';
        if($data['webserver'] != -1) {
            if($data['webserver'] == 1) {
@@ -241,4 +241,39 @@
    return $html;
}
function showSystemUpdate()
{
    global $app;
    /* fetch the Data from the DB */
    $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'system_update' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
    if(isset($record['data'])) {
        $data = unserialize($record['data']);
        $html = nl2br($data['output']);
    } else {
        $html = '<p>' . "No Update-Data available" . '</p>';
    }
    return $html;
}
function showMailq()
{
    global $app;
    /* fetch the Data from the DB */
    $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'mailq' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
    if(isset($record['data'])) {
        $data = unserialize($record['data']);
        $html = nl2br($data['output']);
    } else {
        $html = '<p>' . "No Mailq-Data available" . '</p>';
    }
    return $html;
}
?>