Пример #1
0
    $f = fopen('dbc_out.dat', 'r');
    while (1) {
        $x = fgets($f);
        if (!$x) {
            break;
        }
        $n = sscanf($x, "%d", $resid);
        if ($n != 1) {
            echo "bad line: {$x}\n";
            continue;
        }
        $result = lookup_result($resid);
        if (!$result) {
            echo "no result {$resultid}\n";
            continue;
        }
        $wu = lookup_wu($result->workunitid);
        if ($wu) {
            echo "result has WU: {$resid}\n";
            continue;
        }
        echo "deleting {$resid}\n";
        // uncomment the following to actually delete
        die("edit script to enable deletion\n");
        //mysql_query("delete from result where id=$resid");
    }
}
get_lists();
join_lists();
delete_results();
Пример #2
0
        if ($reportCount > $pageEnd) {
            echo "<a href=\"index.php?offset={$next}" . $url_allres . $url_filter . "\" class=\"pager\"> " . _("Next") . " &gt;</a>\n    <a href=\"index.php?offset={$last}" . $url_allres . $url_filter . "\" class=\"pager\"> " . _("Last") . " &gt;&gt;</a>";
        }
        echo "</p>";
    }
}
echo "<center>";
echo "<table cellspacing=\"8\" cellpadding=\"0\" class=\"noborder\" width=\"900\" style=\"background-color:transparent\">";
echo "<tr><td class=\"nobborder\">";
stats_severity_services($type, $value);
echo "</td></tr>";
echo "<tr><td class=\"nobborder\" style=\"padding-bottom:10px;\">";
//stats();
stats_networks_hosts($type, $value);
echo "</td></tr>";
//echo "<tr><td class=\"nobborder\">";
//status();
//echo "</td></tr>";
echo "<tr><td class=\"nobborder\">";
switch ($disp) {
    case "delete":
        delete_results($scantime, $scantype, $reporttype, $key, $sortby, $allres, $fp, $nfp, $op, $output, $wh, $bg);
        break;
    default:
        list_results($type, $value, $sortby, $sortdir);
        break;
}
echo "</td></tr>";
echo "</table>";
echo "</center>";
require_once 'footer.php';