Ejemplo n.º 1
0
<?php

if (!WsdUtil::canLoad()) {
    return;
}
if (!WsdUtil::isAdministrator()) {
    return;
}
// get last scan info
$scanID = WsdWpScanner::getLastScanID_table();
$scanInfo = WsdWpScanner::getScanInfo($scanID);
$scanId = $scanInfo->scanId;
$scanStartDate = $scanInfo->scanStartDate;
$scanEndDate = $scanInfo->scanEndDate;
$scanFailed = $scanInfo->scanResult == 0;
$scanType = $scanInfo->scanType;
$h24 = 24 * 60 * 60;
$since = 0;
if ($scanType == 0) {
    $since = strtotime($scanStartDate);
} elseif ($scanType == 1) {
    $since = strtotime($scanStartDate) - $h24;
} elseif ($scanType == 2) {
    $since = strtotime($scanStartDate) - 2 * $h24;
} elseif ($scanType == 3) {
    $since = strtotime($scanStartDate) - 3 * $h24;
} elseif ($scanType == 4) {
    $since = strtotime($scanStartDate) - 4 * $h24;
} elseif ($scanType == 5) {
    $since = strtotime($scanStartDate) - 5 * $h24;
} elseif ($scanType == 6) {