Exemplo n.º 1
0
function admin_warnings()
{
    $q = new syslogs();
    if (isset($_GET["delete"])) {
        $q->delete_warnings($_GET["delete"]);
    }
    $header_top = "\n\t<div style='text-align:right'>\n\t<input type='button' value='{delete_all_events}' OnClick=\"javascript:AdminDeleteAllSqlEvents();\">\n\t</div>\n\t<br>\n\t\n\t";
    $tpl = new templates();
    $r = $q->get_warnings();
    $count = 0;
    $style = "style='border-bottom:1px dotted #CCCCCC'";
    $html = "<input type='hidden' id='switch' value='{$_GET["main"]}'>";
    while ($ligne = @mysql_fetch_array($r, MYSQL_ASSOC)) {
        $ligne["event_text"] = htmlentities($ligne["event_text"]);
        $ligne["event_text"] = str_replace('{', '<br><p class=caption>{', $ligne["event_text"]);
        $ligne["event_text"] = str_replace('}', '}</p>', $ligne["event_text"]);
        $div = "<table style='width:100%'>\n\t\t<tr><td colspan=2 align='right'>" . imgtootltip('ed_delete.gif', '{delete}', "DeleteWarning('{$ligne["zMD5"]}')") . "</td></tr>\n\t\t<tr>\n\t\t<td nowrap align='right'><strong>{service}:</strong></td>\n\t\t<td><strong>{$ligne["daemon"]}</td></strong>\n\t\t</tr>\n\t\t<tr><td colspan=2><hr></td></tr>\n\t\t<td nowrap align='right' valign='top'><strong>{notification}:</strong></td>\n\t\t<td style='font-size:11px;font-weight:bold;padding:3px;margin:3px;border:1px dotted #CCCCCC'>{$ligne["event_text"]}</td>\n\t\t</tr>\n\t\t</table>";
        $html = $html . RoundedLightGrey($div) . "<br>";
    }
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body("{$header_top}<center><div style='width:490px'>{$html}</div></center>") . "<br>";
    echo $html;
}