Exemplo n.º 1
0
    global $middle;
    global $Low;
    $high = 0;
    $middle = 0;
    $Low = 0;
    $query = $db->query("select * from {$tablename} where user='******'");
    $key = 1;
    $re_id = '';
    while ($fs = $db->fetch_array($query)) {
        $url = $fs["url"];
        $time = $fs["exec_time"];
        $id = $fs["report_id"];
        $exp_level = level($id);
        if ($exp_level == 'high') {
            $level_str = "高危";
            $color = "color:red";
        } elseif ($exp_level == "middle") {
            $level_str = "警告";
            $color = "color:blue";
        } elseif ($exp_level == "Low") {
            $level_str = "安全";
            $color = "color:#006400";
        }
        $color_str = "<td align=\"center\" style=\"{$color}\"><font size=\"+1\">{$level_str}</font></td>";
        if ($re_id != $id) {
            $loopstr .= "<tr>\r\n\t\t\t\t\t\t\t<td align=center><span class=\"price\"><font size=\"+1\">{$url}</font><span></td>\r\n\t\t\t\t\t\t\t" . $color_str . "\r\n\t\t\t\t\t\t\t<td align=center>" . ld_select_date($time) . "</td>\r\n\t\t\t\t\t\t\t<td align=center><a href=\"task_list.php?id={$id}\"><font size=\"+1\">查看报告</a></td>";
            $re_id = $id;
        }
    }
}
include 'html/task.html';
Exemplo n.º 2
0
<?php

require dirname(__FILE__) . '/include/config.inc.php';
$tablename = "##_report";
if ($_SESSION["user"]) {
    $query = $db->query("select * from {$tablename} where taskid='{$id}'");
    while ($fs = $db->fetch_array($query)) {
        $type = $fs["type"];
        $time = $fs["addtime"];
        $info = $fs["info"];
        $le = $db->fetch_assoc("select color,level from ##_exploit where title='{$type}'");
        $color = $le["color"];
        $level = $le["level"];
        $loopstr .= "<tr>\n\t\t\t\t\t\t<td align=center><span class=\"price\"><font size=\"+1\">{$type}</font><span></td>\n\t\t\t\t\t\t<td align=center style=\"{$color}\"><span class=\"price\"><font size=\"+1\">{$info}</font><span></td>\n\t\t\t\t\t\t<td align=center style=\"{$color}\"><span class=\"price\"><font size=\"+1\">{$level}</font><span></td>\n\t\t\t\t\t\t<td align=center>" . ld_select_date($time) . "</td>";
    }
}
include 'html/task_list.html';