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