Google Authenticator – WordPress Two Factor Authentication (2FA) - Version 5.3.19

Version Description

  • Google Authenticator-Two Factor Authentication (2FA) : Security : Giving users choice of two factor.
Download this release

Release Info

Developer cyberlord92
Plugin Icon 128x128 Google Authenticator – WordPress Two Factor Authentication (2FA)
Version 5.3.19
Comparing to
See all releases

Code changes from version 5.3.18 to 5.3.19

controllers/main_controller.php CHANGED
@@ -5,8 +5,11 @@
5
  $controller = $dirName . 'controllers'.DIRECTORY_SEPARATOR;
6
 
7
  include $controller . 'navbar.php';
8
-
9
- include $controller . 'tour-model.php';
 
 
 
10
 
11
  if( isset( $_GET[ 'page' ]))
12
  {
5
  $controller = $dirName . 'controllers'.DIRECTORY_SEPARATOR;
6
 
7
  include $controller . 'navbar.php';
8
+ include $controller . 'newtork_security_features.php';
9
+ if (!get_option('mo_wpns_2fa_with_network_security_popup_visible') && get_option('mo_wpns_2fa_with_network_security'))
10
+ {
11
+ include $controller . 'tour-model.php';
12
+ }
13
 
14
  if( isset( $_GET[ 'page' ]))
15
  {
controllers/navbar.php CHANGED
@@ -1,6 +1,19 @@
1
  <?php
2
 
3
  global $moWpnsUtility,$dirName;
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  if( isset( $_GET[ 'page' ])){
6
  $tab_count= get_site_option('mo2f_tab_count', 0);
1
  <?php
2
 
3
  global $moWpnsUtility,$dirName;
4
+ if(current_user_can( 'manage_options' ) && isset($_POST['option']))
5
+ {
6
+ switch(sanitize_text_field(wp_unslash($_POST['option'])))
7
+ {
8
+ case "mo_wpns_2fa_with_network_security":
9
+ $security_features = new Mo_2fa_security_features();
10
+ $security_features->wpns_2fa_with_network_security($_POST); break;
11
+
12
+ }
13
+ }
14
+ $network_security_features= get_option('mo_wpns_2fa_with_network_security') ? "checked" : "";
15
+
16
+
17
 
18
  if( isset( $_GET[ 'page' ])){
19
  $tab_count= get_site_option('mo2f_tab_count', 0);
controllers/newtork_security_features.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ global $dirName;
4
+ if(current_user_can( 'manage_options' ) && isset($_POST['mo_wpns_features']))
5
+ {
6
+ switch(sanitize_text_field(wp_unslash($_POST['mo_wpns_features'])))
7
+ {
8
+ case "mo_wpns_2fa_with_network_security":
9
+ $security_features = new Mo_2fa_security_features();
10
+ $security_features->wpns_2fa_with_network_security($_POST); break;
11
+ case "mo_wpns_2fa_features":
12
+ $security_features = new Mo_2fa_security_features();
13
+ $security_features->wpns_2fa_features_only(); break;
14
+
15
+
16
+ }
17
+ }
18
+
19
+
20
+ $network_security_features= get_option('mo_wpns_2fa_with_network_security') ? "checked" : "";
21
+
22
+
23
+
24
+ include $dirName . 'views'.DIRECTORY_SEPARATOR.'network_security_features.php';
handler/malware_scanner.php CHANGED
@@ -296,7 +296,6 @@ class Mo_wpns_Scan_Handler{
296
  $query="SELECT `option_value` from `".$wpdb->base_prefix."options` WHERE `option_name` = 'mo_stop_scan'";
297
  $stop_scan= $wpdb->get_results($query);
298
  $stop_scan_process=$stop_scan[0]->option_value;
299
- //error_log($iterat." == >". $stop_scan_process);
300
 
301
  if($stop_scan_process=="1"){
302
  update_option('mo_wpns_malware_scan_in_progress','COMPLETE');
296
  $query="SELECT `option_value` from `".$wpdb->base_prefix."options` WHERE `option_name` = 'mo_stop_scan'";
297
  $stop_scan= $wpdb->get_results($query);
298
  $stop_scan_process=$stop_scan[0]->option_value;
 
299
 
300
  if($stop_scan_process=="1"){
301
  update_option('mo_wpns_malware_scan_in_progress','COMPLETE');
handler/security_features ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ class
3
+ {
4
+
5
+ }
6
+ ?>
handler/security_features.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Mo_2fa_security_features
3
+ {
4
+ function wpns_2fa_features_only()
5
+ {
6
+ update_option( 'mo_wpns_2fa_with_network_security', 0);
7
+ update_option( 'mo_wpns_2fa_with_network_security_popup_visible', 0);
8
+ ?><script>window.location.href="admin.php?page=mo_2fa_two_fa";</script><?php
9
+
10
+ }
11
+
12
+ function wpns_2fa_with_network_security($postvalue)
13
+ {
14
+ $nonce= sanitize_text_field(wp_unslash($_POST['mo_security_features_nonce']));
15
+ if ( wp_verify_nonce( $nonce, 'mo_2fa_security_features_nonce' ) )
16
+ {
17
+ $enable_newtwork_security_features = isset($postvalue['mo_wpns_2fa_with_network_security']) ? true : false;
18
+
19
+ update_option( 'mo_wpns_2fa_with_network_security', $enable_newtwork_security_features);
20
+ update_option( 'mo_wpns_2fa_with_network_security_popup_visible', 0);
21
+
22
+ ?><script>window.location.href="admin.php?page=mo_2fa_two_fa";</script><?php
23
+
24
+ }
25
+ else
26
+ do_action('wpns_show_message',MoWpnsMessages::showMessage('NONCE_ERROR'),'ERROR');
27
+
28
+ }
29
+ }new Mo_2fa_security_features;
30
+ ?>
helper/messages.php CHANGED
@@ -31,6 +31,7 @@
31
  const DONOT_NOTIFY_ON_IP_BLOCKED = "Email notification is disabled for Admin.";
32
  const NOTIFY_ON_UNUSUAL_ACTIVITY = "Email notification is enabled for user for unusual activities.";
33
  const DONOT_NOTIFY_ON_UNUSUAL_ACTIVITY = "Email notification is disabled for user for unusual activities.";
 
34
 
35
  //registration security
36
  const DOMAIN_BLOCKING_ENABLED = "Blocking fake user registrations is Enabled.";
31
  const DONOT_NOTIFY_ON_IP_BLOCKED = "Email notification is disabled for Admin.";
32
  const NOTIFY_ON_UNUSUAL_ACTIVITY = "Email notification is enabled for user for unusual activities.";
33
  const DONOT_NOTIFY_ON_UNUSUAL_ACTIVITY = "Email notification is disabled for user for unusual activities.";
34
+ const NONCE_ERROR = "Nonce Error.";
35
 
36
  //registration security
37
  const DOMAIN_BLOCKING_ENABLED = "Blocking fake user registrations is Enabled.";
includes/css/style_settings.css CHANGED
@@ -1,3 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  .mo_wpns_help_title {
2
  font-size:17px;
3
  width:100%;
1
+
2
+ .mo_popup {
3
+ display: flex;
4
+ flex-flow: row wrap;
5
+ width:100%;
6
+ }
7
+ .mo_popup_div {
8
+ flex: 1;
9
+ padding: 0.5rem;
10
+ }
11
+ #mo_popup_id input[type="radio"] {
12
+ display: none;
13
+ &:not(:disabled) ~ label {
14
+ cursor: pointer;
15
+ }
16
+ &:disabled ~ label {
17
+ color: hsla(150, 5%, 75%, 1);
18
+ border-color: hsla(150, 5%, 75%, 1);
19
+ box-shadow: none;
20
+ cursor: not-allowed;
21
+ }
22
+ }
23
+ .mo_popup_lable {
24
+ height: 100%;
25
+ display: block;
26
+ background: white;
27
+ border: 2px solid #20b2aa;
28
+ border-radius: 20px;
29
+ padding: 1rem;
30
+ margin-bottom: 1rem;
31
+ /*//margin: 1rem;*/
32
+ text-align: center;
33
+ box-shadow: 0px 3px 10px -2px hsla(150, 5%, 65%, 0.5);
34
+ position: relative;
35
+ margin-top: 10px;
36
+ }
37
+
38
+ #mo_popup_id input[type="radio"]:checked + label {
39
+ background: #20b2aa;
40
+ color: hsla(215, 0%, 100%, 1);
41
+ &::after {
42
+ color: hsla(215, 5%, 25%, 1);
43
+ font-family: FontAwesome;
44
+ border: 2px solid hsla(150, 75%, 45%, 1);
45
+ content: "\f00c";
46
+ font-size: 24px;
47
+ position: absolute;
48
+ top: -25px;
49
+ left: 50%;
50
+ transform: translateX(-50%);
51
+ height: 50px;
52
+ width: 50px;
53
+ line-height: 50px;
54
+ text-align: center;
55
+ border-radius: 50%;
56
+ background: white;
57
+ box-shadow: 0px 2px 5px -2px hsla(0, 0%, 0%, 0.25);
58
+ }
59
+ }
60
+
61
+ #mo_popup_id input[type="radio"]#control_05:checked + label {
62
+ background: red;
63
+ border-color: red;
64
+ }
65
+
66
+
67
+ @media only screen and (max-width: 700px) {
68
+ section {
69
+ flex-direction: column;
70
+ }
71
+ }
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
  .mo_wpns_help_title {
88
  font-size:17px;
89
  width:100%;
miniorange_2_factor_settings.php CHANGED
@@ -3,13 +3,13 @@
3
  * Plugin Name: miniOrange 2 Factor Authentication
4
  * Plugin URI: https://miniorange.com
5
  * Description: This plugin provides various two-factor authentication methods as an additional layer of security after the default wordpress login. We Support Google/Authy/LastPass Authenticator, QR Code, Push Notification, Soft Token and Security Questions(KBA) for 1 User in the free version of the plugin.
6
- * Version: 5.3.18
7
  * Author: miniOrange
8
  * Author URI: https://miniorange.com
9
  * License: GPL2
10
  */
11
  define( 'MO_HOST_NAME', 'https://login.xecurify.com' );
12
- define( 'MO2F_VERSION', '5.3.18' );
13
  define( 'MO2F_TEST_MODE', false );
14
  class Miniorange_twoFactor{
15
 
@@ -97,12 +97,16 @@
97
  $day_weekly= (time()-get_option('weekly_dismiss'))/(60*60*24);
98
  $day_weekly = floor($day_weekly);
99
 
100
- if(!get_option('donot_show_infected_file_notice') && (get_option('mo_wpns_infected_files') != 0) && ($day_infected >= 1)){
101
- do_action('wpns_show_message',MoWpnsMessages::showMessage('INFECTED_FILE'),'CUSTOM_MESSAGE');
102
- }else if(!get_option('donot_show_new_plugin_theme_notice') && ($flag_plugin || $flag_theme)){
103
- do_action('wpns_show_message',MoWpnsMessages::showMessage('NEW_PLUGIN_THEME_CHECK'),'CUSTOM_MESSAGE');
104
- }else if(!get_option('donot_show_weekly_scan_notice') && ($days >= 7) && ($day_weekly >= 1)){
105
- do_action('wpns_show_message',MoWpnsMessages::showMessage('WEEKLY_SCAN_CHECK'),'CUSTOM_MESSAGE');
 
 
 
 
106
  }
107
  }
108
 
@@ -111,9 +115,13 @@
111
  $menu_slug = 'mo_2fa_two_fa';
112
 
113
  add_menu_page ( 'miniOrange 2-Factor' , 'miniOrange 2-Factor' , 'activate_plugins', $menu_slug , array( $this, 'mo_wpns'), plugin_dir_url(__FILE__) . 'includes/images/miniorange_icon.png' );
114
-
 
115
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Dashboard' ,'administrator','mo_2fa_dashboard' , array( $this, 'mo_wpns'));
 
116
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Two Factor' ,'administrator','mo_2fa_two_fa' , array( $this, 'mo_wpns'));
 
 
117
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Firewall' ,'administrator','mo_2fa_waf' , array( $this, 'mo_wpns'));
118
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Login and Spam' ,'administrator','mo_2fa_login_and_spam' , array( $this, 'mo_wpns'));
119
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Backup' ,'administrator','mo_2fa_backup' , array( $this, 'mo_wpns'));
@@ -123,6 +131,7 @@
123
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Reports' ,'administrator','mo_2fa_reports' , array( $this, 'mo_wpns'));
124
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Troubleshooting' ,'administrator','mo_2fa_troubleshooting' , array( $this, 'mo_wpns'));
125
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Account' ,'administrator','mo_2fa_account' , array( $this, 'mo_wpns'));
 
126
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Upgrade' ,'administrator','mo_2fa_upgrade' , array( $this, 'mo_wpns'));
127
  }
128
 
@@ -184,6 +193,13 @@
184
  add_option( 'mo2f_enforce_strong_passswords_for_accounts' ,'all');
185
  add_option('mo2f_scan_initialize',1);
186
  add_option( 'mo_wpns_last_scan_time', time());
 
 
 
 
 
 
 
187
  }
188
 
189
  function mo_wpns_deactivate()
@@ -251,6 +267,7 @@
251
  require('api/class-rba-attributes.php');
252
  require('api/class-two-factor-setup.php');
253
  require('handler/backup.php');
 
254
  require('handler/feedback_form.php');
255
  require('handler/recaptcha.php');
256
  require('handler/login.php');
3
  * Plugin Name: miniOrange 2 Factor Authentication
4
  * Plugin URI: https://miniorange.com
5
  * Description: This plugin provides various two-factor authentication methods as an additional layer of security after the default wordpress login. We Support Google/Authy/LastPass Authenticator, QR Code, Push Notification, Soft Token and Security Questions(KBA) for 1 User in the free version of the plugin.
6
+ * Version: 5.3.19
7
  * Author: miniOrange
8
  * Author URI: https://miniorange.com
9
  * License: GPL2
10
  */
11
  define( 'MO_HOST_NAME', 'https://login.xecurify.com' );
12
+ define( 'MO2F_VERSION', '5.3.19' );
13
  define( 'MO2F_TEST_MODE', false );
14
  class Miniorange_twoFactor{
15
 
97
  $day_weekly= (time()-get_option('weekly_dismiss'))/(60*60*24);
98
  $day_weekly = floor($day_weekly);
99
 
100
+
101
+ if(get_option('mo_wpns_2fa_with_network_security'))
102
+ {
103
+ if(!get_option('donot_show_infected_file_notice') && (get_option('mo_wpns_infected_files') != 0) && ($day_infected >= 1)){
104
+ do_action('wpns_show_message',MoWpnsMessages::showMessage('INFECTED_FILE'),'CUSTOM_MESSAGE');
105
+ }else if(!get_option('donot_show_new_plugin_theme_notice') && ($flag_plugin || $flag_theme)){
106
+ do_action('wpns_show_message',MoWpnsMessages::showMessage('NEW_PLUGIN_THEME_CHECK'),'CUSTOM_MESSAGE');
107
+ }else if(!get_option('donot_show_weekly_scan_notice') && ($days >= 7) && ($day_weekly >= 1)){
108
+ do_action('wpns_show_message',MoWpnsMessages::showMessage('WEEKLY_SCAN_CHECK'),'CUSTOM_MESSAGE');
109
+ }
110
  }
111
  }
112
 
115
  $menu_slug = 'mo_2fa_two_fa';
116
 
117
  add_menu_page ( 'miniOrange 2-Factor' , 'miniOrange 2-Factor' , 'activate_plugins', $menu_slug , array( $this, 'mo_wpns'), plugin_dir_url(__FILE__) . 'includes/images/miniorange_icon.png' );
118
+ if(get_option('mo_wpns_2fa_with_network_security'))
119
+ {
120
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Dashboard' ,'administrator','mo_2fa_dashboard' , array( $this, 'mo_wpns'));
121
+ }
122
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Two Factor' ,'administrator','mo_2fa_two_fa' , array( $this, 'mo_wpns'));
123
+ if(get_option('mo_wpns_2fa_with_network_security'))
124
+ {
125
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Firewall' ,'administrator','mo_2fa_waf' , array( $this, 'mo_wpns'));
126
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Login and Spam' ,'administrator','mo_2fa_login_and_spam' , array( $this, 'mo_wpns'));
127
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Backup' ,'administrator','mo_2fa_backup' , array( $this, 'mo_wpns'));
131
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Reports' ,'administrator','mo_2fa_reports' , array( $this, 'mo_wpns'));
132
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Troubleshooting' ,'administrator','mo_2fa_troubleshooting' , array( $this, 'mo_wpns'));
133
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Account' ,'administrator','mo_2fa_account' , array( $this, 'mo_wpns'));
134
+ }
135
  add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Upgrade' ,'administrator','mo_2fa_upgrade' , array( $this, 'mo_wpns'));
136
  }
137
 
193
  add_option( 'mo2f_enforce_strong_passswords_for_accounts' ,'all');
194
  add_option('mo2f_scan_initialize',1);
195
  add_option( 'mo_wpns_last_scan_time', time());
196
+ add_option( 'mo_wpns_2fa_with_network_security' , 1);
197
+ add_option( 'mo_wpns_2fa_with_network_security_popup_visible', 1);
198
+
199
+
200
+
201
+
202
+
203
  }
204
 
205
  function mo_wpns_deactivate()
267
  require('api/class-rba-attributes.php');
268
  require('api/class-two-factor-setup.php');
269
  require('handler/backup.php');
270
+ require('handler/security_features.php');
271
  require('handler/feedback_form.php');
272
  require('handler/recaptcha.php');
273
  require('handler/login.php');
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://miniorange.com/
6
  Requires at least: 3.0.1
7
  Tested up to: 5.3
8
  Requires PHP: 5.3.0
9
- Stable tag: 5.3.18
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -272,6 +272,9 @@ miniOrange authentication service has 15+ authentication methods.One time passco
272
 
273
  == Changelog ==
274
 
 
 
 
275
  = 5.3.18 =
276
  * Google Authenticator-Two Factor Authentication (2FA) : Anti-Virus and Firewall : Fix Scan.
277
 
@@ -718,6 +721,9 @@ More descriptive setup messages and UI changes.
718
 
719
  == Upgrade Notice ==
720
 
 
 
 
721
  = 5.3.18 =
722
  * Google Authenticator-Two Factor Authentication (2FA) : Anti-Virus and Firewall : Fix Scan.
723
 
6
  Requires at least: 3.0.1
7
  Tested up to: 5.3
8
  Requires PHP: 5.3.0
9
+ Stable tag: 5.3.19
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
272
 
273
  == Changelog ==
274
 
275
+ = 5.3.19 =
276
+ * Google Authenticator-Two Factor Authentication (2FA) : Security : Giving users choice of two factor.
277
+
278
  = 5.3.18 =
279
  * Google Authenticator-Two Factor Authentication (2FA) : Anti-Virus and Firewall : Fix Scan.
280
 
721
 
722
  == Upgrade Notice ==
723
 
724
+ = 5.3.19 =
725
+ * Google Authenticator-Two Factor Authentication (2FA) : Security : Giving users choice of two factor.
726
+
727
  = 5.3.18 =
728
  * Google Authenticator-Two Factor Authentication (2FA) : Anti-Virus and Firewall : Fix Scan.
729
 
uninstall.php CHANGED
@@ -93,6 +93,9 @@
93
  delete_site_option('mo2f_visit_backup');
94
  delete_site_option('mo2f_two_factor');
95
  delete_option('mo2f_scan_initialize');
 
 
 
96
 
97
 
98
  $users = get_users( array() );
93
  delete_site_option('mo2f_visit_backup');
94
  delete_site_option('mo2f_two_factor');
95
  delete_option('mo2f_scan_initialize');
96
+
97
+ delete_option('mo_wpns_2fa_with_network_security');
98
+ delete_option('mo_wpns_2fa_with_network_security_popup_visible');
99
 
100
 
101
  $users = get_users( array() );
views/navbar.php CHANGED
@@ -1,10 +1,13 @@
1
  <?php
 
2
 
3
  if($shw_feedback)
4
  do_action('wpns_show_message',MoWpnsMessages::showMessage('FEEDBACK'),'CUSTOM_MESSAGE');
5
- if(!$safe)
6
- do_action('wpns_show_message',MoWpnsMessages::showMessage('WHITELIST_SELF'),'CUSTOM_MESSAGE');
7
-
 
 
8
  echo'<div class="wrap">
9
  <div><img style="float:left;margin-top:5px;" src="'.$logo_url.'"></div>
10
  <h1>
@@ -12,7 +15,24 @@
12
  <a class="add-new-h2" href="'.$profile_url.'">Account</a>
13
  <a class="add-new-h2" href="'.$help_url.'">Troubleshooting</a>
14
  <a class="license-button add-new-h2" href="'.$license_url.'">Upgrade</a>
15
- <a class="license-button add-new-h2" id="restart-tour" href="#" style="top: inherit; right: 28px; position: absolute; background-color: lightblue;">Restart tour</a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  </h1>
17
  </div>';
18
  //check_is_curl_installed();
@@ -21,8 +41,14 @@
21
 
22
  <br>
23
  <div class="mo_flex-container">
24
- <?php echo '<a class="nav-tab '.($active_tab == 'mo_2fa_dashboard' ? 'nav-tab-active' : '').'" href="'.$dashboard_url .'">Dashboard</a>';
 
 
 
 
25
  echo '<a class="nav-tab '.($active_tab == 'mo_2fa_two_fa' ? 'nav-tab-active' : '').'" href="'.$two_fa .'">Two Factor</a>';
 
 
26
  if(get_site_option('mo_2f_switch_waf')){
27
  echo '<a id="mo_2fa_waf" class="nav-tab '.($active_tab == 'mo_2fa_waf' ? 'nav-tab-active' : '').'" href="'.$waf .'">Firewall</a>';
28
  }
@@ -43,7 +69,8 @@
43
  }
44
  if(get_site_option('mo_2f_switch_reports')){
45
  echo '<a id="report_tab" class="nav-tab '.($active_tab == 'mo_2fa_reports' ? 'nav-tab-active' : '').'" href="'.$reports_url .'">Reports</a>';
46
- }
 
47
  echo '<a class="nav-tab '.($active_tab == 'mo_2fa_upgrade' ? 'nav-tab-active' : '').'" href="'.$upgrade_url .'">Upgrade</a>';
48
  ?>
49
  </div>
1
  <?php
2
+ $security_features_nonce = wp_create_nonce('mo_2fa_security_features_nonce');
3
 
4
  if($shw_feedback)
5
  do_action('wpns_show_message',MoWpnsMessages::showMessage('FEEDBACK'),'CUSTOM_MESSAGE');
6
+ if(get_option('mo_wpns_2fa_with_network_security'))
7
+ {
8
+ if(!$safe)
9
+ do_action('wpns_show_message',MoWpnsMessages::showMessage('WHITELIST_SELF'),'CUSTOM_MESSAGE');
10
+ }
11
  echo'<div class="wrap">
12
  <div><img style="float:left;margin-top:5px;" src="'.$logo_url.'"></div>
13
  <h1>
15
  <a class="add-new-h2" href="'.$profile_url.'">Account</a>
16
  <a class="add-new-h2" href="'.$help_url.'">Troubleshooting</a>
17
  <a class="license-button add-new-h2" href="'.$license_url.'">Upgrade</a>
18
+ <a class="license-button add-new-h2" id="restart-tour" href="#" style="background-color: lightblue;">Restart tour</a>
19
+ <span style="text-align:right;">
20
+
21
+
22
+ <form id="mo_wpns_2fa_with_network_security" method="post" action="" style="margin-top: -2%; width: 25%; text-align: right; padding-left: 75%;">
23
+ <input type="hidden" name="mo_security_features_nonce" value="'.$security_features_nonce.'"/>
24
+
25
+ <input type="hidden" name="option" value="mo_wpns_2fa_with_network_security">
26
+
27
+ <label class="mo_wpns_switch">
28
+ <input type="checkbox" name="mo_wpns_2fa_with_network_security" '.$network_security_features.' onchange="document.getElementById(\'mo_wpns_2fa_with_network_security\').submit();">
29
+ <span class="mo_wpns_slider mo_wpns_round"></span>
30
+ </label><span>&nbsp;&nbsp;&nbsp;<i>2FA + Security Features</i></span>
31
+
32
+ </form>
33
+ </span>
34
+
35
+
36
  </h1>
37
  </div>';
38
  //check_is_curl_installed();
41
 
42
  <br>
43
  <div class="mo_flex-container">
44
+ <?php
45
+ if(get_option('mo_wpns_2fa_with_network_security'))
46
+ {
47
+ echo '<a class="nav-tab '.($active_tab == 'mo_2fa_dashboard' ? 'nav-tab-active' : '').'" href="'.$dashboard_url .'">Dashboard</a>';
48
+ }
49
  echo '<a class="nav-tab '.($active_tab == 'mo_2fa_two_fa' ? 'nav-tab-active' : '').'" href="'.$two_fa .'">Two Factor</a>';
50
+ if(get_option('mo_wpns_2fa_with_network_security'))
51
+ {
52
  if(get_site_option('mo_2f_switch_waf')){
53
  echo '<a id="mo_2fa_waf" class="nav-tab '.($active_tab == 'mo_2fa_waf' ? 'nav-tab-active' : '').'" href="'.$waf .'">Firewall</a>';
54
  }
69
  }
70
  if(get_site_option('mo_2f_switch_reports')){
71
  echo '<a id="report_tab" class="nav-tab '.($active_tab == 'mo_2fa_reports' ? 'nav-tab-active' : '').'" href="'.$reports_url .'">Reports</a>';
72
+ }
73
+ }
74
  echo '<a class="nav-tab '.($active_tab == 'mo_2fa_upgrade' ? 'nav-tab-active' : '').'" href="'.$upgrade_url .'">Upgrade</a>';
75
  ?>
76
  </div>
views/network_security_features.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $security_features_nonce = wp_create_nonce('mo_2fa_security_features_nonce');
3
+
4
+ if ( 'admin.php' == basename( $_SERVER['PHP_SELF'] ) )
5
+ {
6
+ if(get_option('mo_wpns_2fa_with_network_security_popup_visible')==1)
7
+ {
8
+ ?>
9
+ <div id="myModal" class="modal">
10
+
11
+ <div class="mo_wpns_divided_layout" style="margin-left: 13%;">
12
+ <div class="mo_wpns_setting_layout">
13
+
14
+ <h1 style="color: #20b2aa; font-size: x-large; text-align: center;">What are you looking for?</h1><br>
15
+ <hr>
16
+
17
+
18
+ <form id="mo_wpns_2fa_with_network_security" method="post" action="">
19
+ <div style="width: 100%;">
20
+ <h3>
21
+ <?php echo ' <input type="hidden" name="mo_security_features_nonce" value="'.$security_features_nonce.'"/>';?>
22
+
23
+ <input type="hidden" name="mo_wpns_2fa_with_network_security" value="on">
24
+ <div class="mo_popup" id="mo_popup_id">
25
+ <div class="mo_popup_div" id="mo_popup_div1" >
26
+ <input type="radio" class="mo_popup_radio" name="mo_wpns_features" id="nw_2fa" value="mo_wpns_2fa_with_network_security" checked >
27
+ <label for="nw_2fa" class="mo_popup_lable">
28
+ <p class="" style="font-size: 1.5em;">2-Factor + Website Security</p>
29
+ <p class="mo_popup_para">In which you will get 2FA with Web Application Firewall, Login Security, Malware Scanner, Encrypted Backup, Spam Protection and other security features.</p>
30
+ </label>
31
+ </div>
32
+ <div class="mo_popup_div" id="mo_popup_div2" >
33
+ <input type="radio" class="mo_popup_radio" name="mo_wpns_features" id="only_2fa" value="mo_wpns_2fa_features">
34
+ <label for="only_2fa" class="mo_popup_lable">
35
+ <p class="" style="font-size: 1.5em;">Just 2-Factor Authentication</p>
36
+ <p class="mo_popup_para">If you are looking for only 2-Factor Authentication and no other security features then please continue with this option.</p>
37
+ </label>
38
+ </div>
39
+ </div>
40
+ </h3>
41
+
42
+ <br>
43
+
44
+
45
+ <br>
46
+ <center>
47
+ <input type="submit" class="mo_wpns_button mo_wpns_button1" onchange="document.getElementById(\'mo_wpns_2fa_with_network_security\').submit();" value="Continue"></center>
48
+ </div>
49
+ </form>
50
+ </div>
51
+ </div>
52
+ </div>
53
+
54
+ <script>
55
+ var modal = document.getElementById("myModal");
56
+
57
+ var span = document.getElementsByClassName("close")[0];
58
+
59
+ window.onload = function() {
60
+ modal.style.display = "block";
61
+ }
62
+
63
+
64
+ </script>
65
+
66
+ <?php
67
+ }
68
+ }
69
+ ?>