Version Description
- Added: Overview page
- Removed: Featured Plugins, Featured Themes pages
- Fixed: Security issue
- Fixed: Themes - bug on save as copy
Download this release
Release Info
Developer | webdorado |
Plugin | Form Maker by WD – user-friendly drag & drop Form Builder plugin |
Version | 1.11.2 |
Comparing to | |
See all releases |
Code changes from version 1.11.1 to 1.11.2
- admin/controllers/FMControllerThemes_fm.php +8 -16
- admin/controllers/FMControllerUninstall_fm.php +8 -0
- admin/views/FMViewFormMakerSubmits.php +1 -1
- admin/views/FMViewSubmissions_fm.php +2 -1
- admin/views/FMViewUninstall_fm.php +1 -1
- featured/featured.php +0 -177
- featured/featured_themes.css +0 -178
- featured/featured_themes.php +0 -104
- featured/images/best_magazine.jpg +0 -0
- featured/images/best_magazine.png +0 -0
- featured/images/business_elite.jpg +0 -0
- featured/images/business_elite.png +0 -0
- featured/images/business_world.jpg +0 -0
- featured/images/business_world.png +0 -0
- featured/images/catalog.png +0 -0
- featured/images/contact.builder.png +0 -0
- featured/images/contact.maker.png +0 -0
- featured/images/contacts.png +0 -0
- featured/images/download_themes.png +0 -0
- featured/images/ecommerce.png +0 -0
- featured/images/exclusive.png +0 -0
- featured/images/expert.png +0 -0
- featured/images/facebook-feed.png +0 -0
- featured/images/facebook.png +0 -0
- featured/images/faq.png +0 -0
- featured/images/faq_wd.png +0 -0
- featured/images/featured_plugins_bg.png +0 -0
- featured/images/flash.calendar.png +0 -0
- featured/images/folder.menu.png +0 -0
- featured/images/magazine.png +0 -0
- featured/images/mottomag.png +0 -0
- featured/images/news_magazine.jpg +0 -0
- featured/images/player.png +0 -0
- featured/images/portfolio.png +0 -0
- featured/images/portfolio_gallery.jpg +0 -0
- featured/images/post-slider.png +0 -0
- featured/images/random.post.png +0 -0
- featured/images/sauron.jpg +0 -0
- featured/images/sauron.png +0 -0
- featured/images/twittertools.png +0 -0
- featured/images/wedding.png +0 -0
- featured/images/wedding_style.png +0 -0
- featured/images/zoom.png +0 -0
- fm_admin_class.php +0 -29
- form-maker.php +167 -72
- form_maker_notices_class.php +0 -267
- frontend/models/FMModelForm_maker.php +918 -927
- readme.txt +9 -2
- wd/README.md +129 -0
- wd/assets/css/deactivate_popup.css +86 -0
- wd/assets/css/img/allow&continue.png +0 -0
- wd/assets/css/img/coupon_bg.png +0 -0
- wd/assets/css/img/plugins_header_bg.png +0 -0
- wd/assets/css/img/skip.png +0 -0
- wd/assets/css/img/themes_headrer_bg.png +0 -0
- wd/assets/css/img/ug-icon-1.png +0 -0
- wd/assets/css/img/ug-icon-2.png +0 -0
- wd/assets/css/img/ug-icon-3.png +0 -0
- wd/assets/css/img/ug-icon-4.png +0 -0
- wd/assets/css/img/ug-icon-5.png +0 -0
- wd/assets/css/img/welcome_bg.png +0 -0
- wd/assets/css/notices.css +88 -0
- wd/assets/css/overview.css +455 -0
- wd/assets/css/subscribe.css +114 -0
- wd/assets/img/bwg_main_plugin.png +0 -0
- wd/assets/img/ecwd_main_plugin.png +0 -0
- wd/assets/img/faqwd_main_plugin.png +0 -0
- wd/assets/img/ffwd_main_plugin.png +0 -0
- wd/assets/img/fm_main_plugin.png +0 -0
- wd/assets/img/gawd_main_plugin.png +0 -0
- wd/assets/img/gmwd_main_plugin.png +0 -0
- wd/assets/img/loader.gif +0 -0
- wd/assets/img/mwd_main_plugin.png +0 -0
- wd/assets/img/plugins/business_elite.png +0 -0
- wd/assets/img/plugins/business_world.png +0 -0
- featured/images/events-wd.png → wd/assets/img/plugins/event-calendar-wd.png +0 -0
- wd/assets/img/plugins/form-maker.png +0 -0
- {featured/images → wd/assets/img/plugins}/photo-gallery.png +0 -0
- wd/assets/img/plugins/portfolio_gallery.png +0 -0
- wd/assets/img/plugins/sauron.png +0 -0
- featured/images/slider.png → wd/assets/img/plugins/slider-wd.png +0 -0
- featured/images/spider.calendar.png → wd/assets/img/plugins/spider-event-calendar.png +0 -0
- featured/images/google-maps.png → wd/assets/img/plugins/wd-google-maps.png +0 -0
- featured/images/instagram_feed.png → wd/assets/img/plugins/wd-instagram-feed.png +0 -0
- wd/assets/img/spinner.gif +0 -0
- wd/assets/img/sub_1.png +0 -0
- wd/assets/img/sub_2.png +0 -0
- wd/assets/img/sub_4.png +0 -0
- wd/assets/img/twd_main_plugin.png +0 -0
- wd/assets/img/wd_ads_main_plugin.png +0 -0
- wd/assets/img/wde_main_plugin.png +0 -0
- wd/assets/img/wdi_main_plugin.png +0 -0
- wd/assets/img/wdps_main_plugin.png +0 -0
- wd/assets/img/wds_main_plugin.png +0 -0
- wd/assets/img/wp_logo.png +0 -0
- wd/assets/img/ytwd_main_plugin.png +0 -0
- wd/assets/js/deactivate_popup.js +106 -0
- wd/assets/js/overview.js +56 -0
- wd/assets/js/subsribe.js +36 -0
- wd/config.php +127 -0
- wd/includes/api.php +81 -0
- wd/includes/deactivate.php +168 -0
- wd/includes/notices.php +223 -0
- wd/includes/overview.php +310 -0
- wd/includes/subscribe.php +138 -0
- wd/start.php +41 -0
- wd/templates/display_deactivation_popup.php +28 -0
- wd/templates/display_overview.php +33 -0
- wd/templates/display_overview_deals.php +88 -0
- wd/templates/display_overview_support.php +43 -0
- wd/templates/display_overview_user_guide.php +46 -0
- wd/templates/display_overview_welcome.php +31 -0
- wd/templates/display_subscribe.php +47 -0
- wd/wd.php +146 -0
admin/controllers/FMControllerThemes_fm.php
CHANGED
@@ -70,15 +70,13 @@ class FMControllerThemes_fm {
|
|
70 |
$theme = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes where id=' . $theme_id);
|
71 |
$title = $theme->title;
|
72 |
$params = $theme->params;
|
|
|
73 |
$save = $wpdb->insert($wpdb->prefix . 'formmaker_themes',
|
74 |
array(
|
75 |
-
'title' => $title,
|
76 |
-
'params' => $params,
|
|
|
77 |
'default' => 0
|
78 |
-
), array(
|
79 |
-
'%s',
|
80 |
-
'%s',
|
81 |
-
'%d'
|
82 |
));
|
83 |
}
|
84 |
}
|
@@ -120,10 +118,7 @@ class FMControllerThemes_fm {
|
|
120 |
'title' => $title,
|
121 |
'params' => $params,
|
122 |
'default' => $default,
|
123 |
-
|
124 |
-
'%s',
|
125 |
-
'%s',
|
126 |
-
'%d',
|
127 |
));
|
128 |
$id = $wpdb->insert_id;
|
129 |
}
|
@@ -131,7 +126,7 @@ class FMControllerThemes_fm {
|
|
131 |
require_once WD_FM_DIR . "/frontend/models/FMModelForm_maker.php";
|
132 |
$model_frontend = new FMModelForm_maker();
|
133 |
$form_theme = json_decode(html_entity_decode($params), true);
|
134 |
-
$model_frontend->create_css($id, $form_theme, $version
|
135 |
return 1;
|
136 |
}
|
137 |
else {
|
@@ -144,16 +139,13 @@ class FMControllerThemes_fm {
|
|
144 |
$id = (int) WDW_FM_Library::get('current_id', 0);
|
145 |
$title = isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '';
|
146 |
$params = isset($_POST['params']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['params'])) : '';
|
147 |
-
|
148 |
$save = $wpdb->insert($wpdb->prefix . 'formmaker_themes',
|
149 |
array(
|
150 |
'title' => $title,
|
151 |
'params' => $params,
|
|
|
152 |
'default' => 0
|
153 |
-
), array(
|
154 |
-
'%s',
|
155 |
-
'%s',
|
156 |
-
'%d'
|
157 |
));
|
158 |
|
159 |
if ($save !== FALSE) {
|
70 |
$theme = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes where id=' . $theme_id);
|
71 |
$title = $theme->title;
|
72 |
$params = $theme->params;
|
73 |
+
$version = $theme->version;
|
74 |
$save = $wpdb->insert($wpdb->prefix . 'formmaker_themes',
|
75 |
array(
|
76 |
+
'title' => $title,
|
77 |
+
'params' => $params,
|
78 |
+
'version' => $version,
|
79 |
'default' => 0
|
|
|
|
|
|
|
|
|
80 |
));
|
81 |
}
|
82 |
}
|
118 |
'title' => $title,
|
119 |
'params' => $params,
|
120 |
'default' => $default,
|
121 |
+
'version' => $version,
|
|
|
|
|
|
|
122 |
));
|
123 |
$id = $wpdb->insert_id;
|
124 |
}
|
126 |
require_once WD_FM_DIR . "/frontend/models/FMModelForm_maker.php";
|
127 |
$model_frontend = new FMModelForm_maker();
|
128 |
$form_theme = json_decode(html_entity_decode($params), true);
|
129 |
+
$model_frontend->create_css($id, $form_theme, $version, true);
|
130 |
return 1;
|
131 |
}
|
132 |
else {
|
139 |
$id = (int) WDW_FM_Library::get('current_id', 0);
|
140 |
$title = isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '';
|
141 |
$params = isset($_POST['params']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['params'])) : '';
|
142 |
+
$version = $wpdb->get_var($wpdb->prepare("SELECT version FROM " . $wpdb->prefix . "formmaker_themes WHERE id=%d", $id));
|
143 |
$save = $wpdb->insert($wpdb->prefix . 'formmaker_themes',
|
144 |
array(
|
145 |
'title' => $title,
|
146 |
'params' => $params,
|
147 |
+
'version' => $version,
|
148 |
'default' => 0
|
|
|
|
|
|
|
|
|
149 |
));
|
150 |
|
151 |
if ($save !== FALSE) {
|
admin/controllers/FMControllerUninstall_fm.php
CHANGED
@@ -14,6 +14,14 @@ class FMControllerUninstall_fm {
|
|
14 |
// Constructor & Destructor //
|
15 |
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
public function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
}
|
18 |
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
// Public Methods //
|
14 |
// Constructor & Destructor //
|
15 |
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
public function __construct() {
|
17 |
+
global $fm_options;
|
18 |
+
if (!class_exists("DoradoWebConfig")) {
|
19 |
+
include_once(WD_FM_DIR . "/wd/config.php");
|
20 |
+
}
|
21 |
+
$config = new DoradoWebConfig();
|
22 |
+
$config->set_options($fm_options);
|
23 |
+
$deactivate_reasons = new DoradoWebDeactivate($config);
|
24 |
+
$deactivate_reasons->submit_and_deactivate();
|
25 |
}
|
26 |
////////////////////////////////////////////////////////////////////////////////////////
|
27 |
// Public Methods //
|
admin/views/FMViewFormMakerSubmits.php
CHANGED
@@ -95,7 +95,7 @@ class FMViewFormMakerSubmits {
|
|
95 |
?>
|
96 |
<tr>
|
97 |
<td class="field_label"><?php echo $labels_name[$key]; ?></td>
|
98 |
-
<td class="field_value"><?php echo str_replace("***br***", '<br>', $element_value); ?></td>
|
99 |
</tr>
|
100 |
<?php
|
101 |
}
|
95 |
?>
|
96 |
<tr>
|
97 |
<td class="field_label"><?php echo $labels_name[$key]; ?></td>
|
98 |
+
<td class="field_value"><?php echo str_replace("***br***", '<br>', wpautop(esc_html($element_value))); ?></td>
|
99 |
</tr>
|
100 |
<?php
|
101 |
}
|
admin/views/FMViewSubmissions_fm.php
CHANGED
@@ -624,6 +624,7 @@ class FMViewSubmissions_fm {
|
|
624 |
$not_label = TRUE;
|
625 |
for ($g = 0; $g < count($temp); $g++) {
|
626 |
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$h]);
|
|
|
627 |
if ($temp[$g]->element_label == $sorted_labels_id[$h]) {
|
628 |
if (strpos($temp[$g]->element_value, "***map***")) {
|
629 |
$map_params = explode('***map***', $temp[$g]->element_value);
|
@@ -712,7 +713,7 @@ class FMViewSubmissions_fm {
|
|
712 |
else{
|
713 |
?>
|
714 |
<td class="<?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
715 |
-
<p><?php echo str_replace("***br***", '<br>', stripslashes($temp[$g]->element_value)) ; ?></p>
|
716 |
</td>
|
717 |
<?php
|
718 |
}
|
624 |
$not_label = TRUE;
|
625 |
for ($g = 0; $g < count($temp); $g++) {
|
626 |
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$h]);
|
627 |
+
$temp[$g]->element_value = esc_html($temp[$g]->element_value);
|
628 |
if ($temp[$g]->element_label == $sorted_labels_id[$h]) {
|
629 |
if (strpos($temp[$g]->element_value, "***map***")) {
|
630 |
$map_params = explode('***map***', $temp[$g]->element_value);
|
713 |
else{
|
714 |
?>
|
715 |
<td class="<?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
716 |
+
<p><?php echo str_replace("***br***", '<br>', stripslashes(wpautop($temp[$g]->element_value))) ; ?></p>
|
717 |
</td>
|
718 |
<?php
|
719 |
}
|
admin/views/FMViewUninstall_fm.php
CHANGED
@@ -136,7 +136,7 @@ class FMViewUninstall_fm {
|
|
136 |
</div>
|
137 |
<div class="wrap">
|
138 |
<h2>Uninstall Form Maker</h2>
|
139 |
-
<p><strong><a href="<?php echo $deactivate_url; ?>">Click Here</a> To Finish the Uninstallation and Form Maker
|
140 |
will be Deactivated Automatically.</strong></p>
|
141 |
<input id="task" name="task" type="hidden" value=""/>
|
142 |
</div>
|
136 |
</div>
|
137 |
<div class="wrap">
|
138 |
<h2>Uninstall Form Maker</h2>
|
139 |
+
<p><strong><a href="<?php echo $deactivate_url; ?>" class="fm_deactivate_link" data-uninstall="1">Click Here</a> To Finish the Uninstallation and Form Maker
|
140 |
will be Deactivated Automatically.</strong></p>
|
141 |
<input id="task" name="task" type="hidden" value=""/>
|
142 |
</div>
|
featured/featured.php
CHANGED
@@ -1,181 +1,4 @@
|
|
1 |
<?php
|
2 |
-
function fm_featured_page($current_plugin = '') {
|
3 |
-
$plugins = array(
|
4 |
-
"ecommerce-wd" => array(
|
5 |
-
'title' => 'Ecommerce',
|
6 |
-
'text' => 'Wordpress ecommerce plugin',
|
7 |
-
'content' => 'Ecommerce WD is a highly-functional, user friendly WordPress Ecommerce plugin, which is perfect for developing online stores for any level of complexity.',
|
8 |
-
'href' => 'https://web-dorado.com/products/wordpress-ecommerce.html'
|
9 |
-
),
|
10 |
-
"form-maker" => array(
|
11 |
-
'title' => 'Form Maker',
|
12 |
-
'text' => 'Wordpress form builder plugin',
|
13 |
-
'content' => 'Form Maker is a modern and advanced tool for creating WordPress forms easily and fast.',
|
14 |
-
'href' => 'https://web-dorado.com/products/wordpress-form.html'
|
15 |
-
),
|
16 |
-
"photo-gallery" => array(
|
17 |
-
'title' => 'Photo Gallery',
|
18 |
-
'text' => 'WordPress Photo Gallery plugin',
|
19 |
-
'content' => 'Photo Gallery is a fully responsive WordPress Gallery plugin with advanced functionality.',
|
20 |
-
'href' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin.html'
|
21 |
-
),
|
22 |
-
"contact_form_bulder" => array(
|
23 |
-
'title' => 'Contact Form Builder',
|
24 |
-
'text' => 'WordPress contact form builder plugin',
|
25 |
-
'content' => 'Contact Form Builder is the best tool for quickly arranging a contact form for your clients and visitors.',
|
26 |
-
'href' => 'https://web-dorado.com/products/wordpress-contact-form-builder.html'
|
27 |
-
),
|
28 |
-
"slider_wd" => array(
|
29 |
-
'title' => 'Slider WD',
|
30 |
-
'text' => 'WordPress slider plugin',
|
31 |
-
'content' => 'Create responsive, highly configurable sliders with various effects for your WordPress site.',
|
32 |
-
'href' => 'https://web-dorado.com/products/wordpress-slider-plugin.html'
|
33 |
-
),
|
34 |
-
"events-wd" => array(
|
35 |
-
'title' => 'Event Calendar WD',
|
36 |
-
'text' => 'WordPress calendar plugin',
|
37 |
-
'content' => 'Organize and publish your events in an easy and elegant way using Event Calendar WD.',
|
38 |
-
'href' => 'https://web-dorado.com/products/wordpress-event-calendar-wd.html'
|
39 |
-
),
|
40 |
-
"contact-maker" => array(
|
41 |
-
'title' => 'Contact Form Maker',
|
42 |
-
'text' => 'WordPress contact form maker plugin',
|
43 |
-
'content' => 'WordPress Contact Form Maker is an advanced and easy-to-use tool for creating forms.',
|
44 |
-
'href' => 'https://web-dorado.com/products/wordpress-contact-form-maker-plugin.html'
|
45 |
-
),
|
46 |
-
"spider-calendar" => array(
|
47 |
-
'title' => 'Spider Calendar',
|
48 |
-
'text' => 'WordPress event calendar plugin',
|
49 |
-
'content' => 'Spider Event Calendar is a highly configurable product which allows you to have multiple organized events.',
|
50 |
-
'href' => 'https://web-dorado.com/products/wordpress-calendar.html'
|
51 |
-
),
|
52 |
-
"catalog" => array(
|
53 |
-
'title' => 'Spider Catalog',
|
54 |
-
'text' => 'WordPress product catalog plugin',
|
55 |
-
'content' => 'Spider Catalog for WordPress is a convenient tool for organizing the products represented on your website into catalogs.',
|
56 |
-
'href' => 'https://web-dorado.com/products/wordpress-catalog.html'
|
57 |
-
),
|
58 |
-
"player" => array(
|
59 |
-
'title' => 'Video Player',
|
60 |
-
'text' => 'WordPress Video player plugin',
|
61 |
-
'content' => 'Spider Video Player for WordPress is a Flash & HTML5 video player plugin that allows you to easily add videos to your website with the possibility.',
|
62 |
-
'href' => 'https://web-dorado.com/products/wordpress-player.html'
|
63 |
-
),
|
64 |
-
"contacts" => array(
|
65 |
-
'title' => 'Spider Contacts',
|
66 |
-
'text' => 'Wordpress staff list plugin',
|
67 |
-
'content' => 'Spider Contacts helps you to display information about the group of people more intelligible, effective and convenient.',
|
68 |
-
'href' => 'https://web-dorado.com/products/wordpress-contacts-plugin.html'
|
69 |
-
),
|
70 |
-
"facebook" => array(
|
71 |
-
'title' => 'Spider Facebook',
|
72 |
-
'text' => 'WordPress Facebook plugin',
|
73 |
-
'content' => 'Spider Facebook is a WordPress integration tool for Facebook.It includes all the available Facebook social plugins and widgets.',
|
74 |
-
'href' => 'https://web-dorado.com/products/wordpress-facebook.html'
|
75 |
-
),
|
76 |
-
"facebook-feed" => array(
|
77 |
-
'title' => 'Facebook Feed',
|
78 |
-
'text' => 'WordPress Facebook Feed plugin',
|
79 |
-
'content' => 'Facebook Feed WD is a plugin, which allows embedding Facebook group, page and profile feeds into your website.',
|
80 |
-
'href' => 'https://web-dorado.com/products/wordpress-facebook-feed-plugin.html'
|
81 |
-
),
|
82 |
-
"twitter-widget" => array(
|
83 |
-
'title' => 'Widget Twitter',
|
84 |
-
'text' => 'WordPress Widget Twitter plugin',
|
85 |
-
'content' => 'The Widget Twitter plugin lets you to fully integrate your WordPress site with your Twitter account.',
|
86 |
-
'href' => 'https://web-dorado.com/products/wordpress-twitter-integration-plugin.html'
|
87 |
-
),
|
88 |
-
"faq" => array(
|
89 |
-
'title' => 'Spider FAQ',
|
90 |
-
'text' => 'WordPress FAQ Plugin',
|
91 |
-
'content' => 'The Spider FAQ WordPress plugin is for creating an FAQ (Frequently Asked Questions) section for your website.',
|
92 |
-
'href' => 'https://web-dorado.com/products/wordpress-faq-plugin.html'
|
93 |
-
),
|
94 |
-
"zoom" => array(
|
95 |
-
'title' => 'Zoom',
|
96 |
-
'text' => 'WordPress text zoom plugin',
|
97 |
-
'content' => 'Zoom enables site users to resize the predefined areas of the web site.',
|
98 |
-
'href' => 'https://web-dorado.com/products/wordpress-zoom.html'
|
99 |
-
),
|
100 |
-
"flash-calendar" => array(
|
101 |
-
'title' => 'Flash Calendar',
|
102 |
-
'text' => 'WordPress flash calendar plugin',
|
103 |
-
'content' => 'Spider Flash Calendar is a highly configurable Flash calendar plugin which allows you to have multiple organized events.',
|
104 |
-
'href' => 'https://web-dorado.com/products/wordpress-events-calendar.html'
|
105 |
-
),
|
106 |
-
"folder_menu" => array(
|
107 |
-
'title' => 'Folder Menu',
|
108 |
-
'text' => 'WordPress folder menu plugin',
|
109 |
-
'content' => 'Folder Menu Vertical is a WordPress Flash menu module for your website, designed to meet your needs and preferences.',
|
110 |
-
'href' => 'https://web-dorado.com/products/wordpress-random-post.html'
|
111 |
-
),
|
112 |
-
"random_post" => array(
|
113 |
-
'title' => 'Random post',
|
114 |
-
'text' => 'WordPress random post plugin',
|
115 |
-
'content' => 'Spider Random Post is a small but very smart solution for your WordPress web site.',
|
116 |
-
'href' => 'https://web-dorado.com/products/wordpress-random-post.html'
|
117 |
-
),
|
118 |
-
"faq_wd" => array(
|
119 |
-
'title' => 'FAQ WD',
|
120 |
-
'text' => 'WordPress FAQ plugin',
|
121 |
-
'content' => 'Organize and publish your FAQs in an easy and elegant way using FAQ WD.',
|
122 |
-
'href' => 'https://web-dorado.com/products/wordpress-faq-wd.html'
|
123 |
-
),
|
124 |
-
"instagram_feed" => array(
|
125 |
-
'title' => 'Instagram Feed WD',
|
126 |
-
'text' => 'WordPress Instagram Feed plugin',
|
127 |
-
'content' => 'WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website.',
|
128 |
-
'href' => 'https://web-dorado.com/products/wordpress-instagram-feed-wd.html'
|
129 |
-
),
|
130 |
-
"post-slider" => array(
|
131 |
-
'title' => 'Post Slider',
|
132 |
-
'text' => 'WordPress Post Slider plugin',
|
133 |
-
'content' => 'Post Slider WD is designed to show off the selected posts of your website in a slider.',
|
134 |
-
'href' => 'https://web-dorado.com/products/wordpress-post-slider-plugin.html'
|
135 |
-
),
|
136 |
-
"google-maps" => array(
|
137 |
-
'title' => 'Google Map',
|
138 |
-
'text' => 'WordPress Google Maps Plugin',
|
139 |
-
'content' => 'Google Maps WD is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.',
|
140 |
-
'href' => 'https://web-dorado.com/products/wordpress-google-maps-plugin.html'
|
141 |
-
),
|
142 |
-
);
|
143 |
-
?>
|
144 |
-
<div id="main_featured_plugins_page">
|
145 |
-
<h3>Featured Plugins</h3>
|
146 |
-
<div class="featured_header">
|
147 |
-
<a href="https://web-dorado.com/wordpress-plugins.html?source=formmaker" target="_blank">
|
148 |
-
<h1>GET <?php echo $plugins[$current_plugin]["title"]; ?> +22 PLUGINS</h1>
|
149 |
-
<h1 class="get_plugins">FOR $100 ONLY <span>- SAVE 70%</span></h1>
|
150 |
-
<div class="try-now">
|
151 |
-
<span>TRY NOW</span>
|
152 |
-
</div>
|
153 |
-
</a>
|
154 |
-
</div>
|
155 |
-
<ul id="featured-plugins-list">
|
156 |
-
<?php
|
157 |
-
foreach ($plugins as $key => $plugins) {
|
158 |
-
if ($current_plugin != $key) {
|
159 |
-
?>
|
160 |
-
<li class="<?php echo $key; ?>">
|
161 |
-
<div class="product"></div>
|
162 |
-
<div class="title">
|
163 |
-
<strong class="heading"><?php echo $plugins['title']; ?></strong>
|
164 |
-
</div>
|
165 |
-
<div class="description">
|
166 |
-
<p><?php echo $plugins['content']; ?></p>
|
167 |
-
</div>
|
168 |
-
<a target="_blank" href="<?php echo $plugins['href']; ?>?source=formmaker" class="download">Download Plugin ►</a>
|
169 |
-
</li>
|
170 |
-
<?php
|
171 |
-
}
|
172 |
-
}
|
173 |
-
?>
|
174 |
-
</ul>
|
175 |
-
</div>
|
176 |
-
<?php
|
177 |
-
}
|
178 |
-
|
179 |
function fm_extensions_page($current_plugin = '') {
|
180 |
|
181 |
$addons = array(
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
function fm_extensions_page($current_plugin = '') {
|
3 |
|
4 |
$addons = array(
|
featured/featured_themes.css
DELETED
@@ -1,178 +0,0 @@
|
|
1 |
-
@import url(https://fonts.googleapis.com/css?family=Oswald);
|
2 |
-
|
3 |
-
#main_featured_themes_page #featured-themes-list {
|
4 |
-
position:relative;
|
5 |
-
margin:0px auto;
|
6 |
-
height:auto;
|
7 |
-
display:table;
|
8 |
-
list-style:none;
|
9 |
-
text-align: center;
|
10 |
-
width: 100%;
|
11 |
-
}
|
12 |
-
#main_featured_themes_page #featured-themes-list li {
|
13 |
-
display: inline-table;
|
14 |
-
width: 300px;
|
15 |
-
margin: 20px 10px 0px 10px;
|
16 |
-
background: #FFFFFF;
|
17 |
-
border-right: 3px solid #E5E5E5;
|
18 |
-
border-bottom: 3px solid #E5E5E5;
|
19 |
-
position: relative;
|
20 |
-
}
|
21 |
-
@media screen and (min-width: 1600px) {
|
22 |
-
#main_featured_themes_page #featured-themes-list li {
|
23 |
-
width:400px;
|
24 |
-
}
|
25 |
-
|
26 |
-
}
|
27 |
-
#main_featured_themes_page .theme_img img {
|
28 |
-
max-width: 100%;
|
29 |
-
}
|
30 |
-
#main_featured_themes_page .theme_img {
|
31 |
-
display: inline-block;
|
32 |
-
overflow: hidden;
|
33 |
-
outline: 1px solid #D6D1D1;
|
34 |
-
position:relative;
|
35 |
-
/*height: 168px; */
|
36 |
-
}
|
37 |
-
#main_featured_themes_page #featured-themes-list li .title {
|
38 |
-
width: 91%;
|
39 |
-
text-align: center;
|
40 |
-
margin: 0 auto;
|
41 |
-
}
|
42 |
-
#main_featured_themes_page {
|
43 |
-
font-family: Oswald;
|
44 |
-
}
|
45 |
-
#main_featured_themes_page #featured-themes-list li .title .heading {
|
46 |
-
display: block;
|
47 |
-
position: relative;
|
48 |
-
font-size: 17px;
|
49 |
-
color: #666666;
|
50 |
-
margin: 13px 0px 13px 0px;
|
51 |
-
text-transform: uppercase;
|
52 |
-
}
|
53 |
-
#main_featured_themes_page #featured-themes-list li .title p {
|
54 |
-
font-size:14px;
|
55 |
-
color:#444;
|
56 |
-
margin-left:20px;
|
57 |
-
}
|
58 |
-
#main_featured_themes_page #featured-themes-list li .description {
|
59 |
-
height:130px;
|
60 |
-
width: 90%;
|
61 |
-
margin: 0 auto;
|
62 |
-
}
|
63 |
-
#main_featured_themes_page #featured-themes-list li .description p {
|
64 |
-
text-align: center;
|
65 |
-
width: 100%;
|
66 |
-
color: #666666;
|
67 |
-
font-family: "Open Sans",sans-serif;
|
68 |
-
font-size: 14px;
|
69 |
-
}
|
70 |
-
#main_featured_themes_page #featured-themes-list li .links {
|
71 |
-
border-top: 1px solid #d8d8d8;
|
72 |
-
width: 90%;
|
73 |
-
margin: 0 auto;
|
74 |
-
font-size: 14px;
|
75 |
-
line-height: 40px;
|
76 |
-
font-weight: bolder;
|
77 |
-
text-align: center;
|
78 |
-
padding-top: 9px;
|
79 |
-
padding-bottom: 12px;
|
80 |
-
}
|
81 |
-
#main_featured_themes_page .page_header h1 {
|
82 |
-
margin: 0px;
|
83 |
-
font-family: Segoe UI;
|
84 |
-
padding-bottom: 15px;
|
85 |
-
color: rgb(111, 111, 111);
|
86 |
-
font-size: 24px;
|
87 |
-
text-align:center;
|
88 |
-
}
|
89 |
-
#main_featured_themes_page .page_header {
|
90 |
-
height: 40px;
|
91 |
-
padding: 22px 0px 0px 0px;
|
92 |
-
margin-bottom: 15px;
|
93 |
-
/*border-bottom: rgb(111, 111, 111) solid 1px;*/
|
94 |
-
}
|
95 |
-
#main_featured_themes_page #featured-themes-list li a {
|
96 |
-
outline: none;
|
97 |
-
line-height: 29px;
|
98 |
-
text-decoration: none;
|
99 |
-
color: #134d68;
|
100 |
-
font-family: "Open Sans",sans-serif;
|
101 |
-
text-shadow: 1px 0;
|
102 |
-
display: inline-block;
|
103 |
-
font-size: 15px;
|
104 |
-
}
|
105 |
-
#main_featured_themes_page #featured-themes-list li a.demo {
|
106 |
-
color: #ffffff;
|
107 |
-
background: #F47629;
|
108 |
-
border-radius: 3px;
|
109 |
-
width: 76px;
|
110 |
-
text-align:center;
|
111 |
-
margin-right: 12px;
|
112 |
-
}
|
113 |
-
#main_featured_themes_page .featured_header{
|
114 |
-
background: #11465F;
|
115 |
-
border-right: 3px solid #E5E5E5;
|
116 |
-
border-bottom: 3px solid #E5E5E5;
|
117 |
-
position: relative;
|
118 |
-
padding: 20px 0;
|
119 |
-
}
|
120 |
-
#main_featured_themes_page .featured_header .try-now {
|
121 |
-
text-align: center;
|
122 |
-
}
|
123 |
-
#main_featured_themes_page .featured_header .try-now span {
|
124 |
-
display: inline-block;
|
125 |
-
padding: 7px 16px;
|
126 |
-
background: #F47629;
|
127 |
-
border-radius: 10px;
|
128 |
-
color: #ffffff;
|
129 |
-
font-size: 23px;
|
130 |
-
}
|
131 |
-
#main_featured_themes_page .featured_container {
|
132 |
-
position: relative;
|
133 |
-
width: 90%;
|
134 |
-
margin: 15px auto 0px auto;
|
135 |
-
}
|
136 |
-
#main_featured_themes_page .featured_container .old_price{
|
137 |
-
color: rgba(180, 180, 180, 0.3);
|
138 |
-
text-decoration: line-through;
|
139 |
-
font-family: Oswald;
|
140 |
-
}
|
141 |
-
#main_featured_themes_page .featured_container .get_themes{
|
142 |
-
color: #FFFFFF;
|
143 |
-
height: 85px;
|
144 |
-
margin: 0;
|
145 |
-
background-size: 95% 100%;
|
146 |
-
background-position: center;
|
147 |
-
line-height: 60px;
|
148 |
-
font-size: 45px;
|
149 |
-
text-align: center;
|
150 |
-
letter-spacing: 3px;
|
151 |
-
}
|
152 |
-
#main_featured_themes_page .featured_header h1{
|
153 |
-
font-size: 45px;
|
154 |
-
text-align: center;
|
155 |
-
color: #ffffff;
|
156 |
-
letter-spacing: 3px;
|
157 |
-
line-height: 10px;
|
158 |
-
}
|
159 |
-
#main_featured_themes_page .featured_header a{
|
160 |
-
text-decoration: none;
|
161 |
-
}
|
162 |
-
@media screen and (max-width: 1035px) {
|
163 |
-
#main_featured_themes_page .featured_header h1{
|
164 |
-
font-size: 37px;
|
165 |
-
line-height: 0;
|
166 |
-
}
|
167 |
-
}
|
168 |
-
@media screen and (max-width: 835px) {
|
169 |
-
#main_featured_themes_page .get_themes span{
|
170 |
-
display: none;
|
171 |
-
}
|
172 |
-
}
|
173 |
-
@media screen and (max-width: 435px) {
|
174 |
-
#main_featured_themes_page .featured_header h1 {
|
175 |
-
font-size: 20px;
|
176 |
-
line-height: 17px;
|
177 |
-
}
|
178 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
featured/featured_themes.php
DELETED
@@ -1,104 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
function fm_featured_themes_page() {
|
3 |
-
|
4 |
-
$slug = 'formmaker';
|
5 |
-
$image_url = WD_FM_URL . "/featured/images/";
|
6 |
-
$demo_url = 'http://themedemo.web-dorado.com/';
|
7 |
-
$site_url = 'https://web-dorado.com/wordpress-themes/';
|
8 |
-
|
9 |
-
|
10 |
-
$WDWThemes = array(
|
11 |
-
"business_elite" => array(
|
12 |
-
"title" => "Business Elite",
|
13 |
-
"description" =>"Business Elite is a robust parallax theme for business websites. The theme uses smooth transitions and many functional sections.",
|
14 |
-
"link" => "business-elite.html",
|
15 |
-
"demo" => "theme-businesselite",
|
16 |
-
"image" => "business_elite.jpg"
|
17 |
-
),
|
18 |
-
"portfolio" => array(
|
19 |
-
"title" => "Portfolio Gallery",
|
20 |
-
"description" =>"Portfolio Gallery helps to display images using various color schemes and layouts combined with elegant fonts and content parts.",
|
21 |
-
"link" => "portfolio-gallery.html",
|
22 |
-
"demo" => "theme-portfoliogallery",
|
23 |
-
"image" => "portfolio_gallery.jpg"
|
24 |
-
),
|
25 |
-
"sauron" => array(
|
26 |
-
"title" => "Sauron",
|
27 |
-
"description" =>"Sauron is a multipurpose parallax theme, which uses multiple interactive sections designed for the client-engagement.",
|
28 |
-
"link" => "sauron.html",
|
29 |
-
"demo" => "theme-sauron",
|
30 |
-
"image" => "sauron.jpg"
|
31 |
-
),
|
32 |
-
"business_world" => array(
|
33 |
-
"title" => "Business World",
|
34 |
-
"description" => "Business World is an innovative WordPress theme great for Business websites.",
|
35 |
-
"link" => "business-world.html",
|
36 |
-
"demo" => "theme-businessworld",
|
37 |
-
"image" => "business_world.jpg"
|
38 |
-
),
|
39 |
-
"best_magazine" => array(
|
40 |
-
"title" => "Best Magazine",
|
41 |
-
"description" =>"Best Magazine is an ultimate selection when you are dealing with multi-category news websites.",
|
42 |
-
"link" => "best-magazine.html",
|
43 |
-
"demo" => "theme-bestmagazine",
|
44 |
-
"image" => "best_magazine.jpg"
|
45 |
-
),
|
46 |
-
"magazine" => array(
|
47 |
-
"title" => "News Magazine",
|
48 |
-
"description" =>"Magazine theme is a perfect solution when creating news and informational websites. It comes with a wide range of layout options.",
|
49 |
-
"link" => "news-magazine.html",
|
50 |
-
"demo" => "theme-newsmagazine",
|
51 |
-
"image" => "news_magazine.jpg"
|
52 |
-
)
|
53 |
-
);
|
54 |
-
?>
|
55 |
-
|
56 |
-
<style>
|
57 |
-
|
58 |
-
#main_featured_themes_page #featured-themes-list li a.download {
|
59 |
-
padding-right: 30px;
|
60 |
-
background:url(<?php echo $image_url; ?>down.png) no-repeat right;
|
61 |
-
}
|
62 |
-
|
63 |
-
</style>
|
64 |
-
|
65 |
-
|
66 |
-
<div id="main_featured_themes_page">
|
67 |
-
<div class="featured_container">
|
68 |
-
<div class="page_header">
|
69 |
-
<h1><?php echo "Featured Themes"; ?></h1>
|
70 |
-
</div>
|
71 |
-
<div class="featured_header">
|
72 |
-
<a target="_blank" href="https://web-dorado.com/wordpress-themes.html?source=<?php echo $slug; ?>">
|
73 |
-
<h1><?php echo "WORDPRESS THEMES"; ?></h1>
|
74 |
-
<h2 class="get_themes"><?php echo "ALL FOR $40 ONLY "; ?><span>- <?php echo "SAVE 80%"; ?></span></h2>
|
75 |
-
<div class="try-now">
|
76 |
-
<span><?php echo "TRY NOW"; ?></span>
|
77 |
-
</div>
|
78 |
-
</a>
|
79 |
-
</div>
|
80 |
-
<ul id="featured-themes-list">
|
81 |
-
<?php foreach($WDWThemes as $key=>$WDWTheme) : ?>
|
82 |
-
<li class="<?php echo $key; ?>">
|
83 |
-
<div class="theme_img">
|
84 |
-
<img src="<?php echo $image_url . $WDWTheme["image"]; ?>">
|
85 |
-
</div>
|
86 |
-
<div class="title">
|
87 |
-
<h3 class="heading"><?php echo $WDWTheme["title"]; ?></h3>
|
88 |
-
</div>
|
89 |
-
<div class="description">
|
90 |
-
<p><?php echo $WDWTheme["description"]; ?></p>
|
91 |
-
</div>
|
92 |
-
<div class="links">
|
93 |
-
<a target="_blank" href="<?php echo $demo_url . $WDWTheme["demo"]."?source=".$slug; ?>" class="demo"><?php echo "Demo"; ?></a>
|
94 |
-
<a target="_blank" href="<?php echo $site_url . $WDWTheme["link"]."?source=".$slug; ?>" class="download"><?php echo "Free Download"; ?></a>
|
95 |
-
</div>
|
96 |
-
</li>
|
97 |
-
<?php endforeach; ?>
|
98 |
-
</ul>
|
99 |
-
</div>
|
100 |
-
</div>
|
101 |
-
|
102 |
-
|
103 |
-
<?php }
|
104 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
featured/images/best_magazine.jpg
DELETED
Binary file
|
featured/images/best_magazine.png
DELETED
Binary file
|
featured/images/business_elite.jpg
DELETED
Binary file
|
featured/images/business_elite.png
DELETED
Binary file
|
featured/images/business_world.jpg
DELETED
Binary file
|
featured/images/business_world.png
DELETED
Binary file
|
featured/images/catalog.png
DELETED
Binary file
|
featured/images/contact.builder.png
DELETED
Binary file
|
featured/images/contact.maker.png
DELETED
Binary file
|
featured/images/contacts.png
DELETED
Binary file
|
featured/images/download_themes.png
DELETED
Binary file
|
featured/images/ecommerce.png
DELETED
Binary file
|
featured/images/exclusive.png
DELETED
Binary file
|
featured/images/expert.png
DELETED
Binary file
|
featured/images/facebook-feed.png
DELETED
Binary file
|
featured/images/facebook.png
DELETED
Binary file
|
featured/images/faq.png
DELETED
Binary file
|
featured/images/faq_wd.png
DELETED
Binary file
|
featured/images/featured_plugins_bg.png
DELETED
Binary file
|
featured/images/flash.calendar.png
DELETED
Binary file
|
featured/images/folder.menu.png
DELETED
Binary file
|
featured/images/magazine.png
DELETED
Binary file
|
featured/images/mottomag.png
DELETED
Binary file
|
featured/images/news_magazine.jpg
DELETED
Binary file
|
featured/images/player.png
DELETED
Binary file
|
featured/images/portfolio.png
DELETED
Binary file
|
featured/images/portfolio_gallery.jpg
DELETED
Binary file
|
featured/images/post-slider.png
DELETED
Binary file
|
featured/images/random.post.png
DELETED
Binary file
|
featured/images/sauron.jpg
DELETED
Binary file
|
featured/images/sauron.png
DELETED
Binary file
|
featured/images/twittertools.png
DELETED
Binary file
|
featured/images/wedding.png
DELETED
Binary file
|
featured/images/wedding_style.png
DELETED
Binary file
|
featured/images/zoom.png
DELETED
Binary file
|
fm_admin_class.php
CHANGED
@@ -2,8 +2,6 @@
|
|
2 |
|
3 |
class FM_Admin {
|
4 |
public static $instance = null;
|
5 |
-
protected $notices = null;
|
6 |
-
|
7 |
public static function get_instance() {
|
8 |
if (null == self::$instance) {
|
9 |
self::$instance = new self;
|
@@ -13,32 +11,5 @@ class FM_Admin {
|
|
13 |
}
|
14 |
|
15 |
private function __construct() {
|
16 |
-
$this->notices = new FM_Notices();
|
17 |
-
add_action('admin_init', array($this, 'admin_notice_ignore'));
|
18 |
-
add_action('admin_notices', array($this, 'fm_admin_notices'));
|
19 |
-
}
|
20 |
-
|
21 |
-
function fm_admin_notices() {
|
22 |
-
// Notices filter and run the notices function.
|
23 |
-
|
24 |
-
$admin_notices = apply_filters('fm_admin_notices', array());
|
25 |
-
$this->notices->admin_notice($admin_notices);
|
26 |
-
|
27 |
-
}
|
28 |
-
|
29 |
-
// Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
|
30 |
-
public function admin_notice_ignore() {
|
31 |
-
|
32 |
-
$slug = (isset($_GET['fm_admin_notice_ignore'])) ? $_GET['fm_admin_notice_ignore'] : '';
|
33 |
-
// If user clicks to ignore the notice, run this action
|
34 |
-
if (isset($_GET['fm_admin_notice_ignore']) && current_user_can('manage_options')) {
|
35 |
-
|
36 |
-
$admin_notices_option = get_option('fm_admin_notice', array());
|
37 |
-
$admin_notices_option[$_GET['fm_admin_notice_ignore']]['dismissed'] = 1;
|
38 |
-
update_option('fm_admin_notice', $admin_notices_option);
|
39 |
-
$query_str = remove_query_arg('fm_admin_notice_ignore');
|
40 |
-
wp_redirect($query_str);
|
41 |
-
exit;
|
42 |
-
}
|
43 |
}
|
44 |
}
|
2 |
|
3 |
class FM_Admin {
|
4 |
public static $instance = null;
|
|
|
|
|
5 |
public static function get_instance() {
|
6 |
if (null == self::$instance) {
|
7 |
self::$instance = new self;
|
11 |
}
|
12 |
|
13 |
private function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
}
|
form-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
-
* Version: 1.11.
|
7 |
* Author: WebDorado Form Builder Team
|
8 |
* Author URI: https://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -11,45 +11,46 @@
|
|
11 |
define('WD_FM_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
12 |
define('WD_FM_URL', plugins_url(plugin_basename(dirname(__FILE__))));
|
13 |
define('WD_MAIN_FILE', plugin_basename(__FILE__));
|
14 |
-
define('WD_FM_VERSION', '1.11.
|
15 |
// Plugin menu.
|
16 |
function form_maker_options_panel() {
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
-
add_menu_page('Form Maker', 'Form Maker', 'manage_options', 'manage_fm', 'form_maker', WD_FM_URL . '/images/FormMakerLogo-16.png', 105.105);
|
19 |
add_menu_page('Form Maker Add-ons', 'Form Maker Add-ons', 'manage_options', 'extensions_fm', 'fm_extensions', WD_FM_URL . '/assets/add-ons-icon.png');
|
20 |
|
21 |
-
$manage_page = add_submenu_page(
|
22 |
add_action('admin_print_styles-' . $manage_page, 'form_maker_manage_styles');
|
23 |
add_action('admin_print_scripts-' . $manage_page, 'form_maker_manage_scripts');
|
24 |
|
25 |
-
$submissions_page = add_submenu_page(
|
26 |
add_action('admin_print_styles-' . $submissions_page, 'form_maker_submissions_styles');
|
27 |
add_action('admin_print_scripts-' . $submissions_page, 'form_maker_submissions_scripts');
|
28 |
|
29 |
if (defined('WD_FM_SAVE_PROG') && is_plugin_active(constant('WD_FM_SAVE_PROG'))) {
|
30 |
-
$saved_entries_page = add_submenu_page(
|
31 |
add_action('admin_print_styles-' . $saved_entries_page, 'form_maker_submissions_styles');
|
32 |
add_action('admin_print_scripts-' . $saved_entries_page, 'form_maker_submissions_scripts');
|
33 |
}
|
34 |
|
35 |
-
$blocked_ips_page = add_submenu_page(
|
36 |
add_action('admin_print_styles-' . $blocked_ips_page, 'form_maker_manage_styles');
|
37 |
add_action('admin_print_scripts-' . $blocked_ips_page, 'form_maker_manage_scripts');
|
38 |
|
39 |
-
$themes_page = add_submenu_page(
|
40 |
add_action('admin_print_styles-' . $themes_page, 'form_maker_manage_styles');
|
41 |
add_action('admin_print_scripts-' . $themes_page, 'form_maker_manage_scripts');
|
42 |
|
43 |
-
$global_options_page = add_submenu_page(
|
44 |
add_action('admin_print_styles-' . $global_options_page, 'form_maker_manage_styles');
|
45 |
add_action('admin_print_scripts-' . $global_options_page, 'form_maker_manage_scripts');
|
46 |
|
47 |
-
$licensing_plugins_page = add_submenu_page(
|
48 |
-
|
49 |
-
add_submenu_page('manage_fm', 'Featured Plugins', 'Featured Plugins', 'manage_options', 'featured_plugins_fm', 'fm_featured');
|
50 |
-
add_submenu_page('manage_fm', 'Featured Themes', 'Featured Themes', 'manage_options', 'featured_themes_fm', 'fm_featured_themes');
|
51 |
|
52 |
-
$uninstall_page = add_submenu_page(
|
53 |
add_action('admin_print_styles-' . $uninstall_page, 'form_maker_styles');
|
54 |
add_action('admin_print_scripts-' . $uninstall_page, 'form_maker_scripts');
|
55 |
}
|
@@ -66,7 +67,7 @@ function form_maker() {
|
|
66 |
}
|
67 |
require_once(WD_FM_DIR . '/framework/WDW_FM_Library.php');
|
68 |
$page = WDW_FM_Library::get('page');
|
69 |
-
if (($page != '') && (($page == 'manage_fm') || ($page == 'goptions_fm') || ($page == 'submissions_fm') || ($page == 'blocked_ips_fm') || ($page == 'themes_fm') || ($page == '
|
70 |
require_once (WD_FM_DIR . '/admin/controllers/FMController' . ucfirst(strtolower($page)) . '.php');
|
71 |
$controller_class = 'FMController' . ucfirst(strtolower($page));
|
72 |
$controller = new $controller_class();
|
@@ -74,36 +75,6 @@ function form_maker() {
|
|
74 |
}
|
75 |
}
|
76 |
|
77 |
-
function fm_featured() {
|
78 |
-
if (function_exists('current_user_can')) {
|
79 |
-
if (!current_user_can('manage_options')) {
|
80 |
-
die('Access Denied');
|
81 |
-
}
|
82 |
-
}
|
83 |
-
else {
|
84 |
-
die('Access Denied');
|
85 |
-
}
|
86 |
-
require_once(WD_FM_DIR . '/featured/featured.php');
|
87 |
-
wp_register_style('fm_featured', WD_FM_URL . '/featured/style.css', array(), WD_FM_VERSION);
|
88 |
-
wp_print_styles('fm_featured');
|
89 |
-
fm_featured_page('form-maker');
|
90 |
-
}
|
91 |
-
|
92 |
-
function fm_featured_themes() {
|
93 |
-
if (function_exists('current_user_can')) {
|
94 |
-
if (!current_user_can('manage_options')) {
|
95 |
-
die('Access Denied');
|
96 |
-
}
|
97 |
-
}
|
98 |
-
else {
|
99 |
-
die('Access Denied');
|
100 |
-
}
|
101 |
-
require_once(WD_FM_DIR . '/featured/featured_themes.php');
|
102 |
-
wp_register_style('fm_featured_themes', WD_FM_URL . '/featured/featured_themes.css', array(), WD_FM_VERSION);
|
103 |
-
wp_print_styles('fm_featured_themes');
|
104 |
-
fm_featured_themes_page('form-maker');
|
105 |
-
}
|
106 |
-
|
107 |
|
108 |
function fm_extensions() {
|
109 |
if (function_exists('current_user_can')) {
|
@@ -141,7 +112,6 @@ add_action('wp_ajax_manage_fm', 'form_maker_ajax'); //Show statistics
|
|
141 |
|
142 |
if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
|
143 |
require_once( 'fm_admin_class.php' );
|
144 |
-
include_once('form_maker_notices_class.php');
|
145 |
add_action( 'plugins_loaded', array( 'FM_Admin', 'get_instance' ) );
|
146 |
}
|
147 |
|
@@ -296,7 +266,7 @@ function register_fmemailverification_cpt(){
|
|
296 |
// Activate plugin.
|
297 |
function form_maker_activate() {
|
298 |
$version = get_option("wd_form_maker_version");
|
299 |
-
$new_version =
|
300 |
|
301 |
global $wpdb;
|
302 |
if (!$version) {
|
@@ -462,9 +432,18 @@ function form_maker_submissions_scripts() {
|
|
462 |
|
463 |
function form_maker_styles() {
|
464 |
wp_enqueue_style('form_maker_tables', WD_FM_URL . '/css/form_maker_tables.css', array(), WD_FM_VERSION);
|
|
|
465 |
}
|
466 |
function form_maker_scripts() {
|
467 |
wp_enqueue_script('form_maker_admin', WD_FM_URL . '/js/form_maker_admin.js', array(), WD_FM_VERSION);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
}
|
469 |
|
470 |
$form_maker_generate_action = 0;
|
@@ -539,9 +518,10 @@ function fm_topic() {
|
|
539 |
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
|
540 |
$user_guide_link = 'https://web-dorado.com/wordpress-form-maker/';
|
541 |
$support_forum_link = 'https://wordpress.org/support/plugin/form-maker';
|
|
|
542 |
$pro_link = 'https://web-dorado.com/files/fromFormMaker.php';
|
543 |
$support_icon = WD_FM_URL . '/images/support.png';
|
544 |
-
$prefix = '
|
545 |
$is_free = TRUE;
|
546 |
switch ($page) {
|
547 |
case 'blocked_ips_fm': {
|
@@ -601,88 +581,203 @@ function fm_topic() {
|
|
601 |
background-color: #ffffff;
|
602 |
border: none;
|
603 |
box-sizing: border-box;
|
604 |
-
display: inline-block;
|
605 |
clear: both;
|
606 |
color: #6e7990;
|
607 |
font-size: 14px;
|
608 |
font-weight: bold;
|
609 |
-
line-height:
|
610 |
-
padding:
|
611 |
vertical-align: middle;
|
612 |
width: 98%;
|
613 |
}
|
614 |
-
|
615 |
.wd_topic .wd_help_topic {
|
616 |
float: left;
|
617 |
}
|
618 |
-
|
619 |
.wd_topic .wd_help_topic a {
|
620 |
color: #0073aa;
|
621 |
}
|
622 |
-
|
623 |
.wd_topic .wd_help_topic a:hover {
|
624 |
color: #00A0D2;
|
625 |
}
|
626 |
-
|
627 |
.wd_topic .wd_support {
|
628 |
float: right;
|
629 |
margin: 0 10px;
|
630 |
}
|
631 |
-
|
632 |
.wd_topic .wd_support img {
|
633 |
vertical-align: middle;
|
634 |
}
|
635 |
-
|
636 |
.wd_topic .wd_support a {
|
637 |
text-decoration: none;
|
638 |
color: #6E7990;
|
639 |
}
|
640 |
-
|
641 |
.wd_topic .wd_pro {
|
642 |
float: right;
|
643 |
-
|
644 |
-
padding: 0 10px;
|
645 |
}
|
646 |
-
|
647 |
.wd_topic .wd_pro a {
|
648 |
border: none;
|
649 |
box-shadow: none !important;
|
650 |
-
color: #FFFFFF;
|
651 |
text-decoration: none;
|
652 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
</style>
|
654 |
-
<div class="wd_topic">
|
655 |
<?php
|
656 |
if ($help_text) {
|
657 |
?>
|
658 |
<span class="wd_help_topic">
|
659 |
-
|
660 |
<a target="_blank" href="<?php echo $user_guide_link; ?>">
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
<?php
|
665 |
}
|
666 |
if ($is_free) {
|
667 |
$text = strtoupper(__('Upgrade to paid version', $prefix));
|
668 |
?>
|
669 |
-
<
|
670 |
<a target="_blank" href="<?php echo $pro_link; ?>">
|
|
|
671 |
<span><?php echo $text; ?></span>
|
672 |
</a>
|
673 |
-
</
|
674 |
<?php
|
675 |
}
|
676 |
-
|
677 |
-
|
|
|
678 |
<a target="_blank" href="<?php echo $support_forum_link; ?>">
|
679 |
-
<img src="<?php echo $support_icon; ?>"/>
|
680 |
<?php _e('Support Forum', $prefix); ?>
|
681 |
</a>
|
682 |
</span>
|
|
|
|
|
|
|
683 |
</div>
|
684 |
<?php
|
685 |
echo ob_get_clean();
|
686 |
}
|
687 |
|
688 |
add_action('admin_notices', 'fm_topic', 11);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
+
* Version: 1.11.2
|
7 |
* Author: WebDorado Form Builder Team
|
8 |
* Author URI: https://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
define('WD_FM_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
12 |
define('WD_FM_URL', plugins_url(plugin_basename(dirname(__FILE__))));
|
13 |
define('WD_MAIN_FILE', plugin_basename(__FILE__));
|
14 |
+
define('WD_FM_VERSION', '1.11.2');
|
15 |
// Plugin menu.
|
16 |
function form_maker_options_panel() {
|
17 |
+
$parent_slug = null;
|
18 |
+
if( get_option( "fm_subscribe_done" ) == 1 ) {
|
19 |
+
add_menu_page('Form Maker', 'Form Maker', 'manage_options', 'manage_fm', 'form_maker', WD_FM_URL . '/images/FormMakerLogo-16.png', 105.105);
|
20 |
+
$parent_slug = "manage_fm";
|
21 |
+
}
|
22 |
|
|
|
23 |
add_menu_page('Form Maker Add-ons', 'Form Maker Add-ons', 'manage_options', 'extensions_fm', 'fm_extensions', WD_FM_URL . '/assets/add-ons-icon.png');
|
24 |
|
25 |
+
$manage_page = add_submenu_page($parent_slug, 'Manager', 'Manager', 'manage_options', 'manage_fm', 'form_maker');
|
26 |
add_action('admin_print_styles-' . $manage_page, 'form_maker_manage_styles');
|
27 |
add_action('admin_print_scripts-' . $manage_page, 'form_maker_manage_scripts');
|
28 |
|
29 |
+
$submissions_page = add_submenu_page($parent_slug, 'Submissions', 'Submissions', 'manage_options', 'submissions_fm', 'form_maker');
|
30 |
add_action('admin_print_styles-' . $submissions_page, 'form_maker_submissions_styles');
|
31 |
add_action('admin_print_scripts-' . $submissions_page, 'form_maker_submissions_scripts');
|
32 |
|
33 |
if (defined('WD_FM_SAVE_PROG') && is_plugin_active(constant('WD_FM_SAVE_PROG'))) {
|
34 |
+
$saved_entries_page = add_submenu_page($parent_slug, 'Saved Entries', 'Saved Entries', 'manage_options', 'saved_entries', 'fm_saved_entries');
|
35 |
add_action('admin_print_styles-' . $saved_entries_page, 'form_maker_submissions_styles');
|
36 |
add_action('admin_print_scripts-' . $saved_entries_page, 'form_maker_submissions_scripts');
|
37 |
}
|
38 |
|
39 |
+
$blocked_ips_page = add_submenu_page($parent_slug, 'Blocked IPs', 'Blocked IPs', 'manage_options', 'blocked_ips_fm', 'form_maker');
|
40 |
add_action('admin_print_styles-' . $blocked_ips_page, 'form_maker_manage_styles');
|
41 |
add_action('admin_print_scripts-' . $blocked_ips_page, 'form_maker_manage_scripts');
|
42 |
|
43 |
+
$themes_page = add_submenu_page($parent_slug, 'Themes', 'Themes', 'manage_options', 'themes_fm', 'form_maker');
|
44 |
add_action('admin_print_styles-' . $themes_page, 'form_maker_manage_styles');
|
45 |
add_action('admin_print_scripts-' . $themes_page, 'form_maker_manage_scripts');
|
46 |
|
47 |
+
$global_options_page = add_submenu_page($parent_slug, 'Global Options', 'Global Options', 'manage_options', 'goptions_fm', 'form_maker');
|
48 |
add_action('admin_print_styles-' . $global_options_page, 'form_maker_manage_styles');
|
49 |
add_action('admin_print_scripts-' . $global_options_page, 'form_maker_manage_scripts');
|
50 |
|
51 |
+
$licensing_plugins_page = add_submenu_page($parent_slug, 'Pro Version', 'Pro Version', 'manage_options', 'licensing_fm', 'form_maker');
|
|
|
|
|
|
|
52 |
|
53 |
+
$uninstall_page = add_submenu_page($parent_slug, 'Uninstall', 'Uninstall', 'manage_options', 'uninstall_fm', 'form_maker');
|
54 |
add_action('admin_print_styles-' . $uninstall_page, 'form_maker_styles');
|
55 |
add_action('admin_print_scripts-' . $uninstall_page, 'form_maker_scripts');
|
56 |
}
|
67 |
}
|
68 |
require_once(WD_FM_DIR . '/framework/WDW_FM_Library.php');
|
69 |
$page = WDW_FM_Library::get('page');
|
70 |
+
if (($page != '') && (($page == 'manage_fm') || ($page == 'goptions_fm') || ($page == 'submissions_fm') || ($page == 'blocked_ips_fm') || ($page == 'themes_fm') || ($page == 'uninstall_fm') || ($page == 'formmakerwindow') || ($page == 'extensions_fm') || ($page == 'licensing_fm'))) {
|
71 |
require_once (WD_FM_DIR . '/admin/controllers/FMController' . ucfirst(strtolower($page)) . '.php');
|
72 |
$controller_class = 'FMController' . ucfirst(strtolower($page));
|
73 |
$controller = new $controller_class();
|
75 |
}
|
76 |
}
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
function fm_extensions() {
|
80 |
if (function_exists('current_user_can')) {
|
112 |
|
113 |
if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
|
114 |
require_once( 'fm_admin_class.php' );
|
|
|
115 |
add_action( 'plugins_loaded', array( 'FM_Admin', 'get_instance' ) );
|
116 |
}
|
117 |
|
266 |
// Activate plugin.
|
267 |
function form_maker_activate() {
|
268 |
$version = get_option("wd_form_maker_version");
|
269 |
+
$new_version = WD_FM_VERSION;
|
270 |
|
271 |
global $wpdb;
|
272 |
if (!$version) {
|
432 |
|
433 |
function form_maker_styles() {
|
434 |
wp_enqueue_style('form_maker_tables', WD_FM_URL . '/css/form_maker_tables.css', array(), WD_FM_VERSION);
|
435 |
+
wp_enqueue_style('fm_deactivate-css', WD_FM_URL . '/wd/assets/css/deactivate_popup.css', array(), WD_FM_VERSION);
|
436 |
}
|
437 |
function form_maker_scripts() {
|
438 |
wp_enqueue_script('form_maker_admin', WD_FM_URL . '/js/form_maker_admin.js', array(), WD_FM_VERSION);
|
439 |
+
wp_enqueue_script('fm-deactivate-popup', WD_FM_URL . '/wd/assets/js/deactivate_popup.js', array(), WD_FM_VERSION, true );
|
440 |
+
$admin_data = wp_get_current_user();
|
441 |
+
wp_localize_script( 'fm-deactivate-popup', 'fmWDDeactivateVars', array(
|
442 |
+
"prefix" => "fm" ,
|
443 |
+
"deactivate_class" => 'fm_deactivate_link',
|
444 |
+
"email" => $admin_data->data->user_email,
|
445 |
+
"plugin_wd_url" => "https://web-dorado.com/products/wordpress-form.html",
|
446 |
+
));
|
447 |
}
|
448 |
|
449 |
$form_maker_generate_action = 0;
|
518 |
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
|
519 |
$user_guide_link = 'https://web-dorado.com/wordpress-form-maker/';
|
520 |
$support_forum_link = 'https://wordpress.org/support/plugin/form-maker';
|
521 |
+
$pro_icon = WD_FM_URL . '/images/wd_logo.png';
|
522 |
$pro_link = 'https://web-dorado.com/files/fromFormMaker.php';
|
523 |
$support_icon = WD_FM_URL . '/images/support.png';
|
524 |
+
$prefix = 'form_maker';
|
525 |
$is_free = TRUE;
|
526 |
switch ($page) {
|
527 |
case 'blocked_ips_fm': {
|
581 |
background-color: #ffffff;
|
582 |
border: none;
|
583 |
box-sizing: border-box;
|
|
|
584 |
clear: both;
|
585 |
color: #6e7990;
|
586 |
font-size: 14px;
|
587 |
font-weight: bold;
|
588 |
+
line-height: 44px;
|
589 |
+
padding: 0 0 0 15px;
|
590 |
vertical-align: middle;
|
591 |
width: 98%;
|
592 |
}
|
|
|
593 |
.wd_topic .wd_help_topic {
|
594 |
float: left;
|
595 |
}
|
|
|
596 |
.wd_topic .wd_help_topic a {
|
597 |
color: #0073aa;
|
598 |
}
|
|
|
599 |
.wd_topic .wd_help_topic a:hover {
|
600 |
color: #00A0D2;
|
601 |
}
|
|
|
602 |
.wd_topic .wd_support {
|
603 |
float: right;
|
604 |
margin: 0 10px;
|
605 |
}
|
|
|
606 |
.wd_topic .wd_support img {
|
607 |
vertical-align: middle;
|
608 |
}
|
|
|
609 |
.wd_topic .wd_support a {
|
610 |
text-decoration: none;
|
611 |
color: #6E7990;
|
612 |
}
|
|
|
613 |
.wd_topic .wd_pro {
|
614 |
float: right;
|
615 |
+
padding: 0;
|
|
|
616 |
}
|
|
|
617 |
.wd_topic .wd_pro a {
|
618 |
border: none;
|
619 |
box-shadow: none !important;
|
|
|
620 |
text-decoration: none;
|
621 |
}
|
622 |
+
.wd_topic .wd_pro img {
|
623 |
+
border: none;
|
624 |
+
display: inline-block;
|
625 |
+
vertical-align: middle;
|
626 |
+
}
|
627 |
+
.wd_topic .wd_pro a,
|
628 |
+
.wd_topic .wd_pro a:active,
|
629 |
+
.wd_topic .wd_pro a:visited,
|
630 |
+
.wd_topic .wd_pro a:hover {
|
631 |
+
background-color: #D8D8D8;
|
632 |
+
color: #175c8b;
|
633 |
+
display: inline-block;
|
634 |
+
font-size: 11px;
|
635 |
+
font-weight: bold;
|
636 |
+
padding: 0 10px;
|
637 |
+
vertical-align: middle;
|
638 |
+
}
|
639 |
</style>
|
640 |
+
<div class="update-nag wd_topic">
|
641 |
<?php
|
642 |
if ($help_text) {
|
643 |
?>
|
644 |
<span class="wd_help_topic">
|
645 |
+
<?php echo sprintf(__('This section allows you to %s.', $prefix), $help_text); ?>
|
646 |
<a target="_blank" href="<?php echo $user_guide_link; ?>">
|
647 |
+
<?php _e('Read More in User Manual', $prefix); ?>
|
648 |
+
</a>
|
649 |
+
</span>
|
650 |
<?php
|
651 |
}
|
652 |
if ($is_free) {
|
653 |
$text = strtoupper(__('Upgrade to paid version', $prefix));
|
654 |
?>
|
655 |
+
<div class="wd_pro">
|
656 |
<a target="_blank" href="<?php echo $pro_link; ?>">
|
657 |
+
<img alt="web-dorado.com" title="<?php echo $text; ?>" src="<?php echo $pro_icon; ?>" />
|
658 |
<span><?php echo $text; ?></span>
|
659 |
</a>
|
660 |
+
</div>
|
661 |
<?php
|
662 |
}
|
663 |
+
if (FALSE) {
|
664 |
+
?>
|
665 |
+
<span class="wd_support">
|
666 |
<a target="_blank" href="<?php echo $support_forum_link; ?>">
|
667 |
+
<img src="<?php echo $support_icon; ?>" />
|
668 |
<?php _e('Support Forum', $prefix); ?>
|
669 |
</a>
|
670 |
</span>
|
671 |
+
<?php
|
672 |
+
}
|
673 |
+
?>
|
674 |
</div>
|
675 |
<?php
|
676 |
echo ob_get_clean();
|
677 |
}
|
678 |
|
679 |
add_action('admin_notices', 'fm_topic', 11);
|
680 |
+
|
681 |
+
function fm_overview() {
|
682 |
+
if (is_admin() && !isset($_REQUEST['ajax'])) {
|
683 |
+
if (!class_exists("DoradoWeb")) {
|
684 |
+
require_once(WD_FM_DIR . '/wd/start.php');
|
685 |
+
}
|
686 |
+
global $fm_options;
|
687 |
+
$fm_options = array(
|
688 |
+
"prefix" => "fm",
|
689 |
+
"wd_plugin_id" => 31,
|
690 |
+
"plugin_title" => "Form Maker",
|
691 |
+
"plugin_wordpress_slug" => "form-maker",
|
692 |
+
"plugin_dir" => WD_FM_DIR,
|
693 |
+
"plugin_main_file" => __FILE__,
|
694 |
+
"description" => __('Form Maker plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.', 'form_maker'),
|
695 |
+
// from web-dorado.com
|
696 |
+
"plugin_features" => array(
|
697 |
+
0 => array(
|
698 |
+
"title" => __("Easy to Use", "form_maker"),
|
699 |
+
"description" => __("This responsive form maker plugin is one of the most easy-to-use form builder solutions available on the market. Simple, yet powerful plugin allows you to quickly and easily build any complex forms.", "form_maker"),
|
700 |
+
),
|
701 |
+
1 => array(
|
702 |
+
"title" => __("Customizable Fields", "form_maker"),
|
703 |
+
"description" => __("All the fields of Form Maker plugin are highly customizable, which allows you to change almost every detail in the form and make it look exactly like you want it to be.", "form_maker"),
|
704 |
+
),
|
705 |
+
2 => array(
|
706 |
+
"title" => __("Submissions", "form_maker"),
|
707 |
+
"description" => __("You can view the submissions for each form you have. The plugin allows to view submissions statistics, filter submission data and export in csv or xml formats.", "form_maker"),
|
708 |
+
),
|
709 |
+
3 => array(
|
710 |
+
"title" => __("Multi-Page Forms", "form_maker"),
|
711 |
+
"description" => __("With the form builder plugin you can create muilti-page forms. Simply use the page break field to separate the pages in your forms.", "form_maker"),
|
712 |
+
),
|
713 |
+
4 => array(
|
714 |
+
"title" => __("Themes", "form_maker"),
|
715 |
+
"description" => __("The WordPress Form Maker plugin comes with a wide range of customizable themes. You can choose from a list of existing themes or simply create the one that better fits your brand and website.", "form_maker"),
|
716 |
+
)
|
717 |
+
),
|
718 |
+
// user guide from web-dorado.com
|
719 |
+
"user_guide" => array(
|
720 |
+
0 => array(
|
721 |
+
"main_title" => __("Installing", "form_maker"),
|
722 |
+
"url" => "https://web-dorado.com/wordpress-form-maker/installing.html",
|
723 |
+
"titles" => array()
|
724 |
+
),
|
725 |
+
1 => array(
|
726 |
+
"main_title" => __("Creating a new Form", "form_maker"),
|
727 |
+
"url" => "https://web-dorado.com/wordpress-form-maker/creating-form.html",
|
728 |
+
"titles" => array()
|
729 |
+
),
|
730 |
+
2 => array(
|
731 |
+
"main_title" => __("Configuring Form Options", "form_maker"),
|
732 |
+
"url" => "https://web-dorado.com/wordpress-form-maker/configuring-form-options.html",
|
733 |
+
"titles" => array()
|
734 |
+
),
|
735 |
+
3 => array(
|
736 |
+
"main_title" => __("Description of The Form Fields", "form_maker"),
|
737 |
+
"url" => "https://web-dorado.com/wordpress-form-maker/description-of-form-fields.html",
|
738 |
+
"titles" => array(
|
739 |
+
array(
|
740 |
+
"title" => __("Selecting Options from Database", "form_maker"),
|
741 |
+
"url" => "https://web-dorado.com/wordpress-form-maker/description-of-form-fields/selecting-options-from-database.html",
|
742 |
+
),
|
743 |
+
)
|
744 |
+
),
|
745 |
+
4 => array(
|
746 |
+
"main_title" => __("Publishing the Created Form", "form_maker"),
|
747 |
+
"url" => "https://web-dorado.com/wordpress-form-maker/publishing-form.html",
|
748 |
+
"titles" => array()
|
749 |
+
),
|
750 |
+
5 => array(
|
751 |
+
"main_title" => __("Blocking IPs", "form_maker"),
|
752 |
+
"url" => "https://web-dorado.com/wordpress-form-maker/blocking-ips.html",
|
753 |
+
"titles" => array()
|
754 |
+
),
|
755 |
+
6 => array(
|
756 |
+
"main_title" => __("Managing Submissions", "form_maker"),
|
757 |
+
"url" => "https://web-dorado.com/wordpress-form-maker/managing-submissions.html",
|
758 |
+
"titles" => array()
|
759 |
+
),
|
760 |
+
7 => array(
|
761 |
+
"main_title" => __("Publishing Submissions", "form_maker"),
|
762 |
+
"url" => "https://web-dorado.com/wordpress-form-maker/publishing-submissions.html",
|
763 |
+
"titles" => array()
|
764 |
+
),
|
765 |
+
),
|
766 |
+
"video_youtube_id" => "tN3_c6MhqFk", // e.g. https://www.youtube.com/watch?v=acaexefeP7o youtube id is the acaexefeP7o
|
767 |
+
"plugin_wd_url" => "https://web-dorado.com/products/wordpress-form.html",
|
768 |
+
"plugin_wd_demo_link" => "http://wpdemo.web-dorado.com",
|
769 |
+
"plugin_wd_addons_link" => "https://web-dorado.com/products/wordpress-form/add-ons.html",
|
770 |
+
"after_subscribe" => admin_url('admin.php?page=overview_fm'), // this can be plagin overview page or set up page
|
771 |
+
"plugin_wizard_link" => '',
|
772 |
+
"plugin_menu_title" => "Form Maker",
|
773 |
+
"plugin_menu_icon" => WD_FM_URL . '/images/FormMakerLogo-16.png',
|
774 |
+
"deactivate" => true,
|
775 |
+
"subscribe" => true,
|
776 |
+
"custom_post" => 'manage_fm',
|
777 |
+
"menu_position" => null,
|
778 |
+
);
|
779 |
+
|
780 |
+
dorado_web_init($fm_options);
|
781 |
+
}
|
782 |
+
}
|
783 |
+
add_action('init', 'fm_overview');
|
form_maker_notices_class.php
DELETED
@@ -1,267 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
-
exit;
|
5 |
-
}
|
6 |
-
|
7 |
-
/**
|
8 |
-
* FM_Notices Class
|
9 |
-
*
|
10 |
-
*/
|
11 |
-
class FM_Notices {
|
12 |
-
static $instance;
|
13 |
-
|
14 |
-
public static function instance() {
|
15 |
-
if ( ! isset( self::$instance ) ) {
|
16 |
-
self::$instance = new FM_Notices();
|
17 |
-
}
|
18 |
-
|
19 |
-
return self::$instance;
|
20 |
-
}
|
21 |
-
|
22 |
-
public $notice_spam = 0;
|
23 |
-
public $notice_spam_max = 1;
|
24 |
-
|
25 |
-
// Basic actions to run
|
26 |
-
public function __construct() {
|
27 |
-
|
28 |
-
// Runs the admin notice ignore function incase a dismiss button has been clicked
|
29 |
-
add_action( 'admin_init', array( $this, 'admin_notice_ignore' ) );
|
30 |
-
|
31 |
-
// Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
|
32 |
-
add_action( 'admin_init', array( $this, 'admin_notice_temp_ignore' ) );
|
33 |
-
add_action('admin_notices', array($this, 'wd_admin_notices'));
|
34 |
-
|
35 |
-
}
|
36 |
-
|
37 |
-
// Checks to ensure notices aren't disabled and the user has the correct permissions.
|
38 |
-
public function fm_admin_notice() {
|
39 |
-
|
40 |
-
$fm_settings = get_option( 'fm_admin_notice' );
|
41 |
-
if ( ! isset( $fm_settings['disable_admin_notices'] ) || ( isset( $fm_settings['disable_admin_notices'] ) && $fm_settings['disable_admin_notices'] == 0 ) ) {
|
42 |
-
if ( current_user_can( 'manage_options' ) ) {
|
43 |
-
return true;
|
44 |
-
}
|
45 |
-
}
|
46 |
-
|
47 |
-
return false;
|
48 |
-
|
49 |
-
}
|
50 |
-
|
51 |
-
// Primary notice function that can be called from an outside function sending necessary variables
|
52 |
-
public function admin_notice( $admin_notices ) {
|
53 |
-
|
54 |
-
// Check options
|
55 |
-
if ( ! $this->fm_admin_notice() ) {
|
56 |
-
return false;
|
57 |
-
}
|
58 |
-
|
59 |
-
foreach ( $admin_notices as $slug => $admin_notice ) {
|
60 |
-
// Call for spam protection
|
61 |
-
if ( $this->anti_notice_spam() ) {
|
62 |
-
return false;
|
63 |
-
}
|
64 |
-
|
65 |
-
// Check for proper page to display on
|
66 |
-
if ( isset( $admin_notices[ $slug ]['pages'] ) && is_array( $admin_notices[ $slug ]['pages'] ) ) {
|
67 |
-
if ( ! $this->admin_notice_pages( $admin_notices[ $slug ]['pages'] ) ) {
|
68 |
-
return false;
|
69 |
-
}
|
70 |
-
}
|
71 |
-
// Check for required fields
|
72 |
-
if ( ! $this->required_fields( $admin_notices[ $slug ] ) ) {
|
73 |
-
// Get the current date then set start date to either passed value or current date value and add interval
|
74 |
-
$current_date = current_time( "n/j/Y" );
|
75 |
-
$start = ( isset( $admin_notices[ $slug ]['start'] ) ? $admin_notices[ $slug ]['start'] : $current_date );
|
76 |
-
$start = date( "n/j/Y", strtotime( $start ) );
|
77 |
-
$date_array = explode( '/', $start );
|
78 |
-
$interval = ( isset( $admin_notices[ $slug ]['int'] ) ? $admin_notices[ $slug ]['int'] : 0 );
|
79 |
-
$date_array[1] += $interval;
|
80 |
-
$start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
|
81 |
-
|
82 |
-
// This is the main notices storage option
|
83 |
-
$admin_notices_option = get_option( 'fm_admin_notice', array() );
|
84 |
-
// Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
|
85 |
-
if ( ! array_key_exists( $slug, $admin_notices_option ) ) {
|
86 |
-
$admin_notices_option[ $slug ]['start'] = $start;
|
87 |
-
$admin_notices_option[ $slug ]['int'] = $interval;
|
88 |
-
update_option( 'fm_admin_notice', $admin_notices_option );
|
89 |
-
}
|
90 |
-
|
91 |
-
// Sanity check to ensure we have accurate information
|
92 |
-
// New date information will not overwrite old date information
|
93 |
-
$admin_display_check = ( isset( $admin_notices_option[ $slug ]['dismissed'] ) ? $admin_notices_option[ $slug ]['dismissed'] : 0 );
|
94 |
-
|
95 |
-
$admin_display_start = ( isset( $admin_notices_option[ $slug ]['start'] ) ? $admin_notices_option[ $slug ]['start'] : $start );
|
96 |
-
$admin_display_interval = ( isset( $admin_notices_option[ $slug ]['int'] ) ? $admin_notices_option[ $slug ]['int'] : $interval );
|
97 |
-
$admin_display_msg = ( isset( $admin_notices[ $slug ]['msg'] ) ? $admin_notices[ $slug ]['msg'] : '' );
|
98 |
-
$admin_display_title = ( isset( $admin_notices[ $slug ]['title'] ) ? $admin_notices[ $slug ]['title'] : '' );
|
99 |
-
$admin_display_link = ( isset( $admin_notices[ $slug ]['link'] ) ? $admin_notices[ $slug ]['link'] : '' );
|
100 |
-
$output_css = false;
|
101 |
-
// Ensure the notice hasn't been hidden and that the current date is after the start date
|
102 |
-
|
103 |
-
|
104 |
-
if ($admin_display_check == 0 && strtotime( $admin_display_start ) <= strtotime( $current_date )) {
|
105 |
-
|
106 |
-
// Get remaining query string
|
107 |
-
$query_str = (isset($admin_notices[$slug]['later_link']) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg('fm_admin_notice_ignore', $slug)));
|
108 |
-
|
109 |
-
// Admin notice display output
|
110 |
-
$logo_position = $slug == 'old_form' ? 'fm-notice-old-form' : '';
|
111 |
-
echo '<div class="update-nag fm-admin-notice '.$logo_position.'">';
|
112 |
-
echo '<div class="fm-notice-logo"></div>';
|
113 |
-
echo ' <p class="fm-notice-title">';
|
114 |
-
echo $admin_display_title;
|
115 |
-
echo ' </p>';
|
116 |
-
echo ' <p class="fm-notice-body">';
|
117 |
-
echo $admin_display_msg;
|
118 |
-
echo ' </p>';
|
119 |
-
echo '<ul class="fm-notice-body fm-blue">
|
120 |
-
' . $admin_display_link . '
|
121 |
-
</ul>';
|
122 |
-
echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>';
|
123 |
-
echo '</div>';
|
124 |
-
|
125 |
-
$this->notice_spam += 1;
|
126 |
-
$output_css = true;
|
127 |
-
}
|
128 |
-
if ( $output_css ) {
|
129 |
-
wp_enqueue_style( 'fm-admin-notices', WD_FM_URL .'/css/notices.css?fm_ver=' . get_option("wd_form_maker_version") );
|
130 |
-
}
|
131 |
-
}
|
132 |
-
}
|
133 |
-
}
|
134 |
-
|
135 |
-
// Spam protection check
|
136 |
-
public function anti_notice_spam() {
|
137 |
-
|
138 |
-
if ( $this->notice_spam >= $this->notice_spam_max ) {
|
139 |
-
return true;
|
140 |
-
}
|
141 |
-
|
142 |
-
return false;
|
143 |
-
}
|
144 |
-
|
145 |
-
// Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
|
146 |
-
public function admin_notice_ignore() {
|
147 |
-
|
148 |
-
// If user clicks to ignore the notice, update the option to not show it again
|
149 |
-
if ( isset( $_GET['fm_admin_notice_ignore'] ) ) {
|
150 |
-
|
151 |
-
$admin_notices_option = get_option( 'fm_admin_notice', array() );
|
152 |
-
$admin_notices_option[ $_GET['fm_admin_notice_ignore'] ]['dismissed'] = 1;
|
153 |
-
update_option( 'fm_admin_notice', $admin_notices_option );
|
154 |
-
$query_str = remove_query_arg( 'fm_admin_notice_ignore' );
|
155 |
-
wp_redirect( $query_str );
|
156 |
-
exit;
|
157 |
-
}
|
158 |
-
}
|
159 |
-
|
160 |
-
// Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
|
161 |
-
public function admin_notice_temp_ignore() {
|
162 |
-
|
163 |
-
// If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
|
164 |
-
if ( isset( $_GET['fm_admin_notice_temp_ignore'] ) ) {
|
165 |
-
|
166 |
-
$admin_notices_option = get_option( 'fm_admin_notice', array() );
|
167 |
-
|
168 |
-
$current_date = current_time( "n/j/Y" );
|
169 |
-
$date_array = explode( '/', $current_date );
|
170 |
-
$interval = ( isset( $_GET['fm_int'] ) ? $_GET['fm_int'] : 14 );
|
171 |
-
$date_array[1] += $interval;
|
172 |
-
$new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
|
173 |
-
|
174 |
-
$admin_notices_option[ $_GET['fm_admin_notice_temp_ignore'] ]['start'] = $new_start;
|
175 |
-
$admin_notices_option[ $_GET['fm_admin_notice_temp_ignore'] ]['dismissed'] = 0;
|
176 |
-
update_option( 'fm_admin_notice', $admin_notices_option );
|
177 |
-
$query_str = remove_query_arg( array( 'fm_admin_notice_temp_ignore', 'fm_int' ) );
|
178 |
-
wp_redirect( $query_str );
|
179 |
-
exit;
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
public function admin_notice_pages( $pages ) {
|
184 |
-
|
185 |
-
foreach ( $pages as $key => $page ) {
|
186 |
-
if ( is_array( $page ) ) {
|
187 |
-
if ( isset( $_GET['page'] ) && $_GET['page'] == $page[0] && isset( $_GET['tab'] ) && $_GET['tab'] == $page[1] ) {
|
188 |
-
return true;
|
189 |
-
}
|
190 |
-
} else {
|
191 |
-
if ( $page == 'all' ) {
|
192 |
-
return true;
|
193 |
-
}
|
194 |
-
if ( get_current_screen()->id === $page ) {
|
195 |
-
return true;
|
196 |
-
}
|
197 |
-
if ( isset( $_GET['page'] ) && $_GET['page'] == $page ) {
|
198 |
-
return true;
|
199 |
-
}
|
200 |
-
}
|
201 |
-
|
202 |
-
return false;
|
203 |
-
}
|
204 |
-
}
|
205 |
-
|
206 |
-
// Required fields check
|
207 |
-
public function required_fields( $fields ) {
|
208 |
-
if ( ! isset( $fields['msg'] ) || ( isset( $fields['msg'] ) && empty( $fields['msg'] ) ) ) {
|
209 |
-
return true;
|
210 |
-
}
|
211 |
-
|
212 |
-
if ( ! isset( $fields['title'] ) || ( isset( $fields['title'] ) && empty( $fields['title'] ) ) ) {
|
213 |
-
return true;
|
214 |
-
}
|
215 |
-
|
216 |
-
return false;
|
217 |
-
}
|
218 |
-
|
219 |
-
// Special parameters function that is to be used in any extension of this class
|
220 |
-
public function special_parameters( $admin_notices ) {
|
221 |
-
// Intentionally left blank
|
222 |
-
}
|
223 |
-
public function wd_admin_notices() {
|
224 |
-
global $wpdb;
|
225 |
-
$two_week_review_ignore = add_query_arg(array('fm_admin_notice_ignore' => 'two_week_review'));
|
226 |
-
$two_week_review_temp = add_query_arg(array('fm_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14));
|
227 |
-
$notices['two_week_review'] = array(
|
228 |
-
'title' => __('Leave A Review?', 'fm'),
|
229 |
-
'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', 'fm'), 'Form Maker'),
|
230 |
-
'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/view/plugin-reviews/form-maker?filter=5" target="_blank">' . __('Sure! I\'d love to!', 'fm') . '</a></li>
|
231 |
-
<li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', 'fm') . '</a></li>
|
232 |
-
<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', 'fm') . '</a></li>
|
233 |
-
<li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', 'fm') . '</a></li>',
|
234 |
-
'later_link' => $two_week_review_temp,
|
235 |
-
'int' => 14
|
236 |
-
);
|
237 |
-
$one_week_support = add_query_arg(array('fm_admin_notice_ignore' => 'one_week_support'));
|
238 |
-
$notices['one_week_support'] = array(
|
239 |
-
'title' => __('Hey! How\'s It Going?', 'fm'),
|
240 |
-
'msg' => sprintf(__('Thank you for using WordPress %s! We hope that you\'ve found everything you need, but if you have any questions:', 'fm'), 'Form Maker'),
|
241 |
-
'link' => '<li><span class="dashicons dashicons-media-text"></span><a target="_blank" href="https://web-dorado.com/wordpress-form-maker/creating-form.html">' . __('Check out User Guide', 'fm') . '</a></li>
|
242 |
-
<li><span class="dashicons dashicons-sos"></span><a target="_blank" href="https://web-dorado.com/forum/26-form-maker.html">' . __('Get Some Help', 'fm') . '</a></li>
|
243 |
-
<li><span class="dashicons dashicons-dismiss"></span><a href="' . $one_week_support . '">' . __('Never show again', 'fm') . '</a></li>',
|
244 |
-
'int' => 7
|
245 |
-
);
|
246 |
-
$check_column = $wpdb->get_var("SHOW COLUMNS FROM " . $wpdb->prefix . "formmaker LIKE 'form'");
|
247 |
-
if($check_column !== NULL){
|
248 |
-
$check_empty = $wpdb->get_results("SELECT title FROM " . $wpdb->prefix . "formmaker WHERE `form` != ''");
|
249 |
-
if($check_empty){
|
250 |
-
$list_empty = "";
|
251 |
-
foreach ( $check_empty as $key => $check_empty_obj ) {
|
252 |
-
$list_empty .=$check_empty_obj -> title . ", ";
|
253 |
-
}
|
254 |
-
$list_empty = substr($list_empty, 0, -2);
|
255 |
-
$list_empty.= ".";
|
256 |
-
$one_week_support = add_query_arg(array('fm_admin_notice_ignore' => 'old_form'));
|
257 |
-
$notices['old_form'] = array(
|
258 |
-
'title' => "IMPORTANT!",
|
259 |
-
'msg' => __('The following forms were created using an outdated version of Form Maker and do not have all the features we\'ve added to our plugin, including responsiveness: </br><b>' .$list_empty.'</b></br> We want to inform you that we\'ve decided to terminate support for the outdated forms listed above, starting from version 1.11.0 (Upcoming major update). If you are still using those forms, please re-create them. Before re-creating the forms you should not update Form Maker.', 'fm'),
|
260 |
-
);
|
261 |
-
}
|
262 |
-
}
|
263 |
-
$this->admin_notice($notices);
|
264 |
-
}
|
265 |
-
|
266 |
-
}
|
267 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frontend/models/FMModelForm_maker.php
CHANGED
@@ -207,7 +207,7 @@ class FMModelForm_maker {
|
|
207 |
margin:".$form_theme['GPMargin'].";
|
208 |
border-radius:".$form_theme['GPBorderRadius']."px;
|
209 |
border:none !important;
|
210 |
-
|
211 |
text-align: center;
|
212 |
}\r\n";
|
213 |
|
@@ -1291,87 +1291,82 @@ $defaultStyles .="
|
|
1291 |
return $all_files;
|
1292 |
}
|
1293 |
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
}
|
1320 |
-
|
1321 |
public function select_data_from_db_for_values($db_info,$value_column, $table, $where, $order_by) {
|
1322 |
global $wpdb;
|
1323 |
-
|
1324 |
-
|
1325 |
-
$temp
|
1326 |
-
$host
|
1327 |
-
$temp
|
1328 |
-
$port
|
1329 |
-
$temp
|
1330 |
-
$username
|
1331 |
-
$temp
|
1332 |
-
$password
|
1333 |
-
$temp
|
1334 |
-
$database
|
1335 |
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
1336 |
-
$choices_values = $wpdb_temp->get_results($query,ARRAY_N);
|
1337 |
}
|
1338 |
-
|
1339 |
-
$choices_values = $wpdb->get_results($query,ARRAY_N);
|
1340 |
}
|
1341 |
-
return $choices_values;
|
1342 |
}
|
1343 |
|
1344 |
public function save_db($counter, $id) {
|
1345 |
global $wpdb;
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
$ip = $_SERVER['REMOTE_ADDR'];
|
1360 |
-
|
1361 |
$chgnac = TRUE;
|
1362 |
$all_files = array();
|
1363 |
$paypal = array();
|
1364 |
$paypal['item_name'] = array();
|
1365 |
$paypal['quantity'] = array();
|
1366 |
$paypal['amount'] = array();
|
1367 |
-
$is_amount=false;
|
1368 |
$paypal['on_os'] = array();
|
1369 |
$total = 0;
|
1370 |
$form_currency = '$';
|
1371 |
$currency_code = array('USD', 'EUR', 'GBP', 'JPY', 'CAD', 'MXN', 'HKD', 'HUF', 'NOK', 'NZD', 'SGD', 'SEK', 'PLN', 'AUD', 'DKK', 'CHF', 'CZK', 'ILS', 'BRL', 'TWD', 'MYR', 'PHP', 'THB');
|
1372 |
$currency_sign = array('$', '€', '£', '¥', 'C$', 'Mex$', 'HK$', 'Ft', 'kr', 'NZ$', 'S$', 'kr', 'zl', 'A$', 'kr', 'CHF', 'Kc', '₪', 'R$', 'NT$', 'RM', '₱', '฿');
|
1373 |
$form = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id));
|
1374 |
-
$id_old = $id;
|
1375 |
if (!$form->form_front) {
|
1376 |
$id = '';
|
1377 |
}
|
@@ -1381,10 +1376,10 @@ $defaultStyles .="
|
|
1381 |
$label_id = array();
|
1382 |
$label_label = array();
|
1383 |
$label_type = array();
|
1384 |
-
|
1385 |
-
$disabled_fields = explode(',', (isset($_REQUEST["disabled_fields"
|
1386 |
-
$disabled_fields = array_slice($disabled_fields,0, count($disabled_fields)-1);
|
1387 |
-
$label_all
|
1388 |
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
1389 |
foreach ($label_all as $key => $label_each) {
|
1390 |
$label_id_each = explode('#**id**#', $label_each);
|
@@ -1394,760 +1389,758 @@ $defaultStyles .="
|
|
1394 |
array_push($label_type, $label_order_each[1]);
|
1395 |
}
|
1396 |
$max = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix . "formmaker_submits");
|
1397 |
-
$fvals=array();
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
|
|
|
|
|
|
1615 |
//
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
}
|
1631 |
-
array_push($all_files, $temp_file);
|
1632 |
-
}
|
1633 |
-
}
|
1634 |
-
}
|
1635 |
-
break;
|
1636 |
-
}
|
1637 |
-
|
1638 |
-
case 'type_address': {
|
1639 |
-
$value = '*#*#*#';
|
1640 |
-
$element = isset($_POST['wdform_'.$i."_street1".$id]) ? esc_html($_POST['wdform_'.$i."_street1".$id]) : NULL;
|
1641 |
-
if(isset($element)) {
|
1642 |
-
$value = $element;
|
1643 |
-
break;
|
1644 |
-
}
|
1645 |
-
|
1646 |
-
$element = isset($_POST['wdform_'.$i."_street2".$id]) ? esc_html($_POST['wdform_'.$i."_street2".$id]) : NULL;
|
1647 |
-
if(isset($element)) {
|
1648 |
-
$value = $element;
|
1649 |
-
break;
|
1650 |
-
}
|
1651 |
-
|
1652 |
-
$element = isset($_POST['wdform_'.$i."_city".$id]) ? esc_html($_POST['wdform_'.$i."_city".$id]) : NULL;
|
1653 |
-
if(isset($element)) {
|
1654 |
-
$value = $element;
|
1655 |
-
break;
|
1656 |
-
}
|
1657 |
-
|
1658 |
-
$element = isset($_POST['wdform_'.$i."_state".$id]) ? esc_html($_POST['wdform_'.$i."_state".$id]) : NULL;
|
1659 |
-
if(isset($element)) {
|
1660 |
-
$value = $element;
|
1661 |
-
break;
|
1662 |
-
}
|
1663 |
-
|
1664 |
-
$element = isset($_POST['wdform_'.$i."_postal".$id]) ? esc_html($_POST['wdform_'.$i."_postal".$id]) : NULL;
|
1665 |
-
if(isset($element)) {
|
1666 |
-
$value = $element;
|
1667 |
-
break;
|
1668 |
-
}
|
1669 |
-
|
1670 |
-
$element = isset($_POST['wdform_'.$i."_country".$id]) ? esc_html($_POST['wdform_'.$i."_country".$id]) : NULL;
|
1671 |
-
if(isset($element)) {
|
1672 |
-
$value = $element;
|
1673 |
-
break;
|
1674 |
-
}
|
1675 |
-
break;
|
1676 |
-
}
|
1677 |
-
|
1678 |
-
case "type_hidden": {
|
1679 |
-
$value = isset($_POST[$label_label[$key]]) ? esc_html($_POST[$label_label[$key]]) : "";
|
1680 |
-
break;
|
1681 |
-
}
|
1682 |
-
|
1683 |
-
case "type_radio": {
|
1684 |
-
$element = isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : NULL;
|
1685 |
-
if(isset($element)) {
|
1686 |
-
$value = $element;
|
1687 |
-
break;
|
1688 |
-
}
|
1689 |
-
$value = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
1690 |
-
break;
|
1691 |
-
}
|
1692 |
-
|
1693 |
-
case "type_checkbox": {
|
1694 |
-
$start = -1;
|
1695 |
-
$value = '';
|
1696 |
-
for($j = 0; $j < 100; $j++) {
|
1697 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
1698 |
-
if(isset($element)) {
|
1699 |
-
$start = $j;
|
1700 |
-
break;
|
1701 |
-
}
|
1702 |
-
}
|
1703 |
-
|
1704 |
-
$other_element_id = -1;
|
1705 |
-
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
1706 |
-
if($is_other == "yes") {
|
1707 |
-
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
1708 |
-
}
|
1709 |
-
|
1710 |
-
if($start != -1) {
|
1711 |
-
for($j = $start; $j < 100; $j++) {
|
1712 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
1713 |
-
if(isset($element)) {
|
1714 |
-
if($j == $other_element_id) {
|
1715 |
-
$value = $value . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '***br***';
|
1716 |
-
}
|
1717 |
-
else {
|
1718 |
-
$value = $value . (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "") . '***br***';
|
1719 |
-
}
|
1720 |
-
}
|
1721 |
-
}
|
1722 |
-
}
|
1723 |
-
break;
|
1724 |
-
}
|
1725 |
-
|
1726 |
-
case "type_paypal_price": {
|
1727 |
-
$value = isset($_POST['wdform_'.$i."_element_dollars".$id]) ? $_POST['wdform_'.$i."_element_dollars".$id] : 0;
|
1728 |
-
|
1729 |
-
$value = (int) preg_replace('/\D/', '', $value);
|
1730 |
-
|
1731 |
-
if(isset($_POST['wdform_'.$i."_element_cents".$id])) {
|
1732 |
-
$value = $value . '.' . ( preg_replace('/\D/', '', $_POST['wdform_'.$i."_element_cents".$id]));
|
1733 |
-
}
|
1734 |
-
|
1735 |
-
$total += (float)($value);
|
1736 |
-
$paypal_option = array();
|
1737 |
-
|
1738 |
-
if($value != 0) {
|
1739 |
-
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
1740 |
-
array_push ($paypal['item_name'], $label_label[$key]);
|
1741 |
-
array_push ($paypal['quantity'], $quantity);
|
1742 |
-
array_push ($paypal['amount'], $value);
|
1743 |
-
$is_amount=true;
|
1744 |
-
array_push ($paypal['on_os'], $paypal_option);
|
1745 |
-
}
|
1746 |
-
$value = $value . $form_currency;
|
1747 |
-
break;
|
1748 |
-
}
|
1749 |
-
|
1750 |
-
case "type_paypal_price_new": {
|
1751 |
-
$value = isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] ? $_POST['wdform_'.$i."_element".$id] : 0;
|
1752 |
-
$total += (float)($value);
|
1753 |
-
$paypal_option = array();
|
1754 |
-
|
1755 |
-
if($value != 0) {
|
1756 |
-
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
1757 |
-
array_push ($paypal['item_name'], $label_label[$key]);
|
1758 |
-
array_push ($paypal['quantity'], $quantity);
|
1759 |
-
array_push ($paypal['amount'], $value);
|
1760 |
-
$is_amount=true;
|
1761 |
-
array_push ($paypal['on_os'], $paypal_option);
|
1762 |
-
}
|
1763 |
-
$value = $form_currency.$value;
|
1764 |
-
break;
|
1765 |
-
}
|
1766 |
-
|
1767 |
-
|
1768 |
-
case "type_paypal_select": {
|
1769 |
-
if(isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] !='') {
|
1770 |
-
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . $form_currency.(isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") ;
|
1771 |
-
}
|
1772 |
-
else {
|
1773 |
-
$value = '';
|
1774 |
-
}
|
1775 |
-
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
1776 |
-
$total += (float)(isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0) * $quantity;
|
1777 |
-
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : ""));
|
1778 |
-
array_push ($paypal['quantity'], $quantity);
|
1779 |
-
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : ""));
|
1780 |
-
if(isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] != 0) {
|
1781 |
-
$is_amount=true;
|
1782 |
-
}
|
1783 |
-
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
1784 |
-
if(isset($element_quantity) && $value != '') {
|
1785 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
1786 |
-
}
|
1787 |
-
$paypal_option = array();
|
1788 |
-
$paypal_option['on'] = array();
|
1789 |
-
$paypal_option['os'] = array();
|
1790 |
-
|
1791 |
-
for($k = 0; $k < 50; $k++) {
|
1792 |
-
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
1793 |
-
if(isset($temp_val) && $value != '') {
|
1794 |
-
array_push ($paypal_option['on'], (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : ""));
|
1795 |
-
array_push ($paypal_option['os'], (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : ""));
|
1796 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : "") . '***property***';
|
1797 |
-
}
|
1798 |
-
}
|
1799 |
-
array_push ($paypal['on_os'], $paypal_option);
|
1800 |
-
break;
|
1801 |
-
}
|
1802 |
-
|
1803 |
-
case "type_paypal_radio": {
|
1804 |
-
$element = isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] ? $_POST['wdform_'.$i."_element".$id] : '';
|
1805 |
-
if($element) {
|
1806 |
-
$value = (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : '') . ' : ' . $form_currency . $element;
|
1807 |
-
}
|
1808 |
-
else {
|
1809 |
-
$value = '';
|
1810 |
-
}
|
1811 |
-
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
1812 |
-
$total += (float)(isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0) * $quantity;
|
1813 |
-
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : ""));
|
1814 |
-
array_push ($paypal['quantity'], $quantity);
|
1815 |
-
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0));
|
1816 |
-
if(isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] != 0) {
|
1817 |
-
$is_amount=true;
|
1818 |
-
}
|
1819 |
-
|
1820 |
-
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
1821 |
-
if(isset($element_quantity) && $value != '') {
|
1822 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
1823 |
-
}
|
1824 |
-
|
1825 |
-
$paypal_option = array();
|
1826 |
-
$paypal_option['on'] = array();
|
1827 |
-
$paypal_option['os'] = array();
|
1828 |
-
|
1829 |
-
for($k = 0; $k < 50; $k++) {
|
1830 |
-
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
1831 |
-
if(isset($temp_val) && $value != '') {
|
1832 |
-
array_push ($paypal_option['on'], (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : ""));
|
1833 |
-
array_push ($paypal_option['os'], $_POST['wdform_'.$i."_property".$id.$k]);
|
1834 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $_POST['wdform_'.$i."_property".$id.$k] . '***property***';
|
1835 |
-
}
|
1836 |
-
}
|
1837 |
-
array_push ($paypal['on_os'], $paypal_option);
|
1838 |
-
break;
|
1839 |
-
}
|
1840 |
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
}
|
1849 |
-
$paypal['shipping'] = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
1850 |
-
break;
|
1851 |
-
}
|
1852 |
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
break;
|
1861 |
-
}
|
1862 |
-
}
|
1863 |
-
|
1864 |
-
$other_element_id = -1;
|
1865 |
-
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
1866 |
-
if($is_other == "yes") {
|
1867 |
-
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
1868 |
-
}
|
1869 |
-
|
1870 |
-
if($start != -1) {
|
1871 |
-
for($j = $start; $j < 100; $j++) {
|
1872 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
1873 |
-
if(isset($element)) {
|
1874 |
-
if($j == $other_element_id) {
|
1875 |
-
$value = $value . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '***br***';
|
1876 |
-
}
|
1877 |
-
else {
|
1878 |
-
$element = (isset($_POST['wdform_'.$i."_element".$id.$j]) && $_POST['wdform_'.$i."_element".$id.$j] ? $_POST['wdform_'.$i."_element".$id.$j] : 0);
|
1879 |
-
$value = $value . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : "") . ' - ' . $form_currency . $element. '***br***';
|
1880 |
-
|
1881 |
-
$quantity = ((isset($_POST['wdform_' . $i . "_element_quantity" . $id]) && ($_POST['wdform_' . $i . "_element_quantity" . $id] >= 1)) ? $_POST['wdform_'.$i . "_element_quantity" . $id] : 1);
|
1882 |
-
$total += (float)(isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : 0) * (float)($quantity);
|
1883 |
-
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : ""));
|
1884 |
-
array_push ($paypal['quantity'], $quantity);
|
1885 |
-
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id.$j]) ? ($_POST['wdform_'.$i."_element".$id.$j] == '' ? '0' : $_POST['wdform_'.$i."_element".$id.$j]) : ""));
|
1886 |
-
if (isset($_POST['wdform_'.$i."_element".$id.$j]) && $_POST['wdform_'.$i."_element".$id.$j] != 0) {
|
1887 |
-
$is_amount = TRUE;
|
1888 |
-
}
|
1889 |
-
$paypal_option = array();
|
1890 |
-
$paypal_option['on'] = array();
|
1891 |
-
$paypal_option['os'] = array();
|
1892 |
-
|
1893 |
-
for($k = 0; $k < 50; $k++) {
|
1894 |
-
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
1895 |
-
if(isset($temp_val)) {
|
1896 |
-
array_push ($paypal_option['on'], isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "");
|
1897 |
-
array_push ($paypal_option['os'], $_POST['wdform_'.$i."_property".$id.$k]);
|
1898 |
-
}
|
1899 |
-
}
|
1900 |
-
array_push ($paypal['on_os'], $paypal_option);
|
1901 |
-
}
|
1902 |
-
}
|
1903 |
-
}
|
1904 |
-
|
1905 |
-
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
1906 |
-
if(isset($element_quantity)) {
|
1907 |
-
$value .= (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
1908 |
-
}
|
1909 |
-
for($k = 0; $k < 50; $k++) {
|
1910 |
-
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
1911 |
-
if(isset($temp_val)) {
|
1912 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $_POST['wdform_'.$i."_property".$id.$k] . '***property***';
|
1913 |
-
}
|
1914 |
-
}
|
1915 |
-
}
|
1916 |
-
break;
|
1917 |
-
}
|
1918 |
-
|
1919 |
-
case "type_star_rating": {
|
1920 |
-
if(isset($_POST['wdform_'.$i."_selected_star_amount".$id]) && $_POST['wdform_'.$i."_selected_star_amount".$id] == "") {
|
1921 |
-
$selected_star_amount = 0;
|
1922 |
-
}
|
1923 |
-
else {
|
1924 |
-
$selected_star_amount = isset($_POST['wdform_'.$i."_selected_star_amount".$id]) ? $_POST['wdform_'.$i."_selected_star_amount".$id] : 0;
|
1925 |
-
}
|
1926 |
-
$value = $selected_star_amount . '/' . (isset($_POST['wdform_'.$i."_star_amount".$id]) ? $_POST['wdform_'.$i."_star_amount".$id] : "");
|
1927 |
-
break;
|
1928 |
-
}
|
1929 |
-
|
1930 |
-
case "type_scale_rating": {
|
1931 |
-
$value = (isset($_POST['wdform_'.$i."_scale_radio".$id]) ? $_POST['wdform_'.$i."_scale_radio".$id] : 0) . '/' . (isset($_POST['wdform_'.$i."_scale_amount".$id]) ? $_POST['wdform_'.$i."_scale_amount".$id] : "");
|
1932 |
-
break;
|
1933 |
-
}
|
1934 |
-
|
1935 |
-
case "type_spinner": {
|
1936 |
-
$value = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
1937 |
-
break;
|
1938 |
-
}
|
1939 |
-
|
1940 |
-
case "type_slider": {
|
1941 |
-
$value = isset($_POST['wdform_'.$i."_slider_value".$id]) ? $_POST['wdform_'.$i."_slider_value".$id] : "";
|
1942 |
-
break;
|
1943 |
-
}
|
1944 |
-
|
1945 |
-
case "type_range": {
|
1946 |
-
$value = (isset($_POST['wdform_'.$i."_element".$id.'0']) ? $_POST['wdform_'.$i."_element".$id.'0'] : "") . '-' . (isset($_POST['wdform_'.$i."_element".$id.'1']) ? $_POST['wdform_'.$i."_element".$id.'1'] : "");
|
1947 |
-
break;
|
1948 |
-
}
|
1949 |
-
|
1950 |
-
case "type_grading": {
|
1951 |
-
$value = "";
|
1952 |
-
$items = explode(":", isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "");
|
1953 |
-
for($k = 0; $k < sizeof($items) - 1; $k++) {
|
1954 |
-
$value .= (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : "") . ':';
|
1955 |
-
}
|
1956 |
-
$value .= (isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "") . '***grading***';
|
1957 |
-
break;
|
1958 |
-
}
|
1959 |
-
|
1960 |
-
case "type_matrix": {
|
1961 |
-
$rows_of_matrix = explode("***", isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "");
|
1962 |
-
$rows_count = sizeof($rows_of_matrix) - 1;
|
1963 |
-
$column_of_matrix = explode("***", isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "");
|
1964 |
-
$columns_count = sizeof($column_of_matrix) - 1;
|
1965 |
-
|
1966 |
-
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "radio") {
|
1967 |
-
$input_value = "";
|
1968 |
-
for($k = 1; $k <= $rows_count; $k++) {
|
1969 |
-
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k]) ? $_POST['wdform_'.$i."_input_element".$id.$k] : 0) . "***";
|
1970 |
-
}
|
1971 |
-
}
|
1972 |
-
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "checkbox") {
|
1973 |
-
$input_value = "";
|
1974 |
-
for($k = 1; $k <= $rows_count; $k++) {
|
1975 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
1976 |
-
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : 0)."***";
|
1977 |
-
}
|
1978 |
-
}
|
1979 |
-
}
|
1980 |
-
|
1981 |
-
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "text") {
|
1982 |
-
$input_value = "";
|
1983 |
-
for($k = 1; $k <= $rows_count; $k++) {
|
1984 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
1985 |
-
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? esc_html($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) : "") . "***";
|
1986 |
-
}
|
1987 |
-
}
|
1988 |
-
}
|
1989 |
-
|
1990 |
-
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "select") {
|
1991 |
-
$input_value = "";
|
1992 |
-
for($k = 1; $k <= $rows_count; $k++) {
|
1993 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
1994 |
-
$input_value .= (isset($_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j] : "") . "***";
|
1995 |
-
}
|
1996 |
-
}
|
1997 |
-
}
|
1998 |
-
|
1999 |
-
$value = $rows_count . (isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "") . '***' . $columns_count . (isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "") . '***' . (isset($_POST['wdform_'.$i."_input_type".$id]) ? $_POST['wdform_'.$i."_input_type".$id] : "") . '***' . $input_value . '***matrix***';
|
2000 |
-
break;
|
2001 |
-
}
|
2002 |
-
|
2003 |
-
}
|
2004 |
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
if($type == "type_text" or $type == "type_password" or $type == "type_textarea" or $type == "type_name" or $type == "type_submitter_mail" or $type == "type_number" or $type == "type_phone" or $type == "type_phone_new")
|
2011 |
-
{
|
2012 |
-
|
2013 |
-
$untilupload = $form->form_fields;
|
2014 |
-
$untilupload = substr($untilupload, strpos($untilupload, $i.'*:*id*:*'.$type), -1);
|
2015 |
-
$untilupload = substr($untilupload, 0, strpos($untilupload, '*:*new_field*:'));
|
2016 |
-
$untilupload = explode('*:*w_required*:*', $untilupload);
|
2017 |
-
$untilupload = $untilupload[1];
|
2018 |
-
$untilupload = explode('*:*w_unique*:*', $untilupload);
|
2019 |
-
$unique_element = $untilupload[0];
|
2020 |
-
if(strlen($unique_element)>3)
|
2021 |
-
$unique_element = substr($unique_element, -3);
|
2022 |
-
|
2023 |
-
if($unique_element == 'yes') {
|
2024 |
-
$unique = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id, $i, addslashes($value)));
|
2025 |
-
if ($unique) {
|
2026 |
-
return array(($max + 1), addslashes(addslashes(__('This field ' . $label_label[$key] . ' requires a unique entry.', 'form_maker'))));
|
2027 |
-
}
|
2028 |
-
}
|
2029 |
-
}
|
2030 |
-
$save_or_no = TRUE;
|
2031 |
-
$fvals['{'.$i.'}']=str_replace(array("***map***", "*@@url@@*", "@@@@@@@@@", "@@@", "***grading***", "***br***"), array(" ", "", " ", " ", " ", ", "), addslashes($value));
|
2032 |
-
|
2033 |
-
if ($form->savedb) {
|
2034 |
-
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
2035 |
-
'form_id' => $id,
|
2036 |
-
'element_label' => $i,
|
2037 |
-
'element_value' => stripslashes($value),
|
2038 |
-
'group_id' => ($max + 1),
|
2039 |
-
'date' => date('Y-m-d H:i:s'),
|
2040 |
-
'ip' => $_SERVER['REMOTE_ADDR'],
|
2041 |
-
'user_id_wd' => $current_user->ID,
|
2042 |
-
), array(
|
2043 |
-
'%d',
|
2044 |
-
'%s',
|
2045 |
-
'%s',
|
2046 |
-
'%d',
|
2047 |
-
'%s',
|
2048 |
-
'%s',
|
2049 |
-
'%d'
|
2050 |
-
));
|
2051 |
-
}
|
2052 |
-
if (!$save_or_no) {
|
2053 |
-
return FALSE;
|
2054 |
-
}
|
2055 |
-
$chgnac = FALSE;
|
2056 |
-
}
|
2057 |
-
else{
|
2058 |
-
$fvals['{'.$i.'}']='';
|
2059 |
-
}
|
2060 |
-
}
|
2061 |
|
2062 |
-
|
2063 |
-
|
|
|
|
|
|
|
2064 |
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2097 |
$wpdb->query($query);
|
2098 |
}
|
2099 |
-
|
2100 |
// $wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
foreach($addons as $addon => $addon_name)
|
2105 |
-
{
|
2106 |
-
if (defined($addon) && is_plugin_active(constant($addon))) {
|
2107 |
-
$_GET['addon_task']='frontend';
|
2108 |
-
$_GET['form_id']=$id;
|
2109 |
-
$GLOBALS['fvals']=$fvals;
|
2110 |
-
do_action($addon.'_init');
|
2111 |
-
}
|
2112 |
-
}
|
2113 |
-
|
2114 |
-
$addons = array('WD_FM_STRIPE' => 'Stripe');
|
2115 |
foreach ($addons as $addon => $addon_name) {
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2139 |
}
|
|
|
2140 |
}
|
2141 |
-
|
2142 |
$str = '';
|
2143 |
-
|
2144 |
-
if ($form->paypal_mode)
|
2145 |
-
if ($paypal['item_name'])
|
2146 |
-
if ($is_amount)
|
2147 |
$tax = $form->tax;
|
2148 |
$currency = $form->payment_currency;
|
2149 |
$business = $form->paypal_email;
|
2150 |
-
$ip = $_SERVER['REMOTE_ADDR'];
|
2151 |
$total2 = round($total, 2);
|
2152 |
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
2153 |
'form_id' => $id,
|
@@ -2173,7 +2166,7 @@ $defaultStyles .="
|
|
2173 |
if (isset($paypal['shipping'])) {
|
2174 |
$total = $total + $paypal['shipping'];
|
2175 |
}
|
2176 |
-
$total = round($total, 2);
|
2177 |
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
2178 |
'form_id' => $id,
|
2179 |
'element_label' => 'total',
|
@@ -2215,13 +2208,13 @@ $defaultStyles .="
|
|
2215 |
return false;
|
2216 |
}
|
2217 |
$str = '';
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
$str .= "currency_code=" . $currency;
|
2226 |
$str .= "&business=" . urlencode($business);
|
2227 |
$str .= "&cmd=" . "_cart";
|
@@ -2232,22 +2225,22 @@ $defaultStyles .="
|
|
2232 |
$str = $str . "&shipping_1=" . $paypal['shipping'];
|
2233 |
// $str=$str."&weight_cart=".$paypal['shipping'];
|
2234 |
// $str=$str."&shipping2=3".$paypal['shipping'];
|
2235 |
-
$str = $str."&no_shipping=2";
|
2236 |
}
|
2237 |
-
$i=0;
|
2238 |
foreach ($paypal['item_name'] as $pkey => $pitem_name) {
|
2239 |
-
if($paypal['amount'][$pkey]) {
|
2240 |
$i++;
|
2241 |
-
$str = $str."&item_name_"
|
2242 |
-
$str = $str."&amount_"
|
2243 |
-
$str = $str."&quantity_"
|
2244 |
if ($tax) {
|
2245 |
$str = $str . "&tax_rate_" . $i . "=" . $tax;
|
2246 |
}
|
2247 |
if ($paypal['on_os'][$pkey]) {
|
2248 |
foreach ($paypal['on_os'][$pkey]['on'] as $on_os_key => $on_item_name) {
|
2249 |
-
$str = $str."&on"
|
2250 |
-
$str = $str."&os"
|
2251 |
}
|
2252 |
}
|
2253 |
}
|
@@ -2255,63 +2248,60 @@ $defaultStyles .="
|
|
2255 |
}
|
2256 |
}
|
2257 |
}
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
|
2295 |
if ($chgnac) {
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
exit;
|
2304 |
}
|
2305 |
|
2306 |
$addons = array('WD_FM_GDRIVE_INT' => 'GDriveInt', 'WD_FM_DBOX_INT' => 'DboxInt', 'WD_FM_POST_GEN' => 'PostGen', 'WD_FM_PUSHOVER' => 'Pushover'); // the sequence is important for google drive and drop box addons !!!!!!!!!!
|
2307 |
-
foreach($addons as $addon => $addon_name) {
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
}
|
2316 |
return array($all_files, $str);
|
2317 |
}
|
@@ -2322,63 +2312,64 @@ $defaultStyles .="
|
|
2322 |
}
|
2323 |
|
2324 |
public function get_after_submission_text($form_id) {
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
|
|
|
2375 |
|
2376 |
public function increment_views_count($id) {
|
2377 |
global $wpdb;
|
2378 |
$vives_form = $wpdb->get_var($wpdb->prepare("SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id));
|
2379 |
if (isset($vives_form)) {
|
2380 |
-
|
2381 |
-
|
2382 |
'views' => $vives_form,
|
2383 |
), array('form_id' => $id), array(
|
2384 |
'%d',
|
@@ -2388,9 +2379,9 @@ $defaultStyles .="
|
|
2388 |
$wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
2389 |
'form_id' => $id,
|
2390 |
'views' => 1
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
));
|
2395 |
}
|
2396 |
}
|
207 |
margin:".$form_theme['GPMargin'].";
|
208 |
border-radius:".$form_theme['GPBorderRadius']."px;
|
209 |
border:none !important;
|
210 |
+
background-color:".$form_theme['GPBGColor'].";
|
211 |
text-align: center;
|
212 |
}\r\n";
|
213 |
|
1291 |
return $all_files;
|
1292 |
}
|
1293 |
|
1294 |
+
public function select_data_from_db_for_labels($db_info,$label_column, $table, $where, $order_by) {
|
1295 |
+
global $wpdb;
|
1296 |
+
|
1297 |
+
$query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
1298 |
+
if ($db_info) {
|
1299 |
+
$temp = explode('@@@wdfhostwdf@@@', $db_info);
|
1300 |
+
$host = $temp[0];
|
1301 |
+
$temp = explode('@@@wdfportwdf@@@', $temp[1]);
|
1302 |
+
$port = $temp[0];
|
1303 |
+
$temp = explode('@@@wdfusernamewdf@@@', $temp[1]);
|
1304 |
+
$username = $temp[0];
|
1305 |
+
$temp = explode('@@@wdfpasswordwdf@@@', $temp[1]);
|
1306 |
+
$password = $temp[0];
|
1307 |
+
$temp = explode('@@@wdfdatabasewdf@@@', $temp[1]);
|
1308 |
+
$database = $temp[0];
|
1309 |
+
|
1310 |
+
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
1311 |
+
$choices_labels = $wpdb_temp->get_results($query, ARRAY_N);
|
1312 |
+
}
|
1313 |
+
else {
|
1314 |
+
$choices_labels = $wpdb->get_results($query, ARRAY_N);
|
1315 |
+
}
|
1316 |
+
return $choices_labels;
|
1317 |
+
}
|
1318 |
+
|
|
|
|
|
1319 |
public function select_data_from_db_for_values($db_info,$value_column, $table, $where, $order_by) {
|
1320 |
global $wpdb;
|
1321 |
+
$query = "SELECT `" . $value_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
1322 |
+
if ($db_info) {
|
1323 |
+
$temp = explode('@@@wdfhostwdf@@@', $db_info);
|
1324 |
+
$host = $temp[0];
|
1325 |
+
$temp = explode('@@@wdfportwdf@@@', $temp[1]);
|
1326 |
+
$port = $temp[0];
|
1327 |
+
$temp = explode('@@@wdfusernamewdf@@@', $temp[1]);
|
1328 |
+
$username = $temp[0];
|
1329 |
+
$temp = explode('@@@wdfpasswordwdf@@@', $temp[1]);
|
1330 |
+
$password = $temp[0];
|
1331 |
+
$temp = explode('@@@wdfdatabasewdf@@@', $temp[1]);
|
1332 |
+
$database = $temp[0];
|
1333 |
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
1334 |
+
$choices_values = $wpdb_temp->get_results($query, ARRAY_N);
|
1335 |
}
|
1336 |
+
else {
|
1337 |
+
$choices_values = $wpdb->get_results($query, ARRAY_N);
|
1338 |
}
|
1339 |
+
return $choices_values;
|
1340 |
}
|
1341 |
|
1342 |
public function save_db($counter, $id) {
|
1343 |
global $wpdb;
|
1344 |
+
$current_user = wp_get_current_user();
|
1345 |
+
if ($current_user->ID != 0) {
|
1346 |
+
$wp_userid = $current_user->ID;
|
1347 |
+
$wp_username = $current_user->display_name;
|
1348 |
+
$wp_useremail = $current_user->user_email;
|
1349 |
+
}
|
1350 |
+
else {
|
1351 |
+
$wp_userid = '';
|
1352 |
+
$wp_username = '';
|
1353 |
+
$wp_useremail = '';
|
1354 |
+
}
|
1355 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
1356 |
+
|
|
|
|
|
1357 |
$chgnac = TRUE;
|
1358 |
$all_files = array();
|
1359 |
$paypal = array();
|
1360 |
$paypal['item_name'] = array();
|
1361 |
$paypal['quantity'] = array();
|
1362 |
$paypal['amount'] = array();
|
1363 |
+
$is_amount = false;
|
1364 |
$paypal['on_os'] = array();
|
1365 |
$total = 0;
|
1366 |
$form_currency = '$';
|
1367 |
$currency_code = array('USD', 'EUR', 'GBP', 'JPY', 'CAD', 'MXN', 'HKD', 'HUF', 'NOK', 'NZD', 'SGD', 'SEK', 'PLN', 'AUD', 'DKK', 'CHF', 'CZK', 'ILS', 'BRL', 'TWD', 'MYR', 'PHP', 'THB');
|
1368 |
$currency_sign = array('$', '€', '£', '¥', 'C$', 'Mex$', 'HK$', 'Ft', 'kr', 'NZ$', 'S$', 'kr', 'zl', 'A$', 'kr', 'CHF', 'Kc', '₪', 'R$', 'NT$', 'RM', '₱', '฿');
|
1369 |
$form = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id));
|
|
|
1370 |
if (!$form->form_front) {
|
1371 |
$id = '';
|
1372 |
}
|
1376 |
$label_id = array();
|
1377 |
$label_label = array();
|
1378 |
$label_type = array();
|
1379 |
+
|
1380 |
+
$disabled_fields = explode(',', (isset($_REQUEST["disabled_fields" . $id]) ? $_REQUEST["disabled_fields" . $id] : ""));
|
1381 |
+
$disabled_fields = array_slice($disabled_fields, 0, count($disabled_fields) - 1);
|
1382 |
+
$label_all = explode('#****#', $form->label_order_current);
|
1383 |
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
1384 |
foreach ($label_all as $key => $label_each) {
|
1385 |
$label_id_each = explode('#**id**#', $label_each);
|
1389 |
array_push($label_type, $label_order_each[1]);
|
1390 |
}
|
1391 |
$max = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix . "formmaker_submits");
|
1392 |
+
$fvals = array();
|
1393 |
+
foreach ($label_type as $key => $type) {
|
1394 |
+
$value = '';
|
1395 |
+
if ($type == "type_submit_reset" or $type == "type_map" or $type == "type_editor" or $type == "type_captcha" or $type == "type_arithmetic_captcha" or $type == "type_recaptcha" or $type == "type_button" or $type == "type_paypal_total" or $type == "type_send_copy") {
|
1396 |
+
continue;
|
1397 |
+
}
|
1398 |
+
|
1399 |
+
$i = $label_id[$key];
|
1400 |
+
if (!in_array($i, $disabled_fields)) {
|
1401 |
+
switch ($type) {
|
1402 |
+
case 'type_text':
|
1403 |
+
case 'type_password':
|
1404 |
+
case "type_submitter_mail":
|
1405 |
+
case "type_own_select":
|
1406 |
+
case "type_country":
|
1407 |
+
case "type_number":
|
1408 |
+
case "type_phone_new": {
|
1409 |
+
$value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
|
1410 |
+
break;
|
1411 |
+
}
|
1412 |
+
|
1413 |
+
case "type_date": {
|
1414 |
+
$value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
|
1415 |
+
$date_format = isset($_POST['wdform_' . $i . "_date_format" . $id]) ? esc_html($_POST['wdform_' . $i . "_date_format" . $id]) : "";
|
1416 |
+
if ($value) {
|
1417 |
+
if (!$this->fm_validateDate($value, $date_format)) {
|
1418 |
+
echo "<script> alert('" . addslashes(__("This is not a valid date format.", 'form_maker')) . "');</script>";
|
1419 |
+
return array($max + 1);
|
1420 |
+
}
|
1421 |
+
}
|
1422 |
+
|
1423 |
+
break;
|
1424 |
+
}
|
1425 |
+
|
1426 |
+
case "type_date_new": {
|
1427 |
+
$value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
|
1428 |
+
|
1429 |
+
break;
|
1430 |
+
}
|
1431 |
+
|
1432 |
+
case "type_date_range": {
|
1433 |
+
$value = (isset($_POST['wdform_' . $i . "_element" . $id . "0"]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . "0"]) : "") . ' - ' . (isset($_POST['wdform_' . $i . "_element" . $id . "1"]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . "1"]) : "");
|
1434 |
+
|
1435 |
+
break;
|
1436 |
+
}
|
1437 |
+
|
1438 |
+
case 'type_textarea': {
|
1439 |
+
$value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
|
1440 |
+
break;
|
1441 |
+
}
|
1442 |
+
|
1443 |
+
case "type_wdeditor": {
|
1444 |
+
$value = isset($_POST['wdform_' . $i . '_wd_editor' . $id]) ? esc_html($_POST['wdform_' . $i . '_wd_editor' . $id]) : "";
|
1445 |
+
break;
|
1446 |
+
}
|
1447 |
+
case "type_mark_map": {
|
1448 |
+
$value = (isset($_POST['wdform_' . $i . "_long" . $id]) ? esc_html($_POST['wdform_' . $i . "_long" . $id]) : "") . '***map***' . (isset($_POST['wdform_' . $i . "_lat" . $id]) ? esc_html($_POST['wdform_' . $i . "_lat" . $id]) : "");
|
1449 |
+
break;
|
1450 |
+
}
|
1451 |
+
case "type_date_fields": {
|
1452 |
+
$value = (isset($_POST['wdform_' . $i . "_day" . $id]) ? esc_html($_POST['wdform_' . $i . "_day" . $id]) : "") . '-' . (isset($_POST['wdform_' . $i . "_month" . $id]) ? esc_html($_POST['wdform_' . $i . "_month" . $id]) : "") . '-' . (isset($_POST['wdform_' . $i . "_year" . $id]) ? esc_html($_POST['wdform_' . $i . "_year" . $id]) : "");
|
1453 |
+
break;
|
1454 |
+
}
|
1455 |
+
case "type_time": {
|
1456 |
+
$ss = isset($_POST['wdform_' . $i . "_ss" . $id]) ? esc_html($_POST['wdform_' . $i . "_ss" . $id]) : NULL;
|
1457 |
+
if (isset($ss)) {
|
1458 |
+
$value = (isset($_POST['wdform_' . $i . "_hh" . $id]) ? esc_html($_POST['wdform_' . $i . "_hh" . $id]) : "") . ':' . (isset($_POST['wdform_' . $i . "_mm" . $id]) ?esc_html( $_POST['wdform_' . $i . "_mm" . $id]) : "") . ':' . (isset($_POST['wdform_' . $i . "_ss" . $id]) ? esc_html($_POST['wdform_' . $i . "_ss" . $id]) : "");
|
1459 |
+
}
|
1460 |
+
else {
|
1461 |
+
$value = (isset($_POST['wdform_' . $i . "_hh" . $id]) ? esc_html($_POST['wdform_' . $i . "_hh" . $id]) : "") . ':' . (isset($_POST['wdform_' . $i . "_mm" . $id]) ? esc_html($_POST['wdform_' . $i . "_mm" . $id]) : "");
|
1462 |
+
}
|
1463 |
+
$am_pm = isset($_POST['wdform_' . $i . "_am_pm" . $id]) ? esc_html($_POST['wdform_' . $i . "_am_pm" . $id]) : NULL;
|
1464 |
+
if (isset($am_pm)) {
|
1465 |
+
$value = $value . ' ' . $am_pm;
|
1466 |
+
}
|
1467 |
+
break;
|
1468 |
+
}
|
1469 |
+
case "type_phone": {
|
1470 |
+
$value = (isset($_POST['wdform_' . $i . "_element_first" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_first" . $id]) : "") . ' ' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_last" . $id]) : "");
|
1471 |
+
break;
|
1472 |
+
}
|
1473 |
+
case "type_name": {
|
1474 |
+
$element_title = isset($_POST['wdform_' . $i . "_element_title" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_title" . $id]) : NULL;
|
1475 |
+
$element_middle = isset($_POST['wdform_' . $i . "_element_middle" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_middle" . $id]) : NULL;
|
1476 |
+
if (isset($element_title) || isset($element_middle)) {
|
1477 |
+
$value = (isset($_POST['wdform_' . $i . "_element_title" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_title" . $id]) : "") . '@@@' . (isset($_POST['wdform_' . $i . "_element_first" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_first" . $id]) : "") . '@@@' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_last" . $id]) : "") . '@@@' . (isset($_POST['wdform_' . $i . "_element_middle" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_middle" . $id]) : "");
|
1478 |
+
}
|
1479 |
+
else {
|
1480 |
+
$value = (isset($_POST['wdform_' . $i . "_element_first" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_first" . $id]) : "") . '@@@' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_last" . $id]) : "");
|
1481 |
+
}
|
1482 |
+
break;
|
1483 |
+
}
|
1484 |
+
case "type_file_upload": {
|
1485 |
+
if (isset($_POST['wdform_' . $i . "_file_url" . $id . '_save'])) {
|
1486 |
+
$file_url = isset($_POST['wdform_' . $i . "_file_url" . $id . '_save']) ? stripslashes($_POST['wdform_' . $i . "_file_url" . $id . '_save']) : NULL;
|
1487 |
+
if (isset($file_url)) {
|
1488 |
+
$all_files = isset($_POST['wdform_' . $i . "_all_files" . $id . '_save']) ? json_decode(stripslashes($_POST['wdform_' . $i . "_all_files" . $id . '_save']), true) : array();
|
1489 |
+
$value = $file_url;
|
1490 |
+
}
|
1491 |
+
}
|
1492 |
+
else {
|
1493 |
+
$files = isset($_FILES['wdform_' . $i . '_file' . $id]) ? $_FILES['wdform_' . $i . '_file' . $id] : NULL;
|
1494 |
+
foreach ($files['name'] as $file_key => $file_name) {
|
1495 |
+
if ($file_name) {
|
1496 |
+
$untilupload = $form->form_fields;
|
1497 |
+
$untilupload = substr($untilupload, strpos($untilupload, $i . '*:*id*:*type_file_upload'), -1);
|
1498 |
+
$untilupload = substr($untilupload, 0, strpos($untilupload, '*:*new_field*:'));
|
1499 |
+
$untilupload = explode('*:*w_field_label_pos*:*', $untilupload);
|
1500 |
+
$untilupload = $untilupload[1];
|
1501 |
+
$untilupload = explode('*:*w_destination*:*', $untilupload);
|
1502 |
+
$destination = explode('*:*w_hide_label*:*', $untilupload[0]);
|
1503 |
+
$destination = $destination[1];
|
1504 |
+
$destination = str_replace(site_url() . '/', '', $destination);
|
1505 |
+
$untilupload = $untilupload[1];
|
1506 |
+
$untilupload = explode('*:*w_extension*:*', $untilupload);
|
1507 |
+
$extension = $untilupload[0];
|
1508 |
+
$untilupload = $untilupload[1];
|
1509 |
+
$untilupload = explode('*:*w_max_size*:*', $untilupload);
|
1510 |
+
$max_size = $untilupload[0];
|
1511 |
+
$untilupload = $untilupload[1];
|
1512 |
+
$fileName = $files['name'][$file_key];
|
1513 |
+
$fileSize = $files['size'][$file_key];
|
1514 |
+
|
1515 |
+
if ($fileSize > $max_size * 1024) {
|
1516 |
+
return array($max + 1, addslashes(__('The file exceeds the allowed size of', 'form_maker')) . $max_size . ' KB');
|
1517 |
+
}
|
1518 |
+
|
1519 |
+
$uploadedFileNameParts = explode('.', $fileName);
|
1520 |
+
$uploadedFileExtension = array_pop($uploadedFileNameParts);
|
1521 |
+
$to = strlen($fileName) - strlen($uploadedFileExtension) - 1;
|
1522 |
+
|
1523 |
+
$fileNameFree = substr($fileName, 0, $to);
|
1524 |
+
$invalidFileExts = explode(',', $extension);
|
1525 |
+
$extOk = false;
|
1526 |
+
|
1527 |
+
foreach ($invalidFileExts as $key => $valuee) {
|
1528 |
+
if (is_numeric(strpos(strtolower($valuee), strtolower($uploadedFileExtension)))) {
|
1529 |
+
$extOk = true;
|
1530 |
+
}
|
1531 |
+
}
|
1532 |
+
|
1533 |
+
if ($extOk == false) {
|
1534 |
+
return array($max + 1, addslashes(__('Can not upload this type of file', 'form_maker')));
|
1535 |
+
}
|
1536 |
+
|
1537 |
+
$fileTemp = $files['tmp_name'][$file_key];
|
1538 |
+
$p = 1;
|
1539 |
+
|
1540 |
+
if (!file_exists($destination)) {
|
1541 |
+
mkdir($destination, 0777);
|
1542 |
+
}
|
1543 |
+
if (file_exists($destination . "/" . $fileName)) {
|
1544 |
+
$fileName1 = $fileName;
|
1545 |
+
while (file_exists($destination . "/" . $fileName1)) {
|
1546 |
+
$to = strlen($file_name) - strlen($uploadedFileExtension) - 1;
|
1547 |
+
$fileName1 = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
|
1548 |
+
// $file['name'] = $fileName;
|
1549 |
+
$p++;
|
1550 |
+
}
|
1551 |
+
$fileName = $fileName1;
|
1552 |
+
}
|
1553 |
+
|
1554 |
+
// for dropbox & google drive integration addons
|
1555 |
+
$check_both = 0;
|
1556 |
+
if ($form->save_uploads == 0) {
|
1557 |
+
if (defined('WD_FM_DBOX_INT') && is_plugin_active(constant('WD_FM_DBOX_INT'))) {
|
1558 |
+
$enable = $wpdb->get_var("SELECT enable FROM " . $wpdb->prefix . "formmaker_dbox_int WHERE form_id=" . $form->id);
|
1559 |
+
if ($enable == 1) {
|
1560 |
+
$selectable_upload = $wpdb->get_var("SELECT selectable_upload FROM " . $wpdb->prefix . "formmaker_dbox_int WHERE form_id=" . $form->id);
|
1561 |
+
|
1562 |
+
if ((int)$selectable_upload == 1) {
|
1563 |
+
$temp_dir_dbox = explode('\\', $fileTemp);
|
1564 |
+
$temp_dir_dbox = implode('%%', $temp_dir_dbox);
|
1565 |
+
|
1566 |
+
$value .= $temp_dir_dbox . '*@@url@@*' . $fileName;
|
1567 |
+
}
|
1568 |
+
else {
|
1569 |
+
$dlink_dbox = '<a href="' . add_query_arg(array('action' => 'WD_FM_DBOX_INT', 'addon_task' => 'upload_dbox_file', 'id' => $form->id), admin_url('admin-ajax.php')) . '&dbox_file_name=' . $fileName . '&dbox_folder_name=/' . $form->title . '" >' . $fileName . '</a>';
|
1570 |
+
|
1571 |
+
$value .= $dlink_dbox;
|
1572 |
+
}
|
1573 |
+
|
1574 |
+
$files['tmp_name'][$file_key] = $fileTemp;
|
1575 |
+
$temp_file = array("name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key], 'field_key' => $i);
|
1576 |
+
}
|
1577 |
+
else {
|
1578 |
+
$check_both++;
|
1579 |
+
}
|
1580 |
+
|
1581 |
+
}
|
1582 |
+
else {
|
1583 |
+
$check_both++;
|
1584 |
+
}
|
1585 |
+
if (defined('WD_FM_GDRIVE_INT') && is_plugin_active(constant('WD_FM_GDRIVE_INT'))) {
|
1586 |
+
$enable = $wpdb->get_var("SELECT enable FROM " . $wpdb->prefix . "formmaker_gdrive_int WHERE form_id=" . $form->id);
|
1587 |
+
if ($enable == 1) {
|
1588 |
+
$selectable_upload = $wpdb->get_var("SELECT selectable_upload FROM " . $wpdb->prefix . "formmaker_gdrive_int WHERE form_id=" . $form->id);
|
1589 |
+
|
1590 |
+
if ((int)$selectable_upload == 1) {
|
1591 |
+
$temp_dir_dbox = explode('\\', $fileTemp);
|
1592 |
+
$temp_dir_dbox = implode('%%', $temp_dir_dbox);
|
1593 |
+
$value .= 'wdCloudAddon' . $temp_dir_dbox . '*@@url@@*' . $fileName . '*@@url@@*' . $files['type'][$file_key];
|
1594 |
+
}
|
1595 |
+
else {
|
1596 |
+
$dlink_dbox = '<a target="_blank" href="' . add_query_arg(array('action' => 'WD_FM_GDRIVE_INT', 'addon_task' => 'create_drive_link', 'id' => $form->id), admin_url('admin-ajax.php')) . '&gdrive_file_name=' . $fileName . '&gdrive_folder_name=' . $form->title . '" >' . $fileName . '</a>';
|
1597 |
+
$value .= $dlink_dbox;
|
1598 |
+
}
|
1599 |
+
|
1600 |
+
$files['tmp_name'][$file_key] = $fileTemp;
|
1601 |
+
$temp_file = array("name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key], 'field_key' => $i);
|
1602 |
+
}
|
1603 |
+
else {
|
1604 |
+
$check_both++;
|
1605 |
+
}
|
1606 |
+
|
1607 |
+
}
|
1608 |
+
else {
|
1609 |
+
$check_both++;
|
1610 |
+
}
|
1611 |
+
|
1612 |
+
}
|
1613 |
//
|
1614 |
+
if ($check_both != 0) {
|
1615 |
+
$value .= '';
|
1616 |
+
$files['tmp_name'][$file_key] = $fileTemp;
|
1617 |
+
$temp_file = array("name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key], 'field_key' => $i);
|
1618 |
+
}
|
1619 |
+
// dropbox and google drive integration addons
|
1620 |
+
if ($form->save_uploads == 1) {
|
1621 |
+
if (!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
|
1622 |
+
return array($max + 1, addslashes(__('Error, file cannot be moved.', 'form_maker')));
|
1623 |
+
}
|
1624 |
+
$value .= site_url() . '/' . $destination . '/' . $fileName . '*@@url@@*';
|
1625 |
+
$files['tmp_name'][$file_key] = $destination . "/" . $fileName;
|
1626 |
+
$temp_file = array("name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key], 'field_key' => $i);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1627 |
|
1628 |
+
}
|
1629 |
+
array_push($all_files, $temp_file);
|
1630 |
+
}
|
1631 |
+
}
|
1632 |
+
}
|
1633 |
+
break;
|
1634 |
+
}
|
|
|
|
|
|
|
|
|
1635 |
|
1636 |
+
case 'type_address': {
|
1637 |
+
$value = '*#*#*#';
|
1638 |
+
$element = isset($_POST['wdform_' . $i . "_street1" . $id]) ? esc_html($_POST['wdform_' . $i . "_street1" . $id]) : NULL;
|
1639 |
+
if (isset($element)) {
|
1640 |
+
$value = $element;
|
1641 |
+
break;
|
1642 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1643 |
|
1644 |
+
$element = isset($_POST['wdform_' . $i . "_street2" . $id]) ? esc_html($_POST['wdform_' . $i . "_street2" . $id]) : NULL;
|
1645 |
+
if (isset($element)) {
|
1646 |
+
$value = $element;
|
1647 |
+
break;
|
1648 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1649 |
|
1650 |
+
$element = isset($_POST['wdform_' . $i . "_city" . $id]) ? esc_html($_POST['wdform_' . $i . "_city" . $id]) : NULL;
|
1651 |
+
if (isset($element)) {
|
1652 |
+
$value = $element;
|
1653 |
+
break;
|
1654 |
+
}
|
1655 |
|
1656 |
+
$element = isset($_POST['wdform_' . $i . "_state" . $id]) ? esc_html($_POST['wdform_' . $i . "_state" . $id]) : NULL;
|
1657 |
+
if (isset($element)) {
|
1658 |
+
$value = $element;
|
1659 |
+
break;
|
1660 |
+
}
|
1661 |
+
|
1662 |
+
$element = isset($_POST['wdform_' . $i . "_postal" . $id]) ? esc_html($_POST['wdform_' . $i . "_postal" . $id]) : NULL;
|
1663 |
+
if (isset($element)) {
|
1664 |
+
$value = $element;
|
1665 |
+
break;
|
1666 |
+
}
|
1667 |
+
|
1668 |
+
$element = isset($_POST['wdform_' . $i . "_country" . $id]) ? esc_html($_POST['wdform_' . $i . "_country" . $id]) : NULL;
|
1669 |
+
if (isset($element)) {
|
1670 |
+
$value = $element;
|
1671 |
+
break;
|
1672 |
+
}
|
1673 |
+
break;
|
1674 |
+
}
|
1675 |
+
|
1676 |
+
case "type_hidden": {
|
1677 |
+
$value = isset($_POST[$label_label[$key]]) ? esc_html($_POST[$label_label[$key]]) : "";
|
1678 |
+
break;
|
1679 |
+
}
|
1680 |
+
|
1681 |
+
case "type_radio": {
|
1682 |
+
$element = isset($_POST['wdform_' . $i . "_other_input" . $id]) ? esc_html($_POST['wdform_' . $i . "_other_input" . $id]) : NULL;
|
1683 |
+
if (isset($element)) {
|
1684 |
+
$value = $element;
|
1685 |
+
break;
|
1686 |
+
}
|
1687 |
+
$value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
|
1688 |
+
break;
|
1689 |
+
}
|
1690 |
+
|
1691 |
+
case "type_checkbox": {
|
1692 |
+
$start = -1;
|
1693 |
+
$value = '';
|
1694 |
+
for ($j = 0; $j < 100; $j++) {
|
1695 |
+
$element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : NULL;
|
1696 |
+
if (isset($element)) {
|
1697 |
+
$start = $j;
|
1698 |
+
break;
|
1699 |
+
}
|
1700 |
+
}
|
1701 |
+
|
1702 |
+
$other_element_id = -1;
|
1703 |
+
$is_other = isset($_POST['wdform_' . $i . "_allow_other" . $id]) ? esc_html($_POST['wdform_' . $i . "_allow_other" . $id]) : "";
|
1704 |
+
if ($is_other == "yes") {
|
1705 |
+
$other_element_id = isset($_POST['wdform_' . $i . "_allow_other_num" . $id]) ? esc_html($_POST['wdform_' . $i . "_allow_other_num" . $id]) : "";
|
1706 |
+
}
|
1707 |
+
|
1708 |
+
if ($start != -1) {
|
1709 |
+
for ($j = $start; $j < 100; $j++) {
|
1710 |
+
$element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : NULL;
|
1711 |
+
if (isset($element)) {
|
1712 |
+
if ($j == $other_element_id) {
|
1713 |
+
$value = $value . (isset($_POST['wdform_' . $i . "_other_input" . $id]) ? esc_html($_POST['wdform_' . $i . "_other_input" . $id]) : "") . '***br***';
|
1714 |
+
}
|
1715 |
+
else {
|
1716 |
+
$value = $value . (isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : "") . '***br***';
|
1717 |
+
}
|
1718 |
+
}
|
1719 |
+
}
|
1720 |
+
}
|
1721 |
+
break;
|
1722 |
+
}
|
1723 |
+
|
1724 |
+
case "type_paypal_price": {
|
1725 |
+
$value = isset($_POST['wdform_' . $i . "_element_dollars" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_dollars" . $id]) : 0;
|
1726 |
+
|
1727 |
+
$value = (int)preg_replace('/\D/', '', $value);
|
1728 |
+
|
1729 |
+
if (isset($_POST['wdform_' . $i . "_element_cents" . $id])) {
|
1730 |
+
$value = $value . '.' . (preg_replace('/\D/', '', esc_html($_POST['wdform_' . $i . "_element_cents" . $id])));
|
1731 |
+
}
|
1732 |
+
|
1733 |
+
$total += (float)($value);
|
1734 |
+
$paypal_option = array();
|
1735 |
+
|
1736 |
+
if ($value != 0) {
|
1737 |
+
$quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : 1);
|
1738 |
+
array_push($paypal['item_name'], $label_label[$key]);
|
1739 |
+
array_push($paypal['quantity'], $quantity);
|
1740 |
+
array_push($paypal['amount'], $value);
|
1741 |
+
$is_amount = true;
|
1742 |
+
array_push($paypal['on_os'], $paypal_option);
|
1743 |
+
}
|
1744 |
+
$value = $value . $form_currency;
|
1745 |
+
break;
|
1746 |
+
}
|
1747 |
+
|
1748 |
+
case "type_paypal_price_new": {
|
1749 |
+
$value = isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : 0;
|
1750 |
+
$total += (float)($value);
|
1751 |
+
$paypal_option = array();
|
1752 |
+
|
1753 |
+
if ($value != 0) {
|
1754 |
+
$quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : 1);
|
1755 |
+
array_push($paypal['item_name'], $label_label[$key]);
|
1756 |
+
array_push($paypal['quantity'], $quantity);
|
1757 |
+
array_push($paypal['amount'], $value);
|
1758 |
+
$is_amount = true;
|
1759 |
+
array_push($paypal['on_os'], $paypal_option);
|
1760 |
+
}
|
1761 |
+
$value = $form_currency . $value;
|
1762 |
+
break;
|
1763 |
+
}
|
1764 |
+
|
1765 |
+
case "type_paypal_select": {
|
1766 |
+
if (isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] != '') {
|
1767 |
+
$value = esc_html($_POST['wdform_' . $i . "_element_label" . $id]) . ' : ' . $form_currency . (isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "");
|
1768 |
+
}
|
1769 |
+
else {
|
1770 |
+
$value = '';
|
1771 |
+
}
|
1772 |
+
$quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : 1);
|
1773 |
+
$total += (float)(isset($_POST['wdform_' . $i . "_element" . $id]) ? $_POST['wdform_' . $i . "_element" . $id] : 0) * $quantity;
|
1774 |
+
array_push($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_' . $i . "_element_label" . $id]) ? $_POST['wdform_' . $i . "_element_label" . $id] : ""));
|
1775 |
+
array_push($paypal['quantity'], $quantity);
|
1776 |
+
array_push($paypal['amount'], (isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : ""));
|
1777 |
+
if (isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] != 0) {
|
1778 |
+
$is_amount = true;
|
1779 |
+
}
|
1780 |
+
$element_quantity = isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : NULL;
|
1781 |
+
if (isset($element_quantity) && $value != '') {
|
1782 |
+
$value .= '***br***' . (isset($_POST['wdform_' . $i . "_element_quantity_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity_label" . $id]) : "") . ': ' . esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) . '***quantity***';
|
1783 |
+
}
|
1784 |
+
$paypal_option = array();
|
1785 |
+
$paypal_option['on'] = array();
|
1786 |
+
$paypal_option['os'] = array();
|
1787 |
+
|
1788 |
+
for ($k = 0; $k < 50; $k++) {
|
1789 |
+
$temp_val = isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : NULL;
|
1790 |
+
if (isset($temp_val) && $value != '') {
|
1791 |
+
array_push($paypal_option['on'], (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : ""));
|
1792 |
+
array_push($paypal_option['os'], (isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : ""));
|
1793 |
+
$value .= '***br***' . (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : "") . ': ' . (isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : "") . '***property***';
|
1794 |
+
}
|
1795 |
+
}
|
1796 |
+
array_push($paypal['on_os'], $paypal_option);
|
1797 |
+
break;
|
1798 |
+
}
|
1799 |
+
|
1800 |
+
case "type_paypal_radio": {
|
1801 |
+
$element = isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : '';
|
1802 |
+
if ($element) {
|
1803 |
+
$value = (isset($_POST['wdform_' . $i . "_element_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_label" . $id]) : '') . ' : ' . $form_currency . $element;
|
1804 |
+
}
|
1805 |
+
else {
|
1806 |
+
$value = '';
|
1807 |
+
}
|
1808 |
+
$quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : 1);
|
1809 |
+
$total += (float)(isset($_POST['wdform_' . $i . "_element" . $id]) ? $_POST['wdform_' . $i . "_element" . $id] : 0) * $quantity;
|
1810 |
+
array_push($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_' . $i . "_element_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_label" . $id]) : ""));
|
1811 |
+
array_push($paypal['quantity'], $quantity);
|
1812 |
+
array_push($paypal['amount'], (isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : 0));
|
1813 |
+
if (isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] != 0) {
|
1814 |
+
$is_amount = true;
|
1815 |
+
}
|
1816 |
+
|
1817 |
+
$element_quantity = isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : NULL;
|
1818 |
+
if (isset($element_quantity) && $value != '') {
|
1819 |
+
$value .= '***br***' . (isset($_POST['wdform_' . $i . "_element_quantity_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity_label" . $id]) : "") . ': ' . esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) . '***quantity***';
|
1820 |
+
}
|
1821 |
+
|
1822 |
+
$paypal_option = array();
|
1823 |
+
$paypal_option['on'] = array();
|
1824 |
+
$paypal_option['os'] = array();
|
1825 |
+
|
1826 |
+
for ($k = 0; $k < 50; $k++) {
|
1827 |
+
$temp_val = isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : NULL;
|
1828 |
+
if (isset($temp_val) && $value != '') {
|
1829 |
+
array_push($paypal_option['on'], (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : ""));
|
1830 |
+
array_push($paypal_option['os'], esc_html($_POST['wdform_' . $i . "_property" . $id . $k]));
|
1831 |
+
$value .= '***br***' . (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : "") . ': ' . esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) . '***property***';
|
1832 |
+
}
|
1833 |
+
}
|
1834 |
+
array_push($paypal['on_os'], $paypal_option);
|
1835 |
+
break;
|
1836 |
+
}
|
1837 |
+
|
1838 |
+
case "type_paypal_shipping": {
|
1839 |
+
$element = isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : '';
|
1840 |
+
if ($element) {
|
1841 |
+
$value = (isset($_POST['wdform_' . $i . "_element_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_label" . $id]) : '') . ' : ' . $form_currency . $element;
|
1842 |
+
}
|
1843 |
+
else {
|
1844 |
+
$value = '';
|
1845 |
+
}
|
1846 |
+
$paypal['shipping'] = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
|
1847 |
+
break;
|
1848 |
+
}
|
1849 |
+
|
1850 |
+
case "type_paypal_checkbox": {
|
1851 |
+
$start = -1;
|
1852 |
+
$value = '';
|
1853 |
+
for ($j = 0; $j < 100; $j++) {
|
1854 |
+
$element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : NULL;
|
1855 |
+
if (isset($element)) {
|
1856 |
+
$start = $j;
|
1857 |
+
break;
|
1858 |
+
}
|
1859 |
+
}
|
1860 |
+
|
1861 |
+
$other_element_id = -1;
|
1862 |
+
$is_other = isset($_POST['wdform_' . $i . "_allow_other" . $id]) ? esc_html($_POST['wdform_' . $i . "_allow_other" . $id]) : "";
|
1863 |
+
if ($is_other == "yes") {
|
1864 |
+
$other_element_id = isset($_POST['wdform_' . $i . "_allow_other_num" . $id]) ? esc_html($_POST['wdform_' . $i . "_allow_other_num" . $id]) : "";
|
1865 |
+
}
|
1866 |
+
|
1867 |
+
if ($start != -1) {
|
1868 |
+
for ($j = $start; $j < 100; $j++) {
|
1869 |
+
$element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : NULL;
|
1870 |
+
if (isset($element)) {
|
1871 |
+
if ($j == $other_element_id) {
|
1872 |
+
$value = $value . (isset($_POST['wdform_' . $i . "_other_input" . $id]) ? esc_html($_POST['wdform_' . $i . "_other_input" . $id]) : "") . '***br***';
|
1873 |
+
}
|
1874 |
+
else {
|
1875 |
+
$element = (isset($_POST['wdform_' . $i . "_element" . $id . $j]) && $_POST['wdform_' . $i . "_element" . $id . $j] ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : 0);
|
1876 |
+
$value = $value . (isset($_POST['wdform_' . $i . "_element" . $id . $j . "_label"]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j . "_label"]) : "") . ' - ' . $form_currency . $element . '***br***';
|
1877 |
+
|
1878 |
+
$quantity = ((isset($_POST['wdform_' . $i . "_element_quantity" . $id]) && ($_POST['wdform_' . $i . "_element_quantity" . $id] >= 1)) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : 1);
|
1879 |
+
$total += (float)(isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? $_POST['wdform_' . $i . "_element" . $id . $j] : 0) * (float)($quantity);
|
1880 |
+
array_push($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_' . $i . "_element" . $id . $j . "_label"]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j . "_label"]) : ""));
|
1881 |
+
array_push($paypal['quantity'], $quantity);
|
1882 |
+
array_push($paypal['amount'], (isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? ($_POST['wdform_' . $i . "_element" . $id . $j] == '' ? '0' : esc_html($_POST['wdform_' . $i . "_element" . $id . $j])) : ""));
|
1883 |
+
if (isset($_POST['wdform_' . $i . "_element" . $id . $j]) && $_POST['wdform_' . $i . "_element" . $id . $j] != 0) {
|
1884 |
+
$is_amount = TRUE;
|
1885 |
+
}
|
1886 |
+
$paypal_option = array();
|
1887 |
+
$paypal_option['on'] = array();
|
1888 |
+
$paypal_option['os'] = array();
|
1889 |
+
|
1890 |
+
for ($k = 0; $k < 50; $k++) {
|
1891 |
+
$temp_val = isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : NULL;
|
1892 |
+
if (isset($temp_val)) {
|
1893 |
+
array_push($paypal_option['on'], isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : "");
|
1894 |
+
array_push($paypal_option['os'], esc_html($_POST['wdform_' . $i . "_property" . $id . $k]));
|
1895 |
+
}
|
1896 |
+
}
|
1897 |
+
array_push($paypal['on_os'], $paypal_option);
|
1898 |
+
}
|
1899 |
+
}
|
1900 |
+
}
|
1901 |
+
|
1902 |
+
$element_quantity = isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : NULL;
|
1903 |
+
if (isset($element_quantity)) {
|
1904 |
+
$value .= (isset($_POST['wdform_' . $i . "_element_quantity_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity_label" . $id]) : "") . ': ' . esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) . '***quantity***';
|
1905 |
+
}
|
1906 |
+
for ($k = 0; $k < 50; $k++) {
|
1907 |
+
$temp_val = isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : NULL;
|
1908 |
+
if (isset($temp_val)) {
|
1909 |
+
$value .= '***br***' . (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : "") . ': ' . $_POST['wdform_' . $i . "_property" . $id . $k] . '***property***';
|
1910 |
+
}
|
1911 |
+
}
|
1912 |
+
}
|
1913 |
+
break;
|
1914 |
+
}
|
1915 |
+
|
1916 |
+
case "type_star_rating": {
|
1917 |
+
if (isset($_POST['wdform_' . $i . "_selected_star_amount" . $id]) && $_POST['wdform_' . $i . "_selected_star_amount" . $id] == "") {
|
1918 |
+
$selected_star_amount = 0;
|
1919 |
+
}
|
1920 |
+
else {
|
1921 |
+
$selected_star_amount = isset($_POST['wdform_' . $i . "_selected_star_amount" . $id]) ? $_POST['wdform_' . $i . "_selected_star_amount" . $id] : 0;
|
1922 |
+
}
|
1923 |
+
$value = $selected_star_amount . '/' . (isset($_POST['wdform_' . $i . "_star_amount" . $id]) ? esc_html($_POST['wdform_' . $i . "_star_amount" . $id]) : "");
|
1924 |
+
break;
|
1925 |
+
}
|
1926 |
+
|
1927 |
+
case "type_scale_rating": {
|
1928 |
+
$value = (isset($_POST['wdform_' . $i . "_scale_radio" . $id]) ? esc_html($_POST['wdform_' . $i . "_scale_radio" . $id]) : 0) . '/' . (isset($_POST['wdform_' . $i . "_scale_amount" . $id]) ? esc_html($_POST['wdform_' . $i . "_scale_amount" . $id]) : "");
|
1929 |
+
break;
|
1930 |
+
}
|
1931 |
+
|
1932 |
+
case "type_spinner": {
|
1933 |
+
$value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
|
1934 |
+
break;
|
1935 |
+
}
|
1936 |
+
|
1937 |
+
case "type_slider": {
|
1938 |
+
$value = isset($_POST['wdform_' . $i . "_slider_value" . $id]) ? esc_html($_POST['wdform_' . $i . "_slider_value" . $id]) : "";
|
1939 |
+
break;
|
1940 |
+
}
|
1941 |
+
|
1942 |
+
case "type_range": {
|
1943 |
+
$value = (isset($_POST['wdform_' . $i . "_element" . $id . '0']) ? esc_html($_POST['wdform_' . $i . "_element" . $id . '0']) : "") . '-' . (isset($_POST['wdform_' . $i . "_element" . $id . '1']) ? esc_html($_POST['wdform_' . $i . "_element" . $id . '1']) : "");
|
1944 |
+
break;
|
1945 |
+
}
|
1946 |
+
|
1947 |
+
case "type_grading": {
|
1948 |
+
$value = "";
|
1949 |
+
$items = explode(":", isset($_POST['wdform_' . $i . "_hidden_item" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_item" . $id]) : "");
|
1950 |
+
for ($k = 0; $k < sizeof($items) - 1; $k++) {
|
1951 |
+
$value .= (isset($_POST['wdform_' . $i . "_element" . $id . '_' . $k]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . '_' . $k]) : "") . ':';
|
1952 |
+
}
|
1953 |
+
$value .= (isset($_POST['wdform_' . $i . "_hidden_item" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_item" . $id]) : "") . '***grading***';
|
1954 |
+
break;
|
1955 |
+
}
|
1956 |
+
|
1957 |
+
case "type_matrix": {
|
1958 |
+
$rows_of_matrix = explode("***", isset($_POST['wdform_' . $i . "_hidden_row" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_row" . $id]) : "");
|
1959 |
+
$rows_count = sizeof($rows_of_matrix) - 1;
|
1960 |
+
$column_of_matrix = explode("***", isset($_POST['wdform_' . $i . "_hidden_column" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_column" . $id]) : "");
|
1961 |
+
$columns_count = sizeof($column_of_matrix) - 1;
|
1962 |
+
|
1963 |
+
if (isset($_POST['wdform_' . $i . "_input_type" . $id]) && $_POST['wdform_' . $i . "_input_type" . $id] == "radio") {
|
1964 |
+
$input_value = "";
|
1965 |
+
for ($k = 1; $k <= $rows_count; $k++) {
|
1966 |
+
$input_value .= (isset($_POST['wdform_' . $i . "_input_element" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_input_element" . $id . $k]) : 0) . "***";
|
1967 |
+
}
|
1968 |
+
}
|
1969 |
+
if (isset($_POST['wdform_' . $i . "_input_type" . $id]) && $_POST['wdform_' . $i . "_input_type" . $id] == "checkbox") {
|
1970 |
+
$input_value = "";
|
1971 |
+
for ($k = 1; $k <= $rows_count; $k++) {
|
1972 |
+
for ($j = 1; $j <= $columns_count; $j++) {
|
1973 |
+
$input_value .= (isset($_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j]) ? esc_html($_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j]) : 0) . "***";
|
1974 |
+
}
|
1975 |
+
}
|
1976 |
+
}
|
1977 |
+
|
1978 |
+
if (isset($_POST['wdform_' . $i . "_input_type" . $id]) && $_POST['wdform_' . $i . "_input_type" . $id] == "text") {
|
1979 |
+
$input_value = "";
|
1980 |
+
for ($k = 1; $k <= $rows_count; $k++) {
|
1981 |
+
for ($j = 1; $j <= $columns_count; $j++) {
|
1982 |
+
$input_value .= (isset($_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j]) ? esc_html($_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j]) : "") . "***";
|
1983 |
+
}
|
1984 |
+
}
|
1985 |
+
}
|
1986 |
+
|
1987 |
+
if (isset($_POST['wdform_' . $i . "_input_type" . $id]) && $_POST['wdform_' . $i . "_input_type" . $id] == "select") {
|
1988 |
+
$input_value = "";
|
1989 |
+
for ($k = 1; $k <= $rows_count; $k++) {
|
1990 |
+
for ($j = 1; $j <= $columns_count; $j++) {
|
1991 |
+
$input_value .= (isset($_POST['wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j]) ? esc_html($_POST['wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j]) : "") . "***";
|
1992 |
+
}
|
1993 |
+
}
|
1994 |
+
}
|
1995 |
+
|
1996 |
+
$value = $rows_count . (isset($_POST['wdform_' . $i . "_hidden_row" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_row" . $id]) : "") . '***' . $columns_count . (isset($_POST['wdform_' . $i . "_hidden_column" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_column" . $id]) : "") . '***' . (isset($_POST['wdform_' . $i . "_input_type" . $id]) ? esc_html($_POST['wdform_' . $i . "_input_type" . $id]) : "") . '***' . $input_value . '***matrix***';
|
1997 |
+
break;
|
1998 |
+
}
|
1999 |
+
|
2000 |
+
}
|
2001 |
+
|
2002 |
+
if ($type == "type_address") {
|
2003 |
+
if ($value == '*#*#*#') {
|
2004 |
+
continue;
|
2005 |
+
}
|
2006 |
+
}
|
2007 |
+
if ($type == "type_text" or $type == "type_password" or $type == "type_textarea" or $type == "type_name" or $type == "type_submitter_mail" or $type == "type_number" or $type == "type_phone" or $type == "type_phone_new") {
|
2008 |
+
$untilupload = $form->form_fields;
|
2009 |
+
$untilupload = substr($untilupload, strpos($untilupload, $i . '*:*id*:*' . $type), -1);
|
2010 |
+
$untilupload = substr($untilupload, 0, strpos($untilupload, '*:*new_field*:'));
|
2011 |
+
$untilupload = explode('*:*w_required*:*', $untilupload);
|
2012 |
+
$untilupload = $untilupload[1];
|
2013 |
+
$untilupload = explode('*:*w_unique*:*', $untilupload);
|
2014 |
+
$unique_element = $untilupload[0];
|
2015 |
+
if (strlen($unique_element) > 3) {
|
2016 |
+
$unique_element = substr($unique_element, -3);
|
2017 |
+
}
|
2018 |
+
|
2019 |
+
if ($unique_element == 'yes') {
|
2020 |
+
$unique = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id, $i, addslashes($value)));
|
2021 |
+
if ($unique) {
|
2022 |
+
return array(($max + 1), addslashes(addslashes(__('This field ' . $label_label[$key] . ' requires a unique entry.', 'form_maker'))));
|
2023 |
+
}
|
2024 |
+
}
|
2025 |
+
}
|
2026 |
+
$save_or_no = TRUE;
|
2027 |
+
$fvals['{' . $i . '}'] = str_replace(array("***map***", "*@@url@@*", "@@@@@@@@@", "@@@", "***grading***", "***br***"), array(" ", "", " ", " ", " ", ", "), addslashes($value));
|
2028 |
+
|
2029 |
+
if ($form->savedb) {
|
2030 |
+
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
2031 |
+
'form_id' => $id,
|
2032 |
+
'element_label' => $i,
|
2033 |
+
'element_value' => stripslashes($value),
|
2034 |
+
'group_id' => ($max + 1),
|
2035 |
+
'date' => date('Y-m-d H:i:s'),
|
2036 |
+
'ip' => $_SERVER['REMOTE_ADDR'],
|
2037 |
+
'user_id_wd' => $current_user->ID,
|
2038 |
+
), array(
|
2039 |
+
'%d',
|
2040 |
+
'%s',
|
2041 |
+
'%s',
|
2042 |
+
'%d',
|
2043 |
+
'%s',
|
2044 |
+
'%s',
|
2045 |
+
'%d'
|
2046 |
+
));
|
2047 |
+
}
|
2048 |
+
if (!$save_or_no) {
|
2049 |
+
return FALSE;
|
2050 |
+
}
|
2051 |
+
$chgnac = FALSE;
|
2052 |
+
}
|
2053 |
+
else {
|
2054 |
+
$fvals['{' . $i . '}'] = '';
|
2055 |
+
}
|
2056 |
+
}
|
2057 |
+
|
2058 |
+
$subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix . "formmaker_submits");
|
2059 |
+
$user_fields = array("subid" => $subid, "ip" => $ip, "userid" => $wp_userid, "username" => $wp_username, "useremail" => $wp_useremail);
|
2060 |
+
|
2061 |
+
$queries = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_query WHERE form_id=%d", (int)$id));
|
2062 |
+
if ($queries) {
|
2063 |
+
foreach ($queries as $query) {
|
2064 |
+
$temp = explode('***wdfcon_typewdf***', $query->details);
|
2065 |
+
$con_type = $temp[0];
|
2066 |
+
$temp = explode('***wdfcon_methodwdf***', $temp[1]);
|
2067 |
+
$con_method = $temp[0];
|
2068 |
+
$temp = explode('***wdftablewdf***', $temp[1]);
|
2069 |
+
$table_cur = $temp[0];
|
2070 |
+
$temp = explode('***wdfhostwdf***', $temp[1]);
|
2071 |
+
$host = $temp[0];
|
2072 |
+
$temp = explode('***wdfportwdf***', $temp[1]);
|
2073 |
+
$port = $temp[0];
|
2074 |
+
$temp = explode('***wdfusernamewdf***', $temp[1]);
|
2075 |
+
$username = $temp[0];
|
2076 |
+
$temp = explode('***wdfpasswordwdf***', $temp[1]);
|
2077 |
+
$password = $temp[0];
|
2078 |
+
$temp = explode('***wdfdatabasewdf***', $temp[1]);
|
2079 |
+
$database = $temp[0];
|
2080 |
+
|
2081 |
+
$query = str_replace(array_keys($fvals), $fvals, $query->query);
|
2082 |
+
foreach ($user_fields as $user_key => $user_field) {
|
2083 |
+
$query = str_replace('{' . $user_key . '}', $user_field, $query);
|
2084 |
+
}
|
2085 |
+
|
2086 |
+
if ($con_type == 'remote') {
|
2087 |
+
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
2088 |
+
$wpdb_temp->query($query);
|
2089 |
+
}
|
2090 |
+
else {
|
2091 |
$wpdb->query($query);
|
2092 |
}
|
2093 |
+
}
|
2094 |
// $wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
|
2095 |
+
}
|
2096 |
+
|
2097 |
+
$addons = array('WD_FM_MAILCHIMP' => 'MailChimp', 'WD_FM_REG' => 'Registration');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2098 |
foreach ($addons as $addon => $addon_name) {
|
2099 |
+
if (defined($addon) && is_plugin_active(constant($addon))) {
|
2100 |
+
$_GET['addon_task'] = 'frontend';
|
2101 |
+
$_GET['form_id'] = $id;
|
2102 |
+
$GLOBALS['fvals'] = $fvals;
|
2103 |
+
do_action($addon . '_init');
|
2104 |
+
}
|
2105 |
+
}
|
2106 |
+
|
2107 |
+
$addons = array('WD_FM_STRIPE' => 'Stripe');
|
2108 |
+
foreach ($addons as $addon => $addon_name) {
|
2109 |
+
if (defined($addon) && is_plugin_active(constant($addon))) {
|
2110 |
+
$_GET['addon_task'] = 'pay_with_stripe';
|
2111 |
+
$_GET['form_id'] = $id;
|
2112 |
+
|
2113 |
+
$GLOBALS['wdstripe_stripeToken'] = isset($_POST['stripeToken' . $id]) ? $_POST['stripeToken' . $id] : '';
|
2114 |
+
|
2115 |
+
if ($is_amount && isset($_POST['stripeToken' . $id])) {
|
2116 |
+
$wdstripe_products_data = new stdClass();
|
2117 |
+
$tax = $form->tax;
|
2118 |
+
$total = $total + ($total * $tax) / 100;
|
2119 |
+
$shipping = isset($paypal['shipping']) ? $paypal['shipping'] : 0;
|
2120 |
+
$total = $total + $shipping;
|
2121 |
+
$total = round($total, 2);
|
2122 |
+
$wdstripe_products_data->currency = $form->payment_currency;
|
2123 |
+
$wdstripe_products_data->amount = $total;
|
2124 |
+
$wdstripe_products_data->shipping = $shipping;
|
2125 |
+
$wdstripe_products_data = json_encode($wdstripe_products_data);
|
2126 |
+
$GLOBALS['wdstripe_products_data'] = $wdstripe_products_data;
|
2127 |
+
do_action($addon . '_init');
|
2128 |
+
if (isset($GLOBALS['wdstripe_error'])) {
|
2129 |
+
return array($max + 1);
|
2130 |
+
}
|
2131 |
}
|
2132 |
+
}
|
2133 |
}
|
2134 |
+
|
2135 |
$str = '';
|
2136 |
+
|
2137 |
+
if ($form->paypal_mode) {
|
2138 |
+
if ($paypal['item_name']) {
|
2139 |
+
if ($is_amount) {
|
2140 |
$tax = $form->tax;
|
2141 |
$currency = $form->payment_currency;
|
2142 |
$business = $form->paypal_email;
|
2143 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
2144 |
$total2 = round($total, 2);
|
2145 |
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
2146 |
'form_id' => $id,
|
2166 |
if (isset($paypal['shipping'])) {
|
2167 |
$total = $total + $paypal['shipping'];
|
2168 |
}
|
2169 |
+
$total = round($total, 2);
|
2170 |
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
2171 |
'form_id' => $id,
|
2172 |
'element_label' => 'total',
|
2208 |
return false;
|
2209 |
}
|
2210 |
$str = '';
|
2211 |
+
|
2212 |
+
if ($form->checkout_mode == 1 || $form->checkout_mode == "production") {
|
2213 |
+
$str .= "https://www.paypal.com/cgi-bin/webscr?";
|
2214 |
+
}
|
2215 |
+
else {
|
2216 |
+
$str .= "https://www.sandbox.paypal.com/cgi-bin/webscr?";
|
2217 |
+
}
|
2218 |
$str .= "currency_code=" . $currency;
|
2219 |
$str .= "&business=" . urlencode($business);
|
2220 |
$str .= "&cmd=" . "_cart";
|
2225 |
$str = $str . "&shipping_1=" . $paypal['shipping'];
|
2226 |
// $str=$str."&weight_cart=".$paypal['shipping'];
|
2227 |
// $str=$str."&shipping2=3".$paypal['shipping'];
|
2228 |
+
$str = $str . "&no_shipping=2";
|
2229 |
}
|
2230 |
+
$i = 0;
|
2231 |
foreach ($paypal['item_name'] as $pkey => $pitem_name) {
|
2232 |
+
if ($paypal['amount'][$pkey]) {
|
2233 |
$i++;
|
2234 |
+
$str = $str . "&item_name_" . $i . "=" . urlencode($pitem_name);
|
2235 |
+
$str = $str . "&amount_" . $i . "=" . $paypal['amount'][$pkey];
|
2236 |
+
$str = $str . "&quantity_" . $i . "=" . $paypal['quantity'][$pkey];
|
2237 |
if ($tax) {
|
2238 |
$str = $str . "&tax_rate_" . $i . "=" . $tax;
|
2239 |
}
|
2240 |
if ($paypal['on_os'][$pkey]) {
|
2241 |
foreach ($paypal['on_os'][$pkey]['on'] as $on_os_key => $on_item_name) {
|
2242 |
+
$str = $str . "&on" . $on_os_key . "_" . $i . "=" . $on_item_name;
|
2243 |
+
$str = $str . "&os" . $on_os_key . "_" . $i . "=" . $paypal['on_os'][$pkey]['os'][$on_os_key];
|
2244 |
}
|
2245 |
}
|
2246 |
}
|
2248 |
}
|
2249 |
}
|
2250 |
}
|
2251 |
+
|
2252 |
+
if ($form->mail_verify) {
|
2253 |
+
unset($_SESSION['hash']);
|
2254 |
+
unset($_SESSION['gid']);
|
2255 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
2256 |
+
$_SESSION['gid'] = $max + 1;
|
2257 |
+
$send_tos = explode('**', $form->send_to);
|
2258 |
+
if ($send_tos) {
|
2259 |
+
foreach ($send_tos as $send_index => $send_to) {
|
2260 |
+
$_SESSION['hash'][] = md5($ip . time() . rand());
|
2261 |
+
$send_to = str_replace('*', '', $send_to);
|
2262 |
+
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
2263 |
+
'form_id' => $id,
|
2264 |
+
'element_label' => 'verifyInfo@' . $send_to,
|
2265 |
+
'element_value' => $_SESSION['hash'][$send_index] . "**" . $form->mail_verify_expiretime . "**" . $send_to,
|
2266 |
+
'group_id' => ($max + 1),
|
2267 |
+
'date' => date('Y-m-d H:i:s'),
|
2268 |
+
'ip' => $ip,
|
2269 |
+
'user_id_wd' => $current_user->ID,
|
2270 |
+
), array(
|
2271 |
+
'%d',
|
2272 |
+
'%s',
|
2273 |
+
'%s',
|
2274 |
+
'%d',
|
2275 |
+
'%s',
|
2276 |
+
'%s',
|
2277 |
+
'%d'
|
2278 |
+
));
|
2279 |
+
if (!$save_or_no) {
|
2280 |
+
return false;
|
2281 |
+
}
|
2282 |
+
}
|
2283 |
+
}
|
2284 |
+
}
|
2285 |
+
|
|
|
|
|
2286 |
if ($chgnac) {
|
2287 |
+
if ($form->submit_text_type != 4) {
|
2288 |
+
$_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Nothing was submitted.', 'form_maker')));
|
2289 |
+
}
|
2290 |
+
$_SESSION['error_or_no' . $id] = 1;
|
2291 |
+
$_SESSION['form_submit_type' . $id] = $form->submit_text_type . "," . $form->id;
|
2292 |
+
wp_redirect($_SERVER["REQUEST_URI"]);
|
2293 |
+
exit;
|
|
|
2294 |
}
|
2295 |
|
2296 |
$addons = array('WD_FM_GDRIVE_INT' => 'GDriveInt', 'WD_FM_DBOX_INT' => 'DboxInt', 'WD_FM_POST_GEN' => 'PostGen', 'WD_FM_PUSHOVER' => 'Pushover'); // the sequence is important for google drive and drop box addons !!!!!!!!!!
|
2297 |
+
foreach ($addons as $addon => $addon_name) {
|
2298 |
+
if (defined($addon) && is_plugin_active(constant($addon))) {
|
2299 |
+
$_GET['addon_task'] = 'frontend';
|
2300 |
+
$_GET['form_id'] = $id;
|
2301 |
+
$GLOBALS['all_files'] = json_encode($all_files);
|
2302 |
+
$GLOBALS['form_currency'] = $form_currency;
|
2303 |
+
do_action($addon . '_init');
|
2304 |
+
}
|
2305 |
}
|
2306 |
return array($all_files, $str);
|
2307 |
}
|
2312 |
}
|
2313 |
|
2314 |
public function get_after_submission_text($form_id) {
|
2315 |
+
global $wpdb;
|
2316 |
+
$submit_text = $wpdb->get_var("SELECT submit_text FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
|
2317 |
+
$current_user = wp_get_current_user();
|
2318 |
+
if ($current_user->ID != 0) {
|
2319 |
+
$userid = $current_user->ID;
|
2320 |
+
$username = $current_user->display_name;
|
2321 |
+
$useremail = $current_user->user_email;
|
2322 |
+
}
|
2323 |
+
else {
|
2324 |
+
$userid = '';
|
2325 |
+
$username = '';
|
2326 |
+
$useremail = '';
|
2327 |
+
}
|
2328 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
2329 |
+
$subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix . "formmaker_submits");
|
2330 |
+
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $form_id));
|
2331 |
+
|
2332 |
+
$label_order_original = array();
|
2333 |
+
$label_order_ids = array();
|
2334 |
+
$submission_array = array();
|
2335 |
+
$label_all = explode('#****#', $row->label_order_current);
|
2336 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
2337 |
+
foreach ($label_all as $key => $label_each) {
|
2338 |
+
$label_id_each = explode('#**id**#', $label_each);
|
2339 |
+
$label_id = $label_id_each[0];
|
2340 |
+
array_push($label_order_ids, $label_id);
|
2341 |
+
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
2342 |
+
$label_order_original[$label_id] = $label_order_each[0];
|
2343 |
+
}
|
2344 |
+
|
2345 |
+
$submissions_row = $wpdb->get_results($wpdb->prepare("SELECT `element_label`, `element_value` FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id=%d AND group_id=%d", $form_id, $subid));
|
2346 |
+
foreach ($submissions_row as $sub_row) {
|
2347 |
+
$submission_array[$sub_row->element_label] = $sub_row->element_value;
|
2348 |
+
}
|
2349 |
+
|
2350 |
+
foreach ($label_order_original as $key => $label_each) {
|
2351 |
+
if (strpos($submit_text, "%" . $label_each . "%") > -1) {
|
2352 |
+
$submit_text = str_replace("%" . $label_each . "%", $submission_array[$key], $submit_text);
|
2353 |
+
}
|
2354 |
+
}
|
2355 |
+
|
2356 |
+
$custom_fields = array("subid" => $subid, "ip" => $ip, "userid" => $userid, "username" => $username, "useremail" => $useremail);
|
2357 |
+
foreach ($custom_fields as $key => $custom_field) {
|
2358 |
+
if (strpos($submit_text, "%" . $key . "%") > -1) {
|
2359 |
+
$submit_text = str_replace("%" . $key . "%", $custom_field, $submit_text);
|
2360 |
+
}
|
2361 |
+
}
|
2362 |
+
$submit_text = str_replace(array("***map***", "*@@url@@*", "@@@@@@@@@", "@@@", "***grading***", "***br***", "***star_rating***"), array(" ", "", " ", " ", " ", ", ", " "), $submit_text);
|
2363 |
+
|
2364 |
+
return $submit_text;
|
2365 |
+
}
|
2366 |
|
2367 |
public function increment_views_count($id) {
|
2368 |
global $wpdb;
|
2369 |
$vives_form = $wpdb->get_var($wpdb->prepare("SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id));
|
2370 |
if (isset($vives_form)) {
|
2371 |
+
$vives_form = $vives_form + 1;
|
2372 |
+
$wpdb->update($wpdb->prefix . "formmaker_views", array(
|
2373 |
'views' => $vives_form,
|
2374 |
), array('form_id' => $id), array(
|
2375 |
'%d',
|
2379 |
$wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
2380 |
'form_id' => $id,
|
2381 |
'views' => 1
|
2382 |
+
), array(
|
2383 |
+
'%d',
|
2384 |
+
'%d'
|
2385 |
));
|
2386 |
}
|
2387 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: webdorado,wdsupport,formmakersupport
|
|
3 |
Donate link: https://web-dorado.com/products/wordpress-form.html
|
4 |
Tags: form, form builder, contact form, custom form, feedback, contact, contact forms, captcha, email, form manager, forms, survey
|
5 |
Requires at least: 3.4
|
6 |
-
Tested up to: 4.7
|
7 |
-
Stable tag: 1.11.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -290,6 +290,13 @@ MailChimp form add-on of Form Maker lets you build up a customer database on you
|
|
290 |
|
291 |
== Changelog ==
|
292 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
= 1.11.1 =
|
294 |
* Removed: Old forms support (created with Form Maker versions < 1.7.0)
|
295 |
* Added: Form Header
|
3 |
Donate link: https://web-dorado.com/products/wordpress-form.html
|
4 |
Tags: form, form builder, contact form, custom form, feedback, contact, contact forms, captcha, email, form manager, forms, survey
|
5 |
Requires at least: 3.4
|
6 |
+
Tested up to: 4.7
|
7 |
+
Stable tag: 1.11.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
290 |
|
291 |
== Changelog ==
|
292 |
|
293 |
+
= 1.11.2 =
|
294 |
+
* Added: Overview page
|
295 |
+
* Removed: Featured Plugins, Featured Themes pages
|
296 |
+
* Fixed: Security issue
|
297 |
+
* Fixed: Themes - bug on save as copy
|
298 |
+
|
299 |
+
|
300 |
= 1.11.1 =
|
301 |
* Removed: Old forms support (created with Form Maker versions < 1.7.0)
|
302 |
* Added: Form Header
|
wd/README.md
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Version: 1.0.8
|
2 |
+
|
3 |
+
|
4 |
+
Usage:
|
5 |
+
|
6 |
+
Copy and paste wd library into your plugin folder.
|
7 |
+
In your plugin main file check if library main DoradoWeb class doesn't exist, include it
|
8 |
+
if( !class_exists("DoradoWeb") ){
|
9 |
+
require_once(PATH_TO_YOUR_PLUGIN_DIR . '/wd/start.php');
|
10 |
+
}
|
11 |
+
|
12 |
+
Then call dorado_web_init($options) function.
|
13 |
+
$options = array (
|
14 |
+
"prefix" => "your_plugin_prefix",
|
15 |
+
"wd_plugin_id" => your_plugin_id,
|
16 |
+
"plugin_title" => "your plugin titile",
|
17 |
+
"plugin_wordpress_slug" => "your plugin wordpress slug",
|
18 |
+
"plugin_dir" => 'path to your plugin dir',
|
19 |
+
"plugin_main_file" => 'path to your plugin main file',
|
20 |
+
"description" => 'your plugin description',
|
21 |
+
|
22 |
+
"plugin_features" => array(
|
23 |
+
0 => array(
|
24 |
+
"title" => "feature title 1",
|
25 |
+
"description" => "feature 1 description",
|
26 |
+
),
|
27 |
+
1 => array(
|
28 |
+
"title" => "feature title 2",
|
29 |
+
"description" => "feature 2 description",
|
30 |
+
),
|
31 |
+
...
|
32 |
+
),
|
33 |
+
"user_guide" => array(
|
34 |
+
0 => array(
|
35 |
+
"main_title" => "user guide step 1",
|
36 |
+
"url" => "link to step 1",
|
37 |
+
"titles" => array(
|
38 |
+
array(
|
39 |
+
"title" => "step 1 sub title",
|
40 |
+
"url" => "link to step 1 sub"
|
41 |
+
)
|
42 |
+
)
|
43 |
+
),
|
44 |
+
...
|
45 |
+
),
|
46 |
+
"overview_welcome_image" => null,
|
47 |
+
"video_youtube_id" => "your plugin youtube video id", // e.g. https://www.youtube.com/watch?v=acaexefeP7o youtube id is the acaexefeP7o
|
48 |
+
"plugin_wd_url" => "https://web-dorado.com/products/your plugin",
|
49 |
+
"plugin_wd_demo_link" => "http://wpdemo.web-dorado.com/your plugin",
|
50 |
+
"plugin_wd_addons_link" => "https://web-dorado.com/products/your plugin addons",
|
51 |
+
"after_subscribe" => "after subsribe page", // this can be plagin overview page or set up page admin.php?page=overview_YOUR_PREFIX
|
52 |
+
"plugin_wizard_link" => "your plugin wizard page",
|
53 |
+
"plugin_menu_title" => "Your plugin menu title",
|
54 |
+
"plugin_menu_icon" => "path to menu icon",
|
55 |
+
"deactivate" => true,
|
56 |
+
"subscribe" => true,
|
57 |
+
"custom_post" => false, // if true => edit.php?post_type=contact
|
58 |
+
"menu_capability" => "manage_options",
|
59 |
+
"menu_position" => null,
|
60 |
+
);
|
61 |
+
|
62 |
+
Fully documentation of dorado_web_init options:
|
63 |
+
|
64 |
+
prefix - (type string) your plugin prefix
|
65 |
+
wd_plugin_id - (type int) plugin id ( in web-dorado database, you use it for update functionality)
|
66 |
+
plugin_wd_zip_name - (type string) plugin zip name (in web-dorado database, ask Armen or Sergey )
|
67 |
+
plugin_title - type string) plugin title (
|
68 |
+
plugin_wordpress_slug - (type string) plugin slug
|
69 |
+
plugin_dir - (type string) full file path to your plugin directory
|
70 |
+
plugin_main_file - (type string) path to your plugin main file (__FILE__)
|
71 |
+
description - (type string) plugin short description
|
72 |
+
|
73 |
+
plugin_features - (type array) plugin top 5 features from web-dorado.com
|
74 |
+
e.g. (for google maps plugin)
|
75 |
+
array(
|
76 |
+
0 => array(
|
77 |
+
"title" => __("Easy set up", "gmwd"),
|
78 |
+
"description" => __("After installation a set-up guide will help you configure general options and get started on the dashboard. The plugin also displays tooltips in the whole admin area and settings. Moreover, you get instant live previews of changes you make in the working area, so you don’t have to save and publish maps to see the results.", "gmwd"),
|
79 |
+
),
|
80 |
+
1 => array(
|
81 |
+
"title" => __("Unlimited Everything", "gmwd"),
|
82 |
+
"description" => __("Display unlimited maps on any page or post. Same is true for markers, rectangles, circles, polygons and polylines.", "gmwd"),
|
83 |
+
),
|
84 |
+
....
|
85 |
+
)
|
86 |
+
|
87 |
+
user_guide - (type array) plugin user guide links from web-dorado.com
|
88 |
+
e.g. (for google maps plugin)
|
89 |
+
array(
|
90 |
+
0 => array(
|
91 |
+
"main_title" => __("Installation Wizard/ Options Menu", "gmwd"),
|
92 |
+
"url" => "https://web-dorado.com/wordpress-google-maps/installation-wizard-options-menu.html",
|
93 |
+
"titles" => array(
|
94 |
+
array(
|
95 |
+
"title" => __("Configuring Map API Key", "gmwd"),
|
96 |
+
"url" => "https://web-dorado.com/wordpress-google-maps/installation-wizard-options-menu/configuring-api-key.html"
|
97 |
+
)
|
98 |
+
)
|
99 |
+
),
|
100 |
+
1 => array(
|
101 |
+
"main_title" => __("Creating Map", "gmwd"),
|
102 |
+
"url" => "https://web-dorado.com/wordpress-google-maps/creating-map.html",
|
103 |
+
"titles" => array()
|
104 |
+
),
|
105 |
+
)
|
106 |
+
|
107 |
+
video_youtube_id - (type string) if your plugin has video, video's id, else null
|
108 |
+
( e.g. for https://www.youtube.com/watch?v=acaexefeP7o , youtube id is the 'acaexefeP7o' )
|
109 |
+
|
110 |
+
plugin_wd_url - (type string) plugin page url
|
111 |
+
(e.g. https://web-dorado.com/products/wordpress-google-maps-plugin.html)
|
112 |
+
|
113 |
+
plugin_wd_demo_link - (type string) plugin demo url
|
114 |
+
plugin_wd_addons_link - (type string) if plugin has addons , plugin addons link, else null
|
115 |
+
plugin_wizard_link - (type string) if plugin has wizard, wizard page , else null
|
116 |
+
( e.g. admin_url( 'index.php?page=gmwd_setup' ) )
|
117 |
+
|
118 |
+
plugin_menu_title - (type string) plugin wordpress backend menu title
|
119 |
+
plugin_menu_icon - (type string) path to plugin wordpress backend menu icon
|
120 |
+
( e.g. GMWD_URL . '/images/icon-map-20.png' )
|
121 |
+
deactivate - (type bool) if plugin free deactivate = true, else deactivate = false
|
122 |
+
subscribe - (type bool) if plugin free subscribe = true, else subscribe = false
|
123 |
+
custom_post - ( type string) if plugin has not custom posts it must be top level menu slug, else toplevel menu url , e.g. edit.php?post_type=contact
|
124 |
+
menu_capability - (type string) top level menu capability e.g. manage_options
|
125 |
+
menu_position - (type string) top level menu position , default is null
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
|
wd/assets/css/deactivate_popup.css
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wd-opacity{
|
2 |
+
position: fixed;
|
3 |
+
top: 0px;
|
4 |
+
bottom: 0px;
|
5 |
+
left: 0px;
|
6 |
+
right: 0px;
|
7 |
+
z-index: 9999;
|
8 |
+
background: #000;
|
9 |
+
opacity: 0.5;
|
10 |
+
display: none;
|
11 |
+
}
|
12 |
+
|
13 |
+
.wd-deactivate-popup{
|
14 |
+
position: fixed;
|
15 |
+
top: 0px;
|
16 |
+
bottom: 0px;
|
17 |
+
left: 0px;
|
18 |
+
right: 0px;
|
19 |
+
background: #fff;
|
20 |
+
z-index: 999999;
|
21 |
+
width: 600px;
|
22 |
+
height: 281px;
|
23 |
+
margin: auto;
|
24 |
+
display: none;
|
25 |
+
box-sizing: border-box;
|
26 |
+
}
|
27 |
+
|
28 |
+
|
29 |
+
.wd-deactivate-popup-header{
|
30 |
+
border-bottom: 1px solid #ccc;
|
31 |
+
padding: 18px 40px;
|
32 |
+
font-size: 16px;
|
33 |
+
background: rgba(221, 221, 221, 0.14);
|
34 |
+
}
|
35 |
+
.wd-deactivate-popup-body{
|
36 |
+
padding: 20px 40px;
|
37 |
+
border-bottom: 1px solid #ccc;
|
38 |
+
}
|
39 |
+
.wd-deactivate-popup-body input[type=text]{
|
40 |
+
width: 220px;
|
41 |
+
}
|
42 |
+
.wd-deactivate-popup-body textarea{
|
43 |
+
width: 100%;
|
44 |
+
}
|
45 |
+
|
46 |
+
.wd-btns{
|
47 |
+
position: absolute;
|
48 |
+
bottom: 19px;
|
49 |
+
right: 19px
|
50 |
+
}
|
51 |
+
|
52 |
+
.additional_details_wrap{
|
53 |
+
margin-top: 20px;
|
54 |
+
}
|
55 |
+
|
56 |
+
.wd-additional-active{
|
57 |
+
background: rgba(204, 204, 204, 0.18);
|
58 |
+
padding: 15px;
|
59 |
+
margin: 14px 0px 5px;
|
60 |
+
}
|
61 |
+
.wd-popup-active1{
|
62 |
+
height: 523px !important;
|
63 |
+
}
|
64 |
+
|
65 |
+
.wd-popup-active2{
|
66 |
+
height: 426px !important
|
67 |
+
}
|
68 |
+
.wd-deactivate-popup-opacity{
|
69 |
+
width: 100%;
|
70 |
+
height: 100%;
|
71 |
+
background: #D9D9D9;
|
72 |
+
opacity: 0.3;
|
73 |
+
z-index: 45;
|
74 |
+
position: absolute;
|
75 |
+
display: none;
|
76 |
+
}
|
77 |
+
|
78 |
+
.wd-deactivate-popup-opacity .wd-img-loader{
|
79 |
+
position: absolute;
|
80 |
+
top: 0;
|
81 |
+
left: 0;
|
82 |
+
right: 0;
|
83 |
+
bottom: 0;
|
84 |
+
margin: auto;
|
85 |
+
z-index: 63;
|
86 |
+
}
|
wd/assets/css/img/allow&continue.png
ADDED
Binary file
|
wd/assets/css/img/coupon_bg.png
ADDED
Binary file
|
wd/assets/css/img/plugins_header_bg.png
ADDED
Binary file
|
wd/assets/css/img/skip.png
ADDED
Binary file
|
wd/assets/css/img/themes_headrer_bg.png
ADDED
Binary file
|
wd/assets/css/img/ug-icon-1.png
ADDED
Binary file
|
wd/assets/css/img/ug-icon-2.png
ADDED
Binary file
|
wd/assets/css/img/ug-icon-3.png
ADDED
Binary file
|
wd/assets/css/img/ug-icon-4.png
ADDED
Binary file
|
wd/assets/css/img/ug-icon-5.png
ADDED
Binary file
|
wd/assets/css/img/welcome_bg.png
ADDED
Binary file
|
wd/assets/css/notices.css
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wd-admin-notice {
|
2 |
+
background: #fff;
|
3 |
+
border: 4px;
|
4 |
+
display: block;
|
5 |
+
min-height: 68px;
|
6 |
+
padding: 10px 40px 10px 125px;
|
7 |
+
position: relative;
|
8 |
+
}
|
9 |
+
.wd-admin-notice a {
|
10 |
+
color: #10738B;
|
11 |
+
}
|
12 |
+
.wd-notice-logo {
|
13 |
+
clear: both;
|
14 |
+
content: "";
|
15 |
+
display: block;
|
16 |
+
background-size: 108px auto;
|
17 |
+
background-repeat: no-repeat;
|
18 |
+
background-position: 0 45%;
|
19 |
+
width: 125px;
|
20 |
+
position: absolute;
|
21 |
+
top: 0;
|
22 |
+
bottom: 0;
|
23 |
+
left: 5px;
|
24 |
+
}
|
25 |
+
.wd-admin-notice > .dashicons {
|
26 |
+
color: #424242;
|
27 |
+
position: absolute;
|
28 |
+
right: 20px;
|
29 |
+
top: 40%;
|
30 |
+
}
|
31 |
+
.wd-notice-title {
|
32 |
+
font-size: 24px;
|
33 |
+
margin: 0;
|
34 |
+
}
|
35 |
+
.wd-notice-body {
|
36 |
+
font-weight: normal;
|
37 |
+
margin: 5px 0;
|
38 |
+
}
|
39 |
+
.wd-notice-body:after {
|
40 |
+
clear: both;
|
41 |
+
content: "";
|
42 |
+
display: block;
|
43 |
+
}
|
44 |
+
.wd-notice-body li {
|
45 |
+
float: left;
|
46 |
+
margin-right: 20px;
|
47 |
+
}
|
48 |
+
.wd-notice-body .dashicons {
|
49 |
+
font-size: 17px;
|
50 |
+
}
|
51 |
+
.wd-blue {
|
52 |
+
color: #10738B;
|
53 |
+
}
|
54 |
+
|
55 |
+
.admin-notice-promo {
|
56 |
+
background: #fff;
|
57 |
+
border-top: 4px;
|
58 |
+
display: block;
|
59 |
+
min-height: 68px;
|
60 |
+
padding: 10px 40px 0px 10px;
|
61 |
+
margin: 10px 0;
|
62 |
+
position: relative;
|
63 |
+
}
|
64 |
+
|
65 |
+
.admin-notice-promo:after {
|
66 |
+
content: '';
|
67 |
+
display: table;
|
68 |
+
clear: both;
|
69 |
+
}
|
70 |
+
|
71 |
+
.close-promo {
|
72 |
+
position: absolute;
|
73 |
+
top: 5px;
|
74 |
+
right: 5px;
|
75 |
+
}
|
76 |
+
|
77 |
+
.promo {
|
78 |
+
background-position: center;
|
79 |
+
background-repeat: no-repeat;
|
80 |
+
background-size: 972px 200px;
|
81 |
+
height: 200px;
|
82 |
+
max-width: 100%;
|
83 |
+
}
|
84 |
+
|
85 |
+
.promo a {
|
86 |
+
display: block;
|
87 |
+
height: 100%;
|
88 |
+
}
|
wd/assets/css/overview.css
ADDED
@@ -0,0 +1,455 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* general */
|
2 |
+
.wd-table{
|
3 |
+
display: table;
|
4 |
+
width: 100%;
|
5 |
+
}
|
6 |
+
.wd-cell{
|
7 |
+
display: table-cell;
|
8 |
+
}
|
9 |
+
.wd-valign-top{
|
10 |
+
vertical-align: top;
|
11 |
+
}
|
12 |
+
.wd-valign-middle{
|
13 |
+
vertical-align: middle;
|
14 |
+
}
|
15 |
+
.wd-valign-bottom{
|
16 |
+
vertical-align: bottom;
|
17 |
+
}
|
18 |
+
.wd-text-right{
|
19 |
+
text-align: right;
|
20 |
+
}
|
21 |
+
.wd-text-center{
|
22 |
+
text-align: center;
|
23 |
+
}
|
24 |
+
.hide{
|
25 |
+
display: none;
|
26 |
+
}
|
27 |
+
a:focus{
|
28 |
+
border: none !important;
|
29 |
+
outline: none !important;
|
30 |
+
box-shadow: none !important;
|
31 |
+
}
|
32 |
+
|
33 |
+
/*end general */
|
34 |
+
.wd-video_container{
|
35 |
+
text-align: center;
|
36 |
+
}
|
37 |
+
.overview_welcome{
|
38 |
+
background: url(img/welcome_bg.png) no-repeat;
|
39 |
+
margin: 21px 0px;
|
40 |
+
background-size: 100% 100%;
|
41 |
+
line-height: 28px;
|
42 |
+
}
|
43 |
+
.overview_welcome .wd-cell{
|
44 |
+
padding: 15px;
|
45 |
+
}
|
46 |
+
.overview_welcome .wd-cell:first-child{
|
47 |
+
position: relative;
|
48 |
+
}
|
49 |
+
|
50 |
+
.overview_welcome h2{
|
51 |
+
text-transform: uppercase;
|
52 |
+
font-size: 26px;
|
53 |
+
margin-top: 0;
|
54 |
+
margin-bottom: 15px;
|
55 |
+
color: #424141;
|
56 |
+
}
|
57 |
+
.overview_welcome img{
|
58 |
+
width: 120px;
|
59 |
+
padding-right: 100px;
|
60 |
+
padding-left: 25px;
|
61 |
+
}
|
62 |
+
.overview_wrap{
|
63 |
+
width: 935px;
|
64 |
+
background: #fff;
|
65 |
+
}
|
66 |
+
.overview_welcome .overview_welcome_text{
|
67 |
+
font-size: 15px;
|
68 |
+
color: #424141;
|
69 |
+
}
|
70 |
+
.overview_tabs:after, .deals_content:after, .deal_desc_footer:after{
|
71 |
+
content: "";
|
72 |
+
display: table;
|
73 |
+
clear: both;
|
74 |
+
}
|
75 |
+
.overview_tabs li{
|
76 |
+
float: left;
|
77 |
+
width: 16.666%;
|
78 |
+
}
|
79 |
+
|
80 |
+
.overview_tabs li a{
|
81 |
+
text-decoration: none !important;
|
82 |
+
color: #000;
|
83 |
+
background: #D6D6D6;
|
84 |
+
background: -webkit-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Safari 5.1 to 6.0 */
|
85 |
+
background: -o-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Opera 11.1 to 12.0 */
|
86 |
+
background: -moz-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Firefox 3.6 to 15 */
|
87 |
+
background: linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* Standard syntax */
|
88 |
+
text-transform: uppercase;
|
89 |
+
display: block;
|
90 |
+
padding: 7px 10px;
|
91 |
+
text-align: center;
|
92 |
+
font-weight: bold;
|
93 |
+
border-top: 4px solid #F1F1F1;
|
94 |
+
position: relative;
|
95 |
+
top: -4px;
|
96 |
+
}
|
97 |
+
.overview_tabs li a:hover,.overview_tabs li a:active, .overview_tabs li a:focus, .overview_tab_active{
|
98 |
+
background: #fff !important;
|
99 |
+
border-top: 4px solid #2A495F !important;
|
100 |
+
|
101 |
+
}
|
102 |
+
#welcome, #user_guide, #support, .deals_content{
|
103 |
+
padding: 15px 10px;
|
104 |
+
background: #fff;
|
105 |
+
}
|
106 |
+
.plugin_feature_title{
|
107 |
+
font-size: 19px;
|
108 |
+
}
|
109 |
+
.more_features_wrap{
|
110 |
+
margin-top: 25px;
|
111 |
+
text-align: right;
|
112 |
+
}
|
113 |
+
.more_features, .more_features:hover, .more_features:focus{
|
114 |
+
color: #fff;
|
115 |
+
background: #00384F;
|
116 |
+
padding: 3px 15px;
|
117 |
+
text-decoration: none;
|
118 |
+
}
|
119 |
+
.user_guide_item{
|
120 |
+
margin-bottom: 19px;
|
121 |
+
}
|
122 |
+
.user_guide_title, .user_guide_title:hover, .user_guide_title:focus{
|
123 |
+
font-size: 16px;
|
124 |
+
color: #192D3B;
|
125 |
+
font-weight: bold;
|
126 |
+
margin-bottom: 5px;
|
127 |
+
text-decoration: none;
|
128 |
+
}
|
129 |
+
.user_guide_titles, .user_guide_titles:hover, .user_guide_titles:focus{
|
130 |
+
color: #192D3B;
|
131 |
+
text-decoration: none;
|
132 |
+
}
|
133 |
+
.user_guide_demo, .user_guide_plugin, .user_guide_support_forum, .user_guide_addons, .user_guide_faq,
|
134 |
+
.user_guide_demo:hover, .user_guide_plugin:hover, .user_guide_support_forum:hover, .user_guide_addons:hover, .user_guide_faq:hover{
|
135 |
+
background-color: #F5F5F5;
|
136 |
+
background-repeat: no-repeat;
|
137 |
+
background-position: right -4px center;
|
138 |
+
border-top-left-radius: 25px;
|
139 |
+
border-bottom-left-radius: 25px;
|
140 |
+
padding: 3px 23px 3px 16px;
|
141 |
+
width: 144px;
|
142 |
+
font-weight: bold;
|
143 |
+
text-transform: uppercase;
|
144 |
+
color: #192D3B;
|
145 |
+
margin-bottom: 7px;
|
146 |
+
display: block;
|
147 |
+
text-decoration: none;
|
148 |
+
}
|
149 |
+
.user_guide_demo{
|
150 |
+
background-image: url(img/ug-icon-1.png);
|
151 |
+
}
|
152 |
+
.user_guide_plugin{
|
153 |
+
background-image: url(img/ug-icon-2.png);
|
154 |
+
}
|
155 |
+
.user_guide_support_forum{
|
156 |
+
background-image: url(img/ug-icon-3.png);
|
157 |
+
}
|
158 |
+
.user_guide_addons{
|
159 |
+
background-image: url(img/ug-icon-4.png);
|
160 |
+
}
|
161 |
+
.user_guide_faq{
|
162 |
+
background-image: url(img/ug-icon-5.png);
|
163 |
+
}
|
164 |
+
|
165 |
+
#support .wd-support-main{
|
166 |
+
width: 800px;
|
167 |
+
margin: 0 auto;
|
168 |
+
font-size: 16px;
|
169 |
+
text-align: center;
|
170 |
+
margin-bottom: 15px;
|
171 |
+
|
172 |
+
}
|
173 |
+
.wd-overview-site-deatils{
|
174 |
+
width: 800px;
|
175 |
+
background: #FBFBFB;
|
176 |
+
padding: 10px;
|
177 |
+
margin: 0 auto;
|
178 |
+
}
|
179 |
+
.wd-overview-site-deatils h2, .wd-overview-site-deatils p{
|
180 |
+
text-align: center;
|
181 |
+
}
|
182 |
+
.wd-overview-site-deatils p{
|
183 |
+
font-size: 16px;
|
184 |
+
}
|
185 |
+
.contact_us, .contact_us:hover, .contact_us:focus{
|
186 |
+
display: block;
|
187 |
+
background: #27475D;
|
188 |
+
color: #fff;
|
189 |
+
text-decoration: none;
|
190 |
+
width: 173px;
|
191 |
+
padding: 8px 0px;
|
192 |
+
text-align: center;
|
193 |
+
margin-bottom: 5px;
|
194 |
+
font-size: 16px;
|
195 |
+
margin-left: 8px;
|
196 |
+
border: 1px solid #B7B7B7;
|
197 |
+
text-transform: uppercase;
|
198 |
+
}
|
199 |
+
|
200 |
+
.support_email{
|
201 |
+
color: #F47A31;
|
202 |
+
}
|
203 |
+
.wd-site-deatils{
|
204 |
+
padding: 23px;
|
205 |
+
background: #f1f1f1;
|
206 |
+
box-sizing: border-box;
|
207 |
+
}
|
208 |
+
.wd-site-deatils textarea{
|
209 |
+
width: 100%;
|
210 |
+
}
|
211 |
+
.contact_us{
|
212 |
+
margin-left: auto !important;
|
213 |
+
margin-right: auto;
|
214 |
+
margin-top: 10px;
|
215 |
+
}
|
216 |
+
#wd-copy{
|
217 |
+
display: block;
|
218 |
+
background: #27475D;
|
219 |
+
color: #fff;
|
220 |
+
padding: 5px 8px;
|
221 |
+
text-align: center;
|
222 |
+
margin-bottom: 5px;
|
223 |
+
font-size: 14px;
|
224 |
+
border: 1px solid #B7B7B7;
|
225 |
+
cursor: pointer;
|
226 |
+
}
|
227 |
+
#plugins{
|
228 |
+
padding-bottom: 15px;
|
229 |
+
background: #fff;
|
230 |
+
}
|
231 |
+
|
232 |
+
.deals_header_plugins{
|
233 |
+
background: url(img/plugins_header_bg.png) #fff no-repeat;
|
234 |
+
}
|
235 |
+
.deals_header_themes{
|
236 |
+
background: url(img/themes_headrer_bg.png) #fff no-repeat;
|
237 |
+
}
|
238 |
+
.deals_header{
|
239 |
+
background-size: cover;
|
240 |
+
height: 241px;
|
241 |
+
}
|
242 |
+
.deals_header .wd-table .wd-cell{
|
243 |
+
position: relative;
|
244 |
+
}
|
245 |
+
.deals_header_plugins .wd-table .wd-cell{
|
246 |
+
padding: 27px 10px 10px;
|
247 |
+
}
|
248 |
+
.deals_header_themes .wd-table .wd-cell{
|
249 |
+
padding: 0px 10px 10px;
|
250 |
+
}
|
251 |
+
.deals_header_plugins .wd-table .wd-cell:first-child{
|
252 |
+
padding-left: 23px;
|
253 |
+
width: 30%;
|
254 |
+
}
|
255 |
+
.deals_header_themes .wd-table .wd-cell:first-child{
|
256 |
+
padding-left: 23px;
|
257 |
+
width: 36%;
|
258 |
+
}
|
259 |
+
.deals_header_themes .wd-table{
|
260 |
+
height: 100%
|
261 |
+
}
|
262 |
+
|
263 |
+
.titles_wrap{
|
264 |
+
display: inline-block;
|
265 |
+
}
|
266 |
+
.deals_main_title, .deals_secondary_title{
|
267 |
+
color: #00425A;
|
268 |
+
font-weight: bold;
|
269 |
+
line-height: 55px;
|
270 |
+
text-align: center;
|
271 |
+
text-transform: uppercase;
|
272 |
+
}
|
273 |
+
|
274 |
+
.deals_main_title{
|
275 |
+
font-size: 39px;
|
276 |
+
}
|
277 |
+
.deals_secondary_title{
|
278 |
+
font-size: 30px;
|
279 |
+
}
|
280 |
+
|
281 |
+
.higlight{
|
282 |
+
color: #E5682E;
|
283 |
+
}
|
284 |
+
|
285 |
+
.deals_save{
|
286 |
+
position: absolute;
|
287 |
+
right: 87px;
|
288 |
+
-webkit-transform: rotate(-27deg);
|
289 |
+
transform: rotate(-30deg);
|
290 |
+
font-weight: bold;
|
291 |
+
font-size: 39px;
|
292 |
+
color: #E5682E;
|
293 |
+
text-transform: uppercase;
|
294 |
+
}
|
295 |
+
.deals_header_plugins .deals_save{
|
296 |
+
bottom: 37px;
|
297 |
+
}
|
298 |
+
.deals_header_themes .deals_save{
|
299 |
+
bottom: 76px;
|
300 |
+
}
|
301 |
+
.deal_block{
|
302 |
+
width: 31.2%;
|
303 |
+
display: inline-block;
|
304 |
+
vertical-align: top;
|
305 |
+
margin: 5px;
|
306 |
+
}
|
307 |
+
.deal_title{
|
308 |
+
text-align: center;
|
309 |
+
text-transform: uppercase;
|
310 |
+
font-size: 20px;
|
311 |
+
background: #FAFAFA;
|
312 |
+
padding: 10px 5px;
|
313 |
+
line-height: 23px;
|
314 |
+
}
|
315 |
+
.deal_title a, .deal_title a:hover, .deal_title a:focus{
|
316 |
+
text-decoration: none !important;
|
317 |
+
color: #000 !important;
|
318 |
+
}
|
319 |
+
.deal_desc{
|
320 |
+
background: #F5F5F5;
|
321 |
+
padding: 10px 5px;
|
322 |
+
}
|
323 |
+
.deal_desc p{
|
324 |
+
margin-bottom: 15px;
|
325 |
+
}
|
326 |
+
|
327 |
+
.deal_desc_footer .downloads{
|
328 |
+
float: left;
|
329 |
+
}
|
330 |
+
.deal_desc_footer .download_btn{
|
331 |
+
/*float: right;*/
|
332 |
+
margin-top: 10px;
|
333 |
+
text-align: center;
|
334 |
+
}
|
335 |
+
.deal_desc_footer .downloads .spans span:first-child{
|
336 |
+
background: #26455A;
|
337 |
+
color: #fff;
|
338 |
+
text-transform: uppercase;
|
339 |
+
padding: 5px;
|
340 |
+
display: inline-block;
|
341 |
+
}
|
342 |
+
.deal_desc_footer .downloads .spans span:last-child{
|
343 |
+
background: #fff;
|
344 |
+
padding: 5px;
|
345 |
+
border-top-right-radius: 25px;
|
346 |
+
border-bottom-right-radius: 25px;
|
347 |
+
margin-left: -3px;
|
348 |
+
}
|
349 |
+
|
350 |
+
.download_btn a, .download_btn a:hover, .download_btn a:focus{
|
351 |
+
color: #fff !important;
|
352 |
+
background: #E97025;
|
353 |
+
text-decoration: none;
|
354 |
+
padding: 4px 16px;
|
355 |
+
display: inline-block;
|
356 |
+
margin-top: 10px;
|
357 |
+
border-radius: 13px;
|
358 |
+
text-transform: uppercase;
|
359 |
+
}
|
360 |
+
|
361 |
+
.stars-container {
|
362 |
+
position: relative;
|
363 |
+
display: inline-block;
|
364 |
+
color: transparent;
|
365 |
+
font-size: 21px;
|
366 |
+
}
|
367 |
+
|
368 |
+
.stars-container:before {
|
369 |
+
position: absolute;
|
370 |
+
top: 0;
|
371 |
+
left: 0;
|
372 |
+
content: '★★★★★';
|
373 |
+
color: #F4AB7F;
|
374 |
+
}
|
375 |
+
|
376 |
+
.stars-container:after {
|
377 |
+
position: absolute;
|
378 |
+
top: 0;
|
379 |
+
left: 0;
|
380 |
+
content: '★★★★★';
|
381 |
+
color: #F4762A;
|
382 |
+
overflow: hidden;
|
383 |
+
}
|
384 |
+
|
385 |
+
.get_all_deals{
|
386 |
+
margin: 15px 0px;
|
387 |
+
text-align: center;
|
388 |
+
}
|
389 |
+
.get_all_deals a, .get_all_deals a:hover, .get_all_deals a:active, .get_all_deals a:focus {
|
390 |
+
color: #fff !important;
|
391 |
+
background: #E97025;
|
392 |
+
text-decoration: none;
|
393 |
+
padding: 8px 21px;
|
394 |
+
display: inline-block;
|
395 |
+
margin-top: 10px;
|
396 |
+
text-transform: uppercase;
|
397 |
+
border: 2px solid #D2631E;
|
398 |
+
font-size: 21px;
|
399 |
+
}
|
400 |
+
|
401 |
+
#themes{
|
402 |
+
border-top: 35px solid #F1F1F1;
|
403 |
+
padding-bottom: 15px;
|
404 |
+
}
|
405 |
+
|
406 |
+
.theme_block{
|
407 |
+
width: 48%;
|
408 |
+
margin: 5px;
|
409 |
+
border: 1px solid #ECE9E9;
|
410 |
+
float: left;
|
411 |
+
}
|
412 |
+
.theme_block a, .theme_block a:hover, .theme_block a:focus{
|
413 |
+
display: block;
|
414 |
+
text-decoration: none !important;
|
415 |
+
background: #F7F7F7;
|
416 |
+
color: #000 !important;
|
417 |
+
padding: 5px;
|
418 |
+
}
|
419 |
+
|
420 |
+
/* noteices */
|
421 |
+
.notice_wrap{
|
422 |
+
padding: 15px;
|
423 |
+
border: 1px solid #C4C4C4;
|
424 |
+
width: 98%;
|
425 |
+
margin: 10px auto;
|
426 |
+
box-sizing: border-box;
|
427 |
+
|
428 |
+
}
|
429 |
+
.notice_wrap .notice_title, .notice_wrap .notice_title:hover, .notice_wrap .notice_title:focus{
|
430 |
+
color: #E5682E !important;
|
431 |
+
text-decoration: none;
|
432 |
+
margin-bottom: 17px;
|
433 |
+
font-size: 20px;
|
434 |
+
display: block;
|
435 |
+
}
|
436 |
+
|
437 |
+
.notice_wrap .notice_txt{
|
438 |
+
font-size: 15px;
|
439 |
+
}
|
440 |
+
|
441 |
+
|
442 |
+
.wd-tour{
|
443 |
+
text-align: right;
|
444 |
+
}
|
445 |
+
.wd-tour-btn, .wd-tour-btn:hover, .wd-tour-btn:focus{
|
446 |
+
background: #F47629;
|
447 |
+
color: #fff;
|
448 |
+
text-decoration: none;
|
449 |
+
padding: 5px;
|
450 |
+
display: inline-block;
|
451 |
+
font-size: 16px;
|
452 |
+
}
|
453 |
+
|
454 |
+
|
455 |
+
|
wd/assets/css/subscribe.css
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body {
|
2 |
+
color: #444;
|
3 |
+
font-family: "Open Sans",sans-serif;
|
4 |
+
line-height: 1.4em;
|
5 |
+
min-width: 600px;
|
6 |
+
}
|
7 |
+
|
8 |
+
.wd-subscribe{
|
9 |
+
background: #fff;
|
10 |
+
border: 2px solid #E2E5EC;
|
11 |
+
width: 55%;
|
12 |
+
margin-top: 40px;
|
13 |
+
}
|
14 |
+
.wd-subscribe-content{
|
15 |
+
padding: 30px 92px;
|
16 |
+
}
|
17 |
+
.imgs{
|
18 |
+
text-align: center;
|
19 |
+
}
|
20 |
+
.imgs img{
|
21 |
+
vertical-align: middle;
|
22 |
+
width: 125px;
|
23 |
+
}
|
24 |
+
.imgs span {
|
25 |
+
color: #21759B;
|
26 |
+
font-weight: bold;
|
27 |
+
font-size: 52px;
|
28 |
+
padding: 0px 28px;
|
29 |
+
}
|
30 |
+
.texts{
|
31 |
+
margin-top: 10px;
|
32 |
+
margin-bottom: 25px;
|
33 |
+
}
|
34 |
+
|
35 |
+
.btns .allow_and_continue, .btns .allow_and_continue:hover, .btns .allow_and_continue:focus{
|
36 |
+
display: inline-block;
|
37 |
+
background: url(img/allow&continue.png) no-repeat;
|
38 |
+
width: 279px;
|
39 |
+
height: 61px;
|
40 |
+
border: none;
|
41 |
+
|
42 |
+
}
|
43 |
+
.btns .skip, .btns .skip:hover, .btns .skip:focus{
|
44 |
+
margin-left: 66px;
|
45 |
+
display: inline-block;
|
46 |
+
background: url(img/skip.png) no-repeat;
|
47 |
+
width: 76px;
|
48 |
+
height: 59px;
|
49 |
+
}
|
50 |
+
.permissions{
|
51 |
+
color: #525252 !important;
|
52 |
+
}
|
53 |
+
.list{
|
54 |
+
margin-top: 15px;
|
55 |
+
display:none;
|
56 |
+
}
|
57 |
+
.list_item{
|
58 |
+
display: table;
|
59 |
+
margin-bottom: 15px;
|
60 |
+
}
|
61 |
+
.list_item:after{
|
62 |
+
content: "";
|
63 |
+
clear: both;
|
64 |
+
display: table;
|
65 |
+
}
|
66 |
+
.list_img_wrap{
|
67 |
+
float: left;
|
68 |
+
}
|
69 |
+
.list_img_wrap img{
|
70 |
+
width: 27px;
|
71 |
+
}
|
72 |
+
.list_text_wrap{
|
73 |
+
margin-left: 33px;
|
74 |
+
float: right;
|
75 |
+
}
|
76 |
+
.list_title, .list_text{
|
77 |
+
color: #525252;
|
78 |
+
font-size: 13px;
|
79 |
+
}
|
80 |
+
.wd_loader{
|
81 |
+
vertical-align: top;
|
82 |
+
width: 30px;
|
83 |
+
margin-top: 11px;
|
84 |
+
visibility: hidden;
|
85 |
+
}
|
86 |
+
.wd-subscribe-footer{
|
87 |
+
text-align: center;
|
88 |
+
padding: 4px 0px;
|
89 |
+
border-top: 1px solid rgba(204, 204, 204, 0.52);
|
90 |
+
}
|
91 |
+
.wd-footer-menu {
|
92 |
+
display: inline-block;
|
93 |
+
list-style-type: none;
|
94 |
+
padding: 0;
|
95 |
+
margin: 0;
|
96 |
+
}
|
97 |
+
.wd-footer-menu li{
|
98 |
+
float: left;
|
99 |
+
}
|
100 |
+
.wd-footer-menu li, .wd-footer-menu li a{
|
101 |
+
color: rgba(62, 60, 60, 0.57) !important;
|
102 |
+
text-decoration: none;
|
103 |
+
font-size: 12px;
|
104 |
+
padding: 2px;
|
105 |
+
font-weight: bold;
|
106 |
+
display: inline-block;
|
107 |
+
vertical-align: middle;
|
108 |
+
}
|
109 |
+
|
110 |
+
|
111 |
+
.wd-footer-menu li a:hover{
|
112 |
+
color: rgba(62, 60, 60, 0.57) !important;
|
113 |
+
text-decoration: underline;
|
114 |
+
}
|
wd/assets/img/bwg_main_plugin.png
ADDED
Binary file
|
wd/assets/img/ecwd_main_plugin.png
ADDED
Binary file
|
wd/assets/img/faqwd_main_plugin.png
ADDED
Binary file
|
wd/assets/img/ffwd_main_plugin.png
ADDED
Binary file
|
wd/assets/img/fm_main_plugin.png
ADDED
Binary file
|
wd/assets/img/gawd_main_plugin.png
ADDED
Binary file
|
wd/assets/img/gmwd_main_plugin.png
ADDED
Binary file
|
wd/assets/img/loader.gif
ADDED
Binary file
|
wd/assets/img/mwd_main_plugin.png
ADDED
Binary file
|
wd/assets/img/plugins/business_elite.png
ADDED
Binary file
|
wd/assets/img/plugins/business_world.png
ADDED
Binary file
|
featured/images/events-wd.png → wd/assets/img/plugins/event-calendar-wd.png
RENAMED
File without changes
|
wd/assets/img/plugins/form-maker.png
ADDED
Binary file
|
{featured/images → wd/assets/img/plugins}/photo-gallery.png
RENAMED
File without changes
|
wd/assets/img/plugins/portfolio_gallery.png
ADDED
Binary file
|
wd/assets/img/plugins/sauron.png
ADDED
Binary file
|
featured/images/slider.png → wd/assets/img/plugins/slider-wd.png
RENAMED
File without changes
|
featured/images/spider.calendar.png → wd/assets/img/plugins/spider-event-calendar.png
RENAMED
File without changes
|
featured/images/google-maps.png → wd/assets/img/plugins/wd-google-maps.png
RENAMED
File without changes
|
featured/images/instagram_feed.png → wd/assets/img/plugins/wd-instagram-feed.png
RENAMED
File without changes
|
wd/assets/img/spinner.gif
ADDED
Binary file
|
wd/assets/img/sub_1.png
ADDED
Binary file
|
wd/assets/img/sub_2.png
ADDED
Binary file
|
wd/assets/img/sub_4.png
ADDED
Binary file
|
wd/assets/img/twd_main_plugin.png
ADDED
Binary file
|
wd/assets/img/wd_ads_main_plugin.png
ADDED
Binary file
|
wd/assets/img/wde_main_plugin.png
ADDED
Binary file
|
wd/assets/img/wdi_main_plugin.png
ADDED
Binary file
|
wd/assets/img/wdps_main_plugin.png
ADDED
Binary file
|
wd/assets/img/wds_main_plugin.png
ADDED
Binary file
|
wd/assets/img/wp_logo.png
ADDED
Binary file
|
wd/assets/img/ytwd_main_plugin.png
ADDED
Binary file
|
wd/assets/js/deactivate_popup.js
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
2 |
+
// Events //
|
3 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Constants //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Variables //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
var deactivated = false;
|
11 |
+
var additionalInfo = "";
|
12 |
+
var btnVal = 3;
|
13 |
+
|
14 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
// Constructor & Destructor //
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
|
18 |
+
|
19 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
20 |
+
// Public Methods //
|
21 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
+
function wdReady(prefix){
|
23 |
+
|
24 |
+
jQuery(document).on("click", "." + window[prefix + "WDDeactivateVars"].deactivate_class, function(){
|
25 |
+
jQuery(".wd-" + prefix + "-opacity").show();
|
26 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").show();
|
27 |
+
if(jQuery(this).attr("data-uninstall") == "1"){
|
28 |
+
btnVal = 2 ;
|
29 |
+
}
|
30 |
+
|
31 |
+
return false;
|
32 |
+
});
|
33 |
+
|
34 |
+
jQuery(document).on("change", "[name=" + prefix + "_reasons]", function(){
|
35 |
+
|
36 |
+
jQuery("." + prefix + "_additional_details_wrap").html("");
|
37 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").removeClass("wd-popup-active1 wd-popup-active2");
|
38 |
+
if(jQuery(this).val() == "reason_plugin_is_hard_to_use_technical_problems"){
|
39 |
+
|
40 |
+
additionalInfo = '<div class="wd-additional-active"><div><strong>Please describe your issue.</strong></div><br>' +
|
41 |
+
'<textarea name="' + prefix + '_additional_details" rows = "4"></textarea><br>' +
|
42 |
+
'<div>Our support will contact <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"> shortly.</div>'+
|
43 |
+
'<br><div><button class="button button-primary wd-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit support ticket</button></div></div>';
|
44 |
+
jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
|
45 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").addClass("wd-popup-active1");
|
46 |
+
|
47 |
+
}
|
48 |
+
else if(jQuery(this).val() == "reason_free_version_limited"){
|
49 |
+
additionalInfo = '<div class="wd-additional-active">' +
|
50 |
+
'<div><strong>We believe our premium version will fit your needs.</strong></div>' +
|
51 |
+
'<div><a href="' + window[prefix + "WDDeactivateVars"].plugin_wd_url+ '" target="_blank">Try with 30 day money back guarantee.</a></div>';
|
52 |
+
|
53 |
+
jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
|
54 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").addClass("wd-popup-active2");
|
55 |
+
}
|
56 |
+
else if(jQuery(this).val() == "reason_premium_expensive"){
|
57 |
+
additionalInfo = '<div class="wd-additional-active">' +
|
58 |
+
'<div><strong>We have a special offer for you.</strong></div>' +
|
59 |
+
'<div>Submit this form to get the offer to <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"></div>' +
|
60 |
+
'<br><div><button class="button button-primary wd-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit</button></div></div>';
|
61 |
+
|
62 |
+
jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
|
63 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").addClass("wd-popup-active2");
|
64 |
+
}
|
65 |
+
|
66 |
+
jQuery("#wd-" + prefix + "-deactivate").hide();
|
67 |
+
jQuery("#wd-" + prefix + "-submit-and-deactivate").show();
|
68 |
+
|
69 |
+
});
|
70 |
+
jQuery(document).on("keyup", "[name=" + prefix + "_additional_details]", function(){
|
71 |
+
if(jQuery(this).val().trim() || jQuery("[name=" + prefix + "_reasons]:checked").length > 0){
|
72 |
+
jQuery("#wd-" + prefix + "-deactivate").hide();
|
73 |
+
jQuery("#wd-" + prefix + "-submit-and-deactivate").show();
|
74 |
+
}
|
75 |
+
else{
|
76 |
+
jQuery("#wd-" + prefix + "-deactivate").show();
|
77 |
+
jQuery("#wd-" + prefix + "-submit-and-deactivate").hide();
|
78 |
+
}
|
79 |
+
|
80 |
+
});
|
81 |
+
jQuery(document).on("click", ".wd-" + prefix + "-deactivate", function(){
|
82 |
+
jQuery(".wd-deactivate-popup-opacity-" + prefix).show();
|
83 |
+
if(jQuery(this).hasClass("wd-clicked") == false){
|
84 |
+
jQuery(this).addClass("wd-clicked");
|
85 |
+
jQuery("[name=" + prefix + "_submit_and_deactivate]").val(jQuery(this).attr("data-val"));
|
86 |
+
jQuery("#" + prefix + "_deactivate_form").submit();
|
87 |
+
}
|
88 |
+
return false;
|
89 |
+
});
|
90 |
+
|
91 |
+
jQuery(document).on("click", ".wd-" + prefix + "-cancel, .wd-opacity", function(){
|
92 |
+
jQuery(".wd-" + prefix + "-opacity").hide();
|
93 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").hide();
|
94 |
+
return false;
|
95 |
+
});
|
96 |
+
|
97 |
+
}
|
98 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
99 |
+
// Getters & Setters //
|
100 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
101 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
102 |
+
// Private Methods //
|
103 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
104 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
105 |
+
// Listeners //
|
106 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
wd/assets/js/overview.js
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
2 |
+
// Events //
|
3 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Constants //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Variables //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Constructor & Destructor //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
jQuery(document).ready(function () {
|
14 |
+
jQuery(".overview_content > div:not(#welcome)").hide();
|
15 |
+
jQuery(".overview_tabs li a:not(.not_tab)").click(function(){
|
16 |
+
jQuery(".overview_tabs li a").removeClass("overview_tab_active");
|
17 |
+
jQuery(this).addClass("overview_tab_active");
|
18 |
+
jQuery(".overview_content > div").hide();
|
19 |
+
var id = jQuery(this).attr("href");
|
20 |
+
jQuery(id).show();
|
21 |
+
return false;
|
22 |
+
});
|
23 |
+
|
24 |
+
// rating
|
25 |
+
// jQuery(".rating").each(function(){
|
26 |
+
// var rate = jQuery(this).attr("data-rating");
|
27 |
+
// jQuery("<span class='stars-container'>")
|
28 |
+
// .addClass("stars-" + rate.toString())
|
29 |
+
// .text("★★★★★")
|
30 |
+
// .appendTo(jQuery(this));
|
31 |
+
// jQuery("body").append('<style>.stars-' + rate.toString() + ':after{width:' + rate + '%;}</style>');
|
32 |
+
// });
|
33 |
+
|
34 |
+
jQuery("#wd-copy").click(function(){
|
35 |
+
var selector = document.querySelector('#wd-site-deatils-textarea');
|
36 |
+
selector.select();
|
37 |
+
document.execCommand('copy');
|
38 |
+
|
39 |
+
return false;
|
40 |
+
|
41 |
+
});
|
42 |
+
|
43 |
+
});
|
44 |
+
|
45 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
46 |
+
// Public Methods //
|
47 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
48 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
49 |
+
// Getters & Setters //
|
50 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
51 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
52 |
+
// Private Methods //
|
53 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
54 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
55 |
+
// Listeners //
|
56 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
wd/assets/js/subsribe.js
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
2 |
+
// Events //
|
3 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Constants //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Variables //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Constructor & Destructor //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
jQuery(document).ready(function () {
|
14 |
+
jQuery(".permissions").click(function(){
|
15 |
+
jQuery(".list").toggle();
|
16 |
+
return false;
|
17 |
+
});
|
18 |
+
|
19 |
+
jQuery(".allow_and_continue").click(function(){
|
20 |
+
jQuery(this).css("opacity", "0.5");
|
21 |
+
jQuery(".wd_loader").css("visibility", "visible");
|
22 |
+
});
|
23 |
+
});
|
24 |
+
|
25 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
26 |
+
// Public Methods //
|
27 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
+
// Getters & Setters //
|
30 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
32 |
+
// Private Methods //
|
33 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
+
// Listeners //
|
36 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
wd/config.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
class DoradoWebConfig {
|
7 |
+
public static $instance;
|
8 |
+
|
9 |
+
public $prefix = null;
|
10 |
+
public $wd_plugin_id = null;
|
11 |
+
public $plugin_title = null;
|
12 |
+
public $plugin_wordpress_slug = null;
|
13 |
+
public $plugin_dir = null;
|
14 |
+
public $plugin_main_file = null;
|
15 |
+
public $description = null;
|
16 |
+
public $plugin_features = null;
|
17 |
+
public $user_guide = null;
|
18 |
+
public $overview_welcome_image = null;
|
19 |
+
public $video_youtube_id = null;
|
20 |
+
public $plugin_wd_url = null;
|
21 |
+
public $plugin_wd_demo_link = null;
|
22 |
+
public $plugin_wd_addons_link = null;
|
23 |
+
public $plugin_wizard_link = null;
|
24 |
+
public $after_subscribe = null;
|
25 |
+
public $plugin_menu_title = null;
|
26 |
+
public $plugin_menu_icon = null;
|
27 |
+
public $wd_dir = null;
|
28 |
+
public $wd_dir_includes = null;
|
29 |
+
public $wd_dir_templates = null;
|
30 |
+
public $wd_dir_assets = null;
|
31 |
+
public $wd_url_css = null;
|
32 |
+
public $wd_url_js = null;
|
33 |
+
public $wd_url_img = null;
|
34 |
+
public $deactivate = null;
|
35 |
+
public $subscribe = null;
|
36 |
+
public $custom_post = null;
|
37 |
+
public $menu_capability = null;
|
38 |
+
public $menu_position = null;
|
39 |
+
|
40 |
+
public function set_options( $options ){
|
41 |
+
|
42 |
+
if(isset( $options["prefix"] )) {
|
43 |
+
$this->prefix = $options["prefix"];
|
44 |
+
}
|
45 |
+
if(isset( $options["wd_plugin_id"] )) {
|
46 |
+
$this->wd_plugin_id = $options["wd_plugin_id"];
|
47 |
+
}
|
48 |
+
if(isset( $options["plugin_title"] )) {
|
49 |
+
$this->plugin_title = $options["plugin_title"];
|
50 |
+
}
|
51 |
+
if(isset( $options["plugin_wordpress_slug"] )) {
|
52 |
+
$this->plugin_wordpress_slug = $options["plugin_wordpress_slug"];
|
53 |
+
}
|
54 |
+
if(isset( $options["plugin_dir"] )) {
|
55 |
+
$this->plugin_dir = $options["plugin_dir"];
|
56 |
+
}
|
57 |
+
if(isset( $options["plugin_main_file"] )) {
|
58 |
+
$this->plugin_main_file = $options["plugin_main_file"];
|
59 |
+
}
|
60 |
+
|
61 |
+
if(isset( $options["description"] )) {
|
62 |
+
$this->description = $options["description"];
|
63 |
+
}
|
64 |
+
if(isset( $options["plugin_features"] )) {
|
65 |
+
$this->plugin_features = $options["plugin_features"];
|
66 |
+
}
|
67 |
+
if(isset( $options["user_guide"] )) {
|
68 |
+
$this->user_guide = $options["user_guide"];
|
69 |
+
}
|
70 |
+
if(isset( $options["video_youtube_id"] )) {
|
71 |
+
$this->video_youtube_id = $options["video_youtube_id"];
|
72 |
+
}
|
73 |
+
if(isset( $options["overview_welcome_image"] )) {
|
74 |
+
$this->overview_welcome_image = $options["overview_welcome_image"];
|
75 |
+
}
|
76 |
+
if(isset( $options["plugin_wd_url"] )) {
|
77 |
+
$this->plugin_wd_url = $options["plugin_wd_url"];
|
78 |
+
}
|
79 |
+
if(isset( $options["plugin_wd_demo_link"] )) {
|
80 |
+
$this->plugin_wd_demo_link = $options["plugin_wd_demo_link"];
|
81 |
+
}
|
82 |
+
if(isset( $options["plugin_wd_addons_link"] )) {
|
83 |
+
$this->plugin_wd_addons_link = $options["plugin_wd_addons_link"];
|
84 |
+
}
|
85 |
+
if(isset( $options["plugin_wizard_link"] )) {
|
86 |
+
$this->plugin_wizard_link = $options["plugin_wizard_link"];
|
87 |
+
}
|
88 |
+
if(isset( $options["after_subscribe"] )) {
|
89 |
+
$this->after_subscribe = $options["after_subscribe"];
|
90 |
+
}
|
91 |
+
if(isset( $options["plugin_menu_title"] )) {
|
92 |
+
$this->plugin_menu_title = $options["plugin_menu_title"];
|
93 |
+
}
|
94 |
+
if(isset( $options["plugin_menu_icon"] )) {
|
95 |
+
$this->plugin_menu_icon = $options["plugin_menu_icon"];
|
96 |
+
}
|
97 |
+
if(isset( $options["deactivate"] )) {
|
98 |
+
$this->deactivate = $options["deactivate"];
|
99 |
+
}
|
100 |
+
if(isset( $options["subscribe"] )) {
|
101 |
+
$this->subscribe = $options["subscribe"];
|
102 |
+
}
|
103 |
+
if(isset( $options["custom_post"] )) {
|
104 |
+
$this->custom_post = $options["custom_post"];
|
105 |
+
}
|
106 |
+
if(isset( $options["menu_capability"] )) {
|
107 |
+
$this->menu_capability = $options["menu_capability"];
|
108 |
+
}
|
109 |
+
if(isset( $options["menu_position"] )) {
|
110 |
+
$this->menu_position = $options["menu_position"];
|
111 |
+
}
|
112 |
+
|
113 |
+
// directories
|
114 |
+
$this->wd_dir = dirname( $this->plugin_main_file ) . '/wd';
|
115 |
+
$this->wd_dir_includes = $this->wd_dir . '/includes';
|
116 |
+
$this->wd_dir_templates = $this->wd_dir . '/templates';
|
117 |
+
$this->wd_dir_assets = $this->wd_dir . '/assets';
|
118 |
+
$this->wd_url_css = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/css';
|
119 |
+
$this->wd_url_js = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/js';
|
120 |
+
$this->wd_url_img = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/img';
|
121 |
+
}
|
122 |
+
|
123 |
+
|
124 |
+
}
|
125 |
+
|
126 |
+
|
127 |
+
|
wd/includes/api.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
class DoradoWebApi{
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Events //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Constants //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Variables //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
|
17 |
+
public $config ;
|
18 |
+
public $userhash = array();
|
19 |
+
|
20 |
+
|
21 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
+
// Constructor & Destructor //
|
23 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
+
public function __construct( $config = array() ) {
|
25 |
+
$this->config = $config;
|
26 |
+
$this->userhash = $this->get_userhash();
|
27 |
+
}
|
28 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
+
// Public Methods //
|
30 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
+
|
32 |
+
|
33 |
+
public function get_remote_data( $id ) {
|
34 |
+
$remote_data_path = DORADO_WEB_API_PLUGIN_DATA_PATH . '/' . $this->userhash;
|
35 |
+
$request = wp_remote_get( ( str_replace( '_id_', $id, $remote_data_path ) ) );
|
36 |
+
|
37 |
+
if ( !is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200 ) {
|
38 |
+
return json_decode($request['body'], true);
|
39 |
+
}
|
40 |
+
return false;
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
public function get_userhash(){
|
45 |
+
$wd_options = $this->config;
|
46 |
+
$userhash = 'nohash';
|
47 |
+
if ( file_exists( $wd_options->plugin_dir . '/.keep') && is_readable( $wd_options->plugin_dir . '/.keep' ) ) {
|
48 |
+
$f = fopen( $wd_options->plugin_dir . '/.keep', 'r' );
|
49 |
+
$userhash = fgets( $f );
|
50 |
+
fclose( $f );
|
51 |
+
}
|
52 |
+
return $userhash;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function get_hash(){
|
56 |
+
$response = wp_remote_get("https://api.web-dorado.com/hash/" . $_SERVER['REMOTE_ADDR'] . "/" . $_SERVER['HTTP_HOST']);
|
57 |
+
|
58 |
+
$response_body = isset($response["body"]) ? json_decode($response["body"], true) : null;
|
59 |
+
|
60 |
+
if(is_array($response_body)){
|
61 |
+
$hash = $response_body["body"]["hash"];
|
62 |
+
}
|
63 |
+
else{
|
64 |
+
$hash = null;
|
65 |
+
}
|
66 |
+
|
67 |
+
return $hash;
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
72 |
+
// Getters & Setters //
|
73 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
74 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
75 |
+
// Private Methods //
|
76 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
77 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
78 |
+
// Listeners //
|
79 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
80 |
+
|
81 |
+
}
|
wd/includes/deactivate.php
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
class DoradoWebDeactivate{
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Events //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Constants //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Variables //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public $deactivate_reasons = array();
|
17 |
+
public $config;
|
18 |
+
// Reason IDs
|
19 |
+
const REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS = "reason_plugin_is_hard_to_use_technical_problems";
|
20 |
+
const REASON_FREE_VERSION_IS_LIMITED = "reason_free_version_limited";
|
21 |
+
const REASON_PRO_EXPENSIVE = "reason_premium_expensive";
|
22 |
+
const REASON_UPGRADING_TO_PAID_VERSION = "reason_upgrading_to_paid_version";
|
23 |
+
const REASON_TEMPORARY_DEACTIVATION = "reason_temporary_deactivation";
|
24 |
+
|
25 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
26 |
+
// Constructor & Destructor //
|
27 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
+
public function __construct( $config = array() ) {
|
29 |
+
$this->config = $config;
|
30 |
+
$wd_options = $this->config;
|
31 |
+
|
32 |
+
$this->deactivate_reasons = array(
|
33 |
+
1 => array(
|
34 |
+
'id' => self::REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS,
|
35 |
+
'text' => __( 'Technical problems / hard to use', $wd_options->prefix ),
|
36 |
+
),
|
37 |
+
2 => array(
|
38 |
+
'id' => self::REASON_FREE_VERSION_IS_LIMITED,
|
39 |
+
'text' => __( 'Free version is limited', $wd_options->prefix ),
|
40 |
+
),
|
41 |
+
3 => array(
|
42 |
+
'id' => self::REASON_PRO_EXPENSIVE,
|
43 |
+
'text' => __( 'Premium is expensive', $wd_options->prefix ),
|
44 |
+
),
|
45 |
+
4 => array(
|
46 |
+
'id' => self::REASON_UPGRADING_TO_PAID_VERSION,
|
47 |
+
'text' => __( 'Upgrading to paid version', $wd_options->prefix ),
|
48 |
+
),
|
49 |
+
5 => array(
|
50 |
+
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
51 |
+
'text' => __( 'Temporary deactivation', $wd_options->prefix ),
|
52 |
+
),
|
53 |
+
);
|
54 |
+
|
55 |
+
add_action( 'admin_footer', array( $this, 'add_deactivation_feedback_dialog_box' ) );
|
56 |
+
add_action( 'admin_init', array( $this, 'submit_and_deactivate' ) );
|
57 |
+
|
58 |
+
|
59 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
|
64 |
+
}
|
65 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
66 |
+
// Public Methods //
|
67 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
68 |
+
public function add_deactivation_feedback_dialog_box(){
|
69 |
+
$deactivate_reasons = $this->deactivate_reasons;
|
70 |
+
$wd_options = $this->config;
|
71 |
+
|
72 |
+
?>
|
73 |
+
<script>
|
74 |
+
jQuery(document).ready(function () {
|
75 |
+
wdReady("<?php echo $wd_options->prefix; ?>");
|
76 |
+
});
|
77 |
+
</script>
|
78 |
+
<?php
|
79 |
+
require ( $wd_options->wd_dir_templates . '/display_deactivation_popup.php' );
|
80 |
+
}
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
public function scripts(){
|
85 |
+
$wd_options = $this->config;
|
86 |
+
wp_enqueue_style( 'wd-deactivate-popup', $wd_options->wd_url_css . '/deactivate_popup.css', array(), get_option($wd_options->prefix . "_version" ) );
|
87 |
+
wp_enqueue_script( 'wd-deactivate-popup', $wd_options->wd_url_js . '/deactivate_popup.js', array(), get_option($wd_options->prefix . "_version" ));
|
88 |
+
|
89 |
+
$admin_data = wp_get_current_user();
|
90 |
+
wp_localize_script( 'wd-deactivate-popup', $wd_options->prefix . 'WDDeactivateVars' , array(
|
91 |
+
"prefix" => $wd_options->prefix ,
|
92 |
+
"deactivate_class" => $wd_options->prefix . '_deactivate_link',
|
93 |
+
"email" => $admin_data->data->user_email,
|
94 |
+
"plugin_wd_url" => $wd_options->plugin_wd_url,
|
95 |
+
));
|
96 |
+
|
97 |
+
|
98 |
+
}
|
99 |
+
public function submit_and_deactivate(){
|
100 |
+
$wd_options = $this->config;
|
101 |
+
if( isset( $_POST[$wd_options->prefix . "_submit_and_deactivate"] ) ){
|
102 |
+
|
103 |
+
if( $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 3 ){
|
104 |
+
$api = new DoradoWebApi( $wd_options );
|
105 |
+
$hash = $api->get_hash();
|
106 |
+
if($hash != null){
|
107 |
+
$data = array();
|
108 |
+
|
109 |
+
$data["reason"] = isset($_POST[$wd_options->prefix . "_reasons"]) ? $_POST[$wd_options->prefix . "_reasons"] : "";
|
110 |
+
$data["site_url"] = site_url();
|
111 |
+
$data["plugin_id"] = $wd_options->wd_plugin_id;
|
112 |
+
|
113 |
+
$data["additional_details"] = isset($_POST[$wd_options->prefix . "_additional_details"]) ? $_POST[$wd_options->prefix . "_additional_details"] : "";
|
114 |
+
$admin_data = wp_get_current_user();
|
115 |
+
$data["email"] = isset($_POST[$wd_options->prefix . "_email"]) ? $_POST[$wd_options->prefix . "_email"] : $admin_data->data->user_email;
|
116 |
+
$user_first_name = get_user_meta( $admin_data->ID, "first_name", true );
|
117 |
+
$user_last_name = get_user_meta( $admin_data->ID, "last_name", true );
|
118 |
+
|
119 |
+
$data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
|
120 |
+
$data["hash"] = $hash;
|
121 |
+
$response = wp_remote_post( "https://api.web-dorado.com/deactivatereasons", array(
|
122 |
+
'method' => 'POST',
|
123 |
+
'timeout' => 45,
|
124 |
+
'redirection' => 5,
|
125 |
+
'httpversion' => '1.0',
|
126 |
+
'blocking' => true,
|
127 |
+
'headers' => array(),
|
128 |
+
'body' => json_encode($data),
|
129 |
+
'cookies' => array()
|
130 |
+
)
|
131 |
+
);
|
132 |
+
|
133 |
+
$response_body = isset( $response["body"] ) ? json_decode( $response["body"], true ) : null;
|
134 |
+
if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
|
135 |
+
|
136 |
+
}
|
137 |
+
}
|
138 |
+
}
|
139 |
+
if($_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 1 ){
|
140 |
+
$deactivate_url =
|
141 |
+
add_query_arg(
|
142 |
+
array(
|
143 |
+
'action' => 'deactivate',
|
144 |
+
'plugin' => plugin_basename( $wd_options->plugin_main_file ),
|
145 |
+
'_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . plugin_basename( $wd_options->plugin_main_file ) )
|
146 |
+
),
|
147 |
+
admin_url( 'plugins.php' )
|
148 |
+
);
|
149 |
+
echo '<script>window.location.href="' . $deactivate_url . '";</script>';
|
150 |
+
}
|
151 |
+
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
156 |
+
// Getters & Setters //
|
157 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
158 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
159 |
+
// Private Methods //
|
160 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
161 |
+
|
162 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
163 |
+
// Listeners //
|
164 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
165 |
+
|
166 |
+
}
|
167 |
+
|
168 |
+
|
wd/includes/notices.php
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
class DoradoWebNotices {
|
7 |
+
|
8 |
+
protected $promo_link = '';
|
9 |
+
|
10 |
+
public $config;
|
11 |
+
public $notice_spam = 0;
|
12 |
+
public $notice_spam_max = 2;
|
13 |
+
|
14 |
+
// Basic actions to run
|
15 |
+
public function __construct( $config = array() ) {
|
16 |
+
$this->config = $config;
|
17 |
+
// Runs the admin notice ignore function incase a dismiss button has been clicked
|
18 |
+
add_action( 'admin_init', array( $this, 'admin_notice_ignore' ) );
|
19 |
+
// Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
|
20 |
+
add_action( 'admin_init', array( $this, 'admin_notice_temp_ignore' ) );
|
21 |
+
add_action( 'admin_notices', array( $this, 'wd_admin_notices' ) );
|
22 |
+
}
|
23 |
+
|
24 |
+
// Checks to ensure notices aren't disabled and the user has the correct permissions.
|
25 |
+
public function wd_admin_notice() {
|
26 |
+
$wd_options = $this->config;
|
27 |
+
$settings = get_option($wd_options->prefix . '_admin_notice');
|
28 |
+
if ( !isset( $settings['disable_admin_notices'] ) || ( isset( $settings['disable_admin_notices'] ) && $settings['disable_admin_notices'] == 0 ) ) {
|
29 |
+
if ( current_user_can( 'manage_options' ) ) {
|
30 |
+
return true;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
return false;
|
34 |
+
}
|
35 |
+
|
36 |
+
// Primary notice function that can be called from an outside function sending necessary variables
|
37 |
+
public function admin_notice( $admin_notices ) {
|
38 |
+
$wd_options = $this->config;
|
39 |
+
// Check options
|
40 |
+
if ( !$this->wd_admin_notice() ) {
|
41 |
+
return false;
|
42 |
+
}
|
43 |
+
foreach ( $admin_notices as $slug => $admin_notice ) {
|
44 |
+
// Call for spam protection
|
45 |
+
if ( $this->anti_notice_spam() ) {
|
46 |
+
return false;
|
47 |
+
}
|
48 |
+
|
49 |
+
// Check for proper page to display on
|
50 |
+
if (isset( $admin_notices[$slug]['pages']) && is_array( $admin_notices[$slug]['pages'])) {
|
51 |
+
if ( !$this->admin_notice_pages( $admin_notices[$slug]['pages'] ) ) {
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
// Check for required fields
|
57 |
+
if ( !$this->required_fields( $admin_notices[$slug] ) ) {
|
58 |
+
|
59 |
+
// Get the current date then set start date to either passed value or current date value and add interval
|
60 |
+
$current_date = current_time( "n/j/Y" );
|
61 |
+
$start = ( isset( $admin_notices[$slug]['start'] ) ? $admin_notices[$slug]['start'] : $current_date );
|
62 |
+
$start = date( "n/j/Y", strtotime( $start ) );
|
63 |
+
$date_array = explode( '/', $start );
|
64 |
+
$interval = ( isset( $admin_notices[$slug]['int'] ) ? $admin_notices[$slug]['int'] : 0 );
|
65 |
+
|
66 |
+
$date_array[1] += $interval;
|
67 |
+
$start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
|
68 |
+
|
69 |
+
// This is the main notices storage option
|
70 |
+
$admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
|
71 |
+
// Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
|
72 |
+
if ( !array_key_exists( $slug, $admin_notices_option ) ) {
|
73 |
+
$admin_notices_option[$slug]['start'] = $start;
|
74 |
+
$admin_notices_option[$slug]['int'] = $interval;
|
75 |
+
update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
|
76 |
+
}
|
77 |
+
|
78 |
+
// Sanity check to ensure we have accurate information
|
79 |
+
// New date information will not overwrite old date information
|
80 |
+
$admin_display_check = ( isset( $admin_notices_option[$slug]['dismissed'] ) ? $admin_notices_option[$slug]['dismissed'] : 0 );
|
81 |
+
$admin_display_start = ( isset( $admin_notices_option[$slug]['start'] ) ? $admin_notices_option[$slug]['start'] : $start );
|
82 |
+
$admin_display_interval = ( isset($admin_notices_option[$slug]['int'] ) ? $admin_notices_option[$slug]['int'] : $interval );
|
83 |
+
$admin_display_msg = ( isset($admin_notices[$slug]['msg'] ) ? $admin_notices[$slug]['msg'] : '' );
|
84 |
+
$admin_display_title = ( isset($admin_notices[$slug]['title'] ) ? $admin_notices[$slug]['title'] : '' );
|
85 |
+
$admin_display_link = ( isset( $admin_notices[$slug]['link'] ) ? $admin_notices[$slug]['link'] : '' );
|
86 |
+
$output_css = false;
|
87 |
+
|
88 |
+
// Ensure the notice hasn't been hidden and that the current date is after the start date
|
89 |
+
if ( $admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date ) ) {
|
90 |
+
|
91 |
+
// Get remaining query string
|
92 |
+
$query_str = ( isset( $admin_notices[$slug]['later_link'] ) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg( $wd_options->prefix . '_admin_notice_ignore', $slug ) ) );
|
93 |
+
if ( strpos($slug, 'promo' ) === FALSE ) {
|
94 |
+
// Admin notice display output
|
95 |
+
echo '<div class="update-nag wd-admin-notice">
|
96 |
+
<div class="wd-notice-logo" style="background-image: url(' . $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png);"></div>
|
97 |
+
<p class="wd-notice-title">' . $admin_display_title . '</p>
|
98 |
+
<p class="wd-notice-body">' . $admin_display_msg . '</p>
|
99 |
+
<ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
|
100 |
+
<a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
|
101 |
+
</div>';
|
102 |
+
}
|
103 |
+
else {
|
104 |
+
echo '<div class="admin-notice-promo">';
|
105 |
+
echo $admin_display_msg;
|
106 |
+
echo '<ul class="notice-body-promo blue">
|
107 |
+
' . $admin_display_link . '
|
108 |
+
</ul>';
|
109 |
+
echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss close-promo"></a>';
|
110 |
+
echo '</div>';
|
111 |
+
}
|
112 |
+
$this->notice_spam += 1;
|
113 |
+
$output_css = true;
|
114 |
+
}
|
115 |
+
if ( $output_css ) {
|
116 |
+
wp_enqueue_style( $wd_options->prefix . '-admin-notices', $wd_options->wd_url_css . '/notices.css', array(), get_option($wd_options->prefix . "_version" ) );
|
117 |
+
}
|
118 |
+
}
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
// Spam protection check
|
123 |
+
public function anti_notice_spam() {
|
124 |
+
if ( $this->notice_spam >= $this->notice_spam_max ) {
|
125 |
+
return true;
|
126 |
+
}
|
127 |
+
return false;
|
128 |
+
}
|
129 |
+
|
130 |
+
// Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
|
131 |
+
public function admin_notice_ignore() {
|
132 |
+
$wd_options = $this->config;
|
133 |
+
// If user clicks to ignore the notice, update the option to not show it again
|
134 |
+
if ( isset( $_GET[$wd_options->prefix . '_admin_notice_ignore'] ) ) {
|
135 |
+
$admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
|
136 |
+
$admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_ignore']]['dismissed'] = 1;
|
137 |
+
update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
|
138 |
+
$query_str = remove_query_arg( $wd_options->prefix . '_admin_notice_ignore' );
|
139 |
+
wp_redirect( $query_str );
|
140 |
+
exit;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
// Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
|
145 |
+
public function admin_notice_temp_ignore() {
|
146 |
+
$wd_options = $this->config;
|
147 |
+
// If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
|
148 |
+
if ( isset( $_GET[$wd_options->prefix . '_admin_notice_temp_ignore'] ) ) {
|
149 |
+
$admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
|
150 |
+
$current_date = current_time( "n/j/Y" );
|
151 |
+
$date_array = explode( '/', $current_date );
|
152 |
+
$interval = (isset($_GET['wd_int']) ? $_GET['wd_int'] : 14);
|
153 |
+
$date_array[1] += $interval;
|
154 |
+
$new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
|
155 |
+
|
156 |
+
$admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['start'] = $new_start;
|
157 |
+
$admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['dismissed'] = 0;
|
158 |
+
update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
|
159 |
+
$query_str = remove_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore', 'wd_int' ) );
|
160 |
+
wp_redirect( $query_str );
|
161 |
+
exit;
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
public function admin_notice_pages($pages) {
|
166 |
+
$wd_options = $this->config;
|
167 |
+
foreach ( $pages as $key => $page ) {
|
168 |
+
if (is_array($page)) {
|
169 |
+
if ( isset( $_GET['page'] ) && $_GET['page'] == $page[0] && isset($_GET['tab']) && $_GET['tab'] == $page[1] ) {
|
170 |
+
return true;
|
171 |
+
}
|
172 |
+
}
|
173 |
+
else {
|
174 |
+
if ( $page == 'all' ) {
|
175 |
+
return true;
|
176 |
+
}
|
177 |
+
if ( get_current_screen()->id === $page ) {
|
178 |
+
return true;
|
179 |
+
}
|
180 |
+
if ( isset($_GET['page']) && $_GET['page'] == $page ) {
|
181 |
+
return true;
|
182 |
+
}
|
183 |
+
}
|
184 |
+
return false;
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
// Required fields check
|
189 |
+
public function required_fields( $fields ) {
|
190 |
+
if ( !isset( $fields['msg'] ) || ( isset($fields['msg'] ) && empty( $fields['msg'] ) ) ) {
|
191 |
+
return true;
|
192 |
+
}
|
193 |
+
if ( !isset( $fields['title'] ) || ( isset( $fields['title'] ) && empty( $fields['title'] ) ) ) {
|
194 |
+
return true;
|
195 |
+
}
|
196 |
+
return false;
|
197 |
+
}
|
198 |
+
|
199 |
+
// Special parameters function that is to be used in any extension of this class
|
200 |
+
public function special_parameters($admin_notices) {
|
201 |
+
// Intentionally left blank
|
202 |
+
}
|
203 |
+
|
204 |
+
public function wd_admin_notices() {
|
205 |
+
$wd_options = $this->config;
|
206 |
+
$two_week_review_ignore = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'two_week_review' ) );
|
207 |
+
$two_week_review_temp = add_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14 ) );
|
208 |
+
$promo_close = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'ecommerce_promo' ) );
|
209 |
+
|
210 |
+
$notices['two_week_review'] = array(
|
211 |
+
'title' => __('Leave A Review?', $wd_options->prefix),
|
212 |
+
'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', $wd_options->prefix), $wd_options->plugin_title),
|
213 |
+
'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/view/plugin-reviews/' . $wd_options->plugin_wordpress_slug . '?filter=5" target="_blank">' . __('Sure! I\'d love to!', $wd_options->prefix) . '</a></li>
|
214 |
+
<li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $wd_options->prefix) . '</a></li>
|
215 |
+
<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $wd_options->prefix) . '</a></li>
|
216 |
+
<li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $wd_options->prefix) . '</a></li>',
|
217 |
+
'later_link' => $two_week_review_temp,
|
218 |
+
'int' => 14
|
219 |
+
);
|
220 |
+
|
221 |
+
$this->admin_notice($notices);
|
222 |
+
}
|
223 |
+
}
|
wd/includes/overview.php
ADDED
@@ -0,0 +1,310 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
class DoradoWebOverview{
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Events //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Constants //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Variables //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public $config ;
|
17 |
+
private $tabs = array();
|
18 |
+
|
19 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
20 |
+
// Constructor & Destructor //
|
21 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
+
public function __construct( $config = array() ) {
|
23 |
+
$this->config = $config;
|
24 |
+
$wd_options = $this->config;
|
25 |
+
$this->tabs = array(
|
26 |
+
'welcome' => array(
|
27 |
+
'name' => __( "Welcome", $wd_options->prefix ),
|
28 |
+
'view' => array( $this, 'wd_overview_welcome' )
|
29 |
+
),
|
30 |
+
'user_guide' => array(
|
31 |
+
'name' => __( "User Guide", $wd_options->prefix ),
|
32 |
+
'view' => array( $this, 'wd_overview_user_guide' )
|
33 |
+
),
|
34 |
+
'deals' => array(
|
35 |
+
'name' => __( 'Deals', $wd_options->prefix ),
|
36 |
+
'view' => array( $this, 'wd_overview_deals' )
|
37 |
+
),
|
38 |
+
'support' => array(
|
39 |
+
'name' => __( "Support", $wd_options->prefix ),
|
40 |
+
'view' => array( $this, 'wd_overview_support' )
|
41 |
+
),
|
42 |
+
'https://web-dorado.com/support/submit-your-idea.html' => array(
|
43 |
+
'name' => __( "Submit Your Idea", $wd_options->prefix ),
|
44 |
+
'view' => false
|
45 |
+
),
|
46 |
+
'https://wordpress.org/support/plugin/' . $wd_options->plugin_wordpress_slug => array(
|
47 |
+
'name' => __( "Forum", $wd_options->prefix ),
|
48 |
+
'view' => false
|
49 |
+
)
|
50 |
+
);
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
}
|
55 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
56 |
+
// Public Methods //
|
57 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
58 |
+
public function display_overview_page(){
|
59 |
+
$wd_options = $this->config;
|
60 |
+
$tabs = $this->tabs;
|
61 |
+
require_once( $wd_options->wd_dir_templates . "/display_overview.php" );
|
62 |
+
}
|
63 |
+
public function wd_overview_welcome(){
|
64 |
+
$wd_options = $this->config;
|
65 |
+
//http://api.wordpress.org/plugins/info/1.0/wd-google-maps
|
66 |
+
require_once( $wd_options->wd_dir_templates . "/display_overview_welcome.php" );
|
67 |
+
}
|
68 |
+
public function wd_overview_user_guide(){
|
69 |
+
$wd_options = $this->config;
|
70 |
+
$user_guide = $wd_options->user_guide;
|
71 |
+
require_once( $wd_options->wd_dir_templates . "/display_overview_user_guide.php" );
|
72 |
+
}
|
73 |
+
public function wd_overview_deals(){
|
74 |
+
|
75 |
+
$wd_options = $this->config;
|
76 |
+
$plugins = array(
|
77 |
+
"form-maker" => array(
|
78 |
+
'title' => 'Form Maker',
|
79 |
+
'text' => __( 'Wordpress form builder plugin', $wd_options->prefix ),
|
80 |
+
'content' => __( 'Form Maker is a modern and advanced tool for creating WordPress forms easily and fast.', $wd_options->prefix ),
|
81 |
+
'href' => 'https://web-dorado.com/products/wordpress-form.html'
|
82 |
+
),
|
83 |
+
"photo-gallery" => array(
|
84 |
+
'title' => 'Photo Gallery',
|
85 |
+
'text' => __( 'WordPress Photo Gallery plugin', $wd_options->prefix ),
|
86 |
+
'content' => __( 'Photo Gallery is a fully responsive WordPress Gallery plugin with advanced functionality.', $wd_options->prefix ),
|
87 |
+
'href' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin.html'
|
88 |
+
),
|
89 |
+
"event-calendar-wd" => array(
|
90 |
+
'title' => 'Event Calendar WD',
|
91 |
+
'text' => __( 'WordPress calendar plugin', $wd_options->prefix ),
|
92 |
+
'content' => __( 'Organize and publish your events in an easy and elegant way using Event Calendar WD.', $wd_options->prefix ),
|
93 |
+
'href' => 'https://web-dorado.com/products/wordpress-event-calendar-wd.html'
|
94 |
+
),
|
95 |
+
"wd-google-maps" => array(
|
96 |
+
'title' => 'WD Google Maps',
|
97 |
+
'text' => __( 'WD Google Maps plugin', $wd_options->prefix ),
|
98 |
+
'content' => __( 'Google Maps WD is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.', $wd_options->prefix ),
|
99 |
+
'href' => 'https://web-dorado.com/products/wordpress-google-maps-plugin.html'
|
100 |
+
),
|
101 |
+
"slider-wd" => array(
|
102 |
+
'title' => 'Slider WD',
|
103 |
+
'text' => __( 'WordPress slider plugin', $wd_options->prefix ),
|
104 |
+
'content' => __( 'Create responsive, highly configurable sliders with various effects for your WordPress site.', $wd_options->prefix ),
|
105 |
+
'href' => 'https://web-dorado.com/products/wordpress-slider-plugin.html'
|
106 |
+
),
|
107 |
+
"spider-event-calendar" => array(
|
108 |
+
'title' => 'Spider Calendar',
|
109 |
+
'text' => __( 'WordPress event calendar plugin', $wd_options->prefix ),
|
110 |
+
'content' => __( 'Spider Event Calendar is a highly configurable product which allows you to have multiple organized events.', $wd_options->prefix ),
|
111 |
+
'href' => 'https://web-dorado.com/products/wordpress-calendar.html'
|
112 |
+
),
|
113 |
+
"wd-instagram-feed" => array(
|
114 |
+
'title' => 'Instagram Feed WD',
|
115 |
+
'text' => __( 'WordPress Instagram Feed plugin', $wd_options->prefix ),
|
116 |
+
'content' => __( 'WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website.', $wd_options->prefix ),
|
117 |
+
'href' => 'https://web-dorado.com/products/wordpress-instagram-feed-wd.html'
|
118 |
+
),
|
119 |
+
);
|
120 |
+
unset($plugins[$wd_options->plugin_wordpress_slug]) ;
|
121 |
+
|
122 |
+
// foreach ( $plugins as $wp_slug => &$plugin ){
|
123 |
+
// $wp_data = $this->remote_get($wp_slug);
|
124 |
+
// $plugin["downloaded"] = $wp_data["downloaded"];
|
125 |
+
// $plugin["rating"] = $wp_data["rating"];
|
126 |
+
// }
|
127 |
+
|
128 |
+
$themes = array(
|
129 |
+
"business_elite" => array(
|
130 |
+
'title' => 'Business Elite Theme',
|
131 |
+
'href' => 'https://web-dorado.com/wordpress-themes/business-elite.html'
|
132 |
+
),
|
133 |
+
"portfolio_gallery" => array(
|
134 |
+
'title' => 'Portfolio Gallery Theme',
|
135 |
+
'href' => 'https://web-dorado.com/wordpress-themes/portfolio-gallery.html'
|
136 |
+
),
|
137 |
+
"sauron" => array(
|
138 |
+
'title' => 'Sauron Theme',
|
139 |
+
'href' => 'https://web-dorado.com/wordpress-themes/sauron.html'
|
140 |
+
),
|
141 |
+
"business_world" => array(
|
142 |
+
'title' => 'Business World Theme',
|
143 |
+
'href' => 'https://web-dorado.com/wordpress-themes/business-world.html'
|
144 |
+
),
|
145 |
+
);
|
146 |
+
|
147 |
+
require_once( $wd_options->wd_dir_templates . "/display_overview_deals.php" );
|
148 |
+
}
|
149 |
+
public function wd_overview_support(){
|
150 |
+
$wd_options = $this->config;
|
151 |
+
global $wpdb;
|
152 |
+
$server_info = array();
|
153 |
+
|
154 |
+
// Get PHP Version
|
155 |
+
$server_info["Operating System"] = PHP_OS . " (" . ( PHP_INT_SIZE * 8 ) . ")";
|
156 |
+
$server_info["PHP Version"] = PHP_VERSION;
|
157 |
+
$server_info["Server"] = $_SERVER["SERVER_SOFTWARE"];
|
158 |
+
|
159 |
+
// Get MYSQL Version
|
160 |
+
$sql_version = $wpdb->get_var( "SELECT VERSION() AS version" );
|
161 |
+
$server_info["MySQL Version"] = $sql_version;
|
162 |
+
|
163 |
+
// GET SQL Mode
|
164 |
+
$mysqlinfo = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" );
|
165 |
+
if ( is_array( $mysqlinfo ) )
|
166 |
+
$sql_mode = $mysqlinfo[0]->Value;
|
167 |
+
if ( empty( $sql_mode ) )
|
168 |
+
$sql_mode = __( 'Not set', $wd_options->prefix );
|
169 |
+
$server_info["SQL Mode"] = $sql_mode;
|
170 |
+
|
171 |
+
// Get PHP Safe Mode
|
172 |
+
if( ini_get( 'safe_mode' ) )
|
173 |
+
$safe_mode = __( 'On', $wd_options->prefix );
|
174 |
+
else
|
175 |
+
$safe_mode = __( 'Off', $wd_options->prefix );
|
176 |
+
$server_info["PHP Safe Mode"] = $safe_mode;
|
177 |
+
|
178 |
+
// Get PHP allow_url_fopen
|
179 |
+
if( ini_get( 'allow_url_fopen' ) )
|
180 |
+
$allow_url_fopen = __( 'On', $wd_options->prefix );
|
181 |
+
else
|
182 |
+
$allow_url_fopen = __( 'Off', $wd_options->prefix );
|
183 |
+
$server_info["PHP Allow URL fopen"] = $allow_url_fopen;
|
184 |
+
|
185 |
+
// Get PHP Max Upload Size
|
186 |
+
if (function_exists('wp_max_upload_size'))
|
187 |
+
$upload_max = strval(round((int) wp_max_upload_size() / (1024 * 1024))) . 'M';
|
188 |
+
else if(ini_get('upload_max_filesize'))
|
189 |
+
$upload_max = ini_get('upload_max_filesize');
|
190 |
+
else
|
191 |
+
$upload_max = __('N/A', $wd_options->prefix);
|
192 |
+
|
193 |
+
$server_info["PHP Max Upload Size"] = $upload_max;
|
194 |
+
|
195 |
+
// Get PHP Output buffer Size
|
196 |
+
if( ini_get( 'pcre.backtrack_limit' ) )
|
197 |
+
$backtrack_limit = ini_get( 'pcre.backtrack_limit' );
|
198 |
+
else
|
199 |
+
$backtrack_limit = __( 'N/A', $wd_options->prefix );
|
200 |
+
$server_info["PCRE Backtracking Limit"] = $backtrack_limit;
|
201 |
+
|
202 |
+
// Get PHP Max Post Size
|
203 |
+
if( ini_get( 'post_max_size' ) )
|
204 |
+
$post_max = ini_get( 'post_max_size' );
|
205 |
+
else
|
206 |
+
$post_max = __( 'N/A', $wd_options->prefix );
|
207 |
+
$server_info["PHP Max Post Size"] = $post_max;
|
208 |
+
|
209 |
+
// Get PHP Max execution time
|
210 |
+
if( ini_get( 'max_execution_time' ) )
|
211 |
+
$max_execute = ini_get( 'max_execution_time' );
|
212 |
+
else
|
213 |
+
$max_execute = __( 'N/A', $wd_options->prefix );
|
214 |
+
$server_info["PHP Max Script Execute Time"] = $max_execute;
|
215 |
+
|
216 |
+
|
217 |
+
// Get PHP Memory Limit
|
218 |
+
if( ini_get( 'memory_limit' ) )
|
219 |
+
$memory_limit = ini_get( 'memory_limit' );
|
220 |
+
else
|
221 |
+
$memory_limit = __( 'N/A', $wd_options->prefix );
|
222 |
+
$server_info["PHP Memory Limit"] = $memory_limit;
|
223 |
+
|
224 |
+
// Get actual memory_get_usage
|
225 |
+
if ( function_exists( 'memory_get_usage' ) )
|
226 |
+
$memory_usage = round( memory_get_usage() / 1024 / 1024, 2 ) . __( ' MByte', $wd_options->prefix );
|
227 |
+
else
|
228 |
+
$memory_usage = __( 'N/A', $wd_options->prefix );
|
229 |
+
$server_info["Memory usage"] = $memory_usage;
|
230 |
+
|
231 |
+
// required for EXIF read
|
232 |
+
if ( is_callable( 'exif_read_data' ) )
|
233 |
+
$exif = __( 'Yes', $wd_options->prefix ). " (V" . substr( phpversion( 'exif' ), 0, 4 ) . ")" ;
|
234 |
+
else
|
235 |
+
$exif = __( 'No', $wd_options->prefix );
|
236 |
+
$server_info["PHP Exif support"] = $exif;
|
237 |
+
|
238 |
+
// required for meta data
|
239 |
+
if ( is_callable( 'iptcparse' ) )
|
240 |
+
$iptc = __( 'Yes', $wd_options->prefix );
|
241 |
+
else
|
242 |
+
$iptc = __( 'No', $wd_options->prefix );
|
243 |
+
$server_info["PHP IPTC support"] = $iptc;
|
244 |
+
|
245 |
+
// required for meta data
|
246 |
+
if ( is_callable( 'xml_parser_create' ) )
|
247 |
+
$xml = __( 'Yes', $wd_options->prefix );
|
248 |
+
else
|
249 |
+
$xml = __( 'No', $wd_options->prefix );
|
250 |
+
$server_info["PHP XML support"] = $xml;
|
251 |
+
|
252 |
+
$gd_info = array( "GD support" => __( 'No', $wd_options->prefix ) );
|
253 |
+
if( function_exists( "gd_info" ) ){
|
254 |
+
$gd_info = array();
|
255 |
+
foreach( gd_info() as $key => $val ){
|
256 |
+
if( is_bool($val) ){
|
257 |
+
$gd_info[$key] = $val ? __( 'Yes', $wd_options->prefix ) : __( 'No', $wd_options->prefix );
|
258 |
+
}
|
259 |
+
else{
|
260 |
+
$gd_info[$key] = $val;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
}
|
264 |
+
|
265 |
+
require_once( $wd_options->wd_dir_templates . "/display_overview_support.php" );
|
266 |
+
}
|
267 |
+
|
268 |
+
public function overview_styles() {
|
269 |
+
$wd_options = $this->config;
|
270 |
+
$version = get_option( $wd_options->prefix . "_version" );
|
271 |
+
wp_enqueue_style( $wd_options->prefix . '_overview_css', $wd_options->wd_url_css . '/overview.css', array(), $version );
|
272 |
+
|
273 |
+
}
|
274 |
+
public function overview_scripts() {
|
275 |
+
$wd_options = $this->config;
|
276 |
+
$version = get_option( $wd_options->prefix . "_version" );
|
277 |
+
wp_enqueue_script( $wd_options->prefix . '_overview_js', $wd_options->wd_url_js . '/overview.js', array(), $version );
|
278 |
+
|
279 |
+
}
|
280 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
281 |
+
// Getters & Setters //
|
282 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
283 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
284 |
+
// Private Methods //
|
285 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
286 |
+
private function remote_get($plugin_wp_slug){
|
287 |
+
$request = wp_remote_get(" http://api.wordpress.org/plugins/info/1.0/" . $plugin_wp_slug);
|
288 |
+
$data = array();
|
289 |
+
if (!is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200) {
|
290 |
+
$body = unserialize($request['body']);
|
291 |
+
$data["downloaded"] = $body->downloaded;
|
292 |
+
$ratings = $body->ratings;
|
293 |
+
if( $ratings[5] == 0 && $ratings[4] == 0 && $ratings[3] == 0 && $ratings[2] == 0 && $ratings[1] == 0){
|
294 |
+
$data["rating"] = 100;
|
295 |
+
}
|
296 |
+
else{
|
297 |
+
$data["rating"] = round( ( ( $ratings[5] * 5 + $ratings[4] * 4 + $ratings[3] * 3 + $ratings[2] * 2 + $ratings[1] * 1 ) / $body->num_ratings ) , 1 );
|
298 |
+
|
299 |
+
$data["rating"] = round( ( $data["rating"] / 5 ) * 100 );
|
300 |
+
}
|
301 |
+
return $data;
|
302 |
+
}
|
303 |
+
return false;
|
304 |
+
|
305 |
+
}
|
306 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
307 |
+
// Listeners //
|
308 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
309 |
+
|
310 |
+
}
|
wd/includes/subscribe.php
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
class DoradoWebSubscribe {
|
6 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
// Events //
|
8 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
9 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
// Constants //
|
11 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
12 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
// Variables //
|
14 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
public $config;
|
16 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
// Constructor & Destructor //
|
18 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
public function __construct( $config = array() ){
|
20 |
+
$this->config = $config;
|
21 |
+
add_action( 'admin_init', array( $this, 'after_subscribe' ) );
|
22 |
+
}
|
23 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
24 |
+
// Public Methods //
|
25 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
26 |
+
|
27 |
+
public function subscribe_scripts() {
|
28 |
+
$wd_options = $this->config;
|
29 |
+
wp_register_script ( 'subscribe_js', $wd_options->wd_url_js . '/subsribe.js' );
|
30 |
+
wp_enqueue_script ( 'subscribe_js' );
|
31 |
+
|
32 |
+
}
|
33 |
+
public function subscribe_styles() {
|
34 |
+
$wd_options = $this->config;
|
35 |
+
wp_enqueue_style( $wd_options->prefix . 'subscribe', $wd_options->wd_url_css . '/subscribe.css' );
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
public function subscribe_display_page() {
|
40 |
+
$wd_options = $this->config;
|
41 |
+
$list = array(
|
42 |
+
0 => array(
|
43 |
+
"title" => __( "Your name &", $wd_options->prefix ),
|
44 |
+
"small_text" => __( "Email address", $wd_options->prefix ),
|
45 |
+
"img" => $wd_options->wd_url_img . '/sub_1.png',
|
46 |
+
),
|
47 |
+
1 => array(
|
48 |
+
"title" => __( "Site URL", $wd_options->prefix ),
|
49 |
+
"small_text" => __( "Wordpress version", $wd_options->prefix ),
|
50 |
+
"img" => $wd_options->wd_url_img . '/sub_2.png',
|
51 |
+
),
|
52 |
+
2 => array(
|
53 |
+
"title" => __( "List of plugins", $wd_options->prefix ),
|
54 |
+
"small_text" => "",
|
55 |
+
"img" => $wd_options->wd_url_img . '/sub_4.png',
|
56 |
+
),
|
57 |
+
);
|
58 |
+
|
59 |
+
require_once ( $wd_options->wd_dir_templates . "/display_subscribe.php" );
|
60 |
+
}
|
61 |
+
public function after_subscribe(){
|
62 |
+
$wd_options = $this->config;
|
63 |
+
if( isset( $_GET[ $wd_options->prefix . "_sub_action"] ) ){
|
64 |
+
|
65 |
+
if( $_GET[$wd_options->prefix . "_sub_action"] == "allow" ){
|
66 |
+
$api = new DoradoWebApi($wd_options);
|
67 |
+
$hash = $api->get_hash();
|
68 |
+
|
69 |
+
if( $hash != null ){
|
70 |
+
$all_plugins = array();
|
71 |
+
$plugins = get_plugins();
|
72 |
+
foreach ( $plugins as $slug => $data ) {
|
73 |
+
$plugin = array(
|
74 |
+
"Name" => $data["Name"],
|
75 |
+
"PluginURI" => $data["PluginURI"],
|
76 |
+
"Author" => $data["Author"],
|
77 |
+
"AuthorURI" => $data["AuthorURI"]
|
78 |
+
);
|
79 |
+
$all_plugins[$slug] = $plugin;
|
80 |
+
}
|
81 |
+
|
82 |
+
$data = array();
|
83 |
+
$data["site_url"] = site_url();
|
84 |
+
|
85 |
+
$admin_data = wp_get_current_user();
|
86 |
+
|
87 |
+
$user_first_name = get_user_meta( $admin_data->ID, "first_name", true );
|
88 |
+
$user_last_name = get_user_meta( $admin_data->ID, "last_name", true );
|
89 |
+
|
90 |
+
$data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
|
91 |
+
|
92 |
+
$data["email"] = $admin_data->data->user_email;
|
93 |
+
$data["wp_version"] = get_bloginfo( 'version' );
|
94 |
+
$data["plugin_id"] = $wd_options->wd_plugin_id;
|
95 |
+
$data["hash"] = $hash;
|
96 |
+
$data["all_plugins"] = $all_plugins;
|
97 |
+
|
98 |
+
|
99 |
+
$response = wp_remote_post( "https://api.web-dorado.com/collectuserdata", array(
|
100 |
+
'method' => 'POST',
|
101 |
+
'timeout' => 45,
|
102 |
+
'redirection' => 5,
|
103 |
+
'httpversion' => '1.0',
|
104 |
+
'blocking' => true,
|
105 |
+
'headers' => array(),
|
106 |
+
'body' => json_encode($data),
|
107 |
+
'cookies' => array()
|
108 |
+
)
|
109 |
+
);
|
110 |
+
|
111 |
+
$response_body = isset( $response["body"] ) ? json_decode( $response["body"], true ) : null;
|
112 |
+
|
113 |
+
if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
|
114 |
+
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
if ( get_option( $wd_options->prefix . "_subscribe_done" ) != 1 ) {
|
119 |
+
update_option( $wd_options->prefix . "_subscribe_done", 1 );
|
120 |
+
}
|
121 |
+
else {
|
122 |
+
add_option( $wd_options->prefix . "_subscribe_done" , "1", '', 'no');
|
123 |
+
}
|
124 |
+
|
125 |
+
wp_safe_redirect( $wd_options->after_subscribe );
|
126 |
+
}
|
127 |
+
|
128 |
+
}
|
129 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
130 |
+
// Getters & Setters //
|
131 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
132 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
133 |
+
// Private Methods //
|
134 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
135 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
136 |
+
// Listeners //
|
137 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
138 |
+
}
|
wd/start.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
define( 'DORADO_WEB_API_PLUGIN_DATA_PATH', 'https://api.web-dorado.com/v2/_id_/plugindata' );
|
6 |
+
require_once dirname( __FILE__ ) . '/config.php';
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @param options for Plugin details.
|
10 |
+
* prefix;
|
11 |
+
* wd_plugin_id;
|
12 |
+
* plugin_title;
|
13 |
+
* plugin_dir;
|
14 |
+
* plugin_main_file;
|
15 |
+
* description;
|
16 |
+
* plugin_features;
|
17 |
+
* user_guide;
|
18 |
+
* video_youtube_id;
|
19 |
+
* plugin_wd_url;
|
20 |
+
* plugin_wd_demo_link;
|
21 |
+
* plugin_wd_addons_link;
|
22 |
+
* plugin_wizard_link;
|
23 |
+
* after_subscribe;
|
24 |
+
* plugin_menu_title;
|
25 |
+
* plugin_menu_icon;
|
26 |
+
* custom_post;
|
27 |
+
*/
|
28 |
+
|
29 |
+
function dorado_web_init( $options ) {
|
30 |
+
|
31 |
+
// load files
|
32 |
+
require_once dirname( __FILE__ ) . '/wd.php';
|
33 |
+
|
34 |
+
$wd = new DoradoWeb();
|
35 |
+
$wd->wd_init( $options );
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
|
wd/templates/display_deactivation_popup.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wd-opacity wd-<?php echo $wd_options->prefix; ?>-opacity"></div>
|
2 |
+
<div class="wd-deactivate-popup wd-<?php echo $wd_options->prefix; ?>-deactivate-popup">
|
3 |
+
<div class="wd-deactivate-popup-opacity wd-deactivate-popup-opacity-<?php echo $wd_options->prefix; ?>">
|
4 |
+
<img src="<?php echo $wd_options->wd_url_img . '/spinner.gif'; ?>" class="wd-img-loader" >
|
5 |
+
</div>
|
6 |
+
<form method="post" id="<?php echo $wd_options->prefix; ?>_deactivate_form">
|
7 |
+
<div class="wd-deactivate-popup-header">
|
8 |
+
<?php _e( "Please let us know why you are deactivating. Your answer will help us to serve you better", $wd_options->prefix ); ?>:
|
9 |
+
</div>
|
10 |
+
|
11 |
+
<div class="wd-deactivate-popup-body">
|
12 |
+
<?php foreach( $deactivate_reasons as $deactivate_reason_slug => $deactivate_reason ) { ?>
|
13 |
+
<div class="wd-<?php echo $wd_options->prefix; ?>-reasons">
|
14 |
+
<input type="radio" value="<?php echo $deactivate_reason["id"];?>" id="<?php echo $wd_options->prefix . "-" .$deactivate_reason["id"]; ?>" name="<?php echo $wd_options->prefix; ?>_reasons" >
|
15 |
+
<label for="<?php echo $wd_options->prefix . "-" . $deactivate_reason["id"]; ?>"><?php echo $deactivate_reason["text"];?></label>
|
16 |
+
</div>
|
17 |
+
<?php } ?>
|
18 |
+
<div class="<?php echo $wd_options->prefix; ?>_additional_details_wrap"></div>
|
19 |
+
</div>
|
20 |
+
<div class="wd-btns">
|
21 |
+
<a href="#" data-val="1" class="button button-secondary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-deactivate"><?php _e( "Deactivate" , $wd_options->prefix ); ?></a>
|
22 |
+
<a href="#" data-val="2" class="button button-secondary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-submit-and-deactivate" style="display:none;"><?php _e( "Submit and deactivate" , $wd_options->prefix ); ?></a>
|
23 |
+
<a href="#" class="button button-primary wd-<?php echo $wd_options->prefix; ?>-cancel"><?php _e( "Cancel" , $wd_options->prefix ); ?></a>
|
24 |
+
</div>
|
25 |
+
<input type="hidden" name="<?php echo $wd_options->prefix . "_submit_and_deactivate"; ?>" value="" >
|
26 |
+
<?php wp_nonce_field( $wd_options->prefix . '_save_form', $wd_options->prefix . '_save_form_fild'); ?>
|
27 |
+
</form>
|
28 |
+
</div>
|
wd/templates/display_overview.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="overview_welcome">
|
2 |
+
<div class="wd-cell wd-valign-middle">
|
3 |
+
<a href="<?php echo $wd_options->plugin_wd_url; ?>" target="_blank"><img src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>"></a>
|
4 |
+
</div>
|
5 |
+
<div class="wd-cell wd-valign-middle">
|
6 |
+
<h2><?php echo sprintf( __( "Welcome to %s", $wd_options->prefix ), $wd_options->plugin_title ); ?></h2>
|
7 |
+
<div class="overview_welcome_text">
|
8 |
+
<div><?php echo sprintf( __( "CONGRATS! You've successfully installed %s WordPress plugin.", $wd_options->prefix ), $wd_options->plugin_title ) ; ?></div>
|
9 |
+
<div><?php echo $wd_options->description ; ?></div>
|
10 |
+
</div>
|
11 |
+
</div>
|
12 |
+
</div>
|
13 |
+
<div class="overview_wrap">
|
14 |
+
<ul class="overview_tabs">
|
15 |
+
<?php
|
16 |
+
foreach ( $tabs as $tab_key => $tab ) {
|
17 |
+
$href = $tab['view'] !== false ? "#" . $tab_key : $tab_key;
|
18 |
+
$target = $tab['view'] == false ? 'target="_blank" class="not_tab"' : '';
|
19 |
+
$overview_tab_active_class = $tab_key == 'welcome' ? 'class="overview_tab_active"' : ''
|
20 |
+
?>
|
21 |
+
<li class=""><a href="<?php echo $href; ?>" <?php echo $overview_tab_active_class; ?> <?php echo $target; ?>><?php echo esc_html( $tab['name'] ); ?></a></li>
|
22 |
+
<?php } ?>
|
23 |
+
</ul>
|
24 |
+
<div class="overview_content">
|
25 |
+
<?php
|
26 |
+
foreach ( $tabs as $tab_key => $tab ) {
|
27 |
+
if( $tab['view'] !== false ){
|
28 |
+
echo call_user_func( $tab['view'] );
|
29 |
+
}
|
30 |
+
}
|
31 |
+
?>
|
32 |
+
</div>
|
33 |
+
</div>
|
wd/templates/display_overview_deals.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="deals">
|
2 |
+
|
3 |
+
<div id="plugins">
|
4 |
+
<div class="deals_header deals_header_plugins">
|
5 |
+
<a href="https://web-dorado.com/wordpress-plugins-bundle.html" target="_blank">
|
6 |
+
<div class="wd-table">
|
7 |
+
<div class="wd-cell wd-text-right wd-valign-middle">
|
8 |
+
<img src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>" width="100px">
|
9 |
+
</div>
|
10 |
+
<div class="wd-cell wd-valign-middle">
|
11 |
+
<div class="titles_wrap">
|
12 |
+
<div class="deals_main_title"><?php echo sprintf( __( "Get %s", $wd_options->prefix ), $wd_options->plugin_title ); ?></div>
|
13 |
+
<div class="deals_main_title"><span class="higlight">+27 </span><?php echo __( "plugins", $wd_options->prefix ); ?></div>
|
14 |
+
<div class="deals_secondary_title"><?php echo __( "for", $wd_options->prefix ); ?><span class="higlight"> $99 </span><?php echo __( "only", $wd_options->prefix ); ?></div>
|
15 |
+
</div>
|
16 |
+
<div class="deals_save"><?php echo __( "Save 80%", $wd_options->prefix ); ?></div>
|
17 |
+
</div>
|
18 |
+
</div>
|
19 |
+
</a>
|
20 |
+
</div>
|
21 |
+
<div class="deals_content">
|
22 |
+
<?php foreach( $plugins as $wp_slug => &$plugin ){ ?>
|
23 |
+
|
24 |
+
<div class="deal_block">
|
25 |
+
<div class="deal_title">
|
26 |
+
<a href="<?php echo $plugin["href"]; ?>" target="_blank" >
|
27 |
+
<img src = "<?php echo $wd_options->wd_url_img . '/plugins/' . $wp_slug . '.png'; ?>">
|
28 |
+
<h2><?php echo $plugin["title"]; ?></h2>
|
29 |
+
</a>
|
30 |
+
</div>
|
31 |
+
<div class="deal_desc">
|
32 |
+
<p><?php echo $plugin["content"]; ?></p>
|
33 |
+
<div class="deal_desc_footer">
|
34 |
+
<!--<div class="downloads">
|
35 |
+
<div class="rating" data-rating="<?php echo $plugin["rating"]; ?>"></div>
|
36 |
+
<div class="spans">
|
37 |
+
<span><?php _e( "Downloads", $wd_options->prefix ); ?></span>
|
38 |
+
<span><?php echo number_format($plugin["downloaded"], 0); ?></span>
|
39 |
+
</div>
|
40 |
+
</div>-->
|
41 |
+
<div class="download_btn">
|
42 |
+
<a href="<?php echo $plugin["href"]; ?>" target="_blank" ><?php _e( "Download", $wd_options->prefix ); ?></a>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
</div>
|
48 |
+
<?php } ?>
|
49 |
+
</div>
|
50 |
+
<div class="get_all_deals">
|
51 |
+
<a href="https://web-dorado.com/wordpress-plugins-bundle.html" target="_blank" >
|
52 |
+
<?php _e( "Get all plugins", $wd_options->prefix ); ?>
|
53 |
+
</a>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
<div id="themes">
|
57 |
+
<div class="deals_header deals_header_themes">
|
58 |
+
<a href="https://web-dorado.com/wordpress-themes-bundle.html" target="_blank">
|
59 |
+
<div class="wd-table">
|
60 |
+
<div class="wd-cell wd-text-right wd-valign-middle">
|
61 |
+
</div>
|
62 |
+
<div class="wd-cell wd-valign-middle">
|
63 |
+
<div class="titles_wrap">
|
64 |
+
<div class="deals_main_title"><?php echo __( "Get all 11 themes", $wd_options->prefix ); ?></div>
|
65 |
+
<div class="deals_main_title"><?php echo __( "for", $wd_options->prefix ); ?><span class="higlight"> $40 </span><?php echo __( "only", $wd_options->prefix ); ?></div>
|
66 |
+
</div>
|
67 |
+
<div class="deals_save"><?php echo __( "Save 70%", $wd_options->prefix ); ?></div>
|
68 |
+
</div>
|
69 |
+
</div>
|
70 |
+
</a>
|
71 |
+
</div>
|
72 |
+
<div class="deals_content">
|
73 |
+
<?php foreach( $themes as $slug => $theme ){ ?>
|
74 |
+
<div class="theme_block">
|
75 |
+
<a href="<?php echo $theme["href"]; ?>" target="_blank" >
|
76 |
+
<img src = "<?php echo $wd_options->wd_url_img . '/plugins/' . $slug . '.png'; ?>" width="100%;">
|
77 |
+
<div><?php echo $theme["title"]; ?></div>
|
78 |
+
</a>
|
79 |
+
</div>
|
80 |
+
<?php } ?>
|
81 |
+
</div>
|
82 |
+
<div class="get_all_deals">
|
83 |
+
<a href="https://web-dorado.com/wordpress-themes-bundle.html" target="_blank" >
|
84 |
+
<?php _e( "Find out more", $wd_options->prefix ); ?>
|
85 |
+
</a>
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
</div>
|
wd/templates/display_overview_support.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="support">
|
2 |
+
<p class="wd-support-main">
|
3 |
+
<?php echo sprintf( __("You may contact us by filling in this form or by email %s any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.", $wd_options->prefix), "<span class='support_email'>(support@web-dorado.com)</span>") ;?>
|
4 |
+
</p>
|
5 |
+
<div class="wd-overview-site-deatils">
|
6 |
+
<h2><?php _e( "Site Details", $wd_options->prefix ); ?></h2>
|
7 |
+
<p>
|
8 |
+
<?php _e( "When contacting support, consider copying and pasting this information in your support request.", $wd_options->prefix ); ?>
|
9 |
+
<br>
|
10 |
+
<?php _e( "It helps us troubleshoot more quickly.", $wd_options->prefix ); ?>
|
11 |
+
</p>
|
12 |
+
<?php
|
13 |
+
if ( function_exists('current_user_can' ) ) {
|
14 |
+
if ( current_user_can('manage_options') ) {
|
15 |
+
?>
|
16 |
+
<div class="wd-site-deatils wd-table">
|
17 |
+
<button id="wd-copy"><?php _e( "Copy to Clipboard", $wd_options->prefix ); ?></button>
|
18 |
+
<div id="wd-site-deatils">
|
19 |
+
<textarea rows="10" id="wd-site-deatils-textarea"><?php
|
20 |
+
_e( "Server Settings", $wd_options->prefix );
|
21 |
+
echo ' ';
|
22 |
+
foreach( $server_info as $key => $val ){
|
23 |
+
echo $key . ": " . $val . ' ';
|
24 |
+
}
|
25 |
+
echo ' ';
|
26 |
+
_e( "Graphic Library", $wd_options->prefix );
|
27 |
+
echo ' ';
|
28 |
+
foreach( $gd_info as $key => $val ){
|
29 |
+
echo $key . ": " . $val . ' ';
|
30 |
+
}
|
31 |
+
?></textarea>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
<?php
|
35 |
+
}
|
36 |
+
}
|
37 |
+
?>
|
38 |
+
|
39 |
+
</div>
|
40 |
+
<div class="contact_us_wrap">
|
41 |
+
<a href="https://web-dorado.com/support/contact-us.html" target="_blank" class="contact_us"><?php _e("Contact us", $wd_options->prefix); ?></a>
|
42 |
+
</div>
|
43 |
+
</div>
|
wd/templates/display_overview_user_guide.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="user_guide">
|
2 |
+
<div class="wd-table">
|
3 |
+
<div class="wd-cell">
|
4 |
+
<?php for( $i = 0; $i < ceil( count($user_guide) / 2 ); $i++) { ?>
|
5 |
+
<div class="user_guide_item">
|
6 |
+
<a href="<?php echo $user_guide[$i]["url"]; ?>" class="user_guide_title" target="_blank"><?php echo $user_guide[$i]["main_title"]; ?></a>
|
7 |
+
<?php foreach( $user_guide[$i]["titles"] as $title ) { ?>
|
8 |
+
<div><a href="<?php echo $title["url"]; ?>" target="_blank" class="user_guide_titles"><?php echo $title["title"]; ?></a></div>
|
9 |
+
<?php } ?>
|
10 |
+
</div>
|
11 |
+
<?php } ?>
|
12 |
+
</div>
|
13 |
+
<div class="wd-cell">
|
14 |
+
<?php for( $i = $i; $i < count($user_guide); $i++) { ?>
|
15 |
+
<div class="user_guide_item">
|
16 |
+
<a href="<?php echo $user_guide[$i]["url"]; ?>" class="user_guide_title" target="_blank"><?php echo $user_guide[$i]["main_title"]; ?></a>
|
17 |
+
<?php foreach( $user_guide[$i]["titles"] as $title ) { ?>
|
18 |
+
<div><a href="<?php echo $title["url"]; ?>" target="_blank" class="user_guide_titles"><?php echo $title["title"]; ?></a></div>
|
19 |
+
<?php } ?>
|
20 |
+
</div>
|
21 |
+
<?php } ?>
|
22 |
+
</div>
|
23 |
+
<div class="wd-cell">
|
24 |
+
<?php if($wd_options->plugin_wd_demo_link) { ?>
|
25 |
+
<a href="<?php echo $wd_options->plugin_wd_demo_link; ?>" class="user_guide_demo" target="_blank">
|
26 |
+
<?php _e( "Demo", $wd_options->prefix ); ?>
|
27 |
+
</a>
|
28 |
+
<?php } ?>
|
29 |
+
<a href="<?php echo $wd_options->plugin_wd_url; ?>" class="user_guide_plugin" target="_blank">
|
30 |
+
<?php echo $wd_options->plugin_title; ?>
|
31 |
+
</a>
|
32 |
+
<a href="https://wordpress.org/support/plugin/<?php echo $wd_options->plugin_wordpress_slug; ?>" class="user_guide_support_forum" target="_blank">
|
33 |
+
<?php _e( "Support Forum", $wd_options->prefix ); ?>
|
34 |
+
</a>
|
35 |
+
<a href="https://web-dorado.com/support/faq.html" class="user_guide_faq" target="_blank">
|
36 |
+
<?php _e( "FAQ", $wd_options->prefix ); ?>
|
37 |
+
</a>
|
38 |
+
<?php if($wd_options->plugin_wd_addons_link) { ?>
|
39 |
+
<a href="<?php echo $wd_options->plugin_wd_addons_link; ?>" class="user_guide_addons" target="_blank">
|
40 |
+
<?php _e( "Addons", $wd_options->prefix ); ?>
|
41 |
+
</a>
|
42 |
+
<?php } ?>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
|
wd/templates/display_overview_welcome.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="welcome">
|
2 |
+
<!-- display plugin video -->
|
3 |
+
<?php if( $wd_options->video_youtube_id ){ ?>
|
4 |
+
<div class="wd-video_container">
|
5 |
+
<iframe width="100%" height="400" src="//www.youtube.com/embed/<?php echo $wd_options->video_youtube_id; ?>?rel=0" frameborder="0" allowfullscreen></iframe>
|
6 |
+
</div>
|
7 |
+
<?php }
|
8 |
+
else if( $wd_options->overview_welcome_image ) { ?>
|
9 |
+
<img src="<?php echo $wd_options->overview_welcome_image; ?>" width="100%" />
|
10 |
+
|
11 |
+
<?php } ?>
|
12 |
+
|
13 |
+
<!-- display plugin features -->
|
14 |
+
<div class="plugin_features">
|
15 |
+
<!-- if your plugin has a wizard-->
|
16 |
+
<?php if( $wd_options->plugin_wizard_link ) { ?>
|
17 |
+
<div class="wd-tour">
|
18 |
+
<a class="wd-tour-btn" href="<?php echo $wd_options->plugin_wizard_link;?>"><?php _e( "Run Install Wizard ",$wd_options->prefix); ?></a>
|
19 |
+
</div>
|
20 |
+
<?php } ?>
|
21 |
+
<?php foreach( $wd_options->plugin_features as $feature ){ ?>
|
22 |
+
<h2 class="plugin_feature_title"><?php echo $feature["title"]; ?></h2>
|
23 |
+
<div class="plugin_feature_description"><?php echo $feature["description"]; ?></div>
|
24 |
+
<?php } ?>
|
25 |
+
<div class="more_features_wrap">
|
26 |
+
<a href="<?php echo $wd_options->plugin_wd_url; ?>" class="more_features" target="_blank"><?php _e( "More features", $wd_options->prefix ); ?></a>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
|
30 |
+
</div>
|
31 |
+
|
wd/templates/display_subscribe.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wd-subscribe">
|
2 |
+
<div class="wd-subscribe-content">
|
3 |
+
<div class="imgs">
|
4 |
+
<img src="<?php echo $wd_options->wd_url_img . '/wp_logo.png'; ?>">
|
5 |
+
<span>+</span>
|
6 |
+
<img src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>">
|
7 |
+
</div>
|
8 |
+
<div class="texts">
|
9 |
+
<p><?php _e( "Hi there", $wd_options->prefix ); ?>,</p>
|
10 |
+
<p>
|
11 |
+
<?php echo sprintf( __( "Allow %s to collect some usage data. This will allow you to get more out of your plugin experience – get awesome customer support, receive exclusive deals and discounts on premium products and more. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix ), '<strong>Web-Dorado</strong>', $wd_options->plugin_title ); ?>
|
12 |
+
</p>
|
13 |
+
</div>
|
14 |
+
<div class="btns">
|
15 |
+
<a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&". $wd_options->prefix . "_sub_action=allow" ;?>" class="allow_and_continue"></a>
|
16 |
+
<img src="<?php echo $wd_options->wd_url_img . '/loader.gif';?>" class="wd_loader">
|
17 |
+
<a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&" . $wd_options->prefix . "_sub_action=skip" ;?>" class="skip" ></a>
|
18 |
+
</div>
|
19 |
+
<a href="#" class="permissions"><?php _e( "What data is being collected?" , $wd_options->prefix ); ?></a>
|
20 |
+
<div class="list">
|
21 |
+
<?php foreach( $list as $list_item ) { ?>
|
22 |
+
<div class="list_item">
|
23 |
+
<div class="list_img_wrap"><img src="<?php echo $list_item["img"]; ?>"></div>
|
24 |
+
<div class="list_text_wrap">
|
25 |
+
<div class="list_title"><?php echo $list_item["title"]; ?></div>
|
26 |
+
<div class="list_text"><?php echo $list_item["small_text"]; ?></div>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
<?php } ?>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
<div class="wd-subscribe-footer">
|
33 |
+
<ul class="wd-footer-menu">
|
34 |
+
<li>
|
35 |
+
<a href="https://web-dorado.com/web-dorado-privacy-statement.html" target="_blank">
|
36 |
+
<?php _e( "Privacy Policy", $wd_options->prefix ); ?>
|
37 |
+
</a>
|
38 |
+
<span>.</span>
|
39 |
+
</li>
|
40 |
+
<li>
|
41 |
+
<a href="https://web-dorado.com/terms-of-service.html" target="_blank">
|
42 |
+
<?php _e( "Terms of Use", $wd_options->prefix ); ?>
|
43 |
+
</a>
|
44 |
+
</li>
|
45 |
+
</ul>
|
46 |
+
</div>
|
47 |
+
</div>
|
wd/wd.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
class DoradoWeb {
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Events //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Constants //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Variables //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public static $instance;
|
17 |
+
public $overview_instance;
|
18 |
+
public $subscribe_instance;
|
19 |
+
public $config;
|
20 |
+
private $version = "1.0.2";
|
21 |
+
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Constructor & Destructor //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
public function __construct() {
|
26 |
+
// Add menu for Overview page
|
27 |
+
add_action( 'admin_menu', array( $this, 'wd_overview_menu_page' ), 10 );
|
28 |
+
|
29 |
+
}
|
30 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
+
// Public Methods //
|
32 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
33 |
+
|
34 |
+
// Init plugin data
|
35 |
+
public function wd_init( $options ) {
|
36 |
+
|
37 |
+
if(!is_array($options)){
|
38 |
+
return false;
|
39 |
+
}
|
40 |
+
$config = new DoradoWebConfig();
|
41 |
+
$config->set_options( $options );
|
42 |
+
$this->config = $config;
|
43 |
+
if( !class_exists("DoradoWebApi") ){
|
44 |
+
$this->wd_includes();
|
45 |
+
}
|
46 |
+
|
47 |
+
$this->init_classes();
|
48 |
+
$this->register_hooks();
|
49 |
+
|
50 |
+
}
|
51 |
+
|
52 |
+
// Create overview menu page
|
53 |
+
public function wd_overview_menu_page() {
|
54 |
+
$wd_options = $this->config;
|
55 |
+
|
56 |
+
$capability = $wd_options->menu_capability ? $wd_options->menu_capability : "manage_options";
|
57 |
+
if( get_option( $wd_options->prefix . "_subscribe_done" ) == 1 || $wd_options->subscribe === false ){
|
58 |
+
$parent_slug = $wd_options->custom_post;
|
59 |
+
}
|
60 |
+
else{
|
61 |
+
|
62 |
+
$subscribe_page = add_menu_page( $wd_options->plugin_menu_title, $wd_options->plugin_menu_title, "manage_options", $wd_options->prefix . '_subscribe' , array( $this, 'display_subscribew_page' ), $wd_options->plugin_menu_icon, $wd_options->menu_position );
|
63 |
+
|
64 |
+
$subscribe_instance = new DoradoWebSubscribe($this->config);
|
65 |
+
$this->subscribe_instance = $subscribe_instance;
|
66 |
+
add_action( 'admin_print_styles-' . $subscribe_page, array( $subscribe_instance, 'subscribe_styles' ) );
|
67 |
+
add_action( 'admin_print_scripts-' . $subscribe_page, array( $subscribe_instance, 'subscribe_scripts' ) );
|
68 |
+
|
69 |
+
$parent_slug = null;
|
70 |
+
}
|
71 |
+
|
72 |
+
$overview_page = add_submenu_page( $parent_slug, __( 'Overview', $wd_options->prefix ), __( 'Overview', $wd_options->prefix ), $capability, 'overview_' . $wd_options->prefix, array( $this, 'display_overview_page' ));
|
73 |
+
|
74 |
+
|
75 |
+
$overview_instance = new DoradoWebOverview($this->config);
|
76 |
+
$this->overview_instance = $overview_instance;
|
77 |
+
add_action( 'admin_print_styles-' . $overview_page, array( $overview_instance, 'overview_styles' ) );
|
78 |
+
add_action( 'admin_print_scripts-' . $overview_page, array( $overview_instance, 'overview_scripts' ) );
|
79 |
+
}
|
80 |
+
|
81 |
+
public function display_subscribew_page(){
|
82 |
+
$this->subscribe_instance->subscribe_display_page();
|
83 |
+
}
|
84 |
+
|
85 |
+
// Display overview page
|
86 |
+
public function display_overview_page() {
|
87 |
+
$this->overview_instance->display_overview_page();
|
88 |
+
}
|
89 |
+
|
90 |
+
|
91 |
+
// Includs
|
92 |
+
public function wd_includes(){
|
93 |
+
$wd_options = $this->config;
|
94 |
+
|
95 |
+
require_once $wd_options->wd_dir_includes . '/deactivate.php' ;
|
96 |
+
// notices
|
97 |
+
require_once $wd_options->wd_dir_includes . '/api.php';
|
98 |
+
require_once $wd_options->wd_dir_includes . '/notices.php';
|
99 |
+
require_once $wd_options->wd_dir_includes . "/overview.php";
|
100 |
+
require_once $wd_options->wd_dir_includes . "/subscribe.php";
|
101 |
+
|
102 |
+
}
|
103 |
+
public function init_classes(){
|
104 |
+
$wd_options = $this->config;
|
105 |
+
|
106 |
+
$current_url = $_SERVER['REQUEST_URI'];
|
107 |
+
if( $wd_options->deactivate === true ){
|
108 |
+
if(strpos( $current_url, "plugins.php" ) !== false ){
|
109 |
+
new DoradoWebDeactivate( $this->config );
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
new DoradoWebNotices( $this->config );
|
114 |
+
|
115 |
+
}
|
116 |
+
|
117 |
+
public function register_hooks(){
|
118 |
+
$wd_options = $this->config;
|
119 |
+
if( $wd_options->deactivate === true ){
|
120 |
+
add_filter( 'plugin_action_links_' . plugin_basename( $wd_options->plugin_main_file ), array( $this, 'change_deactivation_link' ) );
|
121 |
+
}
|
122 |
+
|
123 |
+
}
|
124 |
+
|
125 |
+
|
126 |
+
public function change_deactivation_link ( $links ) {
|
127 |
+
$wd_options = $this->config;
|
128 |
+
$links["deactivate"] = '<a href="#" class="' . $wd_options->prefix . '_deactivate_link">Deactivate</a>';
|
129 |
+
return $links;
|
130 |
+
}
|
131 |
+
|
132 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
133 |
+
// Getters & Setters //
|
134 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
135 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
136 |
+
// Private Methods //
|
137 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
138 |
+
|
139 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
140 |
+
// Listeners //
|
141 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
142 |
+
|
143 |
+
}
|
144 |
+
|
145 |
+
|
146 |
+
|