<?php if (!WsdUtil::canLoad()) { return; } if (!WsdUtil::isAdministrator()) { return; } $progress = WsdWPScanSettings::getSetting('SCAN_PROGRESS'); if ($progress == WsdWPScanSettings::SCAN_PROGRESS_NONE) { $currentlyScanning = 'nothing'; } elseif ($progress == WsdWPScanSettings::SCAN_PROGRESS_ROOT) { $currentlyScanning = '<strong>root</strong> directory'; } elseif ($progress == WsdWPScanSettings::SCAN_PROGRESS_ADMIN) { $currentlyScanning = '<strong>wp-admin</strong> directory'; } elseif ($progress == WsdWPScanSettings::SCAN_PROGRESS_CONTENT) { $currentlyScanning = '<strong>wp-content</strong> directory'; } elseif ($progress == WsdWPScanSettings::SCAN_PROGRESS_INCLUDES) { $currentlyScanning = '<strong>wp-includes</strong> directory'; } ?> <style type="text/css"> #progressBar { width: 400px; padding: 0 0; line-height: normal; } #step { display:block; background: #e0e0e0; border: solid 1px #bebebe;padding: 3px 0; margin: 0 0; line-height: normal; text-align: center;} #step span { font-weight: 800; color: #000; font-size: 12px; } </style> <h3 style="margin-bottom: 2px;">Scan State: In Progress</h3> <hr style="height:1px; color: #eee; margin-top: 0; width: 75%;"/> <div id="progressBar"><p id="step"><span></span></p></div>
public static function isValidScan($scanID) { $scan_id = WsdWPScanSettings::getSetting('SCAN_ID'); if ($scanID == $scan_id) { return false; } global $wpdb; $query = $wpdb->prepare("SELECT scanId FROM " . WsdPlugin::getTableName(WpsSettings::SCANS_TABLE_NAME) . " WHERE scanId = %d", $scanID); $result = $wpdb->get_var($query); return empty($result) ? false : true; }