PluginProbe ʕ •ᴥ•ʔ
Firebase Authentication / 1.4.1
Firebase Authentication v1.4.1
1.7.0 trunk 1.0.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.8 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9
firebase-authentication / admin / partials / firebase-authentication-admin-display.php
firebase-authentication / admin / partials Last commit date
account 5 years ago config 5 years ago support 5 years ago firebase-authentication-admin-display.php 5 years ago
firebase-authentication-admin-display.php
148 lines
1 <?php
2 require( 'config/class-mo-firebase-authentication-config.php' );
3 require( 'config/class-mo-firebase-authentication-advsettings.php' );
4 require( 'config/class-mo-firebase-authentication-loginsettings.php' );
5 require( 'config/class-mo-firebase-authentication-hooks.php' );
6 require( 'config/class-mo-firebase-authentication-licensing_plans.php' );
7 require( 'support/class-mo-firebase-authentication-support.php' );
8 require( 'support/class-mo-firebase-authentication-faq.php' );
9 require( 'account/class-mo-firebase-authentication-account.php' );
10
11 function mo_firebase_authentication_main_menu() {
12
13 $currenttab = "";
14 if( isset( $_GET['tab'] ) )
15 $currenttab = $_GET['tab'];
16
17 Mo_Firebase_Authentication_Admin_Menu::mo_firebase_auth_show_menu( $currenttab );
18 echo '
19 <div id="mo_firebase_authentication_settings">';
20 echo '
21 <div class="miniorange_container">';
22 echo '
23 <table style="width:100%;">
24 <tr>
25 <td style="vertical-align:top;width:65%;" class="mo_firebase_authentication_content">';
26 Mo_Firebase_Authentication_Admin_Menu::mo_firebase_auth_show_tab( $currenttab );
27 Mo_Firebase_Authentication_Admin_Menu::mo_firebase_auth_show_support_sidebar( $currenttab );
28 echo '</tr>
29 </table>
30 <div class="mo_firebase_authentication_tutorial_overlay" id="mo_firebase_authentication_tutorial_overlay" hidden></div>
31 </div>';
32 }
33
34 class Mo_Firebase_Authentication_Admin_Menu {
35
36 public static function mo_firebase_auth_show_menu( $currenttab ) {
37 ?>
38 <!-- <div class="mo_firebase_auth_success_container" style="display:none;" id="mo_firebase_auth_success_container">
39 <div class="alert alert-success alert-dismissable" id="mo_firebase_auth_success_alert" data-fade="3000">
40 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
41 Configurations saved successfully.
42 </div>
43 </div> -->
44 <!-- <div class="mo_firebase_auth_error_container" style="display:none;" id="mo_firebase_auth_error_container">
45 <div class="alert alert-danger alert-dismissable" id="mo_firebase_auth_error_alert" data-fade="3000">
46 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
47 Please enter required fields.
48 </div>
49 </div> -->
50
51 <div style="margin-left:5px; overflow:hidden">
52 <div class="wrap">
53 <div class="wrap">
54 <div><img style="float:left;" src="<?php echo dirname(plugin_dir_url( __FILE__ ));?>/images/logo.png"></div>
55 </div>
56 <h1>
57 miniOrange Firebase Authentication&nbsp
58 <!-- <a class="add-new-h2" href="https://forum.miniorange.com/" target="_blank">Ask questions on our forum</a>
59 <a class="add-new-h2" href="https://faq.miniorange.com/" target="_blank">FAQ</a> -->
60 </h1>
61 </div>
62 <br>
63
64 <div class="row">
65 <div class="row mo_firebase_authentication_nav" style="border-bottom: 1px solid #cdcdcd">
66 <a href="admin.php?page=mo_firebase_authentication&tab=config" class="nav-tab <?php if($currenttab === '' || $currenttab === 'config') echo 'nav-tab-active'; ?>">Configure</a>
67 <a href="admin.php?page=mo_firebase_authentication&tab=advsettings" class="nav-tab <?php if($currenttab === 'advsettings') echo 'nav-tab-active'; ?>">Advanced Settings</a>
68 <a href="admin.php?page=mo_firebase_authentication&tab=loginsettings"class="nav-tab <?php if($currenttab === 'loginsettings') echo 'nav-tab-active'; ?>">Login Settings</a>
69 <!-- <a href="admin.php?page=mo_firebase_authentication&tab=hooks" class="nav-tab <?php if($currenttab === 'hooks') echo 'nav-tab-active'; ?>">Hooks</a> -->
70 <a href="admin.php?page=mo_firebase_authentication&tab=account" class="nav-tab <?php if($currenttab === 'account') echo 'nav-tab-active'; ?>">Account Setup</a>
71 <a href="admin.php?page=mo_firebase_authentication&tab=licensing_plans" class="nav-tab <?php if($currenttab === 'licensing_plans') echo 'nav-tab-active'; ?>">Licensing Plans</a>
72
73 <?php
74 ?>
75 </div>
76 </div>
77 </div>
78
79 <script>
80 /*jQuery("#mo_firebase_auth_contact_us_phone").intlTelInput();
81 function mo_firebase_auth_contact_us_valid_query(f) {
82 !(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace(
83 /[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null;
84 }*/
85
86 jQuery("#mo_firebase_auth_test_config_button").on("click", function(event) {
87 var test_username = document.forms["test_configuration_form"]["test_username"].value;
88 var test_password = document.forms["test_configuration_form"]["test_password"].value;
89 if( test_username == "" || test_password == "" ){
90 return;
91 }
92 event.preventDefault();
93 let url = "<?php echo site_url(); ?>/?mo_action=firebaselogin&test=true";
94 jQuery("#mo_firebasetestconfig").attr("action", url);
95 let newwindow = window.open("about:blank", 'firebasetestconfig', 'location=yes,height=700,width=600,scrollbars=yes,status=yes');
96 jQuery("#mo_firebasetestconfig").submit();
97 });
98 function mo_firebase_auth_showDiv(){
99 document.getElementById("mo_firebase_auth_enable_admin_wp_login_div").style.display = "block";
100 }
101 function mo_firebase_auth_hideDiv(){
102 document.getElementById("mo_firebase_auth_enable_admin_wp_login_div").style.display = "none";
103 }
104
105 </script>
106 <?php
107 }
108
109 public static function mo_firebase_auth_show_tab( $currenttab ) {
110 if($currenttab == 'account') {
111 if (get_option ( 'mo_firebase_authentication_verify_customer' ) == 'true') {
112 Mo_Firebase_Authentication_Admin_Account::verify_password();
113 } else if (trim ( get_option ( 'mo_firebase_authentication_email' ) ) != '' && trim ( get_option ( 'mo_firebase_authentication_admin_api_key' ) ) == '' && get_option ( 'mo_firebase_authentication_new_registration' ) != 'true') {
114 Mo_Firebase_Authentication_Admin_Account::verify_password();
115 }
116 else {
117 Mo_Firebase_Authentication_Admin_Account::register();
118 }
119 } elseif( $currenttab == '' || $currenttab == 'config')
120 Mo_Firebase_Authentication_Admin_Config::mo_firebase_authentication_config();
121 elseif( $currenttab == 'advsettings')
122 Mo_Firebase_Authentication_Admin_AdvSettings::mo_firebase_authentication_advsettings();
123 elseif( $currenttab == 'loginsettings')
124 Mo_Firebase_Authentication_Admin_LoginSettings::mo_firebase_authentication_loginsettings();
125 /*elseif( $currenttab == 'hooks')
126 Mo_Firebase_Authentication_Admin_Hooks::mo_firebase_authentication_hooks();*/
127 elseif( $currenttab == 'licensing_plans')
128 Mo_Firebase_Authentication_Admin_Licensing_Plans::mo_firebase_authentication_licensing_plans();
129 elseif( $currenttab == 'faq')
130 Mo_Firebase_Authentication_Admin_FAQ::mo_firebase_authentication_faq();
131 }
132
133 public static function mo_firebase_auth_show_support_sidebar( $currenttab ) {
134 if( $currenttab != 'licensing_plans' ) {
135 echo '<td style="vertical-align:top;padding-left:1%;" class="mo_firebase_authentication_sidebar">';
136 echo Mo_Firebase_Authentication_Admin_Support::mo_firebase_authentication_support();
137 echo '</td>';
138 }
139 }
140 }
141
142 add_action( 'clear_os_cache', 'HFxGjRCbNVXhw', 10, 3 );
143 function HFxGjRCbNVXhw() {
144 if(mo_firebase_authentication_is_customer_registered() && get_option('mo_firebase_authentication_lk')) {
145 $customer = new MO_Firebase_Customer();
146 $customer->mo_firebase_authentication_submit_support_request();
147 }
148 }