Version Description
Download this release
Release Info
Developer | nimblechapps |
Plugin | Save Contact Form 7 |
Version | 1.5 |
Comparing to | |
See all releases |
Code changes from version 1.4 to 1.5
- Readme.txt +7 -3
- assets/DataTables/media/js/buttons/buttons.html5.min.js +706 -261
- includes/ssp.class.php +2 -1
- save-contact-form-7.php +14 -8
Readme.txt
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
=== Save Contact Form 7 ===
|
2 |
Contributors: nimblechapps
|
3 |
Donate link: http://savecontactform7.com/donate
|
4 |
-
Tags: Save Contact Enquiry, Save Contact Inquiry, Save Contact Entries, Save Forms Data, Contact Form Storage, Contact Form Entry Storage, Contact Enquiry Storage, Contact Form Save, Storage Contact Enquiry, ContactFormDB, JetPack Contact Form, Contact Form 7, CF7, Fast Secure Contact Form, FSCF, Gravity Forms, WR ContactForm, Quform, Ninja Forms, Caldera Forms, Enfold theme forms, contactform7, Contact Form Advanced Database, Storage for Contact Form 7, cfdb, contact form 7 extension, contact form db extension, contact form, save contact form 7 to database
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.5.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
-
Stable tag: 1.
|
10 |
|
11 |
|
12 |
-
Save Contact Form 7 data. Sort, search & export it in CSV+PDF. Best UI. Fully tested with WP 3
|
13 |
|
14 |
== Description ==
|
15 |
|
@@ -73,6 +73,10 @@ Select any form for which you want to download the entries, from the populated e
|
|
73 |
|
74 |
== Changelog ==
|
75 |
|
|
|
|
|
|
|
|
|
76 |
= 1.4 =
|
77 |
|
78 |
* Given setting page option to view/hide Record created Date and Time column.
|
1 |
=== Save Contact Form 7 ===
|
2 |
Contributors: nimblechapps
|
3 |
Donate link: http://savecontactform7.com/donate
|
4 |
+
Tags: Save Contact Enquiry, Save Contact Inquiry, Save Contact Entries, Save Forms Data, Contact Form Storage, Contact Form Entry Storage, Contact Enquiry Storage, Contact Form Save, Storage Contact Enquiry, ContactFormDB, JetPack Contact Form, Contact Form 7, CF7, Fast Secure Contact Form, FSCF, Gravity Forms, WR ContactForm, Quform, Ninja Forms, Caldera Forms, Enfold theme forms, contactform7, Contact Form Advanced Database, Storage for Contact Form 7, cfdb, contact form 7 extension, contact form db extension, contact form, save contact form 7 to database, contact, AJAX, form, form database, contact form database, contact form plugin, contact forms plugin, contact forms, contact us form, best contact form plugin
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.5.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
Stable tag: 1.5
|
10 |
|
11 |
|
12 |
+
Save Contact Form 7 data. Sort, search & export it in CSV+PDF. Best UI. Fully tested with WP 4.5.3 + CF7 4.4.2 & Totally Supported.
|
13 |
|
14 |
== Description ==
|
15 |
|
73 |
|
74 |
== Changelog ==
|
75 |
|
76 |
+
= 1.5 =
|
77 |
+
|
78 |
+
* Corrected CSV title.
|
79 |
+
|
80 |
= 1.4 =
|
81 |
|
82 |
* Given setting page option to view/hide Record created Date and Time column.
|
assets/DataTables/media/js/buttons/buttons.html5.min.js
CHANGED
@@ -1,261 +1,706 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* HTML5 export buttons for Buttons and DataTables.
|
3 |
+
* 2015 SpryMedia Ltd - datatables.net/license
|
4 |
+
*
|
5 |
+
* FileSaver.js (2015-05-07.2) - MIT license
|
6 |
+
* Copyright © 2015 Eli Grey - http://eligrey.com
|
7 |
+
*/
|
8 |
+
|
9 |
+
(function($, DataTable) {
|
10 |
+
"use strict";
|
11 |
+
|
12 |
+
|
13 |
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
14 |
+
* FileSaver.js dependency
|
15 |
+
*/
|
16 |
+
|
17 |
+
/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */
|
18 |
+
|
19 |
+
var _saveAs = (function(view) {
|
20 |
+
// IE <10 is explicitly unsupported
|
21 |
+
if (typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
var
|
25 |
+
doc = view.document
|
26 |
+
// only get URL when necessary in case Blob.js hasn't overridden it yet
|
27 |
+
, get_URL = function() {
|
28 |
+
return view.URL || view.webkitURL || view;
|
29 |
+
}
|
30 |
+
, save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
|
31 |
+
, can_use_save_link = "download" in save_link
|
32 |
+
, click = function(node) {
|
33 |
+
var event = doc.createEvent("MouseEvents");
|
34 |
+
event.initMouseEvent(
|
35 |
+
"click", true, false, view, 0, 0, 0, 0, 0
|
36 |
+
, false, false, false, false, 0, null
|
37 |
+
);
|
38 |
+
node.dispatchEvent(event);
|
39 |
+
}
|
40 |
+
, webkit_req_fs = view.webkitRequestFileSystem
|
41 |
+
, req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem
|
42 |
+
, throw_outside = function(ex) {
|
43 |
+
(view.setImmediate || view.setTimeout)(function() {
|
44 |
+
throw ex;
|
45 |
+
}, 0);
|
46 |
+
}
|
47 |
+
, force_saveable_type = "application/octet-stream"
|
48 |
+
, fs_min_size = 0
|
49 |
+
// See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and
|
50 |
+
// https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047
|
51 |
+
// for the reasoning behind the timeout and revocation flow
|
52 |
+
, arbitrary_revoke_timeout = 500 // in ms
|
53 |
+
, revoke = function(file) {
|
54 |
+
var revoker = function() {
|
55 |
+
if (typeof file === "string") { // file is an object URL
|
56 |
+
get_URL().revokeObjectURL(file);
|
57 |
+
} else { // file is a File
|
58 |
+
file.remove();
|
59 |
+
}
|
60 |
+
};
|
61 |
+
if (view.chrome) {
|
62 |
+
revoker();
|
63 |
+
} else {
|
64 |
+
setTimeout(revoker, arbitrary_revoke_timeout);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
, dispatch = function(filesaver, event_types, event) {
|
68 |
+
event_types = [].concat(event_types);
|
69 |
+
var i = event_types.length;
|
70 |
+
while (i--) {
|
71 |
+
var listener = filesaver["on" + event_types[i]];
|
72 |
+
if (typeof listener === "function") {
|
73 |
+
try {
|
74 |
+
listener.call(filesaver, event || filesaver);
|
75 |
+
} catch (ex) {
|
76 |
+
throw_outside(ex);
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
, auto_bom = function(blob) {
|
82 |
+
// prepend BOM for UTF-8 XML and text/* types (including HTML)
|
83 |
+
if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
|
84 |
+
return new Blob(["\ufeff", blob], {type: blob.type});
|
85 |
+
}
|
86 |
+
return blob;
|
87 |
+
}
|
88 |
+
, FileSaver = function(blob, name) {
|
89 |
+
blob = auto_bom(blob);
|
90 |
+
// First try a.download, then web filesystem, then object URLs
|
91 |
+
var
|
92 |
+
filesaver = this
|
93 |
+
, type = blob.type
|
94 |
+
, blob_changed = false
|
95 |
+
, object_url
|
96 |
+
, target_view
|
97 |
+
, dispatch_all = function() {
|
98 |
+
dispatch(filesaver, "writestart progress write writeend".split(" "));
|
99 |
+
}
|
100 |
+
// on any filesys errors revert to saving with object URLs
|
101 |
+
, fs_error = function() {
|
102 |
+
// don't create more object URLs than needed
|
103 |
+
if (blob_changed || !object_url) {
|
104 |
+
object_url = get_URL().createObjectURL(blob);
|
105 |
+
}
|
106 |
+
if (target_view) {
|
107 |
+
target_view.location.href = object_url;
|
108 |
+
} else {
|
109 |
+
var new_tab = view.open(object_url, "_blank");
|
110 |
+
if (new_tab === undefined && typeof safari !== "undefined") {
|
111 |
+
//Apple do not allow window.open, see http://bit.ly/1kZffRI
|
112 |
+
view.location.href = object_url;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
filesaver.readyState = filesaver.DONE;
|
116 |
+
dispatch_all();
|
117 |
+
revoke(object_url);
|
118 |
+
}
|
119 |
+
, abortable = function(func) {
|
120 |
+
return function() {
|
121 |
+
if (filesaver.readyState !== filesaver.DONE) {
|
122 |
+
return func.apply(this, arguments);
|
123 |
+
}
|
124 |
+
};
|
125 |
+
}
|
126 |
+
, create_if_not_found = {create: true, exclusive: false}
|
127 |
+
, slice
|
128 |
+
;
|
129 |
+
filesaver.readyState = filesaver.INIT;
|
130 |
+
if (!name) {
|
131 |
+
name = "download";
|
132 |
+
}
|
133 |
+
if (can_use_save_link) {
|
134 |
+
object_url = get_URL().createObjectURL(blob);
|
135 |
+
save_link.href = object_url;
|
136 |
+
save_link.download = name;
|
137 |
+
click(save_link);
|
138 |
+
filesaver.readyState = filesaver.DONE;
|
139 |
+
dispatch_all();
|
140 |
+
revoke(object_url);
|
141 |
+
return;
|
142 |
+
}
|
143 |
+
// Object and web filesystem URLs have a problem saving in Google Chrome when
|
144 |
+
// viewed in a tab, so I force save with application/octet-stream
|
145 |
+
// http://code.google.com/p/chromium/issues/detail?id=91158
|
146 |
+
// Update: Google errantly closed 91158, I submitted it again:
|
147 |
+
// https://code.google.com/p/chromium/issues/detail?id=389642
|
148 |
+
if (view.chrome && type && type !== force_saveable_type) {
|
149 |
+
slice = blob.slice || blob.webkitSlice;
|
150 |
+
blob = slice.call(blob, 0, blob.size, force_saveable_type);
|
151 |
+
blob_changed = true;
|
152 |
+
}
|
153 |
+
// Since I can't be sure that the guessed media type will trigger a download
|
154 |
+
// in WebKit, I append .download to the filename.
|
155 |
+
// https://bugs.webkit.org/show_bug.cgi?id=65440
|
156 |
+
if (webkit_req_fs && name !== "download") {
|
157 |
+
name += ".download";
|
158 |
+
}
|
159 |
+
if (type === force_saveable_type || webkit_req_fs) {
|
160 |
+
target_view = view;
|
161 |
+
}
|
162 |
+
if (!req_fs) {
|
163 |
+
fs_error();
|
164 |
+
return;
|
165 |
+
}
|
166 |
+
fs_min_size += blob.size;
|
167 |
+
req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) {
|
168 |
+
fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) {
|
169 |
+
var save = function() {
|
170 |
+
dir.getFile(name, create_if_not_found, abortable(function(file) {
|
171 |
+
file.createWriter(abortable(function(writer) {
|
172 |
+
writer.onwriteend = function(event) {
|
173 |
+
target_view.location.href = file.toURL();
|
174 |
+
filesaver.readyState = filesaver.DONE;
|
175 |
+
dispatch(filesaver, "writeend", event);
|
176 |
+
revoke(file);
|
177 |
+
};
|
178 |
+
writer.onerror = function() {
|
179 |
+
var error = writer.error;
|
180 |
+
if (error.code !== error.ABORT_ERR) {
|
181 |
+
fs_error();
|
182 |
+
}
|
183 |
+
};
|
184 |
+
"writestart progress write abort".split(" ").forEach(function(event) {
|
185 |
+
writer["on" + event] = filesaver["on" + event];
|
186 |
+
});
|
187 |
+
writer.write(blob);
|
188 |
+
filesaver.abort = function() {
|
189 |
+
writer.abort();
|
190 |
+
filesaver.readyState = filesaver.DONE;
|
191 |
+
};
|
192 |
+
filesaver.readyState = filesaver.WRITING;
|
193 |
+
}), fs_error);
|
194 |
+
}), fs_error);
|
195 |
+
};
|
196 |
+
dir.getFile(name, {create: false}, abortable(function(file) {
|
197 |
+
// delete file if it already exists
|
198 |
+
file.remove();
|
199 |
+
save();
|
200 |
+
}), abortable(function(ex) {
|
201 |
+
if (ex.code === ex.NOT_FOUND_ERR) {
|
202 |
+
save();
|
203 |
+
} else {
|
204 |
+
fs_error();
|
205 |
+
}
|
206 |
+
}));
|
207 |
+
}), fs_error);
|
208 |
+
}), fs_error);
|
209 |
+
}
|
210 |
+
, FS_proto = FileSaver.prototype
|
211 |
+
, saveAs = function(blob, name) {
|
212 |
+
return new FileSaver(blob, name);
|
213 |
+
}
|
214 |
+
;
|
215 |
+
// IE 10+ (native saveAs)
|
216 |
+
if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) {
|
217 |
+
return function(blob, name) {
|
218 |
+
return navigator.msSaveOrOpenBlob(auto_bom(blob), name);
|
219 |
+
};
|
220 |
+
}
|
221 |
+
|
222 |
+
FS_proto.abort = function() {
|
223 |
+
var filesaver = this;
|
224 |
+
filesaver.readyState = filesaver.DONE;
|
225 |
+
dispatch(filesaver, "abort");
|
226 |
+
};
|
227 |
+
FS_proto.readyState = FS_proto.INIT = 0;
|
228 |
+
FS_proto.WRITING = 1;
|
229 |
+
FS_proto.DONE = 2;
|
230 |
+
|
231 |
+
FS_proto.error =
|
232 |
+
FS_proto.onwritestart =
|
233 |
+
FS_proto.onprogress =
|
234 |
+
FS_proto.onwrite =
|
235 |
+
FS_proto.onabort =
|
236 |
+
FS_proto.onerror =
|
237 |
+
FS_proto.onwriteend =
|
238 |
+
null;
|
239 |
+
|
240 |
+
return saveAs;
|
241 |
+
}(window));
|
242 |
+
|
243 |
+
|
244 |
+
|
245 |
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
246 |
+
* Local (private) functions
|
247 |
+
*/
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Get the title / file name for an exported file.
|
251 |
+
*
|
252 |
+
* @param {object} config Button configuration
|
253 |
+
* @param {boolean} incExtension Include the file name extension
|
254 |
+
*/
|
255 |
+
var _filename = function ( config, incExtension )
|
256 |
+
{
|
257 |
+
var title = config.title;
|
258 |
+
|
259 |
+
if ( title.indexOf( '*' ) !== -1 ) {
|
260 |
+
title = title.replace( '*', $('title').text() );
|
261 |
+
}
|
262 |
+
|
263 |
+
// Strip characters which the OS will object to
|
264 |
+
title = title.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g, "");
|
265 |
+
|
266 |
+
return incExtension === undefined || incExtension === true ?
|
267 |
+
title+config.extension :
|
268 |
+
title;
|
269 |
+
};
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Get the newline character(s)
|
273 |
+
*
|
274 |
+
* @param {object} config Button configuration
|
275 |
+
* @return {string} Newline character
|
276 |
+
*/
|
277 |
+
var _newLine = function ( config )
|
278 |
+
{
|
279 |
+
return config.newline ?
|
280 |
+
config.newline :
|
281 |
+
navigator.userAgent.match(/Windows/) ?
|
282 |
+
'\r\n' :
|
283 |
+
'\n';
|
284 |
+
};
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Combine the data from the `buttons.exportData` method into a string that
|
288 |
+
* will be used in the export file.
|
289 |
+
*
|
290 |
+
* @param {DataTable.Api} dt DataTables API instance
|
291 |
+
* @param {object} config Button configuration
|
292 |
+
* @return {object} The data to export
|
293 |
+
*/
|
294 |
+
var _exportData = function ( dt, config )
|
295 |
+
{
|
296 |
+
var newLine = _newLine( config );
|
297 |
+
var data = dt.buttons.exportData( config.exportOptions );
|
298 |
+
var join = function ( a ) {
|
299 |
+
return config.fieldBoundary +
|
300 |
+
a.join( config.fieldBoundary + config.fieldSeparator + config.fieldBoundary ) +
|
301 |
+
config.fieldBoundary;
|
302 |
+
};
|
303 |
+
|
304 |
+
var header = config.header ? join( data.header )+newLine : '';
|
305 |
+
var footer = config.footer ? newLine+join( data.footer ) : '';
|
306 |
+
var body = [];
|
307 |
+
|
308 |
+
for ( var i=0, ien=data.body.length ; i<ien ; i++ ) {
|
309 |
+
body.push( join( data.body[i] ) );
|
310 |
+
}
|
311 |
+
|
312 |
+
return {
|
313 |
+
str: header + body.join( newLine ) + footer,
|
314 |
+
rows: body.length
|
315 |
+
};
|
316 |
+
};
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Safari's data: support for creating and downloading files is really poor, so
|
320 |
+
* various options need to be disabled in it. See
|
321 |
+
* https://bugs.webkit.org/show_bug.cgi?id=102914
|
322 |
+
*
|
323 |
+
* @return {Boolean} `true` if Safari
|
324 |
+
*/
|
325 |
+
var _isSafari = function ()
|
326 |
+
{
|
327 |
+
return navigator.userAgent.indexOf('Safari') !== -1 &&
|
328 |
+
navigator.userAgent.indexOf('Chrome') === -1 &&
|
329 |
+
navigator.userAgent.indexOf('Opera') === -1;
|
330 |
+
};
|
331 |
+
|
332 |
+
|
333 |
+
// Excel - Pre-defined strings to build a minimal XLSX file
|
334 |
+
var excelStrings = {
|
335 |
+
"_rels/.rels": '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\
|
336 |
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\
|
337 |
+
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>\
|
338 |
+
</Relationships>',
|
339 |
+
|
340 |
+
"xl/_rels/workbook.xml.rels": '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\
|
341 |
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\
|
342 |
+
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/>\
|
343 |
+
</Relationships>',
|
344 |
+
|
345 |
+
"[Content_Types].xml": '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\
|
346 |
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">\
|
347 |
+
<Default Extension="xml" ContentType="application/xml"/>\
|
348 |
+
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>\
|
349 |
+
<Default Extension="jpeg" ContentType="image/jpeg"/>\
|
350 |
+
<Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>\
|
351 |
+
<Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>\
|
352 |
+
</Types>',
|
353 |
+
|
354 |
+
"xl/workbook.xml": '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\
|
355 |
+
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">\
|
356 |
+
<fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="24816"/>\
|
357 |
+
<workbookPr showInkAnnotation="0" autoCompressPictures="0"/>\
|
358 |
+
<bookViews>\
|
359 |
+
<workbookView xWindow="0" yWindow="0" windowWidth="25600" windowHeight="19020" tabRatio="500"/>\
|
360 |
+
</bookViews>\
|
361 |
+
<sheets>\
|
362 |
+
<sheet name="Sheet1" sheetId="1" r:id="rId1"/>\
|
363 |
+
</sheets>\
|
364 |
+
</workbook>',
|
365 |
+
|
366 |
+
"xl/worksheets/sheet1.xml": '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\
|
367 |
+
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">\
|
368 |
+
<sheetData>\
|
369 |
+
__DATA__\
|
370 |
+
</sheetData>\
|
371 |
+
</worksheet>'
|
372 |
+
};
|
373 |
+
|
374 |
+
|
375 |
+
|
376 |
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
377 |
+
* Buttons
|
378 |
+
*/
|
379 |
+
|
380 |
+
//
|
381 |
+
// Copy to clipboard
|
382 |
+
//
|
383 |
+
DataTable.ext.buttons.copyHtml5 = {
|
384 |
+
className: 'buttons-copy buttons-html5',
|
385 |
+
|
386 |
+
text: function ( dt ) {
|
387 |
+
return dt.i18n( 'buttons.copy', 'Copy' );
|
388 |
+
},
|
389 |
+
|
390 |
+
action: function ( e, dt, button, config ) {
|
391 |
+
// This button is slightly sneaky as there is no HTML API to copy text
|
392 |
+
// to a clipboard, so what it does is use the buttons information
|
393 |
+
// element with an also completely hidden textarea that contains the
|
394 |
+
// data to be copied. That is pre-selected so the user just needs to
|
395 |
+
// activate their system clipboard.
|
396 |
+
var newLine = _newLine( config );
|
397 |
+
var output = _exportData( dt, config ).str;
|
398 |
+
var message = $('<span>'+dt.i18n( 'buttons.copyKeys',
|
399 |
+
'Press <i>ctrl</i> or <i>\u2318</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>'+
|
400 |
+
'To cancel, click this message or press escape.' )+'</span>'
|
401 |
+
)
|
402 |
+
.append( $('<div/>')
|
403 |
+
.css( {
|
404 |
+
height: 1,
|
405 |
+
width: 1,
|
406 |
+
overflow: 'hidden'
|
407 |
+
} )
|
408 |
+
.append(
|
409 |
+
$('<textarea readonly/>').val( output )
|
410 |
+
)
|
411 |
+
);
|
412 |
+
|
413 |
+
dt.buttons.info( dt.i18n( 'buttons.copyTitle', 'Copy to clipboard' ), message, 0 );
|
414 |
+
|
415 |
+
// Select the text so when the user activates their system clipboard
|
416 |
+
// it will copy that text
|
417 |
+
message.find('textarea')[0].focus();
|
418 |
+
message.find('textarea')[0].select();
|
419 |
+
|
420 |
+
// Event to hide the message when the user is done
|
421 |
+
var container = $(message).closest('.dt-button-info');
|
422 |
+
var close = function () {
|
423 |
+
container.off( 'click.buttons-copy' );
|
424 |
+
$(document).off( '.buttons-copy' );
|
425 |
+
dt.buttons.info( false );
|
426 |
+
};
|
427 |
+
|
428 |
+
container.on( 'click.buttons-copy', close );
|
429 |
+
$(document)
|
430 |
+
.on( 'keydown.buttons-copy', function (e) {
|
431 |
+
if ( e.keyCode === 27 ) { // esc
|
432 |
+
close();
|
433 |
+
}
|
434 |
+
} )
|
435 |
+
.on( 'copy.buttons-copy cut.buttons-copy', function () {
|
436 |
+
close();
|
437 |
+
} );
|
438 |
+
},
|
439 |
+
|
440 |
+
exportOptions: {},
|
441 |
+
|
442 |
+
fieldSeparator: '\t',
|
443 |
+
|
444 |
+
fieldBoundary: '',
|
445 |
+
|
446 |
+
header: true,
|
447 |
+
|
448 |
+
footer: false
|
449 |
+
};
|
450 |
+
|
451 |
+
//
|
452 |
+
// CSV export
|
453 |
+
//
|
454 |
+
DataTable.ext.buttons.csvHtml5 = {
|
455 |
+
className: 'buttons-csv buttons-html5',
|
456 |
+
|
457 |
+
available: function () {
|
458 |
+
return window.FileReader !== undefined && window.Blob;
|
459 |
+
},
|
460 |
+
|
461 |
+
text: function ( dt ) {
|
462 |
+
return dt.i18n( 'buttons.csv', 'CSV' );
|
463 |
+
},
|
464 |
+
|
465 |
+
action: function ( e, dt, button, config ) {
|
466 |
+
// Set the text
|
467 |
+
var newLine = _newLine( config );
|
468 |
+
var output = _exportData( dt, config ).str;
|
469 |
+
|
470 |
+
_saveAs(
|
471 |
+
new Blob( [output], {type : 'text/csv'} ),
|
472 |
+
_filename( config )
|
473 |
+
);
|
474 |
+
},
|
475 |
+
|
476 |
+
title: '*',
|
477 |
+
|
478 |
+
extension: '.csv',
|
479 |
+
|
480 |
+
exportOptions: {},
|
481 |
+
|
482 |
+
fieldSeparator: ',',
|
483 |
+
|
484 |
+
fieldBoundary: '',
|
485 |
+
|
486 |
+
header: true,
|
487 |
+
|
488 |
+
footer: false
|
489 |
+
};
|
490 |
+
|
491 |
+
//
|
492 |
+
// Excel (xlsx) export
|
493 |
+
//
|
494 |
+
DataTable.ext.buttons.excelHtml5 = {
|
495 |
+
className: 'buttons-excel buttons-html5',
|
496 |
+
|
497 |
+
available: function () {
|
498 |
+
return window.FileReader !== undefined && window.JSZip !== undefined && ! _isSafari();
|
499 |
+
},
|
500 |
+
|
501 |
+
text: function ( dt ) {
|
502 |
+
return dt.i18n( 'buttons.excel', 'Excel' );
|
503 |
+
},
|
504 |
+
|
505 |
+
action: function ( e, dt, button, config ) {
|
506 |
+
// Set the text
|
507 |
+
var xml = '';
|
508 |
+
var data = dt.buttons.exportData( config.exportOptions );
|
509 |
+
var addRow = function ( row ) {
|
510 |
+
var cells = [];
|
511 |
+
|
512 |
+
for ( var i=0, ien=row.length ; i<ien ; i++ ) {
|
513 |
+
cells.push( $.isNumeric( row[i] ) ?
|
514 |
+
'<c t="n"><v>'+row[i]+'</v></c>' :
|
515 |
+
'<c t="inlineStr"><is><t>'+row[i]+'</t></is></c>'
|
516 |
+
);
|
517 |
+
}
|
518 |
+
|
519 |
+
return '<row>'+cells.join('')+'</row>';
|
520 |
+
};
|
521 |
+
|
522 |
+
if ( config.header ) {
|
523 |
+
xml += addRow( data.header );
|
524 |
+
}
|
525 |
+
|
526 |
+
for ( var i=0, ien=data.body.length ; i<ien ; i++ ) {
|
527 |
+
xml += addRow( data.body[i] );
|
528 |
+
}
|
529 |
+
|
530 |
+
if ( config.footer ) {
|
531 |
+
xml += addRow( data.footer );
|
532 |
+
}
|
533 |
+
|
534 |
+
var zip = new window.JSZip();
|
535 |
+
var _rels = zip.folder("_rels");
|
536 |
+
var xl = zip.folder("xl");
|
537 |
+
var xl_rels = zip.folder("xl/_rels");
|
538 |
+
var xl_worksheets = zip.folder("xl/worksheets");
|
539 |
+
|
540 |
+
zip.file( '[Content_Types].xml', excelStrings['[Content_Types].xml'] );
|
541 |
+
_rels.file( '.rels', excelStrings['_rels/.rels'] );
|
542 |
+
xl.file( 'workbook.xml', excelStrings['xl/workbook.xml'] );
|
543 |
+
xl_rels.file( 'workbook.xml.rels', excelStrings['xl/_rels/workbook.xml.rels'] );
|
544 |
+
xl_worksheets.file( 'sheet1.xml', excelStrings['xl/worksheets/sheet1.xml'].replace( '__DATA__', xml ) );
|
545 |
+
|
546 |
+
_saveAs(
|
547 |
+
zip.generate( {type:"blob"} ),
|
548 |
+
_filename( config )
|
549 |
+
);
|
550 |
+
},
|
551 |
+
|
552 |
+
title: '*',
|
553 |
+
|
554 |
+
extension: '.xlsx',
|
555 |
+
|
556 |
+
exportOptions: {},
|
557 |
+
|
558 |
+
header: true,
|
559 |
+
|
560 |
+
footer: false
|
561 |
+
};
|
562 |
+
|
563 |
+
//
|
564 |
+
// PDF export - using pdfMake - http://pdfmake.org
|
565 |
+
//
|
566 |
+
DataTable.ext.buttons.pdfHtml5 = {
|
567 |
+
className: 'buttons-pdf buttons-html5',
|
568 |
+
|
569 |
+
available: function () {
|
570 |
+
return window.FileReader !== undefined && window.pdfMake;
|
571 |
+
},
|
572 |
+
|
573 |
+
text: function ( dt ) {
|
574 |
+
return dt.i18n( 'buttons.pdf', 'PDF' );
|
575 |
+
},
|
576 |
+
|
577 |
+
action: function ( e, dt, button, config ) {
|
578 |
+
var newLine = _newLine( config );
|
579 |
+
var data = dt.buttons.exportData( config.exportOptions );
|
580 |
+
var rows = [];
|
581 |
+
|
582 |
+
if ( config.header ) {
|
583 |
+
rows.push( $.map( data.header, function ( d ) {
|
584 |
+
return {
|
585 |
+
text: d,
|
586 |
+
style: 'tableHeader'
|
587 |
+
};
|
588 |
+
} ) );
|
589 |
+
}
|
590 |
+
|
591 |
+
for ( var i=0, ien=data.body.length ; i<ien ; i++ ) {
|
592 |
+
rows.push( $.map( data.body[i], function ( d ) {
|
593 |
+
return {
|
594 |
+
text: d,
|
595 |
+
style: i % 2 ? 'tableBodyEven' : 'tableBodyOdd'
|
596 |
+
};
|
597 |
+
} ) );
|
598 |
+
}
|
599 |
+
|
600 |
+
if ( config.footer ) {
|
601 |
+
rows.push( $.map( data.footer, function ( d ) {
|
602 |
+
return {
|
603 |
+
text: d,
|
604 |
+
style: 'tableFooter'
|
605 |
+
};
|
606 |
+
} ) );
|
607 |
+
}
|
608 |
+
|
609 |
+
var doc = {
|
610 |
+
pageSize: config.pageSize,
|
611 |
+
pageOrientation: config.orientation,
|
612 |
+
content: [
|
613 |
+
{
|
614 |
+
table: {
|
615 |
+
headerRows: 1,
|
616 |
+
body: rows
|
617 |
+
},
|
618 |
+
layout: 'noBorders'
|
619 |
+
}
|
620 |
+
],
|
621 |
+
styles: {
|
622 |
+
tableHeader: {
|
623 |
+
bold: true,
|
624 |
+
fontSize: 11,
|
625 |
+
color: 'white',
|
626 |
+
fillColor: '#2d4154',
|
627 |
+
alignment: 'center'
|
628 |
+
},
|
629 |
+
tableBodyEven: {},
|
630 |
+
tableBodyOdd: {
|
631 |
+
fillColor: '#f3f3f3'
|
632 |
+
},
|
633 |
+
tableFooter: {
|
634 |
+
bold: true,
|
635 |
+
fontSize: 11,
|
636 |
+
color: 'white',
|
637 |
+
fillColor: '#2d4154'
|
638 |
+
},
|
639 |
+
title: {
|
640 |
+
alignment: 'center',
|
641 |
+
fontSize: 15
|
642 |
+
},
|
643 |
+
message: {}
|
644 |
+
},
|
645 |
+
defaultStyle: {
|
646 |
+
fontSize: 10
|
647 |
+
}
|
648 |
+
};
|
649 |
+
|
650 |
+
if ( config.message ) {
|
651 |
+
doc.content.unshift( {
|
652 |
+
text: config.message,
|
653 |
+
style: 'message',
|
654 |
+
margin: [ 0, 0, 0, 12 ]
|
655 |
+
} );
|
656 |
+
}
|
657 |
+
|
658 |
+
if ( config.title ) {
|
659 |
+
doc.content.unshift( {
|
660 |
+
text: _filename( config, false ),
|
661 |
+
style: 'title',
|
662 |
+
margin: [ 0, 0, 0, 12 ]
|
663 |
+
} );
|
664 |
+
}
|
665 |
+
|
666 |
+
if ( config.customize ) {
|
667 |
+
config.customize( doc );
|
668 |
+
}
|
669 |
+
|
670 |
+
var pdf = window.pdfMake.createPdf( doc );
|
671 |
+
|
672 |
+
if ( config.download === 'open' && ! _isSafari() ) {
|
673 |
+
pdf.open();
|
674 |
+
}
|
675 |
+
else {
|
676 |
+
pdf.getBuffer( function (buffer) {
|
677 |
+
var blob = new Blob( [buffer], {type:'application/pdf'} );
|
678 |
+
|
679 |
+
_saveAs( blob, _filename( config ) );
|
680 |
+
} );
|
681 |
+
}
|
682 |
+
},
|
683 |
+
|
684 |
+
title: '*',
|
685 |
+
|
686 |
+
extension: '.pdf',
|
687 |
+
|
688 |
+
exportOptions: {},
|
689 |
+
|
690 |
+
orientation: 'portrait',
|
691 |
+
|
692 |
+
pageSize: 'A4',
|
693 |
+
|
694 |
+
header: true,
|
695 |
+
|
696 |
+
footer: false,
|
697 |
+
|
698 |
+
message: null,
|
699 |
+
|
700 |
+
customize: null,
|
701 |
+
|
702 |
+
download: 'download'
|
703 |
+
};
|
704 |
+
|
705 |
+
|
706 |
+
})(jQuery, jQuery.fn.dataTable);
|
includes/ssp.class.php
CHANGED
@@ -617,7 +617,8 @@ class SSP {
|
|
617 |
foreach ($columns as $column) {
|
618 |
if (strpos($column['db'], "CONCAT") !== false) {
|
619 |
$col_name = explode("as ", $column['db']);
|
620 |
-
$
|
|
|
621 |
} else {
|
622 |
$searchCols[] = array("db" => $column['db'], "dt" => $column['dt']);
|
623 |
}
|
617 |
foreach ($columns as $column) {
|
618 |
if (strpos($column['db'], "CONCAT") !== false) {
|
619 |
$col_name = explode("as ", $column['db']);
|
620 |
+
$nimblecolname = isset($col_name[1]) ? $col_name[1] : null;
|
621 |
+
$searchCols[] = array("db" => $nimblecolname, "dt" => $column['dt']);
|
622 |
} else {
|
623 |
$searchCols[] = array("db" => $column['db'], "dt" => $column['dt']);
|
624 |
}
|
save-contact-form-7.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
Description: A simple plugin to save contact form data to db.
|
7 |
Author: Nimblechapps
|
8 |
Author URI: http://nimblechapps.com
|
9 |
-
Version: 1.
|
10 |
*/
|
11 |
//function to check dependencies for Contact Form 7 Plugin
|
12 |
|
@@ -321,11 +321,12 @@ if (is_admin()) {
|
|
321 |
$dt_columnslist = "";
|
322 |
$dt_columnslistCount = 0;
|
323 |
$table = "SaveContactForm7_" . $id;
|
|
|
324 |
$db_fields = nimble_getFields($table, $export, true);
|
325 |
$nimble_date_options = get_option('nimble_scf7_display_created_date');
|
|
|
326 |
|
327 |
if (!empty($db_fields)) {
|
328 |
-
|
329 |
if($nimble_date_options != "")
|
330 |
{
|
331 |
$i=0;
|
@@ -377,7 +378,7 @@ if (is_admin()) {
|
|
377 |
$dt_header .= '</tr></thead></table></div>';
|
378 |
$data['dt_header'] = $dt_header;
|
379 |
$data['dt_columnslist'] = rtrim($dt_columnslist, ",");
|
380 |
-
$data['dt_column_target'] =
|
381 |
echo json_encode($data);
|
382 |
wp_die();
|
383 |
}
|
@@ -392,6 +393,7 @@ if (is_admin()) {
|
|
392 |
if (!function_exists("nimble_populate_datatable")) {
|
393 |
|
394 |
function nimble_populate_datatable() {
|
|
|
395 |
if (isset($_REQUEST['exportbutton'])) {
|
396 |
$export = $_REQUEST['exportbutton'];
|
397 |
}
|
@@ -443,6 +445,8 @@ if (is_admin()) {
|
|
443 |
} else {
|
444 |
$search = '';
|
445 |
}
|
|
|
|
|
446 |
if (isset($_REQUEST['column']) && $_REQUEST['column'] != '') {
|
447 |
$columnorder = $_REQUEST['column'];
|
448 |
$ordertype = $_REQUEST['ordertype'];
|
@@ -885,12 +889,14 @@ if (!function_exists("nimble_save_cf7_data")) {
|
|
885 |
//insert image into plugin upload directory into wp-content/uploads... directory
|
886 |
$id = $wpdb->insert_id; // last inserted row id from databasr table
|
887 |
$fieldname = key($submited['uploaded_files']); // form input file field name
|
888 |
-
if ($plugin_data['contact-form-7/wp-contact-form-7.php']['Version'] == "3.1" || $plugin_data['contact-form-7/wp-contact-form-7.php']['Version'] == "3.1.1") {
|
889 |
-
$uploaded_file_info = pathinfo(implode("/", $fname)); //uploaded file info like basename,extension etc
|
890 |
-
} else {
|
891 |
-
$uploaded_file_info = pathinfo($submited['posted_data'][$fieldname]); //uploaded file info like basename,extension etc
|
892 |
-
}
|
893 |
if ($fieldname != "") {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
894 |
if (!file_exists($nimble_dir_pah['basedir'] . "/nimble_uploads")) {
|
895 |
mkdir($nimble_dir_pah['basedir'] . "/nimble_uploads", 0777);
|
896 |
$filepath = array_values($submited['uploaded_files']); // source location of the file
|
6 |
Description: A simple plugin to save contact form data to db.
|
7 |
Author: Nimblechapps
|
8 |
Author URI: http://nimblechapps.com
|
9 |
+
Version: 1.5
|
10 |
*/
|
11 |
//function to check dependencies for Contact Form 7 Plugin
|
12 |
|
321 |
$dt_columnslist = "";
|
322 |
$dt_columnslistCount = 0;
|
323 |
$table = "SaveContactForm7_" . $id;
|
324 |
+
$export = "";
|
325 |
$db_fields = nimble_getFields($table, $export, true);
|
326 |
$nimble_date_options = get_option('nimble_scf7_display_created_date');
|
327 |
+
|
328 |
|
329 |
if (!empty($db_fields)) {
|
|
|
330 |
if($nimble_date_options != "")
|
331 |
{
|
332 |
$i=0;
|
378 |
$dt_header .= '</tr></thead></table></div>';
|
379 |
$data['dt_header'] = $dt_header;
|
380 |
$data['dt_columnslist'] = rtrim($dt_columnslist, ",");
|
381 |
+
$data['dt_column_target'] = @$dt_column_target;
|
382 |
echo json_encode($data);
|
383 |
wp_die();
|
384 |
}
|
393 |
if (!function_exists("nimble_populate_datatable")) {
|
394 |
|
395 |
function nimble_populate_datatable() {
|
396 |
+
$export ="";
|
397 |
if (isset($_REQUEST['exportbutton'])) {
|
398 |
$export = $_REQUEST['exportbutton'];
|
399 |
}
|
445 |
} else {
|
446 |
$search = '';
|
447 |
}
|
448 |
+
$ordertype ="";
|
449 |
+
$join="";
|
450 |
if (isset($_REQUEST['column']) && $_REQUEST['column'] != '') {
|
451 |
$columnorder = $_REQUEST['column'];
|
452 |
$ordertype = $_REQUEST['ordertype'];
|
889 |
//insert image into plugin upload directory into wp-content/uploads... directory
|
890 |
$id = $wpdb->insert_id; // last inserted row id from databasr table
|
891 |
$fieldname = key($submited['uploaded_files']); // form input file field name
|
|
|
|
|
|
|
|
|
|
|
892 |
if ($fieldname != "") {
|
893 |
+
if ($plugin_data['contact-form-7/wp-contact-form-7.php']['Version'] == "3.1" || $plugin_data['contact-form-7/wp-contact-form-7.php']['Version'] == "3.1.1") {
|
894 |
+
$uploaded_file_info = pathinfo(implode("/", $fname)); //uploaded file info like basename,extension etc
|
895 |
+
} else {
|
896 |
+
|
897 |
+
$uploaded_file_info = pathinfo($submited['posted_data'][$fieldname]); //uploaded file info like basename,extension etc
|
898 |
+
|
899 |
+
}
|
900 |
if (!file_exists($nimble_dir_pah['basedir'] . "/nimble_uploads")) {
|
901 |
mkdir($nimble_dir_pah['basedir'] . "/nimble_uploads", 0777);
|
902 |
$filepath = array_values($submited['uploaded_files']); // source location of the file
|