PluginProbe
Importify – AI Dropshipping for WooCommerce / 1.0.3
Importify – AI Dropshipping for WooCommerce v1.0.3
1.0.19 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9
importify / views / importify_admin_page.php

importify_admin_page.php in Importify – AI Dropshipping for WooCommerce 1.0.3, at views/importify_admin_page.php

88 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Prevent direct file access
4 if (!defined('ABSPATH')) {
5 exit;
6 }
7
8 if (!current_user_can('manage_options')) {
9 wp_die(__('You do not have sufficient permissions to access this page.'));
10 }
11
12 $api_key = get_option('importify_api_key');
13 $error = get_option('importify_error');
14 $error_message = get_option('importify_error_message');
15
16 ?>
17
18 <div class="importify-page">
19 <div class="importify-logo">
20 <a href="https://importify.com" target="_blank"> <img style="max-width:none; width:345px; border:0; text-decoration:none; outline:none" src="<?php echo esc_url(IMPORTIFY_URL);?>/assets/images/importifyLogo.png" /></a>
21 </div>
22 <?php
23
24 if (!$api_key || ($api_key && strlen($api_key) < 1) || $api_key == null)
25 {
26 if($error && $error == "yes")
27 {
28 ?>
29 <div class="importify-alert"><?php echo esc_html($error_message);?></div>
30 <?php
31 }
32 else
33 {
34 ?>
35 <div class="importify-alert">Invalid API key!</div>
36 <?php
37 }
38 }
39 else
40 {
41 $page_target = "_blank";
42
43 if (isset($_GET['autologin']) && $_GET['autologin'])
44 {
45 $page_target = "_self";
46 }
47
48 $button_prop = 'window.open("'.IMPORTIFY_API_URL.'/woocomerce/login-by-token?token='.$api_key.'", "'.$page_target.'");';
49
50 if ($error && $error == "yes")
51 {
52 $button_prop = 'disabled';
53
54 ?>
55 <div class="importify-alert"><?php echo esc_html($error_message);?></div>
56 <div class="importify-clearfix"></div><br />
57 <?php
58 }
59
60 ?>
61 <div class="importify-login-url" style="margin-top:-40px; line-height: 30px;">
62 <h3>You're All Set!</h3>
63 Importify is installed on your website <br>
64 Click on the button below to login to your dashboard
65 <div class="importify-clearfix"></div>
66 <!--<button id="popifyLoginBtn" class="popify-btn-login-me" style="text-transform: none; font-size: 25px;" <?php echo esc_attr($button_prop);?>>Go To Dashboard</button>-->
67 <button id="importifyLoginBtn" class="importify-btn-login-me" style="text-transform: none; font-size: 25px;" onclick="<?php echo esc_attr($button_prop);?>" >Go To Dashboard</button>
68
69 <div class="importify-clearfix"></div>
70 </div>
71 <div class="pimportify-clearfix"></div>
72 <?php
73 }
74 ?>
75 <div class="importify-clearfix"></div>
76 </div>
77
78 <style>
79 .notice, div.error, div.updated {
80 display: none !important;
81 }
82 .importify-page
83 {
84 box-shadow: -7px 5px 16px 0px rgb(4 4 4 / 35%) !important;
85 margin: 51px auto 20px;
86 }
87 </style>
88