Diff
8 years ago
dashboard
7 years ago
rest-api
7 years ago
.htaccess
7 years ago
Diff.php
14 years ago
GeoLite2-Country.mmdb
7 years ago
IPTraf.php
8 years ago
IPTrafList.php
7 years ago
WFLSPHP52Compatability.php
7 years ago
compat.php
8 years ago
conntest.php
7 years ago
cronview.php
8 years ago
dbview.php
8 years ago
diffResult.php
8 years ago
email_genericAlert.php
7 years ago
email_newIssues.php
7 years ago
email_unlockRequest.php
8 years ago
email_unsubscribeRequest.php
7 years ago
flags.php
7 years ago
live_activity.php
8 years ago
menu_dashboard.php
7 years ago
menu_dashboard_options.php
7 years ago
menu_firewall.php
7 years ago
menu_firewall_blocking.php
7 years ago
menu_firewall_blocking_options.php
8 years ago
menu_firewall_waf.php
7 years ago
menu_firewall_waf_options.php
7 years ago
menu_options.php
7 years ago
menu_scanner.php
7 years ago
menu_scanner_credentials.php
8 years ago
menu_scanner_options.php
8 years ago
menu_support.php
7 years ago
menu_tools.php
7 years ago
menu_tools_diagnostic.php
7 years ago
menu_tools_importExport.php
7 years ago
menu_tools_livetraffic.php
7 years ago
menu_tools_twoFactor.php
7 years ago
menu_tools_whois.php
8 years ago
menu_wordfence_central.php
7 years ago
noc1.key
7 years ago
sysinfo.php
8 years ago
unknownFiles.php
8 years ago
viewFullActivityLog.php
8 years ago
wf503.php
7 years ago
wfAPI.php
7 years ago
wfActivityReport.php
7 years ago
wfAdminNoticeQueue.php
8 years ago
wfArray.php
7 years ago
wfBrowscap.php
8 years ago
wfBrowscapCache.php
7 years ago
wfBulkCountries.php
7 years ago
wfCache.php
9 years ago
wfCentralAPI.php
7 years ago
wfConfig.php
7 years ago
wfCrawl.php
8 years ago
wfCredentialsController.php
7 years ago
wfCrypt.php
7 years ago
wfDB.php
7 years ago
wfDashboard.php
7 years ago
wfDateLocalization.php
8 years ago
wfDiagnostic.php
7 years ago
wfDict.php
8 years ago
wfDirectoryIterator.php
7 years ago
wfHelperBin.php
11 years ago
wfHelperString.php
11 years ago
wfIPWhitelist.php
7 years ago
wfImportExportController.php
7 years ago
wfIssues.php
7 years ago
wfJWT.php
7 years ago
wfLockedOut.php
7 years ago
wfLog.php
7 years ago
wfMD5BloomFilter.php
8 years ago
wfModuleController.php
7 years ago
wfNotification.php
8 years ago
wfOnboardingController.php
7 years ago
wfPersistenceController.php
8 years ago
wfRESTAPI.php
7 years ago
wfScan.php
7 years ago
wfScanEngine.php
7 years ago
wfSchema.php
7 years ago
wfStyle.php
7 years ago
wfSupportController.php
7 years ago
wfUnlockMsg.php
7 years ago
wfUpdateCheck.php
8 years ago
wfUtils.php
7 years ago
wfVersionCheckController.php
8 years ago
wfView.php
10 years ago
wfViewResult.php
8 years ago
wordfenceClass.php
7 years ago
wordfenceConstants.php
7 years ago
wordfenceHash.php
7 years ago
wordfenceScanner.php
7 years ago
wordfenceURLHoover.php
7 years ago
menu_dashboard_options.php
292 lines
| 1 | <?php |
| 2 | if (!defined('WORDFENCE_VERSION')) { exit; } |
| 3 | $dashboardURL = network_admin_url('admin.php?page=Wordfence'); |
| 4 | $firewall = new wfFirewall(); |
| 5 | $scanner = wfScanner::shared(); |
| 6 | $d = new wfDashboard(); |
| 7 | ?> |
| 8 | <script type="application/javascript"> |
| 9 | (function($) { |
| 10 | $(function() { |
| 11 | document.title = "<?php esc_attr_e('Wordfence Global Options', 'wordfence'); ?>" + " \u2039 " + WFAD.basePageName; |
| 12 | |
| 13 | //Hash-based option block linking |
| 14 | if (window.location.hash) { |
| 15 | var hashes = WFAD.parseHashes(); |
| 16 | var hash = hashes[hashes.length - 1]; |
| 17 | var block = $('.wf-block[data-persistence-key="' + hash + '"]'); |
| 18 | if (block) { |
| 19 | if (!block.hasClass('wf-active')) { |
| 20 | block.find('.wf-block-content').slideDown({ |
| 21 | always: function() { |
| 22 | block.addClass('wf-active'); |
| 23 | $('html, body').animate({ |
| 24 | scrollTop: block.offset().top - 100 |
| 25 | }, 1000); |
| 26 | } |
| 27 | }); |
| 28 | |
| 29 | WFAD.ajax('wordfence_saveDisclosureState', {name: block.data('persistenceKey'), state: true}, function() {}); |
| 30 | } |
| 31 | else { |
| 32 | $('html, body').animate({ |
| 33 | scrollTop: block.offset().top - 100 |
| 34 | }, 1000); |
| 35 | } |
| 36 | history.replaceState('', document.title, window.location.pathname + window.location.search); |
| 37 | } |
| 38 | } |
| 39 | }); |
| 40 | })(jQuery); |
| 41 | </script> |
| 42 | <div class="wf-options-controls"> |
| 43 | <div class="wf-row"> |
| 44 | <div class="wf-col-xs-12"> |
| 45 | <?php |
| 46 | echo wfView::create('options/block-controls', array( |
| 47 | 'backLink' => $dashboardURL, |
| 48 | 'backLabelHTML' => __('Back<span class="wf-hidden-xs"> to Dashboard</span>', 'wordfence'), |
| 49 | 'restoreDefaultsSection' => wfConfig::OPTIONS_TYPE_GLOBAL, |
| 50 | 'restoreDefaultsMessage' => __('Are you sure you want to restore the default global settings? This will undo any custom changes you have made to the options on this page. Your configured license key and alert emails will not be changed.', 'wordfence'), |
| 51 | ))->render(); |
| 52 | ?> |
| 53 | </div> |
| 54 | </div> |
| 55 | </div> |
| 56 | <div class="wf-options-controls-spacer"></div> |
| 57 | <?php |
| 58 | if (wfOnboardingController::shouldShowAttempt3()) { |
| 59 | echo wfView::create('onboarding/disabled-overlay')->render(); |
| 60 | echo wfView::create('onboarding/banner')->render(); |
| 61 | } |
| 62 | else if (wfConfig::get('touppPromptNeeded')) { |
| 63 | echo wfView::create('gdpr/disabled-overlay')->render(); |
| 64 | echo wfView::create('gdpr/banner')->render(); |
| 65 | } |
| 66 | ?> |
| 67 | <div class="wrap wordfence" id="wf-global-options"> |
| 68 | <div class="wf-container-fluid"> |
| 69 | <div class="wf-row"> |
| 70 | <div class="wf-col-xs-12"> |
| 71 | <div class="wp-header-end"></div> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div class="wf-row"> |
| 75 | <div class="<?php echo wfStyle::contentClasses(); ?>"> |
| 76 | <div id="waf-options" class="wf-fixed-tab-content"> |
| 77 | <?php |
| 78 | echo wfView::create('common/section-title', array( |
| 79 | 'title' => __('Wordfence Global Options', 'wordfence'), |
| 80 | 'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTIONS), |
| 81 | 'helpLabelHTML' => __('Learn more<span class="wf-hidden-xs"> about Global Options</span>', 'wordfence'), |
| 82 | 'showIcon' => true, |
| 83 | ))->render(); |
| 84 | ?> |
| 85 | <div class="wf-row"> |
| 86 | <div class="wf-col-xs-12"> |
| 87 | <div class="wf-block wf-active"> |
| 88 | <div class="wf-block-content"> |
| 89 | <ul class="wf-block-list"> |
| 90 | <li> |
| 91 | <ul class="wf-block-list wf-block-list-horizontal wf-block-list-nowrap wf-waf-coverage"> |
| 92 | <li> |
| 93 | <?php |
| 94 | echo wfView::create('common/status-detail', array( |
| 95 | 'id' => 'waf-coverage', |
| 96 | 'percentage' => $firewall->overallStatus(), |
| 97 | 'activeColor' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? '#ececec' : null /* automatic */), |
| 98 | 'title' => __('Firewall', 'wordfence'), |
| 99 | 'subtitle' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? __('WAF Currently in Learning Mode', 'wordfence') : __('Protection from known and emerging threats', 'wordfence')), |
| 100 | 'link' => wfPage::pageURL(wfPage::PAGE_FIREWALL_OPTIONS, wfPage::PAGE_DASHBOARD_OPTIONS), |
| 101 | 'linkLabel' => __('Manage Firewall', 'wordfence'), |
| 102 | 'statusTitle' => __('Firewall Status', 'wordfence'), |
| 103 | 'statusList' => $firewall->statusList(), |
| 104 | 'statusExtra' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? wfView::create('waf/status-tooltip-learning-mode')->render() : ''), |
| 105 | 'helpLink' => __('https://www.wordfence.com/help/dashboard/#dashboard-status', 'wordfence'), |
| 106 | ))->render(); |
| 107 | ?> |
| 108 | </li> |
| 109 | <li> |
| 110 | <?php |
| 111 | echo wfView::create('common/status-detail', array( |
| 112 | 'id' => 'wf-scanner-type', |
| 113 | 'percentage' => $scanner->scanTypeStatus(), |
| 114 | 'activeColor' => (!$scanner->isEnabled() ? '#ececec' : null /* automatic */), |
| 115 | 'title' => __('Scan', 'wordfence'), |
| 116 | 'subtitle' => __('Detection of security issues', 'wordfence'), |
| 117 | 'link' => wfPage::pageURL(wfPage::PAGE_SCAN_OPTIONS, wfPage::PAGE_DASHBOARD_OPTIONS), |
| 118 | 'linkLabel' => __('Manage Scan', 'wordfence'), |
| 119 | 'statusTitle' => __('Scan Status', 'wordfence'), |
| 120 | 'statusList' => $scanner->scanTypeStatusList(), |
| 121 | 'helpLink' => __('https://www.wordfence.com/help/dashboard/#dashboard-status', 'wordfence'), |
| 122 | ))->render(); |
| 123 | ?> |
| 124 | </li> |
| 125 | <li> |
| 126 | <?php if (wfConfig::get('hasKeyConflict')): ?> |
| 127 | <?php |
| 128 | echo wfView::create('common/status-critical', array( |
| 129 | 'id' => 'wf-premium-alert', |
| 130 | 'title' => __('Premium License Conflict', 'wordfence'), |
| 131 | 'subtitle' => __('License already in use', 'wordfence'), |
| 132 | 'link' => 'https://www.wordfence.com/gnl1manageConflict/manage-wordfence-api-keys/', |
| 133 | 'linkLabel' => __('Reset License', 'wordfence'), |
| 134 | 'linkNewWindow' => true, |
| 135 | ))->render(); |
| 136 | ?> |
| 137 | <?php elseif (wfConfig::get('keyType') == wfAPI::KEY_TYPE_PAID_EXPIRED): ?> |
| 138 | <?php |
| 139 | echo wfView::create('common/status-critical', array( |
| 140 | 'id' => 'wf-premium-alert', |
| 141 | 'title' => __('Premium Protection Disabled', 'wordfence'), |
| 142 | 'subtitle' => __('License is expired', 'wordfence'), |
| 143 | 'link' => 'https://www.wordfence.com/gnl1renewExpired/manage-wordfence-api-keys/', |
| 144 | 'linkLabel' => __('Renew License', 'wordfence'), |
| 145 | 'linkNewWindow' => true, |
| 146 | ))->render(); |
| 147 | ?> |
| 148 | <?php elseif (wfConfig::get('keyType') == wfAPI::KEY_TYPE_FREE || wfConfig::get('keyType') === false): ?> |
| 149 | <div> |
| 150 | <p><h3><?php _e('Premium Protection Disabled', 'wordfence'); ?></h3></p> |
| 151 | <p><?php printf(__('As a free Wordfence user, you are currently using the Community version of the Threat Defense Feed. Premium users are protected by an additional %d firewall rules and malware signatures. Upgrade to Premium today to improve your protection.', 'wordfence'), ($d->tdfPremium - $d->tdfCommunity)); ?></p> |
| 152 | <p><a class="wf-btn wf-btn-primary wf-btn-callout-subtle" href="https://www.wordfence.com/gnl1dashboardUpgrade/wordfence-signup/#premium-order-form" target="_blank" rel="noopener noreferrer"><?php _e('Upgrade to Premium', 'wordfence'); ?></a> <a class="wf-btn wf-btn-callout-subtle wf-btn-default" href="https://www.wordfence.com/gnl1dashboardLearn/wordfence-signup/" target="_blank" rel="noopener noreferrer"><?php _e('Learn More', 'wordfence'); ?></a></p> |
| 153 | </div> |
| 154 | <?php elseif (wfConfig::get('keyExpDays') < 30 && (wfConfig::get('premiumAutoRenew', null) === '0' || wfConfig::get('premiumAutoRenew', null) === 0)): ?> |
| 155 | <?php |
| 156 | echo wfView::create('common/status-critical', array( |
| 157 | 'id' => 'wf-premium-alert', |
| 158 | 'title' => __('Premium License Expiring', 'wordfence'), |
| 159 | 'subtitle' => __('Auto-renew is disabled', 'wordfence'), |
| 160 | 'link' => 'https://www.wordfence.com/gnl1renewExpiring/manage-wordfence-api-keys/', |
| 161 | 'linkLabel' => __('Renew License', 'wordfence'), |
| 162 | 'linkNewWindow' => true, |
| 163 | ))->render(); |
| 164 | ?> |
| 165 | <?php elseif (wfConfig::get('keyExpDays') < 30): ?> |
| 166 | <?php |
| 167 | if (wfConfig::get('premiumPaymentExpiring')) { |
| 168 | $title = __('Payment Method Expiring', 'wordfence'); |
| 169 | } |
| 170 | else if (wfConfig::get('premiumPaymentExpired')) { |
| 171 | $title = __('Payment Method Expired', 'wordfence'); |
| 172 | } |
| 173 | else if (wfConfig::get('premiumPaymentMissing')) { |
| 174 | $title = __('Payment Method Missing', 'wordfence'); |
| 175 | } |
| 176 | else if (wfConfig::get('premiumPaymentHold')) { |
| 177 | $title = __('Payment Method Invalid', 'wordfence'); |
| 178 | } |
| 179 | |
| 180 | if (isset($title)) { |
| 181 | $days = floor(((int) wfConfig::get('premiumNextRenew') - time()) / 86400); |
| 182 | if ($days <= 0) { |
| 183 | $days = __('today', 'wordfence'); |
| 184 | } |
| 185 | else if ($days == 1) { |
| 186 | $days = __('tomorrow', 'wordfence'); |
| 187 | } |
| 188 | else { |
| 189 | $days = sprintf(__('in %d days', 'wordfence'), $days); |
| 190 | } |
| 191 | |
| 192 | echo wfView::create('dashboard/status-payment-expiring', array( |
| 193 | 'id' => 'wf-premium-alert', |
| 194 | 'title' => $title, |
| 195 | 'subtitle' => sprintf(__('License renews %s', 'wordfence'), $days), |
| 196 | 'link' => 'https://www.wordfence.com/gnl1renewExpiring/manage-wordfence-api-keys/', |
| 197 | 'linkLabel' => __('Update Payment Method', 'wordfence'), |
| 198 | 'linkNewWindow' => true, |
| 199 | ))->render(); |
| 200 | } |
| 201 | else { |
| 202 | $days = floor(((int) wfConfig::get('premiumNextRenew') - time()) / 86400); |
| 203 | if ($days == 0) { |
| 204 | $days = __('today', 'wordfence'); |
| 205 | } |
| 206 | else if ($days == 1) { |
| 207 | $days = __('in 1 day', 'wordfence'); |
| 208 | } |
| 209 | else { |
| 210 | $days = sprintf(__('in %d days', 'wordfence'), $days); |
| 211 | } |
| 212 | |
| 213 | echo wfView::create('dashboard/status-renewing', array( |
| 214 | 'id' => 'wf-premium-alert', |
| 215 | 'title' => __('Premium License Expiring', 'wordfence'), |
| 216 | 'subtitle' => sprintf(__('License renews %s', 'wordfence'), $days), |
| 217 | 'link' => 'https://www.wordfence.com/gnl1reviewExpiring/manage-wordfence-api-keys/', |
| 218 | 'linkLabel' => __('Review Payment Method', 'wordfence'), |
| 219 | 'linkNewWindow' => true, |
| 220 | ))->render(); |
| 221 | } |
| 222 | ?> |
| 223 | <?php elseif (wfConfig::get('keyType') == wfAPI::KEY_TYPE_PAID_CURRENT): ?> |
| 224 | <div class="wf-block-labeled-value wf-protection-status wf-protection-status-<?php echo esc_attr($firewall->ruleMode()); ?>"> |
| 225 | <div class="wf-block-labeled-value-value"><i class="wf-fa wf-fa-check" aria-hidden="true"></i></div> |
| 226 | <div class="wf-block-labeled-value-label"><?php _e('Wordfence Premium Enabled', 'wordfence'); ?></div> |
| 227 | </div> |
| 228 | <?php endif; ?> |
| 229 | </li> |
| 230 | </ul> |
| 231 | </li> |
| 232 | </ul> |
| 233 | </div> |
| 234 | </div> |
| 235 | </div> |
| 236 | </div> |
| 237 | <?php |
| 238 | echo wfView::create('dashboard/options-group-license', array( |
| 239 | 'stateKey' => 'global-options-license', |
| 240 | ))->render(); |
| 241 | |
| 242 | echo wfView::create('dashboard/options-group-view-customization', array( |
| 243 | 'stateKey' => 'global-options-view-customization', |
| 244 | ))->render(); |
| 245 | |
| 246 | echo wfView::create('dashboard/options-group-general', array( |
| 247 | 'stateKey' => 'global-options-general', |
| 248 | ))->render(); |
| 249 | |
| 250 | echo wfView::create('dashboard/options-group-dashboard', array( |
| 251 | 'stateKey' => 'global-options-dashboard', |
| 252 | ))->render(); |
| 253 | |
| 254 | echo wfView::create('dashboard/options-group-alert', array( |
| 255 | 'stateKey' => 'global-options-alert', |
| 256 | ))->render(); |
| 257 | |
| 258 | echo wfView::create('dashboard/options-group-email-summary', array( |
| 259 | 'stateKey' => 'global-options-email-summary', |
| 260 | ))->render(); |
| 261 | ?> |
| 262 | <div class="wf-row"> |
| 263 | <div class="wf-col-xs-12"> |
| 264 | <div class="wf-block wf-always-active"> |
| 265 | <div class="wf-block-header"> |
| 266 | <div class="wf-block-header-content"> |
| 267 | <div class="wf-block-title"> |
| 268 | <strong><?php _e('Import/Export Options', 'wordfence'); ?></strong> |
| 269 | </div> |
| 270 | </div> |
| 271 | </div> |
| 272 | <div class="wf-block-content"> |
| 273 | <ul class="wf-block-list"> |
| 274 | <li> |
| 275 | <ul class="wf-flex-horizontal wf-flex-vertical-xs wf-flex-full-width wf-add-top wf-add-bottom"> |
| 276 | <li><?php _e('Importing and exporting of options has moved to the Tools page', 'wordfence'); ?></li> |
| 277 | <li class="wf-right wf-left-xs wf-padding-add-top-xs-small"> |
| 278 | <a href="<?php echo esc_url(network_admin_url('admin.php?page=WordfenceTools&subpage=importexport')); ?>" class="wf-btn wf-btn-primary wf-btn-callout-subtle" id="wf-export-options"><?php _e('Import/Export Options', 'wordfence'); ?></a> |
| 279 | </li> |
| 280 | </ul> |
| 281 | </li> |
| 282 | </ul> |
| 283 | </div> |
| 284 | </div> |
| 285 | </div> |
| 286 | </div> <!-- end import options --> |
| 287 | </div> <!-- end options block --> |
| 288 | </div> <!-- end content block --> |
| 289 | </div> <!-- end row --> |
| 290 | </div> <!-- end container --> |
| 291 | </div> |
| 292 |