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

Version Description

  • Google Authenticator-Two Factor Authentication (2FA , Two Factor) : Session issue fix for customers using Two Factor.
Download this release

Release Info

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

Code changes from version 5.4.1 to 5.4.3

handler/recaptcha.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class reCaptcha
4
  {
5
  function __construct()
6
  {
@@ -103,4 +103,4 @@
103
  }
104
 
105
  }
106
- new reCaptcha;
1
  <?php
2
 
3
+ class mo2f_ReCaptcha
4
  {
5
  function __construct()
6
  {
103
  }
104
 
105
  }
106
+ new mo2f_ReCaptcha;
handler/twofa/gaonprem.php CHANGED
@@ -100,7 +100,7 @@ class Google_auth_onpremise{
100
  );
101
  }
102
 
103
- function verifyCode($secret, $code,$discrepancy = 1, $currentTimeSlice = null)
104
  {
105
  global $Mo2fdbQueries;
106
  $response=array("status"=>'false');
@@ -114,6 +114,7 @@ class Google_auth_onpremise{
114
  for ($i = -$discrepancy; $i <= $discrepancy; ++$i) {
115
  $calculatedCode = $this->getCode($secret, $currentTimeSlice + $i);
116
  if ($this->timingSafeEquals($calculatedCode, $code)) {
 
117
  $response['status']='SUCCESS';
118
  return json_encode($response);
119
  }
100
  );
101
  }
102
 
103
+ function verifyCode($secret, $code,$discrepancy = 2, $currentTimeSlice = null)
104
  {
105
  global $Mo2fdbQueries;
106
  $response=array("status"=>'false');
114
  for ($i = -$discrepancy; $i <= $discrepancy; ++$i) {
115
  $calculatedCode = $this->getCode($secret, $currentTimeSlice + $i);
116
  if ($this->timingSafeEquals($calculatedCode, $code)) {
117
+ update_option('mo2f_time_slice', $i);
118
  $response['status']='SUCCESS';
119
  return json_encode($response);
120
  }
handler/twofa/two_fa_pass2login.php CHANGED
@@ -74,8 +74,8 @@ class Miniorange_Password_2Factor_Login {
74
  $email = $Mo2fdbQueries->get_user_detail( 'mo2f_user_email', $user->ID );
75
  $mo_2factor_user_registration_status = $Mo2fdbQueries->get_user_detail( 'mo_2factor_user_registration_status', $user->ID );
76
  $kba_configuration_status = $Mo2fdbQueries->get_user_detail( 'mo2f_SecurityQuestions_config_status', $user->ID );
77
-
78
- if(MO2F_IS_ONPREM and !empty(get_user_meta($user->ID,'currentMethod',true)))
79
  {
80
  $configuredMethod = get_user_meta($user->ID,'currentMethod',true);
81
  $mo2f_configured_2FA_method = empty($configuredMethod) ? 0 : 1;
74
  $email = $Mo2fdbQueries->get_user_detail( 'mo2f_user_email', $user->ID );
75
  $mo_2factor_user_registration_status = $Mo2fdbQueries->get_user_detail( 'mo_2factor_user_registration_status', $user->ID );
76
  $kba_configuration_status = $Mo2fdbQueries->get_user_detail( 'mo2f_SecurityQuestions_config_status', $user->ID );
77
+
78
+ if(MO2F_IS_ONPREM )
79
  {
80
  $configuredMethod = get_user_meta($user->ID,'currentMethod',true);
81
  $mo2f_configured_2FA_method = empty($configuredMethod) ? 0 : 1;
handler/twofa/two_fa_settings.php CHANGED
@@ -1614,6 +1614,7 @@ class Miniorange_Authentication {
1614
 
1615
  update_user_meta( $user->ID, 'mo2f_external_app_type', "Google Authenticator" );
1616
  mo2f_display_test_2fa_notification($user);
 
1617
 
1618
  } else {
1619
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "ERROR_DURING_PROCESS" ) );
@@ -2337,6 +2338,10 @@ class Miniorange_Authentication {
2337
 
2338
  delete_user_meta( $user->ID, 'test_2FA' );
2339
  delete_user_meta( $user->ID, 'configure_2FA' );
 
 
 
 
2340
  }
2341
  }
2342
 
1614
 
1615
  update_user_meta( $user->ID, 'mo2f_external_app_type', "Google Authenticator" );
1616
  mo2f_display_test_2fa_notification($user);
1617
+ unset($_SESSION['secret_ga']);
1618
 
1619
  } else {
1620
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "ERROR_DURING_PROCESS" ) );
2338
 
2339
  delete_user_meta( $user->ID, 'test_2FA' );
2340
  delete_user_meta( $user->ID, 'configure_2FA' );
2341
+
2342
+ if(isset($_SESSION['secret_ga'])){
2343
+ unset($_SESSION['secret_ga']);
2344
+ }
2345
  }
2346
  }
2347
 
handler/twofa/two_fa_utility.php CHANGED
@@ -114,7 +114,7 @@ class MO2f_Utility {
114
  public static function set_user_values( $user_session_id, $variable, $value){
115
  global $Mo2fdbQueries;
116
  $key = get_option( 'mo2f_encryption_key' );
117
- $data_option=get_option('mo2f_data_storage');
118
  if(empty($data_option)){
119
 
120
  //setting session
@@ -240,10 +240,10 @@ class MO2f_Utility {
240
  */
241
  public static function mo2f_retrieve_user_temp_values( $variable, $session_id = null ) {
242
  global $Mo2fdbQueries;
243
- $data_option=get_option('mo2f_data_storage');
244
  if(empty($data_option)){
245
  if ( isset( $_SESSION[ $variable ] ) && ! empty( $_SESSION[ $variable ] ) ) {
246
- update_option('mo2f_data_storage',"sessions");
247
  return $_SESSION[ $variable ];
248
  } else {
249
  // $key = get_option( 'mo2f_customer_token' );
@@ -270,7 +270,7 @@ class MO2f_Utility {
270
  $cookie_value = MO2f_Utility::mo2f_get_cookie_values( $variable );
271
  }
272
  if($cookie_value){
273
- update_option('mo2f_data_storage', "cookies");
274
  return $cookie_value;
275
  } else {
276
  $session_id = MO2f_Utility::decrypt_data( $session_id, $key );
@@ -278,7 +278,7 @@ class MO2f_Utility {
278
  if ( in_array( $variable, array( "mo2f_rba_status", "mo_2_factor_kba_questions" ) ) ) {
279
  $db_value = unserialize( $db_value );
280
  }
281
- update_option('mo2f_data_storage',"tables");
282
  return $db_value;
283
  }
284
  }
114
  public static function set_user_values( $user_session_id, $variable, $value){
115
  global $Mo2fdbQueries;
116
  $key = get_option( 'mo2f_encryption_key' );
117
+ $data_option=NULL;
118
  if(empty($data_option)){
119
 
120
  //setting session
240
  */
241
  public static function mo2f_retrieve_user_temp_values( $variable, $session_id = null ) {
242
  global $Mo2fdbQueries;
243
+ $data_option=NULL;
244
  if(empty($data_option)){
245
  if ( isset( $_SESSION[ $variable ] ) && ! empty( $_SESSION[ $variable ] ) ) {
246
+ //update_option('mo2f_data_storage',"sessions");
247
  return $_SESSION[ $variable ];
248
  } else {
249
  // $key = get_option( 'mo2f_customer_token' );
270
  $cookie_value = MO2f_Utility::mo2f_get_cookie_values( $variable );
271
  }
272
  if($cookie_value){
273
+ //update_option('mo2f_data_storage', "cookies");
274
  return $cookie_value;
275
  } else {
276
  $session_id = MO2f_Utility::decrypt_data( $session_id, $key );
278
  if ( in_array( $variable, array( "mo2f_rba_status", "mo_2_factor_kba_questions" ) ) ) {
279
  $db_value = unserialize( $db_value );
280
  }
281
+ //update_option('mo2f_data_storage',"tables");
282
  return $db_value;
283
  }
284
  }
helper/utility.php CHANGED
@@ -123,7 +123,7 @@ class MoWpnsUtility
123
  $error = new WP_Error();
124
  if(!empty($response))
125
  {
126
- if(!reCaptcha::recaptcha_verify($response))
127
  $error->add('recaptcha_error', __( '<strong>ERROR</strong> : Invalid Captcha. Please verify captcha again.'));
128
  else
129
  return true;
@@ -315,4 +315,4 @@ class MoWpnsUtility
315
 
316
  }
317
 
318
- }
123
  $error = new WP_Error();
124
  if(!empty($response))
125
  {
126
+ if(!mo2f_ReCaptcha::recaptcha_verify($response))
127
  $error->add('recaptcha_error', __( '<strong>ERROR</strong> : Invalid Captcha. Please verify captcha again.'));
128
  else
129
  return true;
315
 
316
  }
317
 
318
+ }
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.4.1
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.4.1' );
13
  define( 'MO2F_TEST_MODE', FALSE );
14
  define( 'MO2F_IS_ONPREM', get_option('is_onprem'));
15
  class Miniorange_twoFactor{
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.4.3
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.4.3' );
13
  define( 'MO2F_TEST_MODE', FALSE );
14
  define( 'MO2F_IS_ONPREM', get_option('is_onprem'));
15
  class Miniorange_twoFactor{
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://miniorange.com/
6
  Requires at least: 3.0.1
7
  Tested up to: 5.4
8
  Requires PHP: 5.3.0
9
- Stable tag: 5.4.1
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -84,6 +84,31 @@ If you are looking for OTP Verification of users during <b>Registration</b> then
84
  * File protection & strong password
85
 
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  <h4>Why do you need to register?</h4>
88
 
89
  miniOrange Two-factor Plugin uses miniOrange APIs to communicate between your WP and miniOrange. To keep this communication secure, we ask you to register and assign you API keys specific to your account. This way your account and users calls can be only accessed by API keys assigned to you.
@@ -272,6 +297,12 @@ miniOrange authentication service has 15+ authentication methods.One time passco
272
 
273
  == Changelog ==
274
 
 
 
 
 
 
 
275
  = 5.4.1 =
276
  * Google Authenticator-Two Factor Authentication (2FA) : Headers sent issue is security firewall.
277
 
@@ -750,8 +781,10 @@ More descriptive setup messages and UI changes.
750
 
751
  == Upgrade Notice ==
752
 
753
- = 5.4.1 =
754
- * Google Authenticator-Two Factor Authentication (2FA) : Headers sent issue is security firewall.
 
 
755
 
756
  = 5.4.0 =
757
  * Google Authenticator-Two Factor Authentication (2FA) : Two Factor FAQ Fix and OTP code convinence.
6
  Requires at least: 3.0.1
7
  Tested up to: 5.4
8
  Requires PHP: 5.3.0
9
+ Stable tag: 5.4.3
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
84
  * File protection & strong password
85
 
86
 
87
+ = Additional Features =
88
+ * **Complete Web Security suite to protect wordpress from any attacks**
89
+ * **Web Application Firewall (WAF) : Wordpress Firewall to protect your site**
90
+ * **OWASP TOP 10 Protection**
91
+ * **Login Protection : Spam and Login Protection**
92
+ * **Malware scanner: Detects any virus, malware and trojan**
93
+ * **Backup: Taking Encrypted Backup with local storage and cloud storage**
94
+ * **Two Factor Authentication : 2FA and MFA**
95
+ * **Limit Login Attempts to stop password guessing**
96
+ * **Realtime Global IP Blocing**
97
+ * **Limit Rate of Request : Protecting resources from any security hole exploit**
98
+ * **Crawler Detection and blocking**
99
+ * **Blocking IP and Attacks**
100
+ * **Country Blocking and Browser Blocking**
101
+ * **Brute Force Attacks prevention to stop password hack**
102
+ * **Captcha for Bot Detection**
103
+ * **Google Recaptcha**
104
+ * **Login Form Protection**
105
+ * **Registration Form Protection**
106
+ * **Integration with different plugin - Woo commerce, buddypress, ultimate member and others**
107
+ * **Reporting**
108
+ * **Audit Log**
109
+
110
+ Check all the features here: <a href="https://security.miniorange.com/" target="_blank">miniOrange Website</a>
111
+
112
  <h4>Why do you need to register?</h4>
113
 
114
  miniOrange Two-factor Plugin uses miniOrange APIs to communicate between your WP and miniOrange. To keep this communication secure, we ask you to register and assign you API keys specific to your account. This way your account and users calls can be only accessed by API keys assigned to you.
297
 
298
  == Changelog ==
299
 
300
+ = 5.4.3 =
301
+ * Google Authenticator-Two Factor Authentication (2FA , Two Factor) : Session issue fix for customers using Two Factor.
302
+
303
+ = 5.4.2 =
304
+ * Google Authenticator-Two Factor Authentication (2FA) : Warning for cloud customer moving to on-premise Two factor.
305
+
306
  = 5.4.1 =
307
  * Google Authenticator-Two Factor Authentication (2FA) : Headers sent issue is security firewall.
308
 
781
 
782
  == Upgrade Notice ==
783
 
784
+ = 5.4.3 =
785
+ * Google Authenticator-Two Factor Authentication (2FA) : Session issue fix for customers using Two Factor.
786
+ = 5.4.2 =
787
+ * Google Authenticator-Two Factor Authentication (2FA) : Warning for cloud customer moving to on-premise Two factor
788
 
789
  = 5.4.0 =
790
  * Google Authenticator-Two Factor Authentication (2FA) : Two Factor FAQ Fix and OTP code convinence.
views/twofa/setup_twofa.php CHANGED
@@ -141,6 +141,7 @@
141
 
142
  $premium_plan_methods_existing_user = array_chunk( array_merge( $standard_plan_existing_user, $premium_plan) , 3 );
143
  $premium_plan_methods_new_user = array_chunk( array_merge( $standard_plan_new_user, $premium_plan ), 3 );
 
144
  if(MO2F_IS_ONPREM)
145
  {
146
  $selectedMethod = get_user_meta($user->ID,'currentMethod',true);
@@ -152,12 +153,14 @@
152
  $selectedMethod = 'NONE';
153
  $testMethod = 'Not Configured';
154
  }
155
- $showOTP=FALSE;
156
  if($selectedMethod=="Google Authenticator"){
 
157
  include_once $mo2f_dirName . DIRECTORY_SEPARATOR. 'handler'.DIRECTORY_SEPARATOR. 'twofa' . DIRECTORY_SEPARATOR . 'gaonprem.php';
158
  $gauth_obj= new Google_auth_onpremise();
159
  $secret= $gauth_obj->mo_GAuth_get_secret($user->ID);
160
- $otpcode = $gauth_obj->getCode($secret, floor(time() / 30));
 
161
  $showOTP=TRUE;
162
  }
163
 
141
 
142
  $premium_plan_methods_existing_user = array_chunk( array_merge( $standard_plan_existing_user, $premium_plan) , 3 );
143
  $premium_plan_methods_new_user = array_chunk( array_merge( $standard_plan_new_user, $premium_plan ), 3 );
144
+ $showOTP=FALSE;
145
  if(MO2F_IS_ONPREM)
146
  {
147
  $selectedMethod = get_user_meta($user->ID,'currentMethod',true);
153
  $selectedMethod = 'NONE';
154
  $testMethod = 'Not Configured';
155
  }
156
+
157
  if($selectedMethod=="Google Authenticator"){
158
+ $currentTimeSlice = floor(time() / 30);
159
  include_once $mo2f_dirName . DIRECTORY_SEPARATOR. 'handler'.DIRECTORY_SEPARATOR. 'twofa' . DIRECTORY_SEPARATOR . 'gaonprem.php';
160
  $gauth_obj= new Google_auth_onpremise();
161
  $secret= $gauth_obj->mo_GAuth_get_secret($user->ID);
162
+ $i = get_option('mo2f_time_slice',0);
163
+ $otpcode = $gauth_obj->getCode($secret, $currentTimeSlice + $i);
164
  $showOTP=TRUE;
165
  }
166
 
views/twofa/two_fa_setup_notification.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  function mo2f_display_test_2fa_notification( $user ) {
4
- global $Mo2fdbQueries;
5
  $mo2f_configured_2FA_method = $Mo2fdbQueries->get_user_detail( 'mo2f_configured_2FA_method', $user->ID );
6
 
7
  if(MO2F_IS_ONPREM)
@@ -9,6 +9,17 @@ function mo2f_display_test_2fa_notification( $user ) {
9
 
10
  $mo2f_configured_2FA_method = get_user_meta($user->ID,'currentMethod',true);
11
  update_user_meta($user->ID,$mo2f_configured_2FA_method,1);
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  }
14
  ?>
@@ -24,11 +35,17 @@ function mo2f_display_test_2fa_notification( $user ) {
24
  </div>
25
  <div class="mo2f_modal-body">
26
  <p style="font-size:14px;"><b><?php echo $mo2f_configured_2FA_method; ?> </b> has been set as your 2-factor authentication method.
27
- <br><br>Please test the login flow once with 2nd factor in another browser or in an incognito window of the
28
- same browser to ensure you don't get locked out of your site.</p>
 
 
 
 
 
 
29
  </div>
30
  <div class="mo2f_modal-footer">
31
- <button type="button" id="test-methods-button" class="mo_wpsn_button mo_wpsn_button1" data-dismiss="modal">Got it!</button>
32
  </div>
33
  </center>
34
  </div>
@@ -42,6 +59,7 @@ function mo2f_display_test_2fa_notification( $user ) {
42
  });
43
  jQuery('#test-methods-button').click(function(){
44
  jQuery('#twoFAtestAlertModal').css('display', 'none');
 
45
  });
46
  </script>
47
  <?php }
1
  <?php
2
 
3
  function mo2f_display_test_2fa_notification( $user ) {
4
+ global $Mo2fdbQueries, $mo2f_dirName;
5
  $mo2f_configured_2FA_method = $Mo2fdbQueries->get_user_detail( 'mo2f_configured_2FA_method', $user->ID );
6
 
7
  if(MO2F_IS_ONPREM)
9
 
10
  $mo2f_configured_2FA_method = get_user_meta($user->ID,'currentMethod',true);
11
  update_user_meta($user->ID,$mo2f_configured_2FA_method,1);
12
+ if($mo2f_configured_2FA_method == 'Google Authenticator'){
13
+ $currentTimeSlice = floor(time() / 30);
14
+ $code_array = array();
15
+ include_once $mo2f_dirName . DIRECTORY_SEPARATOR. 'handler'.DIRECTORY_SEPARATOR. 'twofa' . DIRECTORY_SEPARATOR . 'gaonprem.php';
16
+ $gauth_obj= new Google_auth_onpremise();
17
+ $secret= $gauth_obj->mo_GAuth_get_secret($user->ID);
18
+ for ($i = -2; $i <= 2; ++$i) {
19
+ $calculatedCode = $gauth_obj->getCode($secret, $currentTimeSlice + $i);
20
+ array_push($code_array, $calculatedCode);
21
+ }
22
+ }
23
 
24
  }
25
  ?>
35
  </div>
36
  <div class="mo2f_modal-body">
37
  <p style="font-size:14px;"><b><?php echo $mo2f_configured_2FA_method; ?> </b> has been set as your 2-factor authentication method.
38
+ <br>
39
+ <?php if($mo2f_configured_2FA_method == 'Google Authenticator' && MO2F_IS_ONPREM){ ?>
40
+ <p><b>Current valid OTPs for Google Authenticator</b></p>
41
+ <table cellspacing="10">
42
+ <tr><td><?php echo $code_array[0]; ?></td><td><?php echo $code_array[1]; ?></td><td><?php echo $code_array[2]; ?></td><td><?php echo $code_array[3]; ?></td><td><?php echo $code_array[4]; ?></td></tr>
43
+ </table>
44
+ <?php } ?>
45
+ <br>Please test the login flow once with 2nd factor in another browser or in an incognito window of the same browser to ensure you don't get locked out of your site.</p>
46
  </div>
47
  <div class="mo2f_modal-footer">
48
+ <button type="button" id="test-methods-button" class="mo_wpsn_button mo_wpsn_button1" data-dismiss="modal">Test it!</button>
49
  </div>
50
  </center>
51
  </div>
59
  });
60
  jQuery('#test-methods-button').click(function(){
61
  jQuery('#twoFAtestAlertModal').css('display', 'none');
62
+ testAuthenticationMethod('<?php echo $mo2f_configured_2FA_method; ?>');
63
  });
64
  </script>
65
  <?php }
views/upgrade.php CHANGED
@@ -4,438 +4,137 @@
4
  $is_NC = get_option( 'mo2f_is_NC' );
5
 
6
  $is_customer_registered = $Mo2fdbQueries->get_user_detail( 'user_registration_with_miniorange', $user->ID ) == 'SUCCESS' ? true : false;
7
- $noOfUsers= MO2F_VERSION ? "3" : "1";
8
- $mo2f_feature_set = array(
9
- "Authentication Methods",
10
- "No. of Users",
11
- "Language Translation Support",
12
- "Login with Username + password + 2FA",
13
- "Login with Username + 2FA (skip password)",
14
- "Backup Methods",
15
- "Multi-Site Support",
16
- "User role based redirection after Login",
17
- "Add custom Security Questions (KBA)",
18
- "Customize account name in Google Authenticator app",
19
- "Brute Force Protection",
20
- "Blocking IP",
21
- "Monitoring",
22
- "Strong Password",
23
- "File Protection",
24
- "Enable 2FA for specific User Roles",
25
- "Enable 2FA for specific Users",
26
- "Choose specific authentication methods for Users",
27
- "Prompt for 2FA Registration for Users at login",
28
- "One Time Email Verification for Users during 2FA Registration",
29
- "Enable Security Questions as backup for Users during 2FA registration",
30
- "App Specific Password to login from mobile Apps",
31
- "Support"
32
- );
33
-
34
-
35
- $two_factor_methods = array(
36
- "miniOrange QR Code Authentication",
37
- "miniOrange Soft Token",
38
- "miniOrange Push Notification",
39
- "Google Authenticator",
40
- "Security Questions",
41
- "Authy Authenticator",
42
- "Email Verification",
43
- "OTP Over SMS",
44
- "OTP Over Email",
45
- "OTP Over SMS and Email",
46
- "Hardware Token"
47
- );
48
-
49
- $two_factor_methods_EC = array_slice( $two_factor_methods, 0, 7 );
50
-
51
- $mo2f_feature_set_with_plans_NC = array(
52
- "Authentication Methods" => array(
53
- array_slice( $two_factor_methods, 0, 5 ),
54
- array_slice( $two_factor_methods, 0, 10 ),
55
- array_slice( $two_factor_methods, 0, 11 ),
56
- array_slice( $two_factor_methods, 0, 11 )
57
- ),
58
- "No. of Users" => array(
59
- $noOfUsers,
60
- "User Based Pricing",
61
- "User Based Pricing",
62
- "User Based Pricing"
63
- ),
64
- "Language Translation Support" => array( true, true, true, true ),
65
- "Login with Username + password + 2FA" => array( true, true, true, true ),
66
- "Login with Username + 2FA (skip password)" => array( false, true, true, true ),
67
- "Backup Methods" => array(
68
- false,
69
- "KBA",
70
- array( "KBA", "OTP Over Email", "Backup Codes" ),
71
- array( "KBA", "OTP Over Email", "Backup Codes" )
72
- ),
73
- "Multi-Site Support" => array( false, true, true, true ),
74
- "User role based redirection after Login" => array( false, true, true, true ),
75
- "Add custom Security Questions (KBA)" => array( false, true, true, true ),
76
- "Add custom Security Questions (KBA)" => array( false, true, true, true ),
77
- "Customize account name in Google Authenticator app" => array( false, true, true, true ),
78
- "Brute Force Protection" => array( true, false, false, true ),
79
- "Blocking IP" => array( true, false, false, true ),
80
- "Monitoring" => array( true, false, false, true ),
81
- "Strong Password" => array( true, false, false, true ),
82
- "File Protection" => array( true, false, false, true ),
83
- "Enable 2FA for specific User Roles" => array( false, false, true, true ),
84
- "Enable 2FA for specific Users" => array( false, false, true, true ),
85
- "Choose specific authentication methods for Users" => array( false, false, true, true ),
86
- "Prompt for 2FA Registration for Users at login" => array( false, false, true, true ),
87
- "One Time Email Verification for Users during 2FA Registration" => array( false, false, true, true ),
88
- "Enable Security Questions as backup for Users during 2FA registration" => array( false, false, true, true ),
89
- "App Specific Password to login from mobile Apps" => array( false, false, true, true ),
90
- "Support" => array(
91
- "Basic Support by Email",
92
- "Priority Support by Email",
93
- array( "Priority Support by Email", "Priority Support with GoTo meetings" ),
94
- array( "Priority Support by Email", "Priority Support with GoTo meetings" )
95
- ),
96
-
97
- );
98
-
99
- $mo2f_feature_set_with_plans_EC = array(
100
- "Authentication Methods" => array(
101
- array_slice( $two_factor_methods, 0, 8 ),
102
- array_slice( $two_factor_methods, 0, 10 ),
103
- array_slice( $two_factor_methods, 0, 11 ),
104
- array_slice( $two_factor_methods, 0, 11 )
105
- ),
106
- "No. of Users" => array(
107
- $noOfUsers,
108
- "User Based Pricing",
109
- "User Based Pricing",
110
- "User Based Pricing"
111
- ),
112
- "Language Translation Support" => array( true, true, true, true ),
113
- "Login with Username + password + 2FA" => array( true, true, true, true ),
114
- "Login with Username + 2FA (skip password)" => array( true, true, true, true ),
115
- "Backup Methods" => array(
116
- "KBA",
117
- "KBA",
118
- array( "KBA", "OTP Over Email", "Backup Codes" ),
119
- array( "KBA", "OTP Over Email", "Backup Codes" )
120
- ),
121
- "Multi-Site Support" => array( false, true, true, true ),
122
- "Brute Force Protection" => array( true, false, false, true ),
123
- "Blocking IP" => array( true, false, false, true ),
124
- "Monitoring" => array( true, false, false, true ),
125
- "Strong Password" => array( true, false, false, true ),
126
- "File Protection" => array( true, false, false, true ),
127
- "User role based redirection after Login" => array( false, true, true, true ),
128
- "Add custom Security Questions (KBA)" => array( false, true, true, true ),
129
- "Customize account name in Google Authenticator app" => array( false, true, true, true ),
130
- "Enable 2FA for specific User Roles" => array( false, false, true, true ),
131
- "Enable 2FA for specific Users" => array( false, false, true, true ),
132
- "Choose specific authentication methods for Users" => array( false, false, true, true ),
133
- "Prompt for 2FA Registration for Users at login" => array( false, false, true, true ),
134
- "One Time Email Verification for Users during 2FA Registration" => array( false, false, true, true ),
135
- "Enable Security Questions as backup for Users during 2FA registration" => array( false, false, true, true ),
136
- "App Specific Password to login from mobile Apps" => array( false, false, true, true ),
137
- "Support" => array(
138
- "Basic Support by Email",
139
- "Priority Support by Email",
140
- array( "Priority Support by Email", "Priority Support with GoTo meetings" ),
141
- array( "Priority Support by Email", "Priority Support with GoTo meetings" )
142
- ),
143
-
144
- );
145
-
146
- $mo2f_addons = array(
147
- "RBA & Trusted Devices Management Add-on",
148
- "Personalization Add-on",
149
- "Short Codes Add-on"
150
- );
151
- $mo2f_addons_plan_name = array(
152
- "RBA & Trusted Devices Management Add-on" => "wp_2fa_addon_rba",
153
- "Personalization Add-on" => "wp_2fa_addon_personalization",
154
- "Short Codes Add-on" => "wp_2fa_addon_shortcode"
155
- );
156
-
157
-
158
- $mo2f_addons_with_features = array(
159
- "Personalization Add-on" => array(
160
- "Custom UI of 2FA popups",
161
- "Custom Email and SMS Templates",
162
- "Customize 'powered by' Logo",
163
- "Customize Plugin Icon",
164
- "Customize Plugin Name",
165
 
166
- ),
167
- "RBA & Trusted Devices Management Add-on" => array(
168
- "Remember Device",
169
- "Set Device Limit for the users to login",
170
- "IP Restriction: Limit users to login from specific IPs"
171
- ),
172
- "Short Codes Add-on" => array(
173
- "Option to turn on/off 2-factor by user",
174
- "Option to configure the Google Authenticator and Security Questions by user",
175
- "Option to 'Enable Remember Device' from a custom login form",
176
- "On-Demand ShortCodes for specific fuctionalities ( like for enabling 2FA for specific pages)"
177
- )
178
- );
179
- ?>
180
- <br>
181
- <div class="mo2f_licensing_plans" style="border:0px;">
182
-
183
- <table class="table mo_table-bordered mo_table-striped">
184
- <thead>
185
- <tr class="mo2f_licensing_plans_tr">
186
- <th width="20%" >
187
- <h3>Features \ Plans</h3></th>
188
- <th class="text-center" width="20%" ><h3>Free</h3>
189
-
190
- <p class="mo2f_licensing_plans_plan_desc">Basic 2FA for Small Scale Web Businesses</p><br>
191
- <span style='color:red;font-size:18px;'>(Current Plan)</span>
192
- </th>
193
- <th class="text-center" width="20%" ><h3>Standard</h3>
194
-
195
- <p class="mo2f_licensing_plans_plan_desc">Intermediate 2FA for Medium Scale Web Businesses with
196
- basic support</p><span>
197
- <?php echo mo2f_yearly_standard_pricing(); ?>
198
-
199
- <?php echo mo2f_sms_cost();
200
- if( $is_customer_registered) {
201
  ?>
202
- <h4 class="mo2f_pricing_sub_header" style="padding-bottom:8px !important;"><button
203
- class="mo_wpns_button mo_wpns_button1" style="border: 1px solid;background-color: #7e73df;"
204
- onclick="mo2f_upgradeform('wp_2fa_basic_plan')" >Upgrade</button></h4>
205
  <?php }else{ ?>
206
 
207
- <h4 class="mo2f_pricing_sub_header" style="padding-bottom:8px !important;"><button
208
- class="mo_wpns_button mo_wpns_button1" style="border: 1px solid; background-color: #7e73df;"
209
- onclick="mo2f_register_and_upgradeform('wp_2fa_basic_plan')" >Upgrade</button></h4>
210
  <?php } ?>
211
- <br>
212
- </span></h3>
213
- </th>
214
-
215
- <th class="text-center" width="20%"><h3>Premium</h3>
216
-
217
- <p class="mo2f_licensing_plans_plan_desc" style="margin:16px 0 16px 0 ">Advanced and Intuitive
218
- 2FA for Large Scale Web businesses with enterprise-grade support</p><span>
219
- <?php echo mo2f_yearly_premium_pricing(); ?>
220
- <?php echo mo2f_sms_cost();
221
- if( $is_customer_registered) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  ?>
223
- <h4 class="mo2f_pricing_sub_header" style="padding-bottom:8px !important;"><button
224
- class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #7e73df;"
225
- onclick="mo2f_upgradeform('wp_2fa_premium_plan')" >Upgrade</button></h4>
226
  <?php }else{ ?>
227
 
228
- <h4 class="mo2f_pricing_sub_header" style="padding-bottom:8px !important;"><button
229
- class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #7e73df;"
230
- onclick="mo2f_register_and_upgradeform('wp_2fa_premium_plan')" >Upgrade</button></h4>
231
  <?php } ?>
232
- <br>
233
- </span>
234
- </th>
235
- <th class="text-center" width="25%">
236
- <h3>Enterprise</h3>
237
-
238
- <p class="mo2f_licensing_plans_plan_desc" style="margin:16px 0 16px 0;">One stop security solution with 2fa and Network security for Large Web businesses.</p><span>
239
- <?php
240
- if( $is_customer_registered) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  ?>
242
- <h4 class="mo2f_pricing_sub_header" style="padding-bottom:8px !important;"><button
243
- class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #7e73df;"
244
- onclick="mo2f_upgradeform('wp_2fa_enterprise_plan')" >Upgrade</button></h4>
245
  <?php }else{ ?>
246
-
247
- <h4 class="mo2f_pricing_sub_header" style="padding-bottom:8px !important;"><button
248
- class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #7e73df;"
249
- onclick="mo2f_register_and_upgradeform('wp_2fa_enterprise_plan')" >Upgrade</button></h4>
250
  <?php } ?>
251
- <br>
252
- </span>
253
- </th>
254
-
255
- </tr>
256
- </thead>
257
- <tbody class="mo_align-center mo-fa-icon">
258
- <?php for ( $i = 0; $i < count( $mo2f_feature_set ); $i ++ ) { ?>
259
- <tr>
260
- <td><?php
261
- $feature_set = $mo2f_feature_set[ $i ];
262
-
263
- echo $feature_set;
264
- ?>
265
- </td>
266
- <?php if ( $is_NC ) {
267
- $f_feature_set_with_plan = $mo2f_feature_set_with_plans_NC[ $feature_set ];
268
- } else {
269
- $f_feature_set_with_plan = $mo2f_feature_set_with_plans_EC[ $feature_set ];
270
- }
271
- ?>
272
- <td><?php
273
- if ( is_array( $f_feature_set_with_plan[0] ) ) {
274
- echo mo2f_create_li( $f_feature_set_with_plan[0] );
275
- } else {
276
- if ( gettype( $f_feature_set_with_plan[0] ) == "boolean" ) {
277
- echo mo2f_get_binary_equivalent( $f_feature_set_with_plan[0] );
278
- } else {
279
- echo $f_feature_set_with_plan[0];
280
- }
281
- } ?>
282
- </td>
283
- <td><?php
284
- if ( is_array( $f_feature_set_with_plan[1] ) ) {
285
- echo mo2f_create_li( $f_feature_set_with_plan[1] );
286
- } else {
287
- if ( gettype( $f_feature_set_with_plan[1] ) == "boolean" ) {
288
- echo mo2f_get_binary_equivalent( $f_feature_set_with_plan[1] );
289
- } else {
290
- echo $f_feature_set_with_plan[1];
291
- }
292
- } ?>
293
- </td>
294
- <td><?php
295
- if ( is_array( $f_feature_set_with_plan[2] ) ) {
296
- echo mo2f_create_li( $f_feature_set_with_plan[2] );
297
- } else {
298
- if ( gettype( $f_feature_set_with_plan[2] ) == "boolean" ) {
299
- echo mo2f_get_binary_equivalent( $f_feature_set_with_plan[2] );
300
- } else {
301
- echo $f_feature_set_with_plan[2];
302
- }
303
- } ?>
304
- </td>
305
- <td><?php
306
- if ( is_array( $f_feature_set_with_plan[3] ) ) {
307
- echo mo2f_create_li( $f_feature_set_with_plan[3] );
308
- } else {
309
- if ( gettype( $f_feature_set_with_plan[3] ) == "boolean" ) {
310
- echo mo2f_get_binary_equivalent( $f_feature_set_with_plan[3] );
311
- } else {
312
- echo $f_feature_set_with_plan[3];
313
- }
314
- } ?>
315
- </td>
316
- </tr>
317
- <?php } ?>
318
-
319
- <tr>
320
- <td><b>Add-Ons</b></td>
321
- <?php if ( $is_NC ) { ?>
322
- <td><b>Purchase Separately</b></td>
323
- <?php } else { ?>
324
- <td><b>NA</b></td>
325
- <?php } ?>
326
- <td><b>Purchase Separately</b></td>
327
- <td><b>Included</b></td>
328
- <td><b>Included</b></td>
329
- </tr>
330
- <?php for ( $i = 0; $i < count( $mo2f_addons ); $i ++ ) { ?>
331
- <tr>
332
- <td><?php echo $mo2f_addons[ $i ]; ?> <?php for ( $j = 0; $j < $i + 1; $j ++ ) { ?>*<?php } ?>
333
- </td>
334
- <?php if ( $is_NC ) { ?>
335
- <td>
336
- <button class="mo_wpns_button mo_wpns_button1" style="cursor:pointer"
337
- onclick="mo2f_upgradeform('<?php echo $mo2f_addons_plan_name[ $mo2f_addons[ $i ] ]; ?>')" <?php echo $is_customer_registered ? "" : " disabled " ?> >
338
- Purchase
339
- </button>
340
-
341
- </td>
342
- <?php } else { ?>
343
- <td><b>NA</b></td>
344
- <?php } ?>
345
- <td>
346
- <button class="mo_wpns_button mo_wpns_button1" style="cursor:pointer"
347
- onclick="mo2f_upgradeform('<?php echo $mo2f_addons_plan_name[ $mo2f_addons[ $i ] ]; ?>')" <?php echo $is_customer_registered ? "" : " disabled " ?> >
348
- Purchase
349
- </button>
350
- </td>
351
- <td><div style="color:#20b2aa;font-size: large;">✔</div></td>
352
- <td><div style="color:#20b2aa;font-size: large;">✔</div></td>
353
- </tr>
354
- <?php } ?>
355
-
356
- </tbody>
357
- </table>
358
- <br>
359
- <div style="padding:10px;">
360
- <?php for ( $i = 0; $i < count( $mo2f_addons ); $i ++ ) {
361
- $f_feature_set_of_addons = $mo2f_addons_with_features[ $mo2f_addons[ $i ] ];
362
- for ( $j = 0; $j < $i + 1; $j ++ ) { ?>*<?php } ?>
363
- <b><?php echo $mo2f_addons[ $i ]; ?> Features</b>
364
- <br>
365
- <ol>
366
- <?php for ( $k = 0; $k < count( $f_feature_set_of_addons ); $k ++ ) { ?>
367
- <li><?php echo $f_feature_set_of_addons[ $k ]; ?></li>
368
- <?php } ?>
369
- </ol>
370
-
371
- <hr><br>
372
- <?php } ?>
373
- <b>**** SMS Charges</b>
374
- <p><?php echo mo2f_lt( 'If you wish to choose OTP Over SMS / OTP Over SMS and Email as your authentication method,
375
- SMS transaction prices & SMS delivery charges apply and they depend on country. SMS validity is for lifetime.' ); ?></p>
376
- <hr>
377
- <br>
378
- <div>
379
- <h2>Note</h2>
380
- <ol class="mo2f_licensing_plans_ol">
381
- <li><?php echo mo2f_lt( 'The plugin works with many of the default custom login forms (like Woocommerce / Theme My Login), however if you face any issues with your custom login form, contact us and we will help you with it.' ); ?></li>
382
- </ol>
383
- </div>
384
-
385
- <br>
386
- <hr>
387
- <br>
388
- <div>
389
- <h2>Steps to upgrade to the Premium Plan</h2>
390
- <ol class="mo2f_licensing_plans_ol">
391
- <li><?php echo mo2f_lt( 'Click on \'Upgrade\' button of your preferred plan above.' ); ?></li>
392
- <li><?php echo mo2f_lt( ' You will be redirected to the miniOrange Console. Enter your miniOrange username and password, after which you will be redirected to the payment page.' ); ?></li>
393
-
394
- <li><?php echo mo2f_lt( 'Select the number of users you wish to upgrade for, and any add-ons if you wish to purchase, and make the payment.' ); ?></li>
395
- <li><?php echo mo2f_lt( 'After making the payment, you can find the Standard/Premium plugin to download from the \'License\' tab in the left navigation bar of the miniOrange Console.' ); ?></li>
396
- <li><?php echo mo2f_lt( 'Download the premium plugin from the miniOrange Console.' ); ?></li>
397
- <li><?php echo mo2f_lt( 'In the Wordpress dashboard, uninstall the free plugin and install the premium plugin downloaded.' ); ?></li>
398
- <li><?php echo mo2f_lt( 'Login to the premium plugin with the miniOrange account you used to make the payment, after this your users will be able to set up 2FA.' ); ?></li>
399
- </ol>
400
- </div>
401
- <div>
402
- <h2>Note</h2>
403
- <ul class="mo2f_licensing_plans_ol">
404
- <li><?php echo mo2f_lt( 'There is no license key required to activate the Standard/Premium Plugins. You will have to just login with the miniOrange Account you used to make the purchase.' ); ?></li>
405
- </ul>
406
- </div>
407
-
408
- <br>
409
- <hr>
410
- <br>
411
- <div>
412
- <h2>Refund Policy</h2>
413
- <p class="mo2f_licensing_plans_ol"><?php echo mo2f_lt( 'At miniOrange, we want to ensure you are 100% happy with your purchase. If the premium plugin you purchased is not working as advertised and you\'ve attempted to resolve any issues with our support team, which couldn\'t get resolved then we will refund the whole amount within 10 days of the purchase.' ); ?>
414
- </p>
415
- </div>
416
- <br>
417
- <hr>
418
- <br>
419
- <div>
420
- <h2>Privacy Policy</h2>
421
- <p class="mo2f_licensing_plans_ol"><a
422
- href="https://www.miniorange.com/2-factor-authentication-for-wordpress-gdpr">Click Here</a>
423
- to read our Privacy Policy.
424
- </p>
425
- </div>
426
- <br>
427
- <hr>
428
- <br>
429
- <div>
430
- <h2>Contact Us</h2>
431
- <p class="mo2f_licensing_plans_ol"><?php echo mo2f_lt( 'If you have any doubts regarding the licensing plans, you can mail us at' ); ?>
432
- <a href="mailto:info@xecurify.com"><i>info@xecurify.com</i></a> <?php echo mo2f_lt( 'or submit a query using the support form.' ); ?>
433
- </p>
434
- </div>
435
- <br>
436
- <hr>
437
- <br>
438
- <form class="mo2f_display_none_forms" id="mo2fa_loginform"
439
  action="<?php echo MO_HOST_NAME . '/moas/login'; ?>"
440
  target="_blank" method="post">
441
  <input type="email" name="username" value="<?php echo get_option( 'mo2f_email' ); ?>"/>
@@ -450,43 +149,69 @@
450
  <input type="hidden" name="mo2fa_register_to_upgrade_nonce"
451
  value="<?php echo wp_create_nonce( 'miniorange-2-factor-user-reg-to-upgrade-nonce' ); ?>"/>
452
  </form>
453
- <script>
454
 
455
- function mo2f_upgradeform(planType) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
456
  jQuery('#requestOrigin').val(planType);
457
  jQuery('#mo2fa_loginform').submit();
458
  }
459
 
460
- function mo2f_register_and_upgradeform(planType) {
461
  jQuery('#requestOrigin').val(planType);
462
  jQuery('input[name="requestOrigin"]').val(planType);
463
  jQuery('#mo2fa_register_to_upgrade_form').submit();
464
  }
465
- </script>
466
-
467
- <style>#mo2f_support_table {
468
- display: none;
469
- }
470
-
471
- </style>
472
- </div>
473
- </div>
474
-
475
  <?php
476
- function mo2f_create_li( $mo2f_array ) {
477
- $html_ol = '<ul>';
478
- foreach ( $mo2f_array as $element ) {
479
- $html_ol .= "<li>" . $element . "</li>";
480
- }
481
- $html_ol .= '</ul>';
482
-
483
- return $html_ol;
484
- }
485
- function mo2f_sms_cost() {
486
  ?>
487
- <p class="mo2f_pricing_text" id="mo2f_sms_cost"
488
- title="<?php echo mo2f_lt( '(Only applicable if OTP over SMS is your preferred authentication method.)' ); ?>"><?php echo mo2f_lt( 'SMS Cost' ); ?>
489
- ****<br/>
490
  <select id="mo2f_sms" class="form-control" style="border-radius:5px;width:200px;">
491
  <option><?php echo mo2f_lt( '$5 per 100 OTP + SMS delivery charges' ); ?></option>
492
  <option><?php echo mo2f_lt( '$15 per 500 OTP + SMS delivery charges' ); ?></option>
@@ -498,13 +223,10 @@ function mo2f_sms_cost() {
498
  </p>
499
  <?php
500
  }
501
-
502
-
503
- function mo2f_yearly_standard_pricing() {
504
  ?>
505
-
506
- <p class="mo2f_pricing_text"
507
- id="mo2f_yearly_sub"><?php echo __( 'Yearly Subscription Fees', 'miniorange-2-factor-authentication' ); ?>
508
 
509
  <select id="mo2f_yearly" class="form-control" style="border-radius:5px;width:200px;">
510
  <option> <?php echo mo2f_lt( '1 - 2 users - $5 per year' ); ?> </option>
@@ -516,19 +238,18 @@ function mo2f_yearly_standard_pricing() {
516
  <option> <?php echo mo2f_lt( '1001 - 5000 users - $299 per year' ); ?> </option>
517
  <option> <?php echo mo2f_lt( '5001 - 10000 users - $499 per year' ); ?></option>
518
  <option> <?php echo mo2f_lt( '10001 - 20000 users - $799 per year' ); ?> </option>
 
519
  </select>
520
  </p>
521
  <?php
522
  }
523
-
524
- function mo2f_yearly_premium_pricing() {
525
  ?>
526
-
527
- <p class="mo2f_pricing_text"
528
- id="mo2f_yearly_sub"><?php echo __( 'Yearly Subscription Fees', 'miniorange-2-factor-authentication' ); ?>
529
 
530
  <select id="mo2f_yearly" class="form-control" style="border-radius:5px;width:200px;">
531
- <option> <?php echo mo2f_lt( '1 - 5 users - $30 per year' ); ?> </option>
532
  <option> <?php echo mo2f_lt( '6 - 50 users - $99 per year' ); ?> </option>
533
  <option> <?php echo mo2f_lt( '51 - 100 users - $199 per year' ); ?> </option>
534
  <option> <?php echo mo2f_lt( '101 - 500 users - $349 per year' ); ?> </option>
@@ -536,18 +257,298 @@ function mo2f_yearly_premium_pricing() {
536
  <option> <?php echo mo2f_lt( '1001 - 5000 users - $799 per year' ); ?> </option>
537
  <option> <?php echo mo2f_lt( '5001 - 10000 users - $999 per year ' ); ?></option>
538
  <option> <?php echo mo2f_lt( '10001 - 20000 users - $1449 per year' ); ?> </option>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
539
  </select>
540
  </p>
541
  <?php
542
  }
543
- function mo2f_get_binary_equivalent( $mo2f_var ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
544
 
545
- switch ( $mo2f_var ) {
546
- case 1:
547
- return "<div style='color:#20b2aa;font-size: large;'>✔</div>";
548
- case 0:
549
- return "";
550
- default:
551
- return $mo2f_var;
552
- }
553
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  $is_NC = get_option( 'mo2f_is_NC' );
5
 
6
  $is_customer_registered = $Mo2fdbQueries->get_user_detail( 'user_registration_with_miniorange', $user->ID ) == 'SUCCESS' ? true : false;
7
+ ?>
8
+ <br><br>
9
+ <div style="width: 23%;min-height: 500px;background-color: white;float: left;border: 2px solid #6cd3cd;">
10
+ <div style="width: 100%;min-height: 350px; background-color: #6cd3cd;">
11
+ <div><center><h1 style="margin-top: 0%;padding: 10% 0% 0% 0%; color: white;font-size: 280%;">Free</h1><br><br>
12
+ <h1 style="color: #291283;">[ Current Plan ]</h1></center></div>
13
+ </div>
14
+ <center><br><br>
15
+ <h4>No. of User:- 1 <br>
16
+ Basic security features<br>
17
+ Five Authenticaton Methods<br>
18
+ Login with Username + password + 2FA<br>
19
+ </h4>
20
+ </center>
21
+ </div>
22
+ <div style="width: 1%;min-height: 500px;background-color: none;float: left;"></div>
23
+ <div style="width: 23%;min-height: 500px;background-color: white;float: left; border: 2px solid #4dbfb9;">
24
+ <div style="width: 100%;min-height: 350px; background-color: #4dbfb9;">
25
+ <div><center><h1 style="margin-top: 0%;padding: 10% 0% 0% 0%; color: white;font-size: 280%;">Standard</h1></center></div>
26
+ <center>
27
+ <h4 style="color: white;">Starting From</h4>
28
+ <h1 style="color: white;font-size: 400%;">$5</h1>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
+ <?php echo mo2f_yearly_standard_pricing_plan(); ?>
31
+ <?php echo mo2f_sms_cost1();?>
32
+ </center>
33
+
34
+ </div>
35
+ <?php if( $is_customer_registered) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  ?>
37
+ <button class="mo_wpns_button mo_wpns_button1" style="border: 1px solid;background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
38
+ onclick="mo2f_upgradeform1('wp_2fa_basic_plan')" >Upgrade</button>
 
39
  <?php }else{ ?>
40
 
41
+ <button class="mo_wpns_button mo_wpns_button1" style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
42
+ onclick="mo2f_register_and_upgradeform1('wp_2fa_basic_plan')" >Upgrade</button>
 
43
  <?php } ?>
44
+
45
+
46
+ <center>
47
+ <h4> Multi-Site Support<br>
48
+ Backup Methods [ KBA ]<br>
49
+ Additional Authentication Methods<br>
50
+ User role based redirection after Login
51
+ <br>
52
+
53
+ </h4>
54
+ </center>
55
+ </div>
56
+ <div style="width: 1%;min-height: 500px;background-color: none;float: left;"></div>
57
+ <div style="width: 23%;min-height: 500px;background-color: white;float: left;border: 2px solid #2ba29b;">
58
+ <div style="width: 100%;min-height: 350px; background-color: #2ba29b;">
59
+ <center>
60
+ <h1 style="margin-top: 0%;padding: 10% 0% 0% 0%; color: white;font-size: 280%;">Premium</h1>
61
+ </center>
62
+ <center>
63
+ <h4 style="color: white;">Starting From</h4>
64
+ <h1 style="color: white;font-size: 400%;">$30</h1>
65
+
66
+ <?php echo mo2f_yearly_premium_pricing_plan(); ?>
67
+ <?php echo mo2f_sms_cost1();?>
68
+ </center>
69
+ </div>
70
+ <?php if( $is_customer_registered) {
71
  ?>
72
+ <button
73
+ class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
74
+ onclick="mo2f_upgradeform1('wp_2fa_premium_plan')" >Upgrade</button>
75
  <?php }else{ ?>
76
 
77
+ <button
78
+ class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
79
+ onclick="mo2f_register_and_upgradeform1('wp_2fa_premium_plan')" >Upgrade</button>
80
  <?php } ?>
81
+
82
+ <center>
83
+ <h4>Multi-Site Support<br>
84
+ Additional 2FA methods<br>
85
+ Enable 2FA for specific User Roles<br>
86
+ Force Two Factor for users
87
+
88
+ </h4>
89
+ </center>
90
+
91
+
92
+ </div>
93
+ <div style="width: 1%;min-height: 500px;background-color: none;float: left;"></div>
94
+ <div style="width: 23%;min-height: 500px;background-color: white;float: left; border: 2px solid #198782;">
95
+ <div style="width: 100%;min-height: 350px; background-color: #198782;">
96
+ <center>
97
+ <h1 style="margin-top: 0%;padding: 10% 0% 0% 0%; color: white;font-size: 280%;">
98
+ Enterprise</h1>
99
+
100
+ <h4 style="color: white;">Starting From</h4>
101
+ <h1 style="color: white;font-size: 400%;">$59</h1>
102
+ <span style="color: white;font-size: 200%;line-height: 1;">+</span>
103
+ <?php echo mo2f_yearly_premium_pricing_plan(); ?>
104
+ <?php echo mo2f_sms_cost1();?>
105
+ </center>
106
+ </div>
107
+ <?php if( $is_customer_registered) {
108
  ?>
109
+ <button
110
+ class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
111
+ onclick="mo2f_upgradeform1('wp_2fa_enterprise_plan')" >Upgrade</button>
112
  <?php }else{ ?>
113
+ <button
114
+ class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
115
+ onclick="mo2f_register_and_upgradeform1('wp_2fa_enterprise_plan')" >Upgrade</button>
 
116
  <?php } ?>
117
+ <center>
118
+ <h4>Multi-Site Support<br>
119
+ Additional 2FA methods<br>
120
+ Security Features<br>
121
+ Login Protection, File Protection, Strong Passwords
122
+
123
+ <br>
124
+
125
+ </h4>
126
+ </center>
127
+
128
+ </div><div style="width: 1%;min-height: 500px;background-color: none;float: left;"></div>
129
+ <div style="width: 96%; min-height: 60px;background-color: white;float: left;border-bottom: 2px solid #2ba29b; text-align: center;">
130
+ <br>
131
+ <a id= "mo2f_show_features" style="color: #20b2aa;background-color: white; font-size: 250%;font-weight: 500;" onclick="mo2f_show_features()"><span style="font-size: 63%;"><u>Show more Features</u></span></a>
132
+ <a id= "mo2f_hide_features" style="color: #20b2aa;background-color: white; display: none; font-size: 250%;font-weight: 500;" onclick="mo2f_hide_features()"><span style="font-size: 63%;"><u>Hide Features</u></span>
133
+ </a>
134
+
135
+ </div>
136
+
137
+ <form class="mo2f_display_none_forms" id="mo2fa_loginform"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  action="<?php echo MO_HOST_NAME . '/moas/login'; ?>"
139
  target="_blank" method="post">
140
  <input type="email" name="username" value="<?php echo get_option( 'mo2f_email' ); ?>"/>
149
  <input type="hidden" name="mo2fa_register_to_upgrade_nonce"
150
  value="<?php echo wp_create_nonce( 'miniorange-2-factor-user-reg-to-upgrade-nonce' ); ?>"/>
151
  </form>
152
+
153
 
154
+ <script type="text/javascript">
155
+ var flag=1;flag1=1;
156
+ function mo2f_show_features()
157
+ {
158
+ jQuery("#mo2f_features_id").slideToggle();
159
+ if (flag)
160
+ {
161
+ document.getElementById("mo2f_hide_features").style.display = "block";
162
+ document.getElementById("mo2f_show_features").style.display = "none";
163
+ flag = 0;
164
+ }
165
+
166
+ }
167
+
168
+
169
+ function mo2f_hide_features()
170
+ {
171
+ jQuery("#mo2f_features_id").slideToggle();
172
+
173
+ if (flag == 0)
174
+ {
175
+ document.getElementById("mo2f_hide_features").style.display = "none";
176
+ document.getElementById("mo2f_show_features").style.display = "block";
177
+
178
+ flag = 1;
179
+ }
180
+
181
+ }
182
+
183
+
184
+ function mo2f_features()
185
+ {
186
+ document.getElementById("mo2f_visible").style.display = "block";
187
+ }
188
+ function mo2f_features_disable()
189
+ {
190
+ document.getElementById("mo2f_visible").style.display = "none";
191
+ document.getElementById("mo2f_features_id").style.display = "none";
192
+ }
193
+ function mo2f_upgradeform1(planType) {
194
  jQuery('#requestOrigin').val(planType);
195
  jQuery('#mo2fa_loginform').submit();
196
  }
197
 
198
+ function mo2f_register_and_upgradeform1(planType) {
199
  jQuery('#requestOrigin').val(planType);
200
  jQuery('input[name="requestOrigin"]').val(planType);
201
  jQuery('#mo2fa_register_to_upgrade_form').submit();
202
  }
203
+ </script>
204
+ <div id="mo2f_features_id" style="display: none; float: left;width: 96.6%;">
205
+ <?php
206
+ include $mo2f_dirName . 'views'.DIRECTORY_SEPARATOR.'upgrade_2fa.php';?>
207
+ </div>
208
+
 
 
 
 
209
  <?php
210
+ function mo2f_sms_cost1() {
 
 
 
 
 
 
 
 
 
211
  ?>
212
+ <p class="mo2f_pricing_text" id="mo2f_sms_cost1" style="color: white;"
213
+ title="<?php echo mo2f_lt( '(Only applicable if OTP over SMS is your preferred authentication method.)' ); ?>"><?php echo mo2f_lt( 'SMS + OTP Cost' ); ?>
214
+ <b style="color: black;">[optional]</b><br/>
215
  <select id="mo2f_sms" class="form-control" style="border-radius:5px;width:200px;">
216
  <option><?php echo mo2f_lt( '$5 per 100 OTP + SMS delivery charges' ); ?></option>
217
  <option><?php echo mo2f_lt( '$15 per 500 OTP + SMS delivery charges' ); ?></option>
223
  </p>
224
  <?php
225
  }
226
+ function mo2f_yearly_standard_pricing_plan() {
 
 
227
  ?>
228
+ <p class="mo2f_pricing_text" style="color: white;"
229
+ id="mo2f_yearly_sub"><?php echo __( 'Yearly Subscription Fees', 'miniorange-2-factor-authentication' ); ?><br>
 
230
 
231
  <select id="mo2f_yearly" class="form-control" style="border-radius:5px;width:200px;">
232
  <option> <?php echo mo2f_lt( '1 - 2 users - $5 per year' ); ?> </option>
238
  <option> <?php echo mo2f_lt( '1001 - 5000 users - $299 per year' ); ?> </option>
239
  <option> <?php echo mo2f_lt( '5001 - 10000 users - $499 per year' ); ?></option>
240
  <option> <?php echo mo2f_lt( '10001 - 20000 users - $799 per year' ); ?> </option>
241
+
242
  </select>
243
  </p>
244
  <?php
245
  }
246
+ function mo2f_yearly_premium_pricing_plan() {
 
247
  ?>
248
+ <p class="mo2f_pricing_text" style="color: white;"
249
+ id="mo2f_yearly_sub"><?php echo __( 'Yearly Subscription Fees', 'miniorange-2-factor-authentication' ); ?><br>
 
250
 
251
  <select id="mo2f_yearly" class="form-control" style="border-radius:5px;width:200px;">
252
+ <option> <?php echo mo2f_lt( '1 - 5 users - $30 per year' ); ?> </option>
253
  <option> <?php echo mo2f_lt( '6 - 50 users - $99 per year' ); ?> </option>
254
  <option> <?php echo mo2f_lt( '51 - 100 users - $199 per year' ); ?> </option>
255
  <option> <?php echo mo2f_lt( '101 - 500 users - $349 per year' ); ?> </option>
257
  <option> <?php echo mo2f_lt( '1001 - 5000 users - $799 per year' ); ?> </option>
258
  <option> <?php echo mo2f_lt( '5001 - 10000 users - $999 per year ' ); ?></option>
259
  <option> <?php echo mo2f_lt( '10001 - 20000 users - $1449 per year' ); ?> </option>
260
+
261
+ </select>
262
+ </p>
263
+ <?php
264
+ }
265
+ function mo2f_yearly_all_inclusive_pricing_plan() {
266
+ ?>
267
+ <p class="mo2f_pricing_text" style="color: white;"
268
+ id="mo2f_yearly_sub"><?php echo __( 'Yearly Subscription Fees', 'miniorange-2-factor-authentication' ); ?><br>
269
+
270
+ <select id="mo2f_yearly" class="form-control" style="border-radius:5px;width:200px;">
271
+ <option> <?php echo mo2f_lt( '1 site - $199 per year' ); ?> </option>
272
+ <option> <?php echo mo2f_lt( '2 sites - $329 per year' ); ?> </option>
273
+ <option> <?php echo mo2f_lt( '3-5 sites - $499 per year' ); ?> </option>
274
+ <option> <?php echo mo2f_lt( '6-10 sites - $599 per year' ); ?> </option>
275
+ <option> <?php echo mo2f_lt( '11-25 sites - $799 per year' ); ?> </option>
276
+ <option> <?php echo mo2f_lt( '25+ sites - Contact Us' ); ?> </option>
277
+
278
+ </select>
279
+ </p>
280
+ <?php
281
+ }
282
+ function mo2f_yearly_standard_pricing1() {
283
+ ?>
284
+ <p class="mo2f_pricing_text" style="color: white;"
285
+ id="mo2f_yearly_sub"><?php echo __( 'Yearly Subscription Fees', 'miniorange-2-factor-authentication' ); ?><br>
286
+
287
+ <select id="mo2f_yearly" class="form-control" style="border-radius:5px;width:200px;">
288
+ <option> <?php echo mo2f_lt( '1 site - $15 per year' ); ?> </option>
289
+ <option> <?php echo mo2f_lt( '5 sites - $35 per year' ); ?> </option>
290
+ <option> <?php echo mo2f_lt( '10 sites - $60 per year' ); ?> </option>
291
+
292
+ </select>
293
+ </p>
294
+ <?php
295
+ }
296
+ function mo2f_waf_yearly_standard_pricing() {
297
+ ?>
298
+ <p class="mo2f_pricing_text" style="color: white;"
299
+ id="mo2f_yearly_sub"><?php echo __( 'Yearly Subscription Fees', 'miniorange-2-factor-authentication' ); ?><br>
300
+
301
+ <select id="mo2f_yearly" class="form-control" style="border-radius:5px;width:200px;">
302
+ <option> <?php echo mo2f_lt( '1 site - $50 per year' ); ?> </option>
303
+ <option> <?php echo mo2f_lt( '5 sites - $100 per year' ); ?> </option>
304
+ <option> <?php echo mo2f_lt( '10 sites - $150 per year' ); ?> </option>
305
+
306
+ </select>
307
+ </p>
308
+ <?php
309
+ }
310
+ function mo2f_login_yearly_standard_pricing() {
311
+ ?>
312
+ <p class="mo2f_pricing_text" style="color: white;"
313
+ id="mo2f_yearly_sub"><?php echo __( 'Yearly Subscription Fees', 'miniorange-2-factor-authentication' ); ?><br>
314
+
315
+ <select id="mo2f_yearly" class="form-control" style="border-radius:5px;width:200px;">
316
+ <option> <?php echo mo2f_lt( '1 site - $15 per year' ); ?> </option>
317
+ <option> <?php echo mo2f_lt( '5 sites - $35 per year' ); ?> </option>
318
+ <option> <?php echo mo2f_lt( '10 sites - $60 per year' ); ?> </option>
319
+
320
+ </select>
321
+ </p>
322
+ <?php
323
+ }
324
+ function mo2f_backup_yearly_standard_pricing() {
325
+ ?>
326
+ <p class="mo2f_pricing_text" style="color: white;"
327
+ id="mo2f_yearly_sub"><?php echo __( 'Yearly Subscription Fees', 'miniorange-2-factor-authentication' ); ?><br>
328
+
329
+ <select id="mo2f_yearly" class="form-control" style="border-radius:5px;width:200px;">
330
+ <option> <?php echo mo2f_lt( '1 site - $30 per year' ); ?> </option>
331
+ <option> <?php echo mo2f_lt( '5 sites - $50 per year' ); ?> </option>
332
+ <option> <?php echo mo2f_lt( '10 sites - $70 per year' ); ?> </option>
333
+
334
+ </select>
335
+ </p>
336
+ <?php
337
+ }
338
+ function mo2f_scanner_yearly_standard_pricing() {
339
+ ?>
340
+ <p class="mo2f_pricing_text" style="color: white;"
341
+ id="mo2f_yearly_sub"><?php echo __( 'Yearly Subscription Fees', 'miniorange-2-factor-authentication' ); ?><br>
342
+
343
+ <select id="mo2f_yearly" class="form-control" style="border-radius:5px;width:200px;">
344
+ <option> <?php echo mo2f_lt( '1 site - $15 per year' ); ?> </option>
345
+ <option> <?php echo mo2f_lt( '5 sites - $35 per year' ); ?> </option>
346
+ <option> <?php echo mo2f_lt( '10 sites - $60 per year' ); ?> </option>
347
+
348
  </select>
349
  </p>
350
  <?php
351
  }
352
+ ?>
353
+ <?php ?>
354
+ <br><br>
355
+ <div style="width: 23%;min-height: 500px;background-color: white;float: left;margin-top: 5%;border: 2px solid #6cd3cd;">
356
+ <div style="width: 100%;min-height: 280px; background-color: #6cd3cd;">
357
+ <div>
358
+ <center>
359
+ <h1 style="margin-top: 0%;padding: 10% 0% 0% 0%; color: white;font-size: 280%;">WAF</h1></center></div>
360
+ <center>
361
+ <h4 style="color: white;">Starting From</h4>
362
+ <h1 style="color: white;font-size: 400%;">$50</h1>
363
+
364
+ <?php echo mo2f_waf_yearly_standard_pricing(); ?>
365
+
366
+ </center>
367
+ </div>
368
+ <?php if( $is_customer_registered) {
369
+ ?>
370
+ <button
371
+ class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
372
+ onclick="mo2f_upgradeform1('wp_security_waf_plan')" >Upgrade</button>
373
+ <?php }else{ ?>
374
+ <button
375
+ class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
376
+ onclick="mo2f_register_and_upgradeform1('wp_security_waf_plan')" >Upgrade</button>
377
+ <?php } ?>
378
+ <div><center><b>
379
+ <ul>
380
+ <li>Realtime IP Blocking</li>
381
+ <li>Live Traffic and Audit</li>
382
+ <li>IP Blocking and Whitelisting</li>
383
+ <li>OWASP TOP 10 Firewall Rules</li>
384
+ <li>Standard Rate Limiting/ DOS Protection</li>
385
+ <li><a onclick="wpns_pricing()">Know more</a></li>
386
+ </ul>
387
+ </b></center></div>
388
+ </div>
389
+ <div style="width: 1%;min-height: 500px;background-color: none;float: left;"></div>
390
+ <div style="width: 23%;min-height: 500px;background-color: white;float: left;margin-top: 5%;border: 2px solid #4dbfb9;">
391
+ <div style="width: 100%;min-height: 280px; background-color: #4dbfb9;">
392
+ <div>
393
+ <center>
394
+ <h1 style="margin-top: 0%;padding: 10% 0% 0% 0%; color: white;font-size: 280%;">Login and Spam</h1></center>
395
+ </div>
396
+ <center>
397
+ <h4 style="color: white;">Starting From</h4>
398
+ <h1 style="color: white;font-size: 400%;">$15</h1>
399
+
400
+ <?php echo mo2f_login_yearly_standard_pricing(); ?>
401
+
402
+ </center>
403
+
404
+ </div>
405
+ <?php if( $is_customer_registered) {
406
+ ?>
407
+ <button class="mo_wpns_button mo_wpns_button1" style="border: 1px solid;background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
408
+ onclick="mo2f_upgradeform1('wp_security_login_and_spam_plan')" >Upgrade</button>
409
+ <?php }else{ ?>
410
+
411
+ <button class="mo_wpns_button mo_wpns_button1" style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
412
+ onclick="mo2f_register_and_upgradeform1('wp_security_login_and_spam_plan')" >Upgrade</button>
413
+ <?php } ?>
414
+
415
+ <div><center><b>
416
+ <ul>
417
+ <li>Limit login Attempts</li>
418
+ <li>CAPTCHA on login</li>
419
+ <li>Blocking time period</li>
420
+ <li>Enforce Strong Password</li>
421
+ <li>SPAM Content and Comment Protection</li>
422
+ <li><a onclick="wpns_pricing()">Know more</a></li>
423
+ </ul>
424
+ </b></center></div>
425
+
426
+
427
+ </div>
428
+ <div style="width: 1%;min-height: 500px;background-color: none;float: left;"></div>
429
+ <div style="width: 23%;min-height: 500px;background-color: white;float: left;margin-top: 5%;border: 2px solid #2ba29b;">
430
+ <div style="width: 100%;min-height: 280px; background-color: #2ba29b;">
431
+ <center>
432
+ <h1 style="margin-top: 0%;padding: 10% 0% 0% 0%; color: white;font-size: 280%;">Malware Scanner</h1>
433
+
434
+ <h4 style="color: white;">Starting From</h4>
435
+ <h1 style="color: white;font-size: 400%;">$15</h1>
436
+
437
+ <?php echo mo2f_scanner_yearly_standard_pricing(); ?>
438
+
439
+ </center>
440
+ </div>
441
+ <?php if( $is_customer_registered) {
442
+ ?>
443
+ <button
444
+ class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
445
+ onclick="mo2f_upgradeform1('wp_security_malware_plan')" >Upgrade</button>
446
+ <?php }else{ ?>
447
 
448
+ <button
449
+ class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
450
+ onclick="mo2f_register_and_upgradeform1('wp_security_malware_plan')" >Upgrade</button>
451
+ <?php } ?>
452
+ <div><center><b>
453
+ <ul>
454
+ <li>Malware Detection</li>
455
+ <li>Blacklisted Domains</li>
456
+ <li>Action On Malicious Files</li>
457
+ <li>Repository Version Comparison</li>
458
+ <li>Detect any changes in the files</li>
459
+ <li><a onclick="wpns_pricing()">Know more</a></li>
460
+ </ul>
461
+ </b></center></div>
462
+
463
+ </div>
464
+ <div style="width: 1%;min-height: 500px;background-color: none;float: left;"></div>
465
+ <div style="width: 23%;min-height: 500px;background-color: white;float: left;margin-top: 5%;border: 2px solid #198782;">
466
+ <div style="width: 100%;min-height: 280px; background-color: #198782;">
467
+ <center>
468
+ <h1 style="margin-top: 0%;padding: 10% 0% 0% 0%; color: white;font-size: 280%;">Encrypted Backup</h1>
469
+
470
+ <h4 style="color: white;">Starting From</h4>
471
+ <h1 style="color: white;font-size: 400%;">$30</h1>
472
+
473
+ <?php echo mo2f_backup_yearly_standard_pricing(); ?>
474
+
475
+ </center>
476
+ </div>
477
+ <?php if( $is_customer_registered) {
478
+ ?>
479
+ <button
480
+ class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
481
+ onclick="mo2f_upgradeform1('wp_security_backup_plan')" >Upgrade</button>
482
+ <?php }else{ ?>
483
+ <button
484
+ class="mo_wpns_button mo_wpns_button1"style="border: 1px solid; background-color: #291283;padding: 5% 10% 5% 10%; margin-top: -25%;border-radius: 30%;margin-left: 30%;box-shadow: 5px 10px 18px #888888;"
485
+ onclick="mo2f_register_and_upgradeform1('wp_security_backup_plan')" >Upgrade</button>
486
+ <?php } ?>
487
+ <div><center><b>
488
+ <ul>
489
+ <li>Schedule Backup</li>
490
+ <li>Encrypted Backup</li>
491
+ <li>Files/Database Backup</li>
492
+ <li>Restore and Migration</li>
493
+ <li>Password Protected Zip files</li>
494
+ <li><a onclick="wpns_pricing()">Know more</a></li>
495
+ </ul>
496
+ </b></center></div>
497
+ </div>
498
+
499
+ <div style="float: left; background-color: white; min-height: 100px;width: 91.9%;margin-top: 4%;height: auto;padding: 2%; border: 2px solid #20b2aa;">
500
+ <div>
501
+ <h2>Steps to upgrade to the Premium Plan</h2>
502
+ <ol class="mo2f_licensing_plans_ol">
503
+ <li><?php echo mo2f_lt( 'Click on \'Upgrade\' button of your preferred plan above.' ); ?></li>
504
+ <li><?php echo mo2f_lt( ' You will be redirected to the miniOrange Console. Enter your miniOrange username and password, after which you will be redirected to the payment page.' ); ?></li>
505
+
506
+ <li><?php echo mo2f_lt( 'Select the number of users you wish to upgrade for, and any add-ons if you wish to purchase, and make the payment.' ); ?></li>
507
+ <li><?php echo mo2f_lt( 'After making the payment, you can find the Standard/Premium plugin to download from the \'License\' tab in the left navigation bar of the miniOrange Console.' ); ?></li>
508
+ <li><?php echo mo2f_lt( 'Download the premium plugin from the miniOrange Console.' ); ?></li>
509
+ <li><?php echo mo2f_lt( 'In the Wordpress dashboard, uninstall the free plugin and install the premium plugin downloaded.' ); ?></li>
510
+ <li><?php echo mo2f_lt( 'Login to the premium plugin with the miniOrange account you used to make the payment, after this your users will be able to set up 2FA.' ); ?></li>
511
+ </ol>
512
+ </div>
513
+ <div>
514
+ <h2>Note</h2>
515
+ <ul class="mo2f_licensing_plans_ol">
516
+ <li><?php echo mo2f_lt( 'There is no license key required to activate the Standard/Premium Plugins. You will have to just login with the miniOrange Account you used to make the purchase.' ); ?></li>
517
+ </ul>
518
+ </div>
519
+
520
+ <br>
521
+ <hr>
522
+ <br>
523
+ <div>
524
+ <h2>Refund Policy</h2>
525
+ <p class="mo2f_licensing_plans_ol"><?php echo mo2f_lt( 'At miniOrange, we want to ensure you are 100% happy with your purchase. If the premium plugin you purchased is not working as advertised and you\'ve attempted to resolve any issues with our support team, which couldn\'t get resolved then we will refund the whole amount within 10 days of the purchase.' ); ?>
526
+ </p>
527
+ </div>
528
+ <br>
529
+ <hr>
530
+ <br>
531
+ <div>
532
+ <h2>Privacy Policy</h2>
533
+ <p class="mo2f_licensing_plans_ol"><a
534
+ href="https://www.miniorange.com/2-factor-authentication-for-wordpress-gdpr">Click Here</a>
535
+ to read our Privacy Policy.
536
+ </p>
537
+ </div>
538
+ <br>
539
+ <hr>
540
+ <br>
541
+ <div>
542
+ <h2>Contact Us</h2>
543
+ <p class="mo2f_licensing_plans_ol"><?php echo mo2f_lt( 'If you have any doubts regarding the licensing plans, you can mail us at' ); ?>
544
+ <a href="mailto:info@xecurify.com"><i>info@xecurify.com</i></a> <?php echo mo2f_lt( 'or submit a query using the support form.' ); ?>
545
+ </p>
546
+ </div>
547
+ </div>
548
+ <script type="text/javascript">
549
+
550
+ function wpns_pricing()
551
+ {
552
+ window.open("https://security.miniorange.com/pricing/");
553
+ }
554
+ </script>
views/upgrade_2fa.php ADDED
@@ -0,0 +1,374 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $Mo2fdbQueries;
3
+ $user = wp_get_current_user();
4
+ $is_NC = get_option( 'mo2f_is_NC' );
5
+
6
+ $is_customer_registered = $Mo2fdbQueries->get_user_detail( 'user_registration_with_miniorange', $user->ID ) == 'SUCCESS' ? true : false;
7
+
8
+ $mo2f_feature_set = array(
9
+ "Authentication Methods",
10
+ "Language Translation Support",
11
+ "Login with Username + password + 2FA",
12
+ "Login with Username + 2FA (skip password)",
13
+ "Backup Methods",
14
+ "Multi-Site Support",
15
+ "User role based redirection after Login",
16
+ "Add custom Security Questions (KBA)",
17
+ "Customize account name in Google Authenticator app",
18
+ "Brute Force Protection",
19
+ "Blocking IP",
20
+ "Monitoring",
21
+ "Strong Password",
22
+ "File Protection",
23
+ "Enable 2FA for specific User Roles",
24
+ "Enable 2FA for specific Users",
25
+ "Choose specific authentication methods for Users",
26
+ "Force Two Factor for users",
27
+ "One Time Email Verification for Users during 2FA Registration",
28
+ "Enable Security Questions as backup for Users during 2FA registration",
29
+ "App Specific Password to login from mobile Apps",
30
+ "Support"
31
+ );
32
+
33
+
34
+ $two_factor_methods = array(
35
+ "miniOrange QR Code Authentication",
36
+ "miniOrange Soft Token",
37
+ "miniOrange Push Notification",
38
+ "Google Authenticator",
39
+ "Security Questions",
40
+ "Authy Authenticator",
41
+ "Email Verification",
42
+ "OTP Over SMS",
43
+ "OTP Over Email",
44
+ "OTP Over SMS and Email",
45
+ "Hardware Token"
46
+ );
47
+
48
+ $two_factor_methods_EC = array_slice( $two_factor_methods, 0, 7 );
49
+
50
+ $mo2f_feature_set_with_plans_NC = array(
51
+ "Authentication Methods" => array(
52
+ array_slice( $two_factor_methods, 0, 5 ),
53
+ array_slice( $two_factor_methods, 0, 10 ),
54
+ array_slice( $two_factor_methods, 0, 11 ),
55
+ array_slice( $two_factor_methods, 0, 11 )
56
+ ),
57
+
58
+
59
+ "Language Translation Support" => array( true, true, true, true ),
60
+ "Login with Username + password + 2FA" => array( true, true, true, true ),
61
+ "Login with Username + 2FA (skip password)" => array( false, true, true, true ),
62
+ "Backup Methods" => array(
63
+ false,
64
+ "KBA",
65
+ array( "KBA", "OTP Over Email", "Backup Codes" ),
66
+ array( "KBA", "OTP Over Email", "Backup Codes" )
67
+ ),
68
+ "Multi-Site Support" => array( false, true, true, true ),
69
+ "User role based redirection after Login" => array( false, true, true, true ),
70
+ "Add custom Security Questions (KBA)" => array( false, true, true, true ),
71
+ "Add custom Security Questions (KBA)" => array( false, true, true, true ),
72
+ "Customize account name in Google Authenticator app" => array( false, true, true, true ),
73
+ "Brute Force Protection" => array( true, false, false, true ),
74
+ "Blocking IP" => array( true, false, false, true ),
75
+ "Monitoring" => array( true, false, false, true ),
76
+ "Strong Password" => array( true, false, false, true ),
77
+ "File Protection" => array( true, false, false, true ),
78
+ "Enable 2FA for specific User Roles" => array( false, false, true, true ),
79
+ "Enable 2FA for specific Users" => array( false, false, true, true ),
80
+ "Choose specific authentication methods for Users" => array( false, false, true, true ),
81
+ "Force Two Factor for users" => array( false, false, true, true ),
82
+ "One Time Email Verification for Users during 2FA Registration" => array( false, false, true, true ),
83
+ "Enable Security Questions as backup for Users during 2FA registration" => array( false, false, true, true ),
84
+ "App Specific Password to login from mobile Apps" => array( false, false, true, true ),
85
+ "Support" => array(
86
+ "Basic Support by Email",
87
+ "Priority Support by Email",
88
+ array( "Priority Support by Email", "Priority Support with GoTo meetings" ),
89
+ array( "Priority Support by Email", "Priority Support with GoTo meetings" )
90
+ ),
91
+
92
+ );
93
+
94
+ $mo2f_feature_set_with_plans_EC = array(
95
+ "Authentication Methods" => array(
96
+ array_slice( $two_factor_methods, 0, 8 ),
97
+ array_slice( $two_factor_methods, 0, 10 ),
98
+ array_slice( $two_factor_methods, 0, 11 ),
99
+ array_slice( $two_factor_methods, 0, 11 )
100
+ ),
101
+
102
+ "Language Translation Support" => array( true, true, true, true ),
103
+ "Login with Username + password + 2FA" => array( true, true, true, true ),
104
+ "Login with Username + 2FA (skip password)" => array( true, true, true, true ),
105
+ "Backup Methods" => array(
106
+ "KBA",
107
+ "KBA",
108
+ array( "KBA", "OTP Over Email", "Backup Codes" ),
109
+ array( "KBA", "OTP Over Email", "Backup Codes" )
110
+ ),
111
+ "Multi-Site Support" => array( false, true, true, true ),
112
+ "Brute Force Protection" => array( true, false, false, true ),
113
+ "Blocking IP" => array( true, false, false, true ),
114
+ "Monitoring" => array( true, false, false, true ),
115
+ "Strong Password" => array( true, false, false, true ),
116
+ "File Protection" => array( true, false, false, true ),
117
+ "User role based redirection after Login" => array( false, true, true, true ),
118
+ "Add custom Security Questions (KBA)" => array( false, true, true, true ),
119
+ "Customize account name in Google Authenticator app" => array( false, true, true, true ),
120
+ "Enable 2FA for specific User Roles" => array( false, false, true, true ),
121
+ "Enable 2FA for specific Users" => array( false, false, true, true ),
122
+ "Choose specific authentication methods for Users" => array( false, false, true, true ),
123
+ "Force Two Factor for users" => array( false, false, true, true ),
124
+ "One Time Email Verification for Users during 2FA Registration" => array( false, false, true, true ),
125
+ "Enable Security Questions as backup for Users during 2FA registration" => array( false, false, true, true ),
126
+ "App Specific Password to login from mobile Apps" => array( false, false, true, true ),
127
+ "Support" => array(
128
+ "Basic Support by Email",
129
+ "Priority Support by Email",
130
+ array( "Priority Support by Email", "Priority Support with GoTo meetings" ),
131
+ array( "Priority Support by Email", "Priority Support with GoTo meetings" )
132
+ ),
133
+
134
+ );
135
+
136
+ $mo2f_addons = array(
137
+ "RBA & Trusted Devices Management Add-on",
138
+ "Personalization Add-on",
139
+ "Short Codes Add-on"
140
+ );
141
+ $mo2f_addons_plan_name = array(
142
+ "RBA & Trusted Devices Management Add-on" => "wp_2fa_addon_rba",
143
+ "Personalization Add-on" => "wp_2fa_addon_personalization",
144
+ "Short Codes Add-on" => "wp_2fa_addon_shortcode"
145
+ );
146
+
147
+
148
+ $mo2f_addons_with_features = array(
149
+ "Personalization Add-on" => array(
150
+ "Custom UI of 2FA popups",
151
+ "Custom Email and SMS Templates",
152
+ "Customize 'powered by' Logo",
153
+ "Customize Plugin Icon",
154
+ "Customize Plugin Name",
155
+
156
+ ),
157
+ "RBA & Trusted Devices Management Add-on" => array(
158
+ "Remember Device",
159
+ "Set Device Limit for the users to login",
160
+ "IP Restriction: Limit users to login from specific IPs"
161
+ ),
162
+ "Short Codes Add-on" => array(
163
+ "Option to turn on/off 2-factor by user",
164
+ "Option to configure the Google Authenticator and Security Questions by user",
165
+ "Option to 'Enable Remember Device' from a custom login form",
166
+ "On-Demand ShortCodes for specific fuctionalities ( like for enabling 2FA for specific pages)"
167
+ )
168
+ );
169
+ ?>
170
+ <div class="mo2f_licensing_plans" style="border:0px;">
171
+
172
+ <table class="table mo_table-bordered mo_table-striped">
173
+ <thead>
174
+ <tr>
175
+ <th style="background-color: #20b2aa;border: 2px solid #20b2aa;width: 21%;"><h1 style="color: white;">Features</h1></th>
176
+ <th style="background-color: #20b2aa;border: 2px solid #20b2aa;"><h1 style="color: white;">Free</h1></th>
177
+ <th style="background-color: #20b2aa;border: 2px solid #20b2aa;"><h1 style="color: white;">Standard</h1></th>
178
+ <th style="background-color: #20b2aa;border: 2px solid #20b2aa;"><h1 style="color: white;">Premium</h1></th>
179
+ <th style="background-color: #20b2aa;border: 2px solid #20b2aa;"><h1 style="color: white;">Enterprise</h1></th>
180
+ </tr>
181
+
182
+
183
+ </thead>
184
+ <tbody class="mo_align-center mo-fa-icon">
185
+ <?php for ( $i = 0; $i < count( $mo2f_feature_set ); $i ++ ) { ?>
186
+ <tr>
187
+ <td><?php
188
+ $feature_set = $mo2f_feature_set[ $i ];
189
+
190
+ echo $feature_set;
191
+ ?>
192
+ </td>
193
+ <?php if ( $is_NC ) {
194
+ $f_feature_set_with_plan = $mo2f_feature_set_with_plans_NC[ $feature_set ];
195
+ } else {
196
+ $f_feature_set_with_plan = $mo2f_feature_set_with_plans_EC[ $feature_set ];
197
+ }
198
+ ?>
199
+ <td><?php
200
+ if ( is_array( $f_feature_set_with_plan[0] ) ) {
201
+ echo mo2f_create_li( $f_feature_set_with_plan[0] );
202
+ } else {
203
+ if ( gettype( $f_feature_set_with_plan[0] ) == "boolean" ) {
204
+ echo mo2f_get_binary_equivalent( $f_feature_set_with_plan[0] );
205
+ } else {
206
+ echo $f_feature_set_with_plan[0];
207
+ }
208
+ } ?>
209
+ </td>
210
+ <td><?php
211
+ if ( is_array( $f_feature_set_with_plan[1] ) ) {
212
+ echo mo2f_create_li( $f_feature_set_with_plan[1] );
213
+ } else {
214
+ if ( gettype( $f_feature_set_with_plan[1] ) == "boolean" ) {
215
+ echo mo2f_get_binary_equivalent( $f_feature_set_with_plan[1] );
216
+ } else {
217
+ echo $f_feature_set_with_plan[1];
218
+ }
219
+ } ?>
220
+ </td>
221
+ <td><?php
222
+ if ( is_array( $f_feature_set_with_plan[2] ) ) {
223
+ echo mo2f_create_li( $f_feature_set_with_plan[2] );
224
+ } else {
225
+ if ( gettype( $f_feature_set_with_plan[2] ) == "boolean" ) {
226
+ echo mo2f_get_binary_equivalent( $f_feature_set_with_plan[2] );
227
+ } else {
228
+ echo $f_feature_set_with_plan[2];
229
+ }
230
+ } ?>
231
+ </td>
232
+ <td><?php
233
+ if ( is_array( $f_feature_set_with_plan[3] ) ) {
234
+ echo mo2f_create_li( $f_feature_set_with_plan[3] );
235
+ } else {
236
+ if ( gettype( $f_feature_set_with_plan[3] ) == "boolean" ) {
237
+ echo mo2f_get_binary_equivalent( $f_feature_set_with_plan[3] );
238
+ } else {
239
+ echo $f_feature_set_with_plan[3];
240
+ }
241
+ } ?>
242
+ </td>
243
+ </tr>
244
+ <?php } ?>
245
+
246
+ <tr>
247
+ <td><b>Add-Ons</b></td>
248
+ <?php if ( $is_NC ) { ?>
249
+ <td><b>Purchase Separately</b></td>
250
+ <?php } else { ?>
251
+ <td><b>NA</b></td>
252
+ <?php } ?>
253
+ <td><b>Purchase Separately</b></td>
254
+ <td><b>Included</b></td>
255
+ <td><b>Included</b></td>
256
+ </tr>
257
+ <?php for ( $i = 0; $i < count( $mo2f_addons ); $i ++ ) { ?>
258
+ <tr>
259
+ <td><?php echo $mo2f_addons[ $i ]; ?> <?php for ( $j = 0; $j < $i + 1; $j ++ ) { ?>*<?php } ?>
260
+ </td>
261
+ <?php if ( $is_NC ) { ?>
262
+ <td>
263
+ <button class="mo_wpns_button mo_wpns_button1" style="cursor:pointer"
264
+ onclick="mo2f_upgradeform('<?php echo $mo2f_addons_plan_name[ $mo2f_addons[ $i ] ]; ?>')" <?php echo $is_customer_registered ? "" : " disabled " ?> >
265
+ Purchase
266
+ </button>
267
+
268
+ </td>
269
+ <?php } else { ?>
270
+ <td><b>NA</b></td>
271
+ <?php } ?>
272
+ <td>
273
+ <button class="mo_wpns_button mo_wpns_button1" style="cursor:pointer"
274
+ onclick="mo2f_upgradeform('<?php echo $mo2f_addons_plan_name[ $mo2f_addons[ $i ] ]; ?>')" <?php echo $is_customer_registered ? "" : " disabled " ?> >
275
+ Purchase
276
+ </button>
277
+ </td>
278
+ <td><div style="color:#20b2aa;font-size: large;">✔</div></td>
279
+ <td><div style="color:#20b2aa;font-size: large;">✔</div></td>
280
+ </tr>
281
+ <?php } ?>
282
+
283
+ </tbody>
284
+ </table>
285
+ <br>
286
+ <div style="padding:10px;">
287
+ <?php for ( $i = 0; $i < count( $mo2f_addons ); $i ++ ) {
288
+ $f_feature_set_of_addons = $mo2f_addons_with_features[ $mo2f_addons[ $i ] ];
289
+ for ( $j = 0; $j < $i + 1; $j ++ ) { ?>*<?php } ?>
290
+ <b><?php echo $mo2f_addons[ $i ]; ?> Features</b>
291
+ <br>
292
+ <ol>
293
+ <?php for ( $k = 0; $k < count( $f_feature_set_of_addons ); $k ++ ) { ?>
294
+ <li><?php echo $f_feature_set_of_addons[ $k ]; ?></li>
295
+ <?php } ?>
296
+ </ol>
297
+
298
+ <hr><br>
299
+ <?php } ?>
300
+ <b>**** SMS Charges</b>
301
+ <p><?php echo mo2f_lt( 'If you wish to choose OTP Over SMS / OTP Over SMS and Email as your authentication method,
302
+ SMS transaction prices & SMS delivery charges apply and they depend on country. SMS validity is for lifetime.' ); ?></p>
303
+ <hr>
304
+ <br>
305
+ <div>
306
+ <h2>Note</h2>
307
+ <ol class="mo2f_licensing_plans_ol">
308
+ <li><?php echo mo2f_lt( 'The plugin works with many of the default custom login forms (like Woocommerce / Theme My Login), however if you face any issues with your custom login form, contact us and we will help you with it.' ); ?></li>
309
+ </ol>
310
+ </div>
311
+
312
+ <br>
313
+ <hr>
314
+
315
+ <form class="mo2f_display_none_forms" id="mo2fa_loginform"
316
+ action="<?php echo MO_HOST_NAME . '/moas/login'; ?>"
317
+ target="_blank" method="post">
318
+ <input type="email" name="username" value="<?php echo get_option( 'mo2f_email' ); ?>"/>
319
+ <input type="text" name="redirectUrl"
320
+ value="<?php echo MO_HOST_NAME . '/moas/initializepayment'; ?>"/>
321
+ <input type="text" name="requestOrigin" id="requestOrigin"/>
322
+ </form>
323
+
324
+ <form class="mo2f_display_none_forms" id="mo2fa_register_to_upgrade_form"
325
+ method="post">
326
+ <input type="hidden" name="requestOrigin" />
327
+ <input type="hidden" name="mo2fa_register_to_upgrade_nonce"
328
+ value="<?php echo wp_create_nonce( 'miniorange-2-factor-user-reg-to-upgrade-nonce' ); ?>"/>
329
+ </form>
330
+ <script>
331
+
332
+ function mo2f_upgradeform(planType) {
333
+ jQuery('#requestOrigin').val(planType);
334
+ jQuery('#mo2fa_loginform').submit();
335
+ }
336
+
337
+ function mo2f_register_and_upgradeform(planType) {
338
+ jQuery('#requestOrigin').val(planType);
339
+ jQuery('input[name="requestOrigin"]').val(planType);
340
+ jQuery('#mo2fa_register_to_upgrade_form').submit();
341
+ }
342
+ </script>
343
+
344
+ <style>#mo2f_support_table {
345
+ display: none;
346
+ }
347
+
348
+ </style>
349
+ </div>
350
+ </div>
351
+
352
+ <?php
353
+ function mo2f_create_li( $mo2f_array ) {
354
+ $html_ol = '<ul>';
355
+ foreach ( $mo2f_array as $element ) {
356
+ $html_ol .= "<li>" . $element . "</li>";
357
+ }
358
+ $html_ol .= '</ul>';
359
+
360
+ return $html_ol;
361
+ }
362
+
363
+
364
+ function mo2f_get_binary_equivalent( $mo2f_var ) {
365
+
366
+ switch ( $mo2f_var ) {
367
+ case 1:
368
+ return "<div style='color:#20b2aa;font-size: large;'>✔</div>";
369
+ case 0:
370
+ return "<div style='color:red;font-size: large;'>×</div>";
371
+ default:
372
+ return $mo2f_var;
373
+ }
374
+ }