if (empty($scanID)) {
    if (!headers_sent()) {
        header("Location: admin.php?page=" . WPS_PLUGIN_PREFIX . 'wpscan');
        exit;
    }
    echo '<script type="text/javascript">window.location.href = "admin.php?page=' . WPS_PLUGIN_PREFIX . 'wpscan";</script>';
    return;
} else {
    $isValidScan = WsdWpScanner::isValidScan($scanID);
    if ($isValidScan) {
        $scanInfo = WsdWpScanner::getScanInfo($scanID);
        $scanStartDate = $scanInfo->scanStartDate;
        $scanEndDate = $scanInfo->scanEndDate;
        $scanFailed = $scanInfo->scanResult;
        $failReason = $scanInfo->failReason;
        $entries = WsdWpScanner::getFailedEntries($scanID);
        $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;