Version Description
Download this release
Release Info
Developer | smackcoders |
Plugin | Ultimate CSV Importer |
Version | 3.8.5 |
Comparing to | |
See all releases |
Code changes from version 3.8.4 to 3.8.5
- README.md +0 -641
- Readme.txt +361 -208
- css/jquery-ui.css +9 -12
- css/style.css +29 -1
- images/Importicon_24.png +0 -0
- images/facebook.png +0 -0
- images/googleplus.png +0 -0
- images/icon.png +0 -0
- images/linkedin.png +0 -0
- images/twitter.png +0 -0
- includes/WPImporter_includes_helper.php +101 -13
- index.php +16 -34
- js/dashchart-widget.js +9 -9
- js/dashchart.js +2 -2
- js/exporting.js +0 -243
- js/highcharts-3d.js +0 -565
- js/highcharts.js +0 -4918
- js/ultimate-importer-free.js +103 -780
- js/ultimate-importer-pro.js +0 -703
- lib/skinnymvc/controller/base/SkinnyBaseController.php +1 -5
- modules/categories/actions/actions.php +0 -58
- modules/categories/templates/index.php +0 -39
- modules/comments/actions/actions.php +0 -356
- modules/comments/templates/index.php +0 -510
- modules/custompost/templates/index.php +23 -96
- modules/customtaxonomy/actions/actions.php +0 -58
- modules/customtaxonomy/templates/index.php +0 -40
- modules/dashboard/actions/actions.php +19 -192
- modules/dashboard/actions/chartone.php +2 -2
- modules/eshop/actions/actions.php +7 -8
- modules/eshop/templates/index.php +18 -76
- modules/export/templates/export_old.php +0 -1400
- modules/export/templates/index.php +1 -1
- modules/old_export/actions/actions.php +0 -1428
- modules/old_export/templates/export.php +0 -663
- modules/old_export/templates/index.php +0 -225
- modules/page/templates/index.php +18 -58
- modules/post/templates/index.php +19 -78
- modules/settings/actions/actions.php +25 -574
- modules/settings/templates/index.php +113 -1253
- modules/users/actions/actions.php +1 -1
- modules/users/templates/index.php +8 -43
- modules/woocommerce/actions/actions.php +0 -58
- modules/woocommerce/templates/index.php +0 -39
- modules/wpcommerce/actions/actions.php +0 -58
- modules/wpcommerce/templates/index.php +0 -39
- plugins/README +0 -8
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
- screenshot-7.png +0 -0
- screenshot-8.png +0 -0
- templates/Addcustomfields.php +2 -2
- templates/UploadHandler.php +0 -37
- templates/import.php +16 -10
- templates/menu.php +15 -10
- templates/savetemplate.php +0 -55
- templates/uploader.php +0 -36
- templates/versioncheck.php +0 -78
README.md
DELETED
@@ -1,641 +0,0 @@
|
|
1 |
-
## Import CSV with Ultimate CSV Importer ##
|
2 |
-
**Contributors:** smackcoders
|
3 |
-
|
4 |
-
**Donate link:** http://www.smackcoders.com/donate.html
|
5 |
-
|
6 |
-
**Tags:** admin, administration, author, automatic, blog, categories, category, cms, contact, content, custom, custom post, dashboard, database, e-commerce, ecommerce, edit, event, events, feed, Formatting, free, gallery, image, images, import, integration, language, link, links, list, marketing, media, menu, meta, mobile, multisite, navigation, News, page, pages, performance, photo, photos, picture, pictures, plugin, plugins, Post, posts, profile, registration, rss, seo, Share, sharing, shop, shortcode, shortcodes, statistics, stats, store, tag, tags, Taxonomy, template, text, thumbnail, thumbnails, title, upload, url, user, users, video, woocommerce, wordpress, wpmu, xml, youtube.
|
7 |
-
|
8 |
-
**Requires at least:** 4.2
|
9 |
-
|
10 |
-
**Tested up to:** 4.3.1
|
11 |
-
|
12 |
-
**Stable tag:** 3.8.3
|
13 |
-
|
14 |
-
**Version:** 3.8.3
|
15 |
-
|
16 |
-
**Author:** smackcoders
|
17 |
-
|
18 |
-
**Author URI:** http://profiles.wordpress.org/smackcoders/
|
19 |
-
|
20 |
-
**License:** GPLv2 or later
|
21 |
-
|
22 |
-
Import CSV with CSV Importer made simple to import & export posts, pages, custom posts and custom fields in few simple clicks
|
23 |
-
|
24 |
-
#### Description ####
|
25 |
-
|
26 |
-
Import CSV data to WordPress is made very easy even for novice users as in few clicks and 3 simple steps with CSV Importer plugin.
|
27 |
-
|
28 |
-
Now csv importer supports multi language and almost every WordPress modules and plugin fields as follows. Import data feed periodically from csv file as
|
29 |
-
|
30 |
-
#### Supported Core Modules and Attributes ####
|
31 |
-
* Post
|
32 |
-
* Page
|
33 |
-
* Featured image support
|
34 |
-
* Post inline image handling
|
35 |
-
* Standard WP Custom Post types
|
36 |
-
* WordPress themes custom posts
|
37 |
-
* Custom post type UI plugin Post types
|
38 |
-
* Users with roles
|
39 |
-
* Comments
|
40 |
-
* Custom Fields
|
41 |
-
* Author
|
42 |
-
* Tags import and multi tag for each post import
|
43 |
-
* Categories import and multi category for each post
|
44 |
-
* Eshop
|
45 |
-
* All-in-one SEO
|
46 |
-
|
47 |
-
#### Highlights of 3.8 ####
|
48 |
-
* Multilanguage support (fr_FR,es_ES,nl_NL)
|
49 |
-
* Inline image handling shortcode with image attributes Example:[WPIMPINLINE:greensroad.jpg|width='150'|height='80'|alt='post_title_redtree']
|
50 |
-
* Fixed user reported Warnings and Bugs
|
51 |
-
* Any delimiter support for csv export
|
52 |
-
|
53 |
-
Note: Now you can import no. of images in in-line post content as image shortcodes using advanced media handling option as zip files.
|
54 |
-
|
55 |
-
#### CSV Importer ####
|
56 |
-
|
57 |
-
WP Ultimate CSV Importer Plugin proven much effective advanced CSV Importer With Ultimate User Friendly Features. It is much easy now even for newbies to import csv file exported from any tool, app or software. Import as any WordPress post type and associated fields by simple mapping feature. Now import any CSV file as thousands of post, page and custom post types. This is admin side free plugin helps you in bulk edit, create and import posts type for your blog or site.
|
58 |
-
|
59 |
-
It is more easy to import csv database maintained in Excel xls or spread sheets into valuable content for your web site without missing any. It is possible now to schedule a import csv periodically for content update, maintenance, prices, offers, coupons and inventory etc.
|
60 |
-
|
61 |
-
Much improved User interface with most flexible jquery plugin features and bootstrap UI design makes csv import more simple, easy, fast and even more flexible for better user experience. With improved Multi site, buddy press compatibility (except user import module) works well for most of the best WordPress themes available online. Now manage multi site & buddy press, Amazon data import, affiliates blog, product inventory, ecommerce store, multi author blog, automatic news import, photo blog etc periodically with simple click import.
|
62 |
-
|
63 |
-
#### Helpful Links ####
|
64 |
-
|
65 |
-
[Get More Details Here>>](https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
66 |
-
|
67 |
-
[Test Drive Our Live Demo](http://demo.smackcoders.com/demowpthree/wp-admin/admin.php?page=wp-ultimate-csv-importer-pro/index.php&__module=dashboard?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
68 |
-
|
69 |
-
[Get Started Sample CSV Files](https://www.smackcoders.com/blog/wordpress-ultimate-csv-importer-csv-sample-files-and-updates.html?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
70 |
-
|
71 |
-
[Documentation and Tutorial for CSV Importer ](https://www.smackcoders.com/documentation/ultimate-csv-importer-pro?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
72 |
-
|
73 |
-
|
74 |
-
#### Video Walkthrough ####
|
75 |
-
[![Demo CountPages alpha](https://i.ytimg.com/vi/Guv5zR7fgW0/sddefault.jpg)](https://www.youtube.com/watch?v=Guv5zR7fgW0&list=PL2k3Ck1bFtbQqFhOK7g08kxENI4qQkmC)
|
76 |
-
|
77 |
-
#### Highlights ####
|
78 |
-
* import csv from any source as WordPress posts
|
79 |
-
* New Terminate & Continue feature is added.
|
80 |
-
* Complete export feature with improved filters
|
81 |
-
* Import external/internal images in line to any posts
|
82 |
-
* Upload images related to each csv
|
83 |
-
* Auto delimiter
|
84 |
-
* Auto UTF-8 handling
|
85 |
-
* All-in-SEO import support.
|
86 |
-
* Drag drop import
|
87 |
-
* Define any type of post
|
88 |
-
* Control post status (Publish, Private, Pending, Draft, Sticky and Protected)
|
89 |
-
* Simple yet Powerful mapping feature
|
90 |
-
* Convert any csv import as perfect posts and fields
|
91 |
-
* Scheduled Publishing
|
92 |
-
* Duplicate Title and content handling
|
93 |
-
* Multi Lingual import (CSV format must be UTF-8 without BOM)
|
94 |
-
* Multi-site also supported now
|
95 |
-
* Compatible to WordPress themes
|
96 |
-
* Better alternative for xml
|
97 |
-
* Post Format option added
|
98 |
-
* Page template attribute feature
|
99 |
-
* EShop Products import (included from V3.6.3)
|
100 |
-
|
101 |
-
#### Power Import Features to Control your csv import ####
|
102 |
-
* Post title, content and even excerpt
|
103 |
-
* Text, WYSIWYG/HTML, in line CSS in post content
|
104 |
-
* Images, Youtube, Videos in post content
|
105 |
-
* Featured image by Url
|
106 |
-
* Multi authors
|
107 |
-
* Multiple tags and categories
|
108 |
-
* Non existing tags and categories are created automatically
|
109 |
-
* Any Short Codes in post content
|
110 |
-
* Assign sidebar widget, slider, slide show as short codes
|
111 |
-
* Manual slug feature for SEO friendly urls
|
112 |
-
* Different post status for each post in CSV file.
|
113 |
-
* Custom fields support for WP standard
|
114 |
-
* Map custom fields by adding new on the fly.
|
115 |
-
|
116 |
-
#### Imp. Notes ####
|
117 |
-
* All CSV files should be should be strictly UTF-8 CSV format. Now this can be handled by plugin.
|
118 |
-
* All WordPress supported languages can imported with csv format as UTF-8 without BOM (See FAQ for instructions).
|
119 |
-
* User import option is disabled for multi site mode.
|
120 |
-
* To Schedule posts for publishing provide future date and time in date column in CSV File.
|
121 |
-
|
122 |
-
#### Featured Image Support ####
|
123 |
-
Your WordPress theme should support featured image. If not, please add the following code to where you need to display. E.g)wp-contents/themes/header.php
|
124 |
-
|
125 |
-
`<?php add_theme_support( 'post-thumbnails' ); ?>`
|
126 |
-
|
127 |
-
#### Pro Features ####
|
128 |
-
* Advanced Features
|
129 |
-
* Multi language Support
|
130 |
-
* Woocommerce Support with woocommerce_products, woocommerce_variations, woocommerce_refunds, woocommerce_orders, woocommerce_coupons
|
131 |
-
* Market press
|
132 |
-
* ACF, TYPES, PODS, CCTM Custom Fields
|
133 |
-
* Advanced Export with Delimiter and Filters
|
134 |
-
* Advanced Media Handling
|
135 |
-
* Schedule Imports
|
136 |
-
* Dashboard, CSV Manager and Custom Mapping Templates
|
137 |
-
* DB Optimizer, System status etc.
|
138 |
-
|
139 |
-
Compare Free Vs Pro [Features](https://www.wpultimatecsvimporter.com/wp-ultimate-csv-importer-plugin?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)>>
|
140 |
-
Learn More from [User Manual](https://www.wpultimatecsvimporter.com/documentation?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)>>
|
141 |
-
|
142 |
-
|
143 |
-
#### Common Issues ####
|
144 |
-
|
145 |
-
How to solve auto_prepend_file and auto_append_file error?
|
146 |
-
|
147 |
-
Check your phpinfo.php. Ensure that auto_prepend_file and auto_append_file options are disabled. If not you can disable it in php.ini settings file your self. You can also do it by a .htaccess file
|
148 |
-
|
149 |
-
Create an .htaccess file in root and set the following values.
|
150 |
-
php_value auto_prepend_file none
|
151 |
-
php_value auto_append_file none
|
152 |
-
|
153 |
-
This will solve your issue or get support from hosting if you dint have sufficient permission.
|
154 |
-
|
155 |
-
Also you can follow the instructions as given here
|
156 |
-
|
157 |
-
* [http://codex.wordpress.org/Function_Reference/the_post_thumbnail](http://codex.wordpress.org/Function_Reference/the_post_thumbnail)
|
158 |
-
* [http://codex.wordpress.org/Post_Thumbnails](http://codex.wordpress.org/Post_Thumbnails)
|
159 |
-
* [http://wordpress.org/support/topic/featured-image-not-showing-7?replies=5](http://wordpress.org/support/topic/featured-image-not-showing-7?replies=5)
|
160 |
-
|
161 |
-
|
162 |
-
#### Extended Pro Power Features in WP Ultimate CSV Importer ####
|
163 |
-
* Types Plugin support
|
164 |
-
* Woocommerce CSV importer with product variation
|
165 |
-
* Marketpress Lite Importer
|
166 |
-
* WP Members Importer
|
167 |
-
* WP Customer Reviews Importer
|
168 |
-
* Auto Schedule all your Imports
|
169 |
-
* Save mapping as Templates for reuse
|
170 |
-
* Auto Mapping Feature
|
171 |
-
* Strict UTF-8 auto conversion
|
172 |
-
* All In One SEO Fields Import
|
173 |
-
* WordPress SEO by Yoast Fields Import
|
174 |
-
* Custom Post Type UI plugin import
|
175 |
-
* Advanced Custom Fields Import
|
176 |
-
* CCTM Posts and Fields Import
|
177 |
-
* Woocommerce CSV Importer,
|
178 |
-
* WP ecommerce Products CSV Importer with WP e-Commerce Custom Fields
|
179 |
-
* Categories & tags Import with Category icons plugin support
|
180 |
-
* Custom Taxonomy import
|
181 |
-
|
182 |
-
#### And we thank @respectyoda, @alantygel and @James Golovich for their wonderful support to us. ####
|
183 |
-
|
184 |
-
#### Installation ####
|
185 |
-
|
186 |
-
* [Step By Step Installation with Snaps](https://www.wpultimatecsvimporter.com/documentation/all-import/user-guide/simple-step-by-step-user-guide/?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
187 |
-
|
188 |
-
|
189 |
-
#### Screenshots ####
|
190 |
-
|
191 |
-
1. New Interactive Dashboard with Chart and Graph
|
192 |
-
2. Advanced CSV Importer With Ultimate User Friendly Features with drag and drop etc.
|
193 |
-
3. User friendly easy mapping for any csv file data to WordPress field attributes with sampling.
|
194 |
-
4. Advanced duplicate post name and content check with server request control for high performance factor.
|
195 |
-
5. Detailed real time log to know pinpoint status.
|
196 |
-
6. Module based environment for easy and reduced interface to enable most required modules and when ever needed.
|
197 |
-
7. Inbuilt support form for easy feedback, support, feature request with all useful links for easy and better csv import.
|
198 |
-
8. New export module for posts, page, eshop, users, comments and all custom posts type plugins.
|
199 |
-
|
200 |
-
|
201 |
-
#### Frequently Asked Questions ####
|
202 |
-
|
203 |
-
How to solve auto_prepend_file and auto_append_file error?
|
204 |
-
|
205 |
-
Check your phpinfo.php. Ensure that auto_prepend_file and auto_append_file options are disabled. If not you can disable it in php.ini settings file your self. You can also do it by a .htaccess file
|
206 |
-
|
207 |
-
Create an .htaccess file in root and set the following values.
|
208 |
-
php_value auto_prepend_file none
|
209 |
-
php_value auto_append_file none
|
210 |
-
|
211 |
-
This will solve your issue or get support from hosting if you dint have sufficient permission.
|
212 |
-
|
213 |
-
[Click Here for More Details](https://www.wpultimatecsvimporter.com/documentation/all-import/user-guide/simple-step-by-step-user-guide/?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
214 |
-
|
215 |
-
#### Changelog ####
|
216 |
-
|
217 |
-
**3.8.3**
|
218 |
-
* Fixed : Text domain is added for language translation system.
|
219 |
-
* Fixed : Bugs fixed for detecting duplicate post content and title option.
|
220 |
-
|
221 |
-
**3.8.2**
|
222 |
-
* Fixed : Wordpress 4.3.1 compatibility added.
|
223 |
-
* Fixed : Dashboard entry issue fix.
|
224 |
-
* Fixed : Featured image filename with empty space import issue fix.
|
225 |
-
* Fixed : Duplicate featured images on import fixed.
|
226 |
-
* Fixed : Core custom Field mapping group added
|
227 |
-
|
228 |
-
**3.8.1**
|
229 |
-
* Fixed : WordPress 4.2.3 and 4.2.4 compatibility checked.
|
230 |
-
* Fixed : Fixed the unwanted warnings in all files.
|
231 |
-
* Fixed : XSS vulnerability.
|
232 |
-
* Fixed : Removed the ../../../../../../wp-load.php and used the wordpress ajax call.
|
233 |
-
* Fixed : Removed the wp-content that are directly used in some files.
|
234 |
-
* Added : Checked the ABSPATH in each file.
|
235 |
-
* Added : Comments are exported by specific date and author option.
|
236 |
-
|
237 |
-
**3.8**
|
238 |
-
* Multilanguage support (fr_FR,es_ES,nl_NL)
|
239 |
-
* Inline image handling shortcode with image attributes
|
240 |
-
* Warnings and bugs Fixes
|
241 |
-
* Any delimiter support for csv export
|
242 |
-
|
243 |
-
**3.7.4**
|
244 |
-
* Fixed : Allow Editor/Author to import.(Multisite also).
|
245 |
-
* Added : WordPress 4.2.2 compatibility.
|
246 |
-
|
247 |
-
**3.7.3**
|
248 |
-
* Fixed: Vulnerablility security issue fix.
|
249 |
-
|
250 |
-
**3.7.2**
|
251 |
-
* Added: WordPress 4.2 and 4.2.1 compatibility.
|
252 |
-
* Fixed: Blank page conflict issue
|
253 |
-
|
254 |
-
**3.7.1**
|
255 |
-
* Added: Security fix for curl.
|
256 |
-
* Added: Security fix for session status.
|
257 |
-
|
258 |
-
**3.7**
|
259 |
-
* Fixed: Featured image hotlink issue.
|
260 |
-
|
261 |
-
**3.6.78**
|
262 |
-
* Added: Hot security fix in readfile.php. ( Thanks - @James Golovich )
|
263 |
-
|
264 |
-
**3.6.77**
|
265 |
-
* Added: WordPress 4.1.1 compatibility checked.
|
266 |
-
* Improved: Inline image import feature. Added recursive method to assign the image.
|
267 |
-
* Fixed: Featured image naming issue. [Solved](https://wordpress.org/support/topic/problem-in-import-with-the-image-name)
|
268 |
-
* Fixed: Removed unwanted warnings.
|
269 |
-
|
270 |
-
**3.6.76**
|
271 |
-
* Improved: Post Format.
|
272 |
-
* Fixed: Export eshop data issue.
|
273 |
-
* Fixed: Import with image name issue.
|
274 |
-
* Fixed: Groups plugin conflict.
|
275 |
-
|
276 |
-
**3.6.75**
|
277 |
-
* Added: Terminate & Continue option in import section.
|
278 |
-
* Improved: Log section. Issue fixed in Web View & Admin View.
|
279 |
-
* Fixed: Security fix for export module.
|
280 |
-
|
281 |
-
**3.6.74**
|
282 |
-
* Added: Security fix.
|
283 |
-
|
284 |
-
**3.6.73**
|
285 |
-
* Added: WordPress 4.0 compatibility checked.
|
286 |
-
* Added: https format support for all WP instances.
|
287 |
-
* Added: Warning to guide user to create uploads directory with writeable permissions.
|
288 |
-
* Fixed: Image handling issues in featured image.
|
289 |
-
* Fixed: Multisite compatible issue.
|
290 |
-
* Removed: Post Content field mandatory option.
|
291 |
-
* Removed: All console warnings.
|
292 |
-
* Improved: Details added in security and performance tab under settings module.
|
293 |
-
|
294 |
-
**3.6.72**
|
295 |
-
* Added: Debug mode enable/disable options.
|
296 |
-
* Modified: Menu order changes.
|
297 |
-
|
298 |
-
**3.6.71**
|
299 |
-
* Minor bug fixed
|
300 |
-
|
301 |
-
**3.6.7**
|
302 |
-
* Added: Export features for all missing modules.
|
303 |
-
* Fixed: All console warnings and reported logs.
|
304 |
-
|
305 |
-
**3.6.6**
|
306 |
-
* Dashboard chart issue fixed for multi site.
|
307 |
-
* UI improvements along with easy usability.
|
308 |
-
* Fixed Groups plugin conflicts
|
309 |
-
|
310 |
-
**3.6.5**
|
311 |
-
* Added in line image support with advance media handling
|
312 |
-
* PDO check added
|
313 |
-
|
314 |
-
**3.6.4**
|
315 |
-
* Added: Advanced export features with filter options.
|
316 |
-
* Improved: Advanced log section.
|
317 |
-
* Fixed reported jquery issues.
|
318 |
-
* WordPress 4.0 compatibility checked.
|
319 |
-
|
320 |
-
**3.6.3**
|
321 |
-
* Added: Eshop import support.
|
322 |
-
* Fixed reported conflicts with other plugins.
|
323 |
-
* WordPress 3.9.2 compatibility checked.
|
324 |
-
|
325 |
-
**3.6.2**
|
326 |
-
* Hot security fix added.
|
327 |
-
|
328 |
-
**3.6.1**
|
329 |
-
* Multi-site support issue fixed
|
330 |
-
* Duplicate import issue fixed
|
331 |
-
* Security issue fixed
|
332 |
-
|
333 |
-
**3.6**
|
334 |
-
* New interactive graphs and charts in plugin dashboard
|
335 |
-
* New Admin dashboard widgets
|
336 |
-
* Added Users and comments export feature
|
337 |
-
* Auto delimiter handling
|
338 |
-
* Auto mapping feature
|
339 |
-
* Now allow authors to access import features
|
340 |
-
|
341 |
-
**3.5.5**
|
342 |
-
* post_format attribute support added
|
343 |
-
* page_template attribute added
|
344 |
-
* update_post_meta added for duplicate meta issue (Thanks to @alantygel)
|
345 |
-
* Type error issue in jQuery fixed
|
346 |
-
|
347 |
-
**3.5.4**
|
348 |
-
* Added: All-in-SEO import support.
|
349 |
-
* WordPress 3.9.1 compatibility added.
|
350 |
-
|
351 |
-
**3.5.3**
|
352 |
-
* Added: Compatible up to WordPress 3.9.
|
353 |
-
* Added: Export feature added for posts, page, custom posts type plugins.
|
354 |
-
* Improved: Removed all warnings.
|
355 |
-
* Fixed reported bugs
|
356 |
-
|
357 |
-
**3.5.2**
|
358 |
-
* Import posts with author names as numerical apart from User ID
|
359 |
-
* Added menu_order attribute import
|
360 |
-
* Added Auto image rename option
|
361 |
-
* Option to cancel an partial import at middle
|
362 |
-
* Improved image handling even special characters in Url
|
363 |
-
* Import can handle image urls without any extensions
|
364 |
-
* User reported bugs fixed
|
365 |
-
|
366 |
-
**3.5.1**
|
367 |
-
* User reported issue fixes
|
368 |
-
* Activation and other plugin conflict issue solved like Jet pack
|
369 |
-
* Admin UI freezing issues - screen option, Help links issues fixed.
|
370 |
-
* WYSIWIG editor UI issue fixed.
|
371 |
-
|
372 |
-
**3.5.0**
|
373 |
-
* Combined major release version of 3.5 and 3.4
|
374 |
-
* Improved MVC structure.
|
375 |
-
* Improved User interface with drag and drop feature.
|
376 |
-
* Improved: WordPress 3.8.1 compatibility added.
|
377 |
-
* Module based system allows simplify UI
|
378 |
-
* Added: Detailed log feature added.
|
379 |
-
* Added: Support and Useful links added.
|
380 |
-
* Added: Support made easy now from plugin.
|
381 |
-
|
382 |
-
**3.3.1**
|
383 |
-
* Added: Multi site compatibility except User import.
|
384 |
-
* Added: Comments, Users modules mandatory fields validation added.
|
385 |
-
* Improved: Removed unwanted warnings.
|
386 |
-
|
387 |
-
**3.3.0**
|
388 |
-
* Added: WordPress 3.8 compatibility.
|
389 |
-
* Added: Bulk users with role import feature.
|
390 |
-
* Added: Comments import feature with relevant post ids.
|
391 |
-
|
392 |
-
**3.2.3**
|
393 |
-
* Added: WordPress 3.7.1 compatibility added.
|
394 |
-
* Added: Different media path support added.
|
395 |
-
* Added: Sub folder installations support added.
|
396 |
-
* Improved: Updated plugin directory path.
|
397 |
-
* Improved: Removed unwanted warnings.
|
398 |
-
* Improved: Performance check.
|
399 |
-
|
400 |
-
**3.2.2**
|
401 |
-
* Added: WordPress 3.6.1 compatibility added.
|
402 |
-
* Added: Mapping UI improved with on select dynamic update feature
|
403 |
-
* Added: Help content added
|
404 |
-
* Fixed: Post slug issue fixed and tested for 3.6 and 3.6.1
|
405 |
-
|
406 |
-
**3.2.1**
|
407 |
-
* Improved: Performance improvements on SQL and CSV parsing
|
408 |
-
* Fixed: Plugin deactivation issue fixed and updated the code.
|
409 |
-
* Fixed: Links in the cells makes problems with the "quote"
|
410 |
-
* Fixed: Loading content from more than one column
|
411 |
-
* Fixed: Custom Post type issues fixed
|
412 |
-
|
413 |
-
**3.2.0**
|
414 |
-
* Improved: User interface improvements
|
415 |
-
* Improved:WordPress 3.6 compatibility added, Much Improved UI.
|
416 |
-
* Fixed: Featured image issues fixed for WordPress-3.6.
|
417 |
-
|
418 |
-
**3.1.0**
|
419 |
-
* Improved: Much Improved Featured Image feature
|
420 |
-
* Fixed: Image url for featured image issues fixed
|
421 |
-
* Fixed: PHP 5.4 upgrade fix
|
422 |
-
|
423 |
-
**3.0.0**
|
424 |
-
* Added: Category in numericals are restricted and skipped to Uncategorized
|
425 |
-
* Added: Now password should be mentioned as {password}
|
426 |
-
* Added: Post authors can be User ID or name
|
427 |
-
* Improved: Much improved work flow
|
428 |
-
* Improved: Add custom field option improved.
|
429 |
-
* Improved: Date format handling improved
|
430 |
-
* Improved: Any Date format is supported now
|
431 |
-
* Improved: Future scheduling and status improved
|
432 |
-
* Improved: Can apply post status for individual post via csv itself
|
433 |
-
* Improved: Featured image handling improved and fixed. More improvement are scheduled.
|
434 |
-
* Improved: Duplicate check options improved for both title and content option.
|
435 |
-
* Improved: Post author issue fixed and improved
|
436 |
-
* Improved: Wrong user id or name are automatically assigned under admin
|
437 |
-
* Improved: Multi category and tags improved
|
438 |
-
* Fixed: Custom Field mapping and import fixed
|
439 |
-
* Fixed: Overall Status option improved and issue fixed
|
440 |
-
* Fixed: Password field fixed for Protected
|
441 |
-
* Fixed: Status as in CSV option improved and fixed
|
442 |
-
|
443 |
-
**2.7.0**
|
444 |
-
* Added: Added more post status options
|
445 |
-
* Added: Publish, Sticky, Private, Draft and Pending Status for whole import
|
446 |
-
* Added: Protected status with a common password option added
|
447 |
-
* Added: "Status as in CSV" to assign status for individual post through CSV as ID or Field Tag
|
448 |
-
* Added: User ID and User Name support for Post author feature added
|
449 |
-
* Added: In case of missing or false IDs post assigned to admin as draft
|
450 |
-
* Added: Add Custom Field Text box auto-filled with CSV header tag.
|
451 |
-
* Added: Duplicate detection for post content and post title added as options.
|
452 |
-
* Added: User can choose either one or both to avoid duplicate issues.
|
453 |
-
* Improved: 6 Standard date format added as drop down to choose.
|
454 |
-
* Improved: Renamed post_name as post_slug to avoid confusion
|
455 |
-
* Improved: Mapping Fields
|
456 |
-
* Improved: Field tags are formatted to support auto mapping option (next milestone)
|
457 |
-
* Improved: Listed custom fields with prefix as CF: Name for easy identification.
|
458 |
-
* Fixed: Date format conflict at import fixed.
|
459 |
-
|
460 |
-
**2.6.0**
|
461 |
-
* Fixed: Major Bug fixed
|
462 |
-
* Fixed: Added UTF-8 support.
|
463 |
-
* Fixed: Fixed Html tag conflicts.
|
464 |
-
|
465 |
-
**2.5.0**
|
466 |
-
* Major issues fixed and updated to WordPress-3.5.1 compatibility.
|
467 |
-
|
468 |
-
**2.0.1**
|
469 |
-
* Update to WordPress-3.5 compatibility.
|
470 |
-
|
471 |
-
**2.0.0**
|
472 |
-
* WPDEBUG errors fixed. CSV import folder changed to WP native uploads folder.
|
473 |
-
|
474 |
-
**1.1.1**
|
475 |
-
* Renamed the mapping field attachment as featured_image and category as post_category.
|
476 |
-
|
477 |
-
**1.1.0**
|
478 |
-
* Added featured image import feature along with post/page/custom post.
|
479 |
-
|
480 |
-
**1.0.2**
|
481 |
-
* Bug fixed to recognize the trimmed trailing space in the CSV file
|
482 |
-
* Added validation for the duplicate field mapping.
|
483 |
-
|
484 |
-
**1.0.1**
|
485 |
-
* Added features to import multiple tags and categories with different delimiters.
|
486 |
-
|
487 |
-
**1.0.0**
|
488 |
-
* Initial release version. Tested and found works well without any issues.
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
#### Upgrade Notice ####
|
493 |
-
|
494 |
-
**3.8.3**
|
495 |
-
* Upgrade now for improvements in multi language translation.
|
496 |
-
|
497 |
-
**3.8.2**
|
498 |
-
* Upgrade now for more improvements.
|
499 |
-
|
500 |
-
**3.8.1**
|
501 |
-
* Upgrade now for ABSPATH used in all files and also fixed all the warnings,bugs.
|
502 |
-
|
503 |
-
**3.8**
|
504 |
-
* Upgrade now for Multi language support and bug fixes
|
505 |
-
|
506 |
-
**3.7.4**
|
507 |
-
* Upgrade now for allow author/editor to import fix.
|
508 |
-
|
509 |
-
**3.7.3**
|
510 |
-
* Upgrade now for Vulnerability fix.
|
511 |
-
|
512 |
-
**3.7.2**
|
513 |
-
* Important Upgrade for wordpress 4.2 and above
|
514 |
-
|
515 |
-
**3.7.1**
|
516 |
-
* Upgrade now for security fix.
|
517 |
-
|
518 |
-
**3.7**
|
519 |
-
* Upgrade now for minor bug fixes.
|
520 |
-
|
521 |
-
**3.6.78**
|
522 |
-
* Upgrade now for security fix.
|
523 |
-
|
524 |
-
**3.6.77**
|
525 |
-
* Upgrade now for WordPress 4.1.1 compatibility and minor bug fixes.
|
526 |
-
|
527 |
-
**3.6.76**
|
528 |
-
* Upgrade now for more bug fixes.
|
529 |
-
|
530 |
-
**3.6.75**
|
531 |
-
* Upgrade now for improved experience.
|
532 |
-
|
533 |
-
**3.6.74**
|
534 |
-
* Upgrade now for security fix.
|
535 |
-
|
536 |
-
**3.6.73**
|
537 |
-
* Upgrade now for WordPress 4.0 compatibility and minor bug fixes.
|
538 |
-
|
539 |
-
**3.6.72**
|
540 |
-
* Upgrade to enable/disable debug mode in settings.
|
541 |
-
|
542 |
-
**3.6.71**
|
543 |
-
* Upgrade now for complete export features as in Pro with bug fix.
|
544 |
-
|
545 |
-
**3.6.7**
|
546 |
-
* Upgrade now for complete export features as in Pro.
|
547 |
-
|
548 |
-
**3.6.6**
|
549 |
-
* Upgrade now for improved experience.
|
550 |
-
|
551 |
-
**3.6.5**
|
552 |
-
* Upgrade Now for advanced media handling for post in line images
|
553 |
-
|
554 |
-
**3.6.4**
|
555 |
-
* Upgrade Now for filtered export and improved log features.
|
556 |
-
|
557 |
-
**3.6.3**
|
558 |
-
* Upgrade now for Eshop product import feature.
|
559 |
-
|
560 |
-
**3.6.2**
|
561 |
-
* Important Security Update
|
562 |
-
|
563 |
-
**3.6.1**
|
564 |
-
* Important issue fixes update
|
565 |
-
|
566 |
-
**3.6**
|
567 |
-
* Must upgrade with major values added features
|
568 |
-
|
569 |
-
**3.5.5**
|
570 |
-
* Upgrade for minor bug fix, conflicts and new attribute support.
|
571 |
-
|
572 |
-
**3.5.4**
|
573 |
-
* Upgrade now for All-in-SEO import support.
|
574 |
-
|
575 |
-
**3.5.3**
|
576 |
-
* Upgrade for added export feature and bug fixes
|
577 |
-
|
578 |
-
**3.5.2**
|
579 |
-
* Upgrade for bug free version and improved image handling
|
580 |
-
|
581 |
-
**3.5.1**
|
582 |
-
* Must upgrade now for 3.5 bug fixes
|
583 |
-
|
584 |
-
**3.5.0**
|
585 |
-
* Upgrade now for major release 3.5. Note - Old version files need to be deleted.
|
586 |
-
|
587 |
-
**3.3.1**
|
588 |
-
* Upgrade now for multi site compatibility.
|
589 |
-
|
590 |
-
**3.3.0**
|
591 |
-
* Upgrade now for WP 3.8 compatibility and added bulk user,comments feature.
|
592 |
-
|
593 |
-
**3.2.3**
|
594 |
-
* Upgrade for WordPress 3.7.1 compatibility and minor bug fixes
|
595 |
-
|
596 |
-
**3.2.2**
|
597 |
-
* WordPress 3.6.1 compatible, bug fix and UI improvements
|
598 |
-
|
599 |
-
**3.2.1**
|
600 |
-
* Performance improvements on SQL and CSV parsing
|
601 |
-
|
602 |
-
**3.2.0**
|
603 |
-
* Now compatible with 3.6 and improved featured image
|
604 |
-
|
605 |
-
**3.1.0**
|
606 |
-
* Now Much Improved Featured Image and url handling
|
607 |
-
|
608 |
-
**3.0.0**
|
609 |
-
* Must upgrade to have Major improvements, performance fixes and issue fixes
|
610 |
-
|
611 |
-
**2.7.0**
|
612 |
-
* Major improvements and feature changes.
|
613 |
-
|
614 |
-
**2.6.0**
|
615 |
-
* Bug fixed and should upgrade.
|
616 |
-
|
617 |
-
**2.5.0**
|
618 |
-
* Duplicate detection added.
|
619 |
-
* Added more information in success message.
|
620 |
-
* Import memory issues solved.
|
621 |
-
|
622 |
-
**2.0.1**
|
623 |
-
* Update to WordPress-3.5 compatibility.
|
624 |
-
|
625 |
-
**2.0.0**
|
626 |
-
* Major Bug fixed and should upgrade. WPDEBUG errors fixed. CSV import folder changed to WP native uploads folder.
|
627 |
-
|
628 |
-
**1.1.1**
|
629 |
-
* Minor correction and fix applied.
|
630 |
-
|
631 |
-
**1.1.0**
|
632 |
-
* A major new feature added in this version. Update needed.
|
633 |
-
|
634 |
-
**1.0.2**
|
635 |
-
* This version have important bug fixes and newly added features. Must be upgrade immediately.
|
636 |
-
|
637 |
-
**1.0.1**
|
638 |
-
* Added features to import multiple tags and categories with different delimiters.
|
639 |
-
|
640 |
-
**1.0.0**
|
641 |
-
* Initial release of plugin.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Readme.txt
CHANGED
@@ -1,27 +1,80 @@
|
|
1 |
-
===
|
2 |
Contributors: smackcoders
|
3 |
Donate link: http://www.smackcoders.com/donate.html
|
4 |
-
Tags:
|
5 |
-
Requires at least: 3.
|
6 |
-
Tested up to: 4.3
|
7 |
-
Stable tag: 3.8.
|
8 |
-
Version: 3.8.
|
9 |
Author: smackcoders
|
10 |
Author URI: http://profiles.wordpress.org/smackcoders/
|
11 |
|
12 |
License: GPLv2 or later
|
13 |
|
14 |
-
|
15 |
|
16 |
== Description ==
|
17 |
|
18 |
-
WP Ultimate CSV Importer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
= Video Walkthrough =
|
21 |
|
22 |
-
<p>
|
23 |
|
24 |
= Highlights =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
* All-in-SEO import support.
|
26 |
* Drag drop import
|
27 |
* Define any type of post
|
@@ -31,11 +84,12 @@ WP Ultimate CSV Importer Plugin proven much effective advanced CSV File Importer
|
|
31 |
* Scheduled Publishing
|
32 |
* Duplicate Title and content handling
|
33 |
* Multi Lingual import (CSV format must be UTF-8 without BOM)
|
34 |
-
*
|
35 |
-
* Compatible to
|
36 |
* Better alternative for xml
|
37 |
-
* Post Format
|
38 |
-
|
|
|
39 |
= Power Import Features to Control your csv import =
|
40 |
* Post title, content and even excerpt
|
41 |
* Text, WYSIWYG/HTML, in line CSS in post content
|
@@ -51,235 +105,250 @@ WP Ultimate CSV Importer Plugin proven much effective advanced CSV File Importer
|
|
51 |
* Custom fields support for WP standard
|
52 |
* Map custom fields by adding new on the fly.
|
53 |
|
54 |
-
The csv importer supports almost every wordpress modules and plugin fields as follows. Import data feed periodically from csv file as
|
55 |
-
|
56 |
-
= Supported Core Modules and Attributes =
|
57 |
-
* Post
|
58 |
-
* Page
|
59 |
-
* Standard WP Custom Post types
|
60 |
-
* Wordpress themes custom posts
|
61 |
-
* Custom post type UI plugin Post types
|
62 |
-
* Users with roles
|
63 |
-
* Comments
|
64 |
-
* Custom Fields
|
65 |
-
* Author
|
66 |
-
* Tags
|
67 |
-
* Categories
|
68 |
-
|
69 |
-
It is more easy to convert any off line database maintained in Excel xls or spread sheets into valuable content for your web site without missing any. It is possible now to schedule a periodical content update, maintenance, prices, offers, coupons and inventory etc.
|
70 |
-
|
71 |
-
= About Version 3.5.0 =
|
72 |
-
* Extended user experience
|
73 |
-
* Better performance
|
74 |
-
* No more time out issues
|
75 |
-
* Advanced Log for proper tracking
|
76 |
-
* Drag drop import
|
77 |
-
* Advanced CMS administration
|
78 |
-
|
79 |
-
Much improved User interface with most flexible jquery plugin features and bootstrap UI design makes csv import more simple, easy, fast and even more flexible for better user experience. With improved Multi site, buddy press compatibility (except user import module) works well for most of the best wordpress themes available online. Now manage multi site & buddy press, amazon data import, affiliates blog, product inventory, ecommerce store, multi author blog, automatic news import, photo blog etc periodically with simple click import.
|
80 |
-
|
81 |
-
= Extended Pro Power Features in Wp Ultimate CSV Importer =
|
82 |
-
* Auto Schedule all your Imports
|
83 |
-
* Save mapping as Templates for reuse
|
84 |
-
* Auto Mapping Feature
|
85 |
-
* Strict UTF-8 auto conversion
|
86 |
-
* All In One SEO Fields Import
|
87 |
-
* Wordpress SEO by Yoast Fields Import
|
88 |
-
* Custom Post Type UI plugin import
|
89 |
-
* Advanced Custom Fields Import
|
90 |
-
* CCTM Posts and Fields Import
|
91 |
-
* Woo commerce CSV Importer,
|
92 |
-
* eshop CSV Importer
|
93 |
-
* wp ecommerce Products CSV Importer with WP e-Commerce Custom Fields
|
94 |
-
* Categories & tags Import with Category icons plugin support
|
95 |
-
* Custom Taxonomy import
|
96 |
-
* [Get Complete List of supported 3rd party plugins here](http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html)
|
97 |
-
* Types and more supports are in pipeline
|
98 |
-
|
99 |
-
[Read More about Pro>>](http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html) or [Test Drive Our Live Demo](http://demo.smackcoders.com/demowpthree/wp-admin/admin.php?page=wp-ultimate-csv-importer-pro/index.php&__module=dashboard)
|
100 |
-
|
101 |
= Imp. Notes =
|
102 |
-
*
|
103 |
-
* All
|
104 |
-
*
|
105 |
-
* User import option is switched off in multi site mode.
|
106 |
* To Schedule posts for publishing provide future date and time in date column in CSV File.
|
107 |
|
108 |
Featured Image Support
|
109 |
-
Your
|
110 |
`<?php add_theme_support( 'post-thumbnails' ); ?>`
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
*
|
115 |
-
*
|
116 |
-
*
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
*
|
121 |
-
*
|
122 |
-
*
|
123 |
-
* [Old Support Threads](http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer_Support_Threads)
|
124 |
-
* [Wiki and Documentation](http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer)
|
125 |
-
* [Tutorials, Guides, Blog News and Updates](http://blog.smackcoders.com/category/free-wordpress-plugins/wordpress-ultimate-csv-importer-plugin/)
|
126 |
-
* [Video Walkthrough](http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer_Videos)
|
127 |
-
* [Get the Sample CSV Files Here](http://blog.smackcoders.com/wordpress-ultimate-csv-importer-csv-sample-files-and-updates.html)
|
128 |
-
* [Download CSV Format Cheat Sheets Here](http://blog.smackcoders.com/how-to-make-one-click-easy-csv-import-in-wordpress-free-cheat-sheet-downloads.html)
|
129 |
-
|
130 |
-
== Installation ==
|
131 |
-
|
132 |
-
Wp Ultimate CSV Importer is very easy to install like any other wordpress plugin. No need to edit or modify anything here. Users can install the plugin in 3 ways, choose one that suites you from below
|
133 |
-
|
134 |
-
= Imp. Notes =
|
135 |
-
* It is advised to remove older version files completely and install/reinstall version 3.5.0.
|
136 |
-
|
137 |
-
I. For simple general way to install
|
138 |
-
|
139 |
-
* Download the plugin (.zip file) on the right side above menu
|
140 |
-
* Click the Red Download Button ( Download Version X.X.X)
|
141 |
-
* Login to your Wordpress Admin (e.g. yourdomain.com/wp-admin/)
|
142 |
-
* Go to Plugins >> Add New
|
143 |
-
* Select the tab "Upload"
|
144 |
-
* Browse and Upload the downloaded zip file
|
145 |
-
* Activate the plugin after install
|
146 |
-
* You can see a new menu WP Ultimate CSV Importer in your Admin now
|
147 |
-
|
148 |
-
II. For familiar FTP users
|
149 |
|
150 |
-
|
151 |
-
|
152 |
-
* Extract the plugin zip
|
153 |
-
* Upload wp-ultimate-csv-importer folder to /wp-content/plugins/
|
154 |
-
* Go to Plugins >> Installed Plugins >> Inactive
|
155 |
-
* Click Activate to activate the plugin
|
156 |
-
* You can see a new menu WP Ultimate CSV Importer in your Admin now
|
157 |
|
158 |
-
III. Straight from Wordpress Admin
|
159 |
|
160 |
-
|
161 |
-
* Go to Plugins >> Add New
|
162 |
-
* Search for WP Ultimate CSV Importer
|
163 |
-
* Click Install Now to install
|
164 |
-
* Activate the plugin after install
|
165 |
-
* You can see a new menu WP Ultimate CSV Importer in your Admin now
|
166 |
|
167 |
-
|
168 |
|
|
|
169 |
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
2. User friendly easy mapping for any csv file data to wordpress field attributes with sampling.
|
174 |
-
3. Advanced duplicate post name and content check with server request control for high performance factor.
|
175 |
-
4. Detailed real time log to know pinpoint status.
|
176 |
-
5. Module based environment for easy and reduced interface to enable most required modules and when ever needed.
|
177 |
-
6. Inbuilt support form for easy feedback, support, feature request with all useful links for easy and better csv import.
|
178 |
-
7. New export module for posts, page and all custom posts type plugins.
|
179 |
-
|
180 |
-
== Frequently Asked Questions ==
|
181 |
-
|
182 |
-
= Imp. Notes =
|
183 |
-
* It is advised to remove older version files completely and install/reinstall version 3.5.0.
|
184 |
-
|
185 |
-
[CSV File and Format Related](http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer_FAQ#CSV_File_and_Format_Related)
|
186 |
-
|
187 |
-
= '''What is csv file?''' =
|
188 |
-
|
189 |
-
CSV stands for "Comma Separated Values". CSV file format is used to store data in a structured table of lists as columns and rows. CSV File otherwise Comma Separated Values file is a simple text file that stores attribute names as headers and their related values in comma separated format.
|
190 |
-
|
191 |
-
In general opening csv files in MS Excel or any spread sheet editor will show all values under each header as columns and rows. Each column have a attribute name called as CSV file header and their data/values in rows for each entry.
|
192 |
-
|
193 |
-
For ultimate csv importer each row is imported as a post for a selected post type and columns are imported as filed attribute values of the posts. This is done by simple interface of drop downs of header or attribute names are mapped to wordpress post field attributes like post title, content, status. So no of rows are equal to no of posts that to be imported. And columns or csv headers are equal to no of field attributes assigned under each post like author, category, tags, custom fields etc.
|
194 |
-
|
195 |
-
= '''What is csv format and types of it?''' =
|
196 |
-
|
197 |
-
The CSV file type 'Comma-Separated Variables' or comma delimited file is a records and data from a database or software exported, where each record/data in single line and each field attributes in records are indicated as comma separated. In some cases instead of comma other delimiters also can be used like ; separated.
|
198 |
-
|
199 |
-
|
200 |
-
CSV Format is chosen encoding while saving as a csv file. There are several formats available like ANSI, UCS-2 Big Endian, UCS-2 Little Endian, UTF-8, UTF-8 without BOM etc.
|
201 |
-
|
202 |
-
For ultimate csv importer to import csv as wordpress post type, UTF-8 is advised for successful import. In case of other language import or any special characters, diacritics, Cyrillic or Han characters are included in csv import, UTF-8 without BOM format is suggested.
|
203 |
-
|
204 |
-
How to choose separator or delimiter for ultimate CSV Importer?
|
205 |
-
|
206 |
-
In ultimate csv importer you can choose the delimiter as , or ; while importing the csv file.
|
207 |
-
|
208 |
-
= '''How to open csv files? read csv file?''' =
|
209 |
|
210 |
-
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
In general to read or open existing CSV files simple text editors can be used. For easy editing and best view, any spread sheet editor like MS Excel or OpenOffice Calc is useful. To convert encoding format of a csv file open it in text editor and save as with needed file format.
|
215 |
-
|
216 |
-
For E.g. open your csv file in Notepad++ copy the text. Now open a new empty file choose UTF-8 without BOM or other from Menus >> Encoding and paste the copied text. Now save and replace the old CSV file. Now your CSV file with choosen format can be imported without any issues in Ultimate CSV importer.
|
217 |
-
|
218 |
-
[Plugin Related](http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer_FAQ#Plugin_Related)
|
219 |
-
|
220 |
-
= '''How to install the plugin?''' =
|
221 |
|
222 |
-
|
|
|
|
|
223 |
|
224 |
-
= '''How to use the plugin to import a csv file?''' =
|
225 |
|
226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
|
228 |
-
|
229 |
|
230 |
-
|
231 |
|
232 |
-
|
233 |
|
234 |
-
Csv importer plugin is a tool/plugin that can import your data and records from exported, stored, saved as csv files to your software as useful viewable content to analyse, manage etc. In such way Ultimate CSV importer is a worpdress plugin that imports your off line records or data stored/exported as a csv file into any wordpress post type web content by simple easy mapping feature.
|
235 |
|
236 |
-
|
237 |
|
238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
|
240 |
-
More to that features like auto mapping headers, mapping templates, smart scheduling etc in pro version makes periodical imports more easy and automatic even without mapping itself.
|
241 |
|
242 |
-
|
243 |
|
244 |
-
|
245 |
|
246 |
-
|
247 |
-
* How to import other languages using ultimate csv importer?
|
248 |
-
* How to Format a CSV file for simple sleek import using WP Ultimate CSV Importer Plugin?
|
249 |
-
* How to create a well formatted csv for ultimate power import? - the other way to learn tweaking
|
250 |
-
* Where can i get sample files, cheat sheets and other references?
|
251 |
-
* What you mean by mapping?
|
252 |
-
* What are mandatory fields?
|
253 |
-
* What can be imported to wordpress using ultimate csv importer?
|
254 |
-
* What are the list of 3rd party plugins supported?
|
255 |
-
* Why my custom fields or custom posts are supported by plugin?
|
256 |
-
* Can i bulk edit/update existing posts created manually?
|
257 |
-
* How to schedule post for publishing?
|
258 |
-
* What is auto mapping feature?
|
259 |
-
* What is mapping template feature? How to use it?
|
260 |
-
* How saved mapping template can be reused?
|
261 |
-
* How to schedule csv files for import?
|
262 |
-
* Is schedule import possible from remote location?
|
263 |
-
* how to automate periodical scheduled import?
|
264 |
-
* Is auto split up schedule import possible?
|
265 |
|
266 |
-
|
267 |
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
* Is export feature available to all modules?
|
272 |
|
273 |
-
|
274 |
|
275 |
-
|
276 |
-
* Cant get my featured image imported?
|
277 |
-
* Why image import is broken
|
278 |
-
* I am getting time out error? how to solve it?
|
279 |
-
* How to handle large data import?
|
280 |
|
281 |
== Changelog ==
|
282 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
= 3.5.4 =
|
284 |
* Added: All-in-SEO import support.
|
285 |
* WordPress 3.9.1 compatibility added.
|
@@ -428,6 +497,90 @@ Read More FAQs from below wiki links.
|
|
428 |
|
429 |
== Upgrade Notice ==
|
430 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
= 3.5.4 =
|
432 |
* Upgrade now for All-in-SEO import support.
|
433 |
|
1 |
+
=== WP Ultimate CSV Importer ===
|
2 |
Contributors: smackcoders
|
3 |
Donate link: http://www.smackcoders.com/donate.html
|
4 |
+
Tags: admin, administration, author, automatic, blog, categories, category, cms, contact, content, custom, custom post, dashboard, database, e-commerce, ecommerce, edit, event, events, feed, Formatting, free, gallery, image, images, import, integration, language, link, links, list, marketing, media, menu, meta, mobile, multisite, navigation, News, page, pages, performance, photo, photos, picture, pictures, plugin, plugins, Post, posts, profile, registration, rss, seo, Share, sharing, shop, shortcode, shortcodes, statistics, stats, store, tag, tags, Taxonomy, template, text, thumbnail, thumbnails, title, upload, url, user, users, video, woocommerce, wordpress, wpmu, xml, youtube,
|
5 |
+
Requires at least: 4.3.1
|
6 |
+
Tested up to: 4.3.1
|
7 |
+
Stable tag: 3.8.5
|
8 |
+
Version: 3.8.5
|
9 |
Author: smackcoders
|
10 |
Author URI: http://profiles.wordpress.org/smackcoders/
|
11 |
|
12 |
License: GPLv2 or later
|
13 |
|
14 |
+
WP Ultimate CSV Importer made simple to import & export posts, pages, custom posts and custom fields in few simple clicks
|
15 |
|
16 |
== Description ==
|
17 |
|
18 |
+
WP Ultimate CSV Importer is made very easy even for novice users as in few clicks and 3 simple steps with CSV Importer plugin.
|
19 |
+
|
20 |
+
Now csv importer supports multi language and almost every WordPress modules and plugin fields as follows. Import data feed periodically from csv file as
|
21 |
+
|
22 |
+
= Supported Core Modules and Attributes =
|
23 |
+
* Post
|
24 |
+
* Page
|
25 |
+
* Featured image support
|
26 |
+
* Post inline image handling
|
27 |
+
* Standard WP Custom Post types
|
28 |
+
* WordPress themes custom posts
|
29 |
+
* Custom post type UI plugin Post types
|
30 |
+
* Users with roles
|
31 |
+
* Comments
|
32 |
+
* Custom Fields
|
33 |
+
* Author
|
34 |
+
* Tags import and multi tag for each post import
|
35 |
+
* Categories import and multi category for each post
|
36 |
+
* Eshop
|
37 |
+
* All-in-one SEO
|
38 |
+
|
39 |
+
= Highlights of 3.8 =
|
40 |
+
* Multilanguage support (fr_FR,es_ES,nl_NL)
|
41 |
+
* Inline image handling shortcode with image attributes Example:[WPIMPINLINE:greensroad.jpg|width='150'|height='80'|alt='post_title_redtree']
|
42 |
+
* Fixed user reported Warnings and Bugs
|
43 |
+
* Any delimiter support for csv export
|
44 |
+
|
45 |
+
Note: Now you can import no. of images in in-line post content as image shortcodes using advanced media handling option as zip files.
|
46 |
+
|
47 |
+
= CSV Importer =
|
48 |
+
|
49 |
+
WP Ultimate CSV Importer Plugin proven much effective advanced CSV Importer With Ultimate User Friendly Features. It is much easy now even for newbies to import csv file exported from any tool, app or software. Import as any WordPress post type and associated fields by simple mapping feature. Now import any CSV file as thousands of post, page and custom post types. This is admin side free plugin helps you in bulk edit, create and import posts type for your blog or site.
|
50 |
+
|
51 |
+
It is more easy to import csv database maintained in Excel xls or spread sheets into valuable content for your web site without missing any. It is possible now to schedule a import csv periodically for content update, maintenance, prices, offers, coupons and inventory etc.
|
52 |
+
|
53 |
+
Much improved User interface with most flexible jquery plugin features and bootstrap UI design makes csv import more simple, easy, fast and even more flexible for better user experience. With improved Multi site, buddy press compatibility (except user import module) works well for most of the best WordPress themes available online. Now manage multi site & buddy press, Amazon data import, affiliates blog, product inventory, ecommerce store, multi author blog, automatic news import, photo blog etc periodically with simple click import.
|
54 |
+
|
55 |
+
= Helpful Links =
|
56 |
+
|
57 |
+
[Get More Details Here>>](https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
58 |
+
|
59 |
+
[Test Drive Our Live Demo](http://demo.smackcoders.com/demowpthree/wp-admin/admin.php?page=wp-ultimate-csv-importer-pro/index.php&__module=dashboard?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
60 |
+
|
61 |
+
[Get Started Sample CSV Files](https://www.smackcoders.com/blog/wordpress-ultimate-csv-importer-csv-sample-files-and-updates.html?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
62 |
+
|
63 |
+
[Documentation and Tutorial for CSV Importer ](https://www.smackcoders.com/documentation/ultimate-csv-importer-pro?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
64 |
+
|
65 |
|
66 |
= Video Walkthrough =
|
67 |
|
68 |
+
<p>https://www.youtube.com/watch?v=Guv5zR7fgW0&list=PL2k3Ck1bFtbQqFhOK7g08kxENI4qQkmC</p>
|
69 |
|
70 |
= Highlights =
|
71 |
+
* import csv from any source as WordPress posts
|
72 |
+
* New Terminate & Continue feature is added.
|
73 |
+
* Complete export feature with improved filters
|
74 |
+
* Import external/internal images in line to any posts
|
75 |
+
* Upload images related to each csv
|
76 |
+
* Auto delimiter
|
77 |
+
* Auto UTF-8 handling
|
78 |
* All-in-SEO import support.
|
79 |
* Drag drop import
|
80 |
* Define any type of post
|
84 |
* Scheduled Publishing
|
85 |
* Duplicate Title and content handling
|
86 |
* Multi Lingual import (CSV format must be UTF-8 without BOM)
|
87 |
+
* Multi-site also supported now
|
88 |
+
* Compatible to WordPress themes
|
89 |
* Better alternative for xml
|
90 |
+
* Post Format option added
|
91 |
+
* Page template attribute feature
|
92 |
+
* EShop Products import (included from V3.6.3)
|
93 |
= Power Import Features to Control your csv import =
|
94 |
* Post title, content and even excerpt
|
95 |
* Text, WYSIWYG/HTML, in line CSS in post content
|
105 |
* Custom fields support for WP standard
|
106 |
* Map custom fields by adding new on the fly.
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
= Imp. Notes =
|
109 |
+
* All CSV files should be should be strictly UTF-8 CSV format. Now this can be handled by plugin.
|
110 |
+
* All WordPress supported languages can imported with csv format as UTF-8 without BOM (See FAQ for instructions).
|
111 |
+
* User import option is disabled for multi site mode.
|
|
|
112 |
* To Schedule posts for publishing provide future date and time in date column in CSV File.
|
113 |
|
114 |
Featured Image Support
|
115 |
+
Your WordPress theme should support featured image. If not, please add the following code to where you need to display E.g. wp-contents/themes/header.php
|
116 |
`<?php add_theme_support( 'post-thumbnails' ); ?>`
|
117 |
|
118 |
+
= Pro Features =
|
119 |
+
* Advanced Features
|
120 |
+
* Multi language Support
|
121 |
+
* Woocommerce Support with woocommerce_products, woocommerce_variations, woocommerce_refunds, woocommerce_orders, woocommerce_coupons
|
122 |
+
* Market press
|
123 |
+
* ACF, TYPES, PODS, CCTM Custom Fields
|
124 |
+
* Advanced Export with Delimiter and Filters
|
125 |
+
* Advanced Media Handling
|
126 |
+
* Schedule Imports
|
127 |
+
* Dashboard, CSV Manager and Custom Mapping Templates
|
128 |
+
* DB Optimizer, System status etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
+
Compare Free Vs Pro[Features](https://www.wpultimatecsvimporter.com/wp-ultimate-csv-importer-plugin?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)>>
|
131 |
+
Learn More from [User Manual](https://www.wpultimatecsvimporter.com/documentation/all-import/user-guide/simple-step-by-step-user-guide?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)>>
|
|
|
|
|
|
|
|
|
|
|
132 |
|
|
|
133 |
|
134 |
+
= Common Issues =
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
+
How to solve auto_prepend_file and auto_append_file error?
|
137 |
|
138 |
+
Check your phpinfo.php. Ensure that auto_prepend_file and auto_append_file options are disabled. If not you can disable it in php.ini settings file your self. You can also do it by a .htaccess file
|
139 |
|
140 |
+
Create an .htaccess file in root and set the following values.
|
141 |
+
php_value auto_prepend_file none
|
142 |
+
php_value auto_append_file none
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
+
This will solve your issue or get support from hosting if you dint have sufficient permission.
|
145 |
|
146 |
+
Also you can follow the instructions as given here
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
+
* [http://codex.wordpress.org/Function_Reference/the_post_thumbnail](http://codex.wordpress.org/Function_Reference/the_post_thumbnail)
|
149 |
+
* [http://codex.wordpress.org/Post_Thumbnails](http://codex.wordpress.org/Post_Thumbnails)
|
150 |
+
* [http://wordpress.org/support/topic/featured-image-not-showing-7?replies=5](http://wordpress.org/support/topic/featured-image-not-showing-7?replies=5)
|
151 |
|
|
|
152 |
|
153 |
+
= Extended Pro Power Features in WP Ultimate CSV Importer =
|
154 |
+
* Types Plugin support
|
155 |
+
* Woocommerce CSV importer with product variation
|
156 |
+
* Marketpress Lite Importer
|
157 |
+
* WP Members Importer
|
158 |
+
* WP Customer Reviews Importer
|
159 |
+
* Auto Schedule all your Imports
|
160 |
+
* Save mapping as Templates for reuse
|
161 |
+
* Auto Mapping Feature
|
162 |
+
* Strict UTF-8 auto conversion
|
163 |
+
* All In One SEO Fields Import
|
164 |
+
* WordPress SEO by Yoast Fields Import
|
165 |
+
* Custom Post Type UI plugin import
|
166 |
+
* Advanced Custom Fields Import
|
167 |
+
* CCTM Posts and Fields Import
|
168 |
+
* Woocommerce CSV Importer,
|
169 |
+
* WP ecommerce Products CSV Importer with WP e-Commerce Custom Fields
|
170 |
+
* Categories & tags Import with Category icons plugin support
|
171 |
+
* Custom Taxonomy import
|
172 |
|
173 |
+
= And we thank @respectyoda, @alantygel and @James Golovich for their wonderful support to us. =
|
174 |
|
175 |
+
== Installation ==
|
176 |
|
177 |
+
* [Step By Step Installation with Snaps](https://www.wpultimatecsvimporter.com/documentation/all-import/user-guide/simple-step-by-step-user-guide/?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
178 |
|
|
|
179 |
|
180 |
+
== Screenshots ==
|
181 |
|
182 |
+
1. New Interactive Dashboard with Chart and Graph
|
183 |
+
2. Upload the CSV file of the selected module.
|
184 |
+
3. Mapping view of the uploaded CSV fields with WordPress fields
|
185 |
+
4. Advanced duplicate post name and content check with server request control for high performance factor.
|
186 |
+
5. Detailed real time log to know pinpoint status.
|
187 |
+
6. Settings with php.ini details.
|
188 |
+
7. New export module for posts, page, eshop, users, comments and all custom posts type plugins.
|
189 |
|
|
|
190 |
|
191 |
+
== Frequently Asked Questions ==
|
192 |
|
193 |
+
= Common Issues =
|
194 |
|
195 |
+
How to solve auto_prepend_file and auto_append_file error?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
|
197 |
+
Check your phpinfo.php. Ensure that auto_prepend_file and auto_append_file options are disabled. If not you can disable it in php.ini settings file your self. You can also do it by a .htaccess file
|
198 |
|
199 |
+
Create an .htaccess file in root and set the following values.
|
200 |
+
php_value auto_prepend_file none
|
201 |
+
php_value auto_append_file none
|
|
|
202 |
|
203 |
+
This will solve your issue or get support from hosting if you dint have sufficient permission.
|
204 |
|
205 |
+
[Click Here for More Details](https://www.wpultimatecsvimporter.com/documentation/all-import/user-guide/simple-step-by-step-user-guide/?utm_source=WpOrg&utm_medium=Readme&utm_campaign=ListingTraffic)
|
|
|
|
|
|
|
|
|
206 |
|
207 |
== Changelog ==
|
208 |
|
209 |
+
= 3.8.5 =
|
210 |
+
* post_status validation issue fix
|
211 |
+
* Empty password validation updated
|
212 |
+
* Improve log sectionwith stats issue fix
|
213 |
+
* SEO Fields mapping issue fix
|
214 |
+
* Improved Export with known issue fixes
|
215 |
+
* JS validation fix
|
216 |
+
* TypeError fix
|
217 |
+
* Much improved settings
|
218 |
+
|
219 |
+
= 3.8.4 =
|
220 |
+
* Modified: Changed the Dashboard view.
|
221 |
+
|
222 |
+
= 3.8.3 =
|
223 |
+
* Fixed : Text domain is added for language translation system.
|
224 |
+
* Fixed : Bugs fixed for detecting duplicate post content and title option.
|
225 |
+
|
226 |
+
= 3.8.2 =
|
227 |
+
* Fixed : Wordpress 4.3.1 compatibility added.
|
228 |
+
* Fixed : Dashboard entry issue fix.
|
229 |
+
* Fixed : Featured image filename with empty space import issue fix.
|
230 |
+
* Fixed : Duplicate featured images on import fixed.
|
231 |
+
* Fixed : Core custom Field mapping group added
|
232 |
+
|
233 |
+
= 3.8.1 =
|
234 |
+
* Fixed : WordPress 4.2.3 and 4.2.4 compatibility checked.
|
235 |
+
* Fixed : Fixed the unwanted warnings in all files.
|
236 |
+
* Fixed : XSS vulnerability.
|
237 |
+
* Fixed : Removed the ../../../../../../wp-load.php and used the wordpress ajax call.
|
238 |
+
* Fixed : Removed the wp-content that are directly used in some files.
|
239 |
+
* Added : Checked the ABSPATH in each file.
|
240 |
+
* Added : Comments are exported by specific date and author option.
|
241 |
+
|
242 |
+
= 3.8 =
|
243 |
+
* Multilanguage support (fr_FR,es_ES,nl_NL)
|
244 |
+
* Inline image handling shortcode with image attributes
|
245 |
+
* Warnings and bugs Fixes
|
246 |
+
* Any delimiter support for csv export
|
247 |
+
|
248 |
+
= 3.7.4 =
|
249 |
+
* Fixed : Allow Editor/Author to import.(Multisite also).
|
250 |
+
* Added : WordPress 4.2.2 compatibility.
|
251 |
+
|
252 |
+
= 3.7.3 =
|
253 |
+
* Fixed: Vulnerablility security issue fix.
|
254 |
+
|
255 |
+
= 3.7.2 =
|
256 |
+
* Added: WordPress 4.2 and 4.2.1 compatibility.
|
257 |
+
* Fixed: Blank page conflict issue
|
258 |
+
|
259 |
+
= 3.7.1 =
|
260 |
+
* Added: Security fix for curl.
|
261 |
+
* Added: Security fix for session status.
|
262 |
+
|
263 |
+
= 3.7 =
|
264 |
+
* Fixed: Featured image hotlink issue.
|
265 |
+
|
266 |
+
= 3.6.78 =
|
267 |
+
* Added: Hot security fix in readfile.php. ( Thanks - @James Golovich )
|
268 |
+
|
269 |
+
= 3.6.77 =
|
270 |
+
* Added: WordPress 4.1.1 compatibility checked.
|
271 |
+
* Improved: Inline image import feature. Added recursive method to assign the image.
|
272 |
+
* Fixed: Featured image naming issue. [Solved](https://wordpress.org/support/topic/problem-in-import-with-the-image-name)
|
273 |
+
* Fixed: Removed unwanted warnings.
|
274 |
+
|
275 |
+
= 3.6.76 =
|
276 |
+
* Improved: Post Format.
|
277 |
+
* Fixed: Export eshop data issue.
|
278 |
+
* Fixed: Import with image name issue.
|
279 |
+
* Fixed: Groups plugin conflict.
|
280 |
+
|
281 |
+
= 3.6.75 =
|
282 |
+
* Added: Terminate & Continue option in import section.
|
283 |
+
* Improved: Log section. Issue fixed in Web View & Admin View.
|
284 |
+
* Fixed: Security fix for export module.
|
285 |
+
|
286 |
+
= 3.6.74 =
|
287 |
+
* Added: Security fix.
|
288 |
+
|
289 |
+
= 3.6.73 =
|
290 |
+
* Added: WordPress 4.0 compatibility checked.
|
291 |
+
* Added: https format support for all WP instances.
|
292 |
+
* Added: Warning to guide user to create uploads directory with writeable permissions.
|
293 |
+
* Fixed: Image handling issues in featured image.
|
294 |
+
* Fixed: Multisite compatible issue.
|
295 |
+
* Removed: Post Content field mandatory option.
|
296 |
+
* Removed: All console warnings.
|
297 |
+
* Improved: Details added in security and performance tab under settings module.
|
298 |
+
|
299 |
+
= 3.6.72 =
|
300 |
+
* Added: Debug mode enable/disable options.
|
301 |
+
* Modified: Menu order changes.
|
302 |
+
|
303 |
+
= 3.6.71 =
|
304 |
+
* Minor bug fixed
|
305 |
+
|
306 |
+
= 3.6.7 =
|
307 |
+
* Added: Export features for all missing modules.
|
308 |
+
* Fixed: All console warnings and reported logs.
|
309 |
+
|
310 |
+
= 3.6.6 =
|
311 |
+
* Dashboard chart issue fixed for multi site.
|
312 |
+
* UI improvements along with easy usability.
|
313 |
+
* Fixed Groups plugin conflicts
|
314 |
+
|
315 |
+
= 3.6.5 =
|
316 |
+
* Added in line image support with advance media handling
|
317 |
+
* PDO check added
|
318 |
+
|
319 |
+
= 3.6.4 =
|
320 |
+
* Added: Advanced export features with filter options.
|
321 |
+
* Improved: Advanced log section.
|
322 |
+
* Fixed reported jquery issues.
|
323 |
+
* WordPress 4.0 compatibility checked.
|
324 |
+
|
325 |
+
= 3.6.3 =
|
326 |
+
* Added: Eshop import support.
|
327 |
+
* Fixed reported conflicts with other plugins.
|
328 |
+
* WordPress 3.9.2 compatibility checked.
|
329 |
+
|
330 |
+
= 3.6.2 =
|
331 |
+
* Hot security fix added.
|
332 |
+
|
333 |
+
= 3.6.1 =
|
334 |
+
* Multi-site support issue fixed
|
335 |
+
* Duplicate import issue fixed
|
336 |
+
* Security issue fixed
|
337 |
+
|
338 |
+
= 3.6 =
|
339 |
+
* New interactive graphs and charts in plugin dashboard
|
340 |
+
* New Admin dashboard widgets
|
341 |
+
* Added Users and comments export feature
|
342 |
+
* Auto delimiter handling
|
343 |
+
* Auto mapping feature
|
344 |
+
* Now allow authors to access import features
|
345 |
+
|
346 |
+
= 3.5.5 =
|
347 |
+
* post_format attribute support added
|
348 |
+
* page_template attribute added
|
349 |
+
* update_post_meta added for duplicate meta issue (Thanks to @alantygel)
|
350 |
+
* Type error issue in jQuery fixed
|
351 |
+
|
352 |
= 3.5.4 =
|
353 |
* Added: All-in-SEO import support.
|
354 |
* WordPress 3.9.1 compatibility added.
|
497 |
|
498 |
== Upgrade Notice ==
|
499 |
|
500 |
+
= 3.8.5 =
|
501 |
+
* Imp. Upgrade now for bug fixes.
|
502 |
+
|
503 |
+
= 3.8.4 =
|
504 |
+
* Upgrade now for new dashboard view.
|
505 |
+
|
506 |
+
= 3.8.3 =
|
507 |
+
* Upgrade now for improvements in multi language translation.
|
508 |
+
|
509 |
+
= 3.8.2 =
|
510 |
+
* Upgrade now for more improvements.
|
511 |
+
|
512 |
+
= 3.8.1 =
|
513 |
+
* Upgrade now for ABSPATH used in all files and also fixed all the warnings,bugs.
|
514 |
+
|
515 |
+
= 3.8 =
|
516 |
+
* Upgrade now for Multi language support and bug fixes
|
517 |
+
|
518 |
+
= 3.7.4 =
|
519 |
+
* Upgrade now for allow author/editor to import fix.
|
520 |
+
|
521 |
+
= 3.7.3 =
|
522 |
+
* Upgrade now for Vulnerability fix.
|
523 |
+
|
524 |
+
= 3.7.2 =
|
525 |
+
* Important Upgrade for wordpress 4.2 and above
|
526 |
+
|
527 |
+
= 3.7.1 =
|
528 |
+
* Upgrade now for security fix.
|
529 |
+
|
530 |
+
= 3.7 =
|
531 |
+
* Upgrade now for minor bug fixes.
|
532 |
+
|
533 |
+
= 3.6.78 =
|
534 |
+
* Upgrade now for security fix.
|
535 |
+
|
536 |
+
= 3.6.77 =
|
537 |
+
* Upgrade now for WordPress 4.1.1 compatibility and minor bug fixes.
|
538 |
+
|
539 |
+
= 3.6.76 =
|
540 |
+
* Upgrade now for more bug fixes.
|
541 |
+
|
542 |
+
= 3.6.75 =
|
543 |
+
* Upgrade now for improved experience.
|
544 |
+
|
545 |
+
= 3.6.74 =
|
546 |
+
* Upgrade now for security fix.
|
547 |
+
|
548 |
+
= 3.6.73 =
|
549 |
+
* Upgrade now for WordPress 4.0 compatibility and minor bug fixes.
|
550 |
+
|
551 |
+
= 3.6.72 =
|
552 |
+
* Upgrade to enable/disable debug mode in settings.
|
553 |
+
|
554 |
+
= 3.6.71 =
|
555 |
+
* Upgrade now for complete export features as in Pro with bug fix.
|
556 |
+
|
557 |
+
= 3.6.7 =
|
558 |
+
* Upgrade now for complete export features as in Pro.
|
559 |
+
|
560 |
+
= 3.6.6 =
|
561 |
+
* Upgrade now for improved experience.
|
562 |
+
|
563 |
+
= 3.6.5 =
|
564 |
+
* Upgrade Now for advanced media handling for post in line images
|
565 |
+
|
566 |
+
= 3.6.4 =
|
567 |
+
* Upgrade Now for filtered export and improved log features.
|
568 |
+
|
569 |
+
= 3.6.3 =
|
570 |
+
* Upgrade now for Eshop product import feature.
|
571 |
+
|
572 |
+
= 3.6.2 =
|
573 |
+
* Important Security Update
|
574 |
+
|
575 |
+
= 3.6.1 =
|
576 |
+
* Important issue fixes update
|
577 |
+
|
578 |
+
= 3.6 =
|
579 |
+
* Must upgrade with major values added features
|
580 |
+
|
581 |
+
= 3.5.5 =
|
582 |
+
* Upgrade for minor bug fix, conflicts and new attribute support.
|
583 |
+
|
584 |
= 3.5.4 =
|
585 |
* Upgrade now for All-in-SEO import support.
|
586 |
|
css/jquery-ui.css
CHANGED
@@ -112,7 +112,7 @@
|
|
112 |
|
113 |
.ui-widget-content {
|
114 |
border: 1px solid #aaaaaa;
|
115 |
-
background: #ffffff
|
116 |
color: #222222;
|
117 |
}
|
118 |
|
@@ -122,7 +122,7 @@
|
|
122 |
|
123 |
.ui-widget-header {
|
124 |
border: 1px solid #aaaaaa;
|
125 |
-
background: #cccccc
|
126 |
color: #222222;
|
127 |
font-weight: bold;
|
128 |
}
|
@@ -135,7 +135,7 @@
|
|
135 |
----------------------------------*/
|
136 |
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
|
137 |
border: 1px solid #d3d3d3;
|
138 |
-
background: #e6e6e6
|
139 |
font-weight: normal;
|
140 |
color: #555555;
|
141 |
}
|
@@ -147,7 +147,7 @@
|
|
147 |
|
148 |
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {
|
149 |
border: 1px solid #999999;
|
150 |
-
background: #dadada
|
151 |
font-weight: normal;
|
152 |
color: #212121;
|
153 |
}
|
@@ -159,7 +159,7 @@
|
|
159 |
|
160 |
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
|
161 |
border: 1px solid #aaaaaa;
|
162 |
-
background: #ffffff
|
163 |
font-weight: normal;
|
164 |
color: #212121;
|
165 |
}
|
@@ -177,7 +177,7 @@
|
|
177 |
----------------------------------*/
|
178 |
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {
|
179 |
border: 1px solid #fcefa1;
|
180 |
-
background: #fbf9ee
|
181 |
color: #363636;
|
182 |
}
|
183 |
|
@@ -187,7 +187,7 @@
|
|
187 |
|
188 |
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {
|
189 |
border: 1px solid #cd0a0a;
|
190 |
-
background: #fef1ec
|
191 |
color: #cd0a0a;
|
192 |
}
|
193 |
|
@@ -222,15 +222,12 @@
|
|
222 |
.ui-icon {
|
223 |
width: 16px;
|
224 |
height: 16px;
|
225 |
-
background-image: url(images/ui-icons_222222_256x240.png);
|
226 |
}
|
227 |
|
228 |
.ui-widget-content .ui-icon {
|
229 |
-
background-image: url(images/ui-icons_222222_256x240.png);
|
230 |
}
|
231 |
|
232 |
.ui-widget-header .ui-icon {
|
233 |
-
background-image: url(images/ui-icons_222222_256x240.png);
|
234 |
}
|
235 |
|
236 |
.ui-state-default .ui-icon {
|
@@ -1023,7 +1020,7 @@
|
|
1023 |
|
1024 |
/* Overlays */
|
1025 |
.ui-widget-overlay {
|
1026 |
-
background: #aaaaaa
|
1027 |
opacity: .30;
|
1028 |
filter: Alpha(Opacity=30);
|
1029 |
}
|
@@ -1031,7 +1028,7 @@
|
|
1031 |
.ui-widget-shadow {
|
1032 |
margin: -8px 0 0 -8px;
|
1033 |
padding: 8px;
|
1034 |
-
background: #aaaaaa
|
1035 |
opacity: .30;
|
1036 |
filter: Alpha(Opacity=30);
|
1037 |
-moz-border-radius: 8px;
|
112 |
|
113 |
.ui-widget-content {
|
114 |
border: 1px solid #aaaaaa;
|
115 |
+
background: #ffffff 50% 50% repeat-x;
|
116 |
color: #222222;
|
117 |
}
|
118 |
|
122 |
|
123 |
.ui-widget-header {
|
124 |
border: 1px solid #aaaaaa;
|
125 |
+
background: #cccccc 50% 50% repeat-x;
|
126 |
color: #222222;
|
127 |
font-weight: bold;
|
128 |
}
|
135 |
----------------------------------*/
|
136 |
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
|
137 |
border: 1px solid #d3d3d3;
|
138 |
+
background: #e6e6e6 50% 50% repeat-x;
|
139 |
font-weight: normal;
|
140 |
color: #555555;
|
141 |
}
|
147 |
|
148 |
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {
|
149 |
border: 1px solid #999999;
|
150 |
+
background: #dadada 50% 50% repeat-x;
|
151 |
font-weight: normal;
|
152 |
color: #212121;
|
153 |
}
|
159 |
|
160 |
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
|
161 |
border: 1px solid #aaaaaa;
|
162 |
+
background: #ffffff 50% 50% repeat-x;
|
163 |
font-weight: normal;
|
164 |
color: #212121;
|
165 |
}
|
177 |
----------------------------------*/
|
178 |
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {
|
179 |
border: 1px solid #fcefa1;
|
180 |
+
background: #fbf9ee 50% 50% repeat-x;
|
181 |
color: #363636;
|
182 |
}
|
183 |
|
187 |
|
188 |
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {
|
189 |
border: 1px solid #cd0a0a;
|
190 |
+
background: #fef1ec 50% 50% repeat-x;
|
191 |
color: #cd0a0a;
|
192 |
}
|
193 |
|
222 |
.ui-icon {
|
223 |
width: 16px;
|
224 |
height: 16px;
|
|
|
225 |
}
|
226 |
|
227 |
.ui-widget-content .ui-icon {
|
|
|
228 |
}
|
229 |
|
230 |
.ui-widget-header .ui-icon {
|
|
|
231 |
}
|
232 |
|
233 |
.ui-state-default .ui-icon {
|
1020 |
|
1021 |
/* Overlays */
|
1022 |
.ui-widget-overlay {
|
1023 |
+
background: #aaaaaa 50% 50% repeat-x;
|
1024 |
opacity: .30;
|
1025 |
filter: Alpha(Opacity=30);
|
1026 |
}
|
1028 |
.ui-widget-shadow {
|
1029 |
margin: -8px 0 0 -8px;
|
1030 |
padding: 8px;
|
1031 |
+
background: #aaaaaa 50% 50% repeat-x;
|
1032 |
opacity: .30;
|
1033 |
filter: Alpha(Opacity=30);
|
1034 |
-moz-border-radius: 8px;
|
css/style.css
CHANGED
@@ -13,6 +13,34 @@
|
|
13 |
body {
|
14 |
}
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
.container-fluid {
|
17 |
/* padding-left: 20px; */
|
18 |
padding-right: 20px;
|
@@ -357,7 +385,7 @@ div#mappingheader select {
|
|
357 |
}
|
358 |
|
359 |
.left_align {
|
360 |
-
width:
|
361 |
}
|
362 |
|
363 |
.exportmodule > thead > tr > th, .exportmodule > tbody > tr > th, .exportmodule > tfoot > tr > th, .exportmodule > thead > tr > td, .exportmodule > tbody > tr > td, .exportmodule > tfoot > tr > td {
|
13 |
body {
|
14 |
}
|
15 |
|
16 |
+
.activemenu {
|
17 |
+
margin-left: 3px;
|
18 |
+
margin-top: 15px;
|
19 |
+
font-family: "Open Sans",sans-serif;
|
20 |
+
font-weight: bold;
|
21 |
+
font-style: normal;
|
22 |
+
font-size: 1.7em;
|
23 |
+
}
|
24 |
+
|
25 |
+
.settings-menu{
|
26 |
+
margin-top: 0.5em;
|
27 |
+
margin-left:0.5em;
|
28 |
+
width: 100%;
|
29 |
+
font-size:14px;
|
30 |
+
font-family: "Open Sans",sans-serif !important;
|
31 |
+
padding: 30px;
|
32 |
+
}
|
33 |
+
|
34 |
+
.settings-menu th{
|
35 |
+
font-weight: 600;
|
36 |
+
line-height: 1.3;
|
37 |
+
padding: 10px 5px 10px 0;
|
38 |
+
text-align: left;
|
39 |
+
vertical-align: top;
|
40 |
+
width: 450px;
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
.container-fluid {
|
45 |
/* padding-left: 20px; */
|
46 |
padding-right: 20px;
|
385 |
}
|
386 |
|
387 |
.left_align {
|
388 |
+
width: 53.5%;
|
389 |
}
|
390 |
|
391 |
.exportmodule > thead > tr > th, .exportmodule > tbody > tr > th, .exportmodule > tfoot > tr > th, .exportmodule > thead > tr > td, .exportmodule > tbody > tr > td, .exportmodule > tfoot > tr > td {
|
images/Importicon_24.png
CHANGED
File without changes
|
images/facebook.png
CHANGED
File without changes
|
images/googleplus.png
CHANGED
File without changes
|
images/icon.png
CHANGED
File without changes
|
images/linkedin.png
CHANGED
File without changes
|
images/twitter.png
CHANGED
File without changes
|
includes/WPImporter_includes_helper.php
CHANGED
@@ -101,10 +101,10 @@ class WPImporter_includes_helper {
|
|
101 |
<option value='0'>Status as in CSV</option>
|
102 |
<option value='1'>Publish</option>
|
103 |
<option value='2'>Sticky</option>
|
104 |
-
<option value='
|
105 |
-
<option value='
|
106 |
-
<option value='
|
107 |
-
<option value='
|
108 |
</select></div>
|
109 |
<div style='float:right;'>
|
110 |
<a href='#' class='tooltip'>
|
@@ -247,16 +247,12 @@ class WPImporter_includes_helper {
|
|
247 |
$this->defCols ["CF: " . $val] = $val;
|
248 |
}
|
249 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
250 |
-
if ($wpcsvfreesettings) {
|
251 |
-
if (in_array('aioseo', $wpcsvfreesettings)) {
|
252 |
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)) {
|
253 |
$seo_custoFields = array('SEO: keywords', 'SEO: description', 'SEO: title', 'SEO: noindex', 'SEO: nofollow', 'SEO: titleatr', 'SEO: menulabel', 'SEO: disable', 'SEO: disable_analytics', 'SEO: noodp', 'SEO: noydir');
|
254 |
foreach ($seo_custoFields as $val) {
|
255 |
$this->defCols[$val] = $val;
|
256 |
}
|
257 |
}
|
258 |
-
}
|
259 |
-
}
|
260 |
}
|
261 |
|
262 |
/**
|
@@ -293,6 +289,18 @@ class WPImporter_includes_helper {
|
|
293 |
return $csv->data;
|
294 |
}
|
295 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
/**
|
297 |
* Manage duplicates
|
298 |
*
|
@@ -624,10 +632,13 @@ class WPImporter_includes_helper {
|
|
624 |
$poststatus = substr($poststatus_pwd, 1);
|
625 |
$stripPSL = substr($poststatus, -1);
|
626 |
if ($stripPSL == '}') {
|
627 |
-
$postpwd = substr($poststatus,
|
628 |
$data_array['post_status'] = 'publish';
|
629 |
$data_array ['post_password'] = $postpwd;
|
|
|
630 |
$this->detailedLog[$currentLimit]['poststatus'] = "<b>" . __('Status', 'wp-ultimate-csv-importer') . " - </b>" . __('protected with password', 'wp-ultimate-csv-importer');
|
|
|
|
|
631 |
} else {
|
632 |
$data_array['post_status'] = 'publish';
|
633 |
$this->detailedLog[$currentLimit]['poststatus'] = "<b>" . __('Status', 'wp-ultimate-csv-importer') . " - </b>" . __('publish', 'wp-ultimate-csv-importer');
|
@@ -765,9 +776,9 @@ class WPImporter_includes_helper {
|
|
765 |
|
766 |
//add global password
|
767 |
if ($data_array) {
|
768 |
-
if ($ret_array['importallwithps'] ==
|
769 |
$data_array['post_password'] = $ret_array['globalpassword_txt'];
|
770 |
-
$this->detailedLog[$currentLimit]['poststatus'] = "<b>" . __('Status', 'wp-ultimate-csv-importer') . " - </b>" . __('protected with password', 'wp-ultimate-csv-importer')
|
771 |
}
|
772 |
}
|
773 |
if ($data_array) {
|
@@ -984,8 +995,8 @@ class WPImporter_includes_helper {
|
|
984 |
* Feature added by Fredrick on version3.5.4
|
985 |
*/
|
986 |
function importSEOfields($array, $postId) {
|
987 |
-
$seo_opt = get_option('
|
988 |
-
if (in_array('
|
989 |
if (isset($array['keywords'])) {
|
990 |
$custom_array['_aioseop_keywords'] = $array['keywords'];
|
991 |
}
|
@@ -1255,6 +1266,83 @@ class WPImporter_includes_helper {
|
|
1255 |
return $result;
|
1256 |
|
1257 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1258 |
}
|
1259 |
|
1260 |
class CallWPImporterObj extends WPImporter_includes_helper {
|
101 |
<option value='0'>Status as in CSV</option>
|
102 |
<option value='1'>Publish</option>
|
103 |
<option value='2'>Sticky</option>
|
104 |
+
<option value='3'>Private</option>
|
105 |
+
<option value='6'>Protected</option>
|
106 |
+
<option value='4'>Draft</option>
|
107 |
+
<option value='5'>Pending</option>
|
108 |
</select></div>
|
109 |
<div style='float:right;'>
|
110 |
<a href='#' class='tooltip'>
|
247 |
$this->defCols ["CF: " . $val] = $val;
|
248 |
}
|
249 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
|
|
|
|
250 |
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)) {
|
251 |
$seo_custoFields = array('SEO: keywords', 'SEO: description', 'SEO: title', 'SEO: noindex', 'SEO: nofollow', 'SEO: titleatr', 'SEO: menulabel', 'SEO: disable', 'SEO: disable_analytics', 'SEO: noodp', 'SEO: noydir');
|
252 |
foreach ($seo_custoFields as $val) {
|
253 |
$this->defCols[$val] = $val;
|
254 |
}
|
255 |
}
|
|
|
|
|
256 |
}
|
257 |
|
258 |
/**
|
289 |
return $csv->data;
|
290 |
}
|
291 |
|
292 |
+
|
293 |
+
function get_availgroups($module) {
|
294 |
+
$groups = array();
|
295 |
+
if ($module == 'post' || $module == 'page' || $module == 'custompost' || $module == 'eshop') {
|
296 |
+
$groups = array('','core','addcore','seo');
|
297 |
+
}
|
298 |
+
if ($module == 'users') {
|
299 |
+
$groups = array('');
|
300 |
+
}
|
301 |
+
return $groups;
|
302 |
+
}
|
303 |
+
|
304 |
/**
|
305 |
* Manage duplicates
|
306 |
*
|
632 |
$poststatus = substr($poststatus_pwd, 1);
|
633 |
$stripPSL = substr($poststatus, -1);
|
634 |
if ($stripPSL == '}') {
|
635 |
+
$postpwd = substr($poststatus, 0, -1);
|
636 |
$data_array['post_status'] = 'publish';
|
637 |
$data_array ['post_password'] = $postpwd;
|
638 |
+
if (strlen($postpwd) !=0)
|
639 |
$this->detailedLog[$currentLimit]['poststatus'] = "<b>" . __('Status', 'wp-ultimate-csv-importer') . " - </b>" . __('protected with password', 'wp-ultimate-csv-importer');
|
640 |
+
else
|
641 |
+
$this->detailedLog[$currentLimit]['poststatus'] = "<b>". __('Status','csv-import')." - </b>".__('publish','csv-import');
|
642 |
} else {
|
643 |
$data_array['post_status'] = 'publish';
|
644 |
$this->detailedLog[$currentLimit]['poststatus'] = "<b>" . __('Status', 'wp-ultimate-csv-importer') . " - </b>" . __('publish', 'wp-ultimate-csv-importer');
|
776 |
|
777 |
//add global password
|
778 |
if ($data_array) {
|
779 |
+
if ($ret_array['importallwithps'] == 6) {
|
780 |
$data_array['post_password'] = $ret_array['globalpassword_txt'];
|
781 |
+
$this->detailedLog[$currentLimit]['poststatus'] = "<b>" . __('Status', 'wp-ultimate-csv-importer') . " - </b>" . __('protected with password', 'wp-ultimate-csv-importer');
|
782 |
}
|
783 |
}
|
784 |
if ($data_array) {
|
995 |
* Feature added by Fredrick on version3.5.4
|
996 |
*/
|
997 |
function importSEOfields($array, $postId) {
|
998 |
+
$seo_opt = get_option('active_plugins');
|
999 |
+
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $seo_opt)) {
|
1000 |
if (isset($array['keywords'])) {
|
1001 |
$custom_array['_aioseop_keywords'] = $array['keywords'];
|
1002 |
}
|
1266 |
return $result;
|
1267 |
|
1268 |
}
|
1269 |
+
public function getStatsWithDate() {
|
1270 |
+
global $wpdb;
|
1271 |
+
$returnArray = array();
|
1272 |
+
$plot =array();
|
1273 |
+
$get_imptype = array('Post','Page','Comments','Custom Post','Users','Eshop');
|
1274 |
+
$mon_year = array(11 => 'Nov',10 =>'Oct',9 =>'Sep',8 =>'Aug',7 => 'Jul', 6 => 'Jun', 5 => 'May' ,4 => 'Apr', 3 => 'Mar', 2 => 'Feb', 1 => 'Jan',12 => 'Dec');
|
1275 |
+
$today = date("Y-m-d H:i:s");
|
1276 |
+
for($i = 0; $i <= 11; $i++) {
|
1277 |
+
$month[] = date("M", strtotime( $today." -$i months"));
|
1278 |
+
$year[] = date("Y", strtotime( $today." -$i months"));
|
1279 |
+
}
|
1280 |
+
foreach($month as $mkey) {
|
1281 |
+
foreach($year as $ykey) {
|
1282 |
+
$mon_num = array_search($mkey,$mon_year);
|
1283 |
+
$postCount = $pageCount = $customCount = $userCount = $shopCount = 0;
|
1284 |
+
$j = 0;
|
1285 |
+
$plot = $wpdb->get_results("select inserted,imported_type from smackcsv_line_log where imported_type in ('Post','Page','Comments','Custom Post','Users','Eshop') and month = '{$mkey}' and year = '{$ykey}'");
|
1286 |
+
foreach($plot as $pkey) {
|
1287 |
+
switch ($pkey->imported_type) {
|
1288 |
+
case 'Post':
|
1289 |
+
$postCount += $pkey->inserted;
|
1290 |
+
break;
|
1291 |
+
case 'Page':
|
1292 |
+
$pageCount += $pkey->inserted;
|
1293 |
+
break;
|
1294 |
+
case 'Custom Post':
|
1295 |
+
$customCount += $pkey->inserted;
|
1296 |
+
break;
|
1297 |
+
case 'Users':
|
1298 |
+
$userCount += $pkey->inserted;
|
1299 |
+
break;
|
1300 |
+
case 'Eshop':
|
1301 |
+
$shopCount += $pkey->inserted;
|
1302 |
+
break;
|
1303 |
+
default:
|
1304 |
+
break;
|
1305 |
+
}
|
1306 |
+
$returnArray[$j] = array('year' => ''.$ykey.'-'.$mon_num.'','post' => (int)$postCount,'page' => (int)$pageCount,'custompost' => (int)$customCount, 'users' => (int)$userCount, 'eshop' => (int)$shopCount);
|
1307 |
+
$j++;
|
1308 |
+
}
|
1309 |
+
}
|
1310 |
+
}
|
1311 |
+
if(empty($returnArray)){
|
1312 |
+
$returnArray[$j] = array('year' => ''.date('Y').'-'.date('m').'','post' => 0,'page' => 0,'custompost' => 0, 'users' => 0, 'eshop' => 0);
|
1313 |
+
|
1314 |
+
}
|
1315 |
+
$reqarr = array();
|
1316 |
+
$reqarr[0] = $returnArray[count($returnArray) - 1];
|
1317 |
+
return json_encode($reqarr);
|
1318 |
+
}
|
1319 |
+
public function piechart()
|
1320 |
+
{
|
1321 |
+
ob_clean();
|
1322 |
+
global $wpdb;
|
1323 |
+
$blog_id = 1;
|
1324 |
+
$returnArray = array();
|
1325 |
+
$imptype = array('Post','Page','Comments','Custom Post','Users','Eshop');
|
1326 |
+
$i = 0;
|
1327 |
+
foreach($imptype as $imp) {
|
1328 |
+
$OverviewDetails = $wpdb->get_results("select * from smackcsv_pie_log where type = '{$imp}' and value != 0");
|
1329 |
+
foreach($OverviewDetails as $overview){
|
1330 |
+
//$returnArray[$i][0] = $overview->type;
|
1331 |
+
//$returnArray[$i][1] = (int)$overview->value;
|
1332 |
+
$returnArray[$i] = array(
|
1333 |
+
'label' => ''.$overview->type.'',
|
1334 |
+
'value' => ''.(int)$overview->value.'',
|
1335 |
+
|
1336 |
+
);
|
1337 |
+
$i++;
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
}
|
1341 |
+
if(empty($returnArray ) ){
|
1342 |
+
$returnArray['label'] = 'No Imports Yet' ;
|
1343 |
+
}
|
1344 |
+
return json_encode($returnArray);
|
1345 |
+
}
|
1346 |
}
|
1347 |
|
1348 |
class CallWPImporterObj extends WPImporter_includes_helper {
|
index.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/******************************
|
3 |
* Plugin Name: WP Ultimate CSV Importer
|
4 |
* Description: A plugin that helps to import the data's from a CSV file.
|
5 |
-
* Version: 3.8.
|
6 |
* Author: smackcoders.com
|
7 |
* Text Domain: wp-ultimate-csv-importer
|
8 |
* Domain Path: /languages
|
@@ -49,7 +49,8 @@ if ( ! defined( 'ABSPATH' ) )
|
|
49 |
exit; // Exit if accessed directly
|
50 |
|
51 |
$get_debug_mode = get_option('wpcsvfreesettings');
|
52 |
-
|
|
|
53 |
error_reporting(0);
|
54 |
ini_set('display_errors', 'Off');
|
55 |
}
|
@@ -79,7 +80,7 @@ define('WP_CONST_ULTIMATE_CSV_IMP_URL', 'http://www.smackcoders.com/wp-ultimate-
|
|
79 |
define('WP_CONST_ULTIMATE_CSV_IMP_NAME', 'WP Ultimate CSV Importer');
|
80 |
define('WP_CONST_ULTIMATE_CSV_IMP_SLUG', 'wp-ultimate-csv-importer');
|
81 |
define('WP_CONST_ULTIMATE_CSV_IMP_SETTINGS', 'WP Ultimate CSV Importer');
|
82 |
-
define('WP_CONST_ULTIMATE_CSV_IMP_VERSION', '3.8.
|
83 |
define('WP_CONST_ULTIMATE_CSV_IMP_DIR', WP_PLUGIN_URL . '/' . WP_CONST_ULTIMATE_CSV_IMP_SLUG . '/');
|
84 |
define('WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY', plugin_dir_path(__FILE__));
|
85 |
define('WP_CSVIMP_PLUGIN_BASE', WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY);
|
@@ -169,9 +170,6 @@ function action_csv_imp_admin_init() {
|
|
169 |
wp_enqueue_style('ultimate-importer-css', plugins_url('css/main.css', __FILE__));
|
170 |
wp_enqueue_style('morris-css', plugins_url('css/morris.css', __FILE__));
|
171 |
// For chart js
|
172 |
-
wp_enqueue_script('high_chart', plugins_url('js/highcharts.js', __FILE__));
|
173 |
-
wp_enqueue_script('export_module', plugins_url('js/exporting.js', __FILE__));
|
174 |
-
wp_enqueue_script('pie_chart', plugins_url('js/highcharts-3d.js', __FILE__));
|
175 |
wp_enqueue_script('dropdown', plugins_url('js/dropdown.js', __FILE__));
|
176 |
wp_enqueue_script('raphael-min-js', plugins_url('js/raphael-min.js', __FILE__));
|
177 |
wp_enqueue_script('morris-min-js', plugins_url('js/morris.min.js', __FILE__));
|
@@ -196,12 +194,12 @@ function smackcsvfree_change_menu_order( $menu_order ) {
|
|
196 |
add_filter( 'custom_menu_order', '__return_true' );
|
197 |
add_filter( 'menu_order', 'smackcsvfree_change_menu_order' );
|
198 |
|
199 |
-
function
|
200 |
require_once("modules/dashboard/actions/chartone.php");
|
201 |
die();
|
202 |
}
|
203 |
|
204 |
-
add_action('
|
205 |
|
206 |
function shownextrecords() {
|
207 |
require_once("templates/readfile.php");
|
@@ -215,12 +213,12 @@ function uploadfilehandle() {
|
|
215 |
}
|
216 |
add_action('wp_ajax_uploadfilehandle','uploadfilehandle');
|
217 |
|
218 |
-
function
|
219 |
require_once("modules/dashboard/actions/chartone.php");
|
220 |
die();
|
221 |
}
|
222 |
|
223 |
-
add_action('
|
224 |
|
225 |
function thirdchart() {
|
226 |
require_once("modules/dashboard/actions/chartone.php");
|
@@ -233,16 +231,9 @@ add_action('wp_ajax_thirdchart', 'thirdchart');
|
|
233 |
function roundchart() {
|
234 |
global $wpdb;
|
235 |
ob_flush();
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
require_once("modules/dashboard/actions/actions.php");
|
240 |
-
?>
|
241 |
-
<?php
|
242 |
-
$myObj = new DashboardActions();
|
243 |
-
|
244 |
-
$content = "<form name='piechart' onload='pieStats();'> <div id ='pieStats' style='height:250px;'>";
|
245 |
-
$content .= $myObj->piechart();
|
246 |
$content .= "</div></form>";
|
247 |
echo $content;
|
248 |
}
|
@@ -250,16 +241,9 @@ function roundchart() {
|
|
250 |
function linetwoStats() {
|
251 |
global $wpdb;
|
252 |
ob_flush();
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
require_once("modules/dashboard/actions/actions.php");
|
257 |
-
?>
|
258 |
-
<?php
|
259 |
-
$myObj = new DashboardActions();
|
260 |
-
|
261 |
-
$content = "<form name='piechart' onload='pieStats();'> <div id ='lineStats' style='height:250px'>";
|
262 |
-
$content .= $myObj->getStatsWithDate();
|
263 |
$content .= "</div></form>";
|
264 |
echo $content;
|
265 |
}
|
@@ -267,10 +251,8 @@ function linetwoStats() {
|
|
267 |
|
268 |
function wpcsvimporter_add_dashboard_widgets() {
|
269 |
|
270 |
-
wp_enqueue_script('
|
271 |
-
|
272 |
-
wp_enqueue_script('export_module', plugins_url('js/exporting.js', __FILE__));
|
273 |
-
wp_enqueue_script('pie_chart', plugins_url('js/highcharts-3d.js', __FILE__));
|
274 |
wp_enqueue_script('raphael-min-js', plugins_url('js/raphael-min.js', __FILE__));
|
275 |
wp_enqueue_script('morris-min-js', plugins_url('js/morris.min.js', __FILE__));
|
276 |
wp_add_dashboard_widget('wpcsvimporter_dashboard_piehart', 'Ultimate-CSV-Importer-Statistics', 'roundchart',$screen = get_current_screen() , 'advanced' ,'high' );
|
2 |
/******************************
|
3 |
* Plugin Name: WP Ultimate CSV Importer
|
4 |
* Description: A plugin that helps to import the data's from a CSV file.
|
5 |
+
* Version: 3.8.5
|
6 |
* Author: smackcoders.com
|
7 |
* Text Domain: wp-ultimate-csv-importer
|
8 |
* Domain Path: /languages
|
49 |
exit; // Exit if accessed directly
|
50 |
|
51 |
$get_debug_mode = get_option('wpcsvfreesettings');
|
52 |
+
$debug_md = isset($get_debug_mode['debug_mode']) ? $get_debug_mode['debug_mode'] : '';
|
53 |
+
if($debug_md != 'enable_debug'){
|
54 |
error_reporting(0);
|
55 |
ini_set('display_errors', 'Off');
|
56 |
}
|
80 |
define('WP_CONST_ULTIMATE_CSV_IMP_NAME', 'WP Ultimate CSV Importer');
|
81 |
define('WP_CONST_ULTIMATE_CSV_IMP_SLUG', 'wp-ultimate-csv-importer');
|
82 |
define('WP_CONST_ULTIMATE_CSV_IMP_SETTINGS', 'WP Ultimate CSV Importer');
|
83 |
+
define('WP_CONST_ULTIMATE_CSV_IMP_VERSION', '3.8.5');
|
84 |
define('WP_CONST_ULTIMATE_CSV_IMP_DIR', WP_PLUGIN_URL . '/' . WP_CONST_ULTIMATE_CSV_IMP_SLUG . '/');
|
85 |
define('WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY', plugin_dir_path(__FILE__));
|
86 |
define('WP_CSVIMP_PLUGIN_BASE', WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY);
|
170 |
wp_enqueue_style('ultimate-importer-css', plugins_url('css/main.css', __FILE__));
|
171 |
wp_enqueue_style('morris-css', plugins_url('css/morris.css', __FILE__));
|
172 |
// For chart js
|
|
|
|
|
|
|
173 |
wp_enqueue_script('dropdown', plugins_url('js/dropdown.js', __FILE__));
|
174 |
wp_enqueue_script('raphael-min-js', plugins_url('js/raphael-min.js', __FILE__));
|
175 |
wp_enqueue_script('morris-min-js', plugins_url('js/morris.min.js', __FILE__));
|
194 |
add_filter( 'custom_menu_order', '__return_true' );
|
195 |
add_filter( 'menu_order', 'smackcsvfree_change_menu_order' );
|
196 |
|
197 |
+
function firstultimatecsvchart() {
|
198 |
require_once("modules/dashboard/actions/chartone.php");
|
199 |
die();
|
200 |
}
|
201 |
|
202 |
+
add_action('wp_ajax_firstultimatecsvchart', 'firstultimatecsvchart');
|
203 |
|
204 |
function shownextrecords() {
|
205 |
require_once("templates/readfile.php");
|
213 |
}
|
214 |
add_action('wp_ajax_uploadfilehandle','uploadfilehandle');
|
215 |
|
216 |
+
function secondultimatecsvchart() {
|
217 |
require_once("modules/dashboard/actions/chartone.php");
|
218 |
die();
|
219 |
}
|
220 |
|
221 |
+
add_action('wp_ajax_secondultimatecsvchart', 'secondultimatecsvchart');
|
222 |
|
223 |
function thirdchart() {
|
224 |
require_once("modules/dashboard/actions/chartone.php");
|
231 |
function roundchart() {
|
232 |
global $wpdb;
|
233 |
ob_flush();
|
234 |
+
$myObj = new WPImporter_includes_helper();
|
235 |
+
$content = "<form name='piechart'> <div id ='ultimatecsv_pieStats' style='height:250px;'>";
|
236 |
+
$myObj->piechart();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
$content .= "</div></form>";
|
238 |
echo $content;
|
239 |
}
|
241 |
function linetwoStats() {
|
242 |
global $wpdb;
|
243 |
ob_flush();
|
244 |
+
$myObj = new WPImporter_includes_helper();
|
245 |
+
$content = "<form name='piechart'> <div id ='ultimatecsv_lineStats' style='height:250px'>";
|
246 |
+
$myObj->getStatsWithDate();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
$content .= "</div></form>";
|
248 |
echo $content;
|
249 |
}
|
251 |
|
252 |
function wpcsvimporter_add_dashboard_widgets() {
|
253 |
|
254 |
+
wp_enqueue_script('dashultimatecsvchart', plugins_url('js/dashchart-widget.js', __FILE__));
|
255 |
+
wp_enqueue_style('morris-css', plugins_url('css/morris.css', __FILE__));
|
|
|
|
|
256 |
wp_enqueue_script('raphael-min-js', plugins_url('js/raphael-min.js', __FILE__));
|
257 |
wp_enqueue_script('morris-min-js', plugins_url('js/morris.min.js', __FILE__));
|
258 |
wp_add_dashboard_widget('wpcsvimporter_dashboard_piehart', 'Ultimate-CSV-Importer-Statistics', 'roundchart',$screen = get_current_screen() , 'advanced' ,'high' );
|
js/dashchart-widget.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
jQuery( document ).ready(function() {
|
2 |
-
|
3 |
-
|
4 |
});
|
5 |
|
6 |
-
function
|
7 |
{
|
8 |
jQuery.ajax({
|
9 |
type: 'POST',
|
10 |
url: ajaxurl,
|
11 |
data: {
|
12 |
-
'action' : '
|
13 |
'postdata' : 'firstchartdata',
|
14 |
},
|
15 |
dataType: 'json',
|
@@ -17,11 +17,11 @@ jQuery.ajax({
|
|
17 |
success: function(data) {
|
18 |
var val = JSON.parse(data);
|
19 |
if (val['label'] == 'No Imports Yet') {
|
20 |
-
document.getElementById('
|
21 |
return false;
|
22 |
}
|
23 |
Morris.Donut({
|
24 |
-
element: '
|
25 |
data: val//[
|
26 |
//{label: val[0][0], value: value[0][1]}
|
27 |
//{label: "page", value: 30},
|
@@ -32,12 +32,12 @@ jQuery.ajax({
|
|
32 |
});
|
33 |
}
|
34 |
|
35 |
-
function
|
36 |
jQuery.ajax({
|
37 |
type: 'POST',
|
38 |
url: ajaxurl,
|
39 |
data: {
|
40 |
-
'action' : '
|
41 |
'postdata' : 'secondchartdata',
|
42 |
},
|
43 |
dataType: 'json',
|
@@ -47,7 +47,7 @@ jQuery.ajax({
|
|
47 |
var val = JSON.parse(result);
|
48 |
var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
49 |
Morris.Line({
|
50 |
-
element: '
|
51 |
data : val,
|
52 |
xkey: 'year',
|
53 |
ykeys: ['post', 'page','custompost','users','eshop'],
|
1 |
jQuery( document ).ready(function() {
|
2 |
+
ultimatecsv_piechart();
|
3 |
+
ultimatecsv_linechart();
|
4 |
});
|
5 |
|
6 |
+
function ultimatecsv_piechart()
|
7 |
{
|
8 |
jQuery.ajax({
|
9 |
type: 'POST',
|
10 |
url: ajaxurl,
|
11 |
data: {
|
12 |
+
'action' : 'firstultimatecsvchart',
|
13 |
'postdata' : 'firstchartdata',
|
14 |
},
|
15 |
dataType: 'json',
|
17 |
success: function(data) {
|
18 |
var val = JSON.parse(data);
|
19 |
if (val['label'] == 'No Imports Yet') {
|
20 |
+
document.getElementById('ultimatecsv_pieStats').innerHTML = "<h2 style='color: red;text-align: center;padding-top: 100px;' >No Imports Yet</h2>";
|
21 |
return false;
|
22 |
}
|
23 |
Morris.Donut({
|
24 |
+
element: 'ultimatecsv_pieStats',
|
25 |
data: val//[
|
26 |
//{label: val[0][0], value: value[0][1]}
|
27 |
//{label: "page", value: 30},
|
32 |
});
|
33 |
}
|
34 |
|
35 |
+
function ultimatecsv_linechart() {
|
36 |
jQuery.ajax({
|
37 |
type: 'POST',
|
38 |
url: ajaxurl,
|
39 |
data: {
|
40 |
+
'action' : 'secondultimatecsvchart',
|
41 |
'postdata' : 'secondchartdata',
|
42 |
},
|
43 |
dataType: 'json',
|
47 |
var val = JSON.parse(result);
|
48 |
var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
49 |
Morris.Line({
|
50 |
+
element: 'ultimatecsv_lineStats',
|
51 |
data : val,
|
52 |
xkey: 'year',
|
53 |
ykeys: ['post', 'page','custompost','users','eshop'],
|
js/dashchart.js
CHANGED
@@ -11,7 +11,7 @@ jQuery.ajax({
|
|
11 |
type: 'POST',
|
12 |
url: ajaxurl,
|
13 |
data: {
|
14 |
-
'action' : '
|
15 |
'postdata' : 'firstchartdata',
|
16 |
},
|
17 |
dataType: 'json',
|
@@ -39,7 +39,7 @@ jQuery.ajax({
|
|
39 |
type: 'POST',
|
40 |
url: ajaxurl,
|
41 |
data: {
|
42 |
-
'action' : '
|
43 |
'postdata' : 'secondchartdata',
|
44 |
},
|
45 |
dataType: 'json',
|
11 |
type: 'POST',
|
12 |
url: ajaxurl,
|
13 |
data: {
|
14 |
+
'action' : 'firstultimatecsvchart',
|
15 |
'postdata' : 'firstchartdata',
|
16 |
},
|
17 |
dataType: 'json',
|
39 |
type: 'POST',
|
40 |
url: ajaxurl,
|
41 |
data: {
|
42 |
+
'action' : 'secondultimatecsvchart',
|
43 |
'postdata' : 'secondchartdata',
|
44 |
},
|
45 |
dataType: 'json',
|
js/exporting.js
DELETED
@@ -1,243 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Highcharts JS v4.0.1 (2014-04-24)
|
3 |
-
Exporting module
|
4 |
-
|
5 |
-
(c) 2010-2014 Torstein Honsi
|
6 |
-
|
7 |
-
License: www.highcharts.com/license
|
8 |
-
*/
|
9 |
-
(function (f) {
|
10 |
-
var A = f.Chart, t = f.addEvent, B = f.removeEvent, l = f.createElement, o = f.discardElement, v = f.css, k = f.merge, r = f.each, p = f.extend, D = Math.max, j = document, C = window, E = f.isTouchDevice, F = f.Renderer.prototype.symbols, s = f.getOptions(), y;
|
11 |
-
p(s.lang, {
|
12 |
-
printChart: "Print chart",
|
13 |
-
downloadPNG: "Download PNG image",
|
14 |
-
downloadJPEG: "Download JPEG image",
|
15 |
-
downloadPDF: "Download PDF document",
|
16 |
-
downloadSVG: "Download SVG vector image",
|
17 |
-
contextButtonTitle: "Chart context menu"
|
18 |
-
});
|
19 |
-
s.navigation = {
|
20 |
-
menuStyle: {
|
21 |
-
border: "1px solid #A0A0A0",
|
22 |
-
background: "#FFFFFF", padding: "5px 0"
|
23 |
-
},
|
24 |
-
menuItemStyle: {padding: "0 10px", background: "none", color: "#303030", fontSize: E ? "14px" : "11px"},
|
25 |
-
menuItemHoverStyle: {background: "#4572A5", color: "#FFFFFF"},
|
26 |
-
buttonOptions: {
|
27 |
-
symbolFill: "#E0E0E0",
|
28 |
-
symbolSize: 14,
|
29 |
-
symbolStroke: "#666",
|
30 |
-
symbolStrokeWidth: 3,
|
31 |
-
symbolX: 12.5,
|
32 |
-
symbolY: 10.5,
|
33 |
-
align: "right",
|
34 |
-
buttonSpacing: 3,
|
35 |
-
height: 22,
|
36 |
-
theme: {fill: "white", stroke: "none"},
|
37 |
-
verticalAlign: "top",
|
38 |
-
width: 24
|
39 |
-
}
|
40 |
-
};
|
41 |
-
s.exporting = {
|
42 |
-
type: "image/png", url: "http://export.highcharts.com/", buttons: {
|
43 |
-
contextButton: {
|
44 |
-
menuClassName: "highcharts-contextmenu",
|
45 |
-
symbol: "menu",
|
46 |
-
_titleKey: "contextButtonTitle",
|
47 |
-
menuItems: [{
|
48 |
-
textKey: "printChart", onclick: function () {
|
49 |
-
this.print()
|
50 |
-
}
|
51 |
-
}, {separator: !0}, {
|
52 |
-
textKey: "downloadPNG", onclick: function () {
|
53 |
-
this.exportChart()
|
54 |
-
}
|
55 |
-
}, {
|
56 |
-
textKey: "downloadJPEG", onclick: function () {
|
57 |
-
this.exportChart({type: "image/jpeg"})
|
58 |
-
}
|
59 |
-
}, {
|
60 |
-
textKey: "downloadPDF", onclick: function () {
|
61 |
-
this.exportChart({type: "application/pdf"})
|
62 |
-
}
|
63 |
-
}, {
|
64 |
-
textKey: "downloadSVG", onclick: function () {
|
65 |
-
this.exportChart({type: "image/svg+xml"})
|
66 |
-
}
|
67 |
-
}]
|
68 |
-
}
|
69 |
-
}
|
70 |
-
};
|
71 |
-
f.post = function (b, a, d) {
|
72 |
-
var c, b = l("form", k({
|
73 |
-
method: "post",
|
74 |
-
action: b, enctype: "multipart/form-data"
|
75 |
-
}, d), {display: "none"}, j.body);
|
76 |
-
for (c in a)l("input", {type: "hidden", name: c, value: a[c]}, null, b);
|
77 |
-
b.submit();
|
78 |
-
o(b)
|
79 |
-
};
|
80 |
-
p(A.prototype, {
|
81 |
-
getSVG: function (b) {
|
82 |
-
var a = this, d, c, z, h, g = k(a.options, b);
|
83 |
-
if (!j.createElementNS)j.createElementNS = function (a, b) {
|
84 |
-
return j.createElement(b)
|
85 |
-
};
|
86 |
-
b = l("div", null, {
|
87 |
-
position: "absolute",
|
88 |
-
top: "-9999em",
|
89 |
-
width: a.chartWidth + "px",
|
90 |
-
height: a.chartHeight + "px"
|
91 |
-
}, j.body);
|
92 |
-
c = a.renderTo.style.width;
|
93 |
-
h = a.renderTo.style.height;
|
94 |
-
c = g.exporting.sourceWidth || g.chart.width ||
|
95 |
-
/px$/.test(c) && parseInt(c, 10) || 600;
|
96 |
-
h = g.exporting.sourceHeight || g.chart.height || /px$/.test(h) && parseInt(h, 10) || 400;
|
97 |
-
p(g.chart, {animation: !1, renderTo: b, forExport: !0, width: c, height: h});
|
98 |
-
g.exporting.enabled = !1;
|
99 |
-
g.series = [];
|
100 |
-
r(a.series, function (a) {
|
101 |
-
z = k(a.options, {animation: !1, showCheckbox: !1, visible: a.visible});
|
102 |
-
z.isInternal || g.series.push(z)
|
103 |
-
});
|
104 |
-
d = new f.Chart(g, a.callback);
|
105 |
-
r(["xAxis", "yAxis"], function (b) {
|
106 |
-
r(a[b], function (a, c) {
|
107 |
-
var g = d[b][c], f = a.getExtremes(), h = f.userMin, f = f.userMax;
|
108 |
-
g && (h !== void 0 || f !== void 0) &&
|
109 |
-
g.setExtremes(h, f, !0, !1)
|
110 |
-
})
|
111 |
-
});
|
112 |
-
c = d.container.innerHTML;
|
113 |
-
g = null;
|
114 |
-
d.destroy();
|
115 |
-
o(b);
|
116 |
-
c = c.replace(/zIndex="[^"]+"/g, "").replace(/isShadow="[^"]+"/g, "").replace(/symbolName="[^"]+"/g, "").replace(/jQuery[0-9]+="[^"]+"/g, "").replace(/url\([^#]+#/g, "url(#").replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ href=/g, " xlink:href=").replace(/\n/, " ").replace(/<\/svg>.*?$/, "</svg>").replace(/ /g, " ").replace(/­/g, "").replace(/<IMG /g, "<image ").replace(/height=([^" ]+)/g, 'height="$1"').replace(/width=([^" ]+)/g,
|
117 |
-
'width="$1"').replace(/hc-svg-href="([^"]+)">/g, 'xlink:href="$1"/>').replace(/id=([^" >]+)/g, 'id="$1"').replace(/class=([^" >]+)/g, 'class="$1"').replace(/ transform /g, " ").replace(/:(path|rect)/g, "$1").replace(/style="([^"]+)"/g, function (a) {
|
118 |
-
return a.toLowerCase()
|
119 |
-
});
|
120 |
-
return c = c.replace(/(url\(#highcharts-[0-9]+)"/g, "$1").replace(/"/g, "'")
|
121 |
-
}, exportChart: function (b, a) {
|
122 |
-
var b = b || {}, d = this.options.exporting, d = this.getSVG(k({chart: {borderRadius: 0}}, d.chartOptions, a, {
|
123 |
-
exporting: {
|
124 |
-
sourceWidth: b.sourceWidth ||
|
125 |
-
d.sourceWidth, sourceHeight: b.sourceHeight || d.sourceHeight
|
126 |
-
}
|
127 |
-
})), b = k(this.options.exporting, b);
|
128 |
-
f.post(b.url, {
|
129 |
-
filename: b.filename || "chart",
|
130 |
-
type: b.type,
|
131 |
-
width: b.width || 0,
|
132 |
-
scale: b.scale || 2,
|
133 |
-
svg: d
|
134 |
-
}, b.formAttributes)
|
135 |
-
}, print: function () {
|
136 |
-
var b = this, a = b.container, d = [], c = a.parentNode, f = j.body, h = f.childNodes;
|
137 |
-
if (!b.isPrinting)b.isPrinting = !0, r(h, function (a, b) {
|
138 |
-
if (a.nodeType === 1)d[b] = a.style.display, a.style.display = "none"
|
139 |
-
}), f.appendChild(a), C.focus(), C.print(), setTimeout(function () {
|
140 |
-
c.appendChild(a);
|
141 |
-
r(h, function (a, b) {
|
142 |
-
if (a.nodeType ===
|
143 |
-
1)a.style.display = d[b]
|
144 |
-
});
|
145 |
-
b.isPrinting = !1
|
146 |
-
}, 1E3)
|
147 |
-
}, contextMenu: function (b, a, d, c, f, h, g) {
|
148 |
-
var e = this, k = e.options.navigation, q = k.menuItemStyle, m = e.chartWidth, n = e.chartHeight, j = "cache-" + b, i = e[j], u = D(f, h), w, x, o, s = function (a) {
|
149 |
-
e.pointer.inClass(a.target, b) || x()
|
150 |
-
};
|
151 |
-
if (!i)e[j] = i = l("div", {className: b}, {
|
152 |
-
position: "absolute",
|
153 |
-
zIndex: 1E3,
|
154 |
-
padding: u + "px"
|
155 |
-
}, e.container), w = l("div", null, p({
|
156 |
-
MozBoxShadow: "3px 3px 10px #888",
|
157 |
-
WebkitBoxShadow: "3px 3px 10px #888",
|
158 |
-
boxShadow: "3px 3px 10px #888"
|
159 |
-
}, k.menuStyle), i), x = function () {
|
160 |
-
v(i, {display: "none"});
|
161 |
-
g && g.setState(0);
|
162 |
-
e.openMenu = !1
|
163 |
-
}, t(i, "mouseleave", function () {
|
164 |
-
o = setTimeout(x, 500)
|
165 |
-
}), t(i, "mouseenter", function () {
|
166 |
-
clearTimeout(o)
|
167 |
-
}), t(document, "mouseup", s), t(e, "destroy", function () {
|
168 |
-
B(document, "mouseup", s)
|
169 |
-
}), r(a, function (a) {
|
170 |
-
if (a) {
|
171 |
-
var b = a.separator ? l("hr", null, null, w) : l("div", {
|
172 |
-
onmouseover: function () {
|
173 |
-
v(this, k.menuItemHoverStyle)
|
174 |
-
}, onmouseout: function () {
|
175 |
-
v(this, q)
|
176 |
-
}, onclick: function () {
|
177 |
-
x();
|
178 |
-
a.onclick.apply(e, arguments)
|
179 |
-
}, innerHTML: a.text || e.options.lang[a.textKey]
|
180 |
-
}, p({cursor: "pointer"}, q), w);
|
181 |
-
e.exportDivElements.push(b)
|
182 |
-
}
|
183 |
-
}),
|
184 |
-
e.exportDivElements.push(w, i), e.exportMenuWidth = i.offsetWidth, e.exportMenuHeight = i.offsetHeight;
|
185 |
-
a = {display: "block"};
|
186 |
-
d + e.exportMenuWidth > m ? a.right = m - d - f - u + "px" : a.left = d - u + "px";
|
187 |
-
c + h + e.exportMenuHeight > n && g.alignOptions.verticalAlign !== "top" ? a.bottom = n - c - u + "px" : a.top = c + h - u + "px";
|
188 |
-
v(i, a);
|
189 |
-
e.openMenu = !0
|
190 |
-
}, addButton: function (b) {
|
191 |
-
var a = this, d = a.renderer, c = k(a.options.navigation.buttonOptions, b), j = c.onclick, h = c.menuItems, g, e, l = {
|
192 |
-
stroke: c.symbolStroke,
|
193 |
-
fill: c.symbolFill
|
194 |
-
}, q = c.symbolSize || 12;
|
195 |
-
if (!a.btnCount)a.btnCount =
|
196 |
-
0;
|
197 |
-
if (!a.exportDivElements)a.exportDivElements = [], a.exportSVGElements = [];
|
198 |
-
if (c.enabled !== !1) {
|
199 |
-
var m = c.theme, n = m.states, o = n && n.hover, n = n && n.select, i;
|
200 |
-
delete m.states;
|
201 |
-
j ? i = function () {
|
202 |
-
j.apply(a, arguments)
|
203 |
-
} : h && (i = function () {
|
204 |
-
a.contextMenu(e.menuClassName, h, e.translateX, e.translateY, e.width, e.height, e);
|
205 |
-
e.setState(2)
|
206 |
-
});
|
207 |
-
c.text && c.symbol ? m.paddingLeft = f.pick(m.paddingLeft, 25) : c.text || p(m, {
|
208 |
-
width: c.width,
|
209 |
-
height: c.height,
|
210 |
-
padding: 0
|
211 |
-
});
|
212 |
-
e = d.button(c.text, 0, 0, i, m, o, n).attr({
|
213 |
-
title: a.options.lang[c._titleKey],
|
214 |
-
"stroke-linecap": "round"
|
215 |
-
});
|
216 |
-
e.menuClassName = b.menuClassName || "highcharts-menu-" + a.btnCount++;
|
217 |
-
c.symbol && (g = d.symbol(c.symbol, c.symbolX - q / 2, c.symbolY - q / 2, q, q).attr(p(l, {
|
218 |
-
"stroke-width": c.symbolStrokeWidth || 1,
|
219 |
-
zIndex: 1
|
220 |
-
})).add(e));
|
221 |
-
e.add().align(p(c, {width: e.width, x: f.pick(c.x, y)}), !0, "spacingBox");
|
222 |
-
y += (e.width + c.buttonSpacing) * (c.align === "right" ? -1 : 1);
|
223 |
-
a.exportSVGElements.push(e, g)
|
224 |
-
}
|
225 |
-
}, destroyExport: function (b) {
|
226 |
-
var b = b.target, a, d;
|
227 |
-
for (a = 0; a < b.exportSVGElements.length; a++)if (d = b.exportSVGElements[a])d.onclick = d.ontouchstart = null, b.exportSVGElements[a] =
|
228 |
-
d.destroy();
|
229 |
-
for (a = 0; a < b.exportDivElements.length; a++)d = b.exportDivElements[a], B(d, "mouseleave"), b.exportDivElements[a] = d.onmouseout = d.onmouseover = d.ontouchstart = d.onclick = null, o(d)
|
230 |
-
}
|
231 |
-
});
|
232 |
-
F.menu = function (b, a, d, c) {
|
233 |
-
return ["M", b, a + 2.5, "L", b + d, a + 2.5, "M", b, a + c / 2 + 0.5, "L", b + d, a + c / 2 + 0.5, "M", b, a + c - 1.5, "L", b + d, a + c - 1.5]
|
234 |
-
};
|
235 |
-
A.prototype.callbacks.push(function (b) {
|
236 |
-
var a, d = b.options.exporting, c = d.buttons;
|
237 |
-
y = 0;
|
238 |
-
if (d.enabled !== !1) {
|
239 |
-
for (a in c)b.addButton(c[a]);
|
240 |
-
t(b, "destroy", b.destroyExport)
|
241 |
-
}
|
242 |
-
})
|
243 |
-
})(Highcharts);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/highcharts-3d.js
DELETED
@@ -1,565 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Highcharts JS v4.0.1 (2014-04-24)
|
3 |
-
|
4 |
-
(c) 2009-2013 Torstein Hønsi
|
5 |
-
|
6 |
-
License: www.highcharts.com/license
|
7 |
-
*/
|
8 |
-
(function (c) {
|
9 |
-
function x(e, a, b, d) {
|
10 |
-
var f, g, h;
|
11 |
-
b *= n;
|
12 |
-
a *= n;
|
13 |
-
var i = [], j, o, t;
|
14 |
-
b *= -1;
|
15 |
-
j = d.x;
|
16 |
-
o = d.y;
|
17 |
-
t = (d.z === 0 ? 1.0E-4 : d.z) * (d.vd || 25);
|
18 |
-
var y = k(b), v = l(b), m = k(a), q = l(a), r, u, s;
|
19 |
-
c.each(e, function (a) {
|
20 |
-
r = a.x - j;
|
21 |
-
u = a.y - o;
|
22 |
-
s = a.z || 0;
|
23 |
-
f = v * r - y * s;
|
24 |
-
g = -y * m * r - v * m * s + q * u;
|
25 |
-
h = y * q * r + v * q * s + m * u;
|
26 |
-
f = f * ((t - h) / t) + j;
|
27 |
-
g = g * ((t - h) / t) + o;
|
28 |
-
i.push({x: C(f), y: C(g), z: C(h)})
|
29 |
-
});
|
30 |
-
return i
|
31 |
-
}
|
32 |
-
|
33 |
-
function z(e, a, b, d, f, c, h, i) {
|
34 |
-
var j = [];
|
35 |
-
return c > f && c - f > m / 2 + 1.0E-4 ? (j = j.concat(z(e, a, b, d, f, f + m / 2, h, i)), j = j.concat(z(e, a, b, d, f + m / 2, c, h, i))) : c < f && f - c > m / 2 + 1.0E-4 ? (j = j.concat(z(e, a, b,
|
36 |
-
d, f, f - m / 2, h, i)), j = j.concat(z(e, a, b, d, f - m / 2, c, h, i))) : (j = c - f, ["C", e + b * l(f) - b * D * j * k(f) + h, a + d * k(f) + d * D * j * l(f) + i, e + b * l(c) + b * D * j * k(c) + h, a + d * k(c) - d * D * j * l(c) + i, e + b * l(c) + h, a + d * k(c) + i])
|
37 |
-
}
|
38 |
-
|
39 |
-
function F(e) {
|
40 |
-
if (this.chart.is3d()) {
|
41 |
-
var a = this.chart.options.plotOptions.column.grouping;
|
42 |
-
a !== void 0 && !a && this.group.zIndex !== void 0 && this.group.attr({zIndex: this.group.zIndex * 10});
|
43 |
-
if (this.userOptions.borderColor === void 0)this.options.borderColor = this.color;
|
44 |
-
c.each(this.data, function (a) {
|
45 |
-
var d = a.options.borderColor || a.color || a.series.userOptions.borderColor;
|
46 |
-
a.options.borderColor = d;
|
47 |
-
a.borderColor = d;
|
48 |
-
a.pointAttr[""].stroke = d;
|
49 |
-
a.pointAttr.hover.stroke = d;
|
50 |
-
a.pointAttr.select.stroke = d
|
51 |
-
})
|
52 |
-
}
|
53 |
-
e.apply(this, [].slice.call(arguments, 1))
|
54 |
-
}
|
55 |
-
|
56 |
-
var m = Math.PI, n = m / 180, k = Math.sin, l = Math.cos, C = Math.round, D = 4 * (Math.sqrt(2) - 1) / 3 / (m / 2);
|
57 |
-
c.SVGRenderer.prototype.toLinePath = function (e, a) {
|
58 |
-
var b = [];
|
59 |
-
c.each(e, function (a) {
|
60 |
-
b.push("L", a.x, a.y)
|
61 |
-
});
|
62 |
-
b[0] = "M";
|
63 |
-
a && b.push("Z");
|
64 |
-
return b
|
65 |
-
};
|
66 |
-
c.SVGRenderer.prototype.cuboid = function (e) {
|
67 |
-
var a = this.g(), e = this.cuboidPath(e);
|
68 |
-
a.front = this.path(e[0]).attr({
|
69 |
-
zIndex: e[3],
|
70 |
-
"stroke-linejoin": "round"
|
71 |
-
}).add(a);
|
72 |
-
a.top = this.path(e[1]).attr({zIndex: e[4], "stroke-linejoin": "round"}).add(a);
|
73 |
-
a.side = this.path(e[2]).attr({zIndex: e[5], "stroke-linejoin": "round"}).add(a);
|
74 |
-
a.fillSetter = function (a) {
|
75 |
-
var d = c.Color(a).brighten(0.1).get(), e = c.Color(a).brighten(-0.1).get();
|
76 |
-
this.front.attr({fill: a});
|
77 |
-
this.top.attr({fill: d});
|
78 |
-
this.side.attr({fill: e});
|
79 |
-
this.color = a;
|
80 |
-
return this
|
81 |
-
};
|
82 |
-
a.opacitySetter = function (a) {
|
83 |
-
this.front.attr({opacity: a});
|
84 |
-
this.top.attr({opacity: a});
|
85 |
-
this.side.attr({opacity: a});
|
86 |
-
return this
|
87 |
-
};
|
88 |
-
a.attr = function (a) {
|
89 |
-
a.shapeArgs || a.x ? (a = this.renderer.cuboidPath(a.shapeArgs || a), this.front.attr({
|
90 |
-
d: a[0],
|
91 |
-
zIndex: a[3]
|
92 |
-
}), this.top.attr({d: a[1], zIndex: a[4]}), this.side.attr({
|
93 |
-
d: a[2],
|
94 |
-
zIndex: a[5]
|
95 |
-
})) : c.SVGElement.prototype.attr.call(this, a);
|
96 |
-
return this
|
97 |
-
};
|
98 |
-
a.animate = function (a, d, e) {
|
99 |
-
a.x && a.y ? (a = this.renderer.cuboidPath(a), this.front.attr({zIndex: a[3]}).animate({d: a[0]}, d, e), this.top.attr({zIndex: a[4]}).animate({d: a[1]}, d, e), this.side.attr({zIndex: a[5]}).animate({d: a[2]}, d, e)) : a.opacity ? (this.front.animate(a,
|
100 |
-
d, e), this.top.animate(a, d, e), this.side.animate(a, d, e)) : c.SVGElement.prototype.animate.call(this, a, d, e);
|
101 |
-
return this
|
102 |
-
};
|
103 |
-
a.destroy = function () {
|
104 |
-
this.front.destroy();
|
105 |
-
this.top.destroy();
|
106 |
-
this.side.destroy();
|
107 |
-
return null
|
108 |
-
};
|
109 |
-
a.attr({zIndex: -e[3]});
|
110 |
-
return a
|
111 |
-
};
|
112 |
-
c.SVGRenderer.prototype.cuboidPath = function (e) {
|
113 |
-
var a = e.x, b = e.y, d = e.z, c = e.height, g = e.width, h = e.depth, i = e.alpha, j = e.beta, a = [{
|
114 |
-
x: a,
|
115 |
-
y: b,
|
116 |
-
z: d
|
117 |
-
}, {x: a + g, y: b, z: d}, {x: a + g, y: b + c, z: d}, {x: a, y: b + c, z: d}, {
|
118 |
-
x: a,
|
119 |
-
y: b + c,
|
120 |
-
z: d + h
|
121 |
-
}, {x: a + g, y: b + c, z: d + h}, {x: a + g, y: b, z: d + h}, {x: a, y: b, z: d + h}],
|
122 |
-
a = x(a, i, j, e.origin), e = ["M", a[0].x, a[0].y, "L", a[7].x, a[7].y, "L", a[6].x, a[6].y, "L", a[1].x, a[1].y, "Z"], b = ["M", a[3].x, a[3].y, "L", a[2].x, a[2].y, "L", a[5].x, a[5].y, "L", a[4].x, a[4].y, "Z"], d = ["M", a[1].x, a[1].y, "L", a[2].x, a[2].y, "L", a[5].x, a[5].y, "L", a[6].x, a[6].y, "Z"], c = ["M", a[0].x, a[0].y, "L", a[7].x, a[7].y, "L", a[4].x, a[4].y, "L", a[3].x, a[3].y, "Z"];
|
123 |
-
return [["M", a[0].x, a[0].y, "L", a[1].x, a[1].y, "L", a[2].x, a[2].y, "L", a[3].x, a[3].y, "Z"], a[7].y < a[1].y ? e : a[4].y > a[2].y ? b : [], a[6].x > a[1].x ? d : a[7].x < a[0].x ? c : [], (a[0].z +
|
124 |
-
a[1].z + a[2].z + a[3].z) / 4, j > 0 ? (a[0].z + a[7].z + a[6].z + a[1].z) / 4 : (a[3].z + a[2].z + a[5].z + a[4].z) / 4, i > 0 ? (a[1].z + a[2].z + a[5].z + a[6].z) / 4 : (a[0].z + a[7].z + a[4].z + a[3].z) / 4]
|
125 |
-
};
|
126 |
-
c.SVGRenderer.prototype.arc3d = function (e) {
|
127 |
-
e.alpha *= n;
|
128 |
-
e.beta *= n;
|
129 |
-
var a = this.g(), b = this.arc3dPath(e), d = a.renderer, f = b.zAll * 100;
|
130 |
-
a.shapeArgs = e;
|
131 |
-
a.side1 = d.path(b.side2).attr({zIndex: b.zSide2}).add(a);
|
132 |
-
a.side2 = d.path(b.side1).attr({zIndex: b.zSide1}).add(a);
|
133 |
-
a.inn = d.path(b.inn).attr({zIndex: b.zInn}).add(a);
|
134 |
-
a.out = d.path(b.out).attr({zIndex: b.zOut}).add(a);
|
135 |
-
a.top = d.path(b.top).attr({zIndex: b.zTop}).add(a);
|
136 |
-
a.fillSetter = function (a) {
|
137 |
-
this.color = a;
|
138 |
-
var b = c.Color(a).brighten(-0.1).get();
|
139 |
-
this.side1.attr({fill: b});
|
140 |
-
this.side2.attr({fill: b});
|
141 |
-
this.inn.attr({fill: b});
|
142 |
-
this.out.attr({fill: b});
|
143 |
-
this.top.attr({fill: a});
|
144 |
-
return this
|
145 |
-
};
|
146 |
-
a.animate = function (a, b, d) {
|
147 |
-
c.SVGElement.prototype.animate.call(this, a, b, d);
|
148 |
-
if (a.x && a.y)b = this.renderer, a = c.splat(a)[0], a.alpha *= n, a.beta *= n, b = b.arc3dPath(a), this.shapeArgs = a, this.inn.attr({
|
149 |
-
d: b.inn,
|
150 |
-
zIndex: b.zInn
|
151 |
-
}), this.out.attr({d: b.out, zIndex: b.zOut}),
|
152 |
-
this.side1.attr({d: b.side1, zIndex: b.zSide2}), this.side2.attr({
|
153 |
-
d: b.side2,
|
154 |
-
zIndex: b.zSide1
|
155 |
-
}), this.top.attr({
|
156 |
-
d: b.top,
|
157 |
-
zIndex: b.zTop
|
158 |
-
}), this.attr({fill: this.color}), this.attr({zIndex: b.zAll * 100});
|
159 |
-
return this
|
160 |
-
};
|
161 |
-
a.zIndex = f;
|
162 |
-
a.attr({zIndex: f});
|
163 |
-
return a
|
164 |
-
};
|
165 |
-
c.SVGRenderer.prototype.arc3dPath = function (e) {
|
166 |
-
var a = e.x, b = e.y, d = e.start, c = e.end - 1.0E-5, g = e.r, h = e.innerR, i = e.depth, j = e.alpha, o = e.beta, t = l(d), y = k(d), v = l(c), n = k(c), q = g * l(o), r = g * l(j), u = h * l(o), s = h * l(j), A = i * k(o), B = i * k(j), i = ["M", a + q * t, b + r * y], i = i.concat(z(a, b, q, r, d, c,
|
167 |
-
0, 0)), i = i.concat(["L", a + u * v, b + s * n]), i = i.concat(z(a, b, u, s, c, d, 0, 0)), i = i.concat(["Z"]), e = (e.start + e.end) / 2, e = k(o) * l(e) + k(-j) * k(-e), p = o > 0 ? m / 2 : 0, w = j > 0 ? 0 : m / 2, p = d > -p ? d : c > -p ? -p : d, x = c < m - w ? c : d < m - w ? m - w : c, w = ["M", a + q * l(p), b + r * k(p)], w = w.concat(z(a, b, q, r, p, x, 0, 0)), w = w.concat(["L", a + q * l(x) + A, b + r * k(x) + B]), w = w.concat(z(a, b, q, r, x, p, A, B)), w = w.concat(["Z"]), p = ["M", a + u * t, b + s * y], p = p.concat(z(a, b, u, s, d, c, 0, 0)), p = p.concat(["L", a + u * l(c) + A, b + s * k(c) + B]), p = p.concat(z(a, b, u, s, c, d, A, B)), p = p.concat(["Z"]), t = ["M", a + q * t, b + r * y, "L",
|
168 |
-
a + q * t + A, b + r * y + B, "L", a + u * t + A, b + s * y + B, "L", a + u * t, b + s * y, "Z"], a = ["M", a + q * v, b + r * n, "L", a + q * v + A, b + r * n + B, "L", a + u * v + A, b + s * n + B, "L", a + u * v, b + s * n, "Z"], v = h + (g - h) / 2, b = Math.abs(e * 2 * v);
|
169 |
-
g *= e;
|
170 |
-
h *= e;
|
171 |
-
d = (k(o) * l(d) + k(-j) * k(-d)) * v;
|
172 |
-
c = (k(o) * l(c) + k(-j) * k(-c)) * v;
|
173 |
-
return {
|
174 |
-
top: i,
|
175 |
-
zTop: b * 100,
|
176 |
-
out: w,
|
177 |
-
zOut: g * 100,
|
178 |
-
inn: p,
|
179 |
-
zInn: h * 100,
|
180 |
-
side1: t,
|
181 |
-
zSide1: d * 100,
|
182 |
-
side2: a,
|
183 |
-
zSide2: c * 100,
|
184 |
-
zAll: e
|
185 |
-
}
|
186 |
-
};
|
187 |
-
c.Chart.prototype.is3d = function () {
|
188 |
-
return this.options.chart.options3d && this.options.chart.options3d.enabled
|
189 |
-
};
|
190 |
-
c.wrap(c.Chart.prototype, "isInsidePlot", function (c) {
|
191 |
-
return this.is3d() ?
|
192 |
-
!0 : c.apply(this, [].slice.call(arguments, 1))
|
193 |
-
});
|
194 |
-
c.wrap(c.Chart.prototype, "init", function (e) {
|
195 |
-
var a = arguments;
|
196 |
-
a[1] = c.merge({
|
197 |
-
chart: {
|
198 |
-
options3d: {
|
199 |
-
enabled: !1,
|
200 |
-
alpha: 0,
|
201 |
-
beta: 0,
|
202 |
-
depth: 100,
|
203 |
-
viewDistance: 25,
|
204 |
-
frame: {
|
205 |
-
bottom: {size: 1, color: "rgba(255,255,255,0)"},
|
206 |
-
side: {size: 1, color: "rgba(255,255,255,0)"},
|
207 |
-
back: {size: 1, color: "rgba(255,255,255,0)"}
|
208 |
-
}
|
209 |
-
}
|
210 |
-
}
|
211 |
-
}, a[1]);
|
212 |
-
e.apply(this, [].slice.call(a, 1))
|
213 |
-
});
|
214 |
-
c.wrap(c.Chart.prototype, "setChartSize", function (c) {
|
215 |
-
c.apply(this, [].slice.call(arguments, 1));
|
216 |
-
if (this.is3d()) {
|
217 |
-
var a = this.inverted, b =
|
218 |
-
this.clipBox, d = this.margin;
|
219 |
-
b[a ? "y" : "x"] = -(d[3] || 0);
|
220 |
-
b[a ? "x" : "y"] = -(d[0] || 0);
|
221 |
-
b[a ? "height" : "width"] = this.chartWidth + (d[3] || 0) + (d[1] || 0);
|
222 |
-
b[a ? "width" : "height"] = this.chartHeight + (d[0] || 0) + (d[2] || 0)
|
223 |
-
}
|
224 |
-
});
|
225 |
-
c.wrap(c.Chart.prototype, "redraw", function (c) {
|
226 |
-
if (this.is3d())this.isDirtyBox = !0;
|
227 |
-
c.apply(this, [].slice.call(arguments, 1))
|
228 |
-
});
|
229 |
-
c.Chart.prototype.retrieveStacks = function () {
|
230 |
-
var e = {}, a = this.options.plotOptions[this.options.chart.type], b = a.stacking, d = 1;
|
231 |
-
if (a.grouping || !b)return this.series;
|
232 |
-
c.each(this.series, function (a) {
|
233 |
-
e[a.options.stack ||
|
234 |
-
0] ? e[a.options.stack || 0].series.push(a) : (e[a.options.stack || 0] = {series: [a], position: d}, d++)
|
235 |
-
});
|
236 |
-
e.totalStacks = d + 1;
|
237 |
-
return e
|
238 |
-
};
|
239 |
-
c.wrap(c.Axis.prototype, "init", function (e) {
|
240 |
-
var a = arguments;
|
241 |
-
if (a[1].is3d())a[2].tickWidth = c.pick(a[2].tickWidth, 0), a[2].gridLineWidth = c.pick(a[2].gridLineWidth, 1);
|
242 |
-
e.apply(this, [].slice.call(arguments, 1))
|
243 |
-
});
|
244 |
-
c.wrap(c.Axis.prototype, "render", function (c) {
|
245 |
-
c.apply(this, [].slice.call(arguments, 1));
|
246 |
-
if (this.chart.is3d()) {
|
247 |
-
var a = this.chart, b = a.renderer, d = a.options.chart.options3d, f = d.alpha,
|
248 |
-
g = d.beta * (a.yAxis[0].opposite ? -1 : 1), h = d.frame, i = h.bottom, j = h.back, h = h.side, o = d.depth, k = this.height, l = this.width, m = this.left, n = this.top, d = {
|
249 |
-
x: a.plotLeft + a.plotWidth / 2,
|
250 |
-
y: a.plotTop + a.plotHeight / 2,
|
251 |
-
z: o,
|
252 |
-
vd: d.viewDistance
|
253 |
-
};
|
254 |
-
if (this.horiz)this.axisLine && this.axisLine.hide(), g = {
|
255 |
-
x: m,
|
256 |
-
y: n + (a.yAxis[0].reversed ? -i.size : k),
|
257 |
-
z: 0,
|
258 |
-
width: l,
|
259 |
-
height: i.size,
|
260 |
-
depth: o,
|
261 |
-
alpha: f,
|
262 |
-
beta: g,
|
263 |
-
origin: d
|
264 |
-
}, this.bottomFrame ? this.bottomFrame.animate(g) : this.bottomFrame = b.cuboid(g).attr({
|
265 |
-
fill: i.color,
|
266 |
-
zIndex: a.yAxis[0].reversed && f > 0 ? 4 : -1
|
267 |
-
}).css({stroke: i.color}).add();
|
268 |
-
else {
|
269 |
-
var q = {
|
270 |
-
x: m,
|
271 |
-
y: n,
|
272 |
-
z: o + 1,
|
273 |
-
width: l,
|
274 |
-
height: k + i.size,
|
275 |
-
depth: j.size,
|
276 |
-
alpha: f,
|
277 |
-
beta: g,
|
278 |
-
origin: d
|
279 |
-
};
|
280 |
-
this.backFrame ? this.backFrame.animate(q) : this.backFrame = b.cuboid(q).attr({
|
281 |
-
fill: j.color,
|
282 |
-
zIndex: -3
|
283 |
-
}).css({stroke: j.color}).add();
|
284 |
-
this.axisLine && this.axisLine.hide();
|
285 |
-
a = {
|
286 |
-
x: (a.yAxis[0].opposite ? l : 0) + m - h.size,
|
287 |
-
y: n,
|
288 |
-
z: 0,
|
289 |
-
width: h.size,
|
290 |
-
height: k + i.size,
|
291 |
-
depth: o + j.size,
|
292 |
-
alpha: f,
|
293 |
-
beta: g,
|
294 |
-
origin: d
|
295 |
-
};
|
296 |
-
this.sideFrame ? this.sideFrame.animate(a) : this.sideFrame = b.cuboid(a).attr({
|
297 |
-
fill: h.color,
|
298 |
-
zIndex: -2
|
299 |
-
}).css({stroke: h.color}).add()
|
300 |
-
}
|
301 |
-
}
|
302 |
-
});
|
303 |
-
c.wrap(c.Axis.prototype,
|
304 |
-
"getPlotLinePath", function (c) {
|
305 |
-
var a = c.apply(this, [].slice.call(arguments, 1));
|
306 |
-
if (!this.chart.is3d())return a;
|
307 |
-
if (a === null)return a;
|
308 |
-
var b = this.chart, d = b.options.chart.options3d, f = d.depth;
|
309 |
-
d.origin = {x: b.plotLeft + b.plotWidth / 2, y: b.plotTop + b.plotHeight / 2, z: f, vd: d.viewDistance};
|
310 |
-
var a = [{x: a[1], y: a[2], z: this.horiz || this.opposite ? f : 0}, {x: a[1], y: a[2], z: f}, {
|
311 |
-
x: a[4],
|
312 |
-
y: a[5],
|
313 |
-
z: f
|
314 |
-
}, {
|
315 |
-
x: a[4],
|
316 |
-
y: a[5],
|
317 |
-
z: this.horiz || this.opposite ? 0 : f
|
318 |
-
}], f = b.options.inverted ? d.beta : d.alpha, g = b.options.inverted ? d.alpha : d.beta;
|
319 |
-
g *= b.yAxis[0].opposite ?
|
320 |
-
-1 : 1;
|
321 |
-
a = x(a, f, g, d.origin);
|
322 |
-
return a = this.chart.renderer.toLinePath(a, !1)
|
323 |
-
});
|
324 |
-
c.wrap(c.Tick.prototype, "getMarkPath", function (c) {
|
325 |
-
var a = c.apply(this, [].slice.call(arguments, 1));
|
326 |
-
if (!this.axis.chart.is3d())return a;
|
327 |
-
var b = this.axis.chart, d = b.options.chart.options3d, f = {
|
328 |
-
x: b.plotLeft + b.plotWidth / 2,
|
329 |
-
y: b.plotTop + b.plotHeight / 2,
|
330 |
-
z: d.depth,
|
331 |
-
vd: d.viewDistance
|
332 |
-
}, a = [{x: a[1], y: a[2], z: 0}, {
|
333 |
-
x: a[4],
|
334 |
-
y: a[5],
|
335 |
-
z: 0
|
336 |
-
}], g = b.inverted ? d.beta : d.alpha, d = b.inverted ? d.alpha : d.beta;
|
337 |
-
d *= b.yAxis[0].opposite ? -1 : 1;
|
338 |
-
a = x(a, g, d, f);
|
339 |
-
return a = ["M", a[0].x,
|
340 |
-
a[0].y, "L", a[1].x, a[1].y]
|
341 |
-
});
|
342 |
-
c.wrap(c.Tick.prototype, "getLabelPosition", function (c) {
|
343 |
-
var a = c.apply(this, [].slice.call(arguments, 1));
|
344 |
-
if (!this.axis.chart.is3d())return a;
|
345 |
-
var b = this.axis.chart, d = b.options.chart.options3d, f = {
|
346 |
-
x: b.plotLeft + b.plotWidth / 2,
|
347 |
-
y: b.plotTop + b.plotHeight / 2,
|
348 |
-
z: d.depth,
|
349 |
-
vd: d.viewDistance
|
350 |
-
}, g = b.inverted ? d.beta : d.alpha, d = b.inverted ? d.alpha : d.beta;
|
351 |
-
d *= b.yAxis[0].opposite ? -1 : 1;
|
352 |
-
return a = x([{x: a.x, y: a.y, z: 0}], g, d, f)[0]
|
353 |
-
});
|
354 |
-
c.wrap(c.Axis.prototype, "drawCrosshair", function (c) {
|
355 |
-
var a = arguments;
|
356 |
-
this.chart.is3d() &&
|
357 |
-
a[2] && (a[2] = {plotX: a[2].plotXold || a[2].plotX, plotY: a[2].plotYold || a[2].plotY});
|
358 |
-
c.apply(this, [].slice.call(a, 1))
|
359 |
-
});
|
360 |
-
c.wrap(c.seriesTypes.column.prototype, "translate", function (e) {
|
361 |
-
e.apply(this, [].slice.call(arguments, 1));
|
362 |
-
if (this.chart.is3d()) {
|
363 |
-
var a = this.chart, b = a.options, d = b.plotOptions[this.chart.options.chart.type], b = b.chart.options3d, f = d.depth || 25, g = {
|
364 |
-
x: a.plotWidth / 2,
|
365 |
-
y: a.plotHeight / 2,
|
366 |
-
z: b.depth,
|
367 |
-
vd: b.viewDistance
|
368 |
-
}, h = b.alpha, i = b.beta * (a.yAxis[0].opposite ? -1 : 1), j = (d.stacking ? this.options.stack || 0 : this._i) *
|
369 |
-
(f + (d.groupZPadding || 1));
|
370 |
-
d.grouping !== !1 && (j = 0);
|
371 |
-
j += d.groupZPadding || 1;
|
372 |
-
c.each(this.data, function (a) {
|
373 |
-
var b = a.shapeArgs, c = a.tooltipPos;
|
374 |
-
a.shapeType = "cuboid";
|
375 |
-
b.alpha = h;
|
376 |
-
b.beta = i;
|
377 |
-
b.z = j;
|
378 |
-
b.origin = g;
|
379 |
-
b.depth = f;
|
380 |
-
c = x([{x: c[0], y: c[1], z: j}], h, i, g)[0];
|
381 |
-
a.tooltipPos = [c.x, c.y]
|
382 |
-
})
|
383 |
-
}
|
384 |
-
});
|
385 |
-
c.wrap(c.seriesTypes.column.prototype, "animate", function (e) {
|
386 |
-
if (this.chart.is3d()) {
|
387 |
-
var a = arguments[1], b = this.yAxis, d = this, f = this.yAxis.reversed;
|
388 |
-
if (c.svg)a ? c.each(d.data, function (a) {
|
389 |
-
a.height = a.shapeArgs.height;
|
390 |
-
a.shapeArgs.height = 1;
|
391 |
-
if (!f)a.shapeArgs.y =
|
392 |
-
a.stackY ? a.plotY + b.translate(a.stackY) : a.plotY + (a.negative ? -a.height : a.height)
|
393 |
-
}) : (c.each(d.data, function (a) {
|
394 |
-
a.shapeArgs.height = a.height;
|
395 |
-
if (!f)a.shapeArgs.y = a.plotY - (a.negative ? a.height : 0);
|
396 |
-
a.graphic && a.graphic.animate(a.shapeArgs, d.options.animation)
|
397 |
-
}), d.animate = null)
|
398 |
-
} else e.apply(this, [].slice.call(arguments, 1))
|
399 |
-
});
|
400 |
-
c.wrap(c.seriesTypes.column.prototype, "init", function (c) {
|
401 |
-
c.apply(this, [].slice.call(arguments, 1));
|
402 |
-
if (this.chart.is3d()) {
|
403 |
-
var a = this.chart.options.plotOptions.column.grouping, b = this.chart.options.plotOptions.column.stacking,
|
404 |
-
d = this.options.zIndex;
|
405 |
-
if (!d && (a === void 0 || a) && b) {
|
406 |
-
a = this.chart.retrieveStacks();
|
407 |
-
b = this.options.stack || 0;
|
408 |
-
for (d = 0; d < a[b].series.length; d++)if (a[b].series[d] === this)break;
|
409 |
-
d = a.totalStacks * 10 - 10 * (a.totalStacks - a[b].position) - d;
|
410 |
-
this.options.zIndex = d
|
411 |
-
}
|
412 |
-
}
|
413 |
-
});
|
414 |
-
c.seriesTypes.columnrange && c.wrap(c.seriesTypes.columnrange.prototype, "drawPoints", F);
|
415 |
-
c.wrap(c.seriesTypes.column.prototype, "drawPoints", F);
|
416 |
-
var E = c.getOptions();
|
417 |
-
E.plotOptions.cylinder = c.merge(E.plotOptions.column);
|
418 |
-
E = c.extendClass(c.seriesTypes.column, {type: "cylinder"});
|
419 |
-
c.seriesTypes.cylinder = E;
|
420 |
-
c.wrap(c.seriesTypes.cylinder.prototype, "translate", function (e) {
|
421 |
-
e.apply(this, [].slice.call(arguments, 1));
|
422 |
-
if (this.chart.is3d()) {
|
423 |
-
var a = this.chart, b = a.options, d = b.plotOptions.cylinder, b = b.chart.options3d, f = d.depth || 0, g = {
|
424 |
-
x: a.inverted ? a.plotHeight / 2 : a.plotWidth / 2,
|
425 |
-
y: a.inverted ? a.plotWidth / 2 : a.plotHeight / 2,
|
426 |
-
z: b.depth,
|
427 |
-
vd: b.viewDistance
|
428 |
-
}, h = b.alpha, i = d.stacking ? (this.options.stack || 0) * f : this._i * f;
|
429 |
-
i += f / 2;
|
430 |
-
d.grouping !== !1 && (i = 0);
|
431 |
-
c.each(this.data, function (a) {
|
432 |
-
var b = a.shapeArgs;
|
433 |
-
a.shapeType =
|
434 |
-
"arc3d";
|
435 |
-
b.x += f / 2;
|
436 |
-
b.z = i;
|
437 |
-
b.start = 0;
|
438 |
-
b.end = 2 * m;
|
439 |
-
b.r = f * 0.95;
|
440 |
-
b.innerR = 0;
|
441 |
-
b.depth = b.height * (1 / k((90 - h) * n)) - i;
|
442 |
-
b.alpha = 90 - h;
|
443 |
-
b.beta = 0;
|
444 |
-
b.origin = g
|
445 |
-
})
|
446 |
-
}
|
447 |
-
});
|
448 |
-
c.wrap(c.seriesTypes.pie.prototype, "translate", function (e) {
|
449 |
-
e.apply(this, [].slice.call(arguments, 1));
|
450 |
-
if (this.chart.is3d()) {
|
451 |
-
var a = this, b = a.chart, d = b.options, f = d.plotOptions.pie, g = f.depth || 0, d = d.chart.options3d, h = {
|
452 |
-
x: b.plotWidth / 2,
|
453 |
-
y: b.plotHeight / 2,
|
454 |
-
z: d.depth
|
455 |
-
}, i = d.alpha, j = d.beta, o = f.stacking ? (this.options.stack || 0) * g : a._i * g;
|
456 |
-
o += g / 2;
|
457 |
-
f.grouping !== !1 && (o = 0);
|
458 |
-
c.each(a.data,
|
459 |
-
function (b) {
|
460 |
-
b.shapeType = "arc3d";
|
461 |
-
var c = b.shapeArgs;
|
462 |
-
c.z = o;
|
463 |
-
c.depth = g * 0.75;
|
464 |
-
c.origin = h;
|
465 |
-
c.alpha = i;
|
466 |
-
c.beta = j;
|
467 |
-
c = (c.end + c.start) / 2;
|
468 |
-
b.slicedTranslation = {
|
469 |
-
translateX: C(l(c) * a.options.slicedOffset * l(i * n)),
|
470 |
-
translateY: C(k(c) * a.options.slicedOffset * l(i * n))
|
471 |
-
}
|
472 |
-
})
|
473 |
-
}
|
474 |
-
});
|
475 |
-
c.wrap(c.seriesTypes.pie.prototype.pointClass.prototype, "haloPath", function (c) {
|
476 |
-
return this.series.chart.is3d() ? [] : c.call(this)
|
477 |
-
});
|
478 |
-
c.wrap(c.seriesTypes.pie.prototype, "drawPoints", function (e) {
|
479 |
-
this.chart.is3d() && c.each(this.data, function (a) {
|
480 |
-
var b = a.options.borderColor ||
|
481 |
-
a.color || a.series.userOptions.borderColor || a.series.color;
|
482 |
-
a.options.borderColor = b;
|
483 |
-
a.borderColor = b;
|
484 |
-
a.pointAttr[""].stroke = b;
|
485 |
-
a.pointAttr.hover.stroke = b;
|
486 |
-
a.pointAttr.select.stroke = b
|
487 |
-
});
|
488 |
-
e.apply(this, [].slice.call(arguments, 1))
|
489 |
-
});
|
490 |
-
c.wrap(c.seriesTypes.pie.prototype, "drawDataLabels", function (e) {
|
491 |
-
e.apply(this, [].slice.call(arguments, 1));
|
492 |
-
this.chart.is3d() && c.each(this.data, function (a) {
|
493 |
-
var b = a.shapeArgs, c = b.r, e = b.depth, g = b.alpha * n, h = b.beta * n, b = (b.start + b.end) / 2;
|
494 |
-
a.connector && a.connector.translate(-c * (1 - l(h)) * l(b) +
|
495 |
-
(l(b) > 0 ? k(h) * e : 0), -c * (1 - l(g)) * k(b) + (k(b) > 0 ? k(g) * e : 0));
|
496 |
-
a.dataLabel && a.dataLabel.attr({
|
497 |
-
x: a.dataLabel.connX + -c * (1 - l(h)) * l(b) + (l(b) > 0 ? l(h) * e : 0) - a.dataLabel.width / 2,
|
498 |
-
y: a.dataLabel.connY + -c * (1 - l(g)) * k(b) + (k(b) > 0 ? k(g) * e : 0) - a.dataLabel.height / 2
|
499 |
-
})
|
500 |
-
})
|
501 |
-
});
|
502 |
-
c.wrap(c.seriesTypes.pie.prototype, "addPoint", function (c) {
|
503 |
-
c.apply(this, [].slice.call(arguments, 1));
|
504 |
-
this.chart.is3d() && this.update()
|
505 |
-
});
|
506 |
-
c.wrap(c.seriesTypes.pie.prototype, "animate", function (e) {
|
507 |
-
if (this.chart.is3d()) {
|
508 |
-
var a = arguments[1], b = this.options.animation, d =
|
509 |
-
this.center, f = this.group, g = this.markerGroup;
|
510 |
-
if (c.svg)if (b === !0 && (b = {}), a) {
|
511 |
-
if (this.oldtranslateX = f.translateX, this.oldtranslateY = f.translateY, a = {
|
512 |
-
translateX: d[0],
|
513 |
-
translateY: d[1],
|
514 |
-
scaleX: 0.001,
|
515 |
-
scaleY: 0.001
|
516 |
-
}, f.attr(a), g)g.attrSetters = f.attrSetters, g.attr(a)
|
517 |
-
} else a = {
|
518 |
-
translateX: this.oldtranslateX,
|
519 |
-
translateY: this.oldtranslateY,
|
520 |
-
scaleX: 1,
|
521 |
-
scaleY: 1
|
522 |
-
}, f.animate(a, b), g && g.animate(a, b), this.animate = null
|
523 |
-
} else e.apply(this, [].slice.call(arguments, 1))
|
524 |
-
});
|
525 |
-
c.wrap(c.seriesTypes.scatter.prototype, "translate", function (e) {
|
526 |
-
e.apply(this,
|
527 |
-
[].slice.call(arguments, 1));
|
528 |
-
if (this.chart.is3d()) {
|
529 |
-
var a = this.chart, b = this.chart.options.chart.options3d, d = b.alpha, f = b.beta, g = {
|
530 |
-
x: a.inverted ? a.plotHeight / 2 : a.plotWidth / 2,
|
531 |
-
y: a.inverted ? a.plotWidth / 2 : a.plotHeight / 2,
|
532 |
-
z: b.depth,
|
533 |
-
vd: b.viewDistance
|
534 |
-
}, b = b.depth, h = a.options.zAxis || {min: 0, max: b}, i = b / (h.max - h.min);
|
535 |
-
c.each(this.data, function (a) {
|
536 |
-
var b = {x: a.plotX, y: a.plotY, z: (a.z - h.min) * i}, b = x([b], d, f, g)[0];
|
537 |
-
a.plotXold = a.plotX;
|
538 |
-
a.plotYold = a.plotY;
|
539 |
-
a.plotX = b.x;
|
540 |
-
a.plotY = b.y;
|
541 |
-
a.plotZ = b.z
|
542 |
-
})
|
543 |
-
}
|
544 |
-
});
|
545 |
-
c.wrap(c.seriesTypes.scatter.prototype,
|
546 |
-
"init", function (c) {
|
547 |
-
var a = c.apply(this, [].slice.call(arguments, 1));
|
548 |
-
if (this.chart.is3d())this.pointArrayMap = ["x", "y", "z"], this.tooltipOptions.pointFormat = this.userOptions.tooltip ? this.userOptions.tooltip.pointFormat || "x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>z: <b>{point.z}</b><br/>" : "x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>z: <b>{point.z}</b><br/>";
|
549 |
-
return a
|
550 |
-
});
|
551 |
-
if (c.VMLRenderer)c.setOptions({animate: !1}), c.VMLRenderer.prototype.cuboid = c.SVGRenderer.prototype.cuboid, c.VMLRenderer.prototype.cuboidPath =
|
552 |
-
c.SVGRenderer.prototype.cuboidPath, c.VMLRenderer.prototype.toLinePath = c.SVGRenderer.prototype.toLinePath, c.VMLRenderer.prototype.createElement3D = c.SVGRenderer.prototype.createElement3D, c.VMLRenderer.prototype.arc3d = function (e) {
|
553 |
-
e = c.SVGRenderer.prototype.arc3d.call(this, e);
|
554 |
-
e.css({zIndex: e.zIndex});
|
555 |
-
return e
|
556 |
-
}, c.VMLRenderer.prototype.arc3dPath = c.SVGRenderer.prototype.arc3dPath, c.Chart.prototype.renderSeries = function () {
|
557 |
-
for (var c, a = this.series.length; a--;)c = this.series[a], c.translate(), c.setTooltipPoints &&
|
558 |
-
c.setTooltipPoints(), c.render()
|
559 |
-
}, c.wrap(c.Axis.prototype, "render", function (c) {
|
560 |
-
c.apply(this, [].slice.call(arguments, 1));
|
561 |
-
this.sideFrame && (this.sideFrame.css({zIndex: 0}), this.sideFrame.front.attr({fill: this.sideFrame.color}));
|
562 |
-
this.bottomFrame && (this.bottomFrame.css({zIndex: 1}), this.bottomFrame.front.attr({fill: this.bottomFrame.color}));
|
563 |
-
this.backFrame && (this.backFrame.css({zIndex: 0}), this.backFrame.front.attr({fill: this.backFrame.color}))
|
564 |
-
})
|
565 |
-
})(Highcharts);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/highcharts.js
DELETED
@@ -1,4918 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Highcharts JS v4.0.1 (2014-04-24)
|
3 |
-
|
4 |
-
(c) 2009-2014 Torstein Honsi
|
5 |
-
|
6 |
-
License: www.highcharts.com/license
|
7 |
-
*/
|
8 |
-
(function () {
|
9 |
-
function q(a, b) {
|
10 |
-
var c;
|
11 |
-
a || (a = {});
|
12 |
-
for (c in b)a[c] = b[c];
|
13 |
-
return a
|
14 |
-
}
|
15 |
-
|
16 |
-
function w() {
|
17 |
-
var a, b = arguments, c, d = {}, e = function (a, b) {
|
18 |
-
var c, d;
|
19 |
-
typeof a !== "object" && (a = {});
|
20 |
-
for (d in b)b.hasOwnProperty(d) && (c = b[d], a[d] = c && typeof c === "object" && Object.prototype.toString.call(c) !== "[object Array]" && d !== "renderTo" && typeof c.nodeType !== "number" ? e(a[d] || {}, c) : b[d]);
|
21 |
-
return a
|
22 |
-
};
|
23 |
-
b[0] === !0 && (d = b[1], b = Array.prototype.slice.call(b, 2));
|
24 |
-
c = b.length;
|
25 |
-
for (a = 0; a < c; a++)d = e(d, b[a]);
|
26 |
-
return d
|
27 |
-
}
|
28 |
-
|
29 |
-
function z(a, b) {
|
30 |
-
return parseInt(a, b ||
|
31 |
-
10)
|
32 |
-
}
|
33 |
-
|
34 |
-
function Fa(a) {
|
35 |
-
return typeof a === "string"
|
36 |
-
}
|
37 |
-
|
38 |
-
function ca(a) {
|
39 |
-
return typeof a === "object"
|
40 |
-
}
|
41 |
-
|
42 |
-
function La(a) {
|
43 |
-
return Object.prototype.toString.call(a) === "[object Array]"
|
44 |
-
}
|
45 |
-
|
46 |
-
function ha(a) {
|
47 |
-
return typeof a === "number"
|
48 |
-
}
|
49 |
-
|
50 |
-
function za(a) {
|
51 |
-
return U.log(a) / U.LN10
|
52 |
-
}
|
53 |
-
|
54 |
-
function ia(a) {
|
55 |
-
return U.pow(10, a)
|
56 |
-
}
|
57 |
-
|
58 |
-
function ja(a, b) {
|
59 |
-
for (var c = a.length; c--;)if (a[c] === b) {
|
60 |
-
a.splice(c, 1);
|
61 |
-
break
|
62 |
-
}
|
63 |
-
}
|
64 |
-
|
65 |
-
function r(a) {
|
66 |
-
return a !== t && a !== null
|
67 |
-
}
|
68 |
-
|
69 |
-
function H(a, b, c) {
|
70 |
-
var d, e;
|
71 |
-
if (Fa(b))r(c) ? a.setAttribute(b, c) : a && a.getAttribute && (e = a.getAttribute(b)); else if (r(b) &&
|
72 |
-
ca(b))for (d in b)a.setAttribute(d, b[d]);
|
73 |
-
return e
|
74 |
-
}
|
75 |
-
|
76 |
-
function qa(a) {
|
77 |
-
return La(a) ? a : [a]
|
78 |
-
}
|
79 |
-
|
80 |
-
function m() {
|
81 |
-
var a = arguments, b, c, d = a.length;
|
82 |
-
for (b = 0; b < d; b++)if (c = a[b], typeof c !== "undefined" && c !== null)return c
|
83 |
-
}
|
84 |
-
|
85 |
-
function G(a, b) {
|
86 |
-
if (Aa && !aa && b && b.opacity !== t)b.filter = "alpha(opacity=" + b.opacity * 100 + ")";
|
87 |
-
q(a.style, b)
|
88 |
-
}
|
89 |
-
|
90 |
-
function Y(a, b, c, d, e) {
|
91 |
-
a = y.createElement(a);
|
92 |
-
b && q(a, b);
|
93 |
-
e && G(a, {padding: 0, border: Q, margin: 0});
|
94 |
-
c && G(a, c);
|
95 |
-
d && d.appendChild(a);
|
96 |
-
return a
|
97 |
-
}
|
98 |
-
|
99 |
-
function ka(a, b) {
|
100 |
-
var c = function () {
|
101 |
-
};
|
102 |
-
c.prototype = new a;
|
103 |
-
q(c.prototype, b);
|
104 |
-
return c
|
105 |
-
}
|
106 |
-
|
107 |
-
function Ga(a, b, c, d) {
|
108 |
-
var e = E.lang, a = +a || 0, f = b === -1 ? (a.toString().split(".")[1] || "").length : isNaN(b = M(b)) ? 2 : b, b = c === void 0 ? e.decimalPoint : c, d = d === void 0 ? e.thousandsSep : d, e = a < 0 ? "-" : "", c = String(z(a = M(a).toFixed(f))), g = c.length > 3 ? c.length % 3 : 0;
|
109 |
-
return e + (g ? c.substr(0, g) + d : "") + c.substr(g).replace(/(\d{3})(?=\d)/g, "$1" + d) + (f ? b + M(a - c).toFixed(f).slice(2) : "")
|
110 |
-
}
|
111 |
-
|
112 |
-
function Ha(a, b) {
|
113 |
-
return Array((b || 2) + 1 - String(a).length).join(0) + a
|
114 |
-
}
|
115 |
-
|
116 |
-
function Ma(a, b, c) {
|
117 |
-
var d = a[b];
|
118 |
-
a[b] = function () {
|
119 |
-
var a = Array.prototype.slice.call(arguments);
|
120 |
-
a.unshift(d);
|
121 |
-
return c.apply(this, a)
|
122 |
-
}
|
123 |
-
}
|
124 |
-
|
125 |
-
function Ia(a, b) {
|
126 |
-
for (var c = "{", d = !1, e, f, g, h, i, j = []; (c = a.indexOf(c)) !== -1;) {
|
127 |
-
e = a.slice(0, c);
|
128 |
-
if (d) {
|
129 |
-
f = e.split(":");
|
130 |
-
g = f.shift().split(".");
|
131 |
-
i = g.length;
|
132 |
-
e = b;
|
133 |
-
for (h = 0; h < i; h++)e = e[g[h]];
|
134 |
-
if (f.length)f = f.join(":"), g = /\.([0-9])/, h = E.lang, i = void 0, /f$/.test(f) ? (i = (i = f.match(g)) ? i[1] : -1, e !== null && (e = Ga(e, i, h.decimalPoint, f.indexOf(",") > -1 ? h.thousandsSep : ""))) : e = cb(f, e)
|
135 |
-
}
|
136 |
-
j.push(e);
|
137 |
-
a = a.slice(c + 1);
|
138 |
-
c = (d = !d) ? "}" : "{"
|
139 |
-
}
|
140 |
-
j.push(a);
|
141 |
-
return j.join("")
|
142 |
-
}
|
143 |
-
|
144 |
-
function mb(a) {
|
145 |
-
return U.pow(10, T(U.log(a) /
|
146 |
-
U.LN10))
|
147 |
-
}
|
148 |
-
|
149 |
-
function nb(a, b, c, d) {
|
150 |
-
var e, c = m(c, 1);
|
151 |
-
e = a / c;
|
152 |
-
b || (b = [1, 2, 2.5, 5, 10], d && d.allowDecimals === !1 && (c === 1 ? b = [1, 2, 5, 10] : c <= 0.1 && (b = [1 / c])));
|
153 |
-
for (d = 0; d < b.length; d++)if (a = b[d], e <= (b[d] + (b[d + 1] || b[d])) / 2)break;
|
154 |
-
a *= c;
|
155 |
-
return a
|
156 |
-
}
|
157 |
-
|
158 |
-
function Bb() {
|
159 |
-
this.symbol = this.color = 0
|
160 |
-
}
|
161 |
-
|
162 |
-
function ob(a, b) {
|
163 |
-
var c = a.length, d, e;
|
164 |
-
for (e = 0; e < c; e++)a[e].ss_i = e;
|
165 |
-
a.sort(function (a, c) {
|
166 |
-
d = b(a, c);
|
167 |
-
return d === 0 ? a.ss_i - c.ss_i : d
|
168 |
-
});
|
169 |
-
for (e = 0; e < c; e++)delete a[e].ss_i
|
170 |
-
}
|
171 |
-
|
172 |
-
function Na(a) {
|
173 |
-
for (var b = a.length, c = a[0]; b--;)a[b] < c && (c = a[b]);
|
174 |
-
return c
|
175 |
-
}
|
176 |
-
|
177 |
-
function Ba(a) {
|
178 |
-
for (var b =
|
179 |
-
a.length, c = a[0]; b--;)a[b] > c && (c = a[b]);
|
180 |
-
return c
|
181 |
-
}
|
182 |
-
|
183 |
-
function Oa(a, b) {
|
184 |
-
for (var c in a)a[c] && a[c] !== b && a[c].destroy && a[c].destroy(), delete a[c]
|
185 |
-
}
|
186 |
-
|
187 |
-
function Pa(a) {
|
188 |
-
db || (db = Y(Ja));
|
189 |
-
a && db.appendChild(a);
|
190 |
-
db.innerHTML = ""
|
191 |
-
}
|
192 |
-
|
193 |
-
function ra(a, b) {
|
194 |
-
var c = "Highcharts error #" + a + ": www.highcharts.com/errors/" + a;
|
195 |
-
if (b)throw c; else I.console && console.log(c)
|
196 |
-
}
|
197 |
-
|
198 |
-
function da(a) {
|
199 |
-
return parseFloat(a.toPrecision(14))
|
200 |
-
}
|
201 |
-
|
202 |
-
function Qa(a, b) {
|
203 |
-
va = m(a, b.animation)
|
204 |
-
}
|
205 |
-
|
206 |
-
function Cb() {
|
207 |
-
var a = E.global.useUTC, b = a ? "getUTC" : "get", c = a ? "setUTC" : "set";
|
208 |
-
Ra = (a && E.global.timezoneOffset ||
|
209 |
-
0) * 6E4;
|
210 |
-
eb = a ? Date.UTC : function (a, b, c, g, h, i) {
|
211 |
-
return (new Date(a, b, m(c, 1), m(g, 0), m(h, 0), m(i, 0))).getTime()
|
212 |
-
};
|
213 |
-
pb = b + "Minutes";
|
214 |
-
qb = b + "Hours";
|
215 |
-
rb = b + "Day";
|
216 |
-
Xa = b + "Date";
|
217 |
-
fb = b + "Month";
|
218 |
-
gb = b + "FullYear";
|
219 |
-
Db = c + "Minutes";
|
220 |
-
Eb = c + "Hours";
|
221 |
-
sb = c + "Date";
|
222 |
-
Fb = c + "Month";
|
223 |
-
Gb = c + "FullYear"
|
224 |
-
}
|
225 |
-
|
226 |
-
function P() {
|
227 |
-
}
|
228 |
-
|
229 |
-
function Sa(a, b, c, d) {
|
230 |
-
this.axis = a;
|
231 |
-
this.pos = b;
|
232 |
-
this.type = c || "";
|
233 |
-
this.isNew = !0;
|
234 |
-
!c && !d && this.addLabel()
|
235 |
-
}
|
236 |
-
|
237 |
-
function la() {
|
238 |
-
this.init.apply(this, arguments)
|
239 |
-
}
|
240 |
-
|
241 |
-
function Ya() {
|
242 |
-
this.init.apply(this, arguments)
|
243 |
-
}
|
244 |
-
|
245 |
-
function Hb(a, b, c, d, e) {
|
246 |
-
var f = a.chart.inverted;
|
247 |
-
this.axis = a;
|
248 |
-
this.isNegative = c;
|
249 |
-
this.options = b;
|
250 |
-
this.x = d;
|
251 |
-
this.total = null;
|
252 |
-
this.points = {};
|
253 |
-
this.stack = e;
|
254 |
-
this.alignOptions = {
|
255 |
-
align: b.align || (f ? c ? "left" : "right" : "center"),
|
256 |
-
verticalAlign: b.verticalAlign || (f ? "middle" : c ? "bottom" : "top"),
|
257 |
-
y: m(b.y, f ? 4 : c ? 14 : -6),
|
258 |
-
x: m(b.x, f ? c ? -6 : 6 : 0)
|
259 |
-
};
|
260 |
-
this.textAlign = b.textAlign || (f ? c ? "right" : "left" : "center")
|
261 |
-
}
|
262 |
-
|
263 |
-
var t, y = document, I = window, U = Math, u = U.round, T = U.floor, Ka = U.ceil, v = U.max, C = U.min, M = U.abs, Z = U.cos, ea = U.sin, ma = U.PI, Ca = ma * 2 / 360, wa = navigator.userAgent, Ib = I.opera, Aa = /msie/i.test(wa) && !Ib, hb = y.documentMode === 8, ib = /AppleWebKit/.test(wa), Ta = /Firefox/.test(wa), Jb = /(Mobile|Android|Windows Phone)/.test(wa), xa = "http://www.w3.org/2000/svg", aa = !!y.createElementNS && !!y.createElementNS(xa, "svg").createSVGRect, Nb = Ta && parseInt(wa.split("Firefox/")[1], 10) < 4, fa = !aa && !Aa && !!y.createElement("canvas").getContext, Za, $a, Kb = {}, tb = 0, db, E, cb, va, ub, A, sa = function () {
|
264 |
-
}, V = [], ab = 0, Ja = "div", Q = "none", Ob = /^[0-9]+$/, Pb = "stroke-width", eb, Ra, pb, qb, rb, Xa, fb, gb, Db, Eb, sb, Fb, Gb, F = {}, R = I.Highcharts = I.Highcharts ? ra(16,
|
265 |
-
!0) : {};
|
266 |
-
cb = function (a, b, c) {
|
267 |
-
if (!r(b) || isNaN(b))return "Invalid date";
|
268 |
-
var a = m(a, "%Y-%m-%d %H:%M:%S"), d = new Date(b - Ra), e, f = d[qb](), g = d[rb](), h = d[Xa](), i = d[fb](), j = d[gb](), k = E.lang, l = k.weekdays, d = q({
|
269 |
-
a: l[g].substr(0, 3),
|
270 |
-
A: l[g],
|
271 |
-
d: Ha(h),
|
272 |
-
e: h,
|
273 |
-
b: k.shortMonths[i],
|
274 |
-
B: k.months[i],
|
275 |
-
m: Ha(i + 1),
|
276 |
-
y: j.toString().substr(2, 2),
|
277 |
-
Y: j,
|
278 |
-
H: Ha(f),
|
279 |
-
I: Ha(f % 12 || 12),
|
280 |
-
l: f % 12 || 12,
|
281 |
-
M: Ha(d[pb]()),
|
282 |
-
p: f < 12 ? "AM" : "PM",
|
283 |
-
P: f < 12 ? "am" : "pm",
|
284 |
-
S: Ha(d.getSeconds()),
|
285 |
-
L: Ha(u(b % 1E3), 3)
|
286 |
-
}, R.dateFormats);
|
287 |
-
for (e in d)for (; a.indexOf("%" + e) !== -1;)a = a.replace("%" + e, typeof d[e] ===
|
288 |
-
"function" ? d[e](b) : d[e]);
|
289 |
-
return c ? a.substr(0, 1).toUpperCase() + a.substr(1) : a
|
290 |
-
};
|
291 |
-
Bb.prototype = {
|
292 |
-
wrapColor: function (a) {
|
293 |
-
if (this.color >= a)this.color = 0
|
294 |
-
}, wrapSymbol: function (a) {
|
295 |
-
if (this.symbol >= a)this.symbol = 0
|
296 |
-
}
|
297 |
-
};
|
298 |
-
A = function () {
|
299 |
-
for (var a = 0, b = arguments, c = b.length, d = {}; a < c; a++)d[b[a++]] = b[a];
|
300 |
-
return d
|
301 |
-
}("millisecond", 1, "second", 1E3, "minute", 6E4, "hour", 36E5, "day", 864E5, "week", 6048E5, "month", 26784E5, "year", 31556952E3);
|
302 |
-
ub = {
|
303 |
-
init: function (a, b, c) {
|
304 |
-
var b = b || "", d = a.shift, e = b.indexOf("C") > -1, f = e ? 7 : 3, g, b = b.split(" "), c = [].concat(c),
|
305 |
-
h, i, j = function (a) {
|
306 |
-
for (g = a.length; g--;)a[g] === "M" && a.splice(g + 1, 0, a[g + 1], a[g + 2], a[g + 1], a[g + 2])
|
307 |
-
};
|
308 |
-
e && (j(b), j(c));
|
309 |
-
a.isArea && (h = b.splice(b.length - 6, 6), i = c.splice(c.length - 6, 6));
|
310 |
-
if (d <= c.length / f && b.length === c.length)for (; d--;)c = [].concat(c).splice(0, f).concat(c);
|
311 |
-
a.shift = 0;
|
312 |
-
if (b.length)for (a = c.length; b.length < a;)d = [].concat(b).splice(b.length - f, f), e && (d[f - 6] = d[f - 2], d[f - 5] = d[f - 1]), b = b.concat(d);
|
313 |
-
h && (b = b.concat(h), c = c.concat(i));
|
314 |
-
return [b, c]
|
315 |
-
}, step: function (a, b, c, d) {
|
316 |
-
var e = [], f = a.length;
|
317 |
-
if (c === 1)e = d; else if (f ===
|
318 |
-
b.length && c < 1)for (; f--;)d = parseFloat(a[f]), e[f] = isNaN(d) ? a[f] : c * parseFloat(b[f] - d) + d; else e = b;
|
319 |
-
return e
|
320 |
-
}
|
321 |
-
};
|
322 |
-
(function (a) {
|
323 |
-
I.HighchartsAdapter = I.HighchartsAdapter || a && {
|
324 |
-
init: function (b) {
|
325 |
-
var c = a.fx, d = c.step, e, f = a.Tween, g = f && f.propHooks;
|
326 |
-
e = a.cssHooks.opacity;
|
327 |
-
a.extend(a.easing, {
|
328 |
-
easeOutQuad: function (a, b, c, d, e) {
|
329 |
-
return -d * (b /= e) * (b - 2) + c
|
330 |
-
}
|
331 |
-
});
|
332 |
-
a.each(["cur", "_default", "width", "height", "opacity"], function (a, b) {
|
333 |
-
var e = d, k;
|
334 |
-
b === "cur" ? e = c.prototype : b === "_default" && f && (e = g[b], b = "set");
|
335 |
-
(k = e[b]) && (e[b] = function (c) {
|
336 |
-
var d, c =
|
337 |
-
a ? c : this;
|
338 |
-
if (c.prop !== "align")return d = c.elem, d.attr ? d.attr(c.prop, b === "cur" ? t : c.now) : k.apply(this, arguments)
|
339 |
-
})
|
340 |
-
});
|
341 |
-
Ma(e, "get", function (a, b, c) {
|
342 |
-
return b.attr ? b.opacity || 0 : a.call(this, b, c)
|
343 |
-
});
|
344 |
-
e = function (a) {
|
345 |
-
var c = a.elem, d;
|
346 |
-
if (!a.started)d = b.init(c, c.d, c.toD), a.start = d[0], a.end = d[1], a.started = !0;
|
347 |
-
c.attr("d", b.step(a.start, a.end, a.pos, c.toD))
|
348 |
-
};
|
349 |
-
f ? g.d = {set: e} : d.d = e;
|
350 |
-
this.each = Array.prototype.forEach ? function (a, b) {
|
351 |
-
return Array.prototype.forEach.call(a, b)
|
352 |
-
} : function (a, b) {
|
353 |
-
for (var c = 0, d = a.length; c < d; c++)if (b.call(a[c],
|
354 |
-
a[c], c, a) === !1)return c
|
355 |
-
};
|
356 |
-
a.fn.highcharts = function () {
|
357 |
-
var a = "Chart", b = arguments, c, d;
|
358 |
-
if (this[0]) {
|
359 |
-
Fa(b[0]) && (a = b[0], b = Array.prototype.slice.call(b, 1));
|
360 |
-
c = b[0];
|
361 |
-
if (c !== t)c.chart = c.chart || {}, c.chart.renderTo = this[0], new R[a](c, b[1]), d = this;
|
362 |
-
c === t && (d = V[H(this[0], "data-highcharts-chart")])
|
363 |
-
}
|
364 |
-
return d
|
365 |
-
}
|
366 |
-
}, getScript: a.getScript, inArray: a.inArray, adapterRun: function (b, c) {
|
367 |
-
return a(b)[c]()
|
368 |
-
}, grep: a.grep, map: function (a, c) {
|
369 |
-
for (var d = [], e = 0, f = a.length; e < f; e++)d[e] = c.call(a[e], a[e], e, a);
|
370 |
-
return d
|
371 |
-
}, offset: function (b) {
|
372 |
-
return a(b).offset()
|
373 |
-
},
|
374 |
-
addEvent: function (b, c, d) {
|
375 |
-
a(b).bind(c, d)
|
376 |
-
}, removeEvent: function (b, c, d) {
|
377 |
-
var e = y.removeEventListener ? "removeEventListener" : "detachEvent";
|
378 |
-
y[e] && b && !b[e] && (b[e] = function () {
|
379 |
-
});
|
380 |
-
a(b).unbind(c, d)
|
381 |
-
}, fireEvent: function (b, c, d, e) {
|
382 |
-
var f = a.Event(c), g = "detached" + c, h;
|
383 |
-
!Aa && d && (delete d.layerX, delete d.layerY, delete d.returnValue);
|
384 |
-
q(f, d);
|
385 |
-
b[c] && (b[g] = b[c], b[c] = null);
|
386 |
-
a.each(["preventDefault", "stopPropagation"], function (a, b) {
|
387 |
-
var c = f[b];
|
388 |
-
f[b] = function () {
|
389 |
-
try {
|
390 |
-
c.call(f)
|
391 |
-
} catch (a) {
|
392 |
-
b === "preventDefault" && (h = !0)
|
393 |
-
}
|
394 |
-
}
|
395 |
-
});
|
396 |
-
a(b).trigger(f);
|
397 |
-
b[g] && (b[c] = b[g], b[g] = null);
|
398 |
-
e && !f.isDefaultPrevented() && !h && e(f)
|
399 |
-
}, washMouseEvent: function (a) {
|
400 |
-
var c = a.originalEvent || a;
|
401 |
-
if (c.pageX === t)c.pageX = a.pageX, c.pageY = a.pageY;
|
402 |
-
return c
|
403 |
-
}, animate: function (b, c, d) {
|
404 |
-
var e = a(b);
|
405 |
-
if (!b.style)b.style = {};
|
406 |
-
if (c.d)b.toD = c.d, c.d = 1;
|
407 |
-
e.stop();
|
408 |
-
c.opacity !== t && b.attr && (c.opacity += "px");
|
409 |
-
e.animate(c, d)
|
410 |
-
}, stop: function (b) {
|
411 |
-
a(b).stop()
|
412 |
-
}
|
413 |
-
}
|
414 |
-
})(I.jQuery);
|
415 |
-
var S = I.HighchartsAdapter, N = S || {};
|
416 |
-
S && S.init.call(S, ub);
|
417 |
-
var jb = N.adapterRun, Qb = N.getScript, Da = N.inArray, p = N.each, vb = N.grep, Rb = N.offset, Ua =
|
418 |
-
N.map, K = N.addEvent, W = N.removeEvent, D = N.fireEvent, Sb = N.washMouseEvent, kb = N.animate, bb = N.stop, N = {
|
419 |
-
enabled: !0,
|
420 |
-
x: 0,
|
421 |
-
y: 15,
|
422 |
-
style: {color: "#606060", cursor: "default", fontSize: "11px"}
|
423 |
-
};
|
424 |
-
E = {
|
425 |
-
colors: "#7cb5ec,#434348,#90ed7d,#f7a35c,#8085e9,#f15c80,#e4d354,#8085e8,#8d4653,#91e8e1".split(","),
|
426 |
-
symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
|
427 |
-
lang: {
|
428 |
-
loading: "Loading...",
|
429 |
-
months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","),
|
430 |
-
shortMonths: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),
|
431 |
-
weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
|
432 |
-
decimalPoint: ".",
|
433 |
-
numericSymbols: "k,M,G,T,P,E".split(","),
|
434 |
-
resetZoom: "Reset zoom",
|
435 |
-
resetZoomTitle: "Reset zoom level 1:1",
|
436 |
-
thousandsSep: ","
|
437 |
-
},
|
438 |
-
global: {
|
439 |
-
useUTC: !0,
|
440 |
-
canvasToolsURL: "http://code.highcharts.com/4.0.1/modules/canvas-tools.js",
|
441 |
-
VMLRadialGradientURL: "http://code.highcharts.com/4.0.1/gfx/vml-radial-gradient.png"
|
442 |
-
},
|
443 |
-
chart: {
|
444 |
-
borderColor: "#4572A7",
|
445 |
-
borderRadius: 0,
|
446 |
-
defaultSeriesType: "line",
|
447 |
-
ignoreHiddenSeries: !0,
|
448 |
-
spacing: [10, 10, 15,
|
449 |
-
10],
|
450 |
-
backgroundColor: "#FFFFFF",
|
451 |
-
plotBorderColor: "#C0C0C0",
|
452 |
-
resetZoomButton: {theme: {zIndex: 20}, position: {align: "right", x: -10, y: 10}}
|
453 |
-
},
|
454 |
-
title: {text: "Chart title", align: "center", margin: 15, style: {color: "#333333", fontSize: "18px"}},
|
455 |
-
subtitle: {text: "", align: "center", style: {color: "#555555"}},
|
456 |
-
plotOptions: {
|
457 |
-
line: {
|
458 |
-
allowPointSelect: !1,
|
459 |
-
showCheckbox: !1,
|
460 |
-
animation: {duration: 1E3},
|
461 |
-
events: {},
|
462 |
-
lineWidth: 2,
|
463 |
-
marker: {
|
464 |
-
lineWidth: 0, radius: 4, lineColor: "#FFFFFF", states: {
|
465 |
-
hover: {enabled: !0}, select: {
|
466 |
-
fillColor: "#FFFFFF", lineColor: "#000000",
|
467 |
-
lineWidth: 2
|
468 |
-
}
|
469 |
-
}
|
470 |
-
},
|
471 |
-
point: {events: {}},
|
472 |
-
dataLabels: w(N, {
|
473 |
-
align: "center", enabled: !1, formatter: function () {
|
474 |
-
return this.y === null ? "" : Ga(this.y, -1)
|
475 |
-
}, verticalAlign: "bottom", y: 0
|
476 |
-
}),
|
477 |
-
cropThreshold: 300,
|
478 |
-
pointRange: 0,
|
479 |
-
states: {hover: {marker: {}, halo: {size: 10, opacity: 0.25}}, select: {marker: {}}},
|
480 |
-
stickyTracking: !0,
|
481 |
-
turboThreshold: 1E3
|
482 |
-
}
|
483 |
-
},
|
484 |
-
labels: {style: {position: "absolute", color: "#3E576F"}},
|
485 |
-
legend: {
|
486 |
-
enabled: !0,
|
487 |
-
align: "center",
|
488 |
-
layout: "horizontal",
|
489 |
-
labelFormatter: function () {
|
490 |
-
return this.name
|
491 |
-
},
|
492 |
-
borderColor: "#909090",
|
493 |
-
borderRadius: 0,
|
494 |
-
navigation: {
|
495 |
-
activeColor: "#274b6d",
|
496 |
-
inactiveColor: "#CCC"
|
497 |
-
},
|
498 |
-
shadow: !1,
|
499 |
-
itemStyle: {color: "#333333", fontSize: "12px", fontWeight: "bold"},
|
500 |
-
itemHoverStyle: {color: "#000"},
|
501 |
-
itemHiddenStyle: {color: "#CCC"},
|
502 |
-
itemCheckboxStyle: {position: "absolute", width: "13px", height: "13px"},
|
503 |
-
symbolPadding: 5,
|
504 |
-
verticalAlign: "bottom",
|
505 |
-
x: 0,
|
506 |
-
y: 0,
|
507 |
-
title: {style: {fontWeight: "bold"}}
|
508 |
-
},
|
509 |
-
loading: {
|
510 |
-
labelStyle: {fontWeight: "bold", position: "relative", top: "1em"},
|
511 |
-
style: {position: "absolute", backgroundColor: "white", opacity: 0.5, textAlign: "center"}
|
512 |
-
},
|
513 |
-
tooltip: {
|
514 |
-
enabled: !0,
|
515 |
-
animation: aa,
|
516 |
-
backgroundColor: "rgba(249, 249, 249, .85)",
|
517 |
-
borderWidth: 1,
|
518 |
-
borderRadius: 3,
|
519 |
-
dateTimeLabelFormats: {
|
520 |
-
millisecond: "%A, %b %e, %H:%M:%S.%L",
|
521 |
-
second: "%A, %b %e, %H:%M:%S",
|
522 |
-
minute: "%A, %b %e, %H:%M",
|
523 |
-
hour: "%A, %b %e, %H:%M",
|
524 |
-
day: "%A, %b %e, %Y",
|
525 |
-
week: "Week from %A, %b %e, %Y",
|
526 |
-
month: "%B %Y",
|
527 |
-
year: "%Y"
|
528 |
-
},
|
529 |
-
headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>',
|
530 |
-
pointFormat: '<span style="color:{series.color}">●</span> {series.name}: <b>{point.y}</b><br/>',
|
531 |
-
shadow: !0,
|
532 |
-
snap: Jb ? 25 : 10,
|
533 |
-
style: {
|
534 |
-
color: "#333333", cursor: "default", fontSize: "12px", padding: "8px",
|
535 |
-
whiteSpace: "nowrap"
|
536 |
-
}
|
537 |
-
},
|
538 |
-
credits: {
|
539 |
-
enabled: !0,
|
540 |
-
text: "Highcharts.com",
|
541 |
-
href: "http://www.highcharts.com",
|
542 |
-
position: {align: "right", x: -10, verticalAlign: "bottom", y: -5},
|
543 |
-
style: {cursor: "pointer", color: "#909090", fontSize: "9px"}
|
544 |
-
}
|
545 |
-
};
|
546 |
-
var ba = E.plotOptions, S = ba.line;
|
547 |
-
Cb();
|
548 |
-
var Tb = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/, Ub = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/, Vb = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, ya = function (a) {
|
549 |
-
var b = [], c,
|
550 |
-
d;
|
551 |
-
(function (a) {
|
552 |
-
a && a.stops ? d = Ua(a.stops, function (a) {
|
553 |
-
return ya(a[1])
|
554 |
-
}) : (c = Tb.exec(a)) ? b = [z(c[1]), z(c[2]), z(c[3]), parseFloat(c[4], 10)] : (c = Ub.exec(a)) ? b = [z(c[1], 16), z(c[2], 16), z(c[3], 16), 1] : (c = Vb.exec(a)) && (b = [z(c[1]), z(c[2]), z(c[3]), 1])
|
555 |
-
})(a);
|
556 |
-
return {
|
557 |
-
get: function (c) {
|
558 |
-
var f;
|
559 |
-
d ? (f = w(a), f.stops = [].concat(f.stops), p(d, function (a, b) {
|
560 |
-
f.stops[b] = [f.stops[b][0], a.get(c)]
|
561 |
-
})) : f = b && !isNaN(b[0]) ? c === "rgb" ? "rgb(" + b[0] + "," + b[1] + "," + b[2] + ")" : c === "a" ? b[3] : "rgba(" + b.join(",") + ")" : a;
|
562 |
-
return f
|
563 |
-
}, brighten: function (a) {
|
564 |
-
if (d)p(d,
|
565 |
-
function (b) {
|
566 |
-
b.brighten(a)
|
567 |
-
}); else if (ha(a) && a !== 0) {
|
568 |
-
var c;
|
569 |
-
for (c = 0; c < 3; c++)b[c] += z(a * 255), b[c] < 0 && (b[c] = 0), b[c] > 255 && (b[c] = 255)
|
570 |
-
}
|
571 |
-
return this
|
572 |
-
}, rgba: b, setOpacity: function (a) {
|
573 |
-
b[3] = a;
|
574 |
-
return this
|
575 |
-
}
|
576 |
-
}
|
577 |
-
};
|
578 |
-
P.prototype = {
|
579 |
-
init: function (a, b) {
|
580 |
-
this.element = b === "span" ? Y(b) : y.createElementNS(xa, b);
|
581 |
-
this.renderer = a
|
582 |
-
}, opacity: 1, animate: function (a, b, c) {
|
583 |
-
b = m(b, va, !0);
|
584 |
-
bb(this);
|
585 |
-
if (b) {
|
586 |
-
b = w(b, {});
|
587 |
-
if (c)b.complete = c;
|
588 |
-
kb(this, a, b)
|
589 |
-
} else this.attr(a), c && c()
|
590 |
-
}, colorGradient: function (a, b, c) {
|
591 |
-
var d = this.renderer, e, f, g, h, i, j, k, l, o, n, s = [];
|
592 |
-
a.linearGradient ?
|
593 |
-
f = "linearGradient" : a.radialGradient && (f = "radialGradient");
|
594 |
-
if (f) {
|
595 |
-
g = a[f];
|
596 |
-
h = d.gradients;
|
597 |
-
j = a.stops;
|
598 |
-
o = c.radialReference;
|
599 |
-
La(g) && (a[f] = g = {x1: g[0], y1: g[1], x2: g[2], y2: g[3], gradientUnits: "userSpaceOnUse"});
|
600 |
-
f === "radialGradient" && o && !r(g.gradientUnits) && (g = w(g, {
|
601 |
-
cx: o[0] - o[2] / 2 + g.cx * o[2],
|
602 |
-
cy: o[1] - o[2] / 2 + g.cy * o[2],
|
603 |
-
r: g.r * o[2],
|
604 |
-
gradientUnits: "userSpaceOnUse"
|
605 |
-
}));
|
606 |
-
for (n in g)n !== "id" && s.push(n, g[n]);
|
607 |
-
for (n in j)s.push(j[n]);
|
608 |
-
s = s.join(",");
|
609 |
-
h[s] ? a = h[s].attr("id") : (g.id = a = "highcharts-" + tb++, h[s] = i = d.createElement(f).attr(g).add(d.defs),
|
610 |
-
i.stops = [], p(j, function (a) {
|
611 |
-
a[1].indexOf("rgba") === 0 ? (e = ya(a[1]), k = e.get("rgb"), l = e.get("a")) : (k = a[1], l = 1);
|
612 |
-
a = d.createElement("stop").attr({offset: a[0], "stop-color": k, "stop-opacity": l}).add(i);
|
613 |
-
i.stops.push(a)
|
614 |
-
}));
|
615 |
-
c.setAttribute(b, "url(" + d.url + "#" + a + ")")
|
616 |
-
}
|
617 |
-
}, attr: function (a, b) {
|
618 |
-
var c, d, e = this.element, f, g = this, h;
|
619 |
-
typeof a === "string" && b !== t && (c = a, a = {}, a[c] = b);
|
620 |
-
if (typeof a === "string")g = (this[a + "Getter"] || this._defaultGetter).call(this, a, e); else {
|
621 |
-
for (c in a) {
|
622 |
-
d = a[c];
|
623 |
-
h = !1;
|
624 |
-
this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(c) &&
|
625 |
-
(f || (this.symbolAttr(a), f = !0), h = !0);
|
626 |
-
if (this.rotation && (c === "x" || c === "y"))this.doTransform = !0;
|
627 |
-
h || (this[c + "Setter"] || this._defaultSetter).call(this, d, c, e);
|
628 |
-
this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(c) && this.updateShadows(c, d)
|
629 |
-
}
|
630 |
-
if (this.doTransform)this.updateTransform(), this.doTransform = !1
|
631 |
-
}
|
632 |
-
return g
|
633 |
-
}, updateShadows: function (a, b) {
|
634 |
-
for (var c = this.shadows, d = c.length; d--;)c[d].setAttribute(a, a === "height" ? v(b - (c[d].cutHeight || 0), 0) : a === "d" ? this.d : b)
|
635 |
-
}, addClass: function (a) {
|
636 |
-
var b = this.element,
|
637 |
-
c = H(b, "class") || "";
|
638 |
-
c.indexOf(a) === -1 && H(b, "class", c + " " + a);
|
639 |
-
return this
|
640 |
-
}, symbolAttr: function (a) {
|
641 |
-
var b = this;
|
642 |
-
p("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","), function (c) {
|
643 |
-
b[c] = m(a[c], b[c])
|
644 |
-
});
|
645 |
-
b.attr({d: b.renderer.symbols[b.symbolName](b.x, b.y, b.width, b.height, b)})
|
646 |
-
}, clip: function (a) {
|
647 |
-
return this.attr("clip-path", a ? "url(" + this.renderer.url + "#" + a.id + ")" : Q)
|
648 |
-
}, crisp: function (a) {
|
649 |
-
var b, c = {}, d, e = a.strokeWidth || this.strokeWidth || this.attr && this.attr("stroke-width") || 0;
|
650 |
-
d = u(e) % 2 / 2;
|
651 |
-
a.x = T(a.x || this.x ||
|
652 |
-
0) + d;
|
653 |
-
a.y = T(a.y || this.y || 0) + d;
|
654 |
-
a.width = T((a.width || this.width || 0) - 2 * d);
|
655 |
-
a.height = T((a.height || this.height || 0) - 2 * d);
|
656 |
-
a.strokeWidth = e;
|
657 |
-
for (b in a)this[b] !== a[b] && (this[b] = c[b] = a[b]);
|
658 |
-
return c
|
659 |
-
}, css: function (a) {
|
660 |
-
var b = this.styles, c = {}, d = this.element, e, f, g = "";
|
661 |
-
e = !b;
|
662 |
-
if (a && a.color)a.fill = a.color;
|
663 |
-
if (b)for (f in a)a[f] !== b[f] && (c[f] = a[f], e = !0);
|
664 |
-
if (e) {
|
665 |
-
e = this.textWidth = a && a.width && d.nodeName.toLowerCase() === "text" && z(a.width);
|
666 |
-
b && (a = q(b, c));
|
667 |
-
this.styles = a;
|
668 |
-
e && (fa || !aa && this.renderer.forExport) && delete a.width;
|
669 |
-
if (Aa && !aa)G(this.element,
|
670 |
-
a); else {
|
671 |
-
b = function (a, b) {
|
672 |
-
return "-" + b.toLowerCase()
|
673 |
-
};
|
674 |
-
for (f in a)g += f.replace(/([A-Z])/g, b) + ":" + a[f] + ";";
|
675 |
-
H(d, "style", g)
|
676 |
-
}
|
677 |
-
e && this.added && this.renderer.buildText(this)
|
678 |
-
}
|
679 |
-
return this
|
680 |
-
}, on: function (a, b) {
|
681 |
-
var c = this, d = c.element;
|
682 |
-
$a && a === "click" ? (d.ontouchstart = function (a) {
|
683 |
-
c.touchEventFired = Date.now();
|
684 |
-
a.preventDefault();
|
685 |
-
b.call(d, a)
|
686 |
-
}, d.onclick = function (a) {
|
687 |
-
(wa.indexOf("Android") === -1 || Date.now() - (c.touchEventFired || 0) > 1100) && b.call(d, a)
|
688 |
-
}) : d["on" + a] = b;
|
689 |
-
return this
|
690 |
-
}, setRadialReference: function (a) {
|
691 |
-
this.element.radialReference =
|
692 |
-
a;
|
693 |
-
return this
|
694 |
-
}, translate: function (a, b) {
|
695 |
-
return this.attr({translateX: a, translateY: b})
|
696 |
-
}, invert: function () {
|
697 |
-
this.inverted = !0;
|
698 |
-
this.updateTransform();
|
699 |
-
return this
|
700 |
-
}, updateTransform: function () {
|
701 |
-
var a = this.translateX || 0, b = this.translateY || 0, c = this.scaleX, d = this.scaleY, e = this.inverted, f = this.rotation, g = this.element;
|
702 |
-
e && (a += this.attr("width"), b += this.attr("height"));
|
703 |
-
a = ["translate(" + a + "," + b + ")"];
|
704 |
-
e ? a.push("rotate(90) scale(-1,1)") : f && a.push("rotate(" + f + " " + (g.getAttribute("x") || 0) + " " + (g.getAttribute("y") || 0) + ")");
|
705 |
-
(r(c) || r(d)) && a.push("scale(" + m(c, 1) + " " + m(d, 1) + ")");
|
706 |
-
a.length && g.setAttribute("transform", a.join(" "))
|
707 |
-
}, toFront: function () {
|
708 |
-
var a = this.element;
|
709 |
-
a.parentNode.appendChild(a);
|
710 |
-
return this
|
711 |
-
}, align: function (a, b, c) {
|
712 |
-
var d, e, f, g, h = {};
|
713 |
-
e = this.renderer;
|
714 |
-
f = e.alignedObjects;
|
715 |
-
if (a) {
|
716 |
-
if (this.alignOptions = a, this.alignByTranslate = b, !c || Fa(c))this.alignTo = d = c || "renderer", ja(f, this), f.push(this), c = null
|
717 |
-
} else a = this.alignOptions, b = this.alignByTranslate, d = this.alignTo;
|
718 |
-
c = m(c, e[d], e);
|
719 |
-
d = a.align;
|
720 |
-
e = a.verticalAlign;
|
721 |
-
f = (c.x || 0) + (a.x ||
|
722 |
-
0);
|
723 |
-
g = (c.y || 0) + (a.y || 0);
|
724 |
-
if (d === "right" || d === "center")f += (c.width - (a.width || 0)) / {right: 1, center: 2}[d];
|
725 |
-
h[b ? "translateX" : "x"] = u(f);
|
726 |
-
if (e === "bottom" || e === "middle")g += (c.height - (a.height || 0)) / ({bottom: 1, middle: 2}[e] || 1);
|
727 |
-
h[b ? "translateY" : "y"] = u(g);
|
728 |
-
this[this.placed ? "animate" : "attr"](h);
|
729 |
-
this.placed = !0;
|
730 |
-
this.alignAttr = h;
|
731 |
-
return this
|
732 |
-
}, getBBox: function () {
|
733 |
-
var a = this.bBox, b = this.renderer, c, d, e = this.rotation;
|
734 |
-
c = this.element;
|
735 |
-
var f = this.styles, g = e * Ca;
|
736 |
-
d = this.textStr;
|
737 |
-
var h;
|
738 |
-
if (d === "" || Ob.test(d))h = "num." + d.toString().length +
|
739 |
-
(f ? "|" + f.fontSize + "|" + f.fontFamily : "");
|
740 |
-
h && (a = b.cache[h]);
|
741 |
-
if (!a) {
|
742 |
-
if (c.namespaceURI === xa || b.forExport) {
|
743 |
-
try {
|
744 |
-
a = c.getBBox ? q({}, c.getBBox()) : {width: c.offsetWidth, height: c.offsetHeight}
|
745 |
-
} catch (i) {
|
746 |
-
}
|
747 |
-
if (!a || a.width < 0)a = {width: 0, height: 0}
|
748 |
-
} else a = this.htmlGetBBox();
|
749 |
-
if (b.isSVG) {
|
750 |
-
c = a.width;
|
751 |
-
d = a.height;
|
752 |
-
if (Aa && f && f.fontSize === "11px" && d.toPrecision(3) === "16.9")a.height = d = 14;
|
753 |
-
if (e)a.width = M(d * ea(g)) + M(c * Z(g)), a.height = M(d * Z(g)) + M(c * ea(g))
|
754 |
-
}
|
755 |
-
this.bBox = a;
|
756 |
-
h && (b.cache[h] = a)
|
757 |
-
}
|
758 |
-
return a
|
759 |
-
}, show: function (a) {
|
760 |
-
return a && this.element.namespaceURI ===
|
761 |
-
xa ? (this.element.removeAttribute("visibility"), this) : this.attr({visibility: a ? "inherit" : "visible"})
|
762 |
-
}, hide: function () {
|
763 |
-
return this.attr({visibility: "hidden"})
|
764 |
-
}, fadeOut: function (a) {
|
765 |
-
var b = this;
|
766 |
-
b.animate({opacity: 0}, {
|
767 |
-
duration: a || 150, complete: function () {
|
768 |
-
b.hide()
|
769 |
-
}
|
770 |
-
})
|
771 |
-
}, add: function (a) {
|
772 |
-
var b = this.renderer, c = a || b, d = c.element || b.box, e = this.element, f = this.zIndex, g, h;
|
773 |
-
if (a)this.parentGroup = a;
|
774 |
-
this.parentInverted = a && a.inverted;
|
775 |
-
this.textStr !== void 0 && b.buildText(this);
|
776 |
-
if (f)c.handleZ = !0, f = z(f);
|
777 |
-
if (c.handleZ) {
|
778 |
-
a = d.childNodes;
|
779 |
-
for (g = 0; g < a.length; g++)if (b = a[g], c = H(b, "zIndex"), b !== e && (z(c) > f || !r(f) && r(c))) {
|
780 |
-
d.insertBefore(e, b);
|
781 |
-
h = !0;
|
782 |
-
break
|
783 |
-
}
|
784 |
-
}
|
785 |
-
h || d.appendChild(e);
|
786 |
-
this.added = !0;
|
787 |
-
if (this.onAdd)this.onAdd();
|
788 |
-
return this
|
789 |
-
}, safeRemoveChild: function (a) {
|
790 |
-
var b = a.parentNode;
|
791 |
-
b && b.removeChild(a)
|
792 |
-
}, destroy: function () {
|
793 |
-
var a = this, b = a.element || {}, c = a.shadows, d = a.renderer.isSVG && b.nodeName === "SPAN" && a.parentGroup, e, f;
|
794 |
-
b.onclick = b.onmouseout = b.onmouseover = b.onmousemove = b.point = null;
|
795 |
-
bb(a);
|
796 |
-
if (a.clipPath)a.clipPath = a.clipPath.destroy();
|
797 |
-
if (a.stops) {
|
798 |
-
for (f =
|
799 |
-
0; f < a.stops.length; f++)a.stops[f] = a.stops[f].destroy();
|
800 |
-
a.stops = null
|
801 |
-
}
|
802 |
-
a.safeRemoveChild(b);
|
803 |
-
for (c && p(c, function (b) {
|
804 |
-
a.safeRemoveChild(b)
|
805 |
-
}); d && d.div.childNodes.length === 0;)b = d.parentGroup, a.safeRemoveChild(d.div), delete d.div, d = b;
|
806 |
-
a.alignTo && ja(a.renderer.alignedObjects, a);
|
807 |
-
for (e in a)delete a[e];
|
808 |
-
return null
|
809 |
-
}, shadow: function (a, b, c) {
|
810 |
-
var d = [], e, f, g = this.element, h, i, j, k;
|
811 |
-
if (a) {
|
812 |
-
i = m(a.width, 3);
|
813 |
-
j = (a.opacity || 0.15) / i;
|
814 |
-
k = this.parentInverted ? "(-1,-1)" : "(" + m(a.offsetX, 1) + ", " + m(a.offsetY, 1) + ")";
|
815 |
-
for (e = 1; e <= i; e++) {
|
816 |
-
f =
|
817 |
-
g.cloneNode(0);
|
818 |
-
h = i * 2 + 1 - 2 * e;
|
819 |
-
H(f, {
|
820 |
-
isShadow: "true",
|
821 |
-
stroke: a.color || "black",
|
822 |
-
"stroke-opacity": j * e,
|
823 |
-
"stroke-width": h,
|
824 |
-
transform: "translate" + k,
|
825 |
-
fill: Q
|
826 |
-
});
|
827 |
-
if (c)H(f, "height", v(H(f, "height") - h, 0)), f.cutHeight = h;
|
828 |
-
b ? b.element.appendChild(f) : g.parentNode.insertBefore(f, g);
|
829 |
-
d.push(f)
|
830 |
-
}
|
831 |
-
this.shadows = d
|
832 |
-
}
|
833 |
-
return this
|
834 |
-
}, xGetter: function (a) {
|
835 |
-
this.element.nodeName === "circle" && (a = {x: "cx", y: "cy"}[a] || a);
|
836 |
-
return this._defaultGetter(a)
|
837 |
-
}, _defaultGetter: function (a) {
|
838 |
-
a = m(this[a], this.element ? this.element.getAttribute(a) : null, 0);
|
839 |
-
/^[0-9\.]+$/.test(a) &&
|
840 |
-
(a = parseFloat(a));
|
841 |
-
return a
|
842 |
-
}, dSetter: function (a, b, c) {
|
843 |
-
a && a.join && (a = a.join(" "));
|
844 |
-
/(NaN| {2}|^$)/.test(a) && (a = "M 0 0");
|
845 |
-
c.setAttribute(b, a);
|
846 |
-
this[b] = a
|
847 |
-
}, dashstyleSetter: function (a) {
|
848 |
-
var b;
|
849 |
-
if (a = a && a.toLowerCase()) {
|
850 |
-
a = a.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
|
851 |
-
for (b = a.length; b--;)a[b] = z(a[b]) * this.element.getAttribute("stroke-width");
|
852 |
-
a = a.join(",");
|
853 |
-
this.element.setAttribute("stroke-dasharray", a)
|
854 |
-
}
|
855 |
-
}, alignSetter: function (a) {
|
856 |
-
this.element.setAttribute("text-anchor", {left: "start", center: "middle", right: "end"}[a])
|
857 |
-
}, opacitySetter: function (a, b, c) {
|
858 |
-
this[b] = a;
|
859 |
-
c.setAttribute(b, a)
|
860 |
-
}, "stroke-widthSetter": function (a, b, c) {
|
861 |
-
a === 0 && (a = 1.0E-5);
|
862 |
-
this.strokeWidth = a;
|
863 |
-
c.setAttribute(b, a)
|
864 |
-
}, titleSetter: function (a) {
|
865 |
-
var b = this.element.getElementsByTagName("title")[0];
|
866 |
-
b || (b = y.createElementNS(xa, "title"), this.element.appendChild(b));
|
867 |
-
b.textContent = a
|
868 |
-
}, textSetter: function (a) {
|
869 |
-
if (a !==
|
870 |
-
this.textStr)delete this.bBox, this.textStr = a, this.added && this.renderer.buildText(this)
|
871 |
-
}, fillSetter: function (a, b, c) {
|
872 |
-
typeof a === "string" ? c.setAttribute(b, a) : a && this.colorGradient(a, b, c)
|
873 |
-
}, zIndexSetter: function (a, b, c) {
|
874 |
-
c.setAttribute(b, a);
|
875 |
-
this[b] = a
|
876 |
-
}, _defaultSetter: function (a, b, c) {
|
877 |
-
c.setAttribute(b, a)
|
878 |
-
}
|
879 |
-
};
|
880 |
-
P.prototype.yGetter = P.prototype.xGetter;
|
881 |
-
P.prototype.translateXSetter = P.prototype.translateYSetter = P.prototype.rotationSetter = P.prototype.verticalAlignSetter = P.prototype.scaleXSetter = P.prototype.scaleYSetter =
|
882 |
-
function (a, b) {
|
883 |
-
this[b] = a;
|
884 |
-
this.doTransform = !0
|
885 |
-
};
|
886 |
-
P.prototype.strokeSetter = P.prototype.fillSetter;
|
887 |
-
var ta = function () {
|
888 |
-
this.init.apply(this, arguments)
|
889 |
-
};
|
890 |
-
ta.prototype = {
|
891 |
-
Element: P, init: function (a, b, c, d, e) {
|
892 |
-
var f = location, g, d = this.createElement("svg").attr({version: "1.1"}).css(this.getStyle(d));
|
893 |
-
g = d.element;
|
894 |
-
a.appendChild(g);
|
895 |
-
a.innerHTML.indexOf("xmlns") === -1 && H(g, "xmlns", xa);
|
896 |
-
this.isSVG = !0;
|
897 |
-
this.box = g;
|
898 |
-
this.boxWrapper = d;
|
899 |
-
this.alignedObjects = [];
|
900 |
-
this.url = (Ta || ib) && y.getElementsByTagName("base").length ? f.href.replace(/#.*?$/,
|
901 |
-
"").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20") : "";
|
902 |
-
this.createElement("desc").add().element.appendChild(y.createTextNode("Created with Highcharts 4.0.1"));
|
903 |
-
this.defs = this.createElement("defs").add();
|
904 |
-
this.forExport = e;
|
905 |
-
this.gradients = {};
|
906 |
-
this.cache = {};
|
907 |
-
this.setSize(b, c, !1);
|
908 |
-
var h;
|
909 |
-
if (Ta && a.getBoundingClientRect)this.subPixelFix = b = function () {
|
910 |
-
G(a, {left: 0, top: 0});
|
911 |
-
h = a.getBoundingClientRect();
|
912 |
-
G(a, {left: Ka(h.left) - h.left + "px", top: Ka(h.top) - h.top + "px"})
|
913 |
-
}, b(), K(I, "resize", b)
|
914 |
-
}, getStyle: function (a) {
|
915 |
-
return this.style =
|
916 |
-
q({
|
917 |
-
fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',
|
918 |
-
fontSize: "12px"
|
919 |
-
}, a)
|
920 |
-
}, isHidden: function () {
|
921 |
-
return !this.boxWrapper.getBBox().width
|
922 |
-
}, destroy: function () {
|
923 |
-
var a = this.defs;
|
924 |
-
this.box = null;
|
925 |
-
this.boxWrapper = this.boxWrapper.destroy();
|
926 |
-
Oa(this.gradients || {});
|
927 |
-
this.gradients = null;
|
928 |
-
if (a)this.defs = a.destroy();
|
929 |
-
this.subPixelFix && W(I, "resize", this.subPixelFix);
|
930 |
-
return this.alignedObjects = null
|
931 |
-
}, createElement: function (a) {
|
932 |
-
var b = new this.Element;
|
933 |
-
b.init(this, a);
|
934 |
-
return b
|
935 |
-
}, draw: function () {
|
936 |
-
},
|
937 |
-
buildText: function (a) {
|
938 |
-
for (var b = a.element, c = this, d = c.forExport, e = m(a.textStr, "").toString(), f = e.indexOf("<") !== -1, g = b.childNodes, h, i, j = H(b, "x"), k = a.styles, l = a.textWidth, o = k && k.lineHeight, n = g.length, s = function (a) {
|
939 |
-
return o ? z(o) : c.fontMetrics(/(px|em)$/.test(a && a.style.fontSize) ? a.style.fontSize : k && k.fontSize || c.style.fontSize || 12).h
|
940 |
-
}; n--;)b.removeChild(g[n]);
|
941 |
-
!f && e.indexOf(" ") === -1 ? b.appendChild(y.createTextNode(e)) : (h = /<.*style="([^"]+)".*>/, i = /<.*href="(http[^"]+)".*>/, l && !a.added && this.box.appendChild(b),
|
942 |
-
e = f ? e.replace(/<(b|strong)>/g, '<span style="font-weight:bold">').replace(/<(i|em)>/g, '<span style="font-style:italic">').replace(/<a/g, "<span").replace(/<\/(b|strong|i|em|a)>/g, "</span>").split(/<br.*?>/g) : [e], e[e.length - 1] === "" && e.pop(), p(e, function (e, f) {
|
943 |
-
var g, n = 0, e = e.replace(/<span/g, "|||<span").replace(/<\/span>/g, "</span>|||");
|
944 |
-
g = e.split("|||");
|
945 |
-
p(g, function (e) {
|
946 |
-
if (e !== "" || g.length === 1) {
|
947 |
-
var o = {}, m = y.createElementNS(xa, "tspan"), p;
|
948 |
-
h.test(e) && (p = e.match(h)[1].replace(/(;| |^)color([ :])/, "$1fill$2"),
|
949 |
-
H(m, "style", p));
|
950 |
-
i.test(e) && !d && (H(m, "onclick", 'location.href="' + e.match(i)[1] + '"'), G(m, {cursor: "pointer"}));
|
951 |
-
e = (e.replace(/<(.|\n)*?>/g, "") || " ").replace(/</g, "<").replace(/>/g, ">");
|
952 |
-
if (e !== " ") {
|
953 |
-
m.appendChild(y.createTextNode(e));
|
954 |
-
if (n)o.dx = 0; else if (f && j !== null)o.x = j;
|
955 |
-
H(m, o);
|
956 |
-
!n && f && (!aa && d && G(m, {display: "block"}), H(m, "dy", s(m), ib && m.offsetHeight));
|
957 |
-
b.appendChild(m);
|
958 |
-
n++;
|
959 |
-
if (l)for (var e = e.replace(/([^\^])-/g, "$1- ").split(" "), o = e.length > 1 && k.whiteSpace !== "nowrap", $, r, B = a._clipHeight, q = [], v = s(), t =
|
960 |
-
1; o && (e.length || q.length);)delete a.bBox, $ = a.getBBox(), r = $.width, !aa && c.forExport && (r = c.measureSpanWidth(m.firstChild.data, a.styles)), $ = r > l, !$ || e.length === 1 ? (e = q, q = [], e.length && (t++, B && t * v > B ? (e = ["..."], a.attr("title", a.textStr)) : (m = y.createElementNS(xa, "tspan"), H(m, {
|
961 |
-
dy: v,
|
962 |
-
x: j
|
963 |
-
}), p && H(m, "style", p), b.appendChild(m), r > l && (l = r)))) : (m.removeChild(m.firstChild), q.unshift(e.pop())), e.length && m.appendChild(y.createTextNode(e.join(" ").replace(/- /g, "-")))
|
964 |
-
}
|
965 |
-
}
|
966 |
-
})
|
967 |
-
}))
|
968 |
-
}, button: function (a, b, c, d, e, f, g, h, i) {
|
969 |
-
var j = this.label(a,
|
970 |
-
b, c, i, null, null, null, null, "button"), k = 0, l, o, n, s, m, p, a = {
|
971 |
-
x1: 0,
|
972 |
-
y1: 0,
|
973 |
-
x2: 0,
|
974 |
-
y2: 1
|
975 |
-
}, e = w({
|
976 |
-
"stroke-width": 1,
|
977 |
-
stroke: "#CCCCCC",
|
978 |
-
fill: {linearGradient: a, stops: [[0, "#FEFEFE"], [1, "#F6F6F6"]]},
|
979 |
-
r: 2,
|
980 |
-
padding: 5,
|
981 |
-
style: {color: "black"}
|
982 |
-
}, e);
|
983 |
-
n = e.style;
|
984 |
-
delete e.style;
|
985 |
-
f = w(e, {stroke: "#68A", fill: {linearGradient: a, stops: [[0, "#FFF"], [1, "#ACF"]]}}, f);
|
986 |
-
s = f.style;
|
987 |
-
delete f.style;
|
988 |
-
g = w(e, {stroke: "#68A", fill: {linearGradient: a, stops: [[0, "#9BD"], [1, "#CDF"]]}}, g);
|
989 |
-
m = g.style;
|
990 |
-
delete g.style;
|
991 |
-
h = w(e, {style: {color: "#CCC"}}, h);
|
992 |
-
p = h.style;
|
993 |
-
delete h.style;
|
994 |
-
K(j.element, Aa ? "mouseover" : "mouseenter", function () {
|
995 |
-
k !== 3 && j.attr(f).css(s)
|
996 |
-
});
|
997 |
-
K(j.element, Aa ? "mouseout" : "mouseleave", function () {
|
998 |
-
k !== 3 && (l = [e, f, g][k], o = [n, s, m][k], j.attr(l).css(o))
|
999 |
-
});
|
1000 |
-
j.setState = function (a) {
|
1001 |
-
(j.state = k = a) ? a === 2 ? j.attr(g).css(m) : a === 3 && j.attr(h).css(p) : j.attr(e).css(n)
|
1002 |
-
};
|
1003 |
-
return j.on("click", function () {
|
1004 |
-
k !== 3 && d.call(j)
|
1005 |
-
}).attr(e).css(q({cursor: "default"}, n))
|
1006 |
-
}, crispLine: function (a, b) {
|
1007 |
-
a[1] === a[4] && (a[1] = a[4] = u(a[1]) - b % 2 / 2);
|
1008 |
-
a[2] === a[5] && (a[2] = a[5] = u(a[2]) + b % 2 / 2);
|
1009 |
-
return a
|
1010 |
-
}, path: function (a) {
|
1011 |
-
var b =
|
1012 |
-
{fill: Q};
|
1013 |
-
La(a) ? b.d = a : ca(a) && q(b, a);
|
1014 |
-
return this.createElement("path").attr(b)
|
1015 |
-
}, circle: function (a, b, c) {
|
1016 |
-
a = ca(a) ? a : {x: a, y: b, r: c};
|
1017 |
-
b = this.createElement("circle");
|
1018 |
-
b.xSetter = function (a) {
|
1019 |
-
this.element.setAttribute("cx", a)
|
1020 |
-
};
|
1021 |
-
b.ySetter = function (a) {
|
1022 |
-
this.element.setAttribute("cy", a)
|
1023 |
-
};
|
1024 |
-
return b.attr(a)
|
1025 |
-
}, arc: function (a, b, c, d, e, f) {
|
1026 |
-
if (ca(a))b = a.y, c = a.r, d = a.innerR, e = a.start, f = a.end, a = a.x;
|
1027 |
-
a = this.symbol("arc", a || 0, b || 0, c || 0, c || 0, {innerR: d || 0, start: e || 0, end: f || 0});
|
1028 |
-
a.r = c;
|
1029 |
-
return a
|
1030 |
-
}, rect: function (a, b, c, d, e, f) {
|
1031 |
-
var e = ca(a) ? a.r :
|
1032 |
-
e, g = this.createElement("rect"), a = ca(a) ? a : a === t ? {} : {
|
1033 |
-
x: a,
|
1034 |
-
y: b,
|
1035 |
-
width: v(c, 0),
|
1036 |
-
height: v(d, 0)
|
1037 |
-
};
|
1038 |
-
if (f !== t)a.strokeWidth = f, a = g.crisp(a);
|
1039 |
-
if (e)a.r = e;
|
1040 |
-
g.rSetter = function (a) {
|
1041 |
-
H(this.element, {rx: a, ry: a})
|
1042 |
-
};
|
1043 |
-
return g.attr(a)
|
1044 |
-
}, setSize: function (a, b, c) {
|
1045 |
-
var d = this.alignedObjects, e = d.length;
|
1046 |
-
this.width = a;
|
1047 |
-
this.height = b;
|
1048 |
-
for (this.boxWrapper[m(c, !0) ? "animate" : "attr"]({width: a, height: b}); e--;)d[e].align()
|
1049 |
-
}, g: function (a) {
|
1050 |
-
var b = this.createElement("g");
|
1051 |
-
return r(a) ? b.attr({"class": "highcharts-" + a}) : b
|
1052 |
-
}, image: function (a, b, c, d, e) {
|
1053 |
-
var f =
|
1054 |
-
{preserveAspectRatio: Q};
|
1055 |
-
arguments.length > 1 && q(f, {x: b, y: c, width: d, height: e});
|
1056 |
-
f = this.createElement("image").attr(f);
|
1057 |
-
f.element.setAttributeNS ? f.element.setAttributeNS("http://www.w3.org/1999/xlink", "href", a) : f.element.setAttribute("hc-svg-href", a);
|
1058 |
-
return f
|
1059 |
-
}, symbol: function (a, b, c, d, e, f) {
|
1060 |
-
var g, h = this.symbols[a], h = h && h(u(b), u(c), d, e, f), i = /^url\((.*?)\)$/, j, k;
|
1061 |
-
if (h)g = this.path(h), q(g, {
|
1062 |
-
symbolName: a,
|
1063 |
-
x: b,
|
1064 |
-
y: c,
|
1065 |
-
width: d,
|
1066 |
-
height: e
|
1067 |
-
}), f && q(g, f); else if (i.test(a))k = function (a, b) {
|
1068 |
-
a.element && (a.attr({width: b[0], height: b[1]}),
|
1069 |
-
a.alignByTranslate || a.translate(u((d - b[0]) / 2), u((e - b[1]) / 2)))
|
1070 |
-
}, j = a.match(i)[1], a = Kb[j], g = this.image(j).attr({
|
1071 |
-
x: b,
|
1072 |
-
y: c
|
1073 |
-
}), g.isImg = !0, a ? k(g, a) : (g.attr({width: 0, height: 0}), Y("img", {
|
1074 |
-
onload: function () {
|
1075 |
-
k(g, Kb[j] = [this.width, this.height])
|
1076 |
-
}, src: j
|
1077 |
-
}));
|
1078 |
-
return g
|
1079 |
-
}, symbols: {
|
1080 |
-
circle: function (a, b, c, d) {
|
1081 |
-
var e = 0.166 * c;
|
1082 |
-
return ["M", a + c / 2, b, "C", a + c + e, b, a + c + e, b + d, a + c / 2, b + d, "C", a - e, b + d, a - e, b, a + c / 2, b, "Z"]
|
1083 |
-
}, square: function (a, b, c, d) {
|
1084 |
-
return ["M", a, b, "L", a + c, b, a + c, b + d, a, b + d, "Z"]
|
1085 |
-
}, triangle: function (a, b, c, d) {
|
1086 |
-
return ["M", a + c / 2, b, "L",
|
1087 |
-
a + c, b + d, a, b + d, "Z"]
|
1088 |
-
}, "triangle-down": function (a, b, c, d) {
|
1089 |
-
return ["M", a, b, "L", a + c, b, a + c / 2, b + d, "Z"]
|
1090 |
-
}, diamond: function (a, b, c, d) {
|
1091 |
-
return ["M", a + c / 2, b, "L", a + c, b + d / 2, a + c / 2, b + d, a, b + d / 2, "Z"]
|
1092 |
-
}, arc: function (a, b, c, d, e) {
|
1093 |
-
var f = e.start, c = e.r || c || d, g = e.end - 0.001, d = e.innerR, h = e.open, i = Z(f), j = ea(f), k = Z(g), g = ea(g), e = e.end - f < ma ? 0 : 1;
|
1094 |
-
return ["M", a + c * i, b + c * j, "A", c, c, 0, e, 1, a + c * k, b + c * g, h ? "M" : "L", a + d * k, b + d * g, "A", d, d, 0, e, 0, a + d * i, b + d * j, h ? "" : "Z"]
|
1095 |
-
}, callout: function (a, b, c, d, e) {
|
1096 |
-
var f = C(e && e.r || 0, c, d), g = f + 6, h = e && e.anchorX, i = e && e.anchorY,
|
1097 |
-
e = u(e.strokeWidth || 0) % 2 / 2;
|
1098 |
-
a += e;
|
1099 |
-
b += e;
|
1100 |
-
e = ["M", a + f, b, "L", a + c - f, b, "C", a + c, b, a + c, b, a + c, b + f, "L", a + c, b + d - f, "C", a + c, b + d, a + c, b + d, a + c - f, b + d, "L", a + f, b + d, "C", a, b + d, a, b + d, a, b + d - f, "L", a, b + f, "C", a, b, a, b, a + f, b];
|
1101 |
-
h && h > c && i > b + g && i < b + d - g ? e.splice(13, 3, "L", a + c, i - 6, a + c + 6, i, a + c, i + 6, a + c, b + d - f) : h && h < 0 && i > b + g && i < b + d - g ? e.splice(33, 3, "L", a, i + 6, a - 6, i, a, i - 6, a, b + f) : i && i > d && h > a + g && h < a + c - g ? e.splice(23, 3, "L", h + 6, b + d, h, b + d + 6, h - 6, b + d, a + f, b + d) : i && i < 0 && h > a + g && h < a + c - g && e.splice(3, 3, "L", h - 6, b, h, b - 6, h + 6, b, c - f, b);
|
1102 |
-
return e
|
1103 |
-
}
|
1104 |
-
}, clipRect: function (a,
|
1105 |
-
b, c, d) {
|
1106 |
-
var e = "highcharts-" + tb++, f = this.createElement("clipPath").attr({id: e}).add(this.defs), a = this.rect(a, b, c, d, 0).add(f);
|
1107 |
-
a.id = e;
|
1108 |
-
a.clipPath = f;
|
1109 |
-
return a
|
1110 |
-
}, text: function (a, b, c, d) {
|
1111 |
-
var e = fa || !aa && this.forExport, f = {};
|
1112 |
-
if (d && !this.forExport)return this.html(a, b, c);
|
1113 |
-
f.x = Math.round(b || 0);
|
1114 |
-
if (c)f.y = Math.round(c);
|
1115 |
-
if (a || a === 0)f.text = a;
|
1116 |
-
a = this.createElement("text").attr(f);
|
1117 |
-
e && a.css({position: "absolute"});
|
1118 |
-
if (!d)a.xSetter = function (a, b, c) {
|
1119 |
-
var d = c.childNodes, e, f;
|
1120 |
-
for (f = 1; f < d.length; f++)e = d[f], e.getAttribute("x") === c.getAttribute("x") &&
|
1121 |
-
e.setAttribute("x", a);
|
1122 |
-
c.setAttribute(b, a)
|
1123 |
-
};
|
1124 |
-
return a
|
1125 |
-
}, fontMetrics: function (a) {
|
1126 |
-
var a = a || this.style.fontSize, a = /px/.test(a) ? z(a) : /em/.test(a) ? parseFloat(a) * 12 : 12, a = a < 24 ? a + 4 : u(a * 1.2), b = u(a * 0.8);
|
1127 |
-
return {h: a, b: b}
|
1128 |
-
}, label: function (a, b, c, d, e, f, g, h, i) {
|
1129 |
-
function j() {
|
1130 |
-
var a, b;
|
1131 |
-
a = s.element.style;
|
1132 |
-
J = (Va === void 0 || wb === void 0 || n.styles.textAlign) && s.textStr && s.getBBox();
|
1133 |
-
n.width = (Va || J.width || 0) + 2 * x + v;
|
1134 |
-
n.height = (wb || J.height || 0) + 2 * x;
|
1135 |
-
na = x + o.fontMetrics(a && a.fontSize).b;
|
1136 |
-
if (z) {
|
1137 |
-
if (!m)a = u(-L * x), b = h ? -na : 0, n.box = m = d ? o.symbol(d,
|
1138 |
-
a, b, n.width, n.height, B) : o.rect(a, b, n.width, n.height, 0, B[Pb]), m.attr("fill", Q).add(n);
|
1139 |
-
m.isImg || m.attr(q({width: u(n.width), height: u(n.height)}, B));
|
1140 |
-
B = null
|
1141 |
-
}
|
1142 |
-
}
|
1143 |
-
|
1144 |
-
function k() {
|
1145 |
-
var a = n.styles, a = a && a.textAlign, b = v + x * (1 - L), c;
|
1146 |
-
c = h ? 0 : na;
|
1147 |
-
if (r(Va) && J && (a === "center" || a === "right"))b += {center: 0.5, right: 1}[a] * (Va - J.width);
|
1148 |
-
if (b !== s.x || c !== s.y)s.attr("x", b), c !== t && s.attr("y", c);
|
1149 |
-
s.x = b;
|
1150 |
-
s.y = c
|
1151 |
-
}
|
1152 |
-
|
1153 |
-
function l(a, b) {
|
1154 |
-
m ? m.attr(a, b) : B[a] = b
|
1155 |
-
}
|
1156 |
-
|
1157 |
-
var o = this, n = o.g(i), s = o.text("", 0, 0, g).attr({zIndex: 1}), m, J, L = 0, x = 3, v = 0, Va, wb, xb, yb, y = 0, B = {}, na,
|
1158 |
-
z;
|
1159 |
-
n.onAdd = function () {
|
1160 |
-
s.add(n);
|
1161 |
-
n.attr({text: a || "", x: b, y: c});
|
1162 |
-
m && r(e) && n.attr({anchorX: e, anchorY: f})
|
1163 |
-
};
|
1164 |
-
n.widthSetter = function (a) {
|
1165 |
-
Va = a
|
1166 |
-
};
|
1167 |
-
n.heightSetter = function (a) {
|
1168 |
-
wb = a
|
1169 |
-
};
|
1170 |
-
n.paddingSetter = function (a) {
|
1171 |
-
r(a) && a !== x && (x = a, k())
|
1172 |
-
};
|
1173 |
-
n.paddingLeftSetter = function (a) {
|
1174 |
-
r(a) && a !== v && (v = a, k())
|
1175 |
-
};
|
1176 |
-
n.alignSetter = function (a) {
|
1177 |
-
L = {left: 0, center: 0.5, right: 1}[a]
|
1178 |
-
};
|
1179 |
-
n.textSetter = function (a) {
|
1180 |
-
a !== t && s.textSetter(a);
|
1181 |
-
j();
|
1182 |
-
k()
|
1183 |
-
};
|
1184 |
-
n["stroke-widthSetter"] = function (a, b) {
|
1185 |
-
a && (z = !0);
|
1186 |
-
y = a % 2 / 2;
|
1187 |
-
l(b, a)
|
1188 |
-
};
|
1189 |
-
n.strokeSetter = n.fillSetter = n.rSetter = function (a,
|
1190 |
-
b) {
|
1191 |
-
b === "fill" && a && (z = !0);
|
1192 |
-
l(b, a)
|
1193 |
-
};
|
1194 |
-
n.anchorXSetter = function (a, b) {
|
1195 |
-
e = a;
|
1196 |
-
l(b, a + y - xb)
|
1197 |
-
};
|
1198 |
-
n.anchorYSetter = function (a, b) {
|
1199 |
-
f = a;
|
1200 |
-
l(b, a - yb)
|
1201 |
-
};
|
1202 |
-
n.xSetter = function (a) {
|
1203 |
-
n.x = a;
|
1204 |
-
L && (a -= L * ((Va || J.width) + x));
|
1205 |
-
xb = u(a);
|
1206 |
-
n.attr("translateX", xb)
|
1207 |
-
};
|
1208 |
-
n.ySetter = function (a) {
|
1209 |
-
yb = n.y = u(a);
|
1210 |
-
n.attr("translateY", yb)
|
1211 |
-
};
|
1212 |
-
var A = n.css;
|
1213 |
-
return q(n, {
|
1214 |
-
css: function (a) {
|
1215 |
-
if (a) {
|
1216 |
-
var b = {}, a = w(a);
|
1217 |
-
p("fontSize,fontWeight,fontFamily,color,lineHeight,width,textDecoration,textShadow".split(","), function (c) {
|
1218 |
-
a[c] !== t && (b[c] = a[c], delete a[c])
|
1219 |
-
});
|
1220 |
-
s.css(b)
|
1221 |
-
}
|
1222 |
-
return A.call(n,
|
1223 |
-
a)
|
1224 |
-
}, getBBox: function () {
|
1225 |
-
return {width: J.width + 2 * x, height: J.height + 2 * x, x: J.x - x, y: J.y - x}
|
1226 |
-
}, shadow: function (a) {
|
1227 |
-
m && m.shadow(a);
|
1228 |
-
return n
|
1229 |
-
}, destroy: function () {
|
1230 |
-
W(n.element, "mouseenter");
|
1231 |
-
W(n.element, "mouseleave");
|
1232 |
-
s && (s = s.destroy());
|
1233 |
-
m && (m = m.destroy());
|
1234 |
-
P.prototype.destroy.call(n);
|
1235 |
-
n = o = j = k = l = null
|
1236 |
-
}
|
1237 |
-
})
|
1238 |
-
}
|
1239 |
-
};
|
1240 |
-
Za = ta;
|
1241 |
-
q(P.prototype, {
|
1242 |
-
htmlCss: function (a) {
|
1243 |
-
var b = this.element;
|
1244 |
-
if (b = a && b.tagName === "SPAN" && a.width)delete a.width, this.textWidth = b, this.updateTransform();
|
1245 |
-
this.styles = q(this.styles, a);
|
1246 |
-
G(this.element, a);
|
1247 |
-
return this
|
1248 |
-
}, htmlGetBBox: function () {
|
1249 |
-
var a =
|
1250 |
-
this.element, b = this.bBox;
|
1251 |
-
if (!b) {
|
1252 |
-
if (a.nodeName === "text")a.style.position = "absolute";
|
1253 |
-
b = this.bBox = {x: a.offsetLeft, y: a.offsetTop, width: a.offsetWidth, height: a.offsetHeight}
|
1254 |
-
}
|
1255 |
-
return b
|
1256 |
-
}, htmlUpdateTransform: function () {
|
1257 |
-
if (this.added) {
|
1258 |
-
var a = this.renderer, b = this.element, c = this.translateX || 0, d = this.translateY || 0, e = this.x || 0, f = this.y || 0, g = this.textAlign || "left", h = {
|
1259 |
-
left: 0,
|
1260 |
-
center: 0.5,
|
1261 |
-
right: 1
|
1262 |
-
}[g], i = this.shadows;
|
1263 |
-
G(b, {marginLeft: c, marginTop: d});
|
1264 |
-
i && p(i, function (a) {
|
1265 |
-
G(a, {marginLeft: c + 1, marginTop: d + 1})
|
1266 |
-
});
|
1267 |
-
this.inverted &&
|
1268 |
-
p(b.childNodes, function (c) {
|
1269 |
-
a.invertChild(c, b)
|
1270 |
-
});
|
1271 |
-
if (b.tagName === "SPAN") {
|
1272 |
-
var j = this.rotation, k, l = z(this.textWidth), o = [j, g, b.innerHTML, this.textWidth].join(",");
|
1273 |
-
if (o !== this.cTT) {
|
1274 |
-
k = a.fontMetrics(b.style.fontSize).b;
|
1275 |
-
r(j) && this.setSpanRotation(j, h, k);
|
1276 |
-
i = m(this.elemWidth, b.offsetWidth);
|
1277 |
-
if (i > l && /[ \-]/.test(b.textContent || b.innerText))G(b, {
|
1278 |
-
width: l + "px",
|
1279 |
-
display: "block",
|
1280 |
-
whiteSpace: "normal"
|
1281 |
-
}), i = l;
|
1282 |
-
this.getSpanCorrection(i, k, h, j, g)
|
1283 |
-
}
|
1284 |
-
G(b, {left: e + (this.xCorr || 0) + "px", top: f + (this.yCorr || 0) + "px"});
|
1285 |
-
if (ib)k = b.offsetHeight;
|
1286 |
-
this.cTT = o
|
1287 |
-
}
|
1288 |
-
} else this.alignOnAdd = !0
|
1289 |
-
}, setSpanRotation: function (a, b, c) {
|
1290 |
-
var d = {}, e = Aa ? "-ms-transform" : ib ? "-webkit-transform" : Ta ? "MozTransform" : Ib ? "-o-transform" : "";
|
1291 |
-
d[e] = d.transform = "rotate(" + a + "deg)";
|
1292 |
-
d[e + (Ta ? "Origin" : "-origin")] = d.transformOrigin = b * 100 + "% " + c + "px";
|
1293 |
-
G(this.element, d)
|
1294 |
-
}, getSpanCorrection: function (a, b, c) {
|
1295 |
-
this.xCorr = -a * c;
|
1296 |
-
this.yCorr = -b
|
1297 |
-
}
|
1298 |
-
});
|
1299 |
-
q(ta.prototype, {
|
1300 |
-
html: function (a, b, c) {
|
1301 |
-
var d = this.createElement("span"), e = d.element, f = d.renderer;
|
1302 |
-
d.textSetter = function (a) {
|
1303 |
-
a !== e.innerHTML && delete this.bBox;
|
1304 |
-
e.innerHTML = this.textStr = a
|
1305 |
-
};
|
1306 |
-
d.xSetter = d.ySetter = d.alignSetter = d.rotationSetter = function (a, b) {
|
1307 |
-
b === "align" && (b = "textAlign");
|
1308 |
-
d[b] = a;
|
1309 |
-
d.htmlUpdateTransform()
|
1310 |
-
};
|
1311 |
-
d.attr({text: a, x: u(b), y: u(c)}).css({
|
1312 |
-
position: "absolute",
|
1313 |
-
whiteSpace: "nowrap",
|
1314 |
-
fontFamily: this.style.fontFamily,
|
1315 |
-
fontSize: this.style.fontSize
|
1316 |
-
});
|
1317 |
-
d.css = d.htmlCss;
|
1318 |
-
if (f.isSVG)d.add = function (a) {
|
1319 |
-
var b, c = f.box.parentNode, j = [];
|
1320 |
-
if (this.parentGroup = a) {
|
1321 |
-
if (b = a.div, !b) {
|
1322 |
-
for (; a;)j.push(a), a = a.parentGroup;
|
1323 |
-
p(j.reverse(), function (a) {
|
1324 |
-
var d;
|
1325 |
-
b = a.div = a.div || Y(Ja, {
|
1326 |
-
className: H(a.element,
|
1327 |
-
"class")
|
1328 |
-
}, {
|
1329 |
-
position: "absolute",
|
1330 |
-
left: (a.translateX || 0) + "px",
|
1331 |
-
top: (a.translateY || 0) + "px"
|
1332 |
-
}, b || c);
|
1333 |
-
d = b.style;
|
1334 |
-
q(a, {
|
1335 |
-
translateXSetter: function (b, c) {
|
1336 |
-
d.left = b + "px";
|
1337 |
-
a[c] = b;
|
1338 |
-
a.doTransform = !0
|
1339 |
-
}, translateYSetter: function (b, c) {
|
1340 |
-
d.top = b + "px";
|
1341 |
-
a[c] = b;
|
1342 |
-
a.doTransform = !0
|
1343 |
-
}, visibilitySetter: function (a, b) {
|
1344 |
-
d[b] = a
|
1345 |
-
}
|
1346 |
-
})
|
1347 |
-
})
|
1348 |
-
}
|
1349 |
-
} else b = c;
|
1350 |
-
b.appendChild(e);
|
1351 |
-
d.added = !0;
|
1352 |
-
d.alignOnAdd && d.htmlUpdateTransform();
|
1353 |
-
return d
|
1354 |
-
};
|
1355 |
-
return d
|
1356 |
-
}
|
1357 |
-
});
|
1358 |
-
var X;
|
1359 |
-
if (!aa && !fa) {
|
1360 |
-
R.VMLElement = X = {
|
1361 |
-
init: function (a, b) {
|
1362 |
-
var c = ["<", b, ' filled="f" stroked="f"'], d = ["position: ", "absolute",
|
1363 |
-
";"], e = b === Ja;
|
1364 |
-
(b === "shape" || e) && d.push("left:0;top:0;width:1px;height:1px;");
|
1365 |
-
d.push("visibility: ", e ? "hidden" : "visible");
|
1366 |
-
c.push(' style="', d.join(""), '"/>');
|
1367 |
-
if (b)c = e || b === "span" || b === "img" ? c.join("") : a.prepVML(c), this.element = Y(c);
|
1368 |
-
this.renderer = a
|
1369 |
-
}, add: function (a) {
|
1370 |
-
var b = this.renderer, c = this.element, d = b.box, d = a ? a.element || a : d;
|
1371 |
-
a && a.inverted && b.invertChild(c, d);
|
1372 |
-
d.appendChild(c);
|
1373 |
-
this.added = !0;
|
1374 |
-
this.alignOnAdd && !this.deferUpdateTransform && this.updateTransform();
|
1375 |
-
if (this.onAdd)this.onAdd();
|
1376 |
-
return this
|
1377 |
-
}, updateTransform: P.prototype.htmlUpdateTransform,
|
1378 |
-
setSpanRotation: function () {
|
1379 |
-
var a = this.rotation, b = Z(a * Ca), c = ea(a * Ca);
|
1380 |
-
G(this.element, {filter: a ? ["progid:DXImageTransform.Microsoft.Matrix(M11=", b, ", M12=", -c, ", M21=", c, ", M22=", b, ", sizingMethod='auto expand')"].join("") : Q})
|
1381 |
-
}, getSpanCorrection: function (a, b, c, d, e) {
|
1382 |
-
var f = d ? Z(d * Ca) : 1, g = d ? ea(d * Ca) : 0, h = m(this.elemHeight, this.element.offsetHeight), i;
|
1383 |
-
this.xCorr = f < 0 && -a;
|
1384 |
-
this.yCorr = g < 0 && -h;
|
1385 |
-
i = f * g < 0;
|
1386 |
-
this.xCorr += g * b * (i ? 1 - c : c);
|
1387 |
-
this.yCorr -= f * b * (d ? i ? c : 1 - c : 1);
|
1388 |
-
e && e !== "left" && (this.xCorr -= a * c * (f < 0 ? -1 : 1), d && (this.yCorr -=
|
1389 |
-
h * c * (g < 0 ? -1 : 1)), G(this.element, {textAlign: e}))
|
1390 |
-
}, pathToVML: function (a) {
|
1391 |
-
for (var b = a.length, c = []; b--;)if (ha(a[b]))c[b] = u(a[b] * 10) - 5; else if (a[b] === "Z")c[b] = "x"; else if (c[b] = a[b], a.isArc && (a[b] === "wa" || a[b] === "at"))c[b + 5] === c[b + 7] && (c[b + 7] += a[b + 7] > a[b + 5] ? 1 : -1), c[b + 6] === c[b + 8] && (c[b + 8] += a[b + 8] > a[b + 6] ? 1 : -1);
|
1392 |
-
return c.join(" ") || "x"
|
1393 |
-
}, clip: function (a) {
|
1394 |
-
var b = this, c;
|
1395 |
-
a ? (c = a.members, ja(c, b), c.push(b), b.destroyClip = function () {
|
1396 |
-
ja(c, b)
|
1397 |
-
}, a = a.getCSS(b)) : (b.destroyClip && b.destroyClip(), a = {clip: hb ? "inherit" : "rect(auto)"});
|
1398 |
-
return b.css(a)
|
1399 |
-
}, css: P.prototype.htmlCss, safeRemoveChild: function (a) {
|
1400 |
-
a.parentNode && Pa(a)
|
1401 |
-
}, destroy: function () {
|
1402 |
-
this.destroyClip && this.destroyClip();
|
1403 |
-
return P.prototype.destroy.apply(this)
|
1404 |
-
}, on: function (a, b) {
|
1405 |
-
this.element["on" + a] = function () {
|
1406 |
-
var a = I.event;
|
1407 |
-
a.target = a.srcElement;
|
1408 |
-
b(a)
|
1409 |
-
};
|
1410 |
-
return this
|
1411 |
-
}, cutOffPath: function (a, b) {
|
1412 |
-
var c, a = a.split(/[ ,]/);
|
1413 |
-
c = a.length;
|
1414 |
-
if (c === 9 || c === 11)a[c - 4] = a[c - 2] = z(a[c - 2]) - 10 * b;
|
1415 |
-
return a.join(" ")
|
1416 |
-
}, shadow: function (a, b, c) {
|
1417 |
-
var d = [], e, f = this.element, g = this.renderer, h, i = f.style, j, k = f.path,
|
1418 |
-
l, o, n, s;
|
1419 |
-
k && typeof k.value !== "string" && (k = "x");
|
1420 |
-
o = k;
|
1421 |
-
if (a) {
|
1422 |
-
n = m(a.width, 3);
|
1423 |
-
s = (a.opacity || 0.15) / n;
|
1424 |
-
for (e = 1; e <= 3; e++) {
|
1425 |
-
l = n * 2 + 1 - 2 * e;
|
1426 |
-
c && (o = this.cutOffPath(k.value, l + 0.5));
|
1427 |
-
j = ['<shape isShadow="true" strokeweight="', l, '" filled="false" path="', o, '" coordsize="10 10" style="', f.style.cssText, '" />'];
|
1428 |
-
h = Y(g.prepVML(j), null, {left: z(i.left) + m(a.offsetX, 1), top: z(i.top) + m(a.offsetY, 1)});
|
1429 |
-
if (c)h.cutOff = l + 1;
|
1430 |
-
j = ['<stroke color="', a.color || "black", '" opacity="', s * e, '"/>'];
|
1431 |
-
Y(g.prepVML(j), null, null, h);
|
1432 |
-
b ? b.element.appendChild(h) :
|
1433 |
-
f.parentNode.insertBefore(h, f);
|
1434 |
-
d.push(h)
|
1435 |
-
}
|
1436 |
-
this.shadows = d
|
1437 |
-
}
|
1438 |
-
return this
|
1439 |
-
}, updateShadows: sa, setAttr: function (a, b) {
|
1440 |
-
hb ? this.element[a] = b : this.element.setAttribute(a, b)
|
1441 |
-
}, classSetter: function (a) {
|
1442 |
-
this.element.className = a
|
1443 |
-
}, dashstyleSetter: function (a, b, c) {
|
1444 |
-
(c.getElementsByTagName("stroke")[0] || Y(this.renderer.prepVML(["<stroke/>"]), null, null, c))[b] = a || "solid";
|
1445 |
-
this[b] = a
|
1446 |
-
}, dSetter: function (a, b, c) {
|
1447 |
-
var d = this.shadows, a = a || [];
|
1448 |
-
this.d = a.join(" ");
|
1449 |
-
c.path = a = this.pathToVML(a);
|
1450 |
-
if (d)for (c = d.length; c--;)d[c].path = d[c].cutOff ?
|
1451 |
-
this.cutOffPath(a, d[c].cutOff) : a;
|
1452 |
-
this.setAttr(b, a)
|
1453 |
-
}, fillSetter: function (a, b, c) {
|
1454 |
-
var d = c.nodeName;
|
1455 |
-
if (d === "SPAN")c.style.color = a; else if (d !== "IMG")c.filled = a !== Q, this.setAttr("fillcolor", this.renderer.color(a, c, b, this))
|
1456 |
-
}, opacitySetter: sa, rotationSetter: function (a, b, c) {
|
1457 |
-
c = c.style;
|
1458 |
-
this[b] = c[b] = a;
|
1459 |
-
c.left = -u(ea(a * Ca) + 1) + "px";
|
1460 |
-
c.top = u(Z(a * Ca)) + "px"
|
1461 |
-
}, strokeSetter: function (a, b, c) {
|
1462 |
-
this.setAttr("strokecolor", this.renderer.color(a, c, b))
|
1463 |
-
}, "stroke-widthSetter": function (a, b, c) {
|
1464 |
-
c.stroked = !!a;
|
1465 |
-
this[b] = a;
|
1466 |
-
ha(a) && (a += "px");
|
1467 |
-
this.setAttr("strokeweight", a)
|
1468 |
-
}, titleSetter: function (a, b) {
|
1469 |
-
this.setAttr(b, a)
|
1470 |
-
}, visibilitySetter: function (a, b, c) {
|
1471 |
-
a === "inherit" && (a = "visible");
|
1472 |
-
this.shadows && p(this.shadows, function (c) {
|
1473 |
-
c.style[b] = a
|
1474 |
-
});
|
1475 |
-
c.nodeName === "DIV" && (a = a === "hidden" ? "-999em" : 0, hb || (c.style[b] = a ? "visible" : "hidden"), b = "top");
|
1476 |
-
c.style[b] = a
|
1477 |
-
}, xSetter: function (a, b, c) {
|
1478 |
-
this[b] = a;
|
1479 |
-
b === "x" ? b = "left" : b === "y" && (b = "top");
|
1480 |
-
this.updateClipping ? (this[b] = a, this.updateClipping()) : c.style[b] = a
|
1481 |
-
}, zIndexSetter: function (a, b, c) {
|
1482 |
-
c.style[b] = a
|
1483 |
-
}
|
1484 |
-
};
|
1485 |
-
X = ka(P, X);
|
1486 |
-
X.prototype.ySetter =
|
1487 |
-
X.prototype.widthSetter = X.prototype.heightSetter = X.prototype.xSetter;
|
1488 |
-
var ga = {
|
1489 |
-
Element: X, isIE8: wa.indexOf("MSIE 8.0") > -1, init: function (a, b, c, d) {
|
1490 |
-
var e;
|
1491 |
-
this.alignedObjects = [];
|
1492 |
-
d = this.createElement(Ja).css(q(this.getStyle(d), {position: "relative"}));
|
1493 |
-
e = d.element;
|
1494 |
-
a.appendChild(d.element);
|
1495 |
-
this.isVML = !0;
|
1496 |
-
this.box = e;
|
1497 |
-
this.boxWrapper = d;
|
1498 |
-
this.cache = {};
|
1499 |
-
this.setSize(b, c, !1);
|
1500 |
-
if (!y.namespaces.hcv) {
|
1501 |
-
y.namespaces.add("hcv", "urn:schemas-microsoft-com:vml");
|
1502 |
-
try {
|
1503 |
-
y.createStyleSheet().cssText = "hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "
|
1504 |
-
} catch (f) {
|
1505 |
-
y.styleSheets[0].cssText +=
|
1506 |
-
"hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "
|
1507 |
-
}
|
1508 |
-
}
|
1509 |
-
}, isHidden: function () {
|
1510 |
-
return !this.box.offsetWidth
|
1511 |
-
}, clipRect: function (a, b, c, d) {
|
1512 |
-
var e = this.createElement(), f = ca(a);
|
1513 |
-
return q(e, {
|
1514 |
-
members: [],
|
1515 |
-
left: (f ? a.x : a) + 1,
|
1516 |
-
top: (f ? a.y : b) + 1,
|
1517 |
-
width: (f ? a.width : c) - 1,
|
1518 |
-
height: (f ? a.height : d) - 1,
|
1519 |
-
getCSS: function (a) {
|
1520 |
-
var b = a.element, c = b.nodeName, a = a.inverted, d = this.top - (c === "shape" ? b.offsetTop : 0), e = this.left, b = e + this.width, f = d + this.height, d = {
|
1521 |
-
clip: "rect(" + u(a ? e : d) + "px," + u(a ?
|
1522 |
-
f : b) + "px," + u(a ? b : f) + "px," + u(a ? d : e) + "px)"
|
1523 |
-
};
|
1524 |
-
!a && hb && c === "DIV" && q(d, {width: b + "px", height: f + "px"});
|
1525 |
-
return d
|
1526 |
-
},
|
1527 |
-
updateClipping: function () {
|
1528 |
-
p(e.members, function (a) {
|
1529 |
-
a.element && a.css(e.getCSS(a))
|
1530 |
-
})
|
1531 |
-
}
|
1532 |
-
})
|
1533 |
-
}, color: function (a, b, c, d) {
|
1534 |
-
var e = this, f, g = /^rgba/, h, i, j = Q;
|
1535 |
-
a && a.linearGradient ? i = "gradient" : a && a.radialGradient && (i = "pattern");
|
1536 |
-
if (i) {
|
1537 |
-
var k, l, o = a.linearGradient || a.radialGradient, n, s, m, J, L, x = "", a = a.stops, r, v = [], q = function () {
|
1538 |
-
h = ['<fill colors="' + v.join(",") + '" opacity="', m, '" o:opacity2="', s, '" type="', i, '" ', x, 'focus="100%" method="any" />'];
|
1539 |
-
Y(e.prepVML(h), null, null, b)
|
1540 |
-
};
|
1541 |
-
n = a[0];
|
1542 |
-
r = a[a.length - 1];
|
1543 |
-
n[0] > 0 && a.unshift([0, n[1]]);
|
1544 |
-
r[0] < 1 && a.push([1, r[1]]);
|
1545 |
-
p(a, function (a, b) {
|
1546 |
-
g.test(a[1]) ? (f = ya(a[1]), k = f.get("rgb"), l = f.get("a")) : (k = a[1], l = 1);
|
1547 |
-
v.push(a[0] * 100 + "% " + k);
|
1548 |
-
b ? (m = l, J = k) : (s = l, L = k)
|
1549 |
-
});
|
1550 |
-
if (c === "fill")if (i === "gradient")c = o.x1 || o[0] || 0, a = o.y1 || o[1] || 0, n = o.x2 || o[2] || 0, o = o.y2 || o[3] || 0, x = 'angle="' + (90 - U.atan((o - a) / (n - c)) * 180 / ma) + '"', q(); else {
|
1551 |
-
var j = o.r, t = j * 2, u = j * 2, y = o.cx, B = o.cy, na = b.radialReference, w, j = function () {
|
1552 |
-
na && (w = d.getBBox(), y += (na[0] - w.x) / w.width -
|
1553 |
-
0.5, B += (na[1] - w.y) / w.height - 0.5, t *= na[2] / w.width, u *= na[2] / w.height);
|
1554 |
-
x = 'src="' + E.global.VMLRadialGradientURL + '" size="' + t + "," + u + '" origin="0.5,0.5" position="' + y + "," + B + '" color2="' + L + '" ';
|
1555 |
-
q()
|
1556 |
-
};
|
1557 |
-
d.added ? j() : d.onAdd = j;
|
1558 |
-
j = J
|
1559 |
-
} else j = k
|
1560 |
-
} else if (g.test(a) && b.tagName !== "IMG")f = ya(a), h = ["<", c, ' opacity="', f.get("a"), '"/>'], Y(this.prepVML(h), null, null, b), j = f.get("rgb"); else {
|
1561 |
-
j = b.getElementsByTagName(c);
|
1562 |
-
if (j.length)j[0].opacity = 1, j[0].type = "solid";
|
1563 |
-
j = a
|
1564 |
-
}
|
1565 |
-
return j
|
1566 |
-
}, prepVML: function (a) {
|
1567 |
-
var b = this.isIE8, a = a.join("");
|
1568 |
-
b ?
|
1569 |
-
(a = a.replace("/>", ' xmlns="urn:schemas-microsoft-com:vml" />'), a = a.indexOf('style="') === -1 ? a.replace("/>", ' style="display:inline-block;behavior:url(#default#VML);" />') : a.replace('style="', 'style="display:inline-block;behavior:url(#default#VML);')) : a = a.replace("<", "<hcv:");
|
1570 |
-
return a
|
1571 |
-
}, text: ta.prototype.html, path: function (a) {
|
1572 |
-
var b = {coordsize: "10 10"};
|
1573 |
-
La(a) ? b.d = a : ca(a) && q(b, a);
|
1574 |
-
return this.createElement("shape").attr(b)
|
1575 |
-
}, circle: function (a, b, c) {
|
1576 |
-
var d = this.symbol("circle");
|
1577 |
-
if (ca(a))c = a.r, b = a.y, a = a.x;
|
1578 |
-
d.isCircle = !0;
|
1579 |
-
d.r = c;
|
1580 |
-
return d.attr({x: a, y: b})
|
1581 |
-
}, g: function (a) {
|
1582 |
-
var b;
|
1583 |
-
a && (b = {className: "highcharts-" + a, "class": "highcharts-" + a});
|
1584 |
-
return this.createElement(Ja).attr(b)
|
1585 |
-
}, image: function (a, b, c, d, e) {
|
1586 |
-
var f = this.createElement("img").attr({src: a});
|
1587 |
-
arguments.length > 1 && f.attr({x: b, y: c, width: d, height: e});
|
1588 |
-
return f
|
1589 |
-
}, createElement: function (a) {
|
1590 |
-
return a === "rect" ? this.symbol(a) : ta.prototype.createElement.call(this, a)
|
1591 |
-
}, invertChild: function (a, b) {
|
1592 |
-
var c = this, d = b.style, e = a.tagName === "IMG" && a.style;
|
1593 |
-
G(a, {
|
1594 |
-
flip: "x", left: z(d.width) - (e ? z(e.top) :
|
1595 |
-
1), top: z(d.height) - (e ? z(e.left) : 1), rotation: -90
|
1596 |
-
});
|
1597 |
-
p(a.childNodes, function (b) {
|
1598 |
-
c.invertChild(b, a)
|
1599 |
-
})
|
1600 |
-
}, symbols: {
|
1601 |
-
arc: function (a, b, c, d, e) {
|
1602 |
-
var f = e.start, g = e.end, h = e.r || c || d, c = e.innerR, d = Z(f), i = ea(f), j = Z(g), k = ea(g);
|
1603 |
-
if (g - f === 0)return ["x"];
|
1604 |
-
f = ["wa", a - h, b - h, a + h, b + h, a + h * d, b + h * i, a + h * j, b + h * k];
|
1605 |
-
e.open && !c && f.push("e", "M", a, b);
|
1606 |
-
f.push("at", a - c, b - c, a + c, b + c, a + c * j, b + c * k, a + c * d, b + c * i, "x", "e");
|
1607 |
-
f.isArc = !0;
|
1608 |
-
return f
|
1609 |
-
}, circle: function (a, b, c, d, e) {
|
1610 |
-
e && (c = d = 2 * e.r);
|
1611 |
-
e && e.isCircle && (a -= c / 2, b -= d / 2);
|
1612 |
-
return ["wa", a, b, a + c, b + d, a + c, b + d / 2, a +
|
1613 |
-
c, b + d / 2, "e"]
|
1614 |
-
}, rect: function (a, b, c, d, e) {
|
1615 |
-
return ta.prototype.symbols[!r(e) || !e.r ? "square" : "callout"].call(0, a, b, c, d, e)
|
1616 |
-
}
|
1617 |
-
}
|
1618 |
-
};
|
1619 |
-
R.VMLRenderer = X = function () {
|
1620 |
-
this.init.apply(this, arguments)
|
1621 |
-
};
|
1622 |
-
X.prototype = w(ta.prototype, ga);
|
1623 |
-
Za = X
|
1624 |
-
}
|
1625 |
-
ta.prototype.measureSpanWidth = function (a, b) {
|
1626 |
-
var c = y.createElement("span"), d;
|
1627 |
-
d = y.createTextNode(a);
|
1628 |
-
c.appendChild(d);
|
1629 |
-
G(c, b);
|
1630 |
-
this.box.appendChild(c);
|
1631 |
-
d = c.offsetWidth;
|
1632 |
-
Pa(c);
|
1633 |
-
return d
|
1634 |
-
};
|
1635 |
-
var Lb;
|
1636 |
-
if (fa)R.CanVGRenderer = X = function () {
|
1637 |
-
xa = "http://www.w3.org/1999/xhtml"
|
1638 |
-
}, X.prototype.symbols = {}, Lb = function () {
|
1639 |
-
function a() {
|
1640 |
-
var a =
|
1641 |
-
b.length, d;
|
1642 |
-
for (d = 0; d < a; d++)b[d]();
|
1643 |
-
b = []
|
1644 |
-
}
|
1645 |
-
|
1646 |
-
var b = [];
|
1647 |
-
return {
|
1648 |
-
push: function (c, d) {
|
1649 |
-
b.length === 0 && Qb(d, a);
|
1650 |
-
b.push(c)
|
1651 |
-
}
|
1652 |
-
}
|
1653 |
-
}(), Za = X;
|
1654 |
-
Sa.prototype = {
|
1655 |
-
addLabel: function () {
|
1656 |
-
var a = this.axis, b = a.options, c = a.chart, d = a.horiz, e = a.categories, f = a.names, g = this.pos, h = b.labels, i = a.tickPositions, d = d && e && !h.step && !h.staggerLines && !h.rotation && c.plotWidth / i.length || !d && (c.margin[3] || c.chartWidth * 0.33), j = g === i[0], k = g === i[i.length - 1], l, f = e ? m(e[g], f[g], g) : g, e = this.label, o = i.info;
|
1657 |
-
a.isDatetimeAxis && o && (l = b.dateTimeLabelFormats[o.higherRanks[g] ||
|
1658 |
-
o.unitName]);
|
1659 |
-
this.isFirst = j;
|
1660 |
-
this.isLast = k;
|
1661 |
-
b = a.labelFormatter.call({
|
1662 |
-
axis: a,
|
1663 |
-
chart: c,
|
1664 |
-
isFirst: j,
|
1665 |
-
isLast: k,
|
1666 |
-
dateTimeLabelFormat: l,
|
1667 |
-
value: a.isLog ? da(ia(f)) : f
|
1668 |
-
});
|
1669 |
-
g = d && {width: v(1, u(d - 2 * (h.padding || 10))) + "px"};
|
1670 |
-
g = q(g, h.style);
|
1671 |
-
if (r(e))e && e.attr({text: b}).css(g); else {
|
1672 |
-
l = {align: a.labelAlign};
|
1673 |
-
if (ha(h.rotation))l.rotation = h.rotation;
|
1674 |
-
if (d && h.ellipsis)l._clipHeight = a.len / i.length;
|
1675 |
-
this.label = r(b) && h.enabled ? c.renderer.text(b, 0, 0, h.useHTML).attr(l).css(g).add(a.labelGroup) : null
|
1676 |
-
}
|
1677 |
-
}, getLabelSize: function () {
|
1678 |
-
var a = this.label,
|
1679 |
-
b = this.axis;
|
1680 |
-
return a ? a.getBBox()[b.horiz ? "height" : "width"] : 0
|
1681 |
-
}, getLabelSides: function () {
|
1682 |
-
var a = this.label.getBBox(), b = this.axis, c = b.horiz, d = b.options.labels, a = c ? a.width : a.height, b = c ? d.x - a * {
|
1683 |
-
left: 0,
|
1684 |
-
center: 0.5,
|
1685 |
-
right: 1
|
1686 |
-
}[b.labelAlign] : 0;
|
1687 |
-
return [b, c ? a + b : a]
|
1688 |
-
}, handleOverflow: function (a, b) {
|
1689 |
-
var c = !0, d = this.axis, e = this.isFirst, f = this.isLast, g = d.horiz ? b.x : b.y, h = d.reversed, i = d.tickPositions, j = this.getLabelSides(), k = j[0], j = j[1], l, o, n, s = this.label.line || 0;
|
1690 |
-
l = d.labelEdge;
|
1691 |
-
o = d.justifyLabels && (e || f);
|
1692 |
-
l[s] === t || g + k > l[s] ? l[s] =
|
1693 |
-
g + j : o || (c = !1);
|
1694 |
-
if (o) {
|
1695 |
-
l = (o = d.justifyToPlot) ? d.pos : 0;
|
1696 |
-
o = o ? l + d.len : d.chart.chartWidth;
|
1697 |
-
do a += e ? 1 : -1, n = d.ticks[i[a]]; while (i[a] && (!n || n.label.line !== s));
|
1698 |
-
d = n && n.label.xy && n.label.xy.x + n.getLabelSides()[e ? 0 : 1];
|
1699 |
-
e && !h || f && h ? g + k < l && (g = l - k, n && g + j > d && (c = !1)) : g + j > o && (g = o - j, n && g + k < d && (c = !1));
|
1700 |
-
b.x = g
|
1701 |
-
}
|
1702 |
-
return c
|
1703 |
-
}, getPosition: function (a, b, c, d) {
|
1704 |
-
var e = this.axis, f = e.chart, g = d && f.oldChartHeight || f.chartHeight;
|
1705 |
-
return {
|
1706 |
-
x: a ? e.translate(b + c, null, null, d) + e.transB : e.left + e.offset + (e.opposite ? (d && f.oldChartWidth || f.chartWidth) - e.right -
|
1707 |
-
e.left : 0),
|
1708 |
-
y: a ? g - e.bottom + e.offset - (e.opposite ? e.height : 0) : g - e.translate(b + c, null, null, d) - e.transB
|
1709 |
-
}
|
1710 |
-
}, getLabelPosition: function (a, b, c, d, e, f, g, h) {
|
1711 |
-
var i = this.axis, j = i.transA, k = i.reversed, l = i.staggerLines, o = i.chart.renderer.fontMetrics(e.style.fontSize).b, n = e.rotation, a = a + e.x - (f && d ? f * j * (k ? -1 : 1) : 0), b = b + e.y - (f && !d ? f * j * (k ? 1 : -1) : 0);
|
1712 |
-
n && i.side === 2 && (b -= o - o * Z(n * Ca));
|
1713 |
-
!r(e.y) && !n && (b += o - c.getBBox().height / 2);
|
1714 |
-
if (l)c.line = g / (h || 1) % l, b += c.line * (i.labelOffset / l);
|
1715 |
-
return {x: a, y: b}
|
1716 |
-
}, getMarkPath: function (a, b, c, d, e, f) {
|
1717 |
-
return f.crispLine(["M",
|
1718 |
-
a, b, "L", a + (e ? 0 : -c), b + (e ? c : 0)], d)
|
1719 |
-
}, render: function (a, b, c) {
|
1720 |
-
var d = this.axis, e = d.options, f = d.chart.renderer, g = d.horiz, h = this.type, i = this.label, j = this.pos, k = e.labels, l = this.gridLine, o = h ? h + "Grid" : "grid", n = h ? h + "Tick" : "tick", s = e[o + "LineWidth"], p = e[o + "LineColor"], J = e[o + "LineDashStyle"], L = e[n + "Length"], o = e[n + "Width"] || 0, x = e[n + "Color"], r = e[n + "Position"], n = this.mark, v = k.step, q = !0, u = d.tickmarkOffset, w = this.getPosition(g, j, u, b), y = w.x, w = w.y, B = g && y === d.pos + d.len || !g && w === d.pos ? -1 : 1;
|
1721 |
-
this.isActive = !0;
|
1722 |
-
if (s) {
|
1723 |
-
j = d.getPlotLinePath(j +
|
1724 |
-
u, s * B, b, !0);
|
1725 |
-
if (l === t) {
|
1726 |
-
l = {stroke: p, "stroke-width": s};
|
1727 |
-
if (J)l.dashstyle = J;
|
1728 |
-
if (!h)l.zIndex = 1;
|
1729 |
-
if (b)l.opacity = 0;
|
1730 |
-
this.gridLine = l = s ? f.path(j).attr(l).add(d.gridGroup) : null
|
1731 |
-
}
|
1732 |
-
if (!b && l && j)l[this.isNew ? "attr" : "animate"]({d: j, opacity: c})
|
1733 |
-
}
|
1734 |
-
if (o && L)r === "inside" && (L = -L), d.opposite && (L = -L), h = this.getMarkPath(y, w, L, o * B, g, f), n ? n.animate({
|
1735 |
-
d: h,
|
1736 |
-
opacity: c
|
1737 |
-
}) : this.mark = f.path(h).attr({stroke: x, "stroke-width": o, opacity: c}).add(d.axisGroup);
|
1738 |
-
if (i && !isNaN(y))i.xy = w = this.getLabelPosition(y, w, i, g, k, u, a, v), this.isFirst && !this.isLast && !m(e.showFirstLabel, 1) || this.isLast && !this.isFirst && !m(e.showLastLabel, 1) ? q = !1 : !d.isRadial && !k.step && !k.rotation && !b && c !== 0 && (q = this.handleOverflow(a, w)), v && a % v && (q = !1), q && !isNaN(w.y) ? (w.opacity = c, i[this.isNew ? "attr" : "animate"](w), this.isNew = !1) : i.attr("y", -9999)
|
1739 |
-
}, destroy: function () {
|
1740 |
-
Oa(this, this.axis)
|
1741 |
-
}
|
1742 |
-
};
|
1743 |
-
R.PlotLineOrBand = function (a, b) {
|
1744 |
-
this.axis = a;
|
1745 |
-
if (b)this.options = b, this.id = b.id
|
1746 |
-
};
|
1747 |
-
R.PlotLineOrBand.prototype = {
|
1748 |
-
render: function () {
|
1749 |
-
var a = this, b = a.axis, c = b.horiz, d = (b.pointRange || 0) / 2, e = a.options, f = e.label,
|
1750 |
-
g = a.label, h = e.width, i = e.to, j = e.from, k = r(j) && r(i), l = e.value, o = e.dashStyle, n = a.svgElem, s = [], p, J = e.color, L = e.zIndex, x = e.events, q = {}, t = b.chart.renderer;
|
1751 |
-
b.isLog && (j = za(j), i = za(i), l = za(l));
|
1752 |
-
if (h) {
|
1753 |
-
if (s = b.getPlotLinePath(l, h), q = {stroke: J, "stroke-width": h}, o)q.dashstyle = o
|
1754 |
-
} else if (k) {
|
1755 |
-
j = v(j, b.min - d);
|
1756 |
-
i = C(i, b.max + d);
|
1757 |
-
s = b.getPlotBandPath(j, i, e);
|
1758 |
-
if (J)q.fill = J;
|
1759 |
-
if (e.borderWidth)q.stroke = e.borderColor, q["stroke-width"] = e.borderWidth
|
1760 |
-
} else return;
|
1761 |
-
if (r(L))q.zIndex = L;
|
1762 |
-
if (n)if (s)n.animate({d: s}, null, n.onGetPath); else {
|
1763 |
-
if (n.hide(),
|
1764 |
-
n.onGetPath = function () {
|
1765 |
-
n.show()
|
1766 |
-
}, g)a.label = g = g.destroy()
|
1767 |
-
} else if (s && s.length && (a.svgElem = n = t.path(s).attr(q).add(), x))for (p in d = function (b) {
|
1768 |
-
n.on(b, function (c) {
|
1769 |
-
x[b].apply(a, [c])
|
1770 |
-
})
|
1771 |
-
}, x)d(p);
|
1772 |
-
if (f && r(f.text) && s && s.length && b.width > 0 && b.height > 0) {
|
1773 |
-
f = w({
|
1774 |
-
align: c && k && "center",
|
1775 |
-
x: c ? !k && 4 : 10,
|
1776 |
-
verticalAlign: !c && k && "middle",
|
1777 |
-
y: c ? k ? 16 : 10 : k ? 6 : -4,
|
1778 |
-
rotation: c && !k && 90
|
1779 |
-
}, f);
|
1780 |
-
if (!g) {
|
1781 |
-
q = {align: f.textAlign || f.align, rotation: f.rotation};
|
1782 |
-
if (r(L))q.zIndex = L;
|
1783 |
-
a.label = g = t.text(f.text, 0, 0, f.useHTML).attr(q).css(f.style).add()
|
1784 |
-
}
|
1785 |
-
b = [s[1],
|
1786 |
-
s[4], m(s[6], s[1])];
|
1787 |
-
s = [s[2], s[5], m(s[7], s[2])];
|
1788 |
-
c = Na(b);
|
1789 |
-
k = Na(s);
|
1790 |
-
g.align(f, !1, {x: c, y: k, width: Ba(b) - c, height: Ba(s) - k});
|
1791 |
-
g.show()
|
1792 |
-
} else g && g.hide();
|
1793 |
-
return a
|
1794 |
-
}, destroy: function () {
|
1795 |
-
ja(this.axis.plotLinesAndBands, this);
|
1796 |
-
delete this.axis;
|
1797 |
-
Oa(this)
|
1798 |
-
}
|
1799 |
-
};
|
1800 |
-
la.prototype = {
|
1801 |
-
defaultOptions: {
|
1802 |
-
dateTimeLabelFormats: {
|
1803 |
-
millisecond: "%H:%M:%S.%L",
|
1804 |
-
second: "%H:%M:%S",
|
1805 |
-
minute: "%H:%M",
|
1806 |
-
hour: "%H:%M",
|
1807 |
-
day: "%e. %b",
|
1808 |
-
week: "%e. %b",
|
1809 |
-
month: "%b '%y",
|
1810 |
-
year: "%Y"
|
1811 |
-
},
|
1812 |
-
endOnTick: !1,
|
1813 |
-
gridLineColor: "#C0C0C0",
|
1814 |
-
labels: N,
|
1815 |
-
lineColor: "#C0D0E0",
|
1816 |
-
lineWidth: 1,
|
1817 |
-
minPadding: 0.01,
|
1818 |
-
maxPadding: 0.01,
|
1819 |
-
minorGridLineColor: "#E0E0E0",
|
1820 |
-
minorGridLineWidth: 1,
|
1821 |
-
minorTickColor: "#A0A0A0",
|
1822 |
-
minorTickLength: 2,
|
1823 |
-
minorTickPosition: "outside",
|
1824 |
-
startOfWeek: 1,
|
1825 |
-
startOnTick: !1,
|
1826 |
-
tickColor: "#C0D0E0",
|
1827 |
-
tickLength: 10,
|
1828 |
-
tickmarkPlacement: "between",
|
1829 |
-
tickPixelInterval: 100,
|
1830 |
-
tickPosition: "outside",
|
1831 |
-
tickWidth: 1,
|
1832 |
-
title: {align: "middle", style: {color: "#707070"}},
|
1833 |
-
type: "linear"
|
1834 |
-
},
|
1835 |
-
defaultYAxisOptions: {
|
1836 |
-
endOnTick: !0,
|
1837 |
-
gridLineWidth: 1,
|
1838 |
-
tickPixelInterval: 72,
|
1839 |
-
showLastLabel: !0,
|
1840 |
-
labels: {x: -8, y: 3},
|
1841 |
-
lineWidth: 0,
|
1842 |
-
maxPadding: 0.05,
|
1843 |
-
minPadding: 0.05,
|
1844 |
-
startOnTick: !0,
|
1845 |
-
tickWidth: 0,
|
1846 |
-
title: {rotation: 270, text: "Values"},
|
1847 |
-
stackLabels: {
|
1848 |
-
enabled: !1, formatter: function () {
|
1849 |
-
return Ga(this.total, -1)
|
1850 |
-
}, style: N.style
|
1851 |
-
}
|
1852 |
-
},
|
1853 |
-
defaultLeftAxisOptions: {labels: {x: -15, y: null}, title: {rotation: 270}},
|
1854 |
-
defaultRightAxisOptions: {labels: {x: 15, y: null}, title: {rotation: 90}},
|
1855 |
-
defaultBottomAxisOptions: {labels: {x: 0, y: 20}, title: {rotation: 0}},
|
1856 |
-
defaultTopAxisOptions: {labels: {x: 0, y: -15}, title: {rotation: 0}},
|
1857 |
-
init: function (a, b) {
|
1858 |
-
var c = b.isX;
|
1859 |
-
this.horiz = a.inverted ? !c : c;
|
1860 |
-
this.coll = (this.isXAxis = c) ? "xAxis" : "yAxis";
|
1861 |
-
this.opposite =
|
1862 |
-
b.opposite;
|
1863 |
-
this.side = b.side || (this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3);
|
1864 |
-
this.setOptions(b);
|
1865 |
-
var d = this.options, e = d.type;
|
1866 |
-
this.labelFormatter = d.labels.formatter || this.defaultLabelFormatter;
|
1867 |
-
this.userOptions = b;
|
1868 |
-
this.minPixelPadding = 0;
|
1869 |
-
this.chart = a;
|
1870 |
-
this.reversed = d.reversed;
|
1871 |
-
this.zoomEnabled = d.zoomEnabled !== !1;
|
1872 |
-
this.categories = d.categories || e === "category";
|
1873 |
-
this.names = [];
|
1874 |
-
this.isLog = e === "logarithmic";
|
1875 |
-
this.isDatetimeAxis = e === "datetime";
|
1876 |
-
this.isLinked = r(d.linkedTo);
|
1877 |
-
this.tickmarkOffset = this.categories && d.tickmarkPlacement ===
|
1878 |
-
"between" ? 0.5 : 0;
|
1879 |
-
this.ticks = {};
|
1880 |
-
this.labelEdge = [];
|
1881 |
-
this.minorTicks = {};
|
1882 |
-
this.plotLinesAndBands = [];
|
1883 |
-
this.alternateBands = {};
|
1884 |
-
this.len = 0;
|
1885 |
-
this.minRange = this.userMinRange = d.minRange || d.maxZoom;
|
1886 |
-
this.range = d.range;
|
1887 |
-
this.offset = d.offset || 0;
|
1888 |
-
this.stacks = {};
|
1889 |
-
this.oldStacks = {};
|
1890 |
-
this.min = this.max = null;
|
1891 |
-
this.crosshair = m(d.crosshair, qa(a.options.tooltip.crosshairs)[c ? 0 : 1], !1);
|
1892 |
-
var f, d = this.options.events;
|
1893 |
-
Da(this, a.axes) === -1 && (c && !this.isColorAxis ? a.axes.splice(a.xAxis.length, 0, this) : a.axes.push(this), a[this.coll].push(this));
|
1894 |
-
this.series = this.series || [];
|
1895 |
-
if (a.inverted && c && this.reversed === t)this.reversed = !0;
|
1896 |
-
this.removePlotLine = this.removePlotBand = this.removePlotBandOrLine;
|
1897 |
-
for (f in d)K(this, f, d[f]);
|
1898 |
-
if (this.isLog)this.val2lin = za, this.lin2val = ia
|
1899 |
-
},
|
1900 |
-
setOptions: function (a) {
|
1901 |
-
this.options = w(this.defaultOptions, this.isXAxis ? {} : this.defaultYAxisOptions, [this.defaultTopAxisOptions, this.defaultRightAxisOptions, this.defaultBottomAxisOptions, this.defaultLeftAxisOptions][this.side], w(E[this.coll], a))
|
1902 |
-
},
|
1903 |
-
defaultLabelFormatter: function () {
|
1904 |
-
var a =
|
1905 |
-
this.axis, b = this.value, c = a.categories, d = this.dateTimeLabelFormat, e = E.lang.numericSymbols, f = e && e.length, g, h = a.options.labels.format, a = a.isLog ? b : a.tickInterval;
|
1906 |
-
if (h)g = Ia(h, this); else if (c)g = b; else if (d)g = cb(d, b); else if (f && a >= 1E3)for (; f-- && g === t;)c = Math.pow(1E3, f + 1), a >= c && e[f] !== null && (g = Ga(b / c, -1) + e[f]);
|
1907 |
-
g === t && (g = M(b) >= 1E4 ? Ga(b, 0) : Ga(b, -1, t, ""));
|
1908 |
-
return g
|
1909 |
-
},
|
1910 |
-
getSeriesExtremes: function () {
|
1911 |
-
var a = this, b = a.chart;
|
1912 |
-
a.hasVisibleSeries = !1;
|
1913 |
-
a.dataMin = a.dataMax = null;
|
1914 |
-
a.buildStacks && a.buildStacks();
|
1915 |
-
p(a.series, function (c) {
|
1916 |
-
if (c.visible || !b.options.chart.ignoreHiddenSeries) {
|
1917 |
-
var d;
|
1918 |
-
d = c.options.threshold;
|
1919 |
-
var e;
|
1920 |
-
a.hasVisibleSeries = !0;
|
1921 |
-
a.isLog && d <= 0 && (d = null);
|
1922 |
-
if (a.isXAxis) {
|
1923 |
-
if (d = c.xData, d.length)a.dataMin = C(m(a.dataMin, d[0]), Na(d)), a.dataMax = v(m(a.dataMax, d[0]), Ba(d))
|
1924 |
-
} else {
|
1925 |
-
c.getExtremes();
|
1926 |
-
e = c.dataMax;
|
1927 |
-
c = c.dataMin;
|
1928 |
-
if (r(c) && r(e))a.dataMin = C(m(a.dataMin, c), c), a.dataMax = v(m(a.dataMax, e), e);
|
1929 |
-
if (r(d))if (a.dataMin >= d)a.dataMin = d, a.ignoreMinPadding = !0; else if (a.dataMax < d)a.dataMax = d, a.ignoreMaxPadding = !0
|
1930 |
-
}
|
1931 |
-
}
|
1932 |
-
})
|
1933 |
-
},
|
1934 |
-
translate: function (a, b, c, d, e, f) {
|
1935 |
-
var g =
|
1936 |
-
1, h = 0, i = d ? this.oldTransA : this.transA, d = d ? this.oldMin : this.min, j = this.minPixelPadding, e = (this.options.ordinal || this.isLog && e) && this.lin2val;
|
1937 |
-
if (!i)i = this.transA;
|
1938 |
-
if (c)g *= -1, h = this.len;
|
1939 |
-
this.reversed && (g *= -1, h -= g * (this.sector || this.len));
|
1940 |
-
b ? (a = a * g + h, a -= j, a = a / i + d, e && (a = this.lin2val(a))) : (e && (a = this.val2lin(a)), f === "between" && (f = 0.5), a = g * (a - d) * i + h + g * j + (ha(f) ? i * f * this.pointRange : 0));
|
1941 |
-
return a
|
1942 |
-
},
|
1943 |
-
toPixels: function (a, b) {
|
1944 |
-
return this.translate(a, !1, !this.horiz, null, !0) + (b ? 0 : this.pos)
|
1945 |
-
},
|
1946 |
-
toValue: function (a, b) {
|
1947 |
-
return this.translate(a -
|
1948 |
-
(b ? 0 : this.pos), !0, !this.horiz, null, !0)
|
1949 |
-
},
|
1950 |
-
getPlotLinePath: function (a, b, c, d, e) {
|
1951 |
-
var f = this.chart, g = this.left, h = this.top, i, j, k = c && f.oldChartHeight || f.chartHeight, l = c && f.oldChartWidth || f.chartWidth, o;
|
1952 |
-
i = this.transB;
|
1953 |
-
e = m(e, this.translate(a, null, null, c));
|
1954 |
-
a = c = u(e + i);
|
1955 |
-
i = j = u(k - e - i);
|
1956 |
-
if (isNaN(e))o = !0; else if (this.horiz) {
|
1957 |
-
if (i = h, j = k - this.bottom, a < g || a > g + this.width)o = !0
|
1958 |
-
} else if (a = g, c = l - this.right, i < h || i > h + this.height)o = !0;
|
1959 |
-
return o && !d ? null : f.renderer.crispLine(["M", a, i, "L", c, j], b || 1)
|
1960 |
-
},
|
1961 |
-
getLinearTickPositions: function (a,
|
1962 |
-
b, c) {
|
1963 |
-
var d, e = da(T(b / a) * a), f = da(Ka(c / a) * a), g = [];
|
1964 |
-
if (b === c && ha(b))return [b];
|
1965 |
-
for (b = e; b <= f;) {
|
1966 |
-
g.push(b);
|
1967 |
-
b = da(b + a);
|
1968 |
-
if (b === d)break;
|
1969 |
-
d = b
|
1970 |
-
}
|
1971 |
-
return g
|
1972 |
-
},
|
1973 |
-
getMinorTickPositions: function () {
|
1974 |
-
var a = this.options, b = this.tickPositions, c = this.minorTickInterval, d = [], e;
|
1975 |
-
if (this.isLog) {
|
1976 |
-
e = b.length;
|
1977 |
-
for (a = 1; a < e; a++)d = d.concat(this.getLogTickPositions(c, b[a - 1], b[a], !0))
|
1978 |
-
} else if (this.isDatetimeAxis && a.minorTickInterval === "auto")d = d.concat(this.getTimeTicks(this.normalizeTimeTickInterval(c), this.min, this.max, a.startOfWeek)), d[0] < this.min &&
|
1979 |
-
d.shift(); else for (b = this.min + (b[0] - this.min) % c; b <= this.max; b += c)d.push(b);
|
1980 |
-
return d
|
1981 |
-
},
|
1982 |
-
adjustForMinRange: function () {
|
1983 |
-
var a = this.options, b = this.min, c = this.max, d, e = this.dataMax - this.dataMin >= this.minRange, f, g, h, i, j;
|
1984 |
-
if (this.isXAxis && this.minRange === t && !this.isLog)r(a.min) || r(a.max) ? this.minRange = null : (p(this.series, function (a) {
|
1985 |
-
i = a.xData;
|
1986 |
-
for (g = j = a.xIncrement ? 1 : i.length - 1; g > 0; g--)if (h = i[g] - i[g - 1], f === t || h < f)f = h
|
1987 |
-
}), this.minRange = C(f * 5, this.dataMax - this.dataMin));
|
1988 |
-
if (c - b < this.minRange) {
|
1989 |
-
var k = this.minRange;
|
1990 |
-
d =
|
1991 |
-
(k - c + b) / 2;
|
1992 |
-
d = [b - d, m(a.min, b - d)];
|
1993 |
-
if (e)d[2] = this.dataMin;
|
1994 |
-
b = Ba(d);
|
1995 |
-
c = [b + k, m(a.max, b + k)];
|
1996 |
-
if (e)c[2] = this.dataMax;
|
1997 |
-
c = Na(c);
|
1998 |
-
c - b < k && (d[0] = c - k, d[1] = m(a.min, c - k), b = Ba(d))
|
1999 |
-
}
|
2000 |
-
this.min = b;
|
2001 |
-
this.max = c
|
2002 |
-
},
|
2003 |
-
setAxisTranslation: function (a) {
|
2004 |
-
var b = this, c = b.max - b.min, d = b.axisPointRange || 0, e, f = 0, g = 0, h = b.linkedParent, i = !!b.categories, j = b.transA;
|
2005 |
-
if (b.isXAxis || i || d)h ? (f = h.minPointOffset, g = h.pointRangePadding) : p(b.series, function (a) {
|
2006 |
-
var h = i ? 1 : b.isXAxis ? a.pointRange : b.axisPointRange || 0, j = a.options.pointPlacement, n = a.closestPointRange;
|
2007 |
-
h > c && (h = 0);
|
2008 |
-
d = v(d, h);
|
2009 |
-
f = v(f, Fa(j) ? 0 : h / 2);
|
2010 |
-
g = v(g, j === "on" ? 0 : h);
|
2011 |
-
!a.noSharedTooltip && r(n) && (e = r(e) ? C(e, n) : n)
|
2012 |
-
}), h = b.ordinalSlope && e ? b.ordinalSlope / e : 1, b.minPointOffset = f *= h, b.pointRangePadding = g *= h, b.pointRange = C(d, c), b.closestPointRange = e;
|
2013 |
-
if (a)b.oldTransA = j;
|
2014 |
-
b.translationSlope = b.transA = j = b.len / (c + g || 1);
|
2015 |
-
b.transB = b.horiz ? b.left : b.bottom;
|
2016 |
-
b.minPixelPadding = j * f
|
2017 |
-
},
|
2018 |
-
setTickPositions: function (a) {
|
2019 |
-
var b = this, c = b.chart, d = b.options, e = b.isLog, f = b.isDatetimeAxis, g = b.isXAxis, h = b.isLinked, i = b.options.tickPositioner, j = d.maxPadding,
|
2020 |
-
k = d.minPadding, l = d.tickInterval, o = d.minTickInterval, n = d.tickPixelInterval, s, $ = b.categories;
|
2021 |
-
h ? (b.linkedParent = c[b.coll][d.linkedTo], c = b.linkedParent.getExtremes(), b.min = m(c.min, c.dataMin), b.max = m(c.max, c.dataMax), d.type !== b.linkedParent.options.type && ra(11, 1)) : (b.min = m(b.userMin, d.min, b.dataMin), b.max = m(b.userMax, d.max, b.dataMax));
|
2022 |
-
if (e)!a && C(b.min, m(b.dataMin, b.min)) <= 0 && ra(10, 1), b.min = da(za(b.min)), b.max = da(za(b.max));
|
2023 |
-
if (b.range && r(b.max))b.userMin = b.min = v(b.min, b.max - b.range), b.userMax = b.max, b.range =
|
2024 |
-
null;
|
2025 |
-
b.beforePadding && b.beforePadding();
|
2026 |
-
b.adjustForMinRange();
|
2027 |
-
if (!$ && !b.axisPointRange && !b.usePercentage && !h && r(b.min) && r(b.max) && (c = b.max - b.min)) {
|
2028 |
-
if (!r(d.min) && !r(b.userMin) && k && (b.dataMin < 0 || !b.ignoreMinPadding))b.min -= c * k;
|
2029 |
-
if (!r(d.max) && !r(b.userMax) && j && (b.dataMax > 0 || !b.ignoreMaxPadding))b.max += c * j
|
2030 |
-
}
|
2031 |
-
if (ha(d.floor))b.min = v(b.min, d.floor);
|
2032 |
-
if (ha(d.ceiling))b.max = C(b.max, d.ceiling);
|
2033 |
-
b.min === b.max || b.min === void 0 || b.max === void 0 ? b.tickInterval = 1 : h && !l && n === b.linkedParent.options.tickPixelInterval ? b.tickInterval =
|
2034 |
-
b.linkedParent.tickInterval : (b.tickInterval = m(l, $ ? 1 : (b.max - b.min) * n / v(b.len, n)), !r(l) && b.len < n && !this.isRadial && !this.isLog && !$ && d.startOnTick && d.endOnTick && (s = !0, b.tickInterval /= 4));
|
2035 |
-
g && !a && p(b.series, function (a) {
|
2036 |
-
a.processData(b.min !== b.oldMin || b.max !== b.oldMax)
|
2037 |
-
});
|
2038 |
-
b.setAxisTranslation(!0);
|
2039 |
-
b.beforeSetTickPositions && b.beforeSetTickPositions();
|
2040 |
-
if (b.postProcessTickInterval)b.tickInterval = b.postProcessTickInterval(b.tickInterval);
|
2041 |
-
if (b.pointRange)b.tickInterval = v(b.pointRange, b.tickInterval);
|
2042 |
-
if (!l && b.tickInterval <
|
2043 |
-
o)b.tickInterval = o;
|
2044 |
-
if (!f && !e && !l)b.tickInterval = nb(b.tickInterval, null, mb(b.tickInterval), d);
|
2045 |
-
b.minorTickInterval = d.minorTickInterval === "auto" && b.tickInterval ? b.tickInterval / 5 : d.minorTickInterval;
|
2046 |
-
b.tickPositions = a = d.tickPositions ? [].concat(d.tickPositions) : i && i.apply(b, [b.min, b.max]);
|
2047 |
-
if (!a)!b.ordinalPositions && (b.max - b.min) / b.tickInterval > v(2 * b.len, 200) && ra(19, !0), a = f ? b.getTimeTicks(b.normalizeTimeTickInterval(b.tickInterval, d.units), b.min, b.max, d.startOfWeek, b.ordinalPositions, b.closestPointRange,
|
2048 |
-
!0) : e ? b.getLogTickPositions(b.tickInterval, b.min, b.max) : b.getLinearTickPositions(b.tickInterval, b.min, b.max), s && a.splice(1, a.length - 2), b.tickPositions = a;
|
2049 |
-
if (!h)e = a[0], f = a[a.length - 1], h = b.minPointOffset || 0, d.startOnTick ? b.min = e : b.min - h > e && a.shift(), d.endOnTick ? b.max = f : b.max + h < f && a.pop(), a.length === 1 && (d = M(b.max) > 1E13 ? 1 : 0.001, b.min -= d, b.max += d)
|
2050 |
-
},
|
2051 |
-
setMaxTicks: function () {
|
2052 |
-
var a = this.chart, b = a.maxTicks || {}, c = this.tickPositions, d = this._maxTicksKey = [this.coll, this.pos, this.len].join("-");
|
2053 |
-
if (!this.isLinked && !this.isDatetimeAxis && c && c.length > (b[d] || 0) && this.options.alignTicks !== !1)b[d] = c.length;
|
2054 |
-
a.maxTicks = b
|
2055 |
-
},
|
2056 |
-
adjustTickAmount: function () {
|
2057 |
-
var a = this._maxTicksKey, b = this.tickPositions, c = this.chart.maxTicks;
|
2058 |
-
if (c && c[a] && !this.isDatetimeAxis && !this.categories && !this.isLinked && this.options.alignTicks !== !1 && this.min !== t) {
|
2059 |
-
var d = this.tickAmount, e = b.length;
|
2060 |
-
this.tickAmount = a = c[a];
|
2061 |
-
if (e < a) {
|
2062 |
-
for (; b.length < a;)b.push(da(b[b.length - 1] + this.tickInterval));
|
2063 |
-
this.transA *= (e - 1) / (a - 1);
|
2064 |
-
this.max = b[b.length - 1]
|
2065 |
-
}
|
2066 |
-
if (r(d) && a !== d)this.isDirty = !0
|
2067 |
-
}
|
2068 |
-
},
|
2069 |
-
setScale: function () {
|
2070 |
-
var a = this.stacks, b, c, d, e;
|
2071 |
-
this.oldMin = this.min;
|
2072 |
-
this.oldMax = this.max;
|
2073 |
-
this.oldAxisLength = this.len;
|
2074 |
-
this.setAxisSize();
|
2075 |
-
e = this.len !== this.oldAxisLength;
|
2076 |
-
p(this.series, function (a) {
|
2077 |
-
if (a.isDirtyData || a.isDirty || a.xAxis.isDirty)d = !0
|
2078 |
-
});
|
2079 |
-
if (e || d || this.isLinked || this.forceRedraw || this.userMin !== this.oldUserMin || this.userMax !== this.oldUserMax) {
|
2080 |
-
if (!this.isXAxis)for (b in a)for (c in a[b])a[b][c].total = null, a[b][c].cum = 0;
|
2081 |
-
this.forceRedraw = !1;
|
2082 |
-
this.getSeriesExtremes();
|
2083 |
-
this.setTickPositions();
|
2084 |
-
this.oldUserMin =
|
2085 |
-
this.userMin;
|
2086 |
-
this.oldUserMax = this.userMax;
|
2087 |
-
if (!this.isDirty)this.isDirty = e || this.min !== this.oldMin || this.max !== this.oldMax
|
2088 |
-
} else if (!this.isXAxis) {
|
2089 |
-
if (this.oldStacks)a = this.stacks = this.oldStacks;
|
2090 |
-
for (b in a)for (c in a[b])a[b][c].cum = a[b][c].total
|
2091 |
-
}
|
2092 |
-
this.setMaxTicks()
|
2093 |
-
},
|
2094 |
-
setExtremes: function (a, b, c, d, e) {
|
2095 |
-
var f = this, g = f.chart, c = m(c, !0), e = q(e, {min: a, max: b});
|
2096 |
-
D(f, "setExtremes", e, function () {
|
2097 |
-
f.userMin = a;
|
2098 |
-
f.userMax = b;
|
2099 |
-
f.eventArgs = e;
|
2100 |
-
f.isDirtyExtremes = !0;
|
2101 |
-
c && g.redraw(d)
|
2102 |
-
})
|
2103 |
-
},
|
2104 |
-
zoom: function (a, b) {
|
2105 |
-
var c = this.dataMin, d = this.dataMax,
|
2106 |
-
e = this.options;
|
2107 |
-
this.allowZoomOutside || (r(c) && a <= C(c, m(e.min, c)) && (a = t), r(d) && b >= v(d, m(e.max, d)) && (b = t));
|
2108 |
-
this.displayBtn = a !== t || b !== t;
|
2109 |
-
this.setExtremes(a, b, !1, t, {trigger: "zoom"});
|
2110 |
-
return !0
|
2111 |
-
},
|
2112 |
-
setAxisSize: function () {
|
2113 |
-
var a = this.chart, b = this.options, c = b.offsetLeft || 0, d = this.horiz, e = m(b.width, a.plotWidth - c + (b.offsetRight || 0)), f = m(b.height, a.plotHeight), g = m(b.top, a.plotTop), b = m(b.left, a.plotLeft + c), c = /%$/;
|
2114 |
-
c.test(f) && (f = parseInt(f, 10) / 100 * a.plotHeight);
|
2115 |
-
c.test(g) && (g = parseInt(g, 10) / 100 * a.plotHeight + a.plotTop);
|
2116 |
-
this.left = b;
|
2117 |
-
this.top = g;
|
2118 |
-
this.width = e;
|
2119 |
-
this.height = f;
|
2120 |
-
this.bottom = a.chartHeight - f - g;
|
2121 |
-
this.right = a.chartWidth - e - b;
|
2122 |
-
this.len = v(d ? e : f, 0);
|
2123 |
-
this.pos = d ? b : g
|
2124 |
-
},
|
2125 |
-
getExtremes: function () {
|
2126 |
-
var a = this.isLog;
|
2127 |
-
return {
|
2128 |
-
min: a ? da(ia(this.min)) : this.min,
|
2129 |
-
max: a ? da(ia(this.max)) : this.max,
|
2130 |
-
dataMin: this.dataMin,
|
2131 |
-
dataMax: this.dataMax,
|
2132 |
-
userMin: this.userMin,
|
2133 |
-
userMax: this.userMax
|
2134 |
-
}
|
2135 |
-
},
|
2136 |
-
getThreshold: function (a) {
|
2137 |
-
var b = this.isLog, c = b ? ia(this.min) : this.min, b = b ? ia(this.max) : this.max;
|
2138 |
-
c > a || a === null ? a = c : b < a && (a = b);
|
2139 |
-
return this.translate(a, 0, 1, 0, 1)
|
2140 |
-
},
|
2141 |
-
autoLabelAlign: function (a) {
|
2142 |
-
a =
|
2143 |
-
(m(a, 0) - this.side * 90 + 720) % 360;
|
2144 |
-
return a > 15 && a < 165 ? "right" : a > 195 && a < 345 ? "left" : "center"
|
2145 |
-
},
|
2146 |
-
getOffset: function () {
|
2147 |
-
var a = this, b = a.chart, c = b.renderer, d = a.options, e = a.tickPositions, f = a.ticks, g = a.horiz, h = a.side, i = b.inverted ? [1, 0, 3, 2][h] : h, j, k = 0, l, o = 0, n = d.title, s = d.labels, $ = 0, J = b.axisOffset, L = b.clipOffset, x = [-1, 1, 1, -1][h], q, u = 1, w = m(s.maxStaggerLines, 5), y, z, A, B, na = h === 2 ? c.fontMetrics(s.style.fontSize).b : 0;
|
2148 |
-
a.hasData = j = a.hasVisibleSeries || r(a.min) && r(a.max) && !!e;
|
2149 |
-
a.showAxis = b = j || m(d.showEmpty, !0);
|
2150 |
-
a.staggerLines =
|
2151 |
-
a.horiz && s.staggerLines;
|
2152 |
-
if (!a.axisGroup)a.gridGroup = c.g("grid").attr({zIndex: d.gridZIndex || 1}).add(), a.axisGroup = c.g("axis").attr({zIndex: d.zIndex || 2}).add(), a.labelGroup = c.g("axis-labels").attr({zIndex: s.zIndex || 7}).addClass("highcharts-" + a.coll.toLowerCase() + "-labels").add();
|
2153 |
-
if (j || a.isLinked) {
|
2154 |
-
a.labelAlign = m(s.align || a.autoLabelAlign(s.rotation));
|
2155 |
-
p(e, function (b) {
|
2156 |
-
f[b] ? f[b].addLabel() : f[b] = new Sa(a, b)
|
2157 |
-
});
|
2158 |
-
if (a.horiz && !a.staggerLines && w && !s.rotation) {
|
2159 |
-
for (q = a.reversed ? [].concat(e).reverse() : e; u < w;) {
|
2160 |
-
j =
|
2161 |
-
[];
|
2162 |
-
y = !1;
|
2163 |
-
for (s = 0; s < q.length; s++)z = q[s], A = (A = f[z].label && f[z].label.getBBox()) ? A.width : 0, B = s % u, A && (z = a.translate(z), j[B] !== t && z < j[B] && (y = !0), j[B] = z + A);
|
2164 |
-
if (y)u++; else break
|
2165 |
-
}
|
2166 |
-
if (u > 1)a.staggerLines = u
|
2167 |
-
}
|
2168 |
-
p(e, function (b) {
|
2169 |
-
if (h === 0 || h === 2 || {1: "left", 3: "right"}[h] === a.labelAlign)$ = v(f[b].getLabelSize(), $)
|
2170 |
-
});
|
2171 |
-
if (a.staggerLines)$ *= a.staggerLines, a.labelOffset = $
|
2172 |
-
} else for (q in f)f[q].destroy(), delete f[q];
|
2173 |
-
if (n && n.text && n.enabled !== !1) {
|
2174 |
-
if (!a.axisTitle)a.axisTitle = c.text(n.text, 0, 0, n.useHTML).attr({
|
2175 |
-
zIndex: 7, rotation: n.rotation ||
|
2176 |
-
0, align: n.textAlign || {low: "left", middle: "center", high: "right"}[n.align]
|
2177 |
-
}).addClass("highcharts-" + this.coll.toLowerCase() + "-title").css(n.style).add(a.axisGroup), a.axisTitle.isNew = !0;
|
2178 |
-
if (b)k = a.axisTitle.getBBox()[g ? "height" : "width"], o = m(n.margin, g ? 5 : 10), l = n.offset;
|
2179 |
-
a.axisTitle[b ? "show" : "hide"]()
|
2180 |
-
}
|
2181 |
-
a.offset = x * m(d.offset, J[h]);
|
2182 |
-
a.axisTitleMargin = m(l, $ + o + ($ && x * d.labels[g ? "y" : "x"] - na));
|
2183 |
-
J[h] = v(J[h], a.axisTitleMargin + k + x * a.offset);
|
2184 |
-
L[i] = v(L[i], T(d.lineWidth / 2) * 2)
|
2185 |
-
},
|
2186 |
-
getLinePath: function (a) {
|
2187 |
-
var b = this.chart, c = this.opposite,
|
2188 |
-
d = this.offset, e = this.horiz, f = this.left + (c ? this.width : 0) + d, d = b.chartHeight - this.bottom - (c ? this.height : 0) + d;
|
2189 |
-
c && (a *= -1);
|
2190 |
-
return b.renderer.crispLine(["M", e ? this.left : f, e ? d : this.top, "L", e ? b.chartWidth - this.right : f, e ? d : b.chartHeight - this.bottom], a)
|
2191 |
-
},
|
2192 |
-
getTitlePosition: function () {
|
2193 |
-
var a = this.horiz, b = this.left, c = this.top, d = this.len, e = this.options.title, f = a ? b : c, g = this.opposite, h = this.offset, i = z(e.style.fontSize || 12), d = {
|
2194 |
-
low: f + (a ? 0 : d),
|
2195 |
-
middle: f + d / 2,
|
2196 |
-
high: f + (a ? d : 0)
|
2197 |
-
}[e.align], b = (a ? c + this.height : b) + (a ? 1 : -1) * (g ? -1 : 1) *
|
2198 |
-
this.axisTitleMargin + (this.side === 2 ? i : 0);
|
2199 |
-
return {
|
2200 |
-
x: a ? d : b + (g ? this.width : 0) + h + (e.x || 0),
|
2201 |
-
y: a ? b - (g ? this.height : 0) + h : d + (e.y || 0)
|
2202 |
-
}
|
2203 |
-
},
|
2204 |
-
render: function () {
|
2205 |
-
var a = this, b = a.horiz, c = a.reversed, d = a.chart, e = d.renderer, f = a.options, g = a.isLog, h = a.isLinked, i = a.tickPositions, j, k = a.axisTitle, l = a.ticks, o = a.minorTicks, n = a.alternateBands, s = f.stackLabels, m = f.alternateGridColor, J = a.tickmarkOffset, L = f.lineWidth, x = d.hasRendered && r(a.oldMin) && !isNaN(a.oldMin), q = a.hasData, v = a.showAxis, u, w = f.labels.overflow, y = a.justifyLabels = b && w !== !1, z;
|
2206 |
-
a.labelEdge.length = 0;
|
2207 |
-
a.justifyToPlot = w === "justify";
|
2208 |
-
p([l, o, n], function (a) {
|
2209 |
-
for (var b in a)a[b].isActive = !1
|
2210 |
-
});
|
2211 |
-
if (q || h)if (a.minorTickInterval && !a.categories && p(a.getMinorTickPositions(), function (b) {
|
2212 |
-
o[b] || (o[b] = new Sa(a, b, "minor"));
|
2213 |
-
x && o[b].isNew && o[b].render(null, !0);
|
2214 |
-
o[b].render(null, !1, 1)
|
2215 |
-
}), i.length && (j = i.slice(), (b && c || !b && !c) && j.reverse(), y && (j = j.slice(1).concat([j[0]])), p(j, function (b, c) {
|
2216 |
-
y && (c = c === j.length - 1 ? 0 : c + 1);
|
2217 |
-
if (!h || b >= a.min && b <= a.max)l[b] || (l[b] = new Sa(a, b)), x && l[b].isNew && l[b].render(c,
|
2218 |
-
!0, 0.1), l[b].render(c, !1, 1)
|
2219 |
-
}), J && a.min === 0 && (l[-1] || (l[-1] = new Sa(a, -1, null, !0)), l[-1].render(-1))), m && p(i, function (b, c) {
|
2220 |
-
if (c % 2 === 0 && b < a.max)n[b] || (n[b] = new R.PlotLineOrBand(a)), u = b + J, z = i[c + 1] !== t ? i[c + 1] + J : a.max, n[b].options = {
|
2221 |
-
from: g ? ia(u) : u,
|
2222 |
-
to: g ? ia(z) : z,
|
2223 |
-
color: m
|
2224 |
-
}, n[b].render(), n[b].isActive = !0
|
2225 |
-
}), !a._addedPlotLB)p((f.plotLines || []).concat(f.plotBands || []), function (b) {
|
2226 |
-
a.addPlotBandOrLine(b)
|
2227 |
-
}), a._addedPlotLB = !0;
|
2228 |
-
p([l, o, n], function (a) {
|
2229 |
-
var b, c, e = [], f = va ? va.duration || 500 : 0, g = function () {
|
2230 |
-
for (c = e.length; c--;)a[e[c]] && !a[e[c]].isActive && (a[e[c]].destroy(), delete a[e[c]])
|
2231 |
-
};
|
2232 |
-
for (b in a)if (!a[b].isActive)a[b].render(b, !1, 0), a[b].isActive = !1, e.push(b);
|
2233 |
-
a === n || !d.hasRendered || !f ? g() : f && setTimeout(g, f)
|
2234 |
-
});
|
2235 |
-
if (L)b = a.getLinePath(L), a.axisLine ? a.axisLine.animate({d: b}) : a.axisLine = e.path(b).attr({
|
2236 |
-
stroke: f.lineColor,
|
2237 |
-
"stroke-width": L,
|
2238 |
-
zIndex: 7
|
2239 |
-
}).add(a.axisGroup), a.axisLine[v ? "show" : "hide"]();
|
2240 |
-
if (k && v)k[k.isNew ? "attr" : "animate"](a.getTitlePosition()), k.isNew = !1;
|
2241 |
-
s && s.enabled && a.renderStackTotals();
|
2242 |
-
a.isDirty = !1
|
2243 |
-
},
|
2244 |
-
redraw: function () {
|
2245 |
-
var a =
|
2246 |
-
this.chart.pointer;
|
2247 |
-
a && a.reset(!0);
|
2248 |
-
this.render();
|
2249 |
-
p(this.plotLinesAndBands, function (a) {
|
2250 |
-
a.render()
|
2251 |
-
});
|
2252 |
-
p(this.series, function (a) {
|
2253 |
-
a.isDirty = !0
|
2254 |
-
})
|
2255 |
-
},
|
2256 |
-
destroy: function (a) {
|
2257 |
-
var b = this, c = b.stacks, d, e = b.plotLinesAndBands;
|
2258 |
-
a || W(b);
|
2259 |
-
for (d in c)Oa(c[d]), c[d] = null;
|
2260 |
-
p([b.ticks, b.minorTicks, b.alternateBands], function (a) {
|
2261 |
-
Oa(a)
|
2262 |
-
});
|
2263 |
-
for (a = e.length; a--;)e[a].destroy();
|
2264 |
-
p("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","), function (a) {
|
2265 |
-
b[a] && (b[a] = b[a].destroy())
|
2266 |
-
});
|
2267 |
-
this.cross && this.cross.destroy()
|
2268 |
-
},
|
2269 |
-
drawCrosshair: function (a, b) {
|
2270 |
-
if (this.crosshair)if ((r(b) || !m(this.crosshair.snap, !0)) === !1)this.hideCrosshair(); else {
|
2271 |
-
var c, d = this.crosshair, e = d.animation;
|
2272 |
-
m(d.snap, !0) ? r(b) && (c = this.chart.inverted != this.horiz ? b.plotX : this.len - b.plotY) : c = this.horiz ? a.chartX - this.pos : this.len - a.chartY + this.pos;
|
2273 |
-
c = this.isRadial ? this.getPlotLinePath(this.isXAxis ? b.x : m(b.stackY, b.y)) : this.getPlotLinePath(null, null, null, null, c);
|
2274 |
-
if (c === null)this.hideCrosshair(); else if (this.cross)this.cross.attr({visibility: "visible"})[e ? "animate" :
|
2275 |
-
"attr"]({d: c}, e); else {
|
2276 |
-
e = {"stroke-width": d.width || 1, stroke: d.color || "#C0C0C0", zIndex: d.zIndex || 2};
|
2277 |
-
if (d.dashStyle)e.dashstyle = d.dashStyle;
|
2278 |
-
this.cross = this.chart.renderer.path(c).attr(e).add()
|
2279 |
-
}
|
2280 |
-
}
|
2281 |
-
},
|
2282 |
-
hideCrosshair: function () {
|
2283 |
-
this.cross && this.cross.hide()
|
2284 |
-
}
|
2285 |
-
};
|
2286 |
-
q(la.prototype, {
|
2287 |
-
getPlotBandPath: function (a, b) {
|
2288 |
-
var c = this.getPlotLinePath(b), d = this.getPlotLinePath(a);
|
2289 |
-
d && c ? d.push(c[4], c[5], c[1], c[2]) : d = null;
|
2290 |
-
return d
|
2291 |
-
}, addPlotBand: function (a) {
|
2292 |
-
this.addPlotBandOrLine(a, "plotBands")
|
2293 |
-
}, addPlotLine: function (a) {
|
2294 |
-
this.addPlotBandOrLine(a,
|
2295 |
-
"plotLines")
|
2296 |
-
}, addPlotBandOrLine: function (a, b) {
|
2297 |
-
var c = (new R.PlotLineOrBand(this, a)).render(), d = this.userOptions;
|
2298 |
-
c && (b && (d[b] = d[b] || [], d[b].push(a)), this.plotLinesAndBands.push(c));
|
2299 |
-
return c
|
2300 |
-
}, removePlotBandOrLine: function (a) {
|
2301 |
-
for (var b = this.plotLinesAndBands, c = this.options, d = this.userOptions, e = b.length; e--;)b[e].id === a && b[e].destroy();
|
2302 |
-
p([c.plotLines || [], d.plotLines || [], c.plotBands || [], d.plotBands || []], function (b) {
|
2303 |
-
for (e = b.length; e--;)b[e].id === a && ja(b, b[e])
|
2304 |
-
})
|
2305 |
-
}
|
2306 |
-
});
|
2307 |
-
la.prototype.getTimeTicks = function (a, b,
|
2308 |
-
c, d) {
|
2309 |
-
var e = [], f = {}, g = E.global.useUTC, h, i = new Date(b - Ra), j = a.unitRange, k = a.count;
|
2310 |
-
if (r(b)) {
|
2311 |
-
j >= A.second && (i.setMilliseconds(0), i.setSeconds(j >= A.minute ? 0 : k * T(i.getSeconds() / k)));
|
2312 |
-
if (j >= A.minute)i[Db](j >= A.hour ? 0 : k * T(i[pb]() / k));
|
2313 |
-
if (j >= A.hour)i[Eb](j >= A.day ? 0 : k * T(i[qb]() / k));
|
2314 |
-
if (j >= A.day)i[sb](j >= A.month ? 1 : k * T(i[Xa]() / k));
|
2315 |
-
j >= A.month && (i[Fb](j >= A.year ? 0 : k * T(i[fb]() / k)), h = i[gb]());
|
2316 |
-
j >= A.year && (h -= h % k, i[Gb](h));
|
2317 |
-
if (j === A.week)i[sb](i[Xa]() - i[rb]() + m(d, 1));
|
2318 |
-
b = 1;
|
2319 |
-
Ra && (i = new Date(i.getTime() + Ra));
|
2320 |
-
h = i[gb]();
|
2321 |
-
for (var d =
|
2322 |
-
i.getTime(), l = i[fb](), o = i[Xa](), n = g ? Ra : (864E5 + i.getTimezoneOffset() * 6E4) % 864E5; d < c;)e.push(d), j === A.year ? d = eb(h + b * k, 0) : j === A.month ? d = eb(h, l + b * k) : !g && (j === A.day || j === A.week) ? d = eb(h, l, o + b * k * (j === A.day ? 1 : 7)) : d += j * k, b++;
|
2323 |
-
e.push(d);
|
2324 |
-
p(vb(e, function (a) {
|
2325 |
-
return j <= A.hour && a % A.day === n
|
2326 |
-
}), function (a) {
|
2327 |
-
f[a] = "day"
|
2328 |
-
})
|
2329 |
-
}
|
2330 |
-
e.info = q(a, {higherRanks: f, totalRange: j * k});
|
2331 |
-
return e
|
2332 |
-
};
|
2333 |
-
la.prototype.normalizeTimeTickInterval = function (a, b) {
|
2334 |
-
var c = b || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute",
|
2335 |
-
[1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]], d = c[c.length - 1], e = A[d[0]], f = d[1], g;
|
2336 |
-
for (g = 0; g < c.length; g++)if (d = c[g], e = A[d[0]], f = d[1], c[g + 1] && a <= (e * f[f.length - 1] + A[c[g + 1][0]]) / 2)break;
|
2337 |
-
e === A.year && a < 5 * e && (f = [1, 2, 5]);
|
2338 |
-
c = nb(a / e, f, d[0] === "year" ? v(mb(a / e), 1) : 1);
|
2339 |
-
return {unitRange: e, count: c, unitName: d[0]}
|
2340 |
-
};
|
2341 |
-
la.prototype.getLogTickPositions = function (a, b, c, d) {
|
2342 |
-
var e = this.options, f = this.len, g = [];
|
2343 |
-
if (!d)this._minorAutoInterval = null;
|
2344 |
-
if (a >= 0.5)a = u(a), g = this.getLinearTickPositions(a,
|
2345 |
-
b, c); else if (a >= 0.08)for (var f = T(b), h, i, j, k, l, e = a > 0.3 ? [1, 2, 4] : a > 0.15 ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; f < c + 1 && !l; f++) {
|
2346 |
-
i = e.length;
|
2347 |
-
for (h = 0; h < i && !l; h++)j = za(ia(f) * e[h]), j > b && (!d || k <= c) && g.push(k), k > c && (l = !0), k = j
|
2348 |
-
} else if (b = ia(b), c = ia(c), a = e[d ? "minorTickInterval" : "tickInterval"], a = m(a === "auto" ? null : a, this._minorAutoInterval, (c - b) * (e.tickPixelInterval / (d ? 5 : 1)) / ((d ? f / this.tickPositions.length : f) || 1)), a = nb(a, null, mb(a)), g = Ua(this.getLinearTickPositions(a, b, c), za), !d)this._minorAutoInterval = a / 5;
|
2349 |
-
if (!d)this.tickInterval =
|
2350 |
-
a;
|
2351 |
-
return g
|
2352 |
-
};
|
2353 |
-
var Mb = R.Tooltip = function () {
|
2354 |
-
this.init.apply(this, arguments)
|
2355 |
-
};
|
2356 |
-
Mb.prototype = {
|
2357 |
-
init: function (a, b) {
|
2358 |
-
var c = b.borderWidth, d = b.style, e = z(d.padding);
|
2359 |
-
this.chart = a;
|
2360 |
-
this.options = b;
|
2361 |
-
this.crosshairs = [];
|
2362 |
-
this.now = {x: 0, y: 0};
|
2363 |
-
this.isHidden = !0;
|
2364 |
-
this.label = a.renderer.label("", 0, 0, b.shape || "callout", null, null, b.useHTML, null, "tooltip").attr({
|
2365 |
-
padding: e,
|
2366 |
-
fill: b.backgroundColor,
|
2367 |
-
"stroke-width": c,
|
2368 |
-
r: b.borderRadius,
|
2369 |
-
zIndex: 8
|
2370 |
-
}).css(d).css({padding: 0}).add().attr({y: -9999});
|
2371 |
-
fa || this.label.shadow(b.shadow);
|
2372 |
-
this.shared = b.shared
|
2373 |
-
},
|
2374 |
-
destroy: function () {
|
2375 |
-
if (this.label)this.label = this.label.destroy();
|
2376 |
-
clearTimeout(this.hideTimer);
|
2377 |
-
clearTimeout(this.tooltipTimeout)
|
2378 |
-
}, move: function (a, b, c, d) {
|
2379 |
-
var e = this, f = e.now, g = e.options.animation !== !1 && !e.isHidden, h = e.followPointer || e.len > 1;
|
2380 |
-
q(f, {
|
2381 |
-
x: g ? (2 * f.x + a) / 3 : a,
|
2382 |
-
y: g ? (f.y + b) / 2 : b,
|
2383 |
-
anchorX: h ? t : g ? (2 * f.anchorX + c) / 3 : c,
|
2384 |
-
anchorY: h ? t : g ? (f.anchorY + d) / 2 : d
|
2385 |
-
});
|
2386 |
-
e.label.attr(f);
|
2387 |
-
if (g && (M(a - f.x) > 1 || M(b - f.y) > 1))clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function () {
|
2388 |
-
e && e.move(a, b, c, d)
|
2389 |
-
}, 32)
|
2390 |
-
}, hide: function () {
|
2391 |
-
var a =
|
2392 |
-
this, b;
|
2393 |
-
clearTimeout(this.hideTimer);
|
2394 |
-
if (!this.isHidden)b = this.chart.hoverPoints, this.hideTimer = setTimeout(function () {
|
2395 |
-
a.label.fadeOut();
|
2396 |
-
a.isHidden = !0
|
2397 |
-
}, m(this.options.hideDelay, 500)), b && p(b, function (a) {
|
2398 |
-
a.setState()
|
2399 |
-
}), this.chart.hoverPoints = null
|
2400 |
-
}, getAnchor: function (a, b) {
|
2401 |
-
var c, d = this.chart, e = d.inverted, f = d.plotTop, g = 0, h = 0, i, a = qa(a);
|
2402 |
-
c = a[0].tooltipPos;
|
2403 |
-
this.followPointer && b && (b.chartX === t && (b = d.pointer.normalize(b)), c = [b.chartX - d.plotLeft, b.chartY - f]);
|
2404 |
-
c || (p(a, function (a) {
|
2405 |
-
i = a.series.yAxis;
|
2406 |
-
g += a.plotX;
|
2407 |
-
h += (a.plotLow ?
|
2408 |
-
(a.plotLow + a.plotHigh) / 2 : a.plotY) + (!e && i ? i.top - f : 0)
|
2409 |
-
}), g /= a.length, h /= a.length, c = [e ? d.plotWidth - h : g, this.shared && !e && a.length > 1 && b ? b.chartY - f : e ? d.plotHeight - g : h]);
|
2410 |
-
return Ua(c, u)
|
2411 |
-
}, getPosition: function (a, b, c) {
|
2412 |
-
var d = this.chart, e = this.distance, f = {}, g, h = ["y", d.chartHeight, b, c.plotY + d.plotTop], i = ["x", d.chartWidth, a, c.plotX + d.plotLeft], j = c.ttBelow || d.inverted && !c.negative || !d.inverted && c.negative, k = function (a, b, c, d) {
|
2413 |
-
var g = c < d - e, b = d + e + c < b, c = d - e - c;
|
2414 |
-
d += e;
|
2415 |
-
if (j && b)f[a] = d; else if (!j && g)f[a] = c; else if (g)f[a] = c; else if (b)f[a] =
|
2416 |
-
d; else return !1
|
2417 |
-
}, l = function (a, b, c, d) {
|
2418 |
-
if (d < e || d > b - e)return !1; else f[a] = d < c / 2 ? 1 : d > b - c / 2 ? b - c - 2 : d - c / 2
|
2419 |
-
}, o = function (a) {
|
2420 |
-
var b = h;
|
2421 |
-
h = i;
|
2422 |
-
i = b;
|
2423 |
-
g = a
|
2424 |
-
}, n = function () {
|
2425 |
-
k.apply(0, h) !== !1 ? l.apply(0, i) === !1 && !g && (o(!0), n()) : g ? f.x = f.y = 0 : (o(!0), n())
|
2426 |
-
};
|
2427 |
-
(d.inverted || this.len > 1) && o();
|
2428 |
-
n();
|
2429 |
-
return f
|
2430 |
-
}, defaultFormatter: function (a) {
|
2431 |
-
var b = this.points || qa(this), c = b[0].series, d;
|
2432 |
-
d = [a.tooltipHeaderFormatter(b[0])];
|
2433 |
-
p(b, function (a) {
|
2434 |
-
c = a.series;
|
2435 |
-
d.push(c.tooltipFormatter && c.tooltipFormatter(a) || a.point.tooltipFormatter(c.tooltipOptions.pointFormat))
|
2436 |
-
});
|
2437 |
-
d.push(a.options.footerFormat || "");
|
2438 |
-
return d.join("")
|
2439 |
-
}, refresh: function (a, b) {
|
2440 |
-
var c = this.chart, d = this.label, e = this.options, f, g, h = {}, i, j = [];
|
2441 |
-
i = e.formatter || this.defaultFormatter;
|
2442 |
-
var h = c.hoverPoints, k, l = this.shared;
|
2443 |
-
clearTimeout(this.hideTimer);
|
2444 |
-
this.followPointer = qa(a)[0].series.tooltipOptions.followPointer;
|
2445 |
-
g = this.getAnchor(a, b);
|
2446 |
-
f = g[0];
|
2447 |
-
g = g[1];
|
2448 |
-
l && (!a.series || !a.series.noSharedTooltip) ? (c.hoverPoints = a, h && p(h, function (a) {
|
2449 |
-
a.setState()
|
2450 |
-
}), p(a, function (a) {
|
2451 |
-
a.setState("hover");
|
2452 |
-
j.push(a.getLabelConfig())
|
2453 |
-
}), h = {
|
2454 |
-
x: a[0].category,
|
2455 |
-
y: a[0].y
|
2456 |
-
}, h.points = j, this.len = j.length, a = a[0]) : h = a.getLabelConfig();
|
2457 |
-
i = i.call(h, this);
|
2458 |
-
h = a.series;
|
2459 |
-
this.distance = m(h.tooltipOptions.distance, 16);
|
2460 |
-
i === !1 ? this.hide() : (this.isHidden && (bb(d), d.attr("opacity", 1).show()), d.attr({text: i}), k = e.borderColor || a.color || h.color || "#606060", d.attr({stroke: k}), this.updatePosition({
|
2461 |
-
plotX: f,
|
2462 |
-
plotY: g,
|
2463 |
-
negative: a.negative,
|
2464 |
-
ttBelow: a.ttBelow
|
2465 |
-
}), this.isHidden = !1);
|
2466 |
-
D(c, "tooltipRefresh", {text: i, x: f + c.plotLeft, y: g + c.plotTop, borderColor: k})
|
2467 |
-
}, updatePosition: function (a) {
|
2468 |
-
var b = this.chart,
|
2469 |
-
c = this.label, c = (this.options.positioner || this.getPosition).call(this, c.width, c.height, a);
|
2470 |
-
this.move(u(c.x), u(c.y), a.plotX + b.plotLeft, a.plotY + b.plotTop)
|
2471 |
-
}, tooltipHeaderFormatter: function (a) {
|
2472 |
-
var b = a.series, c = b.tooltipOptions, d = c.dateTimeLabelFormats, e = c.xDateFormat, f = b.xAxis, g = f && f.options.type === "datetime" && ha(a.key), c = c.headerFormat, f = f && f.closestPointRange, h;
|
2473 |
-
if (g && !e) {
|
2474 |
-
if (f)for (h in A) {
|
2475 |
-
if (A[h] >= f || A[h] <= A.day && a.key % A[h] > 0) {
|
2476 |
-
e = d[h];
|
2477 |
-
break
|
2478 |
-
}
|
2479 |
-
} else e = d.day;
|
2480 |
-
e = e || d.year
|
2481 |
-
}
|
2482 |
-
g && e && (c = c.replace("{point.key}", "{point.key:" +
|
2483 |
-
e + "}"));
|
2484 |
-
return Ia(c, {point: a, series: b})
|
2485 |
-
}
|
2486 |
-
};
|
2487 |
-
var oa;
|
2488 |
-
$a = y.documentElement.ontouchstart !== t;
|
2489 |
-
var Wa = R.Pointer = function (a, b) {
|
2490 |
-
this.init(a, b)
|
2491 |
-
};
|
2492 |
-
Wa.prototype = {
|
2493 |
-
init: function (a, b) {
|
2494 |
-
var c = b.chart, d = c.events, e = fa ? "" : c.zoomType, c = a.inverted, f;
|
2495 |
-
this.options = b;
|
2496 |
-
this.chart = a;
|
2497 |
-
this.zoomX = f = /x/.test(e);
|
2498 |
-
this.zoomY = e = /y/.test(e);
|
2499 |
-
this.zoomHor = f && !c || e && c;
|
2500 |
-
this.zoomVert = e && !c || f && c;
|
2501 |
-
this.hasZoom = f || e;
|
2502 |
-
this.runChartClick = d && !!d.click;
|
2503 |
-
this.pinchDown = [];
|
2504 |
-
this.lastValidTouch = {};
|
2505 |
-
if (R.Tooltip && b.tooltip.enabled)a.tooltip = new Mb(a, b.tooltip),
|
2506 |
-
this.followTouchMove = b.tooltip.followTouchMove;
|
2507 |
-
this.setDOMEvents()
|
2508 |
-
}, normalize: function (a, b) {
|
2509 |
-
var c, d, a = a || window.event, a = Sb(a);
|
2510 |
-
if (!a.target)a.target = a.srcElement;
|
2511 |
-
d = a.touches ? a.touches.length ? a.touches.item(0) : a.changedTouches[0] : a;
|
2512 |
-
if (!b)this.chartPosition = b = Rb(this.chart.container);
|
2513 |
-
d.pageX === t ? (c = v(a.x, a.clientX - b.left), d = a.y) : (c = d.pageX - b.left, d = d.pageY - b.top);
|
2514 |
-
return q(a, {chartX: u(c), chartY: u(d)})
|
2515 |
-
}, getCoordinates: function (a) {
|
2516 |
-
var b = {xAxis: [], yAxis: []};
|
2517 |
-
p(this.chart.axes, function (c) {
|
2518 |
-
b[c.isXAxis ? "xAxis" :
|
2519 |
-
"yAxis"].push({axis: c, value: c.toValue(a[c.horiz ? "chartX" : "chartY"])})
|
2520 |
-
});
|
2521 |
-
return b
|
2522 |
-
}, getIndex: function (a) {
|
2523 |
-
var b = this.chart;
|
2524 |
-
return b.inverted ? b.plotHeight + b.plotTop - a.chartY : a.chartX - b.plotLeft
|
2525 |
-
}, runPointActions: function (a) {
|
2526 |
-
var b = this.chart, c = b.series, d = b.tooltip, e, f, g = b.hoverPoint, h = b.hoverSeries, i, j, k = b.chartWidth, l = this.getIndex(a);
|
2527 |
-
if (d && this.options.tooltip.shared && (!h || !h.noSharedTooltip)) {
|
2528 |
-
f = [];
|
2529 |
-
i = c.length;
|
2530 |
-
for (j = 0; j < i; j++)if (c[j].visible && c[j].options.enableMouseTracking !== !1 && !c[j].noSharedTooltip &&
|
2531 |
-
c[j].singularTooltips !== !0 && c[j].tooltipPoints.length && (e = c[j].tooltipPoints[l]) && e.series)e._dist = M(l - e.clientX), k = C(k, e._dist), f.push(e);
|
2532 |
-
for (i = f.length; i--;)f[i]._dist > k && f.splice(i, 1);
|
2533 |
-
if (f.length && f[0].clientX !== this.hoverX)d.refresh(f, a), this.hoverX = f[0].clientX
|
2534 |
-
}
|
2535 |
-
c = h && h.tooltipOptions.followPointer;
|
2536 |
-
if (h && h.tracker && !c) {
|
2537 |
-
if ((e = h.tooltipPoints[l]) && e !== g)e.onMouseOver(a)
|
2538 |
-
} else d && c && !d.isHidden && (h = d.getAnchor([{}], a), d.updatePosition({plotX: h[0], plotY: h[1]}));
|
2539 |
-
if (d && !this._onDocumentMouseMove)this._onDocumentMouseMove =
|
2540 |
-
function (a) {
|
2541 |
-
if (V[oa])V[oa].pointer.onDocumentMouseMove(a)
|
2542 |
-
}, K(y, "mousemove", this._onDocumentMouseMove);
|
2543 |
-
p(b.axes, function (b) {
|
2544 |
-
b.drawCrosshair(a, m(e, g))
|
2545 |
-
})
|
2546 |
-
}, reset: function (a) {
|
2547 |
-
var b = this.chart, c = b.hoverSeries, d = b.hoverPoint, e = b.tooltip, f = e && e.shared ? b.hoverPoints : d;
|
2548 |
-
(a = a && e && f) && qa(f)[0].plotX === t && (a = !1);
|
2549 |
-
if (a)e.refresh(f), d && d.setState(d.state, !0); else {
|
2550 |
-
if (d)d.onMouseOut();
|
2551 |
-
if (c)c.onMouseOut();
|
2552 |
-
e && e.hide();
|
2553 |
-
if (this._onDocumentMouseMove)W(y, "mousemove", this._onDocumentMouseMove), this._onDocumentMouseMove = null;
|
2554 |
-
p(b.axes, function (a) {
|
2555 |
-
a.hideCrosshair()
|
2556 |
-
});
|
2557 |
-
this.hoverX = null
|
2558 |
-
}
|
2559 |
-
}, scaleGroups: function (a, b) {
|
2560 |
-
var c = this.chart, d;
|
2561 |
-
p(c.series, function (e) {
|
2562 |
-
d = a || e.getPlotBox();
|
2563 |
-
e.xAxis && e.xAxis.zoomEnabled && (e.group.attr(d), e.markerGroup && (e.markerGroup.attr(d), e.markerGroup.clip(b ? c.clipRect : null)), e.dataLabelsGroup && e.dataLabelsGroup.attr(d))
|
2564 |
-
});
|
2565 |
-
c.clipRect.attr(b || c.clipBox)
|
2566 |
-
}, dragStart: function (a) {
|
2567 |
-
var b = this.chart;
|
2568 |
-
b.mouseIsDown = a.type;
|
2569 |
-
b.cancelClick = !1;
|
2570 |
-
b.mouseDownX = this.mouseDownX = a.chartX;
|
2571 |
-
b.mouseDownY = this.mouseDownY = a.chartY
|
2572 |
-
},
|
2573 |
-
drag: function (a) {
|
2574 |
-
var b = this.chart, c = b.options.chart, d = a.chartX, e = a.chartY, f = this.zoomHor, g = this.zoomVert, h = b.plotLeft, i = b.plotTop, j = b.plotWidth, k = b.plotHeight, l, o = this.mouseDownX, n = this.mouseDownY;
|
2575 |
-
d < h ? d = h : d > h + j && (d = h + j);
|
2576 |
-
e < i ? e = i : e > i + k && (e = i + k);
|
2577 |
-
this.hasDragged = Math.sqrt(Math.pow(o - d, 2) + Math.pow(n - e, 2));
|
2578 |
-
if (this.hasDragged > 10) {
|
2579 |
-
l = b.isInsidePlot(o - h, n - i);
|
2580 |
-
if (b.hasCartesianSeries && (this.zoomX || this.zoomY) && l && !this.selectionMarker)this.selectionMarker = b.renderer.rect(h, i, f ? 1 : j, g ? 1 : k, 0).attr({
|
2581 |
-
fill: c.selectionMarkerFill ||
|
2582 |
-
"rgba(69,114,167,0.25)", zIndex: 7
|
2583 |
-
}).add();
|
2584 |
-
this.selectionMarker && f && (d -= o, this.selectionMarker.attr({width: M(d), x: (d > 0 ? 0 : d) + o}));
|
2585 |
-
this.selectionMarker && g && (d = e - n, this.selectionMarker.attr({
|
2586 |
-
height: M(d),
|
2587 |
-
y: (d > 0 ? 0 : d) + n
|
2588 |
-
}));
|
2589 |
-
l && !this.selectionMarker && c.panning && b.pan(a, c.panning)
|
2590 |
-
}
|
2591 |
-
}, drop: function (a) {
|
2592 |
-
var b = this.chart, c = this.hasPinched;
|
2593 |
-
if (this.selectionMarker) {
|
2594 |
-
var d = {
|
2595 |
-
xAxis: [],
|
2596 |
-
yAxis: [],
|
2597 |
-
originalEvent: a.originalEvent || a
|
2598 |
-
}, a = this.selectionMarker, e = a.attr ? a.attr("x") : a.x, f = a.attr ? a.attr("y") : a.y, g = a.attr ? a.attr("width") :
|
2599 |
-
a.width, h = a.attr ? a.attr("height") : a.height, i;
|
2600 |
-
if (this.hasDragged || c)p(b.axes, function (a) {
|
2601 |
-
if (a.zoomEnabled) {
|
2602 |
-
var b = a.horiz, c = a.toValue(b ? e : f), b = a.toValue(b ? e + g : f + h);
|
2603 |
-
!isNaN(c) && !isNaN(b) && (d[a.coll].push({axis: a, min: C(c, b), max: v(c, b)}), i = !0)
|
2604 |
-
}
|
2605 |
-
}), i && D(b, "selection", d, function (a) {
|
2606 |
-
b.zoom(q(a, c ? {animation: !1} : null))
|
2607 |
-
});
|
2608 |
-
this.selectionMarker = this.selectionMarker.destroy();
|
2609 |
-
c && this.scaleGroups()
|
2610 |
-
}
|
2611 |
-
if (b)G(b.container, {cursor: b._cursor}), b.cancelClick = this.hasDragged > 10, b.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []
|
2612 |
-
}, onContainerMouseDown: function (a) {
|
2613 |
-
a = this.normalize(a);
|
2614 |
-
a.preventDefault && a.preventDefault();
|
2615 |
-
this.dragStart(a)
|
2616 |
-
}, onDocumentMouseUp: function (a) {
|
2617 |
-
V[oa] && V[oa].pointer.drop(a)
|
2618 |
-
}, onDocumentMouseMove: function (a) {
|
2619 |
-
var b = this.chart, c = this.chartPosition, d = b.hoverSeries, a = this.normalize(a, c);
|
2620 |
-
c && d && !this.inClass(a.target, "highcharts-tracker") && !b.isInsidePlot(a.chartX - b.plotLeft, a.chartY - b.plotTop) && this.reset()
|
2621 |
-
}, onContainerMouseLeave: function () {
|
2622 |
-
var a = V[oa];
|
2623 |
-
if (a)a.pointer.reset(), a.pointer.chartPosition =
|
2624 |
-
null
|
2625 |
-
}, onContainerMouseMove: function (a) {
|
2626 |
-
var b = this.chart;
|
2627 |
-
oa = b.index;
|
2628 |
-
a = this.normalize(a);
|
2629 |
-
b.mouseIsDown === "mousedown" && this.drag(a);
|
2630 |
-
(this.inClass(a.target, "highcharts-tracker") || b.isInsidePlot(a.chartX - b.plotLeft, a.chartY - b.plotTop)) && !b.openMenu && this.runPointActions(a)
|
2631 |
-
}, inClass: function (a, b) {
|
2632 |
-
for (var c; a;) {
|
2633 |
-
if (c = H(a, "class"))if (c.indexOf(b) !== -1)return !0; else if (c.indexOf("highcharts-container") !== -1)return !1;
|
2634 |
-
a = a.parentNode
|
2635 |
-
}
|
2636 |
-
}, onTrackerMouseOut: function (a) {
|
2637 |
-
var b = this.chart.hoverSeries, c = (a = a.relatedTarget ||
|
2638 |
-
a.toElement) && a.point && a.point.series;
|
2639 |
-
if (b && !b.options.stickyTracking && !this.inClass(a, "highcharts-tooltip") && c !== b)b.onMouseOut()
|
2640 |
-
}, onContainerClick: function (a) {
|
2641 |
-
var b = this.chart, c = b.hoverPoint, d = b.plotLeft, e = b.plotTop, a = this.normalize(a);
|
2642 |
-
a.cancelBubble = !0;
|
2643 |
-
b.cancelClick || (c && this.inClass(a.target, "highcharts-tracker") ? (D(c.series, "click", q(a, {point: c})), b.hoverPoint && c.firePointEvent("click", a)) : (q(a, this.getCoordinates(a)), b.isInsidePlot(a.chartX - d, a.chartY - e) && D(b, "click", a)))
|
2644 |
-
}, setDOMEvents: function () {
|
2645 |
-
var a =
|
2646 |
-
this, b = a.chart.container;
|
2647 |
-
b.onmousedown = function (b) {
|
2648 |
-
a.onContainerMouseDown(b)
|
2649 |
-
};
|
2650 |
-
b.onmousemove = function (b) {
|
2651 |
-
a.onContainerMouseMove(b)
|
2652 |
-
};
|
2653 |
-
b.onclick = function (b) {
|
2654 |
-
a.onContainerClick(b)
|
2655 |
-
};
|
2656 |
-
K(b, "mouseleave", a.onContainerMouseLeave);
|
2657 |
-
ab === 1 && K(y, "mouseup", a.onDocumentMouseUp);
|
2658 |
-
if ($a)b.ontouchstart = function (b) {
|
2659 |
-
a.onContainerTouchStart(b)
|
2660 |
-
}, b.ontouchmove = function (b) {
|
2661 |
-
a.onContainerTouchMove(b)
|
2662 |
-
}, ab === 1 && K(y, "touchend", a.onDocumentTouchEnd)
|
2663 |
-
}, destroy: function () {
|
2664 |
-
var a;
|
2665 |
-
W(this.chart.container, "mouseleave", this.onContainerMouseLeave);
|
2666 |
-
ab || (W(y, "mouseup", this.onDocumentMouseUp), W(y, "touchend", this.onDocumentTouchEnd));
|
2667 |
-
clearInterval(this.tooltipTimeout);
|
2668 |
-
for (a in this)this[a] = null
|
2669 |
-
}
|
2670 |
-
};
|
2671 |
-
q(R.Pointer.prototype, {
|
2672 |
-
pinchTranslate: function (a, b, c, d, e, f) {
|
2673 |
-
(this.zoomHor || this.pinchHor) && this.pinchTranslateDirection(!0, a, b, c, d, e, f);
|
2674 |
-
(this.zoomVert || this.pinchVert) && this.pinchTranslateDirection(!1, a, b, c, d, e, f)
|
2675 |
-
}, pinchTranslateDirection: function (a, b, c, d, e, f, g, h) {
|
2676 |
-
var i = this.chart, j = a ? "x" : "y", k = a ? "X" : "Y", l = "chart" + k, o = a ? "width" : "height", n = i["plot" + (a ?
|
2677 |
-
"Left" : "Top")], s, m, p = h || 1, q = i.inverted, x = i.bounds[a ? "h" : "v"], r = b.length === 1, v = b[0][l], u = c[0][l], t = !r && b[1][l], w = !r && c[1][l], y, c = function () {
|
2678 |
-
!r && M(v - t) > 20 && (p = h || M(u - w) / M(v - t));
|
2679 |
-
m = (n - u) / p + v;
|
2680 |
-
s = i["plot" + (a ? "Width" : "Height")] / p
|
2681 |
-
};
|
2682 |
-
c();
|
2683 |
-
b = m;
|
2684 |
-
b < x.min ? (b = x.min, y = !0) : b + s > x.max && (b = x.max - s, y = !0);
|
2685 |
-
y ? (u -= 0.8 * (u - g[j][0]), r || (w -= 0.8 * (w - g[j][1])), c()) : g[j] = [u, w];
|
2686 |
-
q || (f[j] = m - n, f[o] = s);
|
2687 |
-
f = q ? 1 / p : p;
|
2688 |
-
e[o] = s;
|
2689 |
-
e[j] = b;
|
2690 |
-
d[q ? a ? "scaleY" : "scaleX" : "scale" + k] = p;
|
2691 |
-
d["translate" + k] = f * n + (u - f * v)
|
2692 |
-
}, pinch: function (a) {
|
2693 |
-
var b = this, c = b.chart, d = b.pinchDown,
|
2694 |
-
e = b.followTouchMove, f = a.touches, g = f.length, h = b.lastValidTouch, i = b.hasZoom, j = b.selectionMarker, k = {}, l = g === 1 && (b.inClass(a.target, "highcharts-tracker") && c.runTrackerClick || c.runChartClick), o = {};
|
2695 |
-
(i || e) && !l && a.preventDefault();
|
2696 |
-
Ua(f, function (a) {
|
2697 |
-
return b.normalize(a)
|
2698 |
-
});
|
2699 |
-
if (a.type === "touchstart")p(f, function (a, b) {
|
2700 |
-
d[b] = {chartX: a.chartX, chartY: a.chartY}
|
2701 |
-
}), h.x = [d[0].chartX, d[1] && d[1].chartX], h.y = [d[0].chartY, d[1] && d[1].chartY], p(c.axes, function (a) {
|
2702 |
-
if (a.zoomEnabled) {
|
2703 |
-
var b = c.bounds[a.horiz ? "h" : "v"], d = a.minPixelPadding,
|
2704 |
-
e = a.toPixels(a.dataMin), f = a.toPixels(a.dataMax), g = C(e, f), e = v(e, f);
|
2705 |
-
b.min = C(a.pos, g - d);
|
2706 |
-
b.max = v(a.pos + a.len, e + d)
|
2707 |
-
}
|
2708 |
-
}); else if (d.length) {
|
2709 |
-
if (!j)b.selectionMarker = j = q({destroy: sa}, c.plotBox);
|
2710 |
-
b.pinchTranslate(d, f, k, j, o, h);
|
2711 |
-
b.hasPinched = i;
|
2712 |
-
b.scaleGroups(k, o);
|
2713 |
-
!i && e && g === 1 && this.runPointActions(b.normalize(a))
|
2714 |
-
}
|
2715 |
-
}, onContainerTouchStart: function (a) {
|
2716 |
-
var b = this.chart;
|
2717 |
-
oa = b.index;
|
2718 |
-
a.touches.length === 1 ? (a = this.normalize(a), b.isInsidePlot(a.chartX - b.plotLeft, a.chartY - b.plotTop) ? (this.runPointActions(a), this.pinch(a)) : this.reset()) :
|
2719 |
-
a.touches.length === 2 && this.pinch(a)
|
2720 |
-
}, onContainerTouchMove: function (a) {
|
2721 |
-
(a.touches.length === 1 || a.touches.length === 2) && this.pinch(a)
|
2722 |
-
}, onDocumentTouchEnd: function (a) {
|
2723 |
-
V[oa] && V[oa].pointer.drop(a)
|
2724 |
-
}
|
2725 |
-
});
|
2726 |
-
if (I.PointerEvent || I.MSPointerEvent) {
|
2727 |
-
var ua = {}, zb = !!I.PointerEvent, Wb = function () {
|
2728 |
-
var a, b = [];
|
2729 |
-
b.item = function (a) {
|
2730 |
-
return this[a]
|
2731 |
-
};
|
2732 |
-
for (a in ua)ua.hasOwnProperty(a) && b.push({pageX: ua[a].pageX, pageY: ua[a].pageY, target: ua[a].target});
|
2733 |
-
return b
|
2734 |
-
}, Ab = function (a, b, c, d) {
|
2735 |
-
a = a.originalEvent || a;
|
2736 |
-
if ((a.pointerType === "touch" ||
|
2737 |
-
a.pointerType === a.MSPOINTER_TYPE_TOUCH) && V[oa])d(a), d = V[oa].pointer, d[b]({
|
2738 |
-
type: c,
|
2739 |
-
target: a.currentTarget,
|
2740 |
-
preventDefault: sa,
|
2741 |
-
touches: Wb()
|
2742 |
-
})
|
2743 |
-
};
|
2744 |
-
q(Wa.prototype, {
|
2745 |
-
onContainerPointerDown: function (a) {
|
2746 |
-
Ab(a, "onContainerTouchStart", "touchstart", function (a) {
|
2747 |
-
ua[a.pointerId] = {pageX: a.pageX, pageY: a.pageY, target: a.currentTarget}
|
2748 |
-
})
|
2749 |
-
}, onContainerPointerMove: function (a) {
|
2750 |
-
Ab(a, "onContainerTouchMove", "touchmove", function (a) {
|
2751 |
-
ua[a.pointerId] = {pageX: a.pageX, pageY: a.pageY};
|
2752 |
-
if (!ua[a.pointerId].target)ua[a.pointerId].target = a.currentTarget
|
2753 |
-
})
|
2754 |
-
},
|
2755 |
-
onDocumentPointerUp: function (a) {
|
2756 |
-
Ab(a, "onContainerTouchEnd", "touchend", function (a) {
|
2757 |
-
delete ua[a.pointerId]
|
2758 |
-
})
|
2759 |
-
}, batchMSEvents: function (a) {
|
2760 |
-
a(this.chart.container, zb ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown);
|
2761 |
-
a(this.chart.container, zb ? "pointermove" : "MSPointerMove", this.onContainerPointerMove);
|
2762 |
-
a(y, zb ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp)
|
2763 |
-
}
|
2764 |
-
});
|
2765 |
-
Ma(Wa.prototype, "init", function (a, b, c) {
|
2766 |
-
a.call(this, b, c);
|
2767 |
-
(this.hasZoom || this.followTouchMove) && G(b.container, {"-ms-touch-action": Q, "touch-action": Q})
|
2768 |
-
});
|
2769 |
-
Ma(Wa.prototype, "setDOMEvents", function (a) {
|
2770 |
-
a.apply(this);
|
2771 |
-
(this.hasZoom || this.followTouchMove) && this.batchMSEvents(K)
|
2772 |
-
});
|
2773 |
-
Ma(Wa.prototype, "destroy", function (a) {
|
2774 |
-
this.batchMSEvents(W);
|
2775 |
-
a.call(this)
|
2776 |
-
})
|
2777 |
-
}
|
2778 |
-
var lb = R.Legend = function (a, b) {
|
2779 |
-
this.init(a, b)
|
2780 |
-
};
|
2781 |
-
lb.prototype = {
|
2782 |
-
init: function (a, b) {
|
2783 |
-
var c = this, d = b.itemStyle, e = m(b.padding, 8), f = b.itemMarginTop || 0;
|
2784 |
-
this.options = b;
|
2785 |
-
if (b.enabled)c.baseline = z(d.fontSize) + 3 + f, c.itemStyle = d, c.itemHiddenStyle = w(d, b.itemHiddenStyle), c.itemMarginTop = f, c.padding = e, c.initialItemX = e, c.initialItemY =
|
2786 |
-
e - 5, c.maxItemWidth = 0, c.chart = a, c.itemHeight = 0, c.lastLineHeight = 0, c.symbolWidth = m(b.symbolWidth, 16), c.pages = [], c.render(), K(c.chart, "endResize", function () {
|
2787 |
-
c.positionCheckboxes()
|
2788 |
-
})
|
2789 |
-
}, colorizeItem: function (a, b) {
|
2790 |
-
var c = this.options, d = a.legendItem, e = a.legendLine, f = a.legendSymbol, g = this.itemHiddenStyle.color, c = b ? c.itemStyle.color : g, h = b ? a.legendColor || a.color || "#CCC" : g, g = a.options && a.options.marker, i = {fill: h}, j;
|
2791 |
-
d && d.css({fill: c, color: c});
|
2792 |
-
e && e.attr({stroke: h});
|
2793 |
-
if (f) {
|
2794 |
-
if (g && f.isMarker)for (j in i.stroke = h, g = a.convertAttribs(g),
|
2795 |
-
g)d = g[j], d !== t && (i[j] = d);
|
2796 |
-
f.attr(i)
|
2797 |
-
}
|
2798 |
-
}, positionItem: function (a) {
|
2799 |
-
var b = this.options, c = b.symbolPadding, b = !b.rtl, d = a._legendItemPos, e = d[0], d = d[1], f = a.checkbox;
|
2800 |
-
a.legendGroup && a.legendGroup.translate(b ? e : this.legendWidth - e - 2 * c - 4, d);
|
2801 |
-
if (f)f.x = e, f.y = d
|
2802 |
-
}, destroyItem: function (a) {
|
2803 |
-
var b = a.checkbox;
|
2804 |
-
p(["legendItem", "legendLine", "legendSymbol", "legendGroup"], function (b) {
|
2805 |
-
a[b] && (a[b] = a[b].destroy())
|
2806 |
-
});
|
2807 |
-
b && Pa(a.checkbox)
|
2808 |
-
}, destroy: function () {
|
2809 |
-
var a = this.group, b = this.box;
|
2810 |
-
if (b)this.box = b.destroy();
|
2811 |
-
if (a)this.group = a.destroy()
|
2812 |
-
},
|
2813 |
-
positionCheckboxes: function (a) {
|
2814 |
-
var b = this.group.alignAttr, c, d = this.clipHeight || this.legendHeight;
|
2815 |
-
if (b)c = b.translateY, p(this.allItems, function (e) {
|
2816 |
-
var f = e.checkbox, g;
|
2817 |
-
f && (g = c + f.y + (a || 0) + 3, G(f, {
|
2818 |
-
left: b.translateX + e.checkboxOffset + f.x - 20 + "px",
|
2819 |
-
top: g + "px",
|
2820 |
-
display: g > c - 6 && g < c + d - 6 ? "" : Q
|
2821 |
-
}))
|
2822 |
-
})
|
2823 |
-
}, renderTitle: function () {
|
2824 |
-
var a = this.padding, b = this.options.title, c = 0;
|
2825 |
-
if (b.text) {
|
2826 |
-
if (!this.title)this.title = this.chart.renderer.label(b.text, a - 3, a - 4, null, null, null, null, null, "legend-title").attr({zIndex: 1}).css(b.style).add(this.group);
|
2827 |
-
a = this.title.getBBox();
|
2828 |
-
c = a.height;
|
2829 |
-
this.offsetWidth = a.width;
|
2830 |
-
this.contentGroup.attr({translateY: c})
|
2831 |
-
}
|
2832 |
-
this.titleHeight = c
|
2833 |
-
}, renderItem: function (a) {
|
2834 |
-
var b = this.chart, c = b.renderer, d = this.options, e = d.layout === "horizontal", f = this.symbolWidth, g = d.symbolPadding, h = this.itemStyle, i = this.itemHiddenStyle, j = this.padding, k = e ? m(d.itemDistance, 20) : 0, l = !d.rtl, o = d.width, n = d.itemMarginBottom || 0, s = this.itemMarginTop, p = this.initialItemX, q = a.legendItem, r = a.series && a.series.drawLegendSymbol ? a.series : a, x = r.options, x = this.createCheckboxForItem &&
|
2835 |
-
x && x.showCheckbox, t = d.useHTML;
|
2836 |
-
if (!q)a.legendGroup = c.g("legend-item").attr({zIndex: 1}).add(this.scrollGroup), r.drawLegendSymbol(this, a), a.legendItem = q = c.text(d.labelFormat ? Ia(d.labelFormat, a) : d.labelFormatter.call(a), l ? f + g : -g, this.baseline, t).css(w(a.visible ? h : i)).attr({
|
2837 |
-
align: l ? "left" : "right",
|
2838 |
-
zIndex: 2
|
2839 |
-
}).add(a.legendGroup), this.setItemEvents && this.setItemEvents(a, q, t, h, i), this.colorizeItem(a, a.visible), x && this.createCheckboxForItem(a);
|
2840 |
-
c = q.getBBox();
|
2841 |
-
f = a.checkboxOffset = d.itemWidth || a.legendItemWidth ||
|
2842 |
-
f + g + c.width + k + (x ? 20 : 0);
|
2843 |
-
this.itemHeight = g = u(a.legendItemHeight || c.height);
|
2844 |
-
if (e && this.itemX - p + f > (o || b.chartWidth - 2 * j - p - d.x))this.itemX = p, this.itemY += s + this.lastLineHeight + n, this.lastLineHeight = 0;
|
2845 |
-
this.maxItemWidth = v(this.maxItemWidth, f);
|
2846 |
-
this.lastItemY = s + this.itemY + n;
|
2847 |
-
this.lastLineHeight = v(g, this.lastLineHeight);
|
2848 |
-
a._legendItemPos = [this.itemX, this.itemY];
|
2849 |
-
e ? this.itemX += f : (this.itemY += s + g + n, this.lastLineHeight = g);
|
2850 |
-
this.offsetWidth = o || v((e ? this.itemX - p - k : f) + j, this.offsetWidth)
|
2851 |
-
}, getAllItems: function () {
|
2852 |
-
var a =
|
2853 |
-
[];
|
2854 |
-
p(this.chart.series, function (b) {
|
2855 |
-
var c = b.options;
|
2856 |
-
if (m(c.showInLegend, !r(c.linkedTo) ? t : !1, !0))a = a.concat(b.legendItems || (c.legendType === "point" ? b.data : b))
|
2857 |
-
});
|
2858 |
-
return a
|
2859 |
-
}, render: function () {
|
2860 |
-
var a = this, b = a.chart, c = b.renderer, d = a.group, e, f, g, h, i = a.box, j = a.options, k = a.padding, l = j.borderWidth, o = j.backgroundColor;
|
2861 |
-
a.itemX = a.initialItemX;
|
2862 |
-
a.itemY = a.initialItemY;
|
2863 |
-
a.offsetWidth = 0;
|
2864 |
-
a.lastItemY = 0;
|
2865 |
-
if (!d)a.group = d = c.g("legend").attr({zIndex: 7}).add(), a.contentGroup = c.g().attr({zIndex: 1}).add(d), a.scrollGroup = c.g().add(a.contentGroup);
|
2866 |
-
a.renderTitle();
|
2867 |
-
e = a.getAllItems();
|
2868 |
-
ob(e, function (a, b) {
|
2869 |
-
return (a.options && a.options.legendIndex || 0) - (b.options && b.options.legendIndex || 0)
|
2870 |
-
});
|
2871 |
-
j.reversed && e.reverse();
|
2872 |
-
a.allItems = e;
|
2873 |
-
a.display = f = !!e.length;
|
2874 |
-
p(e, function (b) {
|
2875 |
-
a.renderItem(b)
|
2876 |
-
});
|
2877 |
-
g = j.width || a.offsetWidth;
|
2878 |
-
h = a.lastItemY + a.lastLineHeight + a.titleHeight;
|
2879 |
-
h = a.handleOverflow(h);
|
2880 |
-
if (l || o) {
|
2881 |
-
g += k;
|
2882 |
-
h += k;
|
2883 |
-
if (i) {
|
2884 |
-
if (g > 0 && h > 0)i[i.isNew ? "attr" : "animate"](i.crisp({width: g, height: h})), i.isNew = !1
|
2885 |
-
} else a.box = i = c.rect(0, 0, g, h, j.borderRadius, l || 0).attr({
|
2886 |
-
stroke: j.borderColor,
|
2887 |
-
"stroke-width": l || 0, fill: o || Q
|
2888 |
-
}).add(d).shadow(j.shadow), i.isNew = !0;
|
2889 |
-
i[f ? "show" : "hide"]()
|
2890 |
-
}
|
2891 |
-
a.legendWidth = g;
|
2892 |
-
a.legendHeight = h;
|
2893 |
-
p(e, function (b) {
|
2894 |
-
a.positionItem(b)
|
2895 |
-
});
|
2896 |
-
f && d.align(q({width: g, height: h}, j), !0, "spacingBox");
|
2897 |
-
b.isResizing || this.positionCheckboxes()
|
2898 |
-
}, handleOverflow: function (a) {
|
2899 |
-
var b = this, c = this.chart, d = c.renderer, e = this.options, f = e.y, f = c.spacingBox.height + (e.verticalAlign === "top" ? -f : f) - this.padding, g = e.maxHeight, h, i = this.clipRect, j = e.navigation, k = m(j.animation, !0), l = j.arrowSize || 12, o = this.nav, n = this.pages,
|
2900 |
-
s, q = this.allItems;
|
2901 |
-
e.layout === "horizontal" && (f /= 2);
|
2902 |
-
g && (f = C(f, g));
|
2903 |
-
n.length = 0;
|
2904 |
-
if (a > f && !e.useHTML) {
|
2905 |
-
this.clipHeight = h = f - 20 - this.titleHeight - this.padding;
|
2906 |
-
this.currentPage = m(this.currentPage, 1);
|
2907 |
-
this.fullHeight = a;
|
2908 |
-
p(q, function (a, b) {
|
2909 |
-
var c = a._legendItemPos[1], d = u(a.legendItem.getBBox().height), e = n.length;
|
2910 |
-
if (!e || c - n[e - 1] > h && (s || c) !== n[e - 1])n.push(s || c), e++;
|
2911 |
-
b === q.length - 1 && c + d - n[e - 1] > h && n.push(c);
|
2912 |
-
c !== s && (s = c)
|
2913 |
-
});
|
2914 |
-
if (!i)i = b.clipRect = d.clipRect(0, this.padding, 9999, 0), b.contentGroup.clip(i);
|
2915 |
-
i.attr({height: h});
|
2916 |
-
if (!o)this.nav =
|
2917 |
-
o = d.g().attr({zIndex: 1}).add(this.group), this.up = d.symbol("triangle", 0, 0, l, l).on("click", function () {
|
2918 |
-
b.scroll(-1, k)
|
2919 |
-
}).add(o), this.pager = d.text("", 15, 10).css(j.style).add(o), this.down = d.symbol("triangle-down", 0, 0, l, l).on("click", function () {
|
2920 |
-
b.scroll(1, k)
|
2921 |
-
}).add(o);
|
2922 |
-
b.scroll(0);
|
2923 |
-
a = f
|
2924 |
-
} else if (o)i.attr({height: c.chartHeight}), o.hide(), this.scrollGroup.attr({translateY: 1}), this.clipHeight = 0;
|
2925 |
-
return a
|
2926 |
-
}, scroll: function (a, b) {
|
2927 |
-
var c = this.pages, d = c.length, e = this.currentPage + a, f = this.clipHeight, g = this.options.navigation,
|
2928 |
-
h = g.activeColor, g = g.inactiveColor, i = this.pager, j = this.padding;
|
2929 |
-
e > d && (e = d);
|
2930 |
-
if (e > 0)b !== t && Qa(b, this.chart), this.nav.attr({
|
2931 |
-
translateX: j,
|
2932 |
-
translateY: f + this.padding + 7 + this.titleHeight,
|
2933 |
-
visibility: "visible"
|
2934 |
-
}), this.up.attr({fill: e === 1 ? g : h}).css({cursor: e === 1 ? "default" : "pointer"}), i.attr({text: e + "/" + d}), this.down.attr({
|
2935 |
-
x: 18 + this.pager.getBBox().width,
|
2936 |
-
fill: e === d ? g : h
|
2937 |
-
}).css({cursor: e === d ? "default" : "pointer"}), c = -c[e - 1] + this.initialItemY, this.scrollGroup.animate({translateY: c}), this.currentPage = e, this.positionCheckboxes(c)
|
2938 |
-
}
|
2939 |
-
};
|
2940 |
-
N = R.LegendSymbolMixin = {
|
2941 |
-
drawRectangle: function (a, b) {
|
2942 |
-
var c = a.options.symbolHeight || 12;
|
2943 |
-
b.legendSymbol = this.chart.renderer.rect(0, a.baseline - 5 - c / 2, a.symbolWidth, c, a.options.symbolRadius || 0).attr({zIndex: 3}).add(b.legendGroup)
|
2944 |
-
}, drawLineMarker: function (a) {
|
2945 |
-
var b = this.options, c = b.marker, d;
|
2946 |
-
d = a.symbolWidth;
|
2947 |
-
var e = this.chart.renderer, f = this.legendGroup, a = a.baseline - u(e.fontMetrics(a.options.itemStyle.fontSize).b * 0.3), g;
|
2948 |
-
if (b.lineWidth) {
|
2949 |
-
g = {"stroke-width": b.lineWidth};
|
2950 |
-
if (b.dashStyle)g.dashstyle = b.dashStyle;
|
2951 |
-
this.legendLine =
|
2952 |
-
e.path(["M", 0, a, "L", d, a]).attr(g).add(f)
|
2953 |
-
}
|
2954 |
-
if (c && c.enabled !== !1)b = c.radius, this.legendSymbol = d = e.symbol(this.symbol, d / 2 - b, a - b, 2 * b, 2 * b).add(f), d.isMarker = !0
|
2955 |
-
}
|
2956 |
-
};
|
2957 |
-
(/Trident\/7\.0/.test(wa) || Ta) && Ma(lb.prototype, "positionItem", function (a, b) {
|
2958 |
-
var c = this, d = function () {
|
2959 |
-
b._legendItemPos && a.call(c, b)
|
2960 |
-
};
|
2961 |
-
d();
|
2962 |
-
setTimeout(d)
|
2963 |
-
});
|
2964 |
-
Ya.prototype = {
|
2965 |
-
init: function (a, b) {
|
2966 |
-
var c, d = a.series;
|
2967 |
-
a.series = null;
|
2968 |
-
c = w(E, a);
|
2969 |
-
c.series = a.series = d;
|
2970 |
-
this.userOptions = a;
|
2971 |
-
d = c.chart;
|
2972 |
-
this.margin = this.splashArray("margin", d);
|
2973 |
-
this.spacing = this.splashArray("spacing",
|
2974 |
-
d);
|
2975 |
-
var e = d.events;
|
2976 |
-
this.bounds = {h: {}, v: {}};
|
2977 |
-
this.callback = b;
|
2978 |
-
this.isResizing = 0;
|
2979 |
-
this.options = c;
|
2980 |
-
this.axes = [];
|
2981 |
-
this.series = [];
|
2982 |
-
this.hasCartesianSeries = d.showAxes;
|
2983 |
-
var f = this, g;
|
2984 |
-
f.index = V.length;
|
2985 |
-
V.push(f);
|
2986 |
-
ab++;
|
2987 |
-
d.reflow !== !1 && K(f, "load", function () {
|
2988 |
-
f.initReflow()
|
2989 |
-
});
|
2990 |
-
if (e)for (g in e)K(f, g, e[g]);
|
2991 |
-
f.xAxis = [];
|
2992 |
-
f.yAxis = [];
|
2993 |
-
f.animation = fa ? !1 : m(d.animation, !0);
|
2994 |
-
f.pointCount = 0;
|
2995 |
-
f.counters = new Bb;
|
2996 |
-
f.firstRender()
|
2997 |
-
}, initSeries: function (a) {
|
2998 |
-
var b = this.options.chart;
|
2999 |
-
(b = F[a.type || b.type || b.defaultSeriesType]) || ra(17, !0);
|
3000 |
-
b = new b;
|
3001 |
-
b.init(this,
|
3002 |
-
a);
|
3003 |
-
return b
|
3004 |
-
}, isInsidePlot: function (a, b, c) {
|
3005 |
-
var d = c ? b : a, a = c ? a : b;
|
3006 |
-
return d >= 0 && d <= this.plotWidth && a >= 0 && a <= this.plotHeight
|
3007 |
-
}, adjustTickAmounts: function () {
|
3008 |
-
this.options.chart.alignTicks !== !1 && p(this.axes, function (a) {
|
3009 |
-
a.adjustTickAmount()
|
3010 |
-
});
|
3011 |
-
this.maxTicks = null
|
3012 |
-
}, redraw: function (a) {
|
3013 |
-
var b = this.axes, c = this.series, d = this.pointer, e = this.legend, f = this.isDirtyLegend, g, h, i = this.isDirtyBox, j = c.length, k = j, l = this.renderer, o = l.isHidden(), n = [];
|
3014 |
-
Qa(a, this);
|
3015 |
-
o && this.cloneRenderTo();
|
3016 |
-
for (this.layOutTitles(); k--;)if (a = c[k], a.options.stacking &&
|
3017 |
-
(g = !0, a.isDirty)) {
|
3018 |
-
h = !0;
|
3019 |
-
break
|
3020 |
-
}
|
3021 |
-
if (h)for (k = j; k--;)if (a = c[k], a.options.stacking)a.isDirty = !0;
|
3022 |
-
p(c, function (a) {
|
3023 |
-
a.isDirty && a.options.legendType === "point" && (f = !0)
|
3024 |
-
});
|
3025 |
-
if (f && e.options.enabled)e.render(), this.isDirtyLegend = !1;
|
3026 |
-
g && this.getStacks();
|
3027 |
-
if (this.hasCartesianSeries) {
|
3028 |
-
if (!this.isResizing)this.maxTicks = null, p(b, function (a) {
|
3029 |
-
a.setScale()
|
3030 |
-
});
|
3031 |
-
this.adjustTickAmounts();
|
3032 |
-
this.getMargins();
|
3033 |
-
p(b, function (a) {
|
3034 |
-
a.isDirty && (i = !0)
|
3035 |
-
});
|
3036 |
-
p(b, function (a) {
|
3037 |
-
if (a.isDirtyExtremes)a.isDirtyExtremes = !1, n.push(function () {
|
3038 |
-
D(a, "afterSetExtremes",
|
3039 |
-
q(a.eventArgs, a.getExtremes()));
|
3040 |
-
delete a.eventArgs
|
3041 |
-
});
|
3042 |
-
(i || g) && a.redraw()
|
3043 |
-
})
|
3044 |
-
}
|
3045 |
-
i && this.drawChartBox();
|
3046 |
-
p(c, function (a) {
|
3047 |
-
a.isDirty && a.visible && (!a.isCartesian || a.xAxis) && a.redraw()
|
3048 |
-
});
|
3049 |
-
d && d.reset(!0);
|
3050 |
-
l.draw();
|
3051 |
-
D(this, "redraw");
|
3052 |
-
o && this.cloneRenderTo(!0);
|
3053 |
-
p(n, function (a) {
|
3054 |
-
a.call()
|
3055 |
-
})
|
3056 |
-
}, get: function (a) {
|
3057 |
-
var b = this.axes, c = this.series, d, e;
|
3058 |
-
for (d = 0; d < b.length; d++)if (b[d].options.id === a)return b[d];
|
3059 |
-
for (d = 0; d < c.length; d++)if (c[d].options.id === a)return c[d];
|
3060 |
-
for (d = 0; d < c.length; d++) {
|
3061 |
-
e = c[d].points || [];
|
3062 |
-
for (b = 0; b < e.length; b++)if (e[b].id ===
|
3063 |
-
a)return e[b]
|
3064 |
-
}
|
3065 |
-
return null
|
3066 |
-
}, getAxes: function () {
|
3067 |
-
var a = this, b = this.options, c = b.xAxis = qa(b.xAxis || {}), b = b.yAxis = qa(b.yAxis || {});
|
3068 |
-
p(c, function (a, b) {
|
3069 |
-
a.index = b;
|
3070 |
-
a.isX = !0
|
3071 |
-
});
|
3072 |
-
p(b, function (a, b) {
|
3073 |
-
a.index = b
|
3074 |
-
});
|
3075 |
-
c = c.concat(b);
|
3076 |
-
p(c, function (b) {
|
3077 |
-
new la(a, b)
|
3078 |
-
});
|
3079 |
-
a.adjustTickAmounts()
|
3080 |
-
}, getSelectedPoints: function () {
|
3081 |
-
var a = [];
|
3082 |
-
p(this.series, function (b) {
|
3083 |
-
a = a.concat(vb(b.points || [], function (a) {
|
3084 |
-
return a.selected
|
3085 |
-
}))
|
3086 |
-
});
|
3087 |
-
return a
|
3088 |
-
}, getSelectedSeries: function () {
|
3089 |
-
return vb(this.series, function (a) {
|
3090 |
-
return a.selected
|
3091 |
-
})
|
3092 |
-
}, getStacks: function () {
|
3093 |
-
var a =
|
3094 |
-
this;
|
3095 |
-
p(a.yAxis, function (a) {
|
3096 |
-
if (a.stacks && a.hasVisibleSeries)a.oldStacks = a.stacks
|
3097 |
-
});
|
3098 |
-
p(a.series, function (b) {
|
3099 |
-
if (b.options.stacking && (b.visible === !0 || a.options.chart.ignoreHiddenSeries === !1))b.stackKey = b.type + m(b.options.stack, "")
|
3100 |
-
})
|
3101 |
-
}, setTitle: function (a, b, c) {
|
3102 |
-
var g;
|
3103 |
-
var d = this, e = d.options, f;
|
3104 |
-
f = e.title = w(e.title, a);
|
3105 |
-
g = e.subtitle = w(e.subtitle, b), e = g;
|
3106 |
-
p([["title", a, f], ["subtitle", b, e]], function (a) {
|
3107 |
-
var b = a[0], c = d[b], e = a[1], a = a[2];
|
3108 |
-
c && e && (d[b] = c = c.destroy());
|
3109 |
-
a && a.text && !c && (d[b] = d.renderer.text(a.text, 0, 0, a.useHTML).attr({
|
3110 |
-
align: a.align,
|
3111 |
-
"class": "highcharts-" + b, zIndex: a.zIndex || 4
|
3112 |
-
}).css(a.style).add())
|
3113 |
-
});
|
3114 |
-
d.layOutTitles(c)
|
3115 |
-
}, layOutTitles: function (a) {
|
3116 |
-
var b = 0, c = this.title, d = this.subtitle, e = this.options, f = e.title, e = e.subtitle, g = this.spacingBox.width - 44;
|
3117 |
-
if (c && (c.css({width: (f.width || g) + "px"}).align(q({y: 15}, f), !1, "spacingBox"), !f.floating && !f.verticalAlign))b = c.getBBox().height;
|
3118 |
-
d && (d.css({width: (e.width || g) + "px"}).align(q({y: b + f.margin}, e), !1, "spacingBox"), !e.floating && !e.verticalAlign && (b = Ka(b + d.getBBox().height)));
|
3119 |
-
c = this.titleOffset !==
|
3120 |
-
b;
|
3121 |
-
this.titleOffset = b;
|
3122 |
-
if (!this.isDirtyBox && c)this.isDirtyBox = c, this.hasRendered && m(a, !0) && this.isDirtyBox && this.redraw()
|
3123 |
-
}, getChartSize: function () {
|
3124 |
-
var a = this.options.chart, b = a.width, a = a.height, c = this.renderToClone || this.renderTo;
|
3125 |
-
if (!r(b))this.containerWidth = jb(c, "width");
|
3126 |
-
if (!r(a))this.containerHeight = jb(c, "height");
|
3127 |
-
this.chartWidth = v(0, b || this.containerWidth || 600);
|
3128 |
-
this.chartHeight = v(0, m(a, this.containerHeight > 19 ? this.containerHeight : 400))
|
3129 |
-
}, cloneRenderTo: function (a) {
|
3130 |
-
var b = this.renderToClone, c = this.container;
|
3131 |
-
a ? b && (this.renderTo.appendChild(c), Pa(b), delete this.renderToClone) : (c && c.parentNode === this.renderTo && this.renderTo.removeChild(c), this.renderToClone = b = this.renderTo.cloneNode(0), G(b, {
|
3132 |
-
position: "absolute",
|
3133 |
-
top: "-9999px",
|
3134 |
-
display: "block"
|
3135 |
-
}), b.style.setProperty && b.style.setProperty("display", "block", "important"), y.body.appendChild(b), c && b.appendChild(c))
|
3136 |
-
}, getContainer: function () {
|
3137 |
-
var a, b = this.options.chart, c, d, e;
|
3138 |
-
this.renderTo = a = b.renderTo;
|
3139 |
-
e = "highcharts-" + tb++;
|
3140 |
-
if (Fa(a))this.renderTo = a = y.getElementById(a);
|
3141 |
-
a || ra(13, !0);
|
3142 |
-
c = z(H(a, "data-highcharts-chart"));
|
3143 |
-
!isNaN(c) && V[c] && V[c].hasRendered && V[c].destroy();
|
3144 |
-
H(a, "data-highcharts-chart", this.index);
|
3145 |
-
a.innerHTML = "";
|
3146 |
-
!b.skipClone && !a.offsetWidth && this.cloneRenderTo();
|
3147 |
-
this.getChartSize();
|
3148 |
-
c = this.chartWidth;
|
3149 |
-
d = this.chartHeight;
|
3150 |
-
this.container = a = Y(Ja, {
|
3151 |
-
className: "highcharts-container" + (b.className ? " " + b.className : ""),
|
3152 |
-
id: e
|
3153 |
-
}, q({
|
3154 |
-
position: "relative",
|
3155 |
-
overflow: "hidden",
|
3156 |
-
width: c + "px",
|
3157 |
-
height: d + "px",
|
3158 |
-
textAlign: "left",
|
3159 |
-
lineHeight: "normal",
|
3160 |
-
zIndex: 0,
|
3161 |
-
"-webkit-tap-highlight-color": "rgba(0,0,0,0)"
|
3162 |
-
},
|
3163 |
-
b.style), this.renderToClone || a);
|
3164 |
-
this._cursor = a.style.cursor;
|
3165 |
-
this.renderer = b.forExport ? new ta(a, c, d, b.style, !0) : new Za(a, c, d, b.style);
|
3166 |
-
fa && this.renderer.create(this, a, c, d)
|
3167 |
-
}, getMargins: function () {
|
3168 |
-
var a = this.spacing, b, c = this.legend, d = this.margin, e = this.options.legend, f = m(e.margin, 20), g = e.x, h = e.y, i = e.align, j = e.verticalAlign, k = this.titleOffset;
|
3169 |
-
this.resetMargins();
|
3170 |
-
b = this.axisOffset;
|
3171 |
-
if (k && !r(d[0]))this.plotTop = v(this.plotTop, k + this.options.title.margin + a[0]);
|
3172 |
-
if (c.display && !e.floating)if (i === "right") {
|
3173 |
-
if (!r(d[1]))this.marginRight =
|
3174 |
-
v(this.marginRight, c.legendWidth - g + f + a[1])
|
3175 |
-
} else if (i === "left") {
|
3176 |
-
if (!r(d[3]))this.plotLeft = v(this.plotLeft, c.legendWidth + g + f + a[3])
|
3177 |
-
} else if (j === "top") {
|
3178 |
-
if (!r(d[0]))this.plotTop = v(this.plotTop, c.legendHeight + h + f + a[0])
|
3179 |
-
} else if (j === "bottom" && !r(d[2]))this.marginBottom = v(this.marginBottom, c.legendHeight - h + f + a[2]);
|
3180 |
-
this.extraBottomMargin && (this.marginBottom += this.extraBottomMargin);
|
3181 |
-
this.extraTopMargin && (this.plotTop += this.extraTopMargin);
|
3182 |
-
this.hasCartesianSeries && p(this.axes, function (a) {
|
3183 |
-
a.getOffset()
|
3184 |
-
});
|
3185 |
-
r(d[3]) ||
|
3186 |
-
(this.plotLeft += b[3]);
|
3187 |
-
r(d[0]) || (this.plotTop += b[0]);
|
3188 |
-
r(d[2]) || (this.marginBottom += b[2]);
|
3189 |
-
r(d[1]) || (this.marginRight += b[1]);
|
3190 |
-
this.setChartSize()
|
3191 |
-
}, reflow: function (a) {
|
3192 |
-
var b = this, c = b.options.chart, d = b.renderTo, e = c.width || jb(d, "width"), f = c.height || jb(d, "height"), c = a ? a.target : I, d = function () {
|
3193 |
-
if (b.container)b.setSize(e, f, !1), b.hasUserSize = null
|
3194 |
-
};
|
3195 |
-
if (!b.hasUserSize && e && f && (c === I || c === y)) {
|
3196 |
-
if (e !== b.containerWidth || f !== b.containerHeight)clearTimeout(b.reflowTimeout), a ? b.reflowTimeout = setTimeout(d, 100) : d();
|
3197 |
-
b.containerWidth =
|
3198 |
-
e;
|
3199 |
-
b.containerHeight = f
|
3200 |
-
}
|
3201 |
-
}, initReflow: function () {
|
3202 |
-
var a = this, b = function (b) {
|
3203 |
-
a.reflow(b)
|
3204 |
-
};
|
3205 |
-
K(I, "resize", b);
|
3206 |
-
K(a, "destroy", function () {
|
3207 |
-
W(I, "resize", b)
|
3208 |
-
})
|
3209 |
-
}, setSize: function (a, b, c) {
|
3210 |
-
var d = this, e, f, g;
|
3211 |
-
d.isResizing += 1;
|
3212 |
-
g = function () {
|
3213 |
-
d && D(d, "endResize", null, function () {
|
3214 |
-
d.isResizing -= 1
|
3215 |
-
})
|
3216 |
-
};
|
3217 |
-
Qa(c, d);
|
3218 |
-
d.oldChartHeight = d.chartHeight;
|
3219 |
-
d.oldChartWidth = d.chartWidth;
|
3220 |
-
if (r(a))d.chartWidth = e = v(0, u(a)), d.hasUserSize = !!e;
|
3221 |
-
if (r(b))d.chartHeight = f = v(0, u(b));
|
3222 |
-
(va ? kb : G)(d.container, {width: e + "px", height: f + "px"}, va);
|
3223 |
-
d.setChartSize(!0);
|
3224 |
-
d.renderer.setSize(e,
|
3225 |
-
f, c);
|
3226 |
-
d.maxTicks = null;
|
3227 |
-
p(d.axes, function (a) {
|
3228 |
-
a.isDirty = !0;
|
3229 |
-
a.setScale()
|
3230 |
-
});
|
3231 |
-
p(d.series, function (a) {
|
3232 |
-
a.isDirty = !0
|
3233 |
-
});
|
3234 |
-
d.isDirtyLegend = !0;
|
3235 |
-
d.isDirtyBox = !0;
|
3236 |
-
d.layOutTitles();
|
3237 |
-
d.getMargins();
|
3238 |
-
d.redraw(c);
|
3239 |
-
d.oldChartHeight = null;
|
3240 |
-
D(d, "resize");
|
3241 |
-
va === !1 ? g() : setTimeout(g, va && va.duration || 500)
|
3242 |
-
}, setChartSize: function (a) {
|
3243 |
-
var b = this.inverted, c = this.renderer, d = this.chartWidth, e = this.chartHeight, f = this.options.chart, g = this.spacing, h = this.clipOffset, i, j, k, l;
|
3244 |
-
this.plotLeft = i = u(this.plotLeft);
|
3245 |
-
this.plotTop = j = u(this.plotTop);
|
3246 |
-
this.plotWidth =
|
3247 |
-
k = v(0, u(d - i - this.marginRight));
|
3248 |
-
this.plotHeight = l = v(0, u(e - j - this.marginBottom));
|
3249 |
-
this.plotSizeX = b ? l : k;
|
3250 |
-
this.plotSizeY = b ? k : l;
|
3251 |
-
this.plotBorderWidth = f.plotBorderWidth || 0;
|
3252 |
-
this.spacingBox = c.spacingBox = {x: g[3], y: g[0], width: d - g[3] - g[1], height: e - g[0] - g[2]};
|
3253 |
-
this.plotBox = c.plotBox = {x: i, y: j, width: k, height: l};
|
3254 |
-
d = 2 * T(this.plotBorderWidth / 2);
|
3255 |
-
b = Ka(v(d, h[3]) / 2);
|
3256 |
-
c = Ka(v(d, h[0]) / 2);
|
3257 |
-
this.clipBox = {
|
3258 |
-
x: b,
|
3259 |
-
y: c,
|
3260 |
-
width: T(this.plotSizeX - v(d, h[1]) / 2 - b),
|
3261 |
-
height: T(this.plotSizeY - v(d, h[2]) / 2 - c)
|
3262 |
-
};
|
3263 |
-
a || p(this.axes, function (a) {
|
3264 |
-
a.setAxisSize();
|
3265 |
-
a.setAxisTranslation()
|
3266 |
-
})
|
3267 |
-
}, resetMargins: function () {
|
3268 |
-
var a = this.spacing, b = this.margin;
|
3269 |
-
this.plotTop = m(b[0], a[0]);
|
3270 |
-
this.marginRight = m(b[1], a[1]);
|
3271 |
-
this.marginBottom = m(b[2], a[2]);
|
3272 |
-
this.plotLeft = m(b[3], a[3]);
|
3273 |
-
this.axisOffset = [0, 0, 0, 0];
|
3274 |
-
this.clipOffset = [0, 0, 0, 0]
|
3275 |
-
}, drawChartBox: function () {
|
3276 |
-
var a = this.options.chart, b = this.renderer, c = this.chartWidth, d = this.chartHeight, e = this.chartBackground, f = this.plotBackground, g = this.plotBorder, h = this.plotBGImage, i = a.borderWidth || 0, j = a.backgroundColor, k = a.plotBackgroundColor, l = a.plotBackgroundImage,
|
3277 |
-
o = a.plotBorderWidth || 0, n, s = this.plotLeft, m = this.plotTop, p = this.plotWidth, q = this.plotHeight, r = this.plotBox, v = this.clipRect, u = this.clipBox;
|
3278 |
-
n = i + (a.shadow ? 8 : 0);
|
3279 |
-
if (i || j)if (e)e.animate(e.crisp({width: c - n, height: d - n})); else {
|
3280 |
-
e = {fill: j || Q};
|
3281 |
-
if (i)e.stroke = a.borderColor, e["stroke-width"] = i;
|
3282 |
-
this.chartBackground = b.rect(n / 2, n / 2, c - n, d - n, a.borderRadius, i).attr(e).addClass("highcharts-background").add().shadow(a.shadow)
|
3283 |
-
}
|
3284 |
-
if (k)f ? f.animate(r) : this.plotBackground = b.rect(s, m, p, q, 0).attr({fill: k}).add().shadow(a.plotShadow);
|
3285 |
-
if (l)h ? h.animate(r) : this.plotBGImage = b.image(l, s, m, p, q).add();
|
3286 |
-
v ? v.animate({width: u.width, height: u.height}) : this.clipRect = b.clipRect(u);
|
3287 |
-
if (o)g ? g.animate(g.crisp({
|
3288 |
-
x: s,
|
3289 |
-
y: m,
|
3290 |
-
width: p,
|
3291 |
-
height: q
|
3292 |
-
})) : this.plotBorder = b.rect(s, m, p, q, 0, -o).attr({
|
3293 |
-
stroke: a.plotBorderColor,
|
3294 |
-
"stroke-width": o,
|
3295 |
-
fill: Q,
|
3296 |
-
zIndex: 1
|
3297 |
-
}).add();
|
3298 |
-
this.isDirtyBox = !1
|
3299 |
-
}, propFromSeries: function () {
|
3300 |
-
var a = this, b = a.options.chart, c, d = a.options.series, e, f;
|
3301 |
-
p(["inverted", "angular", "polar"], function (g) {
|
3302 |
-
c = F[b.type || b.defaultSeriesType];
|
3303 |
-
f = a[g] || b[g] || c && c.prototype[g];
|
3304 |
-
for (e = d && d.length; !f && e--;)(c = F[d[e].type]) && c.prototype[g] && (f = !0);
|
3305 |
-
a[g] = f
|
3306 |
-
})
|
3307 |
-
}, linkSeries: function () {
|
3308 |
-
var a = this, b = a.series;
|
3309 |
-
p(b, function (a) {
|
3310 |
-
a.linkedSeries.length = 0
|
3311 |
-
});
|
3312 |
-
p(b, function (b) {
|
3313 |
-
var d = b.options.linkedTo;
|
3314 |
-
if (Fa(d) && (d = d === ":previous" ? a.series[b.index - 1] : a.get(d)))d.linkedSeries.push(b), b.linkedParent = d
|
3315 |
-
})
|
3316 |
-
}, renderSeries: function () {
|
3317 |
-
p(this.series, function (a) {
|
3318 |
-
a.translate();
|
3319 |
-
a.setTooltipPoints && a.setTooltipPoints();
|
3320 |
-
a.render()
|
3321 |
-
})
|
3322 |
-
}, render: function () {
|
3323 |
-
var a = this, b = a.axes, c = a.renderer, d = a.options, e = d.labels, f =
|
3324 |
-
d.credits, g;
|
3325 |
-
a.setTitle();
|
3326 |
-
a.legend = new lb(a, d.legend);
|
3327 |
-
a.getStacks();
|
3328 |
-
p(b, function (a) {
|
3329 |
-
a.setScale()
|
3330 |
-
});
|
3331 |
-
a.getMargins();
|
3332 |
-
a.maxTicks = null;
|
3333 |
-
p(b, function (a) {
|
3334 |
-
a.setTickPositions(!0);
|
3335 |
-
a.setMaxTicks()
|
3336 |
-
});
|
3337 |
-
a.adjustTickAmounts();
|
3338 |
-
a.getMargins();
|
3339 |
-
a.drawChartBox();
|
3340 |
-
a.hasCartesianSeries && p(b, function (a) {
|
3341 |
-
a.render()
|
3342 |
-
});
|
3343 |
-
if (!a.seriesGroup)a.seriesGroup = c.g("series-group").attr({zIndex: 3}).add();
|
3344 |
-
a.renderSeries();
|
3345 |
-
e.items && p(e.items, function (b) {
|
3346 |
-
var d = q(e.style, b.style), f = z(d.left) + a.plotLeft, g = z(d.top) + a.plotTop + 12;
|
3347 |
-
delete d.left;
|
3348 |
-
delete d.top;
|
3349 |
-
c.text(b.html, f, g).attr({zIndex: 2}).css(d).add()
|
3350 |
-
});
|
3351 |
-
if (f.enabled && !a.credits)g = f.href, a.credits = c.text(f.text, 0, 0).on("click", function () {
|
3352 |
-
if (g)location.href = g
|
3353 |
-
}).attr({align: f.position.align, zIndex: 8}).css(f.style).add().align(f.position);
|
3354 |
-
a.hasRendered = !0
|
3355 |
-
}, destroy: function () {
|
3356 |
-
var a = this, b = a.axes, c = a.series, d = a.container, e, f = d && d.parentNode;
|
3357 |
-
D(a, "destroy");
|
3358 |
-
V[a.index] = t;
|
3359 |
-
ab--;
|
3360 |
-
a.renderTo.removeAttribute("data-highcharts-chart");
|
3361 |
-
W(a);
|
3362 |
-
for (e = b.length; e--;)b[e] = b[e].destroy();
|
3363 |
-
for (e = c.length; e--;)c[e] = c[e].destroy();
|
3364 |
-
p("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","), function (b) {
|
3365 |
-
var c = a[b];
|
3366 |
-
c && c.destroy && (a[b] = c.destroy())
|
3367 |
-
});
|
3368 |
-
if (d)d.innerHTML = "", W(d), f && Pa(d);
|
3369 |
-
for (e in a)delete a[e]
|
3370 |
-
}, isReadyToRender: function () {
|
3371 |
-
var a = this;
|
3372 |
-
return !aa && I == I.top && y.readyState !== "complete" || fa && !I.canvg ? (fa ? Lb.push(function () {
|
3373 |
-
a.firstRender()
|
3374 |
-
}, a.options.global.canvasToolsURL) : y.attachEvent("onreadystatechange",
|
3375 |
-
function () {
|
3376 |
-
y.detachEvent("onreadystatechange", a.firstRender);
|
3377 |
-
y.readyState === "complete" && a.firstRender()
|
3378 |
-
}), !1) : !0
|
3379 |
-
}, firstRender: function () {
|
3380 |
-
var a = this, b = a.options, c = a.callback;
|
3381 |
-
if (a.isReadyToRender()) {
|
3382 |
-
a.getContainer();
|
3383 |
-
D(a, "init");
|
3384 |
-
a.resetMargins();
|
3385 |
-
a.setChartSize();
|
3386 |
-
a.propFromSeries();
|
3387 |
-
a.getAxes();
|
3388 |
-
p(b.series || [], function (b) {
|
3389 |
-
a.initSeries(b)
|
3390 |
-
});
|
3391 |
-
a.linkSeries();
|
3392 |
-
D(a, "beforeRender");
|
3393 |
-
if (R.Pointer)a.pointer = new Wa(a, b);
|
3394 |
-
a.render();
|
3395 |
-
a.renderer.draw();
|
3396 |
-
c && c.apply(a, [a]);
|
3397 |
-
p(a.callbacks, function (b) {
|
3398 |
-
b.apply(a, [a])
|
3399 |
-
});
|
3400 |
-
a.cloneRenderTo(!0);
|
3401 |
-
D(a, "load")
|
3402 |
-
}
|
3403 |
-
}, splashArray: function (a, b) {
|
3404 |
-
var c = b[a], c = ca(c) ? c : [c, c, c, c];
|
3405 |
-
return [m(b[a + "Top"], c[0]), m(b[a + "Right"], c[1]), m(b[a + "Bottom"], c[2]), m(b[a + "Left"], c[3])]
|
3406 |
-
}
|
3407 |
-
};
|
3408 |
-
Ya.prototype.callbacks = [];
|
3409 |
-
X = R.CenteredSeriesMixin = {
|
3410 |
-
getCenter: function () {
|
3411 |
-
var a = this.options, b = this.chart, c = 2 * (a.slicedOffset || 0), d, e = b.plotWidth - 2 * c, f = b.plotHeight - 2 * c, b = a.center, a = [m(b[0], "50%"), m(b[1], "50%"), a.size || "100%", a.innerSize || 0], g = C(e, f), h;
|
3412 |
-
return Ua(a, function (a, b) {
|
3413 |
-
h = /%$/.test(a);
|
3414 |
-
d = b < 2 || b === 2 && h;
|
3415 |
-
return (h ? [e, f, g, g][b] * z(a) / 100 :
|
3416 |
-
a) + (d ? c : 0)
|
3417 |
-
})
|
3418 |
-
}
|
3419 |
-
};
|
3420 |
-
var Ea = function () {
|
3421 |
-
};
|
3422 |
-
Ea.prototype = {
|
3423 |
-
init: function (a, b, c) {
|
3424 |
-
this.series = a;
|
3425 |
-
this.applyOptions(b, c);
|
3426 |
-
this.pointAttr = {};
|
3427 |
-
if (a.options.colorByPoint && (b = a.options.colors || a.chart.options.colors, this.color = this.color || b[a.colorCounter++], a.colorCounter === b.length))a.colorCounter = 0;
|
3428 |
-
a.chart.pointCount++;
|
3429 |
-
return this
|
3430 |
-
}, applyOptions: function (a, b) {
|
3431 |
-
var c = this.series, d = c.pointValKey, a = Ea.prototype.optionsToObject.call(this, a);
|
3432 |
-
q(this, a);
|
3433 |
-
this.options = this.options ? q(this.options, a) : a;
|
3434 |
-
if (d)this.y = this[d];
|
3435 |
-
if (this.x ===
|
3436 |
-
t && c)this.x = b === t ? c.autoIncrement() : b;
|
3437 |
-
return this
|
3438 |
-
}, optionsToObject: function (a) {
|
3439 |
-
var b = {}, c = this.series, d = c.pointArrayMap || ["y"], e = d.length, f = 0, g = 0;
|
3440 |
-
if (typeof a === "number" || a === null)b[d[0]] = a; else if (La(a)) {
|
3441 |
-
if (a.length > e) {
|
3442 |
-
c = typeof a[0];
|
3443 |
-
if (c === "string")b.name = a[0]; else if (c === "number")b.x = a[0];
|
3444 |
-
f++
|
3445 |
-
}
|
3446 |
-
for (; g < e;)b[d[g++]] = a[f++]
|
3447 |
-
} else if (typeof a === "object") {
|
3448 |
-
b = a;
|
3449 |
-
if (a.dataLabels)c._hasPointLabels = !0;
|
3450 |
-
if (a.marker)c._hasPointMarkers = !0
|
3451 |
-
}
|
3452 |
-
return b
|
3453 |
-
}, destroy: function () {
|
3454 |
-
var a = this.series.chart, b = a.hoverPoints, c;
|
3455 |
-
a.pointCount--;
|
3456 |
-
if (b && (this.setState(), ja(b, this), !b.length))a.hoverPoints = null;
|
3457 |
-
if (this === a.hoverPoint)this.onMouseOut();
|
3458 |
-
if (this.graphic || this.dataLabel)W(this), this.destroyElements();
|
3459 |
-
this.legendItem && a.legend.destroyItem(this);
|
3460 |
-
for (c in this)this[c] = null
|
3461 |
-
}, destroyElements: function () {
|
3462 |
-
for (var a = "graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","), b, c = 6; c--;)b = a[c], this[b] && (this[b] = this[b].destroy())
|
3463 |
-
}, getLabelConfig: function () {
|
3464 |
-
return {
|
3465 |
-
x: this.category, y: this.y, key: this.name || this.category, series: this.series,
|
3466 |
-
point: this, percentage: this.percentage, total: this.total || this.stackTotal
|
3467 |
-
}
|
3468 |
-
}, tooltipFormatter: function (a) {
|
3469 |
-
var b = this.series, c = b.tooltipOptions, d = m(c.valueDecimals, ""), e = c.valuePrefix || "", f = c.valueSuffix || "";
|
3470 |
-
p(b.pointArrayMap || ["y"], function (b) {
|
3471 |
-
b = "{point." + b;
|
3472 |
-
if (e || f)a = a.replace(b + "}", e + b + "}" + f);
|
3473 |
-
a = a.replace(b + "}", b + ":,." + d + "f}")
|
3474 |
-
});
|
3475 |
-
return Ia(a, {point: this, series: this.series})
|
3476 |
-
}, firePointEvent: function (a, b, c) {
|
3477 |
-
var d = this, e = this.series.options;
|
3478 |
-
(e.point.events[a] || d.options && d.options.events && d.options.events[a]) &&
|
3479 |
-
this.importEvents();
|
3480 |
-
a === "click" && e.allowPointSelect && (c = function (a) {
|
3481 |
-
d.select(null, a.ctrlKey || a.metaKey || a.shiftKey)
|
3482 |
-
});
|
3483 |
-
D(this, a, b, c)
|
3484 |
-
}
|
3485 |
-
};
|
3486 |
-
var O = function () {
|
3487 |
-
};
|
3488 |
-
O.prototype = {
|
3489 |
-
isCartesian: !0,
|
3490 |
-
type: "line",
|
3491 |
-
pointClass: Ea,
|
3492 |
-
sorted: !0,
|
3493 |
-
requireSorting: !0,
|
3494 |
-
pointAttrToOptions: {stroke: "lineColor", "stroke-width": "lineWidth", fill: "fillColor", r: "radius"},
|
3495 |
-
axisTypes: ["xAxis", "yAxis"],
|
3496 |
-
colorCounter: 0,
|
3497 |
-
parallelArrays: ["x", "y"],
|
3498 |
-
init: function (a, b) {
|
3499 |
-
var c = this, d, e, f = a.series, g = function (a, b) {
|
3500 |
-
return m(a.options.index, a._i) - m(b.options.index,
|
3501 |
-
b._i)
|
3502 |
-
};
|
3503 |
-
c.chart = a;
|
3504 |
-
c.options = b = c.setOptions(b);
|
3505 |
-
c.linkedSeries = [];
|
3506 |
-
c.bindAxes();
|
3507 |
-
q(c, {name: b.name, state: "", pointAttr: {}, visible: b.visible !== !1, selected: b.selected === !0});
|
3508 |
-
if (fa)b.animation = !1;
|
3509 |
-
e = b.events;
|
3510 |
-
for (d in e)K(c, d, e[d]);
|
3511 |
-
if (e && e.click || b.point && b.point.events && b.point.events.click || b.allowPointSelect)a.runTrackerClick = !0;
|
3512 |
-
c.getColor();
|
3513 |
-
c.getSymbol();
|
3514 |
-
p(c.parallelArrays, function (a) {
|
3515 |
-
c[a + "Data"] = []
|
3516 |
-
});
|
3517 |
-
c.setData(b.data, !1);
|
3518 |
-
if (c.isCartesian)a.hasCartesianSeries = !0;
|
3519 |
-
f.push(c);
|
3520 |
-
c._i = f.length - 1;
|
3521 |
-
ob(f, g);
|
3522 |
-
this.yAxis &&
|
3523 |
-
ob(this.yAxis.series, g);
|
3524 |
-
p(f, function (a, b) {
|
3525 |
-
a.index = b;
|
3526 |
-
a.name = a.name || "Series " + (b + 1)
|
3527 |
-
})
|
3528 |
-
},
|
3529 |
-
bindAxes: function () {
|
3530 |
-
var a = this, b = a.options, c = a.chart, d;
|
3531 |
-
p(a.axisTypes || [], function (e) {
|
3532 |
-
p(c[e], function (c) {
|
3533 |
-
d = c.options;
|
3534 |
-
if (b[e] === d.index || b[e] !== t && b[e] === d.id || b[e] === t && d.index === 0)c.series.push(a), a[e] = c, c.isDirty = !0
|
3535 |
-
});
|
3536 |
-
!a[e] && a.optionalAxis !== e && ra(18, !0)
|
3537 |
-
})
|
3538 |
-
},
|
3539 |
-
updateParallelArrays: function (a, b) {
|
3540 |
-
var c = a.series, d = arguments;
|
3541 |
-
p(c.parallelArrays, typeof b === "number" ? function (d) {
|
3542 |
-
var f = d === "y" && c.toYData ? c.toYData(a) : a[d];
|
3543 |
-
c[d + "Data"][b] = f
|
3544 |
-
} : function (a) {
|
3545 |
-
Array.prototype[b].apply(c[a + "Data"], Array.prototype.slice.call(d, 2))
|
3546 |
-
})
|
3547 |
-
},
|
3548 |
-
autoIncrement: function () {
|
3549 |
-
var a = this.options, b = this.xIncrement, b = m(b, a.pointStart, 0);
|
3550 |
-
this.pointInterval = m(this.pointInterval, a.pointInterval, 1);
|
3551 |
-
this.xIncrement = b + this.pointInterval;
|
3552 |
-
return b
|
3553 |
-
},
|
3554 |
-
getSegments: function () {
|
3555 |
-
var a = -1, b = [], c, d = this.points, e = d.length;
|
3556 |
-
if (e)if (this.options.connectNulls) {
|
3557 |
-
for (c = e; c--;)d[c].y === null && d.splice(c, 1);
|
3558 |
-
d.length && (b = [d])
|
3559 |
-
} else p(d, function (c, g) {
|
3560 |
-
c.y === null ? (g > a + 1 && b.push(d.slice(a +
|
3561 |
-
1, g)), a = g) : g === e - 1 && b.push(d.slice(a + 1, g + 1))
|
3562 |
-
});
|
3563 |
-
this.segments = b
|
3564 |
-
},
|
3565 |
-
setOptions: function (a) {
|
3566 |
-
var b = this.chart, c = b.options.plotOptions, b = b.userOptions || {}, d = b.plotOptions || {}, e = c[this.type];
|
3567 |
-
this.userOptions = a;
|
3568 |
-
c = w(e, c.series, a);
|
3569 |
-
this.tooltipOptions = w(E.tooltip, E.plotOptions[this.type].tooltip, b.tooltip, d.series && d.series.tooltip, d[this.type] && d[this.type].tooltip, a.tooltip);
|
3570 |
-
e.marker === null && delete c.marker;
|
3571 |
-
return c
|
3572 |
-
},
|
3573 |
-
getColor: function () {
|
3574 |
-
var a = this.options, b = this.userOptions, c = this.chart.options.colors, d = this.chart.counters,
|
3575 |
-
e;
|
3576 |
-
e = a.color || ba[this.type].color;
|
3577 |
-
if (!e && !a.colorByPoint)r(b._colorIndex) ? a = b._colorIndex : (b._colorIndex = d.color, a = d.color++), e = c[a];
|
3578 |
-
this.color = e;
|
3579 |
-
d.wrapColor(c.length)
|
3580 |
-
},
|
3581 |
-
getSymbol: function () {
|
3582 |
-
var a = this.userOptions, b = this.options.marker, c = this.chart, d = c.options.symbols, c = c.counters;
|
3583 |
-
this.symbol = b.symbol;
|
3584 |
-
if (!this.symbol)r(a._symbolIndex) ? a = a._symbolIndex : (a._symbolIndex = c.symbol, a = c.symbol++), this.symbol = d[a];
|
3585 |
-
if (/^url/.test(this.symbol))b.radius = 0;
|
3586 |
-
c.wrapSymbol(d.length)
|
3587 |
-
},
|
3588 |
-
drawLegendSymbol: N.drawLineMarker,
|
3589 |
-
setData: function (a, b, c, d) {
|
3590 |
-
var e = this, f = e.points, g = f && f.length || 0, h, i = e.options, j = e.chart, k = null, l = e.xAxis, o = l && !!l.categories, n = e.tooltipPoints, s = i.turboThreshold, q = this.xData, r = this.yData, v = (h = e.pointArrayMap) && h.length, a = a || [];
|
3591 |
-
h = a.length;
|
3592 |
-
b = m(b, !0);
|
3593 |
-
if (d !== !1 && h && g === h && !e.cropped && !e.hasGroupedData)p(a, function (a, b) {
|
3594 |
-
f[b].update(a, !1)
|
3595 |
-
}); else {
|
3596 |
-
e.xIncrement = null;
|
3597 |
-
e.pointRange = o ? 1 : i.pointRange;
|
3598 |
-
e.colorCounter = 0;
|
3599 |
-
p(this.parallelArrays, function (a) {
|
3600 |
-
e[a + "Data"].length = 0
|
3601 |
-
});
|
3602 |
-
if (s && h > s) {
|
3603 |
-
for (c = 0; k === null && c < h;)k =
|
3604 |
-
a[c], c++;
|
3605 |
-
if (ha(k)) {
|
3606 |
-
o = m(i.pointStart, 0);
|
3607 |
-
i = m(i.pointInterval, 1);
|
3608 |
-
for (c = 0; c < h; c++)q[c] = o, r[c] = a[c], o += i;
|
3609 |
-
e.xIncrement = o
|
3610 |
-
} else if (La(k))if (v)for (c = 0; c < h; c++)i = a[c], q[c] = i[0], r[c] = i.slice(1, v + 1); else for (c = 0; c < h; c++)i = a[c], q[c] = i[0], r[c] = i[1]; else ra(12)
|
3611 |
-
} else for (c = 0; c < h; c++)if (a[c] !== t && (i = {series: e}, e.pointClass.prototype.applyOptions.apply(i, [a[c]]), e.updateParallelArrays(i, c), o && i.name))l.names[i.x] = i.name;
|
3612 |
-
Fa(r[0]) && ra(14, !0);
|
3613 |
-
e.data = [];
|
3614 |
-
e.options.data = a;
|
3615 |
-
for (c = g; c--;)f[c] && f[c].destroy && f[c].destroy();
|
3616 |
-
if (n)n.length = 0;
|
3617 |
-
if (l)l.minRange = l.userMinRange;
|
3618 |
-
e.isDirty = e.isDirtyData = j.isDirtyBox = !0;
|
3619 |
-
c = !1
|
3620 |
-
}
|
3621 |
-
b && j.redraw(c)
|
3622 |
-
},
|
3623 |
-
processData: function (a) {
|
3624 |
-
var b = this.xData, c = this.yData, d = b.length, e;
|
3625 |
-
e = 0;
|
3626 |
-
var f, g, h = this.xAxis, i = this.options, j = i.cropThreshold, k = 0, l = this.isCartesian, o, n;
|
3627 |
-
if (l && !this.isDirty && !h.isDirty && !this.yAxis.isDirty && !a)return !1;
|
3628 |
-
if (l && this.sorted && (!j || d > j || this.forceCrop))if (o = h.min, n = h.max, b[d - 1] < o || b[0] > n)b = [], c = []; else if (b[0] < o || b[d - 1] > n)e = this.cropData(this.xData, this.yData, o, n), b = e.xData, c = e.yData,
|
3629 |
-
e = e.start, f = !0, k = b.length;
|
3630 |
-
for (d = b.length - 1; d >= 0; d--)a = b[d] - b[d - 1], !f && b[d] > o && b[d] < n && k++, a > 0 && (g === t || a < g) ? g = a : a < 0 && this.requireSorting && ra(15);
|
3631 |
-
this.cropped = f;
|
3632 |
-
this.cropStart = e;
|
3633 |
-
this.processedXData = b;
|
3634 |
-
this.processedYData = c;
|
3635 |
-
this.activePointCount = k;
|
3636 |
-
if (i.pointRange === null)this.pointRange = g || 1;
|
3637 |
-
this.closestPointRange = g
|
3638 |
-
},
|
3639 |
-
cropData: function (a, b, c, d) {
|
3640 |
-
var e = a.length, f = 0, g = e, h = m(this.cropShoulder, 1), i;
|
3641 |
-
for (i = 0; i < e; i++)if (a[i] >= c) {
|
3642 |
-
f = v(0, i - h);
|
3643 |
-
break
|
3644 |
-
}
|
3645 |
-
for (; i < e; i++)if (a[i] > d) {
|
3646 |
-
g = i + h;
|
3647 |
-
break
|
3648 |
-
}
|
3649 |
-
return {
|
3650 |
-
xData: a.slice(f, g), yData: b.slice(f,
|
3651 |
-
g), start: f, end: g
|
3652 |
-
}
|
3653 |
-
},
|
3654 |
-
generatePoints: function () {
|
3655 |
-
var a = this.options.data, b = this.data, c, d = this.processedXData, e = this.processedYData, f = this.pointClass, g = d.length, h = this.cropStart || 0, i, j = this.hasGroupedData, k, l = [], o;
|
3656 |
-
if (!b && !j)b = [], b.length = a.length, b = this.data = b;
|
3657 |
-
for (o = 0; o < g; o++)i = h + o, j ? l[o] = (new f).init(this, [d[o]].concat(qa(e[o]))) : (b[i] ? k = b[i] : a[i] !== t && (b[i] = k = (new f).init(this, a[i], d[o])), l[o] = k);
|
3658 |
-
if (b && (g !== (c = b.length) || j))for (o = 0; o < c; o++)if (o === h && !j && (o += g), b[o])b[o].destroyElements(), b[o].plotX =
|
3659 |
-
t;
|
3660 |
-
this.data = b;
|
3661 |
-
this.points = l
|
3662 |
-
},
|
3663 |
-
getExtremes: function (a) {
|
3664 |
-
var b = this.yAxis, c = this.processedXData, d, e = [], f = 0;
|
3665 |
-
d = this.xAxis.getExtremes();
|
3666 |
-
var g = d.min, h = d.max, i, j, k, l, a = a || this.stackedYData || this.processedYData;
|
3667 |
-
d = a.length;
|
3668 |
-
for (l = 0; l < d; l++)if (j = c[l], k = a[l], i = k !== null && k !== t && (!b.isLog || k.length || k > 0), j = this.getExtremesFromAll || this.cropped || (c[l + 1] || j) >= g && (c[l - 1] || j) <= h, i && j)if (i = k.length)for (; i--;)k[i] !== null && (e[f++] = k[i]); else e[f++] = k;
|
3669 |
-
this.dataMin = m(void 0, Na(e));
|
3670 |
-
this.dataMax = m(void 0, Ba(e))
|
3671 |
-
},
|
3672 |
-
translate: function () {
|
3673 |
-
this.processedXData ||
|
3674 |
-
this.processData();
|
3675 |
-
this.generatePoints();
|
3676 |
-
for (var a = this.options, b = a.stacking, c = this.xAxis, d = c.categories, e = this.yAxis, f = this.points, g = f.length, h = !!this.modifyValue, i = a.pointPlacement, j = i === "between" || ha(i), k = a.threshold, a = 0; a < g; a++) {
|
3677 |
-
var l = f[a], o = l.x, n = l.y, s = l.low, p = b && e.stacks[(this.negStacks && n < k ? "-" : "") + this.stackKey];
|
3678 |
-
if (e.isLog && n <= 0)l.y = n = null;
|
3679 |
-
l.plotX = c.translate(o, 0, 0, 0, 1, i, this.type === "flags");
|
3680 |
-
if (b && this.visible && p && p[o])p = p[o], n = p.points[this.index + "," + a], s = n[0], n = n[1], s === 0 && (s = m(k, e.min)),
|
3681 |
-
e.isLog && s <= 0 && (s = null), l.total = l.stackTotal = p.total, l.percentage = p.total && l.y / p.total * 100, l.stackY = n, p.setOffset(this.pointXOffset || 0, this.barW || 0);
|
3682 |
-
l.yBottom = r(s) ? e.translate(s, 0, 1, 0, 1) : null;
|
3683 |
-
h && (n = this.modifyValue(n, l));
|
3684 |
-
l.plotY = typeof n === "number" && n !== Infinity ? e.translate(n, 0, 1, 0, 1) : t;
|
3685 |
-
l.clientX = j ? c.translate(o, 0, 0, 0, 1) : l.plotX;
|
3686 |
-
l.negative = l.y < (k || 0);
|
3687 |
-
l.category = d && d[l.x] !== t ? d[l.x] : l.x
|
3688 |
-
}
|
3689 |
-
this.getSegments()
|
3690 |
-
},
|
3691 |
-
animate: function (a) {
|
3692 |
-
var b = this.chart, c = b.renderer, d;
|
3693 |
-
d = this.options.animation;
|
3694 |
-
var e = this.clipBox ||
|
3695 |
-
b.clipBox, f = b.inverted, g;
|
3696 |
-
if (d && !ca(d))d = ba[this.type].animation;
|
3697 |
-
g = ["_sharedClip", d.duration, d.easing, e.height].join(",");
|
3698 |
-
a ? (a = b[g], d = b[g + "m"], a || (b[g] = a = c.clipRect(q(e, {width: 0})), b[g + "m"] = d = c.clipRect(-99, f ? -b.plotLeft : -b.plotTop, 99, f ? b.chartWidth : b.chartHeight)), this.group.clip(a), this.markerGroup.clip(d), this.sharedClipKey = g) : ((a = b[g]) && a.animate({width: b.plotSizeX}, d), b[g + "m"] && b[g + "m"].animate({width: b.plotSizeX + 99}, d), this.animate = null)
|
3699 |
-
},
|
3700 |
-
afterAnimate: function () {
|
3701 |
-
var a = this.chart, b = this.sharedClipKey,
|
3702 |
-
c = this.group, d = this.clipBox;
|
3703 |
-
if (c && this.options.clip !== !1) {
|
3704 |
-
if (!b || !d)c.clip(d ? a.renderer.clipRect(d) : a.clipRect);
|
3705 |
-
this.markerGroup.clip()
|
3706 |
-
}
|
3707 |
-
D(this, "afterAnimate");
|
3708 |
-
setTimeout(function () {
|
3709 |
-
b && a[b] && (d || (a[b] = a[b].destroy()), a[b + "m"] && (a[b + "m"] = a[b + "m"].destroy()))
|
3710 |
-
}, 100)
|
3711 |
-
},
|
3712 |
-
drawPoints: function () {
|
3713 |
-
var a, b = this.points, c = this.chart, d, e, f, g, h, i, j, k;
|
3714 |
-
d = this.options.marker;
|
3715 |
-
var l = this.pointAttr[""], o, n = this.markerGroup, s = m(d.enabled, this.activePointCount < 0.5 * this.xAxis.len / d.radius);
|
3716 |
-
if (d.enabled !== !1 || this._hasPointMarkers)for (f =
|
3717 |
-
b.length; f--;)if (g = b[f], d = T(g.plotX), e = g.plotY, k = g.graphic, i = g.marker || {}, a = s && i.enabled === t || i.enabled, o = c.isInsidePlot(u(d), e, c.inverted), a && e !== t && !isNaN(e) && g.y !== null)if (a = g.pointAttr[g.selected ? "select" : ""] || l, h = a.r, i = m(i.symbol, this.symbol), j = i.indexOf("url") === 0, k)k[o ? "show" : "hide"](!0).animate(q({
|
3718 |
-
x: d - h,
|
3719 |
-
y: e - h
|
3720 |
-
}, k.symbolName ? {width: 2 * h, height: 2 * h} : {})); else {
|
3721 |
-
if (o && (h > 0 || j))g.graphic = c.renderer.symbol(i, d - h, e - h, 2 * h, 2 * h).attr(a).add(n)
|
3722 |
-
} else if (k)g.graphic = k.destroy()
|
3723 |
-
},
|
3724 |
-
convertAttribs: function (a,
|
3725 |
-
b, c, d) {
|
3726 |
-
var e = this.pointAttrToOptions, f, g, h = {}, a = a || {}, b = b || {}, c = c || {}, d = d || {};
|
3727 |
-
for (f in e)g = e[f], h[f] = m(a[g], b[f], c[f], d[f]);
|
3728 |
-
return h
|
3729 |
-
},
|
3730 |
-
getAttribs: function () {
|
3731 |
-
var a = this, b = a.options, c = ba[a.type].marker ? b.marker : b, d = c.states, e = d.hover, f, g = a.color;
|
3732 |
-
f = {stroke: g, fill: g};
|
3733 |
-
var h = a.points || [], i, j = [], k, l = a.pointAttrToOptions;
|
3734 |
-
k = a.hasPointSpecificOptions;
|
3735 |
-
var o = b.negativeColor, n = c.lineColor, s = c.fillColor;
|
3736 |
-
i = b.turboThreshold;
|
3737 |
-
var m;
|
3738 |
-
b.marker ? (e.radius = e.radius || c.radius + 2, e.lineWidth = e.lineWidth || c.lineWidth + 1) : e.color =
|
3739 |
-
e.color || ya(e.color || g).brighten(e.brightness).get();
|
3740 |
-
j[""] = a.convertAttribs(c, f);
|
3741 |
-
p(["hover", "select"], function (b) {
|
3742 |
-
j[b] = a.convertAttribs(d[b], j[""])
|
3743 |
-
});
|
3744 |
-
a.pointAttr = j;
|
3745 |
-
g = h.length;
|
3746 |
-
if (!i || g < i || k)for (; g--;) {
|
3747 |
-
i = h[g];
|
3748 |
-
if ((c = i.options && i.options.marker || i.options) && c.enabled === !1)c.radius = 0;
|
3749 |
-
if (i.negative && o)i.color = i.fillColor = o;
|
3750 |
-
k = b.colorByPoint || i.color;
|
3751 |
-
if (i.options)for (m in l)r(c[l[m]]) && (k = !0);
|
3752 |
-
if (k) {
|
3753 |
-
c = c || {};
|
3754 |
-
k = [];
|
3755 |
-
d = c.states || {};
|
3756 |
-
f = d.hover = d.hover || {};
|
3757 |
-
if (!b.marker)f.color = f.color || !i.options.color && e.color ||
|
3758 |
-
ya(i.color).brighten(f.brightness || e.brightness).get();
|
3759 |
-
f = {color: i.color};
|
3760 |
-
if (!s)f.fillColor = i.color;
|
3761 |
-
if (!n)f.lineColor = i.color;
|
3762 |
-
k[""] = a.convertAttribs(q(f, c), j[""]);
|
3763 |
-
k.hover = a.convertAttribs(d.hover, j.hover, k[""]);
|
3764 |
-
k.select = a.convertAttribs(d.select, j.select, k[""])
|
3765 |
-
} else k = j;
|
3766 |
-
i.pointAttr = k
|
3767 |
-
}
|
3768 |
-
},
|
3769 |
-
destroy: function () {
|
3770 |
-
var a = this, b = a.chart, c = /AppleWebKit\/533/.test(wa), d, e, f = a.data || [], g, h, i;
|
3771 |
-
D(a, "destroy");
|
3772 |
-
W(a);
|
3773 |
-
p(a.axisTypes || [], function (b) {
|
3774 |
-
if (i = a[b])ja(i.series, a), i.isDirty = i.forceRedraw = !0
|
3775 |
-
});
|
3776 |
-
a.legendItem && a.chart.legend.destroyItem(a);
|
3777 |
-
for (e = f.length; e--;)(g = f[e]) && g.destroy && g.destroy();
|
3778 |
-
a.points = null;
|
3779 |
-
clearTimeout(a.animationTimeout);
|
3780 |
-
p("area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip".split(","), function (b) {
|
3781 |
-
a[b] && (d = c && b === "group" ? "hide" : "destroy", a[b][d]())
|
3782 |
-
});
|
3783 |
-
if (b.hoverSeries === a)b.hoverSeries = null;
|
3784 |
-
ja(b.series, a);
|
3785 |
-
for (h in a)delete a[h]
|
3786 |
-
},
|
3787 |
-
getSegmentPath: function (a) {
|
3788 |
-
var b = this, c = [], d = b.options.step;
|
3789 |
-
p(a, function (e, f) {
|
3790 |
-
var g = e.plotX, h = e.plotY, i;
|
3791 |
-
b.getPointSpline ? c.push.apply(c, b.getPointSpline(a,
|
3792 |
-
e, f)) : (c.push(f ? "L" : "M"), d && f && (i = a[f - 1], d === "right" ? c.push(i.plotX, h) : d === "center" ? c.push((i.plotX + g) / 2, i.plotY, (i.plotX + g) / 2, h) : c.push(g, i.plotY)), c.push(e.plotX, e.plotY))
|
3793 |
-
});
|
3794 |
-
return c
|
3795 |
-
},
|
3796 |
-
getGraphPath: function () {
|
3797 |
-
var a = this, b = [], c, d = [];
|
3798 |
-
p(a.segments, function (e) {
|
3799 |
-
c = a.getSegmentPath(e);
|
3800 |
-
e.length > 1 ? b = b.concat(c) : d.push(e[0])
|
3801 |
-
});
|
3802 |
-
a.singlePoints = d;
|
3803 |
-
return a.graphPath = b
|
3804 |
-
},
|
3805 |
-
drawGraph: function () {
|
3806 |
-
var a = this, b = this.options, c = [["graph", b.lineColor || this.color]], d = b.lineWidth, e = b.dashStyle, f = b.linecap !== "square", g = this.getGraphPath(),
|
3807 |
-
h = b.negativeColor;
|
3808 |
-
h && c.push(["graphNeg", h]);
|
3809 |
-
p(c, function (c, h) {
|
3810 |
-
var k = c[0], l = a[k];
|
3811 |
-
if (l)bb(l), l.animate({d: g}); else if (d && g.length)l = {
|
3812 |
-
stroke: c[1],
|
3813 |
-
"stroke-width": d,
|
3814 |
-
fill: Q,
|
3815 |
-
zIndex: 1
|
3816 |
-
}, e ? l.dashstyle = e : f && (l["stroke-linecap"] = l["stroke-linejoin"] = "round"), a[k] = a.chart.renderer.path(g).attr(l).add(a.group).shadow(!h && b.shadow)
|
3817 |
-
})
|
3818 |
-
},
|
3819 |
-
clipNeg: function () {
|
3820 |
-
var a = this.options, b = this.chart, c = b.renderer, d = a.negativeColor || a.negativeFillColor, e, f = this.graph, g = this.area, h = this.posClip, i = this.negClip;
|
3821 |
-
e = b.chartWidth;
|
3822 |
-
var j =
|
3823 |
-
b.chartHeight, k = v(e, j), l = this.yAxis;
|
3824 |
-
if (d && (f || g)) {
|
3825 |
-
d = u(l.toPixels(a.threshold || 0, !0));
|
3826 |
-
d < 0 && (k -= d);
|
3827 |
-
a = {x: 0, y: 0, width: k, height: d};
|
3828 |
-
k = {x: 0, y: d, width: k, height: k};
|
3829 |
-
if (b.inverted)a.height = k.y = b.plotWidth - d, c.isVML && (a = {
|
3830 |
-
x: b.plotWidth - d - b.plotLeft,
|
3831 |
-
y: 0,
|
3832 |
-
width: e,
|
3833 |
-
height: j
|
3834 |
-
}, k = {x: d + b.plotLeft - e, y: 0, width: b.plotLeft + d, height: e});
|
3835 |
-
l.reversed ? (b = k, e = a) : (b = a, e = k);
|
3836 |
-
h ? (h.animate(b), i.animate(e)) : (this.posClip = h = c.clipRect(b), this.negClip = i = c.clipRect(e), f && this.graphNeg && (f.clip(h), this.graphNeg.clip(i)), g && (g.clip(h), this.areaNeg.clip(i)))
|
3837 |
-
}
|
3838 |
-
},
|
3839 |
-
invertGroups: function () {
|
3840 |
-
function a() {
|
3841 |
-
var a = {width: b.yAxis.len, height: b.xAxis.len};
|
3842 |
-
p(["group", "markerGroup"], function (c) {
|
3843 |
-
b[c] && b[c].attr(a).invert()
|
3844 |
-
})
|
3845 |
-
}
|
3846 |
-
|
3847 |
-
var b = this, c = b.chart;
|
3848 |
-
if (b.xAxis)K(c, "resize", a), K(b, "destroy", function () {
|
3849 |
-
W(c, "resize", a)
|
3850 |
-
}), a(), b.invertGroups = a
|
3851 |
-
},
|
3852 |
-
plotGroup: function (a, b, c, d, e) {
|
3853 |
-
var f = this[a], g = !f;
|
3854 |
-
g && (this[a] = f = this.chart.renderer.g(b).attr({visibility: c, zIndex: d || 0.1}).add(e));
|
3855 |
-
f[g ? "attr" : "animate"](this.getPlotBox());
|
3856 |
-
return f
|
3857 |
-
},
|
3858 |
-
getPlotBox: function () {
|
3859 |
-
var a = this.chart, b = this.xAxis, c = this.yAxis;
|
3860 |
-
if (a.inverted)b = c, c = this.xAxis;
|
3861 |
-
return {translateX: b ? b.left : a.plotLeft, translateY: c ? c.top : a.plotTop, scaleX: 1, scaleY: 1}
|
3862 |
-
},
|
3863 |
-
render: function () {
|
3864 |
-
var a = this, b = a.chart, c, d = a.options, e = (c = d.animation) && !!a.animate && b.renderer.isSVG && m(c.duration, 500) || 0, f = a.visible ? "visible" : "hidden", g = d.zIndex, h = a.hasRendered, i = b.seriesGroup;
|
3865 |
-
c = a.plotGroup("group", "series", f, g, i);
|
3866 |
-
a.markerGroup = a.plotGroup("markerGroup", "markers", f, g, i);
|
3867 |
-
e && a.animate(!0);
|
3868 |
-
a.getAttribs();
|
3869 |
-
c.inverted = a.isCartesian ? b.inverted : !1;
|
3870 |
-
a.drawGraph && (a.drawGraph(),
|
3871 |
-
a.clipNeg());
|
3872 |
-
a.drawDataLabels && a.drawDataLabels();
|
3873 |
-
a.visible && a.drawPoints();
|
3874 |
-
a.drawTracker && a.options.enableMouseTracking !== !1 && a.drawTracker();
|
3875 |
-
b.inverted && a.invertGroups();
|
3876 |
-
d.clip !== !1 && !a.sharedClipKey && !h && c.clip(b.clipRect);
|
3877 |
-
e && a.animate();
|
3878 |
-
if (!h)e ? a.animationTimeout = setTimeout(function () {
|
3879 |
-
a.afterAnimate()
|
3880 |
-
}, e) : a.afterAnimate();
|
3881 |
-
a.isDirty = a.isDirtyData = !1;
|
3882 |
-
a.hasRendered = !0
|
3883 |
-
},
|
3884 |
-
redraw: function () {
|
3885 |
-
var a = this.chart, b = this.isDirtyData, c = this.group, d = this.xAxis, e = this.yAxis;
|
3886 |
-
c && (a.inverted && c.attr({
|
3887 |
-
width: a.plotWidth,
|
3888 |
-
height: a.plotHeight
|
3889 |
-
}), c.animate({translateX: m(d && d.left, a.plotLeft), translateY: m(e && e.top, a.plotTop)}));
|
3890 |
-
this.translate();
|
3891 |
-
this.setTooltipPoints && this.setTooltipPoints(!0);
|
3892 |
-
this.render();
|
3893 |
-
b && D(this, "updatedData")
|
3894 |
-
}
|
3895 |
-
};
|
3896 |
-
Hb.prototype = {
|
3897 |
-
destroy: function () {
|
3898 |
-
Oa(this, this.axis)
|
3899 |
-
}, render: function (a) {
|
3900 |
-
var b = this.options, c = b.format, c = c ? Ia(c, this) : b.formatter.call(this);
|
3901 |
-
this.label ? this.label.attr({
|
3902 |
-
text: c,
|
3903 |
-
visibility: "hidden"
|
3904 |
-
}) : this.label = this.axis.chart.renderer.text(c, null, null, b.useHTML).css(b.style).attr({
|
3905 |
-
align: this.textAlign,
|
3906 |
-
rotation: b.rotation, visibility: "hidden"
|
3907 |
-
}).add(a)
|
3908 |
-
}, setOffset: function (a, b) {
|
3909 |
-
var c = this.axis, d = c.chart, e = d.inverted, f = this.isNegative, g = c.translate(c.usePercentage ? 100 : this.total, 0, 0, 0, 1), c = c.translate(0), c = M(g - c), h = d.xAxis[0].translate(this.x) + a, i = d.plotHeight, f = {
|
3910 |
-
x: e ? f ? g : g - c : h,
|
3911 |
-
y: e ? i - h - b : f ? i - g - c : i - g,
|
3912 |
-
width: e ? c : b,
|
3913 |
-
height: e ? b : c
|
3914 |
-
};
|
3915 |
-
if (e = this.label)e.align(this.alignOptions, null, f), f = e.alignAttr, e[this.options.crop === !1 || d.isInsidePlot(f.x, f.y) ? "show" : "hide"](!0)
|
3916 |
-
}
|
3917 |
-
};
|
3918 |
-
la.prototype.buildStacks = function () {
|
3919 |
-
var a =
|
3920 |
-
this.series, b = m(this.options.reversedStacks, !0), c = a.length;
|
3921 |
-
if (!this.isXAxis) {
|
3922 |
-
for (this.usePercentage = !1; c--;)a[b ? c : a.length - c - 1].setStackedPoints();
|
3923 |
-
if (this.usePercentage)for (c = 0; c < a.length; c++)a[c].setPercentStacks()
|
3924 |
-
}
|
3925 |
-
};
|
3926 |
-
la.prototype.renderStackTotals = function () {
|
3927 |
-
var a = this.chart, b = a.renderer, c = this.stacks, d, e, f = this.stackTotalGroup;
|
3928 |
-
if (!f)this.stackTotalGroup = f = b.g("stack-labels").attr({visibility: "visible", zIndex: 6}).add();
|
3929 |
-
f.translate(a.plotLeft, a.plotTop);
|
3930 |
-
for (d in c)for (e in a = c[d], a)a[e].render(f)
|
3931 |
-
};
|
3932 |
-
O.prototype.setStackedPoints = function () {
|
3933 |
-
if (this.options.stacking && !(this.visible !== !0 && this.chart.options.chart.ignoreHiddenSeries !== !1)) {
|
3934 |
-
var a = this.processedXData, b = this.processedYData, c = [], d = b.length, e = this.options, f = e.threshold, g = e.stack, e = e.stacking, h = this.stackKey, i = "-" + h, j = this.negStacks, k = this.yAxis, l = k.stacks, o = k.oldStacks, n, m, p, q, r, u;
|
3935 |
-
for (q = 0; q < d; q++) {
|
3936 |
-
r = a[q];
|
3937 |
-
u = b[q];
|
3938 |
-
p = this.index + "," + q;
|
3939 |
-
m = (n = j && u < f) ? i : h;
|
3940 |
-
l[m] || (l[m] = {});
|
3941 |
-
if (!l[m][r])o[m] && o[m][r] ? (l[m][r] = o[m][r], l[m][r].total = null) : l[m][r] = new Hb(k,
|
3942 |
-
k.options.stackLabels, n, r, g);
|
3943 |
-
m = l[m][r];
|
3944 |
-
m.points[p] = [m.cum || 0];
|
3945 |
-
e === "percent" ? (n = n ? h : i, j && l[n] && l[n][r] ? (n = l[n][r], m.total = n.total = v(n.total, m.total) + M(u) || 0) : m.total = da(m.total + (M(u) || 0))) : m.total = da(m.total + (u || 0));
|
3946 |
-
m.cum = (m.cum || 0) + (u || 0);
|
3947 |
-
m.points[p].push(m.cum);
|
3948 |
-
c[q] = m.cum
|
3949 |
-
}
|
3950 |
-
if (e === "percent")k.usePercentage = !0;
|
3951 |
-
this.stackedYData = c;
|
3952 |
-
k.oldStacks = {}
|
3953 |
-
}
|
3954 |
-
};
|
3955 |
-
O.prototype.setPercentStacks = function () {
|
3956 |
-
var a = this, b = a.stackKey, c = a.yAxis.stacks, d = a.processedXData;
|
3957 |
-
p([b, "-" + b], function (b) {
|
3958 |
-
var e;
|
3959 |
-
for (var f = d.length, g, h; f--;)if (g =
|
3960 |
-
d[f], e = (h = c[b] && c[b][g]) && h.points[a.index + "," + f], g = e)h = h.total ? 100 / h.total : 0, g[0] = da(g[0] * h), g[1] = da(g[1] * h), a.stackedYData[f] = g[1]
|
3961 |
-
})
|
3962 |
-
};
|
3963 |
-
q(Ya.prototype, {
|
3964 |
-
addSeries: function (a, b, c) {
|
3965 |
-
var d, e = this;
|
3966 |
-
a && (b = m(b, !0), D(e, "addSeries", {options: a}, function () {
|
3967 |
-
d = e.initSeries(a);
|
3968 |
-
e.isDirtyLegend = !0;
|
3969 |
-
e.linkSeries();
|
3970 |
-
b && e.redraw(c)
|
3971 |
-
}));
|
3972 |
-
return d
|
3973 |
-
}, addAxis: function (a, b, c, d) {
|
3974 |
-
var e = b ? "xAxis" : "yAxis", f = this.options;
|
3975 |
-
new la(this, w(a, {index: this[e].length, isX: b}));
|
3976 |
-
f[e] = qa(f[e] || {});
|
3977 |
-
f[e].push(a);
|
3978 |
-
m(c, !0) && this.redraw(d)
|
3979 |
-
}, showLoading: function (a) {
|
3980 |
-
var b =
|
3981 |
-
this.options, c = this.loadingDiv, d = b.loading;
|
3982 |
-
if (!c)this.loadingDiv = c = Y(Ja, {className: "highcharts-loading"}, q(d.style, {
|
3983 |
-
zIndex: 10,
|
3984 |
-
display: Q
|
3985 |
-
}), this.container), this.loadingSpan = Y("span", null, d.labelStyle, c);
|
3986 |
-
this.loadingSpan.innerHTML = a || b.lang.loading;
|
3987 |
-
if (!this.loadingShown)G(c, {
|
3988 |
-
opacity: 0,
|
3989 |
-
display: "",
|
3990 |
-
left: this.plotLeft + "px",
|
3991 |
-
top: this.plotTop + "px",
|
3992 |
-
width: this.plotWidth + "px",
|
3993 |
-
height: this.plotHeight + "px"
|
3994 |
-
}), kb(c, {opacity: d.style.opacity}, {duration: d.showDuration || 0}), this.loadingShown = !0
|
3995 |
-
}, hideLoading: function () {
|
3996 |
-
var a =
|
3997 |
-
this.options, b = this.loadingDiv;
|
3998 |
-
b && kb(b, {opacity: 0}, {
|
3999 |
-
duration: a.loading.hideDuration || 100, complete: function () {
|
4000 |
-
G(b, {display: Q})
|
4001 |
-
}
|
4002 |
-
});
|
4003 |
-
this.loadingShown = !1
|
4004 |
-
}
|
4005 |
-
});
|
4006 |
-
q(Ea.prototype, {
|
4007 |
-
update: function (a, b, c) {
|
4008 |
-
var d = this, e = d.series, f = d.graphic, g, h = e.data, i = e.chart, j = e.options, b = m(b, !0);
|
4009 |
-
d.firePointEvent("update", {options: a}, function () {
|
4010 |
-
d.applyOptions(a);
|
4011 |
-
if (ca(a)) {
|
4012 |
-
e.getAttribs();
|
4013 |
-
if (f)a && a.marker && a.marker.symbol ? d.graphic = f.destroy() : f.attr(d.pointAttr[d.state || ""]);
|
4014 |
-
if (a && a.dataLabels && d.dataLabel)d.dataLabel = d.dataLabel.destroy()
|
4015 |
-
}
|
4016 |
-
g =
|
4017 |
-
Da(d, h);
|
4018 |
-
e.updateParallelArrays(d, g);
|
4019 |
-
j.data[g] = d.options;
|
4020 |
-
e.isDirty = e.isDirtyData = !0;
|
4021 |
-
if (!e.fixedBox && e.hasCartesianSeries)i.isDirtyBox = !0;
|
4022 |
-
j.legendType === "point" && i.legend.destroyItem(d);
|
4023 |
-
b && i.redraw(c)
|
4024 |
-
})
|
4025 |
-
}, remove: function (a, b) {
|
4026 |
-
var c = this, d = c.series, e = d.points, f = d.chart, g, h = d.data;
|
4027 |
-
Qa(b, f);
|
4028 |
-
a = m(a, !0);
|
4029 |
-
c.firePointEvent("remove", null, function () {
|
4030 |
-
g = Da(c, h);
|
4031 |
-
h.length === e.length && e.splice(g, 1);
|
4032 |
-
h.splice(g, 1);
|
4033 |
-
d.options.data.splice(g, 1);
|
4034 |
-
d.updateParallelArrays(c, "splice", g, 1);
|
4035 |
-
c.destroy();
|
4036 |
-
d.isDirty = !0;
|
4037 |
-
d.isDirtyData = !0;
|
4038 |
-
a && f.redraw()
|
4039 |
-
})
|
4040 |
-
}
|
4041 |
-
});
|
4042 |
-
q(O.prototype, {
|
4043 |
-
addPoint: function (a, b, c, d) {
|
4044 |
-
var e = this.options, f = this.data, g = this.graph, h = this.area, i = this.chart, j = this.xAxis && this.xAxis.names, k = g && g.shift || 0, l = e.data, o, n = this.xData;
|
4045 |
-
Qa(d, i);
|
4046 |
-
c && p([g, h, this.graphNeg, this.areaNeg], function (a) {
|
4047 |
-
if (a)a.shift = k + 1
|
4048 |
-
});
|
4049 |
-
if (h)h.isArea = !0;
|
4050 |
-
b = m(b, !0);
|
4051 |
-
d = {series: this};
|
4052 |
-
this.pointClass.prototype.applyOptions.apply(d, [a]);
|
4053 |
-
g = d.x;
|
4054 |
-
h = n.length;
|
4055 |
-
if (this.requireSorting && g < n[h - 1])for (o = !0; h && n[h - 1] > g;)h--;
|
4056 |
-
this.updateParallelArrays(d, "splice", h, 0, 0);
|
4057 |
-
this.updateParallelArrays(d,
|
4058 |
-
h);
|
4059 |
-
if (j)j[g] = d.name;
|
4060 |
-
l.splice(h, 0, a);
|
4061 |
-
o && (this.data.splice(h, 0, null), this.processData());
|
4062 |
-
e.legendType === "point" && this.generatePoints();
|
4063 |
-
c && (f[0] && f[0].remove ? f[0].remove(!1) : (f.shift(), this.updateParallelArrays(d, "shift"), l.shift()));
|
4064 |
-
this.isDirtyData = this.isDirty = !0;
|
4065 |
-
b && (this.getAttribs(), i.redraw())
|
4066 |
-
}, remove: function (a, b) {
|
4067 |
-
var c = this, d = c.chart, a = m(a, !0);
|
4068 |
-
if (!c.isRemoving)c.isRemoving = !0, D(c, "remove", null, function () {
|
4069 |
-
c.destroy();
|
4070 |
-
d.isDirtyLegend = d.isDirtyBox = !0;
|
4071 |
-
d.linkSeries();
|
4072 |
-
a && d.redraw(b)
|
4073 |
-
});
|
4074 |
-
c.isRemoving = !1
|
4075 |
-
}, update: function (a, b) {
|
4076 |
-
var c = this.chart, d = this.type, e = F[d].prototype, f, a = w(this.userOptions, {
|
4077 |
-
animation: !1,
|
4078 |
-
index: this.index,
|
4079 |
-
pointStart: this.xData[0]
|
4080 |
-
}, {data: this.options.data}, a);
|
4081 |
-
this.remove(!1);
|
4082 |
-
for (f in e)e.hasOwnProperty(f) && (this[f] = t);
|
4083 |
-
q(this, F[a.type || d].prototype);
|
4084 |
-
this.init(c, a);
|
4085 |
-
m(b, !0) && c.redraw(!1)
|
4086 |
-
}
|
4087 |
-
});
|
4088 |
-
q(la.prototype, {
|
4089 |
-
update: function (a, b) {
|
4090 |
-
var c = this.chart, a = c.options[this.coll][this.options.index] = w(this.userOptions, a);
|
4091 |
-
this.destroy(!0);
|
4092 |
-
this._addedPlotLB = t;
|
4093 |
-
this.init(c, q(a, {events: t}));
|
4094 |
-
c.isDirtyBox = !0;
|
4095 |
-
m(b, !0) && c.redraw()
|
4096 |
-
}, remove: function (a) {
|
4097 |
-
for (var b = this.chart, c = this.coll, d = this.series, e = d.length; e--;)d[e] && d[e].remove(!1);
|
4098 |
-
ja(b.axes, this);
|
4099 |
-
ja(b[c], this);
|
4100 |
-
b.options[c].splice(this.options.index, 1);
|
4101 |
-
p(b[c], function (a, b) {
|
4102 |
-
a.options.index = b
|
4103 |
-
});
|
4104 |
-
this.destroy();
|
4105 |
-
b.isDirtyBox = !0;
|
4106 |
-
m(a, !0) && b.redraw()
|
4107 |
-
}, setTitle: function (a, b) {
|
4108 |
-
this.update({title: a}, b)
|
4109 |
-
}, setCategories: function (a, b) {
|
4110 |
-
this.update({categories: a}, b)
|
4111 |
-
}
|
4112 |
-
});
|
4113 |
-
ga = ka(O);
|
4114 |
-
F.line = ga;
|
4115 |
-
ba.area = w(S, {threshold: 0});
|
4116 |
-
var pa = ka(O, {
|
4117 |
-
type: "area", getSegments: function () {
|
4118 |
-
var a =
|
4119 |
-
[], b = [], c = [], d = this.xAxis, e = this.yAxis, f = e.stacks[this.stackKey], g = {}, h, i, j = this.points, k = this.options.connectNulls, l, o, n;
|
4120 |
-
if (this.options.stacking && !this.cropped) {
|
4121 |
-
for (o = 0; o < j.length; o++)g[j[o].x] = j[o];
|
4122 |
-
for (n in f)f[n].total !== null && c.push(+n);
|
4123 |
-
c.sort(function (a, b) {
|
4124 |
-
return a - b
|
4125 |
-
});
|
4126 |
-
p(c, function (a) {
|
4127 |
-
if (!k || g[a] && g[a].y !== null)g[a] ? b.push(g[a]) : (h = d.translate(a), l = f[a].percent ? f[a].total ? f[a].cum * 100 / f[a].total : 0 : f[a].cum, i = e.toPixels(l, !0), b.push({
|
4128 |
-
y: null,
|
4129 |
-
plotX: h,
|
4130 |
-
clientX: h,
|
4131 |
-
plotY: i,
|
4132 |
-
yBottom: i,
|
4133 |
-
onMouseOver: sa
|
4134 |
-
}))
|
4135 |
-
});
|
4136 |
-
b.length && a.push(b)
|
4137 |
-
} else O.prototype.getSegments.call(this), a = this.segments;
|
4138 |
-
this.segments = a
|
4139 |
-
}, getSegmentPath: function (a) {
|
4140 |
-
var b = O.prototype.getSegmentPath.call(this, a), c = [].concat(b), d, e = this.options;
|
4141 |
-
d = b.length;
|
4142 |
-
var f = this.yAxis.getThreshold(e.threshold), g;
|
4143 |
-
d === 3 && c.push("L", b[1], b[2]);
|
4144 |
-
if (e.stacking && !this.closedStacks)for (d = a.length - 1; d >= 0; d--)g = m(a[d].yBottom, f), d < a.length - 1 && e.step && c.push(a[d + 1].plotX, g), c.push(a[d].plotX, g); else this.closeSegment(c, a, f);
|
4145 |
-
this.areaPath = this.areaPath.concat(c);
|
4146 |
-
return b
|
4147 |
-
},
|
4148 |
-
closeSegment: function (a, b, c) {
|
4149 |
-
a.push("L", b[b.length - 1].plotX, c, "L", b[0].plotX, c)
|
4150 |
-
}, drawGraph: function () {
|
4151 |
-
this.areaPath = [];
|
4152 |
-
O.prototype.drawGraph.apply(this);
|
4153 |
-
var a = this, b = this.areaPath, c = this.options, d = c.negativeColor, e = c.negativeFillColor, f = [["area", this.color, c.fillColor]];
|
4154 |
-
(d || e) && f.push(["areaNeg", d, e]);
|
4155 |
-
p(f, function (d) {
|
4156 |
-
var e = d[0], f = a[e];
|
4157 |
-
f ? f.animate({d: b}) : a[e] = a.chart.renderer.path(b).attr({
|
4158 |
-
fill: m(d[2], ya(d[1]).setOpacity(m(c.fillOpacity, 0.75)).get()),
|
4159 |
-
zIndex: 0
|
4160 |
-
}).add(a.group)
|
4161 |
-
})
|
4162 |
-
}, drawLegendSymbol: N.drawRectangle
|
4163 |
-
});
|
4164 |
-
F.area = pa;
|
4165 |
-
ba.spline = w(S);
|
4166 |
-
ga = ka(O, {
|
4167 |
-
type: "spline", getPointSpline: function (a, b, c) {
|
4168 |
-
var d = b.plotX, e = b.plotY, f = a[c - 1], g = a[c + 1], h, i, j, k;
|
4169 |
-
if (f && g) {
|
4170 |
-
a = f.plotY;
|
4171 |
-
j = g.plotX;
|
4172 |
-
var g = g.plotY, l;
|
4173 |
-
h = (1.5 * d + f.plotX) / 2.5;
|
4174 |
-
i = (1.5 * e + a) / 2.5;
|
4175 |
-
j = (1.5 * d + j) / 2.5;
|
4176 |
-
k = (1.5 * e + g) / 2.5;
|
4177 |
-
l = (k - i) * (j - d) / (j - h) + e - k;
|
4178 |
-
i += l;
|
4179 |
-
k += l;
|
4180 |
-
i > a && i > e ? (i = v(a, e), k = 2 * e - i) : i < a && i < e && (i = C(a, e), k = 2 * e - i);
|
4181 |
-
k > g && k > e ? (k = v(g, e), i = 2 * e - k) : k < g && k < e && (k = C(g, e), i = 2 * e - k);
|
4182 |
-
b.rightContX = j;
|
4183 |
-
b.rightContY = k
|
4184 |
-
}
|
4185 |
-
c ? (b = ["C", f.rightContX || f.plotX, f.rightContY || f.plotY, h || d, i || e, d, e], f.rightContX =
|
4186 |
-
f.rightContY = null) : b = ["M", d, e];
|
4187 |
-
return b
|
4188 |
-
}
|
4189 |
-
});
|
4190 |
-
F.spline = ga;
|
4191 |
-
ba.areaspline = w(ba.area);
|
4192 |
-
pa = pa.prototype;
|
4193 |
-
ga = ka(ga, {
|
4194 |
-
type: "areaspline",
|
4195 |
-
closedStacks: !0,
|
4196 |
-
getSegmentPath: pa.getSegmentPath,
|
4197 |
-
closeSegment: pa.closeSegment,
|
4198 |
-
drawGraph: pa.drawGraph,
|
4199 |
-
drawLegendSymbol: N.drawRectangle
|
4200 |
-
});
|
4201 |
-
F.areaspline = ga;
|
4202 |
-
ba.column = w(S, {
|
4203 |
-
borderColor: "#FFFFFF",
|
4204 |
-
borderRadius: 0,
|
4205 |
-
groupPadding: 0.2,
|
4206 |
-
marker: null,
|
4207 |
-
pointPadding: 0.1,
|
4208 |
-
minPointLength: 0,
|
4209 |
-
cropThreshold: 50,
|
4210 |
-
pointRange: null,
|
4211 |
-
states: {
|
4212 |
-
hover: {brightness: 0.1, shadow: !1, halo: !1}, select: {
|
4213 |
-
color: "#C0C0C0", borderColor: "#000000",
|
4214 |
-
shadow: !1
|
4215 |
-
}
|
4216 |
-
},
|
4217 |
-
dataLabels: {align: null, verticalAlign: null, y: null},
|
4218 |
-
stickyTracking: !1,
|
4219 |
-
tooltip: {distance: 6},
|
4220 |
-
threshold: 0
|
4221 |
-
});
|
4222 |
-
ga = ka(O, {
|
4223 |
-
type: "column",
|
4224 |
-
pointAttrToOptions: {stroke: "borderColor", fill: "color", r: "borderRadius"},
|
4225 |
-
cropShoulder: 0,
|
4226 |
-
trackerGroups: ["group", "dataLabelsGroup"],
|
4227 |
-
negStacks: !0,
|
4228 |
-
init: function () {
|
4229 |
-
O.prototype.init.apply(this, arguments);
|
4230 |
-
var a = this, b = a.chart;
|
4231 |
-
b.hasRendered && p(b.series, function (b) {
|
4232 |
-
if (b.type === a.type)b.isDirty = !0
|
4233 |
-
})
|
4234 |
-
},
|
4235 |
-
getColumnMetrics: function () {
|
4236 |
-
var a = this, b = a.options, c = a.xAxis, d = a.yAxis, e =
|
4237 |
-
c.reversed, f, g = {}, h, i = 0;
|
4238 |
-
b.grouping === !1 ? i = 1 : p(a.chart.series, function (b) {
|
4239 |
-
var c = b.options, e = b.yAxis;
|
4240 |
-
if (b.type === a.type && b.visible && d.len === e.len && d.pos === e.pos)c.stacking ? (f = b.stackKey, g[f] === t && (g[f] = i++), h = g[f]) : c.grouping !== !1 && (h = i++), b.columnIndex = h
|
4241 |
-
});
|
4242 |
-
var c = C(M(c.transA) * (c.ordinalSlope || b.pointRange || c.closestPointRange || c.tickInterval || 1), c.len), j = c * b.groupPadding, k = (c - 2 * j) / i, l = b.pointWidth, b = r(l) ? (k - l) / 2 : k * b.pointPadding, l = m(l, k - 2 * b);
|
4243 |
-
return a.columnMetrics = {
|
4244 |
-
width: l, offset: b + (j + ((e ? i - (a.columnIndex ||
|
4245 |
-
0) : a.columnIndex) || 0) * k - c / 2) * (e ? -1 : 1)
|
4246 |
-
}
|
4247 |
-
},
|
4248 |
-
translate: function () {
|
4249 |
-
var a = this, b = a.chart, c = a.options, d = a.borderWidth = m(c.borderWidth, a.activePointCount > 0.5 * a.xAxis.len ? 0 : 1), e = a.yAxis, f = a.translatedThreshold = e.getThreshold(c.threshold), g = m(c.minPointLength, 5), c = a.getColumnMetrics(), h = c.width, i = a.barW = Ka(v(h, 1 + 2 * d)), j = a.pointXOffset = c.offset, k = -(d % 2 ? 0.5 : 0), l = d % 2 ? 0.5 : 1;
|
4250 |
-
b.renderer.isVML && b.inverted && (l += 1);
|
4251 |
-
O.prototype.translate.apply(a);
|
4252 |
-
p(a.points, function (c) {
|
4253 |
-
var d = m(c.yBottom, f), p = C(v(-999 - d, c.plotY), e.len +
|
4254 |
-
999 + d), q = c.plotX + j, r = i, t = C(p, d), x;
|
4255 |
-
x = v(p, d) - t;
|
4256 |
-
M(x) < g && g && (x = g, t = u(M(t - f) > g ? d - g : f - (e.translate(c.y, 0, 1, 0, 1) <= f ? g : 0)));
|
4257 |
-
c.barX = q;
|
4258 |
-
c.pointWidth = h;
|
4259 |
-
c.tooltipPos = b.inverted ? [e.len - p, a.xAxis.len - q - r / 2] : [q + r / 2, p];
|
4260 |
-
d = M(q) < 0.5;
|
4261 |
-
r = u(q + r) + k;
|
4262 |
-
q = u(q) + k;
|
4263 |
-
r -= q;
|
4264 |
-
p = M(t) < 0.5;
|
4265 |
-
x = u(t + x) + l;
|
4266 |
-
t = u(t) + l;
|
4267 |
-
x -= t;
|
4268 |
-
d && (q += 1, r -= 1);
|
4269 |
-
p && (t -= 1, x += 1);
|
4270 |
-
c.shapeType = "rect";
|
4271 |
-
c.shapeArgs = {x: q, y: t, width: r, height: x}
|
4272 |
-
})
|
4273 |
-
},
|
4274 |
-
getSymbol: sa,
|
4275 |
-
drawLegendSymbol: N.drawRectangle,
|
4276 |
-
drawGraph: sa,
|
4277 |
-
drawPoints: function () {
|
4278 |
-
var a = this, b = this.chart, c = a.options, d = b.renderer, e = c.animationLimit ||
|
4279 |
-
250, f, g, h;
|
4280 |
-
p(a.points, function (i) {
|
4281 |
-
var j = i.plotY, k = i.graphic;
|
4282 |
-
if (j !== t && !isNaN(j) && i.y !== null)f = i.shapeArgs, h = r(a.borderWidth) ? {"stroke-width": a.borderWidth} : {}, g = i.pointAttr[i.selected ? "select" : ""] || a.pointAttr[""], k ? (bb(k), k.attr(h)[b.pointCount < e ? "animate" : "attr"](w(f))) : i.graphic = d[i.shapeType](f).attr(g).attr(h).add(a.group).shadow(c.shadow, null, c.stacking && !c.borderRadius); else if (k)i.graphic = k.destroy()
|
4283 |
-
})
|
4284 |
-
},
|
4285 |
-
animate: function (a) {
|
4286 |
-
var b = this.yAxis, c = this.options, d = this.chart.inverted, e = {};
|
4287 |
-
if (aa)a ?
|
4288 |
-
(e.scaleY = 0.001, a = C(b.pos + b.len, v(b.pos, b.toPixels(c.threshold))), d ? e.translateX = a - b.len : e.translateY = a, this.group.attr(e)) : (e.scaleY = 1, e[d ? "translateX" : "translateY"] = b.pos, this.group.animate(e, this.options.animation), this.animate = null)
|
4289 |
-
},
|
4290 |
-
remove: function () {
|
4291 |
-
var a = this, b = a.chart;
|
4292 |
-
b.hasRendered && p(b.series, function (b) {
|
4293 |
-
if (b.type === a.type)b.isDirty = !0
|
4294 |
-
});
|
4295 |
-
O.prototype.remove.apply(a, arguments)
|
4296 |
-
}
|
4297 |
-
});
|
4298 |
-
F.column = ga;
|
4299 |
-
ba.bar = w(ba.column);
|
4300 |
-
pa = ka(ga, {type: "bar", inverted: !0});
|
4301 |
-
F.bar = pa;
|
4302 |
-
ba.scatter = w(S, {
|
4303 |
-
lineWidth: 0, tooltip: {
|
4304 |
-
headerFormat: '<span style="color:{series.color}">●</span> <span style="font-size: 10px;"> {series.name}</span><br/>',
|
4305 |
-
pointFormat: "x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"
|
4306 |
-
}, stickyTracking: !1
|
4307 |
-
});
|
4308 |
-
pa = ka(O, {
|
4309 |
-
type: "scatter",
|
4310 |
-
sorted: !1,
|
4311 |
-
requireSorting: !1,
|
4312 |
-
noSharedTooltip: !0,
|
4313 |
-
trackerGroups: ["markerGroup"],
|
4314 |
-
takeOrdinalPosition: !1,
|
4315 |
-
singularTooltips: !0,
|
4316 |
-
drawGraph: function () {
|
4317 |
-
this.options.lineWidth && O.prototype.drawGraph.call(this)
|
4318 |
-
}
|
4319 |
-
});
|
4320 |
-
F.scatter = pa;
|
4321 |
-
ba.pie = w(S, {
|
4322 |
-
borderColor: "#FFFFFF",
|
4323 |
-
borderWidth: 1,
|
4324 |
-
center: [null, null],
|
4325 |
-
clip: !1,
|
4326 |
-
colorByPoint: !0,
|
4327 |
-
dataLabels: {
|
4328 |
-
distance: 30, enabled: !0, formatter: function () {
|
4329 |
-
return this.point.name
|
4330 |
-
}
|
4331 |
-
},
|
4332 |
-
ignoreHiddenPoint: !0,
|
4333 |
-
legendType: "point",
|
4334 |
-
marker: null,
|
4335 |
-
size: null,
|
4336 |
-
showInLegend: !1,
|
4337 |
-
slicedOffset: 10,
|
4338 |
-
states: {hover: {brightness: 0.1, shadow: !1}},
|
4339 |
-
stickyTracking: !1,
|
4340 |
-
tooltip: {followPointer: !0}
|
4341 |
-
});
|
4342 |
-
S = {
|
4343 |
-
type: "pie",
|
4344 |
-
isCartesian: !1,
|
4345 |
-
pointClass: ka(Ea, {
|
4346 |
-
init: function () {
|
4347 |
-
Ea.prototype.init.apply(this, arguments);
|
4348 |
-
var a = this, b;
|
4349 |
-
if (a.y < 0)a.y = null;
|
4350 |
-
q(a, {visible: a.visible !== !1, name: m(a.name, "Slice")});
|
4351 |
-
b = function (b) {
|
4352 |
-
a.slice(b.type === "select")
|
4353 |
-
};
|
4354 |
-
K(a, "select", b);
|
4355 |
-
K(a, "unselect", b);
|
4356 |
-
return a
|
4357 |
-
}, setVisible: function (a) {
|
4358 |
-
var b = this, c = b.series, d = c.chart;
|
4359 |
-
b.visible = b.options.visible =
|
4360 |
-
a = a === t ? !b.visible : a;
|
4361 |
-
c.options.data[Da(b, c.data)] = b.options;
|
4362 |
-
p(["graphic", "dataLabel", "connector", "shadowGroup"], function (c) {
|
4363 |
-
if (b[c])b[c][a ? "show" : "hide"](!0)
|
4364 |
-
});
|
4365 |
-
b.legendItem && d.legend.colorizeItem(b, a);
|
4366 |
-
if (!c.isDirty && c.options.ignoreHiddenPoint)c.isDirty = !0, d.redraw()
|
4367 |
-
}, slice: function (a, b, c) {
|
4368 |
-
var d = this.series;
|
4369 |
-
Qa(c, d.chart);
|
4370 |
-
m(b, !0);
|
4371 |
-
this.sliced = this.options.sliced = a = r(a) ? a : !this.sliced;
|
4372 |
-
d.options.data[Da(this, d.data)] = this.options;
|
4373 |
-
a = a ? this.slicedTranslation : {translateX: 0, translateY: 0};
|
4374 |
-
this.graphic.animate(a);
|
4375 |
-
this.shadowGroup && this.shadowGroup.animate(a)
|
4376 |
-
}, haloPath: function (a) {
|
4377 |
-
var b = this.shapeArgs, c = this.series.chart;
|
4378 |
-
return this.series.chart.renderer.symbols.arc(c.plotLeft + b.x, c.plotTop + b.y, b.r + a, b.r + a, {
|
4379 |
-
innerR: this.shapeArgs.r,
|
4380 |
-
start: b.start,
|
4381 |
-
end: b.end
|
4382 |
-
})
|
4383 |
-
}
|
4384 |
-
}),
|
4385 |
-
requireSorting: !1,
|
4386 |
-
noSharedTooltip: !0,
|
4387 |
-
trackerGroups: ["group", "dataLabelsGroup"],
|
4388 |
-
axisTypes: [],
|
4389 |
-
pointAttrToOptions: {stroke: "borderColor", "stroke-width": "borderWidth", fill: "color"},
|
4390 |
-
singularTooltips: !0,
|
4391 |
-
getColor: sa,
|
4392 |
-
animate: function (a) {
|
4393 |
-
var b = this, c = b.points, d =
|
4394 |
-
b.startAngleRad;
|
4395 |
-
if (!a)p(c, function (a) {
|
4396 |
-
var c = a.graphic, a = a.shapeArgs;
|
4397 |
-
c && (c.attr({r: b.center[3] / 2, start: d, end: d}), c.animate({
|
4398 |
-
r: a.r,
|
4399 |
-
start: a.start,
|
4400 |
-
end: a.end
|
4401 |
-
}, b.options.animation))
|
4402 |
-
}), b.animate = null
|
4403 |
-
},
|
4404 |
-
setData: function (a, b, c, d) {
|
4405 |
-
O.prototype.setData.call(this, a, !1, c, d);
|
4406 |
-
this.processData();
|
4407 |
-
this.generatePoints();
|
4408 |
-
m(b, !0) && this.chart.redraw(c)
|
4409 |
-
},
|
4410 |
-
generatePoints: function () {
|
4411 |
-
var a, b = 0, c, d, e, f = this.options.ignoreHiddenPoint;
|
4412 |
-
O.prototype.generatePoints.call(this);
|
4413 |
-
c = this.points;
|
4414 |
-
d = c.length;
|
4415 |
-
for (a = 0; a < d; a++)e = c[a], b += f && !e.visible ?
|
4416 |
-
0 : e.y;
|
4417 |
-
this.total = b;
|
4418 |
-
for (a = 0; a < d; a++)e = c[a], e.percentage = b > 0 ? e.y / b * 100 : 0, e.total = b
|
4419 |
-
},
|
4420 |
-
translate: function (a) {
|
4421 |
-
this.generatePoints();
|
4422 |
-
var b = 0, c = this.options, d = c.slicedOffset, e = d + c.borderWidth, f, g, h, i = c.startAngle || 0, j = this.startAngleRad = ma / 180 * (i - 90), i = (this.endAngleRad = ma / 180 * (m(c.endAngle, i + 360) - 90)) - j, k = this.points, l = c.dataLabels.distance, c = c.ignoreHiddenPoint, o, n = k.length, p;
|
4423 |
-
if (!a)this.center = a = this.getCenter();
|
4424 |
-
this.getX = function (b, c) {
|
4425 |
-
h = U.asin(C((b - a[1]) / (a[2] / 2 + l), 1));
|
4426 |
-
return a[0] + (c ? -1 : 1) * Z(h) * (a[2] /
|
4427 |
-
2 + l)
|
4428 |
-
};
|
4429 |
-
for (o = 0; o < n; o++) {
|
4430 |
-
p = k[o];
|
4431 |
-
f = j + b * i;
|
4432 |
-
if (!c || p.visible)b += p.percentage / 100;
|
4433 |
-
g = j + b * i;
|
4434 |
-
p.shapeType = "arc";
|
4435 |
-
p.shapeArgs = {
|
4436 |
-
x: a[0],
|
4437 |
-
y: a[1],
|
4438 |
-
r: a[2] / 2,
|
4439 |
-
innerR: a[3] / 2,
|
4440 |
-
start: u(f * 1E3) / 1E3,
|
4441 |
-
end: u(g * 1E3) / 1E3
|
4442 |
-
};
|
4443 |
-
h = (g + f) / 2;
|
4444 |
-
h > 1.5 * ma ? h -= 2 * ma : h < -ma / 2 && (h += 2 * ma);
|
4445 |
-
p.slicedTranslation = {translateX: u(Z(h) * d), translateY: u(ea(h) * d)};
|
4446 |
-
f = Z(h) * a[2] / 2;
|
4447 |
-
g = ea(h) * a[2] / 2;
|
4448 |
-
p.tooltipPos = [a[0] + f * 0.7, a[1] + g * 0.7];
|
4449 |
-
p.half = h < -ma / 2 || h > ma / 2 ? 1 : 0;
|
4450 |
-
p.angle = h;
|
4451 |
-
e = C(e, l / 2);
|
4452 |
-
p.labelPos = [a[0] + f + Z(h) * l, a[1] + g + ea(h) * l, a[0] + f + Z(h) * e, a[1] + g + ea(h) * e, a[0] + f, a[1] + g, l < 0 ?
|
4453 |
-
"center" : p.half ? "right" : "left", h]
|
4454 |
-
}
|
4455 |
-
},
|
4456 |
-
drawGraph: null,
|
4457 |
-
drawPoints: function () {
|
4458 |
-
var a = this, b = a.chart.renderer, c, d, e = a.options.shadow, f, g;
|
4459 |
-
if (e && !a.shadowGroup)a.shadowGroup = b.g("shadow").add(a.group);
|
4460 |
-
p(a.points, function (h) {
|
4461 |
-
d = h.graphic;
|
4462 |
-
g = h.shapeArgs;
|
4463 |
-
f = h.shadowGroup;
|
4464 |
-
if (e && !f)f = h.shadowGroup = b.g("shadow").add(a.shadowGroup);
|
4465 |
-
c = h.sliced ? h.slicedTranslation : {translateX: 0, translateY: 0};
|
4466 |
-
f && f.attr(c);
|
4467 |
-
d ? d.animate(q(g, c)) : h.graphic = d = b[h.shapeType](g).setRadialReference(a.center).attr(h.pointAttr[h.selected ? "select" :
|
4468 |
-
""]).attr({"stroke-linejoin": "round"}).attr(c).add(a.group).shadow(e, f);
|
4469 |
-
h.visible !== void 0 && h.setVisible(h.visible)
|
4470 |
-
})
|
4471 |
-
},
|
4472 |
-
sortByAngle: function (a, b) {
|
4473 |
-
a.sort(function (a, d) {
|
4474 |
-
return a.angle !== void 0 && (d.angle - a.angle) * b
|
4475 |
-
})
|
4476 |
-
},
|
4477 |
-
drawLegendSymbol: N.drawRectangle,
|
4478 |
-
getCenter: X.getCenter,
|
4479 |
-
getSymbol: sa
|
4480 |
-
};
|
4481 |
-
S = ka(O, S);
|
4482 |
-
F.pie = S;
|
4483 |
-
O.prototype.drawDataLabels = function () {
|
4484 |
-
var a = this, b = a.options, c = b.cursor, d = b.dataLabels, e = a.points, f, g, h, i;
|
4485 |
-
if (d.enabled || a._hasPointLabels)a.dlProcessOptions && a.dlProcessOptions(d), i = a.plotGroup("dataLabelsGroup",
|
4486 |
-
"data-labels", "hidden", d.zIndex || 6), !a.hasRendered && m(d.defer, !0) && (i.attr({opacity: 0}), K(a, "afterAnimate", function () {
|
4487 |
-
a.dataLabelsGroup.show()[b.animation ? "animate" : "attr"]({opacity: 1}, {duration: 200})
|
4488 |
-
})), g = d, p(e, function (b) {
|
4489 |
-
var e, l = b.dataLabel, o, n, p = b.connector, u = !0;
|
4490 |
-
f = b.options && b.options.dataLabels;
|
4491 |
-
e = m(f && f.enabled, g.enabled);
|
4492 |
-
if (l && !e)b.dataLabel = l.destroy(); else if (e) {
|
4493 |
-
d = w(g, f);
|
4494 |
-
e = d.rotation;
|
4495 |
-
o = b.getLabelConfig();
|
4496 |
-
h = d.format ? Ia(d.format, o) : d.formatter.call(o, d);
|
4497 |
-
d.style.color = m(d.color, d.style.color,
|
4498 |
-
a.color, "black");
|
4499 |
-
if (l)if (r(h))l.attr({text: h}), u = !1; else {
|
4500 |
-
if (b.dataLabel = l = l.destroy(), p)b.connector = p.destroy()
|
4501 |
-
} else if (r(h)) {
|
4502 |
-
l = {
|
4503 |
-
fill: d.backgroundColor,
|
4504 |
-
stroke: d.borderColor,
|
4505 |
-
"stroke-width": d.borderWidth,
|
4506 |
-
r: d.borderRadius || 0,
|
4507 |
-
rotation: e,
|
4508 |
-
padding: d.padding,
|
4509 |
-
zIndex: 1
|
4510 |
-
};
|
4511 |
-
for (n in l)l[n] === t && delete l[n];
|
4512 |
-
l = b.dataLabel = a.chart.renderer[e ? "text" : "label"](h, 0, -999, null, null, null, d.useHTML).attr(l).css(q(d.style, c && {cursor: c})).add(i).shadow(d.shadow)
|
4513 |
-
}
|
4514 |
-
l && a.alignDataLabel(b, l, d, null, u)
|
4515 |
-
}
|
4516 |
-
})
|
4517 |
-
};
|
4518 |
-
O.prototype.alignDataLabel =
|
4519 |
-
function (a, b, c, d, e) {
|
4520 |
-
var f = this.chart, g = f.inverted, h = m(a.plotX, -999), i = m(a.plotY, -999), j = b.getBBox();
|
4521 |
-
if (a = this.visible && (a.series.forceDL || f.isInsidePlot(h, u(i), g) || d && f.isInsidePlot(h, g ? d.x + 1 : d.y + d.height - 1, g)))d = q({
|
4522 |
-
x: g ? f.plotWidth - i : h,
|
4523 |
-
y: u(g ? f.plotHeight - h : i),
|
4524 |
-
width: 0,
|
4525 |
-
height: 0
|
4526 |
-
}, d), q(c, {width: j.width, height: j.height}), c.rotation ? (g = {
|
4527 |
-
align: c.align,
|
4528 |
-
x: d.x + c.x + d.width / 2,
|
4529 |
-
y: d.y + c.y + d.height / 2
|
4530 |
-
}, b[e ? "attr" : "animate"](g)) : (b.align(c, null, d), g = b.alignAttr, m(c.overflow, "justify") === "justify" ? this.justifyDataLabel(b,
|
4531 |
-
c, g, j, d, e) : m(c.crop, !0) && (a = f.isInsidePlot(g.x, g.y) && f.isInsidePlot(g.x + j.width, g.y + j.height)));
|
4532 |
-
if (!a)b.attr({y: -999}), b.placed = !1
|
4533 |
-
};
|
4534 |
-
O.prototype.justifyDataLabel = function (a, b, c, d, e, f) {
|
4535 |
-
var g = this.chart, h = b.align, i = b.verticalAlign, j, k;
|
4536 |
-
j = c.x;
|
4537 |
-
if (j < 0)h === "right" ? b.align = "left" : b.x = -j, k = !0;
|
4538 |
-
j = c.x + d.width;
|
4539 |
-
if (j > g.plotWidth)h === "left" ? b.align = "right" : b.x = g.plotWidth - j, k = !0;
|
4540 |
-
j = c.y;
|
4541 |
-
if (j < 0)i === "bottom" ? b.verticalAlign = "top" : b.y = -j, k = !0;
|
4542 |
-
j = c.y + d.height;
|
4543 |
-
if (j > g.plotHeight)i === "top" ? b.verticalAlign = "bottom" : b.y = g.plotHeight -
|
4544 |
-
j, k = !0;
|
4545 |
-
if (k)a.placed = !f, a.align(b, null, e)
|
4546 |
-
};
|
4547 |
-
if (F.pie)F.pie.prototype.drawDataLabels = function () {
|
4548 |
-
var a = this, b = a.data, c, d = a.chart, e = a.options.dataLabels, f = m(e.connectorPadding, 10), g = m(e.connectorWidth, 1), h = d.plotWidth, d = d.plotHeight, i, j, k = m(e.softConnector, !0), l = e.distance, o = a.center, n = o[2] / 2, q = o[1], r = l > 0, t, w, x, y, z = [[], []], A, C, G, D, B, F = [0, 0, 0, 0], N = function (a, b) {
|
4549 |
-
return b.y - a.y
|
4550 |
-
};
|
4551 |
-
if (a.visible && (e.enabled || a._hasPointLabels)) {
|
4552 |
-
O.prototype.drawDataLabels.apply(a);
|
4553 |
-
p(b, function (a) {
|
4554 |
-
a.dataLabel && a.visible && z[a.half].push(a)
|
4555 |
-
});
|
4556 |
-
for (D = 0; !y && b[D];)y = b[D] && b[D].dataLabel && (b[D].dataLabel.getBBox().height || 21), D++;
|
4557 |
-
for (D = 2; D--;) {
|
4558 |
-
var b = [], K = [], H = z[D], I = H.length, E;
|
4559 |
-
a.sortByAngle(H, D - 0.5);
|
4560 |
-
if (l > 0) {
|
4561 |
-
for (B = q - n - l; B <= q + n + l; B += y)b.push(B);
|
4562 |
-
w = b.length;
|
4563 |
-
if (I > w) {
|
4564 |
-
c = [].concat(H);
|
4565 |
-
c.sort(N);
|
4566 |
-
for (B = I; B--;)c[B].rank = B;
|
4567 |
-
for (B = I; B--;)H[B].rank >= w && H.splice(B, 1);
|
4568 |
-
I = H.length
|
4569 |
-
}
|
4570 |
-
for (B = 0; B < I; B++) {
|
4571 |
-
c = H[B];
|
4572 |
-
x = c.labelPos;
|
4573 |
-
c = 9999;
|
4574 |
-
var Q, P;
|
4575 |
-
for (P = 0; P < w; P++)Q = M(b[P] - x[1]), Q < c && (c = Q, E = P);
|
4576 |
-
if (E < B && b[B] !== null)E = B; else for (w < I - B + E && b[B] !== null && (E = w - I + B); b[E] === null;)E++;
|
4577 |
-
K.push({
|
4578 |
-
i: E,
|
4579 |
-
y: b[E]
|
4580 |
-
});
|
4581 |
-
b[E] = null
|
4582 |
-
}
|
4583 |
-
K.sort(N)
|
4584 |
-
}
|
4585 |
-
for (B = 0; B < I; B++) {
|
4586 |
-
c = H[B];
|
4587 |
-
x = c.labelPos;
|
4588 |
-
t = c.dataLabel;
|
4589 |
-
G = c.visible === !1 ? "hidden" : "visible";
|
4590 |
-
c = x[1];
|
4591 |
-
if (l > 0) {
|
4592 |
-
if (w = K.pop(), E = w.i, C = w.y, c > C && b[E + 1] !== null || c < C && b[E - 1] !== null)C = c
|
4593 |
-
} else C = c;
|
4594 |
-
A = e.justify ? o[0] + (D ? -1 : 1) * (n + l) : a.getX(E === 0 || E === b.length - 1 ? c : C, D);
|
4595 |
-
t._attr = {visibility: G, align: x[6]};
|
4596 |
-
t._pos = {x: A + e.x + ({left: f, right: -f}[x[6]] || 0), y: C + e.y - 10};
|
4597 |
-
t.connX = A;
|
4598 |
-
t.connY = C;
|
4599 |
-
if (this.options.size === null)w = t.width, A - w < f ? F[3] = v(u(w - A + f), F[3]) : A + w > h - f && (F[1] = v(u(A + w - h + f), F[1])), C - y / 2 < 0 ? F[0] =
|
4600 |
-
v(u(-C + y / 2), F[0]) : C + y / 2 > d && (F[2] = v(u(C + y / 2 - d), F[2]))
|
4601 |
-
}
|
4602 |
-
}
|
4603 |
-
if (Ba(F) === 0 || this.verifyDataLabelOverflow(F))this.placeDataLabels(), r && g && p(this.points, function (b) {
|
4604 |
-
i = b.connector;
|
4605 |
-
x = b.labelPos;
|
4606 |
-
if ((t = b.dataLabel) && t._pos)G = t._attr.visibility, A = t.connX, C = t.connY, j = k ? ["M", A + (x[6] === "left" ? 5 : -5), C, "C", A, C, 2 * x[2] - x[4], 2 * x[3] - x[5], x[2], x[3], "L", x[4], x[5]] : ["M", A + (x[6] === "left" ? 5 : -5), C, "L", x[2], x[3], "L", x[4], x[5]], i ? (i.animate({d: j}), i.attr("visibility", G)) : b.connector = i = a.chart.renderer.path(j).attr({
|
4607 |
-
"stroke-width": g,
|
4608 |
-
stroke: e.connectorColor || b.color || "#606060", visibility: G
|
4609 |
-
}).add(a.dataLabelsGroup); else if (i)b.connector = i.destroy()
|
4610 |
-
})
|
4611 |
-
}
|
4612 |
-
}, F.pie.prototype.placeDataLabels = function () {
|
4613 |
-
p(this.points, function (a) {
|
4614 |
-
var a = a.dataLabel, b;
|
4615 |
-
if (a)(b = a._pos) ? (a.attr(a._attr), a[a.moved ? "animate" : "attr"](b), a.moved = !0) : a && a.attr({y: -999})
|
4616 |
-
})
|
4617 |
-
}, F.pie.prototype.alignDataLabel = sa, F.pie.prototype.verifyDataLabelOverflow = function (a) {
|
4618 |
-
var b = this.center, c = this.options, d = c.center, e = c = c.minSize || 80, f;
|
4619 |
-
d[0] !== null ? e = v(b[2] - v(a[1], a[3]), c) : (e = v(b[2] -
|
4620 |
-
a[1] - a[3], c), b[0] += (a[3] - a[1]) / 2);
|
4621 |
-
d[1] !== null ? e = v(C(e, b[2] - v(a[0], a[2])), c) : (e = v(C(e, b[2] - a[0] - a[2]), c), b[1] += (a[0] - a[2]) / 2);
|
4622 |
-
e < b[2] ? (b[2] = e, this.translate(b), p(this.points, function (a) {
|
4623 |
-
if (a.dataLabel)a.dataLabel._pos = null
|
4624 |
-
}), this.drawDataLabels && this.drawDataLabels()) : f = !0;
|
4625 |
-
return f
|
4626 |
-
};
|
4627 |
-
if (F.column)F.column.prototype.alignDataLabel = function (a, b, c, d, e) {
|
4628 |
-
var f = this.chart, g = f.inverted, h = a.dlBox || a.shapeArgs, i = a.below || a.plotY > m(this.translatedThreshold, f.plotSizeY), j = m(c.inside, !!this.options.stacking);
|
4629 |
-
if (h &&
|
4630 |
-
(d = w(h), g && (d = {
|
4631 |
-
x: f.plotWidth - d.y - d.height,
|
4632 |
-
y: f.plotHeight - d.x - d.width,
|
4633 |
-
width: d.height,
|
4634 |
-
height: d.width
|
4635 |
-
}), !j))g ? (d.x += i ? 0 : d.width, d.width = 0) : (d.y += i ? d.height : 0, d.height = 0);
|
4636 |
-
c.align = m(c.align, !g || j ? "center" : i ? "right" : "left");
|
4637 |
-
c.verticalAlign = m(c.verticalAlign, g || j ? "middle" : i ? "top" : "bottom");
|
4638 |
-
O.prototype.alignDataLabel.call(this, a, b, c, d, e)
|
4639 |
-
};
|
4640 |
-
S = R.TrackerMixin = {
|
4641 |
-
drawTrackerPoint: function () {
|
4642 |
-
var a = this, b = a.chart, c = b.pointer, d = a.options.cursor, e = d && {cursor: d}, f = function (c) {
|
4643 |
-
var d = c.target, e;
|
4644 |
-
if (b.hoverSeries !== a)a.onMouseOver();
|
4645 |
-
for (; d && !e;)e = d.point, d = d.parentNode;
|
4646 |
-
if (e !== t && e !== b.hoverPoint)e.onMouseOver(c)
|
4647 |
-
};
|
4648 |
-
p(a.points, function (a) {
|
4649 |
-
if (a.graphic)a.graphic.element.point = a;
|
4650 |
-
if (a.dataLabel)a.dataLabel.element.point = a
|
4651 |
-
});
|
4652 |
-
if (!a._hasTracking)p(a.trackerGroups, function (b) {
|
4653 |
-
if (a[b] && (a[b].addClass("highcharts-tracker").on("mouseover", f).on("mouseout", function (a) {
|
4654 |
-
c.onTrackerMouseOut(a)
|
4655 |
-
}).css(e), $a))a[b].on("touchstart", f)
|
4656 |
-
}), a._hasTracking = !0
|
4657 |
-
}, drawTrackerGraph: function () {
|
4658 |
-
var a = this, b = a.options, c = b.trackByArea, d = [].concat(c ? a.areaPath :
|
4659 |
-
a.graphPath), e = d.length, f = a.chart, g = f.pointer, h = f.renderer, i = f.options.tooltip.snap, j = a.tracker, k = b.cursor, l = k && {cursor: k}, k = a.singlePoints, m, n = function () {
|
4660 |
-
if (f.hoverSeries !== a)a.onMouseOver()
|
4661 |
-
}, q = "rgba(192,192,192," + (aa ? 1.0E-4 : 0.002) + ")";
|
4662 |
-
if (e && !c)for (m = e + 1; m--;)d[m] === "M" && d.splice(m + 1, 0, d[m + 1] - i, d[m + 2], "L"), (m && d[m] === "M" || m === e) && d.splice(m, 0, "L", d[m - 2] + i, d[m - 1]);
|
4663 |
-
for (m = 0; m < k.length; m++)e = k[m], d.push("M", e.plotX - i, e.plotY, "L", e.plotX + i, e.plotY);
|
4664 |
-
j ? j.attr({d: d}) : (a.tracker = h.path(d).attr({
|
4665 |
-
"stroke-linejoin": "round",
|
4666 |
-
visibility: a.visible ? "visible" : "hidden",
|
4667 |
-
stroke: q,
|
4668 |
-
fill: c ? q : Q,
|
4669 |
-
"stroke-width": b.lineWidth + (c ? 0 : 2 * i),
|
4670 |
-
zIndex: 2
|
4671 |
-
}).add(a.group), p([a.tracker, a.markerGroup], function (a) {
|
4672 |
-
a.addClass("highcharts-tracker").on("mouseover", n).on("mouseout", function (a) {
|
4673 |
-
g.onTrackerMouseOut(a)
|
4674 |
-
}).css(l);
|
4675 |
-
if ($a)a.on("touchstart", n)
|
4676 |
-
}))
|
4677 |
-
}
|
4678 |
-
};
|
4679 |
-
if (F.column)ga.prototype.drawTracker = S.drawTrackerPoint;
|
4680 |
-
if (F.pie)F.pie.prototype.drawTracker = S.drawTrackerPoint;
|
4681 |
-
if (F.scatter)pa.prototype.drawTracker = S.drawTrackerPoint;
|
4682 |
-
q(lb.prototype, {
|
4683 |
-
setItemEvents: function (a,
|
4684 |
-
b, c, d, e) {
|
4685 |
-
var f = this;
|
4686 |
-
(c ? b : a.legendGroup).on("mouseover", function () {
|
4687 |
-
a.setState("hover");
|
4688 |
-
b.css(f.options.itemHoverStyle)
|
4689 |
-
}).on("mouseout", function () {
|
4690 |
-
b.css(a.visible ? d : e);
|
4691 |
-
a.setState()
|
4692 |
-
}).on("click", function (b) {
|
4693 |
-
var c = function () {
|
4694 |
-
a.setVisible()
|
4695 |
-
}, b = {browserEvent: b};
|
4696 |
-
a.firePointEvent ? a.firePointEvent("legendItemClick", b, c) : D(a, "legendItemClick", b, c)
|
4697 |
-
})
|
4698 |
-
}, createCheckboxForItem: function (a) {
|
4699 |
-
a.checkbox = Y("input", {
|
4700 |
-
type: "checkbox",
|
4701 |
-
checked: a.selected,
|
4702 |
-
defaultChecked: a.selected
|
4703 |
-
}, this.options.itemCheckboxStyle, this.chart.container);
|
4704 |
-
K(a.checkbox, "click", function (b) {
|
4705 |
-
D(a, "checkboxClick", {checked: b.target.checked}, function () {
|
4706 |
-
a.select()
|
4707 |
-
})
|
4708 |
-
})
|
4709 |
-
}
|
4710 |
-
});
|
4711 |
-
E.legend.itemStyle.cursor = "pointer";
|
4712 |
-
q(Ya.prototype, {
|
4713 |
-
showResetZoom: function () {
|
4714 |
-
var a = this, b = E.lang, c = a.options.chart.resetZoomButton, d = c.theme, e = d.states, f = c.relativeTo === "chart" ? null : "plotBox";
|
4715 |
-
this.resetZoomButton = a.renderer.button(b.resetZoom, null, null, function () {
|
4716 |
-
a.zoomOut()
|
4717 |
-
}, d, e && e.hover).attr({align: c.position.align, title: b.resetZoomTitle}).add().align(c.position, !1, f)
|
4718 |
-
}, zoomOut: function () {
|
4719 |
-
var a =
|
4720 |
-
this;
|
4721 |
-
D(a, "selection", {resetSelection: !0}, function () {
|
4722 |
-
a.zoom()
|
4723 |
-
})
|
4724 |
-
}, zoom: function (a) {
|
4725 |
-
var b, c = this.pointer, d = !1, e;
|
4726 |
-
!a || a.resetSelection ? p(this.axes, function (a) {
|
4727 |
-
b = a.zoom()
|
4728 |
-
}) : p(a.xAxis.concat(a.yAxis), function (a) {
|
4729 |
-
var e = a.axis, h = e.isXAxis;
|
4730 |
-
if (c[h ? "zoomX" : "zoomY"] || c[h ? "pinchX" : "pinchY"])b = e.zoom(a.min, a.max), e.displayBtn && (d = !0)
|
4731 |
-
});
|
4732 |
-
e = this.resetZoomButton;
|
4733 |
-
if (d && !e)this.showResetZoom(); else if (!d && ca(e))this.resetZoomButton = e.destroy();
|
4734 |
-
b && this.redraw(m(this.options.chart.animation, a && a.animation, this.pointCount <
|
4735 |
-
100))
|
4736 |
-
}, pan: function (a, b) {
|
4737 |
-
var c = this, d = c.hoverPoints, e;
|
4738 |
-
d && p(d, function (a) {
|
4739 |
-
a.setState()
|
4740 |
-
});
|
4741 |
-
p(b === "xy" ? [1, 0] : [1], function (b) {
|
4742 |
-
var d = a[b ? "chartX" : "chartY"], h = c[b ? "xAxis" : "yAxis"][0], i = c[b ? "mouseDownX" : "mouseDownY"], j = (h.pointRange || 0) / 2, k = h.getExtremes(), l = h.toValue(i - d, !0) + j, i = h.toValue(i + c[b ? "plotWidth" : "plotHeight"] - d, !0) - j;
|
4743 |
-
h.series.length && l > C(k.dataMin, k.min) && i < v(k.dataMax, k.max) && (h.setExtremes(l, i, !1, !1, {trigger: "pan"}), e = !0);
|
4744 |
-
c[b ? "mouseDownX" : "mouseDownY"] = d
|
4745 |
-
});
|
4746 |
-
e && c.redraw(!1);
|
4747 |
-
G(c.container, {cursor: "move"})
|
4748 |
-
}
|
4749 |
-
});
|
4750 |
-
q(Ea.prototype, {
|
4751 |
-
select: function (a, b) {
|
4752 |
-
var c = this, d = c.series, e = d.chart, a = m(a, !c.selected);
|
4753 |
-
c.firePointEvent(a ? "select" : "unselect", {accumulate: b}, function () {
|
4754 |
-
c.selected = c.options.selected = a;
|
4755 |
-
d.options.data[Da(c, d.data)] = c.options;
|
4756 |
-
c.setState(a && "select");
|
4757 |
-
b || p(e.getSelectedPoints(), function (a) {
|
4758 |
-
if (a.selected && a !== c)a.selected = a.options.selected = !1, d.options.data[Da(a, d.data)] = a.options, a.setState(""), a.firePointEvent("unselect")
|
4759 |
-
})
|
4760 |
-
})
|
4761 |
-
}, onMouseOver: function (a) {
|
4762 |
-
var b = this.series, c = b.chart, d = c.tooltip, e = c.hoverPoint;
|
4763 |
-
if (e && e !== this)e.onMouseOut();
|
4764 |
-
this.firePointEvent("mouseOver");
|
4765 |
-
d && (!d.shared || b.noSharedTooltip) && d.refresh(this, a);
|
4766 |
-
this.setState("hover");
|
4767 |
-
c.hoverPoint = this
|
4768 |
-
}, onMouseOut: function () {
|
4769 |
-
var a = this.series.chart, b = a.hoverPoints;
|
4770 |
-
if (!b || Da(this, b) === -1)this.firePointEvent("mouseOut"), this.setState(), a.hoverPoint = null
|
4771 |
-
}, importEvents: function () {
|
4772 |
-
if (!this.hasImportedEvents) {
|
4773 |
-
var a = w(this.series.options.point, this.options).events, b;
|
4774 |
-
this.events = a;
|
4775 |
-
for (b in a)K(this, b, a[b]);
|
4776 |
-
this.hasImportedEvents = !0
|
4777 |
-
}
|
4778 |
-
}, setState: function (a,
|
4779 |
-
b) {
|
4780 |
-
var c = this.plotX, d = this.plotY, e = this.series, f = e.options.states, g = ba[e.type].marker && e.options.marker, h = g && !g.enabled, i = g && g.states[a], j = i && i.enabled === !1, k = e.stateMarkerGraphic, l = this.marker || {}, m = e.chart, n = e.halo, p, a = a || "";
|
4781 |
-
p = this.pointAttr[a] || e.pointAttr[a];
|
4782 |
-
if (!(a === this.state && !b || this.selected && a !== "select" || f[a] && f[a].enabled === !1 || a && (j || h && i.enabled === !1) || a && l.states && l.states[a] && l.states[a].enabled === !1)) {
|
4783 |
-
if (this.graphic)g = g && this.graphic.symbolName && p.r, this.graphic.attr(w(p, g ? {
|
4784 |
-
x: c -
|
4785 |
-
g, y: d - g, width: 2 * g, height: 2 * g
|
4786 |
-
} : {})), k && k.hide(); else {
|
4787 |
-
if (a && i)if (g = i.radius, l = l.symbol || e.symbol, k && k.currentSymbol !== l && (k = k.destroy()), k)k[b ? "animate" : "attr"]({
|
4788 |
-
x: c - g,
|
4789 |
-
y: d - g
|
4790 |
-
}); else if (l)e.stateMarkerGraphic = k = m.renderer.symbol(l, c - g, d - g, 2 * g, 2 * g).attr(p).add(e.markerGroup), k.currentSymbol = l;
|
4791 |
-
if (k)k[a && m.isInsidePlot(c, d, m.inverted) ? "show" : "hide"]()
|
4792 |
-
}
|
4793 |
-
if ((c = f[a] && f[a].halo) && c.size) {
|
4794 |
-
if (!n)e.halo = n = m.renderer.path().add(e.seriesGroup);
|
4795 |
-
n.attr(q({fill: ya(this.color || e.color).setOpacity(c.opacity).get()}, c.attributes))[b ?
|
4796 |
-
"animate" : "attr"]({d: this.haloPath(c.size)})
|
4797 |
-
} else n && n.attr({d: []});
|
4798 |
-
this.state = a
|
4799 |
-
}
|
4800 |
-
}, haloPath: function (a) {
|
4801 |
-
var b = this.series, c = b.chart, d = b.getPlotBox(), e = c.inverted;
|
4802 |
-
return c.renderer.symbols.circle(d.translateX + (e ? b.yAxis.len - this.plotY : this.plotX) - a, d.translateY + (e ? b.xAxis.len - this.plotX : this.plotY) - a, a * 2, a * 2)
|
4803 |
-
}
|
4804 |
-
});
|
4805 |
-
q(O.prototype, {
|
4806 |
-
onMouseOver: function () {
|
4807 |
-
var a = this.chart, b = a.hoverSeries;
|
4808 |
-
if (b && b !== this)b.onMouseOut();
|
4809 |
-
this.options.events.mouseOver && D(this, "mouseOver");
|
4810 |
-
this.setState("hover");
|
4811 |
-
a.hoverSeries =
|
4812 |
-
this
|
4813 |
-
}, onMouseOut: function () {
|
4814 |
-
var a = this.options, b = this.chart, c = b.tooltip, d = b.hoverPoint;
|
4815 |
-
if (d)d.onMouseOut();
|
4816 |
-
this && a.events.mouseOut && D(this, "mouseOut");
|
4817 |
-
c && !a.stickyTracking && (!c.shared || this.noSharedTooltip) && c.hide();
|
4818 |
-
this.setState();
|
4819 |
-
b.hoverSeries = null
|
4820 |
-
}, setState: function (a) {
|
4821 |
-
var b = this.options, c = this.graph, d = this.graphNeg, e = b.states, b = b.lineWidth, a = a || "";
|
4822 |
-
if (this.state !== a)this.state = a, e[a] && e[a].enabled === !1 || (a && (b = e[a].lineWidth || b + 1), c && !c.dashstyle && (a = {"stroke-width": b}, c.attr(a), d && d.attr(a)))
|
4823 |
-
},
|
4824 |
-
setVisible: function (a, b) {
|
4825 |
-
var c = this, d = c.chart, e = c.legendItem, f, g = d.options.chart.ignoreHiddenSeries, h = c.visible;
|
4826 |
-
f = (c.visible = a = c.userOptions.visible = a === t ? !h : a) ? "show" : "hide";
|
4827 |
-
p(["group", "dataLabelsGroup", "markerGroup", "tracker"], function (a) {
|
4828 |
-
if (c[a])c[a][f]()
|
4829 |
-
});
|
4830 |
-
if (d.hoverSeries === c)c.onMouseOut();
|
4831 |
-
e && d.legend.colorizeItem(c, a);
|
4832 |
-
c.isDirty = !0;
|
4833 |
-
c.options.stacking && p(d.series, function (a) {
|
4834 |
-
if (a.options.stacking && a.visible)a.isDirty = !0
|
4835 |
-
});
|
4836 |
-
p(c.linkedSeries, function (b) {
|
4837 |
-
b.setVisible(a, !1)
|
4838 |
-
});
|
4839 |
-
if (g)d.isDirtyBox = !0;
|
4840 |
-
b !== !1 && d.redraw();
|
4841 |
-
D(c, f)
|
4842 |
-
}, setTooltipPoints: function (a) {
|
4843 |
-
var b = [], c, d, e = this.xAxis, f = e && e.getExtremes(), g = e ? e.tooltipLen || e.len : this.chart.plotSizeX, h, i, j = [];
|
4844 |
-
if (!(this.options.enableMouseTracking === !1 || this.singularTooltips)) {
|
4845 |
-
if (a)this.tooltipPoints = null;
|
4846 |
-
p(this.segments || this.points, function (a) {
|
4847 |
-
b = b.concat(a)
|
4848 |
-
});
|
4849 |
-
e && e.reversed && (b = b.reverse());
|
4850 |
-
this.orderTooltipPoints && this.orderTooltipPoints(b);
|
4851 |
-
a = b.length;
|
4852 |
-
for (i = 0; i < a; i++)if (e = b[i], c = e.x, c >= f.min && c <= f.max) {
|
4853 |
-
h = b[i + 1];
|
4854 |
-
c = d === t ? 0 : d + 1;
|
4855 |
-
for (d = b[i + 1] ? C(v(0, T((e.clientX +
|
4856 |
-
(h ? h.wrappedClientX || h.clientX : g)) / 2)), g) : g; c >= 0 && c <= d;)j[c++] = e
|
4857 |
-
}
|
4858 |
-
this.tooltipPoints = j
|
4859 |
-
}
|
4860 |
-
}, show: function () {
|
4861 |
-
this.setVisible(!0)
|
4862 |
-
}, hide: function () {
|
4863 |
-
this.setVisible(!1)
|
4864 |
-
}, select: function (a) {
|
4865 |
-
this.selected = a = a === t ? !this.selected : a;
|
4866 |
-
if (this.checkbox)this.checkbox.checked = a;
|
4867 |
-
D(this, a ? "select" : "unselect")
|
4868 |
-
}, drawTracker: S.drawTrackerGraph
|
4869 |
-
});
|
4870 |
-
q(R, {
|
4871 |
-
Axis: la,
|
4872 |
-
Chart: Ya,
|
4873 |
-
Color: ya,
|
4874 |
-
Point: Ea,
|
4875 |
-
Tick: Sa,
|
4876 |
-
Renderer: Za,
|
4877 |
-
Series: O,
|
4878 |
-
SVGElement: P,
|
4879 |
-
SVGRenderer: ta,
|
4880 |
-
arrayMin: Na,
|
4881 |
-
arrayMax: Ba,
|
4882 |
-
charts: V,
|
4883 |
-
dateFormat: cb,
|
4884 |
-
format: Ia,
|
4885 |
-
pathAnim: ub,
|
4886 |
-
getOptions: function () {
|
4887 |
-
return E
|
4888 |
-
},
|
4889 |
-
hasBidiBug: Nb,
|
4890 |
-
isTouchDevice: Jb,
|
4891 |
-
numberFormat: Ga,
|
4892 |
-
seriesTypes: F,
|
4893 |
-
setOptions: function (a) {
|
4894 |
-
E = w(!0, E, a);
|
4895 |
-
Cb();
|
4896 |
-
return E
|
4897 |
-
},
|
4898 |
-
addEvent: K,
|
4899 |
-
removeEvent: W,
|
4900 |
-
createElement: Y,
|
4901 |
-
discardElement: Pa,
|
4902 |
-
css: G,
|
4903 |
-
each: p,
|
4904 |
-
extend: q,
|
4905 |
-
map: Ua,
|
4906 |
-
merge: w,
|
4907 |
-
pick: m,
|
4908 |
-
splat: qa,
|
4909 |
-
extendClass: ka,
|
4910 |
-
pInt: z,
|
4911 |
-
wrap: Ma,
|
4912 |
-
svg: aa,
|
4913 |
-
canvas: fa,
|
4914 |
-
vml: !aa && !fa,
|
4915 |
-
product: "Highcharts",
|
4916 |
-
version: "4.0.1"
|
4917 |
-
})
|
4918 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/ultimate-importer-free.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
jQuery(document).ready(function () {
|
2 |
jQuery('.dropdown-toggle').dropdown('toggle');
|
3 |
var checkmodule = document.getElementById('checkmodule').value;
|
4 |
-
if (checkmodule != 'dashboard' && checkmodule != 'filemanager' && checkmodule != 'support' && checkmodule != 'export') {
|
5 |
var get_log = document.getElementById('log').innerHTML;
|
6 |
if (!jQuery.trim(jQuery('#log').html()).length) {
|
7 |
document.getElementById('log').innerHTML = '<p style="margin:15px;color:red;">' + translateAlertString("NO LOGS YET NOW.") + '</p>';
|
8 |
-
|
9 |
|
10 |
//pieStats();
|
11 |
//lineStats();
|
@@ -20,7 +20,7 @@ jQuery(document).ready(function () {
|
|
20 |
document.getElementById('cust_post_empty').style.display = '';
|
21 |
}
|
22 |
}
|
23 |
-
if (checkmodule != 'filemanager' && checkmodule != 'settings' && checkmodule != 'support' && checkmodule != 'export') {
|
24 |
var checkfile = jQuery('#checkfile').val();
|
25 |
var dir_path = jQuery('#dirpathval').val();
|
26 |
var uploadedFile = jQuery('#uploadedFile').val();
|
@@ -34,15 +34,11 @@ jQuery(document).ready(function () {
|
|
34 |
document.getElementById('log').innerHTML = '<p style="margin:15px;color:red;">' + translateAlertString("NO LOGS YET NOW.") + '</p>';
|
35 |
}
|
36 |
|
37 |
-
/* if (checkfile != '') {
|
38 |
-
uploadedFile = checkfile;
|
39 |
-
} */
|
40 |
if (select_delimeter != '') {
|
41 |
select_delim = select_delimeter;
|
42 |
}
|
43 |
if (uploadedFile != '' && select_delim != '') {
|
44 |
var tmpLoc = jQuery('#tmpLoc').val();
|
45 |
-
// var doaction = 'record_no=1&file_name=' + uploadedFile + '&selected_delimeter=' + select_delim + '&checkmodule=' + checkmodule+'&temloc=' + tmpLoc+'&dir_path=' + dir_path + '&wpnonce=' + noncekey;
|
46 |
if (tmpLoc != '' && tmpLoc != null) {
|
47 |
jQuery.ajax({
|
48 |
url: ajaxurl,
|
@@ -160,7 +156,6 @@ function gotoelement(id) {
|
|
160 |
return false;
|
161 |
}
|
162 |
}
|
163 |
-
// var doaction = 'record_no=' + gotoElement + '&file_name=' + uploadedFile + '&delim='+ delim + '&checkmodule=' + checkmodule+ '&dir_path=' + dir_path + '&wpnonce=' + noncekey;
|
164 |
var tmpLoc = document.getElementById('tmpLoc').value;
|
165 |
jQuery.ajax({
|
166 |
url: ajaxurl,
|
@@ -219,9 +214,10 @@ function selectpoststatus() {
|
|
219 |
poststate = 24;
|
220 |
var ps = document.getElementById("importallwithps");
|
221 |
var selectedpsindex = ps.options[ps.selectedIndex].value;
|
222 |
-
if (selectedpsindex ==
|
223 |
document.getElementById('globalpassword_label').style.display = "block";
|
224 |
document.getElementById('globalpassword_text').style.display = "block";
|
|
|
225 |
}
|
226 |
else {
|
227 |
document.getElementById('globalpassword_label').style.display = "none";
|
@@ -229,80 +225,72 @@ function selectpoststatus() {
|
|
229 |
}
|
230 |
var totdropdown = document.getElementById('h2').value;
|
231 |
var total = parseInt(totdropdown);
|
232 |
-
if (selectedpsindex
|
233 |
|
234 |
for (var i = 0; i < poststate; i++) {
|
235 |
|
236 |
-
dropdown = document.getElementById("
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
}
|
242 |
|
243 |
}
|
244 |
-
|
245 |
-
for (var i = 0; i < poststate; i++) {
|
246 |
-
|
247 |
-
dropdown = document.getElementById("mapping" + i);
|
248 |
-
|
249 |
-
var totarr = dropdown.options.length;
|
250 |
-
|
251 |
-
for (var j = 0; j < totarr; j++) {
|
252 |
-
|
253 |
-
if (dropdown.options[j].value == 'post_status') {
|
254 |
-
|
255 |
-
dropdown.options.remove(j);
|
256 |
-
totarr--;
|
257 |
-
}
|
258 |
-
}
|
259 |
|
260 |
-
|
261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
}
|
263 |
|
264 |
|
265 |
// Function for add customfield
|
266 |
|
267 |
-
function
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
}
|
292 |
-
if (b == 'add_custom' + i) {
|
293 |
-
document.getElementById('textbox' + i).style.display = "";
|
294 |
-
document.getElementById('customspan' + i).style.display = "";
|
295 |
-
}
|
296 |
-
else {
|
297 |
-
document.getElementById('textbox' + i).style.display = "none";
|
298 |
-
document.getElementById('customspan' + i).style.display = "none";
|
299 |
-
}
|
300 |
-
}
|
301 |
-
document.getElementById('prevoptionindex').value = 'mapping' + selected_id;
|
302 |
-
var customField = selected_value.indexOf("add_custom");
|
303 |
-
if (selected_value != '-- Select --' && customField != 0) {
|
304 |
-
document.getElementById('prevoptionvalue').value = selected_value;
|
305 |
-
}
|
306 |
}
|
307 |
|
308 |
|
@@ -417,8 +405,12 @@ function import_csv() {
|
|
417 |
// code ends here on checking templatename
|
418 |
var total = '';
|
419 |
var importer = document.getElementById('selectedImporter').value;
|
|
|
|
|
|
|
420 |
var header_count = document.getElementById('h2').value;
|
421 |
var array = new Array();
|
|
|
422 |
var val1, val2, val3, val4, val5, val6, val7, error_msg, chk_status_in_csv, post_status_msg;
|
423 |
val1 = val2 = val3 = val4 = val5 = val6 = val7 = post_status_msg = post_type = 'Off';
|
424 |
if (importer == 'post' || importer == 'custompost')
|
@@ -431,8 +423,10 @@ function import_csv() {
|
|
431 |
var value = document.getElementById("mapping" + i).value;
|
432 |
//var value = e.options[e.selectedIndex].value;
|
433 |
array[i] = value;
|
|
|
|
|
434 |
}
|
435 |
-
if (importer == 'post' || importer == 'page' || importer == 'custompost') {
|
436 |
if (importer == 'custompost') {
|
437 |
var getSelectedIndex = document.getElementById('custompostlist');
|
438 |
var SelectedIndex = getSelectedIndex.value;
|
@@ -446,18 +440,49 @@ function import_csv() {
|
|
446 |
if (chk_status_in_csv != 0)
|
447 |
post_status_msg = 'On';
|
448 |
|
449 |
-
|
450 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
451 |
val1 = 'On';
|
452 |
}
|
453 |
/* if (array[j] == 'post_content') {
|
454 |
val2 = 'On';
|
455 |
} */
|
456 |
if (post_status_msg == 'Off') {
|
457 |
-
if (
|
458 |
post_status_msg = 'On';
|
459 |
}
|
460 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
if (importer != 'custompost' && val1 == 'On' && post_status_msg == 'On') {
|
462 |
return true;
|
463 |
}
|
@@ -480,7 +505,7 @@ function import_csv() {
|
|
480 |
return false;
|
481 |
}
|
482 |
}
|
483 |
-
|
484 |
// validation starts
|
485 |
else if (importer == 'comments') {
|
486 |
//var getSelectedIndex1 = document.getElementById('selectPosts');
|
@@ -777,136 +802,16 @@ function continueprocess() {
|
|
777 |
}
|
778 |
|
779 |
// Enable/Disable WP-e-Commerce Custom Fields
|
780 |
-
function enablewpcustomfield(val) {
|
781 |
-
if (val == 'wpcustomfields') {
|
782 |
-
document.getElementById('wpcustomfieldstr').style.display = '';
|
783 |
-
}
|
784 |
-
else {
|
785 |
-
document.getElementById('wpcustomfields').checked = false;
|
786 |
-
document.getElementById('wpcustomfieldstr').style.display = 'none';
|
787 |
-
}
|
788 |
-
}
|
789 |
|
790 |
-
function saveSettings() {
|
791 |
-
|
792 |
-
jQuery(document).ready(function () {
|
793 |
jQuery('#ShowMsg').delay(2000).fadeOut();
|
794 |
-
});
|
795 |
}
|
796 |
|
797 |
function Reload() {
|
798 |
window.location.reload();
|
799 |
}
|
800 |
|
801 |
-
function check_if_avail(val) {
|
802 |
-
var proModule = new Array();
|
803 |
-
proModule[0] = 'categories';
|
804 |
-
proModule[1] = 'customtaxonomy';
|
805 |
-
proModule[2] = 'eshop';
|
806 |
-
proModule[3] = 'marketpress';
|
807 |
-
proModule[4] = 'woocommerce';
|
808 |
-
proModule[5] = 'wpcommerce';
|
809 |
-
proModule[6] = 'cctm';
|
810 |
-
proModule[7] = 'types';
|
811 |
-
proModule[8] = 'acf';
|
812 |
-
proModule[9] = 'Customerreviews';
|
813 |
-
proModule[10] = 'WP-Members';
|
814 |
-
proModule[11] = 'yoastseo';
|
815 |
-
proModule[12] = 'caticonenable';
|
816 |
-
proModule[13] = 'custompostuitype';
|
817 |
-
proModule[14] = 'wpcustomfields';
|
818 |
-
proModule[15] = 'recommerce';
|
819 |
-
proModule[16] = 'automapping';
|
820 |
-
proModule[17] = 'utfsupport';
|
821 |
-
proModule[18] = 'podspost';
|
822 |
-
proModule[19] = 'podscustomfield';
|
823 |
-
proModule[20] = 'typescustomfield';
|
824 |
-
proModule[21] = 'drop_table';
|
825 |
-
proModule[22] = 'database_optimization';
|
826 |
-
proModule[23] = 'scheduled';
|
827 |
-
proModule[24] = 'cctmcustomfields';
|
828 |
-
|
829 |
-
var warning_name = new Array();
|
830 |
-
warning_name['categories'] = 'Categories/Tags';
|
831 |
-
warning_name['customtaxonomy'] = 'Custom Taxonomy';
|
832 |
-
warning_name['eshop'] = 'Eshop';
|
833 |
-
warning_name['marketpress'] = 'Market Press Lite';
|
834 |
-
warning_name['woocommerce'] = 'WooCommerce';
|
835 |
-
warning_name['wpcommerce'] = 'WP e-Commerce';
|
836 |
-
warning_name['cctm'] = 'CCTM Custom Post';
|
837 |
-
warning_name['types'] = 'Types Custom Post';
|
838 |
-
warning_name['acf'] = 'ACF';
|
839 |
-
warning_name['Customerreviews'] = 'Customer Reviews';
|
840 |
-
warning_name['WP-Members'] = 'WP-Members';
|
841 |
-
warning_name['aioseo'] = 'All-in-SEO';
|
842 |
-
warning_name['yoastseo'] = 'Yoast SEO';
|
843 |
-
warning_name['caticonenable'] = 'Category Icons';
|
844 |
-
warning_name['custompostuitype'] = 'Custom Post Type UI';
|
845 |
-
warning_name['automapping'] = 'Auto Mapping';
|
846 |
-
warning_name['utfsupport'] = 'UTF Support';
|
847 |
-
warning_name['podspost'] = 'Pods Custom Post';
|
848 |
-
warning_name['podscustomfield'] = 'Pods Custom Field';
|
849 |
-
warning_name['typescustomfield'] = 'Types Custom Field';
|
850 |
-
warning_name['drop_table'] = 'Drop Table';
|
851 |
-
warning_name['database_optimization'] = 'Database Optimization';
|
852 |
-
warning_name['scheduled'] = 'Scheduled log mails';
|
853 |
-
warning_name['cctmcustomfields'] = 'CCTM Custom Fields';
|
854 |
-
|
855 |
-
var result = inArray(val, proModule);
|
856 |
-
if (result == true) {
|
857 |
-
|
858 |
-
if (val == 'wpcustomfields') {
|
859 |
-
if (val == 'wpcommerce' || val == 'wpcustomfields') {
|
860 |
-
document.getElementById('wpcustomfieldstr').style.display = '';
|
861 |
-
} else {
|
862 |
-
document.getElementById('wpcustomfieldstr').style.display = '';
|
863 |
-
}
|
864 |
-
// document.getElementById('wpcustomfieldstr').style.display = 'none';
|
865 |
-
document.getElementById('nonerecommerce').checked = true;
|
866 |
-
}
|
867 |
-
if (val == 'cctm') {
|
868 |
-
document.getElementById('cctm').checked = true;
|
869 |
-
}
|
870 |
-
if (val == 'types') {
|
871 |
-
document.getElementById('types').checked = true;
|
872 |
-
}
|
873 |
-
if (val == 'acf') {
|
874 |
-
document.getElementById('acf').checked = true;
|
875 |
-
}
|
876 |
-
if (val == 'cctmcustomfields') {
|
877 |
-
document.getElementById('cctmcustomfields').checked = true;
|
878 |
-
}
|
879 |
-
if (val == 'podscustomfield') {
|
880 |
-
document.getElementById('podscustomfield').checked = true;
|
881 |
-
}
|
882 |
-
if (val == 'yoastseo') {
|
883 |
-
document.getElementById('yoastseo').checked = true;
|
884 |
-
}
|
885 |
-
if (val == 'caticonenable') {
|
886 |
-
document.getElementById('caticondisable').checked = true;
|
887 |
-
}
|
888 |
-
if (val == 'drop_table') {
|
889 |
-
document.getElementById('drop_table').checked = true;
|
890 |
-
}
|
891 |
-
if (val == 'scheduled') {
|
892 |
-
document.getElementById('scheduled').checked = true;
|
893 |
-
}
|
894 |
-
if (val == 'marketpress') {
|
895 |
-
document.getElementById('marketpress').checked = true;
|
896 |
-
}
|
897 |
-
if (val == 'woocommerce') {
|
898 |
-
document.getElementById('woocommerce').checked = true;
|
899 |
-
}
|
900 |
-
if (val == 'wpcommerce') {
|
901 |
-
document.getElementById('wpcommerce').checked = true;
|
902 |
-
}
|
903 |
-
document.getElementById(val).checked = false;
|
904 |
-
document.getElementById('ShowMsg').style.display = "";
|
905 |
-
document.getElementById('warning-msg').innerHTML = warning_name[val] + translateAlertString(' feature is available only for PRO!.');
|
906 |
-
jQuery('#ShowMsg').delay(7000).fadeOut();
|
907 |
-
}
|
908 |
-
}
|
909 |
-
|
910 |
function inArray(needle, haystack) {
|
911 |
var length = haystack.length;
|
912 |
for (var i = 0; i < length; i++) {
|
@@ -928,7 +833,6 @@ function import_again() {
|
|
928 |
window.location.assign(get_current_url);
|
929 |
}
|
930 |
function sendemail2smackers() {
|
931 |
-
// var useremail = document.getElementById('usermailid').value;
|
932 |
var message_content = document.getElementById('message').value;
|
933 |
var firstname = document.getElementById('firstname').value;
|
934 |
var lastname = document.getElementById('lastname').value;
|
@@ -959,11 +863,9 @@ function check_allnumeric(inputtxt) {
|
|
959 |
function gotoback() {
|
960 |
var currentURL = document.getElementById('current_url').value;
|
961 |
var set_assigned_step = currentURL.replace("uploadfile", "mapping_settings");
|
962 |
-
// window.location.assign(set_assigned_step);
|
963 |
}
|
964 |
function export_module() {
|
965 |
var get_selected_module = document.getElementsByName('export');
|
966 |
-
// alert(get_selected_module);
|
967 |
for (var i = 0, length = get_selected_module.length; i < length; i++) {
|
968 |
if (get_selected_module[i].checked) {
|
969 |
// do whatever you want with the checked radio
|
@@ -986,34 +888,6 @@ function export_check(value) {
|
|
986 |
}
|
987 |
}
|
988 |
|
989 |
-
function addcorecustomfield(id) {
|
990 |
-
var table_id = id;
|
991 |
-
var newrow = table_id.insertRow(-1);
|
992 |
-
var count = document.getElementById('basic_count').value;
|
993 |
-
count = parseInt(count) + 1;
|
994 |
-
newrow.id = 'custrow' + count;
|
995 |
-
var filename = document.getElementById('uploadedFile').value;
|
996 |
-
var row_count = document.getElementById('corecustomcount').value;
|
997 |
-
jQuery.ajax({
|
998 |
-
url: ajaxurl,
|
999 |
-
type: 'post',
|
1000 |
-
//dataType: 'json',
|
1001 |
-
data: {
|
1002 |
-
'filename': filename,
|
1003 |
-
'corecount': count,
|
1004 |
-
'action': 'addcorecustomfd',
|
1005 |
-
},
|
1006 |
-
success: function (response) {
|
1007 |
-
newrow.innerHTML = response;
|
1008 |
-
row_count = parseInt(row_count) + 1;
|
1009 |
-
document.getElementById('corecustomcount').value = row_count;
|
1010 |
-
document.getElementById('basic_count').value = count;
|
1011 |
-
}
|
1012 |
-
});
|
1013 |
-
|
1014 |
-
}
|
1015 |
-
|
1016 |
-
|
1017 |
function choose_import_method(id) {
|
1018 |
if (id == 'uploadfilefromcomputer') {
|
1019 |
document.getElementById('boxmethod1').style.border = "1px solid #ccc";
|
@@ -1033,68 +907,6 @@ function choose_import_mode(id) {
|
|
1033 |
document.getElementById('reportLog').style.display = 'none';
|
1034 |
}
|
1035 |
}
|
1036 |
-
function selectModules(id) {
|
1037 |
-
var param = id;
|
1038 |
-
if (param == 'checkallModules') {
|
1039 |
-
document.getElementById('post').checked = true;
|
1040 |
-
document.getElementById('page').checked = true;
|
1041 |
-
document.getElementById('users').checked = true;
|
1042 |
-
//document.getElementById('comments').checked = true;
|
1043 |
-
document.getElementById('custompost').checked = true;
|
1044 |
-
|
1045 |
-
jQuery('#postlabel').removeClass("disablesetting");
|
1046 |
-
jQuery('#postlabel').addClass("enablesetting");
|
1047 |
-
jQuery('#nopostlabel').addClass("disablesetting");
|
1048 |
-
jQuery('#nopostlabel').removeClass("enablesetting");
|
1049 |
-
jQuery('#pagelabel').removeClass("disablesetting");
|
1050 |
-
jQuery('#pagelabel').addClass("enablesetting");
|
1051 |
-
jQuery('#nopagelabel').addClass("disablesetting");
|
1052 |
-
jQuery('#nopagelabel').removeClass("enablesetting");
|
1053 |
-
jQuery('#userlabel').removeClass("disablesetting");
|
1054 |
-
jQuery('#userlabel').addClass("enablesetting");
|
1055 |
-
jQuery('#nouserlabel').addClass("disablesetting");
|
1056 |
-
jQuery('#nouserlabel').removeClass("enablesetting");
|
1057 |
-
jQuery('#commentslabel').removeClass("disablesetting");
|
1058 |
-
jQuery('#commentslabel').addClass("enablesetting");
|
1059 |
-
jQuery('#nocommentslabel').addClass("disablesetting");
|
1060 |
-
jQuery('#nocommentslabel').removeClass("enablesetting");
|
1061 |
-
jQuery('#cplabel').removeClass("disablesetting");
|
1062 |
-
jQuery('#cplabel').addClass("enablesetting");
|
1063 |
-
jQuery('#nocplabel').addClass("disablesetting");
|
1064 |
-
jQuery('#nocplabel').removeClass("enablesetting");
|
1065 |
-
|
1066 |
-
}
|
1067 |
-
else if (param == 'uncheckallModules') {
|
1068 |
-
|
1069 |
-
document.getElementById('post').checked = false;
|
1070 |
-
document.getElementById('page').checked = false;
|
1071 |
-
document.getElementById('users').checked = false;
|
1072 |
-
//document.getElementById('comments').checked = false;
|
1073 |
-
document.getElementById('custompost').checked = false;
|
1074 |
-
|
1075 |
-
jQuery('#nopostlabel').removeClass("disablesetting");
|
1076 |
-
jQuery('#nopostlabel').addClass("enablesetting");
|
1077 |
-
jQuery('#postlabel').addClass("disablesetting");
|
1078 |
-
jQuery('#postlabel').removeClass("enablesetting");
|
1079 |
-
jQuery('#nopagelabel').removeClass("disablesetting");
|
1080 |
-
jQuery('#nopagelabel').addClass("enablesetting");
|
1081 |
-
jQuery('#pagelabel').addClass("disablesetting");
|
1082 |
-
jQuery('#pagelabel').removeClass("enablesetting");
|
1083 |
-
jQuery('#nouserlabel').removeClass("disablesetting");
|
1084 |
-
jQuery('#nouserlabel').addClass("enablesetting");
|
1085 |
-
jQuery('#userlabel').addClass("disablesetting");
|
1086 |
-
jQuery('#userlabel').removeClass("enablesetting");
|
1087 |
-
jQuery('#nocommentslabel').removeClass("disablesetting");
|
1088 |
-
jQuery('#nocommentslabel').addClass("enablesetting");
|
1089 |
-
jQuery('#commentslabel').addClass("disablesetting");
|
1090 |
-
jQuery('#commentslabel').removeClass("enablesetting");
|
1091 |
-
jQuery('#nocplabel').removeClass("disablesetting");
|
1092 |
-
jQuery('#nocplabel').addClass("enablesetting");
|
1093 |
-
jQuery('#cplabel').addClass("disablesetting");
|
1094 |
-
jQuery('#cplabel').removeClass("enablesetting");
|
1095 |
-
|
1096 |
-
}
|
1097 |
-
}
|
1098 |
|
1099 |
function addexportfilter(id) {
|
1100 |
if (document.getElementById(id).checked == true) {
|
@@ -1143,166 +955,6 @@ function addexportfilter(id) {
|
|
1143 |
}
|
1144 |
|
1145 |
//Settings js code
|
1146 |
-
function showsettingsoption(id) {
|
1147 |
-
for (i = 1; i <= 9; i++) {
|
1148 |
-
if (parseInt(id) == parseInt(i)) {
|
1149 |
-
if (parseInt(i) == 8) {
|
1150 |
-
document.getElementById('sidebar').style.height = '1189px';
|
1151 |
-
document.getElementById('contentbar').style.height = '1189px';
|
1152 |
-
document.getElementById('settingsholder').style.height = '1190px';
|
1153 |
-
} else if (parseInt(i) == 9) {
|
1154 |
-
document.getElementById('sidebar').style.height = '665px';
|
1155 |
-
document.getElementById('contentbar').style.height = '665px';
|
1156 |
-
document.getElementById('settingsholder').style.height = '666px';
|
1157 |
-
} else if (parseInt(i) == 4) {
|
1158 |
-
document.getElementById('sidebar').style.height = '420px';
|
1159 |
-
document.getElementById('contentbar').style.height = '420px';
|
1160 |
-
document.getElementById('settingsholder').style.height = '421px';
|
1161 |
-
} else if (parseInt(i) == 3) {
|
1162 |
-
document.getElementById('sidebar').style.height = '586px';
|
1163 |
-
document.getElementById('contentbar').style.height = '586px';
|
1164 |
-
document.getElementById('settingsholder').style.height = '587px';
|
1165 |
-
} else if (parseInt(i) == 2) {
|
1166 |
-
document.getElementById('sidebar').style.height = '522px';
|
1167 |
-
document.getElementById('contentbar').style.height = '522px';
|
1168 |
-
document.getElementById('settingsholder').style.height = '523px';
|
1169 |
-
} else if (parseInt(i) == 1) {
|
1170 |
-
document.getElementById('sidebar').style.height = '965px';
|
1171 |
-
document.getElementById('contentbar').style.height = '965px';
|
1172 |
-
document.getElementById('settingsholder').style.height = '966px';
|
1173 |
-
} else if (parseInt(i) == 6) {
|
1174 |
-
document.getElementById('sidebar').style.height = '565px';
|
1175 |
-
document.getElementById('contentbar').style.height = '565px';
|
1176 |
-
document.getElementById('settingsholder').style.height = '566px';
|
1177 |
-
} else {
|
1178 |
-
document.getElementById('sidebar').style.height = 'auto';
|
1179 |
-
document.getElementById('contentbar').style.height = 'auto';
|
1180 |
-
document.getElementById('settingsholder').style.height = 'auto';
|
1181 |
-
}
|
1182 |
-
|
1183 |
-
jQuery('#' + id).removeClass("bg-sidebar");
|
1184 |
-
jQuery('#' + id).addClass("selected");
|
1185 |
-
document.getElementById('section' + id).style.display = "";
|
1186 |
-
// document.getElementById('arrow'+id).style.display="";
|
1187 |
-
document.getElementById('activemenu').innerHTML = document.getElementById('settingmenu' + id).innerHTML;
|
1188 |
-
} else {
|
1189 |
-
jQuery('#' + i).removeClass("selected");
|
1190 |
-
jQuery('#' + i).addClass("bg-sidebar");
|
1191 |
-
document.getElementById('section' + i).style.display = "none";
|
1192 |
-
// document.getElementById('arrow'+i).style.display="none";
|
1193 |
-
}
|
1194 |
-
}
|
1195 |
-
document.getElementById('section' + id).style.display = "";
|
1196 |
-
}
|
1197 |
-
|
1198 |
-
|
1199 |
-
//seo setting enable and disable
|
1200 |
-
function seosetting(id) {
|
1201 |
-
if (id == 'nonerseooption') {
|
1202 |
-
jQuery('#seosetting1').removeClass("disablesetting");
|
1203 |
-
jQuery('#seosetting1').addClass("enablesetting");
|
1204 |
-
document.getElementById("seosetting1text").innerHTML = "Enabled";
|
1205 |
-
document.getElementById("seosetting2text").innerHTML = "Disabled";
|
1206 |
-
document.getElementById("seosetting3text").innerHTML = "Disabled";
|
1207 |
-
jQuery('#seosetting2').addClass("disablesetting");
|
1208 |
-
jQuery('#seosetting2').removeClass("enablesetting");
|
1209 |
-
jQuery('#seosetting3').addClass("disablesetting");
|
1210 |
-
jQuery('#seosetting3').removeClass("enablesetting");
|
1211 |
-
}
|
1212 |
-
else if (id == 'aioseo') {
|
1213 |
-
jQuery('#seosetting2').removeClass("disablesetting");
|
1214 |
-
jQuery('#seosetting2').addClass("enablesetting");
|
1215 |
-
document.getElementById('seosetting2text').innerHTML = "Enabled";
|
1216 |
-
document.getElementById("seosetting1text").innerHTML = "Disabled";
|
1217 |
-
document.getElementById("seosetting3text").innerHTML = "Disabled";
|
1218 |
-
jQuery('#seosetting1').addClass("disablesetting");
|
1219 |
-
jQuery('#seosetting1').removeClass("enablesetting");
|
1220 |
-
jQuery('#seosetting3').addClass("disablesetting");
|
1221 |
-
jQuery('#seosetting3').removeClass("enablesetting");
|
1222 |
-
}
|
1223 |
-
else if (id == 'yoastseo') {
|
1224 |
-
jQuery('#seosetting3').removeClass("disablesetting");
|
1225 |
-
jQuery('#seosetting3').addClass("enablesetting");
|
1226 |
-
document.getElementById('seosetting3text').innerHTML = "Enabled";
|
1227 |
-
document.getElementById("seosetting1text").innerHTML = "Disabled";
|
1228 |
-
document.getElementById("seosetting2text").innerHTML = "Disabled";
|
1229 |
-
jQuery('#seosetting1').addClass("disablesetting");
|
1230 |
-
jQuery('#seosetting1').removeClass("enablesetting");
|
1231 |
-
jQuery('#seosetting2').addClass("disablesetting");
|
1232 |
-
jQuery('#seosetting2').removeClass("enablesetting");
|
1233 |
-
}
|
1234 |
-
}
|
1235 |
-
|
1236 |
-
//Custom post setting
|
1237 |
-
function custompostsetting(id) {
|
1238 |
-
if (id == 'nonercustompost') {
|
1239 |
-
jQuery('#custompostsetting1').removeClass("disablesetting");
|
1240 |
-
jQuery('#custompostsetting1').addClass("enablesetting");
|
1241 |
-
document.getElementById("custompost1text").innerHTML = "Enabled";
|
1242 |
-
document.getElementById("custompost2text").innerHTML = "Disabled";
|
1243 |
-
jQuery('#custompostsetting2').addClass("disablesetting");
|
1244 |
-
jQuery('#custompostsetting2').removeClass("enablesetting");
|
1245 |
-
}
|
1246 |
-
else if (id == 'custompostuitype') {
|
1247 |
-
jQuery('#custompostsetting2').removeClass("disablesetting");
|
1248 |
-
jQuery('#custompostsetting2').addClass("enablesetting");
|
1249 |
-
document.getElementById("custompost2text").innerHTML = "Enabled";
|
1250 |
-
document.getElementById("custompost1text").innerHTML = "Disabled";
|
1251 |
-
jQuery('#custompostsetting1').addClass("disablesetting");
|
1252 |
-
jQuery('#custompostsetting1').removeClass("enablesetting");
|
1253 |
-
}
|
1254 |
-
/* else if(id == 'wptypespost') {
|
1255 |
-
jQuery('#custompostsetting3').removeClass("disablesetting");
|
1256 |
-
jQuery('#custompostsetting3').addClass("enablesetting");
|
1257 |
-
document.getElementById("custompost3text").innerHTML="Enabled";
|
1258 |
-
document.getElementById("custompost2text").innerHTML="Disabled";
|
1259 |
-
document.getElementById("custompost1text").innerHTML="Disabled";
|
1260 |
-
document.getElementById("custompost4text").innerHTML="Disabled";
|
1261 |
-
document.getElementById("custompost5text").innerHTML="Disabled";
|
1262 |
-
jQuery('#custompostsetting2').addClass("disablesetting");
|
1263 |
-
jQuery('#custompostsetting2').removeClass("enablesetting");
|
1264 |
-
jQuery('#custompostsetting1').addClass("disablesetting");
|
1265 |
-
jQuery('#custompostsetting1').removeClass("enablesetting");
|
1266 |
-
jQuery('#custompostsetting4').addClass("disablesetting");
|
1267 |
-
jQuery('#custompostsetting4').removeClass("enablesetting");
|
1268 |
-
jQuery('#custompostsetting5').addClass("disablesetting");
|
1269 |
-
jQuery('#custompostsetting5').removeClass("enablesetting");
|
1270 |
-
}
|
1271 |
-
else if(id == 'cctm') {
|
1272 |
-
jQuery('#custompostsetting4').removeClass("disablesetting");
|
1273 |
-
jQuery('#custompostsetting4').addClass("enablesetting");
|
1274 |
-
document.getElementById("custompost4text").innerHTML="Enabled";
|
1275 |
-
document.getElementById("custompost2text").innerHTML="Disabled";
|
1276 |
-
document.getElementById("custompost3text").innerHTML="Disabled";
|
1277 |
-
document.getElementById("custompost1text").innerHTML="Disabled";
|
1278 |
-
document.getElementById("custompost5text").innerHTML="Disabled";
|
1279 |
-
jQuery('#custompostsetting2').addClass("disablesetting");
|
1280 |
-
jQuery('#custompostsetting2').removeClass("enablesetting");
|
1281 |
-
jQuery('#custompostsetting3').addClass("disablesetting");
|
1282 |
-
jQuery('#custompostsetting3').removeClass("enablesetting");
|
1283 |
-
jQuery('#custompostsetting1').addClass("disablesetting");
|
1284 |
-
jQuery('#custompostsetting1').removeClass("enablesetting");
|
1285 |
-
jQuery('#custompostsetting5').addClass("disablesetting");
|
1286 |
-
jQuery('#custompostsetting5').removeClass("enablesetting");
|
1287 |
-
}
|
1288 |
-
else if(id == 'podspost') {
|
1289 |
-
jQuery('#custompostsetting5').removeClass("disablesetting");
|
1290 |
-
jQuery('#custompostsetting5').addClass("enablesetting");
|
1291 |
-
document.getElementById("custompost5text").innerHTML="Enabled";
|
1292 |
-
document.getElementById("custompost1text").innerHTML="Disabled";
|
1293 |
-
document.getElementById("custompost2text").innerHTML="Disabled";
|
1294 |
-
document.getElementById("custompost3text").innerHTML="Disabled";
|
1295 |
-
document.getElementById("custompost4text").innerHTML="Disabled";
|
1296 |
-
jQuery('#custompostsetting1').addClass("disablesetting");
|
1297 |
-
jQuery('#custompostsetting1').removeClass("enablesetting");
|
1298 |
-
jQuery('#custompostsetting2').addClass("disablesetting");
|
1299 |
-
jQuery('#custompostsetting2').removeClass("enablesetting");
|
1300 |
-
jQuery('#custompostsetting3').addClass("disablesetting");
|
1301 |
-
jQuery('#custompostsetting3').removeClass("enablesetting");
|
1302 |
-
jQuery('#custompostsetting4').addClass("disablesetting");
|
1303 |
-
jQuery('#custompostsetting4').removeClass("enablesetting");
|
1304 |
-
}*/
|
1305 |
-
}
|
1306 |
//Security and performance
|
1307 |
function authorimportsetting(id) {
|
1308 |
if (id == 'enableimport') {
|
@@ -1318,228 +970,6 @@ function authorimportsetting(id) {
|
|
1318 |
jQuery('#allowimport').removeClass("enablesetting");
|
1319 |
}
|
1320 |
}
|
1321 |
-
//General Settings
|
1322 |
-
function postsetting(id) {
|
1323 |
-
if (id == 'post') {
|
1324 |
-
jQuery('#postlabel').removeClass("disablesetting");
|
1325 |
-
jQuery('#postlabel').addClass("enablesetting");
|
1326 |
-
jQuery('#nopostlabel').addClass("disablesetting");
|
1327 |
-
jQuery('#nopostlabel').removeClass("enablesetting");
|
1328 |
-
}
|
1329 |
-
else {
|
1330 |
-
jQuery('#nopostlabel').removeClass("disablesetting");
|
1331 |
-
jQuery('#nopostlabel').addClass("enablesetting");
|
1332 |
-
jQuery('#postlabel').addClass("disablesetting");
|
1333 |
-
jQuery('#postlabel').removeClass("enablesetting");
|
1334 |
-
}
|
1335 |
-
}
|
1336 |
-
|
1337 |
-
function pagesetting(id) {
|
1338 |
-
if (id == 'page') {
|
1339 |
-
jQuery('#pagelabel').removeClass("disablesetting");
|
1340 |
-
jQuery('#pagelabel').addClass("enablesetting");
|
1341 |
-
jQuery('#nopagelabel').addClass("disablesetting");
|
1342 |
-
jQuery('#nopagelabel').removeClass("enablesetting");
|
1343 |
-
}
|
1344 |
-
else {
|
1345 |
-
jQuery('#nopagelabel').removeClass("disablesetting");
|
1346 |
-
jQuery('#nopagelabel').addClass("enablesetting");
|
1347 |
-
jQuery('#pagelabel').addClass("disablesetting");
|
1348 |
-
jQuery('#pagelabel').removeClass("enablesetting");
|
1349 |
-
}
|
1350 |
-
}
|
1351 |
-
|
1352 |
-
function usersetting(id) {
|
1353 |
-
if (id == 'users') {
|
1354 |
-
jQuery('#userlabel').removeClass("disablesetting");
|
1355 |
-
jQuery('#userlabel').addClass("enablesetting");
|
1356 |
-
jQuery('#nouserlabel').addClass("disablesetting");
|
1357 |
-
jQuery('#nouserlabel').removeClass("enablesetting");
|
1358 |
-
}
|
1359 |
-
else {
|
1360 |
-
jQuery('#nouserlabel').removeClass("disablesetting");
|
1361 |
-
jQuery('#nouserlabel').addClass("enablesetting");
|
1362 |
-
jQuery('#userlabel').addClass("disablesetting");
|
1363 |
-
jQuery('#userlabel').removeClass("enablesetting");
|
1364 |
-
}
|
1365 |
-
}
|
1366 |
-
|
1367 |
-
function commentsetting(id) {
|
1368 |
-
if (id == 'comments') {
|
1369 |
-
jQuery('#commentslabel').removeClass("disablesetting");
|
1370 |
-
jQuery('#commentslabel').addClass("enablesetting");
|
1371 |
-
jQuery('#nocommentslabel').addClass("disablesetting");
|
1372 |
-
jQuery('#nocommentslabel').removeClass("enablesetting");
|
1373 |
-
}
|
1374 |
-
else {
|
1375 |
-
jQuery('#nocommentslabel').removeClass("disablesetting");
|
1376 |
-
jQuery('#nocommentslabel').addClass("enablesetting");
|
1377 |
-
jQuery('#commentslabel').addClass("disablesetting");
|
1378 |
-
jQuery('#commentslabel').removeClass("enablesetting");
|
1379 |
-
}
|
1380 |
-
}
|
1381 |
-
|
1382 |
-
function cpsetting(id) {
|
1383 |
-
if (id == 'custompost') {
|
1384 |
-
jQuery('#cplabel').removeClass("disablesetting");
|
1385 |
-
jQuery('#cplabel').addClass("enablesetting");
|
1386 |
-
jQuery('#nocplabel').addClass("disablesetting");
|
1387 |
-
jQuery('#nocplabel').removeClass("enablesetting");
|
1388 |
-
}
|
1389 |
-
else {
|
1390 |
-
jQuery('#nocplabel').removeClass("disablesetting");
|
1391 |
-
jQuery('#nocplabel').addClass("enablesetting");
|
1392 |
-
jQuery('#cplabel').addClass("disablesetting");
|
1393 |
-
jQuery('#cplabel').removeClass("enablesetting");
|
1394 |
-
}
|
1395 |
-
}
|
1396 |
-
function custaxsetting(id) {
|
1397 |
-
if (id == 'customtaxonomy') {
|
1398 |
-
jQuery('#custaxlabel').removeClass("disablesetting");
|
1399 |
-
jQuery('#custaxlabel').addClass("enablesetting");
|
1400 |
-
jQuery('#nocustaxlabel').addClass("disablesetting");
|
1401 |
-
jQuery('#nocustaxlabel').removeClass("enablesetting");
|
1402 |
-
}
|
1403 |
-
else {
|
1404 |
-
jQuery('#nocustaxlabel').removeClass("disablesetting");
|
1405 |
-
jQuery('#nocustaxlabel').addClass("enablesetting");
|
1406 |
-
jQuery('#custaxlabel').addClass("disablesetting");
|
1407 |
-
jQuery('#custaxlabel').removeClass("enablesetting");
|
1408 |
-
}
|
1409 |
-
}
|
1410 |
-
|
1411 |
-
function catsetting(id) {
|
1412 |
-
if (id == 'categories') {
|
1413 |
-
jQuery('#catlabel').removeClass("disablesetting");
|
1414 |
-
jQuery('#catlabel').addClass("enablesetting");
|
1415 |
-
jQuery('#nocatlabel').addClass("disablesetting");
|
1416 |
-
jQuery('#nocatlabel').removeClass("enablesetting");
|
1417 |
-
}
|
1418 |
-
else {
|
1419 |
-
jQuery('#nocatlabel').removeClass("disablesetting");
|
1420 |
-
jQuery('#nocatlabel').addClass("enablesetting");
|
1421 |
-
jQuery('#catlabel').addClass("disablesetting");
|
1422 |
-
jQuery('#catlabel').removeClass("enablesetting");
|
1423 |
-
}
|
1424 |
-
}
|
1425 |
-
|
1426 |
-
function cusrevsetting(id) {
|
1427 |
-
if (id == 'rcustomerreviews') {
|
1428 |
-
jQuery('#custrevlabel').removeClass("disablesetting");
|
1429 |
-
jQuery('#custrevlabel').addClass("enablesetting");
|
1430 |
-
jQuery('#nocustrevlabel').addClass("disablesetting");
|
1431 |
-
jQuery('#nocustrevlabel').removeClass("enablesetting");
|
1432 |
-
}
|
1433 |
-
else {
|
1434 |
-
jQuery('#nocustrevlabel').removeClass("disablesetting");
|
1435 |
-
jQuery('#nocustrevlabel').addClass("enablesetting");
|
1436 |
-
jQuery('#custrevlabel').addClass("disablesetting");
|
1437 |
-
jQuery('#custrevlabel').removeClass("enablesetting");
|
1438 |
-
}
|
1439 |
-
}
|
1440 |
-
|
1441 |
-
|
1442 |
-
//Custom field
|
1443 |
-
function resetOption(id) {
|
1444 |
-
if (id == 'resetopt') {
|
1445 |
-
document.getElementById('runcheckmember').checked = true;
|
1446 |
-
document.getElementById('wpcustomfields').checked = false;
|
1447 |
-
document.getElementById('cctmcustomfield').checked = false;
|
1448 |
-
document.getElementById('acfcustomfield').checked = false;
|
1449 |
-
document.getElementById('typescustomfield').checked = false;
|
1450 |
-
document.getElementById('podscustomfield').checked = false;
|
1451 |
-
|
1452 |
-
document.getElementById('customfield1text').innerHTML = "Disabled";
|
1453 |
-
document.getElementById('customfield2text').innerHTML = "Disabled";
|
1454 |
-
document.getElementById('customfield3text').innerHTML = "Disabled";
|
1455 |
-
document.getElementById('customfield4text').innerHTML = "Disabled";
|
1456 |
-
|
1457 |
-
jQuery('#wpuseruncheck').removeClass("disablesetting");
|
1458 |
-
jQuery('#wpuseruncheck').addClass("enablesetting");
|
1459 |
-
jQuery('#wpusercheck').addClass("disablesetting");
|
1460 |
-
jQuery('#wpusercheck').removeClass("enablesetting");
|
1461 |
-
jQuery('#customfieldsetting1').addClass("disablesetting");
|
1462 |
-
jQuery('#customfieldsetting1').removeClass("enablesetting");
|
1463 |
-
jQuery('#customfieldsetting2').addClass("disablesetting");
|
1464 |
-
jQuery('#customfieldsetting2').removeClass("enablesetting");
|
1465 |
-
jQuery('#customfieldsetting3').addClass("disablesetting");
|
1466 |
-
jQuery('#customfieldsetting3').removeClass("enablesetting");
|
1467 |
-
jQuery('#customfieldsetting4').addClass("disablesetting");
|
1468 |
-
jQuery('#customfieldsetting4').removeClass("enablesetting");
|
1469 |
-
}
|
1470 |
-
}
|
1471 |
-
function wpmembersetting(id) {
|
1472 |
-
if (id == 'rwpmembers') {
|
1473 |
-
jQuery('#wpusercheck').removeClass("disablesetting");
|
1474 |
-
jQuery('#wpusercheck').addClass("enablesetting");
|
1475 |
-
jQuery('#wpuseruncheck').addClass("disablesetting");
|
1476 |
-
jQuery('#wpuseruncheck').removeClass("enablesetting");
|
1477 |
-
}
|
1478 |
-
else {
|
1479 |
-
jQuery('#wpuseruncheck').removeClass("disablesetting");
|
1480 |
-
jQuery('#wpuseruncheck').addClass("enablesetting");
|
1481 |
-
jQuery('#wpusercheck').addClass("disablesetting");
|
1482 |
-
jQuery('#wpusercheck').removeClass("enablesetting");
|
1483 |
-
}
|
1484 |
-
}
|
1485 |
-
function customfieldsetting(id) {
|
1486 |
-
if (id == 'acfcustomfield') {
|
1487 |
-
jQuery('#customfieldsetting1').removeClass("disablesetting");
|
1488 |
-
jQuery('#customfieldsetting1').addClass("enablesetting");
|
1489 |
-
document.getElementById("customfield1text").innerHTML = "Enabled";
|
1490 |
-
document.getElementById("customfield2text").innerHTML = "Disabled";
|
1491 |
-
document.getElementById("customfield3text").innerHTML = "Disabled";
|
1492 |
-
document.getElementById("customfield4text").innerHTML = "Disabled";
|
1493 |
-
jQuery('#customfieldsetting2').addClass("disablesetting");
|
1494 |
-
jQuery('#customfieldsetting2').removeClass("enablesetting");
|
1495 |
-
jQuery('#customfieldsetting3').addClass("disablesetting");
|
1496 |
-
jQuery('#customfieldsetting3').removeClass("enablesetting");
|
1497 |
-
jQuery('#customfieldsetting4').addClass("disablesetting");
|
1498 |
-
jQuery('#customfieldsetting4').removeClass("enablesetting");
|
1499 |
-
}
|
1500 |
-
else if (id == 'cctmcustomfield') {
|
1501 |
-
jQuery('#customfieldsetting2').removeClass("disablesetting");
|
1502 |
-
jQuery('#customfieldsetting2').addClass("enablesetting");
|
1503 |
-
document.getElementById('customfield2text').innerHTML = "Enabled";
|
1504 |
-
document.getElementById("customfield1text").innerHTML = "Disabled";
|
1505 |
-
document.getElementById("customfield3text").innerHTML = "Disabled";
|
1506 |
-
document.getElementById("customfield4text").innerHTML = "Disabled";
|
1507 |
-
jQuery('#customfieldsetting1').addClass("disablesetting");
|
1508 |
-
jQuery('#customfieldsetting1').removeClass("enablesetting");
|
1509 |
-
jQuery('#customfieldsetting3').addClass("disablesetting");
|
1510 |
-
jQuery('#customfieldsetting3').removeClass("enablesetting");
|
1511 |
-
jQuery('#customfieldsetting4').addClass("disablesetting");
|
1512 |
-
jQuery('#customfieldsetting4').removeClass("enablesetting");
|
1513 |
-
}
|
1514 |
-
else if (id == 'typescustomfield') {
|
1515 |
-
jQuery('#customfieldsetting3').removeClass("disablesetting");
|
1516 |
-
jQuery('#customfieldsetting3').addClass("enablesetting");
|
1517 |
-
document.getElementById('customfield3text').innerHTML = "Enabled";
|
1518 |
-
document.getElementById("customfield1text").innerHTML = "Disabled";
|
1519 |
-
document.getElementById("customfield2text").innerHTML = "Disabled";
|
1520 |
-
document.getElementById("customfield4text").innerHTML = "Disabled";
|
1521 |
-
jQuery('#customfieldsetting1').addClass("disablesetting");
|
1522 |
-
jQuery('#customfieldsetting1').removeClass("enablesetting");
|
1523 |
-
jQuery('#customfieldsetting2').addClass("disablesetting");
|
1524 |
-
jQuery('#customfieldsetting2').removeClass("enablesetting");
|
1525 |
-
jQuery('#customfieldsetting4').addClass("disablesetting");
|
1526 |
-
jQuery('#customfieldsetting4').removeClass("enablesetting");
|
1527 |
-
}
|
1528 |
-
else if (id == 'podscustomfield') {
|
1529 |
-
jQuery('#customfieldsetting4').removeClass("disablesetting");
|
1530 |
-
jQuery('#customfieldsetting4').addClass("enablesetting");
|
1531 |
-
document.getElementById('customfield4text').innerHTML = "Enabled";
|
1532 |
-
document.getElementById("customfield1text").innerHTML = "Disabled";
|
1533 |
-
document.getElementById("customfield2text").innerHTML = "Disabled";
|
1534 |
-
document.getElementById("customfield3text").innerHTML = "Disabled";
|
1535 |
-
jQuery('#customfieldsetting1').addClass("disablesetting");
|
1536 |
-
jQuery('#customfieldsetting1').removeClass("enablesetting");
|
1537 |
-
jQuery('#customfieldsetting2').addClass("disablesetting");
|
1538 |
-
jQuery('#customfieldsetting2').removeClass("enablesetting");
|
1539 |
-
jQuery('#customfieldsetting3').addClass("disablesetting");
|
1540 |
-
jQuery('#customfieldsetting3').removeClass("enablesetting");
|
1541 |
-
}
|
1542 |
-
}
|
1543 |
//Additional Features
|
1544 |
function schedulesetting(id) {
|
1545 |
if (id == 'scheduled') {
|
@@ -1602,113 +1032,6 @@ function debugmode_check(id) {
|
|
1602 |
}
|
1603 |
}
|
1604 |
|
1605 |
-
//Ecommerce setting
|
1606 |
-
function ecommercesetting(id) {
|
1607 |
-
if (id == 'nonerecommerce') {
|
1608 |
-
jQuery('#ecommercesetting1').removeClass("disablesetting");
|
1609 |
-
jQuery('#ecommercesetting1').addClass("enablesetting");
|
1610 |
-
document.getElementById("ecommerce1text").innerHTML = "Enabled";
|
1611 |
-
document.getElementById("ecommerce2text").innerHTML = "Disabled";
|
1612 |
-
document.getElementById("ecommerce3text").innerHTML = "Disabled";
|
1613 |
-
document.getElementById("ecommerce4text").innerHTML = "Disabled";
|
1614 |
-
document.getElementById("ecommerce5text").innerHTML = "Disabled";
|
1615 |
-
|
1616 |
-
jQuery('#ecommercesetting2').addClass("disablesetting");
|
1617 |
-
jQuery('#ecommercesetting2').removeClass("enablesetting");
|
1618 |
-
jQuery('#ecommercesetting3').addClass("disablesetting");
|
1619 |
-
jQuery('#ecommercesetting3').removeClass("enablesetting");
|
1620 |
-
jQuery('#ecommercesetting4').addClass("disablesetting");
|
1621 |
-
jQuery('#ecommercesetting4').removeClass("enablesetting");
|
1622 |
-
jQuery('#ecommercesetting5').addClass("disablesetting");
|
1623 |
-
jQuery('#ecommercesetting5').removeClass("enablesetting");
|
1624 |
-
}
|
1625 |
-
else if (id == 'eshop') {
|
1626 |
-
jQuery('#ecommercesetting2').removeClass("disablesetting");
|
1627 |
-
jQuery('#ecommercesetting2').addClass("enablesetting");
|
1628 |
-
document.getElementById("ecommerce2text").innerHTML = "Enabled";
|
1629 |
-
document.getElementById("ecommerce1text").innerHTML = "Disabled";
|
1630 |
-
document.getElementById("ecommerce3text").innerHTML = "Disabled";
|
1631 |
-
document.getElementById("ecommerce4text").innerHTML = "Disabled";
|
1632 |
-
document.getElementById("ecommerce5text").innerHTML = "Disabled";
|
1633 |
-
jQuery('#ecommercesetting1').addClass("disablesetting");
|
1634 |
-
jQuery('#ecommercesetting1').removeClass("enablesetting");
|
1635 |
-
jQuery('#ecommercesetting3').addClass("disablesetting");
|
1636 |
-
jQuery('#ecommercesetting3').removeClass("enablesetting");
|
1637 |
-
jQuery('#ecommercesetting4').addClass("disablesetting");
|
1638 |
-
jQuery('#ecommercesetting4').removeClass("enablesetting");
|
1639 |
-
jQuery('#ecommercesetting5').addClass("disablesetting");
|
1640 |
-
jQuery('#ecommercesetting5').removeClass("enablesetting");
|
1641 |
-
}
|
1642 |
-
else if (id == 'marketpress') {
|
1643 |
-
jQuery('#ecommercesetting3').removeClass("disablesetting");
|
1644 |
-
jQuery('#ecommercesetting3').addClass("enablesetting");
|
1645 |
-
document.getElementById("ecommerce3text").innerHTML = "Enabled";
|
1646 |
-
document.getElementById("ecommerce2text").innerHTML = "Disabled";
|
1647 |
-
document.getElementById("ecommerce1text").innerHTML = "Disabled";
|
1648 |
-
document.getElementById("ecommerce4text").innerHTML = "Disabled";
|
1649 |
-
document.getElementById("ecommerce5text").innerHTML = "Disabled";
|
1650 |
-
jQuery('#ecommercesetting1').addClass("disablesetting");
|
1651 |
-
jQuery('#ecommercesetting1').removeClass("enablesetting");
|
1652 |
-
jQuery('#ecommercesetting2').addClass("disablesetting");
|
1653 |
-
jQuery('#ecommercesetting2').removeClass("enablesetting");
|
1654 |
-
jQuery('#ecommercesetting4').addClass("disablesetting");
|
1655 |
-
jQuery('#ecommercesetting4').removeClass("enablesetting");
|
1656 |
-
jQuery('#ecommercesetting5').addClass("disablesetting");
|
1657 |
-
jQuery('#ecommercesetting5').removeClass("enablesetting");
|
1658 |
-
}
|
1659 |
-
else if (id == 'woocommerce') {
|
1660 |
-
jQuery('#ecommercesetting4').removeClass("disablesetting");
|
1661 |
-
jQuery('#ecommercesetting4').addClass("enablesetting");
|
1662 |
-
document.getElementById("ecommerce4text").innerHTML = "Enabled";
|
1663 |
-
document.getElementById("ecommerce2text").innerHTML = "Disabled";
|
1664 |
-
document.getElementById("ecommerce3text").innerHTML = "Disabled";
|
1665 |
-
document.getElementById("ecommerce1text").innerHTML = "Disabled";
|
1666 |
-
document.getElementById("ecommerce5text").innerHTML = "Disabled";
|
1667 |
-
jQuery('#ecommercesetting1').addClass("disablesetting");
|
1668 |
-
jQuery('#ecommercesetting1').removeClass("enablesetting");
|
1669 |
-
jQuery('#ecommercesetting2').addClass("disablesetting");
|
1670 |
-
jQuery('#ecommercesetting2').removeClass("enablesetting");
|
1671 |
-
jQuery('#ecommercesetting3').addClass("disablesetting");
|
1672 |
-
jQuery('#ecommercesetting3').removeClass("enablesetting");
|
1673 |
-
jQuery('#ecommercesetting5').addClass("disablesetting");
|
1674 |
-
jQuery('#ecommercesetting5').removeClass("enablesetting");
|
1675 |
-
}
|
1676 |
-
else if (id == 'wpcommerce') {
|
1677 |
-
jQuery('#ecommercesetting5').removeClass("disablesetting");
|
1678 |
-
jQuery('#ecommercesetting5').addClass("enablesetting");
|
1679 |
-
document.getElementById("ecommerce5text").innerHTML = "Enabled";
|
1680 |
-
document.getElementById("ecommerce2text").innerHTML = "Disabled";
|
1681 |
-
document.getElementById("ecommerce3text").innerHTML = "Disabled";
|
1682 |
-
document.getElementById("ecommerce4text").innerHTML = "Disabled";
|
1683 |
-
document.getElementById("ecommerce1text").innerHTML = "Disabled";
|
1684 |
-
jQuery('#ecommercesetting1').addClass("disablesetting");
|
1685 |
-
jQuery('#ecommercesetting1').removeClass("enablesetting");
|
1686 |
-
jQuery('#ecommercesetting2').addClass("disablesetting");
|
1687 |
-
jQuery('#ecommercesetting2').removeClass("enablesetting");
|
1688 |
-
jQuery('#ecommercesetting4').addClass("disablesetting");
|
1689 |
-
jQuery('#ecommercesetting4').removeClass("enablesetting");
|
1690 |
-
jQuery('#ecommercesetting3').addClass("disablesetting");
|
1691 |
-
jQuery('#ecommercesetting3').removeClass("enablesetting");
|
1692 |
-
}
|
1693 |
-
else {
|
1694 |
-
jQuery('#ecommercesetting5').removeClass("enablesetting");
|
1695 |
-
jQuery('#ecommercesetting5').addClass("disablesetting");
|
1696 |
-
document.getElementById("ecommerce5text").innerHTML = "Disabled";
|
1697 |
-
document.getElementById("ecommerce2text").innerHTML = "Disabled";
|
1698 |
-
document.getElementById("ecommerce3text").innerHTML = "Disabled";
|
1699 |
-
document.getElementById("ecommerce4text").innerHTML = "Disabled";
|
1700 |
-
document.getElementById("ecommerce1text").innerHTML = "Disabled";
|
1701 |
-
jQuery('#ecommercesetting1').addClass("disablesetting");
|
1702 |
-
jQuery('#ecommercesetting1').removeClass("enablesetting");
|
1703 |
-
jQuery('#ecommercesetting2').addClass("disablesetting");
|
1704 |
-
jQuery('#ecommercesetting2').removeClass("enablesetting");
|
1705 |
-
jQuery('#ecommercesetting4').addClass("disablesetting");
|
1706 |
-
jQuery('#ecommercesetting4').removeClass("enablesetting");
|
1707 |
-
jQuery('#ecommercesetting3').addClass("disablesetting");
|
1708 |
-
jQuery('#ecommercesetting3').removeClass("enablesetting");
|
1709 |
-
}
|
1710 |
-
|
1711 |
-
}
|
1712 |
|
1713 |
//End of settings js
|
1714 |
|
1 |
jQuery(document).ready(function () {
|
2 |
jQuery('.dropdown-toggle').dropdown('toggle');
|
3 |
var checkmodule = document.getElementById('checkmodule').value;
|
4 |
+
if (checkmodule != 'dashboard' && checkmodule != 'filemanager' && checkmodule != 'support' && checkmodule != 'export' && checkmodule != 'settings' && checkmodule != 'mappingtemplate' && checkmodule != 'schedulemapping') {
|
5 |
var get_log = document.getElementById('log').innerHTML;
|
6 |
if (!jQuery.trim(jQuery('#log').html()).length) {
|
7 |
document.getElementById('log').innerHTML = '<p style="margin:15px;color:red;">' + translateAlertString("NO LOGS YET NOW.") + '</p>';
|
8 |
+
}
|
9 |
|
10 |
//pieStats();
|
11 |
//lineStats();
|
20 |
document.getElementById('cust_post_empty').style.display = '';
|
21 |
}
|
22 |
}
|
23 |
+
if (checkmodule != 'filemanager' && checkmodule != 'settings' && checkmodule != 'support' && checkmodule != 'export' && checkmodule != 'mappingtemplate' && checkmodule != 'schedulemapping') {
|
24 |
var checkfile = jQuery('#checkfile').val();
|
25 |
var dir_path = jQuery('#dirpathval').val();
|
26 |
var uploadedFile = jQuery('#uploadedFile').val();
|
34 |
document.getElementById('log').innerHTML = '<p style="margin:15px;color:red;">' + translateAlertString("NO LOGS YET NOW.") + '</p>';
|
35 |
}
|
36 |
|
|
|
|
|
|
|
37 |
if (select_delimeter != '') {
|
38 |
select_delim = select_delimeter;
|
39 |
}
|
40 |
if (uploadedFile != '' && select_delim != '') {
|
41 |
var tmpLoc = jQuery('#tmpLoc').val();
|
|
|
42 |
if (tmpLoc != '' && tmpLoc != null) {
|
43 |
jQuery.ajax({
|
44 |
url: ajaxurl,
|
156 |
return false;
|
157 |
}
|
158 |
}
|
|
|
159 |
var tmpLoc = document.getElementById('tmpLoc').value;
|
160 |
jQuery.ajax({
|
161 |
url: ajaxurl,
|
214 |
poststate = 24;
|
215 |
var ps = document.getElementById("importallwithps");
|
216 |
var selectedpsindex = ps.options[ps.selectedIndex].value;
|
217 |
+
if (selectedpsindex == 6) {
|
218 |
document.getElementById('globalpassword_label').style.display = "block";
|
219 |
document.getElementById('globalpassword_text').style.display = "block";
|
220 |
+
document.getElementById('globalpassword_txt').focus();
|
221 |
}
|
222 |
else {
|
223 |
document.getElementById('globalpassword_label').style.display = "none";
|
225 |
}
|
226 |
var totdropdown = document.getElementById('h2').value;
|
227 |
var total = parseInt(totdropdown);
|
228 |
+
if (selectedpsindex != '0') {
|
229 |
|
230 |
for (var i = 0; i < poststate; i++) {
|
231 |
|
232 |
+
dropdown = document.getElementById("fieldname" + i);
|
233 |
+
if(dropdown.value == "post_status"){
|
234 |
+
document.getElementById("mapping"+i).selectedIndex = "0";
|
235 |
+
}
|
|
|
236 |
}
|
237 |
|
238 |
}
|
239 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
|
241 |
+
function changefield()
|
242 |
+
{
|
243 |
+
var importer = document.getElementById('selectedImporter').value;
|
244 |
+
if (importer == 'post' || importer == 'custompost')
|
245 |
+
poststate = 12;
|
246 |
+
if (importer == 'page' || importer == 'users')
|
247 |
+
poststate = 11;
|
248 |
+
if (importer == 'eshop')
|
249 |
+
poststate = 24;
|
250 |
+
for(var i=0;i < poststate;i++)
|
251 |
+
{
|
252 |
+
dropdown = document.getElementById("fieldname"+i);
|
253 |
+
if(dropdown.value == "post_status"){
|
254 |
+
|
255 |
+
if(document.getElementById("mapping"+i).selectedIndex != 0)
|
256 |
+
document.getElementById("importallwithps").selectedIndex = "0";
|
257 |
+
}
|
258 |
+
}
|
259 |
+
var ps = document.getElementById("importallwithps");
|
260 |
+
var selectedpsindex = ps.options[ps.selectedIndex].value;
|
261 |
+
if(selectedpsindex == 0){
|
262 |
+
document.getElementById('globalpassword_label').style.display = "none";
|
263 |
+
document.getElementById('globalpassword_text').style.display = "none";
|
264 |
+
}
|
265 |
}
|
266 |
|
267 |
|
268 |
// Function for add customfield
|
269 |
|
270 |
+
function addcorecustomfield(id){
|
271 |
+
var table_id = id;
|
272 |
+
var newrow = table_id.insertRow(-1);
|
273 |
+
var count = document.getElementById('basic_count').value;
|
274 |
+
count = parseInt(count)+1;
|
275 |
+
newrow.id = 'custrow'+count;
|
276 |
+
var filename = document.getElementById('uploadedFile').value;
|
277 |
+
var row_count = document.getElementById('corecustomcount').value;
|
278 |
+
jQuery.ajax({
|
279 |
+
url: ajaxurl,
|
280 |
+
type: 'post',
|
281 |
+
data: {
|
282 |
+
'filename' : filename,
|
283 |
+
'corecount' : count,
|
284 |
+
'action' : 'addcorecustomfd',
|
285 |
+
},
|
286 |
+
success: function (response) {
|
287 |
+
newrow.innerHTML = response;
|
288 |
+
row_count = parseInt(row_count) + 1;
|
289 |
+
document.getElementById('corecustomcount').value = row_count;
|
290 |
+
document.getElementById('basic_count').value = count;
|
291 |
+
}
|
292 |
+
});
|
293 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
}
|
295 |
|
296 |
|
405 |
// code ends here on checking templatename
|
406 |
var total = '';
|
407 |
var importer = document.getElementById('selectedImporter').value;
|
408 |
+
var pwdvalidation = document.getElementById('importallwithps');
|
409 |
+
if(importer != 'users')
|
410 |
+
var selectedpsindex = pwdvalidation.options[pwdvalidation.selectedIndex].value;
|
411 |
var header_count = document.getElementById('h2').value;
|
412 |
var array = new Array();
|
413 |
+
var wparray = new Array();
|
414 |
var val1, val2, val3, val4, val5, val6, val7, error_msg, chk_status_in_csv, post_status_msg;
|
415 |
val1 = val2 = val3 = val4 = val5 = val6 = val7 = post_status_msg = post_type = 'Off';
|
416 |
if (importer == 'post' || importer == 'custompost')
|
423 |
var value = document.getElementById("mapping" + i).value;
|
424 |
//var value = e.options[e.selectedIndex].value;
|
425 |
array[i] = value;
|
426 |
+
var wpvalue = document.getElementById("fieldname"+ i).value;
|
427 |
+
wparray[i] = wpvalue;
|
428 |
}
|
429 |
+
if (importer == 'post' || importer == 'page' || importer == 'custompost' || importer == 'eshop') {
|
430 |
if (importer == 'custompost') {
|
431 |
var getSelectedIndex = document.getElementById('custompostlist');
|
432 |
var SelectedIndex = getSelectedIndex.value;
|
440 |
if (chk_status_in_csv != 0)
|
441 |
post_status_msg = 'On';
|
442 |
|
443 |
+
if(selectedpsindex == 6) {
|
444 |
+
var checkpwd = document.getElementById('globalpassword_txt').value;
|
445 |
+
if(checkpwd != '')
|
446 |
+
val7 = 'On';
|
447 |
+
}
|
448 |
+
|
449 |
+
for (var j = 0; j < wparray.length; j++) {
|
450 |
+
if (wparray[j] == 'post_title' && array[j] != '-- Select --') {
|
451 |
val1 = 'On';
|
452 |
}
|
453 |
/* if (array[j] == 'post_content') {
|
454 |
val2 = 'On';
|
455 |
} */
|
456 |
if (post_status_msg == 'Off') {
|
457 |
+
if (wparray[j] == 'post_status' && array[j] != '-- Select --')
|
458 |
post_status_msg = 'On';
|
459 |
}
|
460 |
}
|
461 |
+
if (selectedpsindex == 6){
|
462 |
+
if (importer != 'custompost' && val1 == 'On' && post_status_msg == 'On' && val7 == 'On') {
|
463 |
+
return true;
|
464 |
+
}
|
465 |
+
else if (importer == 'custompost' && val1 == 'On' && post_status_msg == 'On' && post_type=='On' && val7 == 'On') {
|
466 |
+
return true;
|
467 |
+
}
|
468 |
+
else {
|
469 |
+
error_msg = '';
|
470 |
+
if (val7 == 'Off')
|
471 |
+
error_msg += "password";
|
472 |
+
if (val1 == 'Off')
|
473 |
+
error_msg += " post_title";
|
474 |
+
if(importer == 'custompost') {
|
475 |
+
if (SelectedIndex == 'select')
|
476 |
+
error_msg += " post_type";
|
477 |
+
}
|
478 |
+
if (post_status_msg == 'Off')
|
479 |
+
error_msg += " post_status";
|
480 |
+
showMapMessages('error', 'Error: ' + error_msg + translateAlertString(' - Mandatory fields. Please map the fields to proceed.'));
|
481 |
+
return false;
|
482 |
+
}
|
483 |
+
|
484 |
+
}
|
485 |
+
else {
|
486 |
if (importer != 'custompost' && val1 == 'On' && post_status_msg == 'On') {
|
487 |
return true;
|
488 |
}
|
505 |
return false;
|
506 |
}
|
507 |
}
|
508 |
+
}
|
509 |
// validation starts
|
510 |
else if (importer == 'comments') {
|
511 |
//var getSelectedIndex1 = document.getElementById('selectPosts');
|
802 |
}
|
803 |
|
804 |
// Enable/Disable WP-e-Commerce Custom Fields
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
805 |
|
806 |
+
function saveSettings() {
|
807 |
+
jQuery('#ShowMsg').css("display", "");
|
|
|
808 |
jQuery('#ShowMsg').delay(2000).fadeOut();
|
|
|
809 |
}
|
810 |
|
811 |
function Reload() {
|
812 |
window.location.reload();
|
813 |
}
|
814 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
815 |
function inArray(needle, haystack) {
|
816 |
var length = haystack.length;
|
817 |
for (var i = 0; i < length; i++) {
|
833 |
window.location.assign(get_current_url);
|
834 |
}
|
835 |
function sendemail2smackers() {
|
|
|
836 |
var message_content = document.getElementById('message').value;
|
837 |
var firstname = document.getElementById('firstname').value;
|
838 |
var lastname = document.getElementById('lastname').value;
|
863 |
function gotoback() {
|
864 |
var currentURL = document.getElementById('current_url').value;
|
865 |
var set_assigned_step = currentURL.replace("uploadfile", "mapping_settings");
|
|
|
866 |
}
|
867 |
function export_module() {
|
868 |
var get_selected_module = document.getElementsByName('export');
|
|
|
869 |
for (var i = 0, length = get_selected_module.length; i < length; i++) {
|
870 |
if (get_selected_module[i].checked) {
|
871 |
// do whatever you want with the checked radio
|
888 |
}
|
889 |
}
|
890 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
891 |
function choose_import_method(id) {
|
892 |
if (id == 'uploadfilefromcomputer') {
|
893 |
document.getElementById('boxmethod1').style.border = "1px solid #ccc";
|
907 |
document.getElementById('reportLog').style.display = 'none';
|
908 |
}
|
909 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
910 |
|
911 |
function addexportfilter(id) {
|
912 |
if (document.getElementById(id).checked == true) {
|
955 |
}
|
956 |
|
957 |
//Settings js code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
958 |
//Security and performance
|
959 |
function authorimportsetting(id) {
|
960 |
if (id == 'enableimport') {
|
970 |
jQuery('#allowimport').removeClass("enablesetting");
|
971 |
}
|
972 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
973 |
//Additional Features
|
974 |
function schedulesetting(id) {
|
975 |
if (id == 'scheduled') {
|
1032 |
}
|
1033 |
}
|
1034 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1035 |
|
1036 |
//End of settings js
|
1037 |
|
js/ultimate-importer-pro.js
DELETED
@@ -1,703 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function () {
|
2 |
-
var checkmodule = document.getElementById('checkmodule').value;
|
3 |
-
if (checkmodule != 'dashboard' && checkmodule != 'filemanager') {
|
4 |
-
var get_log = document.getElementById('log').innerHTML;
|
5 |
-
if (!jQuery.trim(jQuery('#log').html()).length) {
|
6 |
-
document.getElementById('log').innerHTML = '<p style="margin:15px;color:red;">NO LOGS YET NOW.</p>';
|
7 |
-
}
|
8 |
-
}
|
9 |
-
if (checkmodule == 'custompost') {
|
10 |
-
var step = document.getElementById('stepstatus').value;
|
11 |
-
if (step == 'mapping_settings') {
|
12 |
-
var cust_post_list_count = document.getElementById('cust_post_list_count').value;
|
13 |
-
if (cust_post_list_count == '0')
|
14 |
-
document.getElementById('cust_post_empty').style.display = '';
|
15 |
-
}
|
16 |
-
}
|
17 |
-
var checkfile = document.getElementById('checkfile').value;
|
18 |
-
var uploadedFile = document.getElementById('uploadedFile').value;
|
19 |
-
var select_delimeter = document.getElementById('select_delim').value;
|
20 |
-
var select_delim = document.getElementById('select_delim').value;
|
21 |
-
var get_log = document.getElementById('log').innerHTML;
|
22 |
-
if (!jQuery.trim(jQuery('#log').html()).length) {
|
23 |
-
document.getElementById('log').innerHTML = '<p style="margin:15px;color:red;">NO LOGS YET NOW.</p>';
|
24 |
-
}
|
25 |
-
if (checkfile != '') {
|
26 |
-
uploadedFile = checkfile;
|
27 |
-
}
|
28 |
-
if (select_delimeter != '') {
|
29 |
-
select_delim = select_delimeter;
|
30 |
-
}
|
31 |
-
var doaction = 'record_no=1&file_name=' + uploadedFile + '&selected_delimeter=' + select_delim;
|
32 |
-
var tmpLoc = document.getElementById('tmpLoc').value;
|
33 |
-
jQuery.ajax({
|
34 |
-
url: tmpLoc + 'templates/readfile.php',
|
35 |
-
type: 'post',
|
36 |
-
data: doaction,
|
37 |
-
dataType: 'json',
|
38 |
-
success: function (response) {
|
39 |
-
var totalLength = response.length;
|
40 |
-
var setHeight = (parseInt(totalLength) * 30) + 250;
|
41 |
-
//document.getElementById('sec-two').style.height = setHeight+'px';
|
42 |
-
}
|
43 |
-
});
|
44 |
-
});
|
45 |
-
function goto_mapping(id) {
|
46 |
-
if (id == 'importfile') {
|
47 |
-
var currentURL = document.URL;
|
48 |
-
var go_to_url = currentURL.replace("uploadfile", "mapping_settings");
|
49 |
-
window.location.assign(go_to_url);
|
50 |
-
document.getElementById('sec-one').style.display = 'none';
|
51 |
-
document.getElementById('sec-two').style.display = '';
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
function gotoelement(id) {
|
56 |
-
var gotoElement = document.getElementById('current_record').value;
|
57 |
-
var no_of_records = document.getElementById('totRecords').value;
|
58 |
-
var uploadedFile = document.getElementById('uploadedFile').value;
|
59 |
-
if (id == 'prev_record') {
|
60 |
-
gotoElement = parseInt(gotoElement) - 1;
|
61 |
-
}
|
62 |
-
if (id == 'next_record') {
|
63 |
-
gotoElement = parseInt(gotoElement) + 1;
|
64 |
-
}
|
65 |
-
if (gotoElement <= 0) {
|
66 |
-
gotoElement = 0;
|
67 |
-
}
|
68 |
-
if (gotoElement >= no_of_records) {
|
69 |
-
gotoElement = parseInt(no_of_records) - 1;
|
70 |
-
}
|
71 |
-
if (id == 'apply_element') {
|
72 |
-
gotoElement = parseInt(document.getElementById('goto_element').value);
|
73 |
-
if (isNaN(gotoElement)) {
|
74 |
-
showMapMessages('error', ' Please provide valid record number.');
|
75 |
-
}
|
76 |
-
if (gotoElement <= 0) {
|
77 |
-
gotoElement = 0;
|
78 |
-
showMapMessages('error', ' Please provide valid record number.');
|
79 |
-
} else {
|
80 |
-
gotoElement = gotoElement - 1;
|
81 |
-
}
|
82 |
-
if (gotoElement >= no_of_records) {
|
83 |
-
gotoElement = parseInt(no_of_records) - 1;
|
84 |
-
showMapMessages('error', 'CSV file have only ' + no_of_records + ' records.');
|
85 |
-
return false;
|
86 |
-
}
|
87 |
-
}
|
88 |
-
var doaction = 'record_no=' + gotoElement + '&file_name=' + uploadedFile;
|
89 |
-
var tmpLoc = document.getElementById('tmpLoc').value;
|
90 |
-
jQuery.ajax({
|
91 |
-
url: tmpLoc + 'templates/readfile.php',
|
92 |
-
type: 'post',
|
93 |
-
data: doaction,
|
94 |
-
dataType: 'json',
|
95 |
-
success: function (response) {
|
96 |
-
var totalLength = response.length;
|
97 |
-
for (var i = 0; i < totalLength; i++) {
|
98 |
-
if ((response[i].length) > 32) {
|
99 |
-
document.getElementById('elementVal_' + i).innerHTML = response[i].substring(0, 28) + '...';
|
100 |
-
} else {
|
101 |
-
document.getElementById('elementVal_' + i).innerHTML = response[i];
|
102 |
-
}
|
103 |
-
}
|
104 |
-
document.getElementById('current_record').value = gotoElement;
|
105 |
-
}
|
106 |
-
});
|
107 |
-
}
|
108 |
-
|
109 |
-
function showtemplatediv_wpuci(checked, div) {
|
110 |
-
if (checked)
|
111 |
-
$('#' + div).show();
|
112 |
-
else
|
113 |
-
$('#' + div).hide();
|
114 |
-
}
|
115 |
-
|
116 |
-
function showtemplatediv_edit(checked, value) {
|
117 |
-
if (value == 'saveas')
|
118 |
-
$('#showtemplate_edit_div').show();
|
119 |
-
else
|
120 |
-
$('#showtemplate_edit_div').hide();
|
121 |
-
}
|
122 |
-
|
123 |
-
|
124 |
-
function selectpoststatus() {
|
125 |
-
var ps = document.getElementById("importallwithps");
|
126 |
-
var selectedpsindex = ps.options[ps.selectedIndex].value;
|
127 |
-
if (selectedpsindex == 3) {
|
128 |
-
document.getElementById('globalpassword_label').style.display = "block";
|
129 |
-
document.getElementById('globalpassword_text').style.display = "block";
|
130 |
-
}
|
131 |
-
else {
|
132 |
-
document.getElementById('globalpassword_label').style.display = "none";
|
133 |
-
document.getElementById('globalpassword_text').style.display = "none";
|
134 |
-
}
|
135 |
-
var totdropdown = document.getElementById('h2').value;
|
136 |
-
var total = parseInt(totdropdown);
|
137 |
-
if (selectedpsindex == '0') {
|
138 |
-
|
139 |
-
for (var i = 0; i < total; i++) {
|
140 |
-
|
141 |
-
dropdown = document.getElementById("mapping" + i);
|
142 |
-
var option = document.createElement('option');
|
143 |
-
option.text = "post_status";
|
144 |
-
dropdown.add(option);
|
145 |
-
|
146 |
-
}
|
147 |
-
|
148 |
-
}
|
149 |
-
else {
|
150 |
-
for (var i = 0; i < total; i++) {
|
151 |
-
|
152 |
-
dropdown = document.getElementById("mapping" + i);
|
153 |
-
|
154 |
-
var totarr = dropdown.options.length;
|
155 |
-
|
156 |
-
for (var j = 0; j < totarr; j++) {
|
157 |
-
|
158 |
-
if (dropdown.options[j].value == 'post_status') {
|
159 |
-
|
160 |
-
dropdown.options.remove(j);
|
161 |
-
totarr--;
|
162 |
-
}
|
163 |
-
}
|
164 |
-
|
165 |
-
}
|
166 |
-
}
|
167 |
-
}
|
168 |
-
|
169 |
-
|
170 |
-
// Function for add customfield
|
171 |
-
|
172 |
-
function addcustomfield(myval, selected_id) {
|
173 |
-
var a = document.getElementById('h1').value;
|
174 |
-
var importer = document.getElementById('selectedImporter').value;
|
175 |
-
var aa = document.getElementById('h2').value;
|
176 |
-
var selected_dropdown = document.getElementById('mapping' + selected_id);
|
177 |
-
var selected_value = selected_dropdown.value;
|
178 |
-
var prevoptionindex = document.getElementById('prevoptionindex').value;
|
179 |
-
var prevoptionvalue = document.getElementById('prevoptionvalue').value;
|
180 |
-
var mappedID = 'mapping' + selected_id;
|
181 |
-
var add_prev_option = false;
|
182 |
-
if (mappedID == prevoptionindex) {
|
183 |
-
add_prev_option = true;
|
184 |
-
}
|
185 |
-
for (var i = 0; i < aa; i++) {
|
186 |
-
var b = document.getElementById('mapping' + i).value;
|
187 |
-
var id = 'mapping' + i;
|
188 |
-
if (add_prev_option) {
|
189 |
-
if (i != selected_id) {
|
190 |
-
jQuery('#' + id).append(new Option(prevoptionvalue, prevoptionvalue));
|
191 |
-
}
|
192 |
-
}
|
193 |
-
if (i != selected_id) {
|
194 |
-
var x = document.getElementById('mapping' + i);
|
195 |
-
jQuery('#' + id + ' option[value="' + selected_value + '"]').remove();
|
196 |
-
}
|
197 |
-
if (b == 'add_custom' + i) {
|
198 |
-
document.getElementById('textbox' + i).style.display = "";
|
199 |
-
document.getElementById('customspan' + i).style.display = "";
|
200 |
-
}
|
201 |
-
else {
|
202 |
-
document.getElementById('textbox' + i).style.display = "none";
|
203 |
-
document.getElementById('customspan' + i).style.display = "none";
|
204 |
-
}
|
205 |
-
}
|
206 |
-
document.getElementById('prevoptionindex').value = 'mapping' + selected_id;
|
207 |
-
var customField = selected_value.indexOf("add_custom");
|
208 |
-
if (selected_value != '-- Select --' && customField != 0) {
|
209 |
-
document.getElementById('prevoptionvalue').value = selected_value;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
|
214 |
-
function clearMapping() {
|
215 |
-
var total_mfields = document.getElementById('h2').value;
|
216 |
-
var mfields_arr = document.getElementById('mapping_fields_array').value;
|
217 |
-
var n = mfields_arr.split(",");
|
218 |
-
var options = '<option id="select">-- Select --</option>';
|
219 |
-
for (var i = 0; i < n.length; i++) {
|
220 |
-
options += "<option value='" + n[i] + "'>" + n[i] + "</option>";
|
221 |
-
}
|
222 |
-
for (var j = 0; j < total_mfields; j++) {
|
223 |
-
document.getElementById('mapping' + j).innerHTML = options;
|
224 |
-
document.getElementById('mapping' + j).innerHTML += "<option value='add_custom" + j + "'>Add Custom Field</option>";
|
225 |
-
document.getElementById('textbox' + j).style.display = 'none';
|
226 |
-
document.getElementById('customspan' + j).style.display = 'none';
|
227 |
-
}
|
228 |
-
}
|
229 |
-
|
230 |
-
function clearmapping() {
|
231 |
-
var total_mfields = document.getElementById('h2').value;
|
232 |
-
var mfields_arr = document.getElementById('mapping_fields_array').value;
|
233 |
-
var n = mfields_arr.split(",");
|
234 |
-
var options = "<option id='select'>-- Select --</option>";
|
235 |
-
for (var i = 0; i < n.length; i++) {
|
236 |
-
options += "<option value='" + n[i] + "'>" + n[i] + "</option>";
|
237 |
-
}
|
238 |
-
for (var j = 0; j < total_mfields; j++) {
|
239 |
-
document.getElementById('mapping' + j).innerHTML = options;
|
240 |
-
//document.getElementById('mapping'+j).innerHTML += "<option value='add_custom"+j+"'>Add Custom Field</option>";
|
241 |
-
document.getElementById('textbox' + j).style.display = 'none';
|
242 |
-
document.getElementById('customspan' + j).style.display = 'none';
|
243 |
-
}
|
244 |
-
}
|
245 |
-
|
246 |
-
function shownotification(msg, alerts) {
|
247 |
-
var newclass;
|
248 |
-
var divid = "notification_wp_csv";
|
249 |
-
|
250 |
-
if (alerts == 'success')
|
251 |
-
newclass = "alert alert-success";
|
252 |
-
else if (alerts == 'danger')
|
253 |
-
newclass = "alert alert-danger";
|
254 |
-
else if (alerts == 'warning')
|
255 |
-
newclass = "alert alert-warning";
|
256 |
-
else
|
257 |
-
newclass = "alert alert-info";
|
258 |
-
|
259 |
-
jQuery('#' + divid).removeClass()
|
260 |
-
jQuery('#' + divid).html(msg);
|
261 |
-
jQuery('#' + divid).addClass(newclass);
|
262 |
-
// Scroll
|
263 |
-
jQuery('html,body').animate({
|
264 |
-
scrollTop: jQuery("#" + divid).offset().top
|
265 |
-
},
|
266 |
-
'slow');
|
267 |
-
}
|
268 |
-
|
269 |
-
function import_csv() {
|
270 |
-
// code added by goku to check whether templatename
|
271 |
-
var mapping_checked = $('#mapping_templatename_checked').is(':checked');
|
272 |
-
var mapping_tempname = $('#mapping_templatename').val();
|
273 |
-
var mapping_checked_radio = $('input[name=tempaction]:radio:checked').val();
|
274 |
-
if (mapping_checked || mapping_checked_radio == 'saveas') {
|
275 |
-
if (mapping_checked_radio == 'saveas')
|
276 |
-
mapping_tempname = $('#mapping_templatename_edit').val();
|
277 |
-
|
278 |
-
if ($.trim(mapping_tempname) == '') {
|
279 |
-
alert('Template name is empty');
|
280 |
-
return false;
|
281 |
-
}
|
282 |
-
else {
|
283 |
-
// check templatename already exists
|
284 |
-
jQuery.ajax({
|
285 |
-
type: 'POST',
|
286 |
-
url: ajaxurl,
|
287 |
-
async: false,
|
288 |
-
data: {
|
289 |
-
'action': 'checktemplatename',
|
290 |
-
'templatename': mapping_tempname,
|
291 |
-
},
|
292 |
-
success: function (data) {
|
293 |
-
if (data != 0) {
|
294 |
-
$('#mapping_templatename').val('');
|
295 |
-
}
|
296 |
-
},
|
297 |
-
error: function (errorThrown) {
|
298 |
-
console.log(errorThrown);
|
299 |
-
}
|
300 |
-
});
|
301 |
-
}
|
302 |
-
}
|
303 |
-
var mapping_tempname = $('#mapping_templatename').val();
|
304 |
-
if (mapping_checked_radio == 'saveas')
|
305 |
-
//mapping_tempname = $('#mapping_templatename_edit').val();
|
306 |
-
|
307 |
-
if (mapping_tempname == '' && (mapping_checked || mapping_templatename_edit == 'saveas')) {
|
308 |
-
alert('Template Name already exists');
|
309 |
-
return false;
|
310 |
-
}
|
311 |
-
// code ends here on checking templatename
|
312 |
-
|
313 |
-
var importer = document.getElementById('selectedImporter').value;
|
314 |
-
var header_count = document.getElementById('h2').value;
|
315 |
-
var array = new Array();
|
316 |
-
var val1, val2, val3, val4, val5, val6, val7, error_msg, chk_status_in_csv, post_status_msg;
|
317 |
-
val1 = val2 = val3 = val4 = val5 = val6 = val7 = post_status_msg = post_type = 'Off';
|
318 |
-
for (var i = 0; i < header_count; i++) {
|
319 |
-
var e = document.getElementById("mapping" + i);
|
320 |
-
var value = e.options[e.selectedIndex].value;
|
321 |
-
array[i] = value;
|
322 |
-
}
|
323 |
-
//alert(array.length);
|
324 |
-
if (importer == 'post' || importer == 'page' || importer == 'custompost') {
|
325 |
-
if (importer == 'custompost') {
|
326 |
-
var getSelectedIndex = document.getElementById('custompostlist');
|
327 |
-
var SelectedIndex = getSelectedIndex.value;
|
328 |
-
//var t=getSelectedIndex.options[getSelectedIndex.selectedIndex];
|
329 |
-
if (SelectedIndex != 'select')
|
330 |
-
post_type = 'On';
|
331 |
-
//alert(t+'---'+SelectedIndex);
|
332 |
-
}
|
333 |
-
|
334 |
-
chk_status_in_csv = document.getElementById('importallwithps').value;
|
335 |
-
if (chk_status_in_csv != 0)
|
336 |
-
post_status_msg = 'On';
|
337 |
-
|
338 |
-
for (var j = 0; j < array.length; j++) {
|
339 |
-
if (array[j] == 'post_title') {
|
340 |
-
val1 = 'On';
|
341 |
-
}
|
342 |
-
if (array[j] == 'post_content') {
|
343 |
-
val2 = 'On';
|
344 |
-
}
|
345 |
-
if (post_status_msg == 'Off') {
|
346 |
-
if (array[j] == 'post_status')
|
347 |
-
post_status_msg = 'On';
|
348 |
-
}
|
349 |
-
}
|
350 |
-
if (importer != 'custompost' && val1 == 'On' && val2 == 'On' && post_status_msg == 'On') {
|
351 |
-
return true;
|
352 |
-
}
|
353 |
-
else if (importer == 'custompost' && val1 == 'On' && val2 == 'On' && post_status_msg == 'On' && post_type == 'On') {
|
354 |
-
return true;
|
355 |
-
}
|
356 |
-
else {
|
357 |
-
error_msg = '';
|
358 |
-
if (val1 == 'Off')
|
359 |
-
error_msg += " post_title,";
|
360 |
-
if (val2 == 'Off')
|
361 |
-
error_msg += " post_content,";
|
362 |
-
if (importer == 'custompost') {
|
363 |
-
if (SelectedIndex == 'select')
|
364 |
-
error_msg += " post_type,";
|
365 |
-
}
|
366 |
-
if (post_status_msg == 'Off')
|
367 |
-
error_msg += " post_status";
|
368 |
-
showMapMessages('error', 'Error: ' + error_msg + ' - Mandatory fields. Please map the fields to proceed.');
|
369 |
-
return false;
|
370 |
-
}
|
371 |
-
}
|
372 |
-
|
373 |
-
// validation starts
|
374 |
-
else if (importer == 'comments') {
|
375 |
-
//var getSelectedIndex1 = document.getElementById('selectPosts');
|
376 |
-
//var SelectedIndex1 = getSelectedIndex1.options[getSelectedIndex1.selectedIndex].text;
|
377 |
-
for (var j = 0; j < array.length; j++) {
|
378 |
-
if (array[j] == 'comment_author') {
|
379 |
-
val1 = 'On';
|
380 |
-
}
|
381 |
-
if (array[j] == 'comment_author_email') {
|
382 |
-
val2 = 'On';
|
383 |
-
}
|
384 |
-
if (array[j] == 'comment_content') {
|
385 |
-
val3 = 'On';
|
386 |
-
}
|
387 |
-
if (array[j] == 'comment_post_ID') {
|
388 |
-
val4 = 'On';
|
389 |
-
}
|
390 |
-
|
391 |
-
|
392 |
-
}
|
393 |
-
if (val1 == 'On' && val2 == 'On' && val3 == 'On' && val4 == 'On') {
|
394 |
-
return true;
|
395 |
-
}
|
396 |
-
else {
|
397 |
-
showMapMessages('error', ' "Post Id", "Comment Author", "Comment Author Email" and "Comment Content" should be mapped.');
|
398 |
-
return false;
|
399 |
-
}
|
400 |
-
|
401 |
-
|
402 |
-
showMapMessages('error', header_count);
|
403 |
-
return false;
|
404 |
-
}
|
405 |
-
else if (importer == 'users') {
|
406 |
-
//var getSelectedIndex = document.getElementById('userrole');
|
407 |
-
//var SelectedIndex = getSelectedIndex.options[getSelectedIndex.selectedIndex].text;
|
408 |
-
for (var j = 0; j < array.length; j++) {
|
409 |
-
if (array[j] == 'user_login') {
|
410 |
-
val1 = 'On';
|
411 |
-
}
|
412 |
-
if (array[j] == 'user_email') {
|
413 |
-
val2 = 'On';
|
414 |
-
}
|
415 |
-
if (array[j] == 'role') {
|
416 |
-
val3 = 'On';
|
417 |
-
}
|
418 |
-
}
|
419 |
-
if (val1 == 'On' && val2 == 'On' && val3 == 'On') {
|
420 |
-
return true;
|
421 |
-
}
|
422 |
-
else {
|
423 |
-
showMapMessages('error', '"role", "user_login" and "user_email" should be mapped.');
|
424 |
-
return false;
|
425 |
-
}
|
426 |
-
}
|
427 |
-
// validation ends
|
428 |
-
}
|
429 |
-
|
430 |
-
|
431 |
-
function showMapMessages(alerttype, msg) {
|
432 |
-
jQuery("#showMsg").addClass("maperror");
|
433 |
-
document.getElementById('showMsg').innerHTML = msg;
|
434 |
-
document.getElementById('showMsg').className += ' ' + alerttype;
|
435 |
-
document.getElementById('showMsg').style.display = '';
|
436 |
-
jQuery("#showMsg").fadeOut(10000);
|
437 |
-
}
|
438 |
-
|
439 |
-
function importRecordsbySettings(siteurl) {
|
440 |
-
var importlimit = document.getElementById('importlimit').value;
|
441 |
-
var get_requested_count = importlimit;
|
442 |
-
var tot_no_of_records = document.getElementById('checktotal').value;
|
443 |
-
var importas = document.getElementById('selectedImporter').value;
|
444 |
-
var uploadedFile = document.getElementById('checkfile').value;
|
445 |
-
// var no_of_columns = document.getElementById('h2').value;
|
446 |
-
var step = document.getElementById('stepstatus').value;
|
447 |
-
var mappingArr = document.getElementById('mappingArr').value;
|
448 |
-
var dupContent = document.getElementById('duplicatecontent').checked;
|
449 |
-
var dupTitle = document.getElementById('duplicatetitle').checked;
|
450 |
-
var currentlimit = document.getElementById('currentlimit').value;
|
451 |
-
var tmpCnt = document.getElementById('tmpcount').value;
|
452 |
-
var no_of_tot_records = document.getElementById('tot_records').value;
|
453 |
-
var get_log = document.getElementById('log').innerHTML;
|
454 |
-
|
455 |
-
if (get_requested_count != '') {
|
456 |
-
//return true;
|
457 |
-
} else {
|
458 |
-
document.getElementById('showMsg').style.display = "";
|
459 |
-
document.getElementById('showMsg').innerHTML = '<p id="warning-msg" class="alert alert-warning">Fill all mandatory fields.</p>';
|
460 |
-
jQuery("#showMsg").fadeOut(10000);
|
461 |
-
return false;
|
462 |
-
}
|
463 |
-
if (parseInt(get_requested_count) <= parseInt(no_of_tot_records)) {
|
464 |
-
document.getElementById('server_request_warning').style.display = 'none';
|
465 |
-
} else {
|
466 |
-
document.getElementById('server_request_warning').style.display = '';
|
467 |
-
return false;
|
468 |
-
}
|
469 |
-
if (get_log == '<p style="margin:15px;color:red;">NO LOGS YET NOW.</p>') {
|
470 |
-
document.getElementById('log').innerHTML = '<p style="margin:15px;color:red;">Your Import Is In Progress...</p>';
|
471 |
-
document.getElementById('startbutton').disabled = true;
|
472 |
-
}
|
473 |
-
document.getElementById('ajaxloader').style.display = "";
|
474 |
-
var tempCount = parseInt(tmpCnt);
|
475 |
-
var totalCount = parseInt(tot_no_of_records);
|
476 |
-
if (tempCount > totalCount) {
|
477 |
-
document.getElementById('ajaxloader').style.display = "none";
|
478 |
-
document.getElementById('startbutton').style.display = "none";
|
479 |
-
document.getElementById('importagain').style.display = "";
|
480 |
-
return false;
|
481 |
-
}
|
482 |
-
|
483 |
-
var postdata = new Array();
|
484 |
-
postdata = {
|
485 |
-
'dupContent': dupContent,
|
486 |
-
'dupTitle': dupTitle,
|
487 |
-
'importlimit': importlimit,
|
488 |
-
'limit': currentlimit,
|
489 |
-
'totRecords': tot_no_of_records,
|
490 |
-
'selectedImporter': importas,
|
491 |
-
'uploadedFile': uploadedFile,
|
492 |
-
'tmpcount': tmpCnt,
|
493 |
-
}
|
494 |
-
|
495 |
-
var tmpLoc = document.getElementById('tmpLoc').value;
|
496 |
-
jQuery.ajax({
|
497 |
-
type: 'POST',
|
498 |
-
url: ajaxurl,
|
499 |
-
data: {
|
500 |
-
'action': 'importByRequest',
|
501 |
-
'postdata': postdata,
|
502 |
-
'siteurl': siteurl,
|
503 |
-
},
|
504 |
-
success: function (data) {
|
505 |
-
if (parseInt(tmpCnt) == parseInt(tot_no_of_records)) {
|
506 |
-
document.getElementById('terminatenow').style.display = "none";
|
507 |
-
}
|
508 |
-
if (parseInt(tmpCnt) < parseInt(tot_no_of_records)) {
|
509 |
-
var terminate_action = document.getElementById('terminateaction').value;
|
510 |
-
if (terminate_action == 'continue') {
|
511 |
-
currentlimit = parseInt(currentlimit) + parseInt(importlimit);
|
512 |
-
document.getElementById('currentlimit').value = currentlimit;
|
513 |
-
console.log('impLmt: ' + importlimit + 'totRecds: ' + tot_no_of_records);
|
514 |
-
document.getElementById('tmpcount').value = parseInt(tmpCnt) + parseInt(importlimit);
|
515 |
-
setTimeout(function () {
|
516 |
-
importRecordsbySettings()
|
517 |
-
}, 0);
|
518 |
-
} else {
|
519 |
-
document.getElementById('log').innerHTML += "Import process has been terminated.</br>";
|
520 |
-
return false;
|
521 |
-
}
|
522 |
-
} else {
|
523 |
-
document.getElementById('ajaxloader').style.display = "none";
|
524 |
-
document.getElementById('startbutton').style.display = "none";
|
525 |
-
document.getElementById('importagain').style.display = "";
|
526 |
-
return false;
|
527 |
-
}
|
528 |
-
document.getElementById('log').innerHTML += data + '<br/>';
|
529 |
-
|
530 |
-
},
|
531 |
-
error: function (errorThrown) {
|
532 |
-
console.log(errorThrown);
|
533 |
-
}
|
534 |
-
});
|
535 |
-
}
|
536 |
-
|
537 |
-
// Terminate import process
|
538 |
-
function terminateProcess() {
|
539 |
-
document.getElementById('terminateaction').value = 'terminate';
|
540 |
-
}
|
541 |
-
|
542 |
-
|
543 |
-
// Enable/Disable WP-e-Commerce Custom Fields
|
544 |
-
function enablewpcustomfield(val) {
|
545 |
-
if (val == 'wpcustomfields') {
|
546 |
-
document.getElementById('wpcustomfieldstr').style.display = '';
|
547 |
-
}
|
548 |
-
else {
|
549 |
-
document.getElementById('wpcustomfields').checked = false;
|
550 |
-
document.getElementById('wpcustomfieldstr').style.display = 'none';
|
551 |
-
}
|
552 |
-
}
|
553 |
-
|
554 |
-
function saveSettings() { //alert('dd');
|
555 |
-
//document.getElementById('ShowMsg').style.display = '';
|
556 |
-
jQuery(document).ready(function () {
|
557 |
-
jQuery('#ShowMsg').delay(2000).fadeOut();
|
558 |
-
});
|
559 |
-
}
|
560 |
-
|
561 |
-
function Reload() {
|
562 |
-
window.location.reload();
|
563 |
-
}
|
564 |
-
|
565 |
-
function check_if_avail(val) {
|
566 |
-
var proModule = new Array();
|
567 |
-
proModule[0] = 'categories';
|
568 |
-
proModule[1] = 'customtaxonomy';
|
569 |
-
proModule[2] = 'eshop';
|
570 |
-
proModule[3] = 'wpcommerce';
|
571 |
-
proModule[4] = 'woocommerce';
|
572 |
-
proModule[5] = 'cctm';
|
573 |
-
proModule[6] = 'acf';
|
574 |
-
proModule[7] = 'aioseo';
|
575 |
-
proModule[8] = 'yoastseo';
|
576 |
-
proModule[9] = 'caticonenable';
|
577 |
-
proModule[10] = 'custompostuitype';
|
578 |
-
proModule[11] = 'wpcustomfields';
|
579 |
-
proModule[12] = 'recommerce';
|
580 |
-
proModule[13] = 'automapping';
|
581 |
-
proModule[14] = 'utfsupport';
|
582 |
-
|
583 |
-
var warning_name = new Array();
|
584 |
-
warning_name['categories'] = 'Categories/Tags';
|
585 |
-
warning_name['customtaxonomy'] = 'Custom Taxonomy';
|
586 |
-
warning_name['eshop'] = 'Eshop';
|
587 |
-
warning_name['wpcommerce'] = 'WP e-Commerce';
|
588 |
-
warning_name['woocommerce'] = 'WooCommerce';
|
589 |
-
warning_name['cctm'] = 'CCTM';
|
590 |
-
warning_name['acf'] = 'ACF';
|
591 |
-
warning_name['aioseo'] = 'All-in-SEO';
|
592 |
-
warning_name['yoastseo'] = 'Yoast SEO';
|
593 |
-
warning_name['caticonenable'] = 'Category Icons';
|
594 |
-
warning_name['custompostuitype'] = 'Custom Post Type UI';
|
595 |
-
warning_name['automapping'] = 'Auto Mapping';
|
596 |
-
warning_name['utfsupport'] = 'UTF Support';
|
597 |
-
warning_name['wpcustomfields'] = 'WP e-Commerce Custom Fields';
|
598 |
-
|
599 |
-
var result = inArray(val, proModule);
|
600 |
-
if (result == true) {
|
601 |
-
|
602 |
-
if (val == 'eshop' || val == 'wpcustomfields' || val == 'wpcommerce' || val == 'woocommerce') {
|
603 |
-
if (val == 'wpcommerce' || val == 'wpcustomfields') {
|
604 |
-
document.getElementById('wpcustomfieldstr').style.display = '';
|
605 |
-
} else {
|
606 |
-
document.getElementById('wpcustomfieldstr').style.display = 'none';
|
607 |
-
}
|
608 |
-
// document.getElementById('wpcustomfieldstr').style.display = 'none';
|
609 |
-
document.getElementById('nonerecommerce').checked = true;
|
610 |
-
}
|
611 |
-
if (val == 'cctm' || val == 'acf') {
|
612 |
-
document.getElementById('nonercustompost').checked = true;
|
613 |
-
}
|
614 |
-
if (val == 'aioseo' || val == 'yoastseo') {
|
615 |
-
document.getElementById('nonerseooption').checked = true;
|
616 |
-
}
|
617 |
-
if (val == 'caticonenable') {
|
618 |
-
document.getElementById('caticondisable').checked = true;
|
619 |
-
}
|
620 |
-
document.getElementById(val).checked = false;
|
621 |
-
document.getElementById('ShowMsg').style.display = "";
|
622 |
-
document.getElementById('warning-msg').innerHTML = warning_name[val] + ' feature is available only for PRO!.';
|
623 |
-
$('#ShowMsg').delay(7000).fadeOut();
|
624 |
-
}
|
625 |
-
}
|
626 |
-
|
627 |
-
function inArray(needle, haystack) {
|
628 |
-
var length = haystack.length;
|
629 |
-
for (var i = 0; i < length; i++) {
|
630 |
-
if (typeof haystack[i] == 'object') {
|
631 |
-
if (arrayCompare(haystack[i], needle)) {
|
632 |
-
return true;
|
633 |
-
}
|
634 |
-
} else {
|
635 |
-
if (haystack[i] == needle) {
|
636 |
-
return true;
|
637 |
-
}
|
638 |
-
}
|
639 |
-
}
|
640 |
-
return false;
|
641 |
-
}
|
642 |
-
|
643 |
-
function import_again() {
|
644 |
-
var get_current_url = document.getElementById('current_url').value;
|
645 |
-
window.location.assign(get_current_url);
|
646 |
-
}
|
647 |
-
function sendemail2smackers() {
|
648 |
-
// var useremail = document.getElementById('usermailid').value;
|
649 |
-
var message_content = document.getElementById('message').value;
|
650 |
-
var firstname = document.getElementById('firstname').value;
|
651 |
-
var lastname = document.getElementById('lastname').value;
|
652 |
-
if (message_content != '' && firstname != '' && lastname != '')
|
653 |
-
return true;
|
654 |
-
else
|
655 |
-
document.getElementById('showMsg').style.display = '';
|
656 |
-
document.getElementById('showMsg').innerHTML = '<p id="warning-msg" class="alert alert-warning">Fill all mandatory fields.</p>';
|
657 |
-
jQuery("#showMsg").fadeOut(10000);
|
658 |
-
return false;
|
659 |
-
}
|
660 |
-
|
661 |
-
function check_allnumeric(inputtxt) {
|
662 |
-
var numbers = /^[0-9]+$/;
|
663 |
-
if (inputtxt.match(numbers)) {
|
664 |
-
return true;
|
665 |
-
}
|
666 |
-
else {
|
667 |
-
if (inputtxt == '')
|
668 |
-
alert('Fill all mandatory fields.');
|
669 |
-
else
|
670 |
-
alert('Please enter numeric characters only');
|
671 |
-
return false;
|
672 |
-
}
|
673 |
-
}
|
674 |
-
|
675 |
-
function gotoback() {
|
676 |
-
var currentURL = document.getElementById('current_url').value;
|
677 |
-
var set_assigned_step = currentURL.replace("uploadfile", "mapping_settings");
|
678 |
-
// window.location.assign(set_assigned_step);
|
679 |
-
}
|
680 |
-
function export_module() {
|
681 |
-
var get_selected_module = document.getElementsByName('export');
|
682 |
-
// alert(get_selected_module);
|
683 |
-
for (var i = 0, length = get_selected_module.length; i < length; i++) {
|
684 |
-
if (get_selected_module[i].checked) {
|
685 |
-
// do whatever you want with the checked radio
|
686 |
-
//alert(get_selected_module[i].value);
|
687 |
-
// only one radio can be logically checked, don't check the rest
|
688 |
-
//break;
|
689 |
-
return true;
|
690 |
-
}
|
691 |
-
}
|
692 |
-
showMapMessages('error', 'Please choose one module to export the records!');
|
693 |
-
return false;
|
694 |
-
}
|
695 |
-
function export_check(value) {
|
696 |
-
if (value == 'eshop' || value == 'woocommerce' || value == 'wpcommerce' || value == 'marketpress' || value == 'users' || value == 'category' || value == 'tags' || value == 'customtaxonomy') {
|
697 |
-
document.getElementById(value).checked = false;
|
698 |
-
document.getElementById('ShowMsg').style.display = "";
|
699 |
-
value = value.toUpperCase();
|
700 |
-
document.getElementById('warning-msg').innerHTML = value + ' Feature is available only for PRO!.';
|
701 |
-
$('#ShowMsg').delay(7000).fadeOut();
|
702 |
-
}
|
703 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/skinnymvc/controller/base/SkinnyBaseController.php
CHANGED
@@ -137,11 +137,7 @@ class SkinnyBaseControllerWPCsvFree {
|
|
137 |
$this->require_once_many(WP_CSVIMP_PLUGIN_BASE . "lib/skinnymvc/model/base/*.php");
|
138 |
}
|
139 |
|
140 |
-
|
141 |
-
if (SkinnySettings::$CONFIG['session persistency']) {
|
142 |
-
$this->skinnyUser = SkinnyUser::getUser();
|
143 |
-
}
|
144 |
-
|
145 |
//Get all plugins
|
146 |
$this->require_once_many(WP_CSVIMP_PLUGIN_BASE . "plugins/skinnyPlugin*.php");
|
147 |
|
137 |
$this->require_once_many(WP_CSVIMP_PLUGIN_BASE . "lib/skinnymvc/model/base/*.php");
|
138 |
}
|
139 |
|
140 |
+
|
|
|
|
|
|
|
|
|
141 |
//Get all plugins
|
142 |
$this->require_once_many(WP_CSVIMP_PLUGIN_BASE . "plugins/skinnyPlugin*.php");
|
143 |
|
modules/categories/actions/actions.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
if ( ! defined( 'ABSPATH' ) )
|
38 |
-
exit; // Exit if accessed directly
|
39 |
-
|
40 |
-
class CategoriesActions extends SkinnyActions {
|
41 |
-
|
42 |
-
public function __construct()
|
43 |
-
{
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* The actions index method
|
48 |
-
* @param array $request
|
49 |
-
* @return array
|
50 |
-
*/
|
51 |
-
public function executeIndex($request)
|
52 |
-
{
|
53 |
-
// return an array of name value pairs to send data to the template
|
54 |
-
$data = array();
|
55 |
-
return $data;
|
56 |
-
}
|
57 |
-
|
58 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/categories/templates/index.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
if ( ! defined( 'ABSPATH' ) )
|
38 |
-
exit; // Exit if accessed directly
|
39 |
-
echo "<div align='center' style='width:100%;'> <p class='warnings' style='width:50%;text-align:center;color:red;'>". __('This feature is only available in PRO!.')."</p></div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/comments/actions/actions.php
DELETED
@@ -1,356 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
if ( ! defined( 'ABSPATH' ) )
|
38 |
-
exit; // Exit if accessed directly
|
39 |
-
class CommentsActions extends SkinnyActions
|
40 |
-
{
|
41 |
-
public function __construct()
|
42 |
-
{
|
43 |
-
|
44 |
-
}
|
45 |
-
|
46 |
-
// @var boolean post title check
|
47 |
-
public $titleDupCheck = false;
|
48 |
-
|
49 |
-
// @var boolean content title check
|
50 |
-
public $conDupCheck = false;
|
51 |
-
|
52 |
-
// @var boolean for post flag
|
53 |
-
public $postFlag = true;
|
54 |
-
|
55 |
-
// @var array wp field keys
|
56 |
-
public $keys = array();
|
57 |
-
|
58 |
-
// @var inserted comments count
|
59 |
-
public $insPostCount = 0;
|
60 |
-
|
61 |
-
// @var int updated post count
|
62 |
-
public $updatedPostCount=0;
|
63 |
-
|
64 |
-
// @var skipped comments coun
|
65 |
-
public $dupPostCount = 0;
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Mapping fields
|
69 |
-
*/
|
70 |
-
public $defCols = array( 'comment_post_ID' => null,
|
71 |
-
'comment_author' => null,
|
72 |
-
'comment_author_email' => null,
|
73 |
-
'comment_author_url' => null,
|
74 |
-
'comment_content' => null,
|
75 |
-
'comment_author_IP' => null,
|
76 |
-
'comment_date' =>null,
|
77 |
-
'comment_approved' =>null,
|
78 |
-
);
|
79 |
-
|
80 |
-
|
81 |
-
/**
|
82 |
-
* The actions index method
|
83 |
-
* @param array $request
|
84 |
-
* @return array
|
85 |
-
*/
|
86 |
-
public function executeIndex($request)
|
87 |
-
{
|
88 |
-
// return an array of name value pairs to send data to the template
|
89 |
-
$data = array();
|
90 |
-
return $data;
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Manage duplicates
|
95 |
-
*
|
96 |
-
* @param string type = (title|content), string content
|
97 |
-
* @return boolean
|
98 |
-
*/
|
99 |
-
function duplicateChecks($type = 'title', $text, $gettype)
|
100 |
-
{
|
101 |
-
$gettype = 'post';
|
102 |
-
global $wpdb;
|
103 |
-
$this->dupPostCount = 0;
|
104 |
-
if ($type == 'content') {
|
105 |
-
$htmlDecode = html_entity_decode($text);
|
106 |
-
$strippedText = strip_tags($htmlDecode);
|
107 |
-
$contentLength = strlen($strippedText);
|
108 |
-
$allPosts_count = $wpdb->get_results("SELECT COUNT(ID) as count FROM $wpdb->posts WHERE post_type = \"{$gettype}\" and post_status IN('publish','future','draft','pending','private')");
|
109 |
-
$allPosts_count = $allPosts_count[0]->count;
|
110 |
-
$allPosts = $wpdb->get_results("SELECT ID,post_title,post_date,post_content FROM $wpdb->posts WHERE post_type = \"{$gettype}\" and post_status IN('publish','future','draft','pending','private')");
|
111 |
-
foreach ($allPosts as $allPost) {
|
112 |
-
$htmlDecodePCont = html_entity_decode($allPost->post_content);
|
113 |
-
$strippedTextPCont = strip_tags($htmlDecodePCont);
|
114 |
-
similar_text($strippedTextPCont, $strippedText, $p);
|
115 |
-
if ($p == 100) {
|
116 |
-
$this->dupPostCount++;
|
117 |
-
$this->detailedLog[$currentLimit][] = "Comment - <b>skipped</b>, Comment tile - " .$commentTitle . " Duplicate found";
|
118 |
-
return false;
|
119 |
-
}
|
120 |
-
}
|
121 |
-
return true;
|
122 |
-
} else if ($type == 'title') {
|
123 |
-
$post_exist = $wpdb->get_results("select ID from " . $wpdb->posts . " where post_title = \"{$text}\" and post_type = \"{$gettype}\" and post_status in('publish','future','draft','pending','private')");
|
124 |
-
if (count($post_exist) == 0 && ($text != null || $text != ''))
|
125 |
-
return true;
|
126 |
-
}
|
127 |
-
$this->dupPostCount++;
|
128 |
-
$this->detailedLog[$currentLimit][] = "Comment - <b>skipped</b>, Comment tile - " .$commentTitle . " Duplicate found";
|
129 |
-
return false;
|
130 |
-
}
|
131 |
-
|
132 |
-
|
133 |
-
/**
|
134 |
-
* function to map the csv file and process it
|
135 |
-
*
|
136 |
-
* @return boolean
|
137 |
-
*/
|
138 |
-
function processDataInWP($data_rows,$ret_array,$session_arr)
|
139 |
-
{
|
140 |
-
global $wpdb;
|
141 |
-
$smack_taxo = array();
|
142 |
-
$custom_array = array();
|
143 |
-
$impCE = new WPImporter_includes_helper();
|
144 |
-
$headr_count = $ret_array['h2'];
|
145 |
-
for ($i = 0; $i < count($data_rows); $i++) {
|
146 |
-
if (array_key_exists('mapping' . $i, $ret_array)) {
|
147 |
-
if($ret_array ['mapping' . $i] != '-- Select --'){
|
148 |
-
if ($ret_array ['mapping' . $i] != 'add_custom' . $i) {
|
149 |
-
$strip_CF = strpos($ret_array['mapping' . $i], 'CF: ');
|
150 |
-
if ($strip_CF === 0) {
|
151 |
-
$custom_key = substr($ret_array['mapping' . $i], 4);
|
152 |
-
$custom_array[$custom_key] = $data_rows[$i];
|
153 |
-
} else {
|
154 |
-
$new_post[$ret_array['mapping' . $i]] = $data_rows[$i];
|
155 |
-
}
|
156 |
-
} else {
|
157 |
-
$new_post [$ret_array ['textbox' . $i]] = $data_rows [$i];
|
158 |
-
$custom_array [$ret_array ['textbox' . $i]] = $data_rows [$i];
|
159 |
-
}
|
160 |
-
}
|
161 |
-
}
|
162 |
-
}
|
163 |
-
for ($inc = 0; $inc < count($data_rows); $inc++) {
|
164 |
-
foreach ($this->keys as $k => $v) {
|
165 |
-
if (array_key_exists($v, $new_post)) {
|
166 |
-
$custom_array [$v] = $new_post [$v];
|
167 |
-
}
|
168 |
-
}
|
169 |
-
}
|
170 |
-
foreach ($new_post as $ckey => $cval) {
|
171 |
-
$this->postFlag = true;
|
172 |
-
$taxo = get_taxonomies();
|
173 |
-
foreach ($taxo as $taxokey => $taxovalue) {
|
174 |
-
if ($taxokey != 'category' && $taxokey != 'link_category' && $taxokey != 'post_tag' && $taxokey != 'nav_menu' && $taxokey != 'post_format') {
|
175 |
-
if ($taxokey == $ckey) {
|
176 |
-
$smack_taxo [$ckey] = $new_post [$ckey];
|
177 |
-
}
|
178 |
-
}
|
179 |
-
}
|
180 |
-
|
181 |
-
$taxo_check = 0;
|
182 |
-
if (!isset($smack_taxo[$ckey])) {
|
183 |
-
$smack_taxo [$ckey] = null;
|
184 |
-
$taxo_check = 1;
|
185 |
-
}
|
186 |
-
if ($ckey != 'post_category' && $ckey != 'post_tag' && $ckey != 'featured_image' && $ckey != $smack_taxo [$ckey]) {
|
187 |
-
if ($taxo_check == 1) {
|
188 |
-
unset($smack_taxo[$ckey]);
|
189 |
-
$taxo_check = 0;
|
190 |
-
}
|
191 |
-
if (array_key_exists($ckey, $custom_array)) {
|
192 |
-
$darray [$ckey] = $new_post [$ckey];
|
193 |
-
} else {
|
194 |
-
if (array_key_exists($ckey, $smack_taxo)) {
|
195 |
-
$data_array[$ckey] = null;
|
196 |
-
} else {
|
197 |
-
$data_array[$ckey] = $new_post [$ckey];
|
198 |
-
}
|
199 |
-
}
|
200 |
-
} else {
|
201 |
-
switch ($ckey) {
|
202 |
-
case 'post_tag' :
|
203 |
-
$tags [$ckey] = $new_post [$ckey];
|
204 |
-
break;
|
205 |
-
case 'post_category' :
|
206 |
-
$categories [$ckey] = $new_post [$ckey];
|
207 |
-
break;
|
208 |
-
case 'featured_image' :
|
209 |
-
/*
|
210 |
-
* TODO: Cleanup required
|
211 |
-
*/
|
212 |
-
$split_filename = explode('/', htmlentities($new_post [$ckey]));
|
213 |
-
$arr_filename = count($split_filename);
|
214 |
-
$plain_filename = $split_filename [$arr_filename - 1];
|
215 |
-
$new_post [$ckey] = str_replace(' ', '%20', $new_post [$ckey]);
|
216 |
-
$file_url = $filetype [$ckey] = $new_post [$ckey];
|
217 |
-
$file_type = explode('.', $filetype [$ckey]);
|
218 |
-
$count = count($file_type);
|
219 |
-
$type = $file_type [$count - 1];
|
220 |
-
|
221 |
-
if ($type == 'png') {
|
222 |
-
$file ['post_mime_type'] = 'image/png';
|
223 |
-
} else if ($type == 'jpg' || $type == 'jpeg') {
|
224 |
-
$file ['post_mime_type'] = 'image/jpeg';
|
225 |
-
} else if ($type == 'gif') {
|
226 |
-
$file ['post_mime_type'] = 'image/gif';
|
227 |
-
}
|
228 |
-
$img_name = explode('/', $file_url);
|
229 |
-
$imgurl_split = count($img_name);
|
230 |
-
$img_name = explode('.', $img_name [$imgurl_split - 1]);
|
231 |
-
if (count($img_name) > 2) {
|
232 |
-
for ($r = 0; $r < (count($img_name) - 1); $r++) {
|
233 |
-
if ($r == 0)
|
234 |
-
$img_title = $img_name[$r];
|
235 |
-
else
|
236 |
-
$img_title .= '.' . $img_name[$r];
|
237 |
-
}
|
238 |
-
} else {
|
239 |
-
$img_title = $img_name = $img_name [0];
|
240 |
-
}
|
241 |
-
$attachmentName = urldecode($img_title) . '.' . $type;
|
242 |
-
$dir = wp_upload_dir();
|
243 |
-
$get_media_settings = get_option('uploads_use_yearmonth_folders');
|
244 |
-
if($get_media_settings == 1){
|
245 |
-
$dirname = date('Y') . '/' . date('m');
|
246 |
-
$full_path = $dir ['basedir'] . '/' . $dirname;
|
247 |
-
$baseurl = $dir ['baseurl'] . '/' . $dirname;
|
248 |
-
}else{
|
249 |
-
$full_path = $dir ['basedir'];
|
250 |
-
$baseurl = $dir ['baseurl'];
|
251 |
-
}
|
252 |
-
$filename = explode('/', $file_url);
|
253 |
-
$file_split = count($filename);
|
254 |
-
$filepath = $full_path . '/' . urldecode($plain_filename);
|
255 |
-
$fileurl = $baseurl . '/' . $filename [$file_split - 1];
|
256 |
-
if (is_dir($full_path)) {
|
257 |
-
$smack_fileCopy = @copy($file_url, $filepath);
|
258 |
-
} else {
|
259 |
-
wp_mkdir_p($full_path);
|
260 |
-
$smack_fileCopy = @copy($file_url, $filepath);
|
261 |
-
}
|
262 |
-
$img = wp_get_image_editor($filepath);
|
263 |
-
if (!is_wp_error($img)) {
|
264 |
-
|
265 |
-
$sizes_array = array(
|
266 |
-
// #1 - resizes to 1024x768 pixel, square-cropped image
|
267 |
-
array('width' => 1024, 'height' => 768, 'crop' => true),
|
268 |
-
// #2 - resizes to 100px max width/height, non-cropped image
|
269 |
-
array('width' => 100, 'height' => 100, 'crop' => false),
|
270 |
-
// #3 - resizes to 100 pixel max height, non-cropped image
|
271 |
-
array('width' => 300, 'height' => 100, 'crop' => false),
|
272 |
-
// #3 - resizes to 624x468 pixel max width, non-cropped image
|
273 |
-
array('width' => 624, 'height' => 468, 'crop' => false)
|
274 |
-
);
|
275 |
-
$resize = $img->multi_resize($sizes_array);
|
276 |
-
}
|
277 |
-
if ($smack_fileCopy) {
|
278 |
-
$file ['guid'] = $fileurl;
|
279 |
-
$file ['post_title'] = $img_title;
|
280 |
-
$file ['post_content'] = '';
|
281 |
-
$file ['post_status'] = 'attachment';
|
282 |
-
} else {
|
283 |
-
$file = false;
|
284 |
-
}
|
285 |
-
break;
|
286 |
-
}
|
287 |
-
}
|
288 |
-
}
|
289 |
-
//$data_array['post_type'] = "post";
|
290 |
-
if ($this->titleDupCheck == 'true')
|
291 |
-
{
|
292 |
-
//$this->postFlag = $this->duplicateChecks('title', $data_array ['post_title'], $data_array ['post_type']);
|
293 |
-
}
|
294 |
-
if ($this->conDupCheck == 'true')
|
295 |
-
{
|
296 |
-
//$this->postFlag = $this->duplicateChecks('content', $data_array ['post_content'], $data_array ['post_type']);
|
297 |
-
}
|
298 |
-
if ($this->postFlag) {
|
299 |
-
$uploaded_file_name=$session_arr['uploadedFile'];
|
300 |
-
$real_file_name = $session_arr['uploaded_csv_name'];
|
301 |
-
$action=$session_arr['selectedImporter'];
|
302 |
-
/* $version_arr=array();
|
303 |
-
$version_arr=explode("(",$uploaded_file_name);
|
304 |
-
$version_arr=explode(")",$version_arr[1]);
|
305 |
-
$version=$version_arr[0]; */
|
306 |
-
$imported_as = 'Comments';
|
307 |
-
$keyword = $action;
|
308 |
-
$cmtID=$this->addComment($data_array);
|
309 |
-
}
|
310 |
-
}
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
//add comments
|
315 |
-
public function addComment($dat_array){
|
316 |
-
global $wpdb;
|
317 |
-
$commentid = '';
|
318 |
-
$post_id = $dat_array['comment_post_ID'];
|
319 |
-
$post_exists = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE id = '" . $post_id . "' and post_status in ('publish','draft','future','private','pending')", 'ARRAY_A');
|
320 |
-
if($post_exists)
|
321 |
-
{
|
322 |
-
$commentid=wp_insert_comment($dat_array);
|
323 |
-
if($commentid) {
|
324 |
-
$this->insPostCount+=1;
|
325 |
-
$this->detailedLog[][] = "Comment added to <b>Post_ID</b> - " . $dat_array ['comment_post_ID'] . ", <b>Author</b> - " . $dat_array['comment_author'] . ", <b>Author Email</b> - " . $dat_array['comment_author_email'] . ", <b>Author URL</b> - " . $dat_array['comment_author_url'] . ", <b>Date</b> - " . $dat_array['comment_date'] . ", <b>Verify Here</b> - <a href='" . get_permalink( $post_id ) . "' rel='permalink'>" . __( 'Web View' ) . "</a> | <a href='" . get_edit_post_link( $post_id, true ) . "' title='" . esc_attr( __( 'Edit this item' ) ) . "'>" . __( 'Admin View' ) . "</a>";
|
326 |
-
}
|
327 |
-
else {
|
328 |
-
$this->dupPostCount+=1;
|
329 |
-
$this->detailedLog[][] = "<b>Comment - </b>skipped, <b>Post_ID</b> - " . $dat_array ['comment_post_ID']. " not available";
|
330 |
-
}
|
331 |
-
}
|
332 |
-
else
|
333 |
-
{
|
334 |
-
$this->dupPostCount+=1;
|
335 |
-
$this->detailedLog[][] = "<b>Comment - </b>skipped, <b>Post_ID</b> - " . $dat_array ['comment_post_ID']. " not available";
|
336 |
-
}
|
337 |
-
return $commentid;
|
338 |
-
}//add comments ends
|
339 |
-
|
340 |
-
public function addPieChartEntry($imported_as, $count) {
|
341 |
-
//add total counts
|
342 |
-
global $wpdb;
|
343 |
-
$getTypeID = $wpdb->get_results("select * from smackcsv_pie_log where type = '$imported_as'");
|
344 |
-
if(count($getTypeID) == 0)
|
345 |
-
$wpdb->insert('smackcsv_pie_log',array('type'=>$imported_as,'value'=>$count));
|
346 |
-
else
|
347 |
-
$wpdb->update('smackcsv_pie_log', array('value' =>$getTypeID[0]->value+$count), array('id'=>$getTypeID[0]->id));
|
348 |
-
}
|
349 |
-
function addStatusLog($inserted,$imported_as){
|
350 |
-
global $wpdb;
|
351 |
-
$today = date('Y-m-d h:i:s');
|
352 |
-
$mon = date("M",strtotime($today));
|
353 |
-
$year = date("Y",strtotime($today));
|
354 |
-
$wpdb->insert('smackcsv_line_log', array('month'=>$mon,'year'=>$year,'imported_type'=>$imported_as,'imported_on'=>date('Y-m-d h:i:s'), 'inserted'=>$inserted ));
|
355 |
-
}
|
356 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/comments/templates/index.php
DELETED
@@ -1,510 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
if ( ! defined( 'ABSPATH' ) )
|
38 |
-
exit; // Exit if accessed directly
|
39 |
-
$impCE = new WPImporter_includes_helper();
|
40 |
-
$nonce_Key = $impCE->create_nonce_key();
|
41 |
-
?>
|
42 |
-
<div style="width:100%;">
|
43 |
-
<div id="accordion">
|
44 |
-
<table class="table-importer">
|
45 |
-
<tr>
|
46 |
-
<td>
|
47 |
-
<h3><?php echo __('CSV Import Options','wp-ultimate-csv-importer');?></h3>
|
48 |
-
<div id='sec-one' <?php if($_REQUEST['step']!= 'uploadfile') {?> style='display:none;' <?php } ?>>
|
49 |
-
<?php if(is_dir($impCE->getUploadDirectory('default'))){
|
50 |
-
if (!is_writable($impCE->getUploadDirectory('default'))) {
|
51 |
-
if (!chmod($impCE->getUploadDirectory('default'), 0777)) { ?>
|
52 |
-
<input type='hidden' id='is_uploadfound' name='is_uploadfound' value='notfound' /> <?php
|
53 |
-
}
|
54 |
-
} else { ?>
|
55 |
-
<input type='hidden' id='is_uploadfound' name='is_uploadfound' value='found' />
|
56 |
-
<?php }?>
|
57 |
-
<?php } else { ?>
|
58 |
-
<input type='hidden' id='is_uploadfound' name='is_uploadfound' value='notfound' />
|
59 |
-
<?php } ?>
|
60 |
-
<div class="warning" id="warning" name="warning" style="display:none;margin: 4% 0 4% 22%;"></div>
|
61 |
-
<div class="warning" id="warning" name="warning" style="display:none;margin: 4% 0 4% 22%;"></div>
|
62 |
-
<form action='<?php echo admin_url().'admin.php?page='.WP_CONST_ULTIMATE_CSV_IMP_SLUG.'/index.php&__module=comments&step=mapping_settings'?>' id='browsefile' method='post' name='browsefile'>
|
63 |
-
<div class="importfile" align='center'>
|
64 |
-
<div id='filenamedisplay'>
|
65 |
-
<!--<span class='importer_icon' style="float:left;"><img src = "<?php //echo WP_CONST_ULTIMATE_CSV_IMP_DIR;?>/images/Importicon_24.png"></span><span style="float:left;"><h2>Import CSV File</h2></span>-->
|
66 |
-
</div><form class="add:the-list: validate" style="clear:both;" method="post" enctype="multipart/form-data" onsubmit="return file_exist();">
|
67 |
-
<div class="container">
|
68 |
-
<?php echo $impCE->smack_csv_import_method(); ?>
|
69 |
-
<input type ='hidden' id="pluginurl"value="<?php echo WP_CONTENT_URL;?>">
|
70 |
-
<input type='hidden' id='dirpathval' name='dirpathval' value='<?php echo ABSPATH; ?>' />
|
71 |
-
<?php $uploadDir = wp_upload_dir(); ?>
|
72 |
-
<input type="hidden" id="uploaddir" value="<?php if(isset($uploadDir['basedir'])) { echo $uploadDir['basedir']; } ?>">
|
73 |
-
<input type="hidden" id="uploadFileName" name="uploadfilename" value="">
|
74 |
-
<input type = 'hidden' id = 'uploadedfilename' name = 'uploadedfilename' value = ''>
|
75 |
-
<input type = 'hidden' id = 'upload_csv_realname' name = 'upload_csv_realname' value =''>
|
76 |
-
<input type = 'hidden' id = 'current_file_version' name = 'current_file_version' value = ''>
|
77 |
-
<input type = 'hidden' id = 'current_module' name = 'current_module' value = '<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>' >
|
78 |
-
</span>
|
79 |
-
<!-- The global progress bar -->
|
80 |
-
<div class="form-group" style="padding-bottom:20px;">
|
81 |
-
<table>
|
82 |
-
<tr>
|
83 |
-
<div id='showmappingtemplate' style='float:left;padding-left:10px;'>
|
84 |
-
<select disabled>
|
85 |
-
<option value ='select template' /> <?php echo __('select template','wp-ultimate-csv-importer'); ?> </option>
|
86 |
-
</select>
|
87 |
-
<img src="<?php echo WP_CONTENT_URL; ?>/plugins/<?php echo WP_CONST_ULTIMATE_CSV_IMP_SLUG; ?>/images/pro_icon.gif" title="PRO Feature" />
|
88 |
-
</div>
|
89 |
-
|
90 |
-
</div>
|
91 |
-
<div style="float:right;">
|
92 |
-
<input type='button' name='clearform' id='clearform' value='<?php echo __("Clear",'wp-ultimate-csv-importer'); ?>' onclick="Reload();"
|
93 |
-
class='btn btn-warning' style="margin-right:15px;"/>
|
94 |
-
<input type='submit' name='importfile' id='importfile' title = '<?php echo __("Next",'wp-ultimate-csv-importer'); ?>' value='<?php echo $impCE->reduceStringLength(__("Next",'wp-ultimate-csv-importer'),'Next');echo(" >>");?>' disabled
|
95 |
-
class='btn btn-primary' style="margin-right:15px;"/>
|
96 |
-
</div>
|
97 |
-
</tr>
|
98 |
-
</table>
|
99 |
-
<div class="warning" id="warning" name="warning" style="display:none"></div>
|
100 |
-
<!-- The container for the uploaded files -->
|
101 |
-
<div id="files" class="files"></div>
|
102 |
-
<br>
|
103 |
-
</div>
|
104 |
-
<script>
|
105 |
-
var check_upload_dir = document.getElementById('is_uploadfound').value;
|
106 |
-
if(check_upload_dir == 'notfound'){
|
107 |
-
document.getElementById('browsefile').style.display = 'none';
|
108 |
-
jQuery('#defaultpanel').css('visibility','hidden');
|
109 |
-
jQuery('<p/>').text("").appendTo('#warning');
|
110 |
-
jQuery( "#warning" ).empty();
|
111 |
-
jQuery('#warning').css('display','inline');
|
112 |
-
jQuery('<p/>').text("Warning: Sorry. There is no uploads directory Please create it with write permission.").appendTo('#warning');
|
113 |
-
jQuery('#warning').css('color','red');
|
114 |
-
jQuery('#warning').css('font-weight','bold');
|
115 |
-
jQuery('#progress .progress-bar').css('visibility','hidden');
|
116 |
-
}
|
117 |
-
else{
|
118 |
-
jQuery(function () {
|
119 |
-
'use strict';
|
120 |
-
var url = (document.getElementById('pluginurl').value+'/plugins/<?php echo WP_CONST_ULTIMATE_CSV_IMP_SLUG;?>/modules/default/templates/index.php');
|
121 |
-
var filesdata;
|
122 |
-
var uploadPath = document.getElementById('uploaddir').value;
|
123 |
-
function prepareUpload(event){
|
124 |
-
filesdata = event.target.files;
|
125 |
-
var curraction = '<?php echo $_REQUEST['__module']; ?>';
|
126 |
-
var frmdata = new FormData();
|
127 |
-
var uploadfile_data = jQuery('#fileupload').prop('files')[0];
|
128 |
-
frmdata.append('files', uploadfile_data);
|
129 |
-
frmdata.append('action','uploadfilehandle');
|
130 |
-
frmdata.append('curr_action', curraction);
|
131 |
-
frmdata.append('uploadPath', uploadPath);
|
132 |
-
jQuery.ajax({
|
133 |
-
url : ajaxurl,
|
134 |
-
type : 'post',
|
135 |
-
data : frmdata,
|
136 |
-
cache: false,
|
137 |
-
contentType : false,
|
138 |
-
processData: false,
|
139 |
-
success : function(data) {
|
140 |
-
var fileobj =JSON.parse(data);
|
141 |
-
jQuery.each(fileobj,function(objkey,objval){
|
142 |
-
jQuery.each(objval,function(o_key,file){
|
143 |
-
document.getElementById('uploadFileName').value=file.name;
|
144 |
-
var filewithmodule = file.uploadedname.split(".");
|
145 |
-
var check_file = filewithmodule[filewithmodule.length - 1];
|
146 |
-
if(check_file != "csv" && check_file != "txt") {
|
147 |
-
alert('Un Supported File Format');
|
148 |
-
return false;
|
149 |
-
}
|
150 |
-
if(check_file == "csv"){
|
151 |
-
var filenamecsv = file.uploadedname.split(".csv");
|
152 |
-
file.uploadedname = filenamecsv[0] + "-<?php echo $_REQUEST['__module']; ?>" + ".csv";
|
153 |
-
}
|
154 |
-
if(check_file == "txt"){
|
155 |
-
var filenametxt = file.uploadedname.split(".txt");
|
156 |
-
file.uploadedname = filenametxt[0] + "-<?php echo $_REQUEST['__module']; ?>" + ".txt";
|
157 |
-
}
|
158 |
-
document.getElementById('upload_csv_realname').value = file.uploadedname;
|
159 |
-
var get_version1 = file.name.split("-<?php echo $_REQUEST['__module']; ?>");
|
160 |
-
var get_version2 = get_version1[1].split(".csv");
|
161 |
-
var get_version3 = get_version2[0].split("-");
|
162 |
-
document.getElementById('current_file_version').value = get_version3[1];
|
163 |
-
jQuery('#uploadedfilename').val(file.uploadedname);
|
164 |
-
jQuery( "#filenamedisplay" ).empty();
|
165 |
-
if(file.size>1024 && file.size<(1024*1024))
|
166 |
-
{
|
167 |
-
var fileSize =(file.size/1024).toFixed(2)+' kb';
|
168 |
-
}
|
169 |
-
else if(file.size>(1024*1024))
|
170 |
-
{
|
171 |
-
var fileSize =(file.size/(1024*1024)).toFixed(2)+' mb';
|
172 |
-
}
|
173 |
-
else
|
174 |
-
{
|
175 |
-
var fileSize= (file.size)+' byte';
|
176 |
-
}
|
177 |
-
jQuery('<p/>').text((file.name)+' - '+fileSize).appendTo('#filenamedisplay');
|
178 |
-
jQuery('#importfile').attr('disabled', false);
|
179 |
-
jQuery('#fileupload').prop('disabled', !jQuery.support.fileInput)
|
180 |
-
.parent().addClass(jQuery.support.fileInput ? undefined : 'disabled');
|
181 |
-
});
|
182 |
-
});
|
183 |
-
|
184 |
-
}
|
185 |
-
});
|
186 |
-
}
|
187 |
-
jQuery('#fileupload').on('change', prepareUpload);
|
188 |
-
jQuery('#fileupload').fileupload({
|
189 |
-
url : url,
|
190 |
-
progressall: function (e, data) {
|
191 |
-
var progress = parseInt(data.loaded / data.total * 100, 10);
|
192 |
-
jQuery('#progress .progress-bar').css('width', progress + '%' );
|
193 |
-
}
|
194 |
-
});
|
195 |
-
});
|
196 |
-
}
|
197 |
-
</script>
|
198 |
-
<input type = 'hidden' name = 'importid' id = 'importid' >
|
199 |
-
<!-- <div class='section-one' align='center'>
|
200 |
-
<input type='button' name='clearform' id='clearform' value='Clear' class = 'btn btn-warning' onclick="Reload();"/>
|
201 |
-
<input type='submit' name='importfile' id='importfile' value='Next>>' class = 'btn btn-primary' disabled/>
|
202 |
-
<input type = 'hidden' name = 'importid' id = 'importid' >
|
203 |
-
</div> -->
|
204 |
-
</form>
|
205 |
-
</div>
|
206 |
-
</div>
|
207 |
-
</td>
|
208 |
-
</tr>
|
209 |
-
<tr>
|
210 |
-
<td>
|
211 |
-
<form name='mappingConfig' action="<?php echo admin_url(); ?>admin.php?page=<?php echo WP_CONST_ULTIMATE_CSV_IMP_SLUG;?>/index.php&__module=comments&step=importoptions" method="post" onsubmit="return import_csv();" >
|
212 |
-
<div class='msg' id = 'showMsg' style = 'display:none;'></div>
|
213 |
-
<?php $_SESSION['SMACK_MAPPING_SETTINGS_VALUES'] = $_POST;
|
214 |
-
if(isset($_POST['mydelimeter']))
|
215 |
-
$_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['delim'] = $_POST["mydelimeter"];
|
216 |
-
$wpcsvsettings=array();
|
217 |
-
$custom_key = array();
|
218 |
-
$wpcsvsettings=get_option('wpcsvfreesettings');
|
219 |
-
?>
|
220 |
-
<h3><?php echo __('Map CSV to WP fields/attributes','wp-ultimate-csv-importer'); ?></h3>
|
221 |
-
<?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'mapping_settings') { ?>
|
222 |
-
<div id='sec-two' <?php if($_REQUEST['step']!= 'mapping_settings'){ ?> style='display:none;' <?php } ?> >
|
223 |
-
<div class='mappingsection'>
|
224 |
-
<h2><div class="secondformheader"><?php echo __('Import Data Configuration','wp-ultimate-csv-importer'); ?></div></h2>
|
225 |
-
|
226 |
-
<div id="select_cust_taxonomy" class="select_cust_taxonomy" style="margin-top: 30px;">
|
227 |
-
|
228 |
-
<div id='mappingheader' class='mappingheader' >
|
229 |
-
<?php
|
230 |
-
// $impCE = CallSkinnyObj::getInstance();
|
231 |
-
if(isset($_POST['uploadfilename']) && $_POST['uploadfilename'] != ''){
|
232 |
-
$file_name = $_POST['uploadfilename'];
|
233 |
-
$filename = $impCE->convert_string2hash_key($file_name);
|
234 |
-
}
|
235 |
-
if (isset($_POST['mydelimeter'])) {
|
236 |
-
$delimeter= $_POST['mydelimeter'];
|
237 |
-
}
|
238 |
-
if(isset($_POST['upload_csv_realname']) && $_POST['upload_csv_realname'] != '') {
|
239 |
-
$uploaded_csv_name = $_POST['upload_csv_realname'];
|
240 |
-
}
|
241 |
-
$getrecords = $impCE->csv_file_data($filename);
|
242 |
-
$getcustomposts=get_post_types();
|
243 |
-
$allcustomposts='';
|
244 |
-
$records = '';
|
245 |
-
foreach($getcustomposts as $keys => $value)
|
246 |
-
{
|
247 |
-
if (($value != 'featured_image') && ($value != 'attachment') && ($value != 'wpsc-product') && ($value != 'wpsc-product-file') && ($value != 'revision') && ($value != 'nav_menu_item') && ($value != 'post') && ($value != 'page') && ($value != 'wp-types-group') && ($value != 'wp-types-user-group')) {
|
248 |
-
$allcustomposts.=$value.',';
|
249 |
-
}
|
250 |
-
|
251 |
-
}
|
252 |
-
?>
|
253 |
-
<table style="font-size: 12px;" class = "table table-striped">
|
254 |
-
<tr>
|
255 |
-
<td colspan='4'>
|
256 |
-
<div align='center' style='float:right;'>
|
257 |
-
<?php $cnt = count($impCE->defCols) + 2;
|
258 |
-
$cnt1 = count($impCE->headers);
|
259 |
-
$records = count($getrecords); ?>
|
260 |
-
|
261 |
-
<input type='hidden' id='h1' name='h1' value="<?php if(isset($cnt)) { echo $cnt; } ?>"/>
|
262 |
-
<input type='hidden' id='h2' name='h2' value="<?php if(isset($cnt1)) { echo $cnt1; } ?>"/>
|
263 |
-
<input type='hidden' name='selectedImporter' id='selectedImporter' value="<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>"/>
|
264 |
-
<input type="hidden" id="prevoptionindex" name="prevoptionindex" value=""/>
|
265 |
-
<input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value=""/>
|
266 |
-
<input type='hidden' id='current_record' name='current_record' value='0' />
|
267 |
-
<input type='hidden' id='totRecords' name='totRecords' value='<?php if(isset($records)) { echo $records; } ?>' />
|
268 |
-
<input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
|
269 |
-
<input type='hidden' id='nonceKey' name='wpnonce' value='<?php echo $nonce_Key; ?>' />
|
270 |
-
<input type='hidden' id='uploadedFile' name='uploadedFile' value="<?php if(isset($filename)) { echo $filename; } ?>" />
|
271 |
-
<!-- real uploaded filename -->
|
272 |
-
<input type='hidden' id='uploaded_csv_name' name='uploaded_csv_name' value="<?php if(isset($uploaded_csv_name)) { echo $uploaded_csv_name; } ?>" />
|
273 |
-
<input type='hidden' id='select_delimeter' name='select_delimeter' value="<?php if(isset($delimeter)) { echo $delimeter; } ?>" />
|
274 |
-
<input type='hidden' id='stepstatus' name='stepstatus' value='<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['step']; } ?>' />
|
275 |
-
<input type='hidden' id='mappingArr' name='mappingArr' value='' />
|
276 |
-
<input type='button' id='prev_record' name='prev_record' class="btn btn-primary" value='<<' onclick='gotoelement(this.id);' />
|
277 |
-
<label style="padding-right:10px;" id='preview_of_row'><?php echo __('Showing preview of row # 1','wp-ultimate-csv-importer'); ?> </label>
|
278 |
-
<input type='button' id='next_record' name='next_record' class="btn btn-primary" value='>>' onclick='gotoelement(this.id);' />
|
279 |
-
<label id="importalign" style="margin-right:8px;"><?php echo __('Go To Row #','wp-ultimate-csv-importer'); ?></label><input type='text' id='goto_element' name='goto_element' />
|
280 |
-
<input type='button' id='apply_element' name='apply_element' value='Show' class="btn btn-success" onclick='gotoelement(this.id);' style="margin-right:10px;margin-left:5px"/>
|
281 |
-
</div>
|
282 |
-
</td>
|
283 |
-
</tr>
|
284 |
-
<?php
|
285 |
-
$count = 0;
|
286 |
-
$cmdsObj = new CommentsActions();
|
287 |
-
?>
|
288 |
-
<tr><td class="left_align columnheader"> <b><?php echo __('CSV HEADER','wp-ultimate-csv-importer'); ?></b> </td><td class="columnheader"> <b><?php echo __('WP FIELDS','wp-ultimate-csv-importer'); ?></b> </td><td class="columnheader"> <b><?php echo __('CSV ROW','wp-ultimate-csv-importer'); ?></b> </td><td></td></tr>
|
289 |
-
<?php
|
290 |
-
foreach ($impCE->headers as $key => $value) {
|
291 |
-
?>
|
292 |
-
<tr>
|
293 |
-
<td class="left_align csvheader"><label><?php print($value);?></label></td>
|
294 |
-
<td class="left_align"><select name="mapping<?php print($count); ?>" id="mapping<?php print($count); ?>" class="uiButton" onchange="addcustomfield(this.value,<?php echo $count; ?>);">
|
295 |
-
<option id="select"><?php echo __('-- Select --','wp-ultimate-csv-importer'); ?></option>
|
296 |
-
<?php
|
297 |
-
foreach ($cmdsObj->defCols as $key1 => $value1) {
|
298 |
-
if ($key1 == 'post_name')
|
299 |
-
$key1 = 'post_slug';
|
300 |
-
if ($value == 'post_name')
|
301 |
-
$value = 'post_slug';
|
302 |
-
|
303 |
-
|
304 |
-
?>
|
305 |
-
<option value = "<?php print($key1); ?>"> <?php
|
306 |
-
|
307 |
-
if ($key1 != 'post_name'){
|
308 |
-
print ($key1);
|
309 |
-
$mappingFields_arr[$key1] = $key1;
|
310 |
-
}else{
|
311 |
-
print 'post_slug';
|
312 |
-
$mappingFields_arr['post_slug'] = 'post_slug';
|
313 |
-
}
|
314 |
-
?>
|
315 |
-
</option>
|
316 |
-
<?php
|
317 |
-
}
|
318 |
-
|
319 |
-
?>
|
320 |
-
</select>
|
321 |
-
<script type="text/javascript">
|
322 |
-
jQuery("select#mapping<?php print($count); ?>").find('option').each(function() {
|
323 |
-
if(jQuery(this).val() == "<?php print($value);?>") {
|
324 |
-
jQuery(this).prop('selected', true);
|
325 |
-
}
|
326 |
-
});
|
327 |
-
</script>
|
328 |
-
|
329 |
-
</td>
|
330 |
-
<td class="left_align csvcolumnvalue">
|
331 |
-
<?php
|
332 |
-
if(strlen($getrecords[0][$value])>32) {
|
333 |
-
$getrecords[0][$value] = substr($getrecords[0][$value], 0, 28).'...';
|
334 |
-
} ?>
|
335 |
-
<span id='elementVal_<?php echo $key; ?>' > <?php echo $getrecords[0][$value]; ?> </span>
|
336 |
-
</td>
|
337 |
-
<td width = "180px;">
|
338 |
-
<input class="customfieldtext" type="text" id="textbox<?php print($count); ?>" name="textbox<?php print($count); ?>" TITLE="Replace the default value" style="display: none;" value="<?php echo $value ?>"/>
|
339 |
-
<span style="display: none;" id="customspan<?php echo $count ?>">
|
340 |
-
<a href="#" class="tooltip">
|
341 |
-
<img src="<?php echo WP_PLUGIN_URL . '/' .WP_CONST_ULTIMATE_CSV_IMP_SLUG.'/images/help.png'; ?>" />
|
342 |
-
<span class="tooltipFour">
|
343 |
-
<img class="callout" src="<?php echo WP_PLUGIN_URL . '/'. WP_CONST_ULTIMATE_CSV_IMP_SLUG.'/images/callout.gif'; ?>" />
|
344 |
-
<strong><?php echo __('Give a name for your new custom field','wp-ultimate-csv-importer'); ?></strong>
|
345 |
-
<img src="<?php echo WP_PLUGIN_URL . '/' . WP_CONST_ULTIMATE_CSV_IMP_SLUG.'/images/help.png' ; ?>" style="margin-top: 6px;float:right;" />
|
346 |
-
</span>
|
347 |
-
</a>
|
348 |
-
</span>
|
349 |
-
<span style="display: none; color: red; margin-left: 5px;" id="customspan<?php echo $count ?>"><?php echo __('Replace the custom value','wp-ultimate-csv-importer'); ?></span>
|
350 |
-
</td>
|
351 |
-
</tr>
|
352 |
-
<?php
|
353 |
-
$count++;
|
354 |
-
}
|
355 |
-
$mFieldsArr='';
|
356 |
-
foreach($mappingFields_arr as $mkey => $mval){
|
357 |
-
$mFieldsArr .= $mkey.',';
|
358 |
-
}
|
359 |
-
$mFieldsArr = substr($mFieldsArr, 0, -1);
|
360 |
-
?>
|
361 |
-
</table></div>
|
362 |
-
<input type="hidden" id="mapping_fields_array" name="mapping_fields_array" value="<?php print_r($mFieldsArr); ?>"/>
|
363 |
-
|
364 |
-
<div>
|
365 |
-
<div class="goto_import_options" align=center>
|
366 |
-
<div class="mappingactions" style="margin-top:26px;">
|
367 |
-
<input type='button' id='clear_mapping' title = '<?php echo __("clear Mapping",'wp-ultimate-csv-importer'); ?>' class='clear_mapping btn btn-warning' name='clear_mapping' value='<?php echo __("Clear",'wp-ultimate-csv-importer'); echo ' ';echo $impCE->reduceStringLength(__(" Mapping",'wp-ultimate-csv-importer'),'Mapping'); ?>' onclick='clearMapping();' style = 'float:left'/>
|
368 |
-
<span style = ''>
|
369 |
-
<a href="#" class="tooltip tooltip_smack" style = ''>
|
370 |
-
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png" />
|
371 |
-
<span class="tooltipClearMapping">
|
372 |
-
<img class="callout" src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/callout.gif" />
|
373 |
-
<strong><?php echo __('Refresh to re-map fields','wp-ultimate-csv-importer'); ?></strong>
|
374 |
-
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png" style="margin-top: 6px;float:right;" />
|
375 |
-
</span>
|
376 |
-
</a>
|
377 |
-
</span>
|
378 |
-
</div>
|
379 |
-
<div class="mappingactions" >
|
380 |
-
<input type='submit' id='goto_importer_setting' title = '<?php echo __("Next",'wp-ultimate-csv-importer'); ?>'class='goto_importer_setting btn btn-info' name='goto_importer_setting' value='<?php echo $impCE->reduceStringLength(__('Next','wp-ultimate-csv-importer'),'Next'); ?> >>' />
|
381 |
-
</div>
|
382 |
-
</div>
|
383 |
-
</div>
|
384 |
-
<?php } ?>
|
385 |
-
</div>
|
386 |
-
</form>
|
387 |
-
</td>
|
388 |
-
</tr>
|
389 |
-
<tr>
|
390 |
-
<td>
|
391 |
-
<h3><?php echo __('Settings and Performance','wp-ultimate-csv-importer'); ?></h3>
|
392 |
-
<?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'importoptions') { ?>
|
393 |
-
<div id='sec-three' <?php if($_REQUEST['step']!= 'importoptions'){ ?> style='display:none;' <?php } ?> >
|
394 |
-
<?php if(isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'])) { ?>
|
395 |
-
<input type="hidden" id="prevoptionindex" name="prevoptionindex" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionindex']; ?>"/>
|
396 |
-
<input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionvalue']; ?>"/>
|
397 |
-
<input type='hidden' id='current_record' name='current_record' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['current_record']; ?>' />
|
398 |
-
<input type='hidden' id='tot_records' name='tot_records' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
|
399 |
-
<input type='hidden' id='checktotal' name='checktotal' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
|
400 |
-
<input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
|
401 |
-
<input type='hidden' id='selectedImporter' name='selectedImporter' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
|
402 |
-
<?php } ?>
|
403 |
-
<?php if(isset($_POST)) { ?>
|
404 |
-
<input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
|
405 |
-
<input type='hidden' id='checkfile' name='checkfile' value='<?php echo $_POST['uploadedFile']; ?>' />
|
406 |
-
<input type='hidden' id='select_delim' name='select_delim' value='<?php echo $_POST['select_delimeter']; ?>' />
|
407 |
-
<input type='hidden' id='uploadedFile' name='uploadedFile' value='<?php echo $_POST['uploadedFile']; ?>' />
|
408 |
-
<input type='hidden' id='mappingArr' name='mappingArr' value='' />
|
409 |
-
<?php } ?>
|
410 |
-
<!-- Import settings options -->
|
411 |
-
<div class="postbox" id="options" style=" margin-bottom:0px;">
|
412 |
-
<!-- <h4 class="hndle">Search settings</h4>-->
|
413 |
-
<div class="inside">
|
414 |
-
<label id='importalign'><input type ='radio' id='importNow' name='importMode' value='' onclick='choose_import_mode(this.id);' checked/> <?php echo __("Import right away",'wp-ultimate-csv-importer'); ?> </label>
|
415 |
-
<label id='importalign'><input type ='radio' id='scheduleNow' name='importMode' value='' onclick='choose_import_mode(this.id);' disabled/> <?php echo __("Schedule now",'wp-ultimate-csv-importer'); ?> </label>
|
416 |
-
<div id='schedule' style='display:none'>
|
417 |
-
<input type ='hidden' id='select_templatename' name='#select_templatename' value = '<?php if(isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['templateid'])) { echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['templateid'] ; } ?>'>
|
418 |
-
<?php //echo WPImporter_includes_schedulehelper::generatescheduleHTML(); ?>
|
419 |
-
</div>
|
420 |
-
<div id='importrightaway' style='display:block'>
|
421 |
-
<form method="POST">
|
422 |
-
<ul id="settings">
|
423 |
-
<li>
|
424 |
-
<!--Get all posts with an <strong>content-similarity</strong> of more than: <strong><span id="similarity_amount">80</span>%</strong>
|
425 |
-
<div id="similarity" class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" aria-disabled="false"><a class="ui-slider-handle ui-state-default ui-corner-all" href="#" style="left: 60%;"></a></div>
|
426 |
-
</li>
|
427 |
-
<input type="hidden" value="80" name="similarity">
|
428 |
-
<li id="types"><label for="types">Compare this <strong>type</strong>:</label><br>
|
429 |
-
<input type="radio" value="post" name="types" checked=""> Posts<br> <input type="radio" value="page" name="types"> Pages<br> <input type="radio" value="attachment" name="types"> Media<br> <input type="radio" value="revision" name="types"> Revisions<br> <input type="radio" value="nav_menu_item" name="types"> Navigation Menu Items<br> </li>
|
430 |
-
<li id="statuses">Include these <strong>statuses</strong>: <br>
|
431 |
-
<input name="status[]" type="checkbox" value="draft"> Draft<br><input name="status[]" type="checkbox" value="pending"> Pending Review<br><input name="status[]" type="checkbox" value="private"> Private<br><input name="status[]" type="checkbox" value="publish" checked=""> Published<br> </li>
|
432 |
-
<li id="dates">Limit by <strong>post date</strong>:<br>
|
433 |
-
from <input id="datefrom" name="datefrom" class="datepicker hasDatepicker" type="text" value="" readonly="readonly"><img class="ui-datepicker-trigger" src="images/date-button.gif" alt="..." title="..."> until <input id="dateto" name="dateto" class="datepicker hasDatepicker" type="text" value="" readonly="readonly"><img class="ui-datepicker-trigger" src="images/date-button.gif" alt="..." title="...">
|
434 |
-
</li>
|
435 |
-
<li>
|
436 |
-
Compare <select name="search_field" id="search_field">
|
437 |
-
<option value="0" selected="selected">
|
438 |
-
content (post_content) </option>
|
439 |
-
<option value="1">
|
440 |
-
title (post_title) </option>
|
441 |
-
<option value="2">
|
442 |
-
content and title </option>
|
443 |
-
</select><br>
|
444 |
-
<input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
|
445 |
-
<input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
|
446 |
-
<label id='importalign'><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> <?php echo __('Detect duplicate post content','wp-ultimate-csv-importer'); ?></label> <br>
|
447 |
-
<input type='hidden' name='wpnoncekey' id='wpnoncekey' value='<?php echo $nonce_Key; ?>' />
|
448 |
-
<label id='importalign'><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > <?php echo __('Detect duplicate post title','wp-ultimate-csv-importer'); ?></label> <br>
|
449 |
-
|
450 |
-
<label id='importalign'><?php echo __('No. of posts/rows per server request','wp-ultimate-csv-importer'); ?></label> <span class="mandatory" style="margin-left:-13px;margin-right:10px">*</span> <input name="importlimit" id="importlimit" type="text" value="1" placeholder="10" onblur="check_allnumeric(this.value);"></label> <?php echo $impCE->helpnotes(); ?><br>
|
451 |
-
<span class='msg' id='server_request_warning' style="display:none;color:red;margin-left:-10px;"><?php echo __('You can set upto','wp-ultimate-csv-importer'); ?> <?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?> <?php echo __('per request.','wp-ultimate-csv-importer'); ?></span>
|
452 |
-
<input type="hidden" id="currentlimit" name="currentlimit" value="0"/>
|
453 |
-
<input type="hidden" id="tmpcount" name="tmpcount" value="0" />
|
454 |
-
<input type="hidden" id="terminateaction" name="terminateaction" value="continue" />
|
455 |
-
</li>
|
456 |
-
<!-- <li>
|
457 |
-
Ignore these words while comparing <input name="filterwords" id="filterwords" type="text" value="">
|
458 |
-
</li>-->
|
459 |
-
</ul>
|
460 |
-
<input id="startbutton" class="btn btn-primary" type="button" value="<?php echo __('Import Now','wp-ultimate-csv-importer'); ?>" style="color: #ffffff;background:#2E9AFE;" onclick="importRecordsbySettings();" />
|
461 |
-
<input id="terminatenow" class="btn btn-danger btn-sm" type="button" value="<?php echo __('Terminate Now','wp-ultimate-csv-importer');?>" style="display:none;" onclick="terminateProcess();" />
|
462 |
-
<input class="btn btn-warning" type="button" value="<?php echo __('Reload','wp-ultimate-csv-importer'); ?>" id="importagain" style="display:none" onclick="import_again();" />
|
463 |
-
<input id="continuebutton" class="btn btn-lg btn-success" type="button" value="<?php echo __('Continue','wp-ultimate-csv-importer'); ?>" style="display:none;color: #ffffff;" onclick="continueprocess();">
|
464 |
-
<!-- <input id="continuebutton" class="button" type="button" value="Continue old search" style="color: #ffffff;background:#2E9AFE;">-->
|
465 |
-
<div id="ajaxloader" style="display:none"><img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/ajax-loader.gif"> <?php echo __('Processing...','wp-ultimate-csv-importer');?></div>
|
466 |
-
<div class="clear"></div>
|
467 |
-
</form>
|
468 |
-
</div>
|
469 |
-
<div class="clear"></div>
|
470 |
-
<br>
|
471 |
-
<!-- Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
|
472 |
-
</div>
|
473 |
-
</div>
|
474 |
-
<?php } ?>
|
475 |
-
<!-- Code Ends Here-->
|
476 |
-
</div>
|
477 |
-
</td>
|
478 |
-
</tr>
|
479 |
-
</table>
|
480 |
-
</div>
|
481 |
-
<div style="width:100%;">
|
482 |
-
<div id="accordion">
|
483 |
-
<table class="table-importer">
|
484 |
-
<tr>
|
485 |
-
<td>
|
486 |
-
<h3><?php echo __("Summary",'wp-ultimate-csv-importer'); ?></h3>
|
487 |
-
<div id='reportLog' class='postbox' style='display:none;'>
|
488 |
-
<input type='hidden' name = 'csv_version' id = 'csv_version' value = "<?php if(isset($_POST['uploaded_csv_name'])) { echo $_POST['uploaded_csv_name']; } ?>">
|
489 |
-
<div id="logtabs" class="logcontainer">
|
490 |
-
<div id="log" class='log'>
|
491 |
-
</div>
|
492 |
-
</div>
|
493 |
-
</div>
|
494 |
-
</td>
|
495 |
-
</tr>
|
496 |
-
</table>
|
497 |
-
</div>
|
498 |
-
</div>
|
499 |
-
<!-- Promotion footer for other useful plugins -->
|
500 |
-
<div class= "promobox" id="pluginpromo" style="width:98%;">
|
501 |
-
<div class="accordion-group" >
|
502 |
-
<div class="accordion-body in collapse">
|
503 |
-
<div>
|
504 |
-
<?php // $impCE->common_footer_for_other_plugin_promotions(); ?>
|
505 |
-
<?php $impCE->common_footer(); ?>
|
506 |
-
</div>
|
507 |
-
</div>
|
508 |
-
</div>
|
509 |
-
</div>
|
510 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/custompost/templates/index.php
CHANGED
@@ -216,11 +216,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
216 |
}
|
217 |
</script>
|
218 |
<input type='hidden' name='importid' id='importid'>
|
219 |
-
<!-- <div class='section-one' align='center'>
|
220 |
-
<input type = 'button' name='clearform' id='clearform' value='Clear' onclick="Reload();" class = 'btn btn-warning' />
|
221 |
-
<input type = 'submit' name='importfile' id='importfile' value='Next>>' disabled class = 'btn btn-primary' />
|
222 |
-
<input type = 'hidden' name = 'importid' id = 'importid' >
|
223 |
-
</div> -->
|
224 |
</form>
|
225 |
</div>
|
226 |
</div>
|
@@ -273,7 +268,9 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
273 |
}
|
274 |
}
|
275 |
?>
|
276 |
-
<?php if (isset($_REQUEST['__module']) && $_REQUEST['__module'] == 'custompost') {
|
|
|
|
|
277 |
<div class='importstatus' style='display:true;'>
|
278 |
<input type="hidden" id="customposts" name="customposts" value="">
|
279 |
|
@@ -286,57 +283,8 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
286 |
<?php
|
287 |
$cust_post_list_count = 0;
|
288 |
foreach (get_post_types() as $key => $value) {
|
289 |
-
|
290 |
-
|
291 |
-
if (!empty($cctm_post_type)) {
|
292 |
-
foreach ($cctm_post_type['post_type_defs'] as $cctmptkey => $cctmptval) {
|
293 |
-
if ($cctmptkey == $value) {
|
294 |
-
$value = 'createdByCCTM';
|
295 |
-
}
|
296 |
-
}
|
297 |
-
}
|
298 |
-
$types_post_types = array();
|
299 |
-
$types_post_types = get_option('wpcf-custom-types');
|
300 |
-
if (!empty($types_post_types)) {
|
301 |
-
foreach ($types_post_types as $tptKey => $tptVal) {
|
302 |
-
if ($tptKey == $value) {
|
303 |
-
$value = 'createdByTypes';
|
304 |
-
}
|
305 |
-
}
|
306 |
-
}
|
307 |
-
if ($wpcsvsettings['rcustompost'] == 'custompostuitype') {
|
308 |
-
if (($value != 'featured_image') && ($value != 'attachment') && ($value != 'wpsc-product') && ($value != 'wpsc-product-file') && ($value != 'revision') && ($value != 'nav_menu_item') && ($value != 'post') && ($value != 'page') && ($value != 'wp-types-group') && ($value != 'wp-types-user-group') && ($value != 'product') && ($value != 'product_variation') && ($value != 'shop_order') && ($value != 'shop_coupon') && ($value != 'acf') && ($value != 'createdByCCTM') && ($value != 'createdByTypes')) { ?>
|
309 |
-
<option id="<?php echo($value); ?>"> <?php echo($value); ?> </option>
|
310 |
-
<?php
|
311 |
-
$cust_post_list_count++;
|
312 |
-
}
|
313 |
-
} else {
|
314 |
-
$cust_post_ui = array();
|
315 |
-
$cust_post_ui = get_option('cpt_custom_post_types');
|
316 |
-
$cctm_post_type = array();
|
317 |
-
$cctm_post_type = get_option('cctm_data');
|
318 |
-
if (!empty($cctm_post_type)) {
|
319 |
-
foreach ($cctm_post_type['post_type_defs'] as $cctmptkey => $cctmptval) {
|
320 |
-
if ($cctmptkey == $value) {
|
321 |
-
$value = 'createdByCCTM';
|
322 |
-
}
|
323 |
-
}
|
324 |
-
}
|
325 |
-
foreach ($cust_post_ui as $cust_list) {
|
326 |
-
if ($cust_list['name'] == $value) {
|
327 |
-
$value = 'createdByCustomPostUI';
|
328 |
-
}
|
329 |
-
}
|
330 |
-
$types_post_types = array();
|
331 |
-
$types_post_types = get_option('wpcf-custom-types');
|
332 |
-
if (!empty($types_post_types)) {
|
333 |
-
foreach ($types_post_types as $tptKey => $tptVal) {
|
334 |
-
if ($tptKey == $value) {
|
335 |
-
$value = 'createdByTypes';
|
336 |
-
}
|
337 |
-
}
|
338 |
-
}
|
339 |
-
if (($value != 'featured_image') && ($value != 'attachment') && ($value != 'wpsc-product') && ($value != 'wpsc-product-file') && ($value != 'revision') && ($value != 'nav_menu_item') && ($value != 'post') && ($value != 'page') && ($value != 'wp-types-group') && ($value != 'wp-types-user-group') && ($value != 'product') && ($value != 'product_variation') && ($value != 'shop_order') && ($value != 'shop_coupon') && ($value != 'acf') && ($value != 'createdByCustomPostUI') && ($value != 'createdByCCTM') && ($value != 'createdByTypes')) { ?>
|
340 |
<option id="<?php echo($value); ?>"> <?php echo($value); ?> </option>
|
341 |
<?php
|
342 |
$cust_post_list_count++;
|
@@ -391,7 +339,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
391 |
?>
|
392 |
<table style="font-size: 12px;" class="table table-striped" id='FIELDGRP'>
|
393 |
<tr>
|
394 |
-
<td colspan='4'>
|
395 |
<div align='center' style='float:right;'>
|
396 |
<?php $cnt = count($impCE->defCols) + 2;
|
397 |
$cnt1 = count($impCE->headers);
|
@@ -444,20 +391,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
444 |
value='<?php if (isset($extracted_image_location)) {
|
445 |
echo $extracted_image_location;
|
446 |
} ?>'/>
|
447 |
-
<input type='button' id='prev_record' name='prev_record' class="btn btn-primary"
|
448 |
-
value='<<' onclick='gotoelement(this.id);'/>
|
449 |
-
<label style="padding-right:10px;"
|
450 |
-
id='preview_of_row'><?php echo __('Showing preview of row # 1', 'wp-ultimate-csv-importer'); ?></label>
|
451 |
-
<input type='button' id='next_record' name='next_record' class="btn btn-primary"
|
452 |
-
value='>>' onclick='gotoelement(this.id);'/>
|
453 |
-
<label id="importalign"
|
454 |
-
style="margin-right:8px;"> <?php echo __('Go To Row #', 'wp-ultimate-csv-importer'); ?></label><input
|
455 |
-
type='text' id='goto_element' name='goto_element'/>
|
456 |
-
<input type='button' id='apply_element' name='apply_element' class="btn btn-success"
|
457 |
-
value='<?php echo __("Show", 'wp-ultimate-csv-importer'); ?>'
|
458 |
-
onclick='gotoelement(this.id);' style="margin-right:10px;margin-left:5px"/>
|
459 |
</div>
|
460 |
-
</td>
|
461 |
</tr>
|
462 |
<?php
|
463 |
$count = 0;
|
@@ -474,17 +408,16 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
474 |
<tr>
|
475 |
<td colspan='4' class="left_align columnheader"
|
476 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
477 |
-
<div id='custfield_core'><b
|
478 |
</div>
|
479 |
</td>
|
480 |
</tr>
|
481 |
<tr>
|
482 |
-
<td class="left_align columnheader">
|
483 |
<b><?php echo __('WP FIELDS', 'wp-ultimate-csv-importer'); ?></b></td>
|
484 |
-
<td class="columnheader"><b><?php echo __('CSV HEADER', 'wp-ultimate-csv-importer'); ?></b>
|
485 |
-
</td>
|
486 |
-
<td class="columnheader"><b><?php echo __('CSV ROW', 'wp-ultimate-csv-importer'); ?></b>
|
487 |
</td>
|
|
|
488 |
<td></td>
|
489 |
</tr>
|
490 |
<?php
|
@@ -493,16 +426,21 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
493 |
?>
|
494 |
|
495 |
<tr>
|
496 |
-
<td class="left_align" style='
|
497 |
<input type='hidden' name='fieldname<?php print($count); ?>'
|
498 |
-
id='fieldname<?php print($count); ?>' value= <?php echo $key;
|
499 |
<label
|
500 |
class='wpfields'><?php print('<b>' . $key . '</b></label><br><label class="samptxt" style="padding-left:20px">[Name: ' . $key . ']'); ?></label>
|
501 |
</td>
|
502 |
|
503 |
<td>
|
504 |
-
|
505 |
-
|
|
|
|
|
|
|
|
|
|
|
506 |
<option><?php echo __('-- Select --', WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?></option>
|
507 |
<?php foreach ($impCE->headers as $key1 => $value1) { ?>
|
508 |
|
@@ -531,21 +469,14 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
531 |
<input type='hidden' id='wpfields' name='wpfields' value='<?php echo($count) ?>'/>
|
532 |
</table>
|
533 |
<script>
|
534 |
-
//showcsvrow();
|
535 |
</script>
|
536 |
|
537 |
-
<?php
|
538 |
-
/* foreach($mappingFields_arr as $mkey => $mval){
|
539 |
-
$mFieldsArr .= $mkey.',';
|
540 |
-
}
|
541 |
-
$mFieldsArr = substr($mFieldsArr, 0, -1);*/
|
542 |
-
?>
|
543 |
<table style="font-size: 12px;" class="table table-striped" id='CF_FIELDGRP'>
|
544 |
<tr>
|
545 |
|
546 |
<td colspan=5 class='left_align columnheader'
|
547 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
548 |
-
<div id='custfield_core'><b
|
549 |
</div>
|
550 |
|
551 |
</td>
|
@@ -556,7 +487,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
556 |
?>
|
557 |
|
558 |
<tr>
|
559 |
-
<td class="left_align" style='width:
|
560 |
<input type='hidden' name='corefieldname<?php print($count); ?>'
|
561 |
id='corefieldname<?php print($count); ?>' value='<?php echo $key; ?>'/>
|
562 |
|
@@ -604,8 +535,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
604 |
<?php
|
605 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
606 |
$active_plugins = get_option('active_plugins');
|
607 |
-
if ($wpcsvfreesettings) {
|
608 |
-
if (in_array('aioseo', $wpcsvfreesettings)) {
|
609 |
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)) {
|
610 |
?>
|
611 |
<table style="font-size: 12px;" class="table table-striped" id='SEO_FIELDGRP'>
|
@@ -613,7 +542,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
613 |
|
614 |
<td colspan=5 class='left_align columnheader'
|
615 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
616 |
-
<div id='custfield_core'><b
|
617 |
</div>
|
618 |
|
619 |
</td>
|
@@ -622,11 +551,10 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
622 |
foreach ($impCE->defCols as $key => $value) {
|
623 |
if (strstr($key, 'SEO:')) {
|
624 |
$value = str_replace('SEO:', '', $value)
|
625 |
-
//echo '<pre>';print_r($key);echo '</pre>';
|
626 |
?>
|
627 |
|
628 |
<tr>
|
629 |
-
<td class="left_align" style='width:
|
630 |
<input type='hidden' name='seofieldname<?php print($count); ?>'
|
631 |
id='seofieldname<?php print($count); ?>'
|
632 |
value='<?php echo $key; ?>'/>
|
@@ -664,8 +592,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
664 |
<input type='hidden' id='seofields' name='seofields' value='<?php echo($count) ?>'/>
|
665 |
</table>
|
666 |
<?php }
|
667 |
-
|
668 |
-
} ?>
|
669 |
|
670 |
<?php $basic_count = $count - 1; ?>
|
671 |
<input type="hidden" id="basic_count" name="basic_count" value="<?php echo $basic_count; ?>"/>
|
216 |
}
|
217 |
</script>
|
218 |
<input type='hidden' name='importid' id='importid'>
|
|
|
|
|
|
|
|
|
|
|
219 |
</form>
|
220 |
</div>
|
221 |
</div>
|
268 |
}
|
269 |
}
|
270 |
?>
|
271 |
+
<?php if (isset($_REQUEST['__module']) && $_REQUEST['__module'] == 'custompost') {
|
272 |
+
$activeplugins = get_option('active_plugins');
|
273 |
+
?>
|
274 |
<div class='importstatus' style='display:true;'>
|
275 |
<input type="hidden" id="customposts" name="customposts" value="">
|
276 |
|
283 |
<?php
|
284 |
$cust_post_list_count = 0;
|
285 |
foreach (get_post_types() as $key => $value) {
|
286 |
+
if(in_array('custom-post-type-ui/custom-post-type-ui.php',$activeplugins)){
|
287 |
+
if (($value != 'featured_image') && ($value != 'attachment') && ($value != 'wpsc-product') && ($value != 'wpsc-product-file') && ($value != 'revision') && ($value != 'nav_menu_item') && ($value != 'post') && ($value != 'page') && ($value != 'wp-types-group') && ($value != 'wp-types-user-group') && ($value != 'product') && ($value != 'product_variation') && ($value != 'shop_order') && ($value != 'shop_coupon') && ($value != 'acf') && ($value != 'createdByCCTM') && ($value != 'createdByTypes') && ($value != 'shop_order_refund') && ($value != 'shop_webhook')) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
<option id="<?php echo($value); ?>"> <?php echo($value); ?> </option>
|
289 |
<?php
|
290 |
$cust_post_list_count++;
|
339 |
?>
|
340 |
<table style="font-size: 12px;" class="table table-striped" id='FIELDGRP'>
|
341 |
<tr>
|
|
|
342 |
<div align='center' style='float:right;'>
|
343 |
<?php $cnt = count($impCE->defCols) + 2;
|
344 |
$cnt1 = count($impCE->headers);
|
391 |
value='<?php if (isset($extracted_image_location)) {
|
392 |
echo $extracted_image_location;
|
393 |
} ?>'/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
</div>
|
|
|
395 |
</tr>
|
396 |
<?php
|
397 |
$count = 0;
|
408 |
<tr>
|
409 |
<td colspan='4' class="left_align columnheader"
|
410 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
411 |
+
<div id='custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('WordPress Fields:','wp-ultimate-importer'); ?></b>
|
412 |
</div>
|
413 |
</td>
|
414 |
</tr>
|
415 |
<tr>
|
416 |
+
<td class="left_align columnheader" style = 'padding-left:170px;'>
|
417 |
<b><?php echo __('WP FIELDS', 'wp-ultimate-csv-importer'); ?></b></td>
|
418 |
+
<td class="columnheader" style = 'padding-left:55px;'><b><?php echo __('CSV HEADER', 'wp-ultimate-csv-importer'); ?></b>
|
|
|
|
|
419 |
</td>
|
420 |
+
<td> </td>
|
421 |
<td></td>
|
422 |
</tr>
|
423 |
<?php
|
426 |
?>
|
427 |
|
428 |
<tr>
|
429 |
+
<td class="left_align" style='padding-left:150px;'>
|
430 |
<input type='hidden' name='fieldname<?php print($count); ?>'
|
431 |
+
id='fieldname<?php print($count); ?>' value= '<?php echo $key; ?>' />
|
432 |
<label
|
433 |
class='wpfields'><?php print('<b>' . $key . '</b></label><br><label class="samptxt" style="padding-left:20px">[Name: ' . $key . ']'); ?></label>
|
434 |
</td>
|
435 |
|
436 |
<td>
|
437 |
+
|
438 |
+
<?php if($key == 'post_status'){ ?>
|
439 |
+
<select name="mapping<?php print($count); ?>" id="mapping<?php print($count); ?>" onChange=changefield();>
|
440 |
+
<?php }else{ ?>
|
441 |
+
<select name="mapping<?php print($count); ?>"
|
442 |
+
id="mapping<?php print($count); ?>">
|
443 |
+
<?php } ?>
|
444 |
<option><?php echo __('-- Select --', WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?></option>
|
445 |
<?php foreach ($impCE->headers as $key1 => $value1) { ?>
|
446 |
|
469 |
<input type='hidden' id='wpfields' name='wpfields' value='<?php echo($count) ?>'/>
|
470 |
</table>
|
471 |
<script>
|
|
|
472 |
</script>
|
473 |
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
<table style="font-size: 12px;" class="table table-striped" id='CF_FIELDGRP'>
|
475 |
<tr>
|
476 |
|
477 |
<td colspan=5 class='left_align columnheader'
|
478 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
479 |
+
<div id='custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('Custom Fields:','wp-ultimate-csv-importer'); ?></b>
|
480 |
</div>
|
481 |
|
482 |
</td>
|
487 |
?>
|
488 |
|
489 |
<tr>
|
490 |
+
<td class="left_align" style='width:53%; padding-left:150px;'>
|
491 |
<input type='hidden' name='corefieldname<?php print($count); ?>'
|
492 |
id='corefieldname<?php print($count); ?>' value='<?php echo $key; ?>'/>
|
493 |
|
535 |
<?php
|
536 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
537 |
$active_plugins = get_option('active_plugins');
|
|
|
|
|
538 |
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)) {
|
539 |
?>
|
540 |
<table style="font-size: 12px;" class="table table-striped" id='SEO_FIELDGRP'>
|
542 |
|
543 |
<td colspan=5 class='left_align columnheader'
|
544 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
545 |
+
<div id='custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('SEO Fields:','wp-ultimate-csv-importer'); ?></b>
|
546 |
</div>
|
547 |
|
548 |
</td>
|
551 |
foreach ($impCE->defCols as $key => $value) {
|
552 |
if (strstr($key, 'SEO:')) {
|
553 |
$value = str_replace('SEO:', '', $value)
|
|
|
554 |
?>
|
555 |
|
556 |
<tr>
|
557 |
+
<td class="left_align" style='width:53%; padding-left:150px;'>
|
558 |
<input type='hidden' name='seofieldname<?php print($count); ?>'
|
559 |
id='seofieldname<?php print($count); ?>'
|
560 |
value='<?php echo $key; ?>'/>
|
592 |
<input type='hidden' id='seofields' name='seofields' value='<?php echo($count) ?>'/>
|
593 |
</table>
|
594 |
<?php }
|
595 |
+
?>
|
|
|
596 |
|
597 |
<?php $basic_count = $count - 1; ?>
|
598 |
<input type="hidden" id="basic_count" name="basic_count" value="<?php echo $basic_count; ?>"/>
|
modules/customtaxonomy/actions/actions.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
if ( ! defined( 'ABSPATH' ) )
|
38 |
-
exit; // Exit if accessed directly
|
39 |
-
|
40 |
-
class CustomtaxonomyActions extends SkinnyActions {
|
41 |
-
|
42 |
-
public function __construct()
|
43 |
-
{
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* The actions index method
|
48 |
-
* @param array $request
|
49 |
-
* @return array
|
50 |
-
*/
|
51 |
-
public function executeIndex($request)
|
52 |
-
{
|
53 |
-
// return an array of name value pairs to send data to the template
|
54 |
-
$data = array();
|
55 |
-
return $data;
|
56 |
-
}
|
57 |
-
|
58 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/customtaxonomy/templates/index.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
if ( ! defined( 'ABSPATH' ) )
|
38 |
-
exit; // Exit if accessed directly
|
39 |
-
|
40 |
-
echo "<div align='center' style='width:100%;'> <p class='warnings' style='width:50%;text-align:center;color:red;'>". __('This feature is only available in PRO!.','wp-ultimate-csv-importer')."</p></div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/dashboard/actions/actions.php
CHANGED
@@ -37,200 +37,27 @@
|
|
37 |
if ( ! defined( 'ABSPATH' ) )
|
38 |
exit; // Exit if accessed directly
|
39 |
|
40 |
-
class DashboardActions extends SkinnyActions {
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
/**
|
47 |
-
* The actions index method
|
48 |
-
* @param array $request
|
49 |
-
* @return array
|
50 |
-
*/
|
51 |
-
public function executeIndex($request)
|
52 |
-
{
|
53 |
-
// return an array of name value pairs to send data to the template
|
54 |
-
$data = array();
|
55 |
-
return $data;
|
56 |
-
}
|
57 |
-
|
58 |
-
public function ts2short ($ts)
|
59 |
-
{
|
60 |
-
return date("j M Y", $ts);
|
61 |
-
}
|
62 |
-
|
63 |
-
public function getStatsWithDate_old(){
|
64 |
-
ob_clean();
|
65 |
-
global $wpdb;
|
66 |
-
$blog_id = 1;
|
67 |
-
$returnArray = array();
|
68 |
-
$random = array();
|
69 |
-
$chart = array();
|
70 |
-
$get_imptype = array();
|
71 |
-
// $i = 0;
|
72 |
-
$today = date("Y-m-d H:i:s");
|
73 |
-
for ($i = 0; $i <= 11; $i++) {
|
74 |
-
$mons[]= date("M", strtotime( $today." -$i months"));
|
75 |
-
|
76 |
-
}
|
77 |
-
|
78 |
-
$m2 = '';
|
79 |
-
foreach($mons as $ran_month)
|
80 |
-
{
|
81 |
-
$m2[] = $ran_month ;
|
82 |
-
}
|
83 |
-
|
84 |
-
$j=0;
|
85 |
-
$get_imptype = array('Post','Page','Comments','Custom Post','Users','Eshop');
|
86 |
-
foreach($get_imptype as $imp_type)
|
87 |
-
{
|
88 |
-
$lid = $wpdb->get_results("select inserted from smackcsv_line_log where imported_type = '{$imp_type}' and imported_on >= DATE_SUB(NOW(),INTERVAL 1 YEAR)");
|
89 |
-
foreach($lid as $ll) {
|
90 |
-
$change = $ll->inserted;
|
91 |
-
$today = date("Y-m-d H:i:s");
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
$years[]= date("Y", strtotime( $today." -$i months"));
|
105 |
-
}
|
106 |
-
$mon = '';
|
107 |
-
foreach($years as $yy)
|
108 |
-
{
|
109 |
-
$y1[] = $yy ;
|
110 |
-
}
|
111 |
-
$random['y'] =$y1;
|
112 |
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
foreach($tot as $tt) { $total .= (int)$tt ->ins.","; } $chart1 .= $total ;
|
117 |
-
|
118 |
-
$tot1 = $wpdb->get_results("select sum(inserted) as ins from smackcsv_line_log where month ='{$random['m'][1]}' and imported_type = '{$imp_type}' and year = {$random['y'][1]}");
|
119 |
-
foreach($tot1 as $tt1) { $total1 .= (int)$tt1 ->ins.","; } $chart1 .= $total1 ;
|
120 |
-
|
121 |
-
$tot2 = $wpdb->get_results("select sum(inserted) as ins from smackcsv_line_log where month ='{$random['m'][2]}' and imported_type = '{$imp_type}' and year = {$random['y'][2]} ");
|
122 |
-
foreach($tot2 as $tt2) { $total2 .= (int)$tt2->ins.","; } $chart1 .= $total2 ;
|
123 |
-
|
124 |
-
$tot3 = $wpdb->get_results("select sum(inserted) as ins from smackcsv_line_log where month ='{$random['m'][3]}' and imported_type = '{$imp_type}' and year = {$random['y'][3]}");
|
125 |
-
foreach($tot3 as $tt3) { $total3 .= (int)$tt3 ->ins.","; } $chart1 .= $total3 ;
|
126 |
-
|
127 |
-
$tot4 = $wpdb->get_results("select sum(inserted) as ins from smackcsv_line_log where month ='{$random['m'][4]}' and imported_type = '{$imp_type}' and year = {$random['y'][4]} ");
|
128 |
-
foreach($tot4 as $tt4) { $total4 .= (int)$tt4 ->ins.","; } $chart1 .= $total4 ;
|
129 |
-
|
130 |
-
$tot5 = $wpdb->get_results("select sum(inserted) as ins from smackcsv_line_log where month ='{$random['m'][5]}' and imported_type = '{$imp_type}' and year = {$random['y'][5]}");
|
131 |
-
foreach($tot5 as $tt5) { $total5 .= (int)$tt5 ->ins.","; } $chart1 .= $total5 ;
|
132 |
-
|
133 |
-
$tot6 = $wpdb->get_results("select sum(inserted) as ins from smackcsv_line_log where month ='{$random['m'][6]}' and imported_type = '{$imp_type}' and year = {$random['y'][6]} ");
|
134 |
-
foreach($tot6 as $tt6) { $total6 .= (int)$tt6 ->ins.","; } $chart1 .= $total6 ;
|
135 |
-
|
136 |
-
$tot7 = $wpdb->get_results("select sum(inserted) as ins from smackcsv_line_log where month ='{$random['m'][7]}' and imported_type = '{$imp_type}' and year = {$random['y'][7]} ");
|
137 |
-
foreach($tot7 as $tt7) { $total7 .= (int)$tt7 ->ins.","; } $chart1 .= $total7 ;
|
138 |
-
|
139 |
-
$tot8 = $wpdb->get_results("select sum(inserted) as ins from smackcsv_line_log where month ='{$random['m'][8]}' and imported_type = '{$imp_type}' and year = {$random['y'][8]}");
|
140 |
-
foreach($tot8 as $tt8) { $total8 .= (int)$tt8 ->ins.","; } $chart1 .= $total8 ;
|
141 |
-
|
142 |
-
$tot9 = $wpdb->get_results("select sum(inserted) as ins from smackcsv_line_log where month ='{$random['m'][9]}' and imported_type = '{$imp_type}' and year = {$random['y'][9]} ");
|
143 |
-
foreach($tot9 as $tt9) { $total9 .= (int)$tt9 ->ins.","; } $chart1 .= $total9 ;
|
144 |
-
|
145 |
-
$tot10 = $wpdb->get_results("select sum(inserted) as ins from smackcsv_line_log where month ='{$random['m'][10]}' and imported_type = '{$imp_type}' and year = {$random['y'][10]} ");
|
146 |
-
foreach($tot10 as $tt10) { $total10 .= (int)$tt10 ->ins.","; } $chart1 .= $total10 ;
|
147 |
-
|
148 |
-
$tot11 = $wpdb->get_results("select sum(inserted) as ins from smackcsv_line_log where month ='{$random['m'][11]}' and imported_type = '{$imp_type}' and year ={$random['y'][11]} ");
|
149 |
-
foreach($tot11 as $tt11) { $total11 .= (int)$tt11 ->ins; } $chart1 .= $total11 ;
|
150 |
-
$chart[] = $chart1;
|
151 |
-
$returnArray['cat'] = $m2;
|
152 |
-
$returnArray[$j]['name'] = $imp_type;
|
153 |
-
$last_year = array_map('intval', explode(',', $chart1));
|
154 |
-
$returnArray[$j]['data'] = $last_year;
|
155 |
-
$j++;
|
156 |
-
}
|
157 |
-
|
158 |
-
|
159 |
-
return json_encode($returnArray);
|
160 |
}
|
161 |
-
public function getStatsWithDate() {
|
162 |
-
global $wpdb;
|
163 |
-
$returnArray = array();
|
164 |
-
$plot =array();
|
165 |
-
$get_imptype = array('Post','Page','Comments','Custom Post','Users','Eshop');
|
166 |
-
$mon_year = array(11 => 'Nov',10 =>'Oct',9 =>'Sep',8 =>'Aug',7 => 'Jul', 6 => 'Jun', 5 => 'May' ,4 => 'Apr', 3 => 'Mar', 2 => 'Feb', 1 => 'Jan',12 => 'Dec');
|
167 |
-
$today = date("Y-m-d H:i:s");
|
168 |
-
for($i = 0; $i <= 11; $i++) {
|
169 |
-
$month[] = date("M", strtotime( $today." -$i months"));
|
170 |
-
$year[] = date("Y", strtotime( $today." -$i months"));
|
171 |
-
}
|
172 |
-
foreach($month as $mkey) {
|
173 |
-
foreach($year as $ykey) {
|
174 |
-
$mon_num = array_search($mkey,$mon_year);
|
175 |
-
$j = 0;
|
176 |
-
$plot = $wpdb->get_results("select inserted,imported_type from smackcsv_line_log where imported_type in ('Post','Page','Comments','Custom Post','Users','Eshop') and month = '{$mkey}' and year = '{$ykey}'");
|
177 |
-
foreach($plot as $pkey) {
|
178 |
-
$postCount = $pageCount = $customCount = $userCount = $shopCount = 0;
|
179 |
-
switch ($pkey->imported_type) {
|
180 |
-
case 'Post':
|
181 |
-
$postCount += $pkey->inserted;
|
182 |
-
break;
|
183 |
-
case 'Page':
|
184 |
-
$pageCount += $pkey->inserted;
|
185 |
-
break;
|
186 |
-
case 'Custom Post':
|
187 |
-
$customCount += $pkey->inserted;
|
188 |
-
break;
|
189 |
-
case 'Users':
|
190 |
-
$userCount += $pkey->inserted;
|
191 |
-
break;
|
192 |
-
case 'Eshop':
|
193 |
-
$shopCount += $pkey->inserted;
|
194 |
-
break;
|
195 |
-
default:
|
196 |
-
break;
|
197 |
-
}
|
198 |
-
$returnArray[$j] = array('year' => ''.$ykey.'-'.$mon_num.'','post' => (int)$postCount,'page' => (int)$pageCount,'custompost' => (int)$customCount, 'users' => (int)$userCount, 'eshop' => (int)$shopCount);
|
199 |
-
$j++;
|
200 |
-
}
|
201 |
-
}
|
202 |
-
}
|
203 |
-
if(empty($returnArray)){
|
204 |
-
$returnArray[$j] = array('year' => ''.$ykey.'-'.$mon_num.'','post' => 0,'page' => 0,'custompost' => 0, 'users' => 0, 'eshop' => 0);
|
205 |
|
206 |
-
|
207 |
-
return json_encode($returnArray);
|
208 |
-
}
|
209 |
-
public function piechart()
|
210 |
-
{
|
211 |
-
ob_clean();
|
212 |
-
global $wpdb;
|
213 |
-
$blog_id = 1;
|
214 |
-
$returnArray = array();
|
215 |
-
$imptype = array('Post','Page','Comments','Custom Post','Users','Eshop');
|
216 |
-
$i = 0;
|
217 |
-
foreach($imptype as $imp) {
|
218 |
-
$OverviewDetails = $wpdb->get_results("select * from smackcsv_pie_log where type = '{$imp}' and value != 0");
|
219 |
-
foreach($OverviewDetails as $overview){
|
220 |
-
//$returnArray[$i][0] = $overview->type;
|
221 |
-
//$returnArray[$i][1] = (int)$overview->value;
|
222 |
-
$returnArray[$i] = array(
|
223 |
-
'label' => ''.$overview->type.'',
|
224 |
-
'value' => ''.(int)$overview->value.'',
|
225 |
-
|
226 |
-
);
|
227 |
-
$i++;
|
228 |
-
}
|
229 |
-
|
230 |
-
}
|
231 |
-
if(empty($returnArray ) ){
|
232 |
-
$returnArray['label'] = 'No Imports Yet' ;
|
233 |
-
}
|
234 |
-
return json_encode($returnArray);
|
235 |
-
}
|
236 |
-
}
|
37 |
if ( ! defined( 'ABSPATH' ) )
|
38 |
exit; // Exit if accessed directly
|
39 |
|
40 |
+
class DashboardActions extends SkinnyActions {
|
41 |
|
42 |
+
public function __construct()
|
43 |
+
{
|
44 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
+
/**
|
47 |
+
* The actions index method
|
48 |
+
* @param array $request
|
49 |
+
* @return array
|
50 |
+
*/
|
51 |
+
public function executeIndex($request)
|
52 |
+
{
|
53 |
+
// return an array of name value pairs to send data to the template
|
54 |
+
$data = array();
|
55 |
+
return $data;
|
56 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
+
public function ts2short ($ts)
|
59 |
+
{
|
60 |
+
return date("j M Y", $ts);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/dashboard/actions/chartone.php
CHANGED
@@ -43,13 +43,13 @@ if ($_REQUEST['postdata'] == 'firstchartdata') {
|
|
43 |
require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/base/SkinnyBaseActions.php');
|
44 |
require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/SkinnyActions.php');
|
45 |
require_once('actions.php');
|
46 |
-
$dashObj = new
|
47 |
echo(json_encode($dashObj->piechart()));
|
48 |
} elseif ($_REQUEST['postdata'] == 'secondchartdata') {
|
49 |
require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/base/SkinnyBaseActions.php');
|
50 |
require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/SkinnyActions.php');
|
51 |
require_once('actions.php');
|
52 |
-
$dashObj = new
|
53 |
echo json_encode($dashObj->getStatsWithDate());
|
54 |
}
|
55 |
|
43 |
require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/base/SkinnyBaseActions.php');
|
44 |
require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/SkinnyActions.php');
|
45 |
require_once('actions.php');
|
46 |
+
$dashObj = new WPImporter_includes_helper();
|
47 |
echo(json_encode($dashObj->piechart()));
|
48 |
} elseif ($_REQUEST['postdata'] == 'secondchartdata') {
|
49 |
require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/base/SkinnyBaseActions.php');
|
50 |
require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/SkinnyActions.php');
|
51 |
require_once('actions.php');
|
52 |
+
$dashObj = new WPImporter_includes_helper();
|
53 |
echo json_encode($dashObj->getStatsWithDate());
|
54 |
}
|
55 |
|
modules/eshop/actions/actions.php
CHANGED
@@ -167,16 +167,12 @@ class EshopActions extends SkinnyActions {
|
|
167 |
$this->defCols ["CF: " . $val] = $val;
|
168 |
}
|
169 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
170 |
-
if ($wpcsvfreesettings) {
|
171 |
-
if (in_array('aioseo', $wpcsvfreesettings)) {
|
172 |
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)) {
|
173 |
$seo_custoFields = array('SEO: keywords', 'SEO: description', 'SEO: title', 'SEO: noindex', 'SEO: nofollow', 'SEO: titleatr', 'SEO: menulabel', 'SEO: disable', 'SEO: disable_analytics', 'SEO: noodp', 'SEO: noydir');
|
174 |
foreach ($seo_custoFields as $val) {
|
175 |
$this->defCols[$val] = $val;
|
176 |
}
|
177 |
}
|
178 |
-
}
|
179 |
-
}
|
180 |
}
|
181 |
|
182 |
/**
|
@@ -558,10 +554,13 @@ class EshopActions extends SkinnyActions {
|
|
558 |
$poststatus = substr($poststatus_pwd, 1);
|
559 |
$stripPSL = substr($poststatus, -1);
|
560 |
if ($stripPSL == '}') {
|
561 |
-
$postpwd = substr($poststatus,
|
562 |
$data_array['post_status'] = 'publish';
|
563 |
$data_array ['post_password'] = $postpwd;
|
|
|
564 |
$this->detailedLog[$currentLimit]['poststatus'] = "<b>" . __('Status', 'wp-ultimate-csv-importer') . " - </b>" . __('protected with password', 'wp-ultimate-csv-importer');
|
|
|
|
|
565 |
} else {
|
566 |
$data_array['post_status'] = 'publish';
|
567 |
$this->detailedLog[$currentLimit]['poststatus'] = "<b>" . __('Status', 'wp-ultimate-csv-importer') . " - </b>" . __('publish', 'wp-ultimate-csv-importer');
|
@@ -634,7 +633,7 @@ class EshopActions extends SkinnyActions {
|
|
634 |
|
635 |
//add global password
|
636 |
if ($data_array) {
|
637 |
-
if ($ret_array['importallwithps'] ==
|
638 |
$data_array['post_password'] = $ret_array['globalpassword_txt'];
|
639 |
$this->detailedLog[$currentLimit]['poststatus'] = "<b>Status - </b>protected with password " . $ret_array['globalpassword_txt'];
|
640 |
}
|
@@ -772,8 +771,8 @@ class EshopActions extends SkinnyActions {
|
|
772 |
* Feature added by Fredrick on version3.5.4
|
773 |
*/
|
774 |
function importSEOfields($array, $postId) {
|
775 |
-
$seo_opt = get_option('
|
776 |
-
if (in_array('
|
777 |
if (isset($array['keywords'])) {
|
778 |
$custom_array['_aioseop_keywords'] = $array['keywords'];
|
779 |
}
|
167 |
$this->defCols ["CF: " . $val] = $val;
|
168 |
}
|
169 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
|
|
|
|
170 |
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)) {
|
171 |
$seo_custoFields = array('SEO: keywords', 'SEO: description', 'SEO: title', 'SEO: noindex', 'SEO: nofollow', 'SEO: titleatr', 'SEO: menulabel', 'SEO: disable', 'SEO: disable_analytics', 'SEO: noodp', 'SEO: noydir');
|
172 |
foreach ($seo_custoFields as $val) {
|
173 |
$this->defCols[$val] = $val;
|
174 |
}
|
175 |
}
|
|
|
|
|
176 |
}
|
177 |
|
178 |
/**
|
554 |
$poststatus = substr($poststatus_pwd, 1);
|
555 |
$stripPSL = substr($poststatus, -1);
|
556 |
if ($stripPSL == '}') {
|
557 |
+
$postpwd = substr($poststatus, 0, -1);
|
558 |
$data_array['post_status'] = 'publish';
|
559 |
$data_array ['post_password'] = $postpwd;
|
560 |
+
if (strlen($postpwd) !=0)
|
561 |
$this->detailedLog[$currentLimit]['poststatus'] = "<b>" . __('Status', 'wp-ultimate-csv-importer') . " - </b>" . __('protected with password', 'wp-ultimate-csv-importer');
|
562 |
+
else
|
563 |
+
$this->detailedLog[$currentLimit]['poststatus'] = "<b>". __('Status','csv-import')." - </b>".__('publish','csv-import');
|
564 |
} else {
|
565 |
$data_array['post_status'] = 'publish';
|
566 |
$this->detailedLog[$currentLimit]['poststatus'] = "<b>" . __('Status', 'wp-ultimate-csv-importer') . " - </b>" . __('publish', 'wp-ultimate-csv-importer');
|
633 |
|
634 |
//add global password
|
635 |
if ($data_array) {
|
636 |
+
if ($ret_array['importallwithps'] == 6) {
|
637 |
$data_array['post_password'] = $ret_array['globalpassword_txt'];
|
638 |
$this->detailedLog[$currentLimit]['poststatus'] = "<b>Status - </b>protected with password " . $ret_array['globalpassword_txt'];
|
639 |
}
|
771 |
* Feature added by Fredrick on version3.5.4
|
772 |
*/
|
773 |
function importSEOfields($array, $postId) {
|
774 |
+
$seo_opt = get_option('active_plugins');
|
775 |
+
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $seo_opt)) {
|
776 |
if (isset($array['keywords'])) {
|
777 |
$custom_array['_aioseop_keywords'] = $array['keywords'];
|
778 |
}
|
modules/eshop/templates/index.php
CHANGED
@@ -86,17 +86,8 @@ else {
|
|
86 |
</script>
|
87 |
<?php
|
88 |
}
|
89 |
-
else {
|
90 |
-
if ($skinnyData['is_enable'] == 'off'){ ?>
|
91 |
-
<script> var warnings = document.getElementById("noPlugin");
|
92 |
-
warnings.innerHTML = '<strong><font size="4" color="red">Please enable Eshop plugin in settings.</font></strong>';
|
93 |
-
jQuery('#noPlugin').css('display', 'block');
|
94 |
-
</script>
|
95 |
-
<?php
|
96 |
-
}
|
97 |
}
|
98 |
-
|
99 |
-
if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail' && $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_activ'] != 'not_activ' && $skinnyData['is_enable'] == 'on'){ ?>
|
100 |
<div id='filenamedisplay'></div><!--<form class="add:the-list: validate" style="clear:both;" method="post" enctype="multipart/form-data" onsubmit="return file_exist();">-->
|
101 |
|
102 |
<div class="container">
|
@@ -347,7 +338,6 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
347 |
?>
|
348 |
<table style="font-size: 12px;" class = "table table-striped" id='FIELDGRP'>
|
349 |
<tr>
|
350 |
-
<td colspan='4'>
|
351 |
<div align='center' style='float:right;'>
|
352 |
<?php $cnt = count($impCE->defCols) + 2;
|
353 |
$cnt1 = count($impCE->headers);
|
@@ -370,13 +360,7 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
370 |
<input type='hidden' id='stepstatus' name='stepstatus' value='<?php if(isset($_REQUEST['step'])){ echo $_REQUEST['step']; } ?>' />
|
371 |
<input type='hidden' id='mappingArr' name='mappingArr' value='' />
|
372 |
<input type='hidden' id='inline_image_location' name='inline_image_location' value='<?php if(isset($extracted_image_location)){ echo $extracted_image_location;} ?>' />
|
373 |
-
<input type='button' id='prev_record' name='prev_record' class="btn btn-primary" value='<<' onclick='gotoelement(this.id);' />
|
374 |
-
<label style="padding-right:10px;" id='preview_of_row'><?php echo __('Showing preview of row # 1','wp-ultimate-csv-importer'); ?> </label>
|
375 |
-
<input type='button' id='next_record' name='next_record' class="btn btn-primary" value='>>' onclick='gotoelement(this.id);' />
|
376 |
-
<label id="importalign" style="margin-right:8px;"> <?php echo __('Go To Row #','wp-ultimate-csv-importer'); ?></label><input type='text' id='goto_element' name='goto_element' />
|
377 |
-
<input type='button' id='apply_element' name='apply_element' class="btn btn-success" value='<?php echo __('Show','wp-ultimate-csv-importer'); ?>' onclick='gotoelement(this.id);' style="margin-right:10px;margin-left:5px"/>
|
378 |
</div>
|
379 |
-
</td>
|
380 |
</tr>
|
381 |
<?php
|
382 |
$count = 0;
|
@@ -391,25 +375,31 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
391 |
?>
|
392 |
<tr>
|
393 |
<td colspan='4' class="left_align columnheader" style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
394 |
-
<div id = 'custfield_core'><b
|
395 |
</div>
|
396 |
</td>
|
397 |
</tr>
|
398 |
<tr>
|
399 |
-
<td class="left_align columnheader"> <b><?php echo __('WP FIELDS','wp-ultimate-csv-importer'); ?></b> </td><td class="columnheader"> <b><?php echo __('CSV HEADER','wp-ultimate-csv-importer'); ?></b> </td><td
|
400 |
<?php
|
401 |
foreach ($eshopObj->defCols as $key => $value)
|
402 |
{
|
403 |
if(!strstr($key,'CF:') && !strstr($key,'SEO:')){?>
|
404 |
|
405 |
<tr>
|
406 |
-
<td class="left_align" style='
|
407 |
-
<input type='hidden' name ='fieldname<?php print($count); ?>' id = 'fieldname<?php print($count); ?>' value = <?php echo $key; ?> />
|
408 |
<label class='wpfields'><?php print('<b>'.$key.'</b></label><br><label class="samptxt" style="padding-left:20px">[Name: '.$key.']'); ?></label>
|
409 |
</td>
|
410 |
|
411 |
<td>
|
412 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
<option><?php echo __('-- Select --',WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?></option>
|
414 |
<?php foreach($impCE->headers as $key1 => $value1){?>
|
415 |
|
@@ -438,7 +428,6 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
438 |
<input type='hidden' id='wpfields' name='wpfields' value='<?php echo($count) ?>' />
|
439 |
</table>
|
440 |
<script>
|
441 |
-
//showcsvrow();
|
442 |
</script>
|
443 |
<?php
|
444 |
foreach($mappingFields_arr as $mkey => $mval){
|
@@ -450,7 +439,7 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
450 |
<tr>
|
451 |
|
452 |
<td colspan = 5 class='left_align columnheader' style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
453 |
-
<div id = 'custfield_core'><b
|
454 |
</div>
|
455 |
|
456 |
</td>
|
@@ -461,7 +450,7 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
461 |
?>
|
462 |
|
463 |
<tr>
|
464 |
-
<td class="left_align" style='width:
|
465 |
<input type='hidden' name ='corefieldname<?php print($count); ?>' id = 'corefieldname<?php print($count); ?>' value = '<?php echo $key; ?>' />
|
466 |
|
467 |
<label class='wpfields'><?php print('<b>'.$value.'</b></label><br><label class="samptxt" style="padding-left:20px">[Name: '.$value.']'); ?></label>
|
@@ -502,15 +491,13 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
502 |
<?php
|
503 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
504 |
$active_plugins = get_option('active_plugins');
|
505 |
-
if($wpcsvfreesettings){
|
506 |
-
if(in_array('aioseo',$wpcsvfreesettings)){
|
507 |
if(in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)){
|
508 |
?>
|
509 |
<table style="font-size: 12px;" class = "table table-striped" id='SEO_FIELDGRP'>
|
510 |
<tr>
|
511 |
|
512 |
<td colspan = 5 class='left_align columnheader' style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
513 |
-
<div id = 'custfield_core'><b
|
514 |
</div>
|
515 |
|
516 |
</td>
|
@@ -519,10 +506,9 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
519 |
foreach($impCE->defCols as $key => $value){
|
520 |
if(strstr($key,'SEO:')){
|
521 |
$value = str_replace('SEO:','',$value)
|
522 |
-
//echo '<pre>';print_r($key);echo '</pre>';
|
523 |
?>
|
524 |
<tr>
|
525 |
-
<td class="left_align" style='width:
|
526 |
<input type='hidden' name ='seofieldname<?php print($count); ?>' id = 'seofieldname<?php print($count); ?>' value = '<?php echo $key; ?>' />
|
527 |
|
528 |
<label class='wpfields'><?php print('<b>'.$value.'</b></label><br><label class="samptxt" style="padding-left:20px">[Name: '.$value.']'); ?></label>
|
@@ -554,28 +540,17 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
554 |
}?>
|
555 |
<input type='hidden' id='seofields' name='seofields' value='<?php echo($count) ?>' />
|
556 |
</table>
|
557 |
-
<?php }
|
558 |
|
559 |
<?php $basic_count = $count - 1; ?>
|
560 |
<input type="hidden" id="basic_count" name="basic_count" value="<?php echo $basic_count; ?>" />
|
561 |
<input type="hidden" id="corecustomcount" name="corecustomcount" value=0 />
|
562 |
-
<?php //echo $impCE->customfieldui($count);?>
|
563 |
|
564 |
<input type="hidden" id="mapping_fields_array" name="mapping_fields_array" value="<?php if(isset($mFieldsArr)) { print_r($mFieldsArr); } ?>"/>
|
565 |
<div>
|
566 |
-
<div class="goto_import_options"
|
567 |
<div class="mappingactions" style="margin-top;26px;">
|
568 |
<input type='button' id='clear_mapping' title = '<?php echo __('clear Mapping','wp-ultimate-csv-importer'); ?>' class='clear_mapping btn btn-warning' name='clear_mapping' value='<?php echo __('Clear','wp-ultimate-csv-importer'); echo ' ';echo $impCE->reduceStringLength(__(' Mapping','wp-ultimate-csv-importer'),'Mapping'); ?>' onclick='clearMapping();' style = 'float:left'/>
|
569 |
-
<span style = ''>
|
570 |
-
<a href="#" class="tooltip tooltip_smack" style = ''>
|
571 |
-
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png" />
|
572 |
-
<span class="tooltipClearMapping">
|
573 |
-
<img class="callout" src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/callout.gif" />
|
574 |
-
<strong><?php echo __('Refresh to re-map fields','wp-ultimate-csv-importer'); ?></strong>
|
575 |
-
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png" style="margin-top: 6px;float:right;" />
|
576 |
-
</span>
|
577 |
-
</a>
|
578 |
-
</span>
|
579 |
</div>
|
580 |
<div class="mappingactions" >
|
581 |
<input type='submit' id='goto_importer_setting' title = '<?php echo __("Next",'wp-ultimate-csv-importer'); ?>' class='goto_importer_setting btn btn-info' name='goto_importer_setting' value='<?php echo $impCE->reduceStringLength(__('Next','wp-ultimate-csv-importer'),'Next'); ?> >>' />
|
@@ -618,39 +593,17 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
618 |
<?php } ?>
|
619 |
<!-- Import settings options -->
|
620 |
<div class="postbox" id="options" style=" margin-bottom:0px;">
|
621 |
-
<!-- <h4 class="hndle">Search settings</h4>-->
|
622 |
<div class="inside">
|
623 |
<label id='importalign'><input type ='radio' id='importNow' name='importMode' value='' onclick='choose_import_mode(this.id);' checked/> <?php echo __("Import right away",'wp-ultimate-csv-importer'); ?> </label>
|
624 |
<label id='importalign'><input type ='radio' id='scheduleNow' name='importMode' value='' onclick='choose_import_mode(this.id);' disabled/> <?php echo __("Schedule now",'wp-ultimate-csv-importer'); ?> </label>
|
625 |
<div id='schedule' style='display:none'>
|
626 |
<input type ='hidden' id='select_templatename' name='#select_templatename' value = '<?php if(isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['templateid'])) { echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['templateid'] ; } ?>'>
|
627 |
-
<?php //echo WPImporter_includes_schedulehelper::generatescheduleHTML(); ?>
|
628 |
</div>
|
629 |
<div id='importrightaway' style='display:block'>
|
630 |
|
631 |
<form method="POST" >
|
632 |
<ul id="settings">
|
633 |
<li>
|
634 |
-
<!--Get all posts with an <strong>content-similarity</strong> of more than: <strong><span id="similarity_amount">80</span>%</strong>
|
635 |
-
<div id="similarity" class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" aria-disabled="false"><a class="ui-slider-handle ui-state-default ui-corner-all" href="#" style="left: 60%;"></a></div>
|
636 |
-
</li>
|
637 |
-
<input type="hidden" value="80" name="similarity">
|
638 |
-
<li id="statuses">Include these <strong>statuses</strong>: <br>
|
639 |
-
<input name="status[]" type="checkbox" value="draft"> Draft<br><input name="status[]" type="checkbox" value="pending"> Pending Review<br><input name="status[]" type="checkbox" value="private"> Private<br><input name="status[]" type="checkbox" value="publish" checked=""> Published<br> </li>
|
640 |
-
<li id="dates">Limit by <strong>post date</strong>:<br>
|
641 |
-
from <input id="datefrom" name="datefrom" class="datepicker hasDatepicker" type="text" value="" readonly="readonly"><img class="ui-datepicker-trigger" src="images/date-button.gif" alt="..." title="..."> until <input id="dateto" name="dateto" class="datepicker hasDatepicker" type="text" value="" readonly="readonly"><img class="ui-datepicker-trigger" src="images/date-button.gif" alt="..." title="...">
|
642 |
-
</li>
|
643 |
-
<li>
|
644 |
-
Compare <select name="search_field" id="search_field">
|
645 |
-
<option value="0" selected="selected">
|
646 |
-
content (post_content) </option>
|
647 |
-
<option value="1">
|
648 |
-
title (post_title) </option>
|
649 |
-
<option value="2">
|
650 |
-
content and title </option>
|
651 |
-
</select><br>
|
652 |
-
<input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
|
653 |
-
<input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
|
654 |
<label id='importalign'><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> <?php echo __('Detect duplicate post content','wp-ultimate-csv-importer'); ?></label> <br>
|
655 |
<input type='hidden' name='wpnoncekey' id='wpnoncekey' value='<?php echo $nonce_Key; ?>' />
|
656 |
<label id='importalign'><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > <?php echo __('Detect duplicate post title','wp-ultimate-csv-importer'); ?></label> <br>
|
@@ -661,22 +614,13 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
661 |
<input type="hidden" id="terminateaction" name="terminateaction" value="continue" />
|
662 |
<label id="innertitle"><?php echo __('Inline image options','wp-ultimate-csv-importer'); ?></label><br />
|
663 |
<label id='importalign'> <input type ='checkbox' id='multiimage' name='multiimage' value = ''><?php echo __('Insert Inline Images','wp-ultimate-csv-importer'); ?> </label><br>
|
664 |
-
<!-- <div id='inlineimageoption' style="display:none;" >
|
665 |
-
<label id='importalign'><input type="radio" name="inlineimage_location" id="imagewithextension" value="imagewithextension" onclick="inline_image_option(this.value);" /> Image name with extension </label>
|
666 |
-
<label id='importalign'><input type="radio" name="inlineimage_location" id="inlineimage_location" value="inlineimage_location" onclick="inline_image_option(this.value);" /> <input type="text" name="imagelocation" id="imagelocation" placeholder="Inline Image Location" value="" onblur="customimagelocation(this.value);" style="margin-top:5px;margin-left:10px"/></label>
|
667 |
-
</div> -->
|
668 |
<input type='hidden' id='inlineimagevalue' name='inlineimagevalue' value='none' />
|
669 |
</li>
|
670 |
-
<!-- <li>
|
671 |
-
Ignore these words while comparing <input name="filterwords" id="filterwords" type="text" value="">
|
672 |
-
</li>-->
|
673 |
</ul>
|
674 |
-
<!-- <input id="goto_back" name="goto_back" class="btn btn-warning" type="button" value="<< Back" onclick="gotoback();" /> -->
|
675 |
<input id="startbutton" class="btn btn-primary" type="button" value="<?php echo __('Import Now','wp-ultimate-csv-importer'); ?>" style="color: #ffffff;background:#2E9AFE;" onclick="importRecordsbySettings('<?php echo site_url(); ?>');" >
|
676 |
<input id="terminatenow" class="btn btn-danger btn-sm" type="button" value="<?php echo __('Terminate Now','wp-ultimate-csv-importer'); ?>" style="display:none;" onclick="terminateProcess();" />
|
677 |
<input class="btn btn-warning" type="button" value="<?php echo __('Reload','wp-ultimate-csv-importer'); ?>" id="importagain" style="display:none" onclick="import_again();" />
|
678 |
<input id="continuebutton" class="btn btn-lg btn-success" type="button" value="<?php echo __('Continue','wp-ultimate-csv-importer'); ?>" style="display:none;color: #ffffff;" onclick="continueprocess();">
|
679 |
-
<!--<input id="continuebutton" class="button" type="button" value="Continue old search" style="color: #ffffff;background:#2E9AFE;">-->
|
680 |
<div id="ajaxloader" style="display:none"><img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/ajax-loader.gif"> <?php echo __('Processing...','wp-ultimate-csv-importer'); ?></div>
|
681 |
|
682 |
<div class="clear"></div>
|
@@ -684,7 +628,6 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
684 |
</div>
|
685 |
<div class="clear"></div>
|
686 |
<br>
|
687 |
-
<!-- Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
|
688 |
</div>
|
689 |
</div>
|
690 |
<?php } ?>
|
@@ -718,7 +661,6 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail'
|
|
718 |
<div class="accordion-group" >
|
719 |
<div class="accordion-body in collapse">
|
720 |
<div>
|
721 |
-
<?php //$impCE->common_footer_for_other_plugin_promotions(); ?>
|
722 |
<?php $impCE->common_footer(); ?>
|
723 |
</div>
|
724 |
</div>
|
86 |
</script>
|
87 |
<?php
|
88 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
+
if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] != 'not_avail' && $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_activ'] != 'not_activ'){ ?>
|
|
|
91 |
<div id='filenamedisplay'></div><!--<form class="add:the-list: validate" style="clear:both;" method="post" enctype="multipart/form-data" onsubmit="return file_exist();">-->
|
92 |
|
93 |
<div class="container">
|
338 |
?>
|
339 |
<table style="font-size: 12px;" class = "table table-striped" id='FIELDGRP'>
|
340 |
<tr>
|
|
|
341 |
<div align='center' style='float:right;'>
|
342 |
<?php $cnt = count($impCE->defCols) + 2;
|
343 |
$cnt1 = count($impCE->headers);
|
360 |
<input type='hidden' id='stepstatus' name='stepstatus' value='<?php if(isset($_REQUEST['step'])){ echo $_REQUEST['step']; } ?>' />
|
361 |
<input type='hidden' id='mappingArr' name='mappingArr' value='' />
|
362 |
<input type='hidden' id='inline_image_location' name='inline_image_location' value='<?php if(isset($extracted_image_location)){ echo $extracted_image_location;} ?>' />
|
|
|
|
|
|
|
|
|
|
|
363 |
</div>
|
|
|
364 |
</tr>
|
365 |
<?php
|
366 |
$count = 0;
|
375 |
?>
|
376 |
<tr>
|
377 |
<td colspan='4' class="left_align columnheader" style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
378 |
+
<div id = 'custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('WordPress Fields:','wp-ultimate-importer'); ?></b>
|
379 |
</div>
|
380 |
</td>
|
381 |
</tr>
|
382 |
<tr>
|
383 |
+
<td class="left_align columnheader" style='padding-left:170px;'> <b><?php echo __('WP FIELDS','wp-ultimate-csv-importer'); ?></b> </td><td class="columnheader" style='padding-left:55px;'> <b><?php echo __('CSV HEADER','wp-ultimate-csv-importer'); ?></b> </td><td> </td><td></td></tr>
|
384 |
<?php
|
385 |
foreach ($eshopObj->defCols as $key => $value)
|
386 |
{
|
387 |
if(!strstr($key,'CF:') && !strstr($key,'SEO:')){?>
|
388 |
|
389 |
<tr>
|
390 |
+
<td class="left_align" style='padding-left:150px;'>
|
391 |
+
<input type='hidden' name ='fieldname<?php print($count); ?>' id = 'fieldname<?php print($count); ?>' value = '<?php echo $key; ?>' />
|
392 |
<label class='wpfields'><?php print('<b>'.$key.'</b></label><br><label class="samptxt" style="padding-left:20px">[Name: '.$key.']'); ?></label>
|
393 |
</td>
|
394 |
|
395 |
<td>
|
396 |
+
|
397 |
+
<?php if($key == 'post_status'){ ?>
|
398 |
+
<select name="mapping<?php print($count); ?>" id="mapping<?php print($count); ?>" onChange=changefield();>
|
399 |
+
<?php }else{ ?>
|
400 |
+
<select name="mapping<?php print($count); ?>"
|
401 |
+
id="mapping<?php print($count); ?>">
|
402 |
+
<?php } ?>
|
403 |
<option><?php echo __('-- Select --',WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?></option>
|
404 |
<?php foreach($impCE->headers as $key1 => $value1){?>
|
405 |
|
428 |
<input type='hidden' id='wpfields' name='wpfields' value='<?php echo($count) ?>' />
|
429 |
</table>
|
430 |
<script>
|
|
|
431 |
</script>
|
432 |
<?php
|
433 |
foreach($mappingFields_arr as $mkey => $mval){
|
439 |
<tr>
|
440 |
|
441 |
<td colspan = 5 class='left_align columnheader' style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
442 |
+
<div id = 'custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('Custom Fields:','wp-ultimate-csv-importer'); ?></b>
|
443 |
</div>
|
444 |
|
445 |
</td>
|
450 |
?>
|
451 |
|
452 |
<tr>
|
453 |
+
<td class="left_align" style='width:53%; padding-left:150px;'>
|
454 |
<input type='hidden' name ='corefieldname<?php print($count); ?>' id = 'corefieldname<?php print($count); ?>' value = '<?php echo $key; ?>' />
|
455 |
|
456 |
<label class='wpfields'><?php print('<b>'.$value.'</b></label><br><label class="samptxt" style="padding-left:20px">[Name: '.$value.']'); ?></label>
|
491 |
<?php
|
492 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
493 |
$active_plugins = get_option('active_plugins');
|
|
|
|
|
494 |
if(in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)){
|
495 |
?>
|
496 |
<table style="font-size: 12px;" class = "table table-striped" id='SEO_FIELDGRP'>
|
497 |
<tr>
|
498 |
|
499 |
<td colspan = 5 class='left_align columnheader' style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
500 |
+
<div id = 'custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('SEO Fields:','wp-ultimate_csv-importer'); ?></b>
|
501 |
</div>
|
502 |
|
503 |
</td>
|
506 |
foreach($impCE->defCols as $key => $value){
|
507 |
if(strstr($key,'SEO:')){
|
508 |
$value = str_replace('SEO:','',$value)
|
|
|
509 |
?>
|
510 |
<tr>
|
511 |
+
<td class="left_align" style='width:53%; padding-left:150px;'>
|
512 |
<input type='hidden' name ='seofieldname<?php print($count); ?>' id = 'seofieldname<?php print($count); ?>' value = '<?php echo $key; ?>' />
|
513 |
|
514 |
<label class='wpfields'><?php print('<b>'.$value.'</b></label><br><label class="samptxt" style="padding-left:20px">[Name: '.$value.']'); ?></label>
|
540 |
}?>
|
541 |
<input type='hidden' id='seofields' name='seofields' value='<?php echo($count) ?>' />
|
542 |
</table>
|
543 |
+
<?php } ?>
|
544 |
|
545 |
<?php $basic_count = $count - 1; ?>
|
546 |
<input type="hidden" id="basic_count" name="basic_count" value="<?php echo $basic_count; ?>" />
|
547 |
<input type="hidden" id="corecustomcount" name="corecustomcount" value=0 />
|
|
|
548 |
|
549 |
<input type="hidden" id="mapping_fields_array" name="mapping_fields_array" value="<?php if(isset($mFieldsArr)) { print_r($mFieldsArr); } ?>"/>
|
550 |
<div>
|
551 |
+
<div class="goto_import_options" style='padding-left:330px;'>
|
552 |
<div class="mappingactions" style="margin-top;26px;">
|
553 |
<input type='button' id='clear_mapping' title = '<?php echo __('clear Mapping','wp-ultimate-csv-importer'); ?>' class='clear_mapping btn btn-warning' name='clear_mapping' value='<?php echo __('Clear','wp-ultimate-csv-importer'); echo ' ';echo $impCE->reduceStringLength(__(' Mapping','wp-ultimate-csv-importer'),'Mapping'); ?>' onclick='clearMapping();' style = 'float:left'/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
554 |
</div>
|
555 |
<div class="mappingactions" >
|
556 |
<input type='submit' id='goto_importer_setting' title = '<?php echo __("Next",'wp-ultimate-csv-importer'); ?>' class='goto_importer_setting btn btn-info' name='goto_importer_setting' value='<?php echo $impCE->reduceStringLength(__('Next','wp-ultimate-csv-importer'),'Next'); ?> >>' />
|
593 |
<?php } ?>
|
594 |
<!-- Import settings options -->
|
595 |
<div class="postbox" id="options" style=" margin-bottom:0px;">
|
|
|
596 |
<div class="inside">
|
597 |
<label id='importalign'><input type ='radio' id='importNow' name='importMode' value='' onclick='choose_import_mode(this.id);' checked/> <?php echo __("Import right away",'wp-ultimate-csv-importer'); ?> </label>
|
598 |
<label id='importalign'><input type ='radio' id='scheduleNow' name='importMode' value='' onclick='choose_import_mode(this.id);' disabled/> <?php echo __("Schedule now",'wp-ultimate-csv-importer'); ?> </label>
|
599 |
<div id='schedule' style='display:none'>
|
600 |
<input type ='hidden' id='select_templatename' name='#select_templatename' value = '<?php if(isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['templateid'])) { echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['templateid'] ; } ?>'>
|
|
|
601 |
</div>
|
602 |
<div id='importrightaway' style='display:block'>
|
603 |
|
604 |
<form method="POST" >
|
605 |
<ul id="settings">
|
606 |
<li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
607 |
<label id='importalign'><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> <?php echo __('Detect duplicate post content','wp-ultimate-csv-importer'); ?></label> <br>
|
608 |
<input type='hidden' name='wpnoncekey' id='wpnoncekey' value='<?php echo $nonce_Key; ?>' />
|
609 |
<label id='importalign'><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > <?php echo __('Detect duplicate post title','wp-ultimate-csv-importer'); ?></label> <br>
|
614 |
<input type="hidden" id="terminateaction" name="terminateaction" value="continue" />
|
615 |
<label id="innertitle"><?php echo __('Inline image options','wp-ultimate-csv-importer'); ?></label><br />
|
616 |
<label id='importalign'> <input type ='checkbox' id='multiimage' name='multiimage' value = ''><?php echo __('Insert Inline Images','wp-ultimate-csv-importer'); ?> </label><br>
|
|
|
|
|
|
|
|
|
617 |
<input type='hidden' id='inlineimagevalue' name='inlineimagevalue' value='none' />
|
618 |
</li>
|
|
|
|
|
|
|
619 |
</ul>
|
|
|
620 |
<input id="startbutton" class="btn btn-primary" type="button" value="<?php echo __('Import Now','wp-ultimate-csv-importer'); ?>" style="color: #ffffff;background:#2E9AFE;" onclick="importRecordsbySettings('<?php echo site_url(); ?>');" >
|
621 |
<input id="terminatenow" class="btn btn-danger btn-sm" type="button" value="<?php echo __('Terminate Now','wp-ultimate-csv-importer'); ?>" style="display:none;" onclick="terminateProcess();" />
|
622 |
<input class="btn btn-warning" type="button" value="<?php echo __('Reload','wp-ultimate-csv-importer'); ?>" id="importagain" style="display:none" onclick="import_again();" />
|
623 |
<input id="continuebutton" class="btn btn-lg btn-success" type="button" value="<?php echo __('Continue','wp-ultimate-csv-importer'); ?>" style="display:none;color: #ffffff;" onclick="continueprocess();">
|
|
|
624 |
<div id="ajaxloader" style="display:none"><img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/ajax-loader.gif"> <?php echo __('Processing...','wp-ultimate-csv-importer'); ?></div>
|
625 |
|
626 |
<div class="clear"></div>
|
628 |
</div>
|
629 |
<div class="clear"></div>
|
630 |
<br>
|
|
|
631 |
</div>
|
632 |
</div>
|
633 |
<?php } ?>
|
661 |
<div class="accordion-group" >
|
662 |
<div class="accordion-body in collapse">
|
663 |
<div>
|
|
|
664 |
<?php $impCE->common_footer(); ?>
|
665 |
</div>
|
666 |
</div>
|
modules/export/templates/export_old.php
DELETED
@@ -1,1400 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/******************************************************************************************
|
3 |
-
* Copyright (C) Smackcoders 2014 - All Rights Reserved
|
4 |
-
* Unauthorized copying of this file, via any medium is strictly prohibited
|
5 |
-
* Proprietary and confidential
|
6 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
7 |
-
*******************************************************************************************/
|
8 |
-
|
9 |
-
require_once('../../../../../../wp-load.php');
|
10 |
-
$ExportObj = new WPCSVProExportData();
|
11 |
-
#print('<pre>'); print_r($_POST); //die;
|
12 |
-
$ExportObj->executeIndex($_POST);
|
13 |
-
class WPCSVProExportData {
|
14 |
-
public function __construct() {
|
15 |
-
|
16 |
-
}
|
17 |
-
|
18 |
-
/**
|
19 |
-
* The actions index method
|
20 |
-
* @param array $request
|
21 |
-
* @return array
|
22 |
-
*/
|
23 |
-
public function executeIndex($request) {
|
24 |
-
#print('<pre>'); print_r($request); print('</pre>'); die;
|
25 |
-
if($request['export'] == 'category') {
|
26 |
-
$this->WPImpExportCategories($request);
|
27 |
-
}
|
28 |
-
else if($request['export'] == 'tags') {
|
29 |
-
$this->WPImpExportTags($request);
|
30 |
-
}
|
31 |
-
else if($request['export'] == 'customtaxonomy') {
|
32 |
-
$this->WPImpExportTaxonomies($request);
|
33 |
-
}
|
34 |
-
else if($request['export'] == 'customerreviews') {
|
35 |
-
$this->WPImpExportCustomerReviews($request);
|
36 |
-
}
|
37 |
-
else if($request['export'] == 'comments') {
|
38 |
-
$this->WPImpExportComments($request);
|
39 |
-
}
|
40 |
-
else if($request['export'] == 'users') {
|
41 |
-
$this->WPImpExportUsers($request);
|
42 |
-
}
|
43 |
-
else {
|
44 |
-
$this->WPImpPROExportData($request);#die;
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
*
|
50 |
-
*/
|
51 |
-
public function generateCSVHeaders($exporttype){
|
52 |
-
global $wpdb;
|
53 |
-
$post_type = $exporttype;
|
54 |
-
$unwantedHeader = array('_eshop_product', '_wp_attached_file', '_wp_page_template', '_wp_attachment_metadata', '_encloseme');
|
55 |
-
if($exporttype == 'woocommerce' || $exporttype == 'marketpress')
|
56 |
-
$post_type = 'product';
|
57 |
-
if($exporttype == 'wpcommerce')
|
58 |
-
$post_type = 'wpsc-product';
|
59 |
-
if($exporttype == 'eshop')
|
60 |
-
$post_type = 'post';
|
61 |
-
if($exporttype == 'custompost') {
|
62 |
-
$post_type = $_POST['export_post_type'];
|
63 |
-
}
|
64 |
-
$header_query1 = "SELECT wp.* FROM $wpdb->posts wp where post_type = '$post_type'";
|
65 |
-
$header_query2 = "SELECT post_id, meta_key, meta_value FROM $wpdb->posts wp JOIN $wpdb->postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') and meta_key NOT LIKE 'field_%' and meta_key NOT LIKE '_wp_types%'";
|
66 |
-
$result_header_query1 = $wpdb->get_results($header_query1);
|
67 |
-
$result_header_query2 = $wpdb->get_results($header_query2);
|
68 |
-
|
69 |
-
foreach ($result_header_query1 as $rhq1_key) {
|
70 |
-
foreach ($rhq1_key as $rhq1_headkey => $rhq1_headval) {
|
71 |
-
if (!in_array($rhq1_headkey, $Header))
|
72 |
-
$Header[] = $rhq1_headkey;
|
73 |
-
}
|
74 |
-
}
|
75 |
-
foreach($this->getACFvalues() as $acfKey => $acfVal) {
|
76 |
-
$unwantedHeader[] = '_' . $acfKey;
|
77 |
-
}
|
78 |
-
foreach($this->getACFvalues() as $acfKey => $acfVal) {
|
79 |
-
if(!in_array($acfKey, $unwantedHeader)) {
|
80 |
-
$Header[] = $acfKey;
|
81 |
-
$unwantedHeader[] = $acfKey;
|
82 |
-
}
|
83 |
-
}
|
84 |
-
foreach($this->getTypesFields() as $typeKey => $typeVal) {
|
85 |
-
if(!in_array($typeKey, $unwantedHeader)) {
|
86 |
-
$Header[] = $typeVal;
|
87 |
-
$unwantedHeader[] = $typeKey;
|
88 |
-
}
|
89 |
-
}
|
90 |
-
foreach($this->getAIOSEOfields() as $aioseokey => $aioseoval) {
|
91 |
-
$Header[] = $aioseoval;
|
92 |
-
$unwantedHeader[] = $aioseokey;
|
93 |
-
}
|
94 |
-
foreach($this->getYoastSEOfields() as $yoastseokey => $yoastseoval) {
|
95 |
-
$Header[] = $yoastseoval;
|
96 |
-
$unwantedHeader[] = $yoastseokey;
|
97 |
-
}
|
98 |
-
foreach ($result_header_query2 as $rhq2_headkey) {
|
99 |
-
if (!in_array($rhq2_headkey->meta_key, $Header)) {
|
100 |
-
if(!in_array($rhq2_headkey->meta_key, $unwantedHeader)) {
|
101 |
-
$Header[] = $rhq2_headkey->meta_key;
|
102 |
-
}
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
#print('<pre>'); print_r($Header); die;
|
107 |
-
if($exporttype == 'woocommerce' || $exporttype == 'marketpress' || $exporttype == 'wpcommerce' || $exporttype == 'eshop') {
|
108 |
-
if($exporttype == 'woocommerce') {
|
109 |
-
foreach($this->WoocommerceMetaHeaders() as $woo_hkey => $woo_hval) {
|
110 |
-
if(in_array($woo_hval, $Header))
|
111 |
-
$ProHeader[] = $woo_hkey;
|
112 |
-
else
|
113 |
-
$ProHeader[] = $woo_hkey;
|
114 |
-
}
|
115 |
-
}
|
116 |
-
else if($exporttype == 'marketpress') {
|
117 |
-
foreach($this->MarketPressHeaders() as $mp_hkey => $mp_hval) {
|
118 |
-
if(in_array($mp_hval, $Header))
|
119 |
-
$ProHeader[] = $mp_hkey;
|
120 |
-
else
|
121 |
-
$ProHeader[] = $mp_hkey;
|
122 |
-
}
|
123 |
-
}
|
124 |
-
else if($exporttype == 'wpcommerce') {
|
125 |
-
foreach($this->WpeCommerceHeaders() as $wpcom_hkey => $wpcom_hval) {
|
126 |
-
if(in_array($wpcom_hval, $Header))
|
127 |
-
$ProHeader[] = $wpcom_hkey;
|
128 |
-
else
|
129 |
-
$ProHeader[] = $wpcom_hkey;
|
130 |
-
}
|
131 |
-
}
|
132 |
-
else if($exporttype == 'eshop') {
|
133 |
-
foreach($this->EshopHeaders() as $eshop_hkey => $eshop_hval) {
|
134 |
-
if(in_array($eshop_hval, $Header))
|
135 |
-
$ProHeader[] = $eshop_hkey;
|
136 |
-
else
|
137 |
-
$ProHeader[] = $eshop_hkey;
|
138 |
-
}
|
139 |
-
}
|
140 |
-
foreach($this->getACFvalues() as $acfKey => $acfVal) {
|
141 |
-
if(!in_array($acfKey, $unwantedHeader)) {
|
142 |
-
$ProHeader[] = $acfKey;
|
143 |
-
}
|
144 |
-
}
|
145 |
-
foreach($this->getTypesFields() as $typeKey => $typeVal) {
|
146 |
-
if(!in_array($typeKey, $unwantedHeader)) {
|
147 |
-
$ProHeader[] = $typeVal;
|
148 |
-
}
|
149 |
-
}
|
150 |
-
foreach($this->getAIOSEOfields() as $aioseokey => $aioseoval) {
|
151 |
-
$ProHeader[] = $aioseoval;
|
152 |
-
}
|
153 |
-
foreach($this->getYoastSEOfields() as $yoastseokey => $yoastseoval) {
|
154 |
-
$ProHeader[] = $yoastseoval;
|
155 |
-
}
|
156 |
-
$ProHeader[] = 'featured_image';
|
157 |
-
return $ProHeader;
|
158 |
-
}
|
159 |
-
$Header[] = 'featured_image';
|
160 |
-
return $Header;
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
*
|
165 |
-
*/
|
166 |
-
public function get_all_record_ids($exporttype, $request) {
|
167 |
-
global $wpdb;
|
168 |
-
$post_type = $exporttype;
|
169 |
-
$get_post_ids = "select DISTINCT ID from $wpdb->posts p join $wpdb->postmeta pm on pm.post_id = p.ID";
|
170 |
-
if($post_type == 'woocommerce' || $post_type == 'marketpress')
|
171 |
-
$post_type = 'product';
|
172 |
-
if($post_type == 'wpcommerce')
|
173 |
-
$post_type = 'wpsc-product';
|
174 |
-
if($post_type == 'eshop')
|
175 |
-
$post_type = 'post';
|
176 |
-
if($post_type == 'custompost')
|
177 |
-
$post_type = $_POST['export_post_type'];
|
178 |
-
|
179 |
-
$get_post_ids .= " where p.post_type = '$post_type'";
|
180 |
-
if(isset($request['getdatawithspecificstatus'])) {
|
181 |
-
if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'All') {
|
182 |
-
$get_post_ids .= " and p.post_status in ('publish','draft','future','private','pending')";
|
183 |
-
} else if(isset($request['postwithstatus']) && ($request['postwithstatus'] == 'Publish' || $request['postwithstatus'] == 'Sticky')) {
|
184 |
-
$get_post_ids .= " and p.post_status in ('publish')";
|
185 |
-
} else if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Draft') {
|
186 |
-
$get_post_ids .= " and p.post_status in ('draft')";
|
187 |
-
} else if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Scheduled') {
|
188 |
-
$get_post_ids .= " and p.post_status in ('future')";
|
189 |
-
} else if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Private') {
|
190 |
-
$get_post_ids .= " and p.post_status in ('private')";
|
191 |
-
} else if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Pending') {
|
192 |
-
$get_post_ids .= " and p.post_status in ('pending')";
|
193 |
-
} else if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Protected') {
|
194 |
-
$get_post_ids .= " and p.post_status in ('publish') and post_password != ''";
|
195 |
-
}
|
196 |
-
} else {
|
197 |
-
$get_post_ids .= " and p.post_status in ('publish','draft','future','private','pending')";
|
198 |
-
}
|
199 |
-
if(isset($request['getdataforspecificperiod'])) {
|
200 |
-
$get_post_ids .= " and p.post_date >= '" . $request['postdatefrom'] . "' and p.post_date <= '" . $request['postdateto'] . "'";
|
201 |
-
}
|
202 |
-
if($exporttype == 'eshop')
|
203 |
-
$get_post_ids .= " and pm.meta_key = 'sku'";
|
204 |
-
if($post_type == 'woocommerce')
|
205 |
-
$get_post_ids .= " and pm.meta_key = '_sku'";
|
206 |
-
if($post_type == 'marketpress')
|
207 |
-
$get_post_ids .= " and pm.meta_key = 'mp_sku'";
|
208 |
-
if($post_type == 'wpcommerce')
|
209 |
-
$get_post_ids .= " and pm.meta_key = '_wpsc_sku'";
|
210 |
-
|
211 |
-
/* if($exporttype == 'woocommerce') {
|
212 |
-
$post_type = 'product';
|
213 |
-
$get_post_ids = "select DISTINCT ID from $wpdb->posts p join $wpdb->postmeta pm on pm.post_id = p.ID where post_type = '$post_type' and post_status in ('publish','draft','future','private','pending') and pm.meta_key = '_sku'";
|
214 |
-
} */
|
215 |
-
if(isset($request['getdatabyspecificauthors'])) {
|
216 |
-
if(isset($request['postauthor']) && $request['postauthor'] != 0) {
|
217 |
-
$get_post_ids .= " and p.post_author = {$request['postauthor']}";
|
218 |
-
}
|
219 |
-
}
|
220 |
-
#print_r($get_post_ids); die;
|
221 |
-
$result = $wpdb->get_col($get_post_ids);
|
222 |
-
if(isset($request['getdatawithspecificstatus'])) {
|
223 |
-
if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Sticky') {
|
224 |
-
$get_sticky_posts = get_option('sticky_posts');
|
225 |
-
foreach($get_sticky_posts as $sticky_post_id) {
|
226 |
-
if(in_array($sticky_post_id, $result))
|
227 |
-
$sticky_posts[] = $sticky_post_id;
|
228 |
-
}
|
229 |
-
return $sticky_posts;
|
230 |
-
}
|
231 |
-
}
|
232 |
-
#print_r($get_sticky_posts);
|
233 |
-
#print_r($result);die;
|
234 |
-
return $result;
|
235 |
-
}
|
236 |
-
|
237 |
-
/**
|
238 |
-
*
|
239 |
-
*/
|
240 |
-
public function getPostDatas($postID) {
|
241 |
-
global $wpdb;
|
242 |
-
$query1 = "SELECT wp.* FROM $wpdb->posts wp where ID=$postID";
|
243 |
-
$result_query1 = $wpdb->get_results($query1);
|
244 |
-
if (!empty($result_query1)) {
|
245 |
-
foreach ($result_query1 as $posts) {
|
246 |
-
foreach ($posts as $post_key => $post_value) {
|
247 |
-
if ($post_key == 'post_status') {
|
248 |
-
if (is_sticky($postID)) {
|
249 |
-
$PostData[$post_key] = 'Sticky';
|
250 |
-
$post_status = 'Sticky';
|
251 |
-
} else {
|
252 |
-
$PostData[$post_key] = $post_value;
|
253 |
-
$post_status = $post_value;
|
254 |
-
}
|
255 |
-
} else {
|
256 |
-
$PostData[$post_key] = $post_value;
|
257 |
-
}
|
258 |
-
if ($post_key == 'post_password') {
|
259 |
-
if ($post_value) {
|
260 |
-
$PostData['post_status'] = "{" . $post_value . "}";
|
261 |
-
} else {
|
262 |
-
$PostData['post_status'] = $post_status;
|
263 |
-
}
|
264 |
-
}
|
265 |
-
if ($post_key == 'comment_status') {
|
266 |
-
if ($post_value == 'closed') {
|
267 |
-
$PostData['comment_status'] = 0;
|
268 |
-
}
|
269 |
-
if ($post_value == 'open') {
|
270 |
-
$PostData['comment_status'] = 1;
|
271 |
-
}
|
272 |
-
}
|
273 |
-
}
|
274 |
-
}
|
275 |
-
}
|
276 |
-
return $PostData;
|
277 |
-
}
|
278 |
-
|
279 |
-
/**
|
280 |
-
*
|
281 |
-
*/
|
282 |
-
public function getPostMetaDatas($postID) {
|
283 |
-
global $wpdb;
|
284 |
-
$query2 = "SELECT post_id, meta_key, meta_value FROM $wpdb->posts wp JOIN $wpdb->postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') AND ID=$postID";
|
285 |
-
#print($query2); print('<br>');
|
286 |
-
$result = $wpdb->get_results($query2);
|
287 |
-
return $result;
|
288 |
-
}
|
289 |
-
|
290 |
-
/**
|
291 |
-
*
|
292 |
-
*/
|
293 |
-
public function getTypesFields() {
|
294 |
-
$wptypesfields = get_option('wpcf-fields');
|
295 |
-
#print('<pre>'); print_r($wptypesfields);
|
296 |
-
foreach($wptypesfields as $typeFkey){
|
297 |
-
$typesfields[$typeFkey['meta_key']] = $typeFkey['name'];
|
298 |
-
}
|
299 |
-
#print_r($typesfields);
|
300 |
-
return $typesfields;
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
*
|
305 |
-
*/
|
306 |
-
public function getACFvalues($getspecificfieldtype = null) {
|
307 |
-
global $wpdb;
|
308 |
-
// Code for ACF fields
|
309 |
-
$get_acf_fields = $wpdb->get_col ( "SELECT meta_value FROM $wpdb->postmeta
|
310 |
-
GROUP BY meta_key
|
311 |
-
HAVING meta_key LIKE 'field_%'
|
312 |
-
ORDER BY meta_key" );
|
313 |
-
|
314 |
-
foreach ( $get_acf_fields as $acf_value ){
|
315 |
-
$get_acf_field = unserialize($acf_value);
|
316 |
-
$acf_fields[$get_acf_field['name']] = "CF: ".$get_acf_field['name'];
|
317 |
-
$acf_fields_slug[$get_acf_field['name']] = "_".$get_acf_field['name'];
|
318 |
-
|
319 |
-
if($get_acf_field['type'] == 'checkbox'){
|
320 |
-
$checkbox_option_fields[] = $get_acf_field['name'];
|
321 |
-
}
|
322 |
-
} // Code ends here
|
323 |
-
if($getspecificfieldtype == 'checkbox')
|
324 |
-
return $checkbox_option_fields;
|
325 |
-
else
|
326 |
-
return $acf_fields;
|
327 |
-
}
|
328 |
-
|
329 |
-
|
330 |
-
/**
|
331 |
-
*
|
332 |
-
*/
|
333 |
-
public function getAIOSEOfields() {
|
334 |
-
$aioseofields = array('_aioseop_keywords' => 'seo_keywords',
|
335 |
-
'_aioseop_description' => 'seo_description',
|
336 |
-
'_aioseop_title' => 'seo_title',
|
337 |
-
'_aioseop_noindex' => 'seo_noindex',
|
338 |
-
'_aioseop_nofollow' => 'seo_nofollow',
|
339 |
-
'_aioseop_disable' => 'seo_disable',
|
340 |
-
'_aioseop_disable_analytics' => 'seo_disable_analytics',
|
341 |
-
'_aioseop_noodp' => 'seo_noodp',
|
342 |
-
'_aioseop_noydir' => 'seo_noydir',);
|
343 |
-
return $aioseofields;
|
344 |
-
}
|
345 |
-
|
346 |
-
/**
|
347 |
-
*
|
348 |
-
*/
|
349 |
-
public function getYoastSEOfields () {
|
350 |
-
$yoastseofields = array('_yoast_wpseo_focuskw' => 'focus_keyword',
|
351 |
-
'_yoast_wpseo_title' => 'title',
|
352 |
-
'_yoast_wpseo_metadesc' => 'meta_desc',
|
353 |
-
'_yoast_wpseo_meta-robots-noindex' => 'meta-robots-noindex',
|
354 |
-
'_yoast_wpseo_meta-robots-nofollow' => 'meta-robots-nofollow',
|
355 |
-
'_yoast_wpseo_meta-robots-adv' => 'meta-robots-adv',
|
356 |
-
'_yoast_wpseo_sitemap-include' => 'sitemap-include',
|
357 |
-
'_yoast_wpseo_sitemap-prio' => 'sitemap-prio',
|
358 |
-
'_yoast_wpseo_canonical' => 'canonical',
|
359 |
-
'_yoast_wpseo_redirect' => 'redirect',
|
360 |
-
'_yoast_wpseo_opengraph-description' => 'opengraph-description',
|
361 |
-
'_yoast_wpseo_google-plus-description' => 'google-plus-description',
|
362 |
-
);
|
363 |
-
return $yoastseofields;
|
364 |
-
}
|
365 |
-
|
366 |
-
/**
|
367 |
-
*
|
368 |
-
*/
|
369 |
-
public function getAllTerms($postID, $type) {
|
370 |
-
// Tags & Categories
|
371 |
-
if($type == 'woocommerce' || $type == 'marketpress') {
|
372 |
-
$exporttype = 'product';
|
373 |
-
$postTags = $postCategory = '';
|
374 |
-
$taxonomies = get_object_taxonomies($exporttype);
|
375 |
-
$get_tags = get_the_terms( $postID, 'product_tag' );
|
376 |
-
if($get_tags){
|
377 |
-
foreach($get_tags as $tags){
|
378 |
-
$postTags .= $tags->name.',';
|
379 |
-
}
|
380 |
-
}
|
381 |
-
$postTags = substr($postTags,0,-1);
|
382 |
-
$TermsData['product_tag'] = $postTags;
|
383 |
-
foreach ($taxonomies as $taxonomy) {
|
384 |
-
if($taxonomy == 'product_cat' || $taxonomy == 'product_category'){
|
385 |
-
$get_categotries =wp_get_post_terms( $postID, $taxonomy );
|
386 |
-
if($get_categotries){
|
387 |
-
foreach($get_categotries as $category){
|
388 |
-
$postCategory .= $category->name.'|';
|
389 |
-
}
|
390 |
-
}
|
391 |
-
$postCategory = substr($postCategory, 0 , -1);
|
392 |
-
$TermsData['product_category'] = $postCategory;
|
393 |
-
}
|
394 |
-
}
|
395 |
-
} else if($type == 'wpcommerce') {
|
396 |
-
$exporttype = 'wpsc-product';
|
397 |
-
$postTags = $postCategory = '';
|
398 |
-
$taxonomies = get_object_taxonomies($exporttype);
|
399 |
-
$get_tags = get_the_terms( $postID, 'product_tag' );
|
400 |
-
if($get_tags){
|
401 |
-
foreach($get_tags as $tags){
|
402 |
-
$postTags .= $tags->name.',';
|
403 |
-
}
|
404 |
-
}
|
405 |
-
$postTags = substr($postTags,0,-1);
|
406 |
-
$TermsData['product_tag'] = $postTags;
|
407 |
-
foreach ($taxonomies as $taxonomy) {
|
408 |
-
if($taxonomy == 'wpsc_product_category'){
|
409 |
-
$get_categotries =wp_get_post_terms( $postID, $taxonomy );
|
410 |
-
if($get_categotries){
|
411 |
-
foreach($get_categotries as $category){
|
412 |
-
$postCategory .= $category->name.'|';
|
413 |
-
}
|
414 |
-
}
|
415 |
-
$postCategory = substr($postCategory, 0 , -1);
|
416 |
-
$TermsData['product_category'] = $postCategory;
|
417 |
-
}
|
418 |
-
}
|
419 |
-
} else {
|
420 |
-
$get_tags = wp_get_post_tags($postID, array('fields' => 'names'));
|
421 |
-
$postTags = $postCategory = '';
|
422 |
-
foreach ($get_tags as $tags) {
|
423 |
-
$postTags .= $tags . ',';
|
424 |
-
}
|
425 |
-
$postTags = substr($postTags, 0, -1);
|
426 |
-
$TermsData['post_tag'] = $postTags;
|
427 |
-
$get_categotries = wp_get_post_categories($postID, array('fields' => 'names'));
|
428 |
-
foreach ($get_categotries as $category) {
|
429 |
-
$postCategory .= $category . '|';
|
430 |
-
}
|
431 |
-
$postCategory = substr($postCategory, 0, -1);
|
432 |
-
$TermsData['post_category'] = $postCategory;
|
433 |
-
}
|
434 |
-
#print('<pre>'); print_r($TermsData); die;
|
435 |
-
return $TermsData;
|
436 |
-
}
|
437 |
-
|
438 |
-
/**
|
439 |
-
*
|
440 |
-
*/
|
441 |
-
public function MarketPressHeaders() {
|
442 |
-
$marketpressHeaders = array('product_title' => 'post_title', 'product_content' => 'post_content', 'product_excerpt' => 'post_excerpt', 'product_publish_date' => 'post_date', 'product_slug' => 'post_name', 'product_status' => 'post_status', 'product_parent' => 'post_parent', 'comment_status' => 'open', 'ping_status' => 'open', 'variation' => 'mp_var_name', 'SKU' => 'mp_sku', 'regular_price' => 'mp_price', 'is_sale' => 'mp_is_sale', 'sale_price' => 'mp_sale_price', 'track_inventory' => 'mp_track_inventory', 'inventory' => 'mp_inventory', 'track_limit' => 'mp_track_limit', 'limit_per_order' => 'mp_limit', 'product_link' => 'mp_product_link', 'is_special_tax' => 'mp_is_special_tax', 'special_tax' => 'mp_special_tax', 'sales_count' => 'mp_sales_count', 'extra_shipping_cost' => 'mp_shipping', 'file_url' => 'mp_file', 'product_category' => 'post_category', 'product_tag' => 'post_tag', 'featured_image' => 'featured_image',);
|
443 |
-
return $marketpressHeaders;
|
444 |
-
}
|
445 |
-
|
446 |
-
/**
|
447 |
-
*
|
448 |
-
*/
|
449 |
-
public function WpeCommerceHeaders() {
|
450 |
-
$wpecommerceHeaders = array('post_date' => 'post_date', 'post_content' => 'post_content', 'post_title' => 'post_title', 'post_excerpt' => 'post_excerpt', 'post_name' => 'post_name', 'stock' => '_wpsc_stock', 'price' => '_wpsc_price', 'sale_price' => '_wpsc_special_price', 'SKU' => '_wpsc_sku', 'product_tags' => 'product_tag', 'product_category' => null, 'featured_image' => 'featured_image', 'custom_meta' => null, 'wpsc_is_donation' => '_wpsc_is_donation', 'notify_when_none_left' => 'notify_when_none_left', 'unpublish_when_none_left' => 'unpublish_when_none_left', 'taxable_amount' => 'wpec_taxes_taxable_amount', 'is_taxable' => 'wpec_taxes_taxable', 'external_link' => 'external_link', 'external_link_text' => 'external_link_text', 'external_link_target' => 'external_link_target', 'no_shipping' => 'no_shipping', 'weight' => 'weight', 'weight_unit' => 'weight_unit', 'height' => 'height', 'height_unit' => 'height_unit', 'width' => 'width', 'width_unit' => 'width_unit', 'length' => 'length', 'length_unit' => 'length_unit', 'dimension_unit' => null, 'shipping' => 'shipping', 'merchant_notes' => 'merchant_notes', 'enable_comments' => 'enable_comments', 'quantity_limited' => 'quantity_limited', 'special' => 'special', 'display_weight_as' => 'display_weight_as', 'state' => 'state', 'quantity' => 'quantity', 'table_price' => 'table_price', 'google_prohibited' => 'google_prohibited',);
|
451 |
-
return $wpecommerceHeaders;
|
452 |
-
}
|
453 |
-
|
454 |
-
/**
|
455 |
-
*
|
456 |
-
*/
|
457 |
-
public function WoocommerceMetaHeaders() {
|
458 |
-
$woocomHeaders = array('product_publish_date' => 'post_date', 'product_content' => 'post_content', 'product_name' => 'post_title', 'product_short_description' => 'post_excerpt', 'product_slug' => 'post_name', 'post_parent' => 0, 'product_category' => 'post_category', 'product_tag' => 'post_tag', 'post_type' => null, 'product_type' => '_product_type', 'product_shipping_class' => '_product_shipping_class', 'product_status' => 'post_status', 'visibility' => '_visibility', 'tax_status' => '_tax_status', 'product_attribute_name' => '_product_attribute_name', 'product_attribute_value' => '_product_attribute_value', 'product_attribute_visible' => '_product_attribute_visible', 'product_attribute_variation' => '_product_attribute_variation', 'featured_image' => null, 'product_attribute_taxonomy' => '_product_attribute_taxonomy', 'tax_class' => '_tax_class', 'file_paths' => '_file_paths', 'comment_count' => null, 'menu_order' => 0, 'comment_status'=> null, 'edit_last' => null, 'edit_lock' => null, 'thumbnail_id' => null, 'visibility' => '_visibility', 'stock_status' => '_stock_status', 'stock_qty' => '_stock', 'total_sales' => null, 'downloadable' => 'downloadable', 'downloadable_files' => '_downloadable_files', 'virtual' => '_virtual', 'regular_price' => '_regular_price', 'sale_price' => '_sale_price', 'purchase_note' => null, 'featured_product' => '_featured', 'weight' => null, 'length' => null, 'width' => null, 'height' => null, 'sku' => '_sku', 'upsell_ids' => '_upsell_ids', 'crosssell_ids' => '_crosssell_ids', 'sale_price_dates_from' => '_sale_price_dates_from', 'sale_price_dates_to' => '_sale_price_dates_to', 'price' => null,'sold_individually' => '_price', 'manage_stock' => '_manage_stock', 'backorders' => '_backorders', 'product_image_gallery' => '__product_image_gallery', 'product_url' => '_product_url', 'button_text' => '_button_text', 'downloadable_files' => null, 'download_limit' => '_download_limit', 'download_expiry' => '_download_expiry', 'download_type'=> null, 'min_variation_price' => null, 'max_variation_price'=> null, 'min_price_variation_id' => null, 'max_price_variation_id' => null, 'min_variation_regular_price' => null, 'max_variation_regular_price' => null, 'min_regular_price_variation_id' => null, 'max_regular_price_variation_id' => null, 'min_variation_sale_price' => null, 'max_variation_sale_price' => null, 'min_sale_price_variation_id' => null, 'max_sale_price_variation_id' => null, 'default_attributes' => null,);
|
459 |
-
return $woocomHeaders;
|
460 |
-
}
|
461 |
-
|
462 |
-
/**
|
463 |
-
*
|
464 |
-
*/
|
465 |
-
public function EshopHeaders() {
|
466 |
-
$eshopHeaders = array('post_title' => 'post_title', 'post_content' => 'post_content', 'post_excerpt' => 'post_excerpt', 'post_date' => 'post_date', 'post_name' => 'post_name', 'post_status' => 'post_status', 'post_author' => 'post_author', 'post_parent' => 0, 'comment_status' => 'open', 'ping_status' => 'open', 'SKU' => 'sku', 'products_option' => 'products_option', 'sale_price' => 'sale_price', 'regular_price' => 'regular_price', 'description' => 'description', 'shiprate' => 'shiprate', 'optset' => null, 'featured_product' => 'featured', 'product_in_sale' => '_eshop_sale', 'stock_available' => '_eshop_stock', 'cart_option' => 'cart_radio', 'category' => 'post_category', 'tags' => 'post_tag', 'featured_image' => null,);
|
467 |
-
return $eshopHeaders;
|
468 |
-
}
|
469 |
-
|
470 |
-
/**
|
471 |
-
* @param $request
|
472 |
-
* @return array
|
473 |
-
*/
|
474 |
-
public function WPImpPROExportData($request) {
|
475 |
-
#print('<pre>'); print_r($this->getACFvalues()); die;
|
476 |
-
global $wpdb;
|
477 |
-
$export_delimiter = ',';
|
478 |
-
$exporttype = $_POST['export'];
|
479 |
-
$wpcsvsettings=get_option('wpcsvprosettings');
|
480 |
-
if(isset($wpcsvsettings['export_delimiter'])){
|
481 |
-
$export_delimiter = $wpcsvsettings['export_delimiter'];
|
482 |
-
}
|
483 |
-
if($_POST['export_filename'])
|
484 |
-
$csv_file_name =$_POST['export_filename'].'.csv';
|
485 |
-
else
|
486 |
-
$csv_file_name='exportas_'.date("Y").'-'.date("m").'-'.date("d").'.csv';
|
487 |
-
$wptypesfields = get_option('wpcf-fields');
|
488 |
-
#print('<pre>'); print_r($wptypesfields); die;
|
489 |
-
#print('<pre>'); print_r($_POST); print('</pre>');
|
490 |
-
//if($exporttype=='post' || $exporttype=='page' || $exporttype=='custompost') {
|
491 |
-
if($exporttype == 'custompost') {
|
492 |
-
$exporttype = $_POST['export_post_type'];
|
493 |
-
}
|
494 |
-
$Header = $this->generateCSVHeaders($exporttype);
|
495 |
-
$result = $this->get_all_record_ids($exporttype, $request);
|
496 |
-
#print('<pre>'); print_r($Header); print_r($result); print('</pre>'); die;
|
497 |
-
$fieldsCount = count($result);
|
498 |
-
if ($result) {
|
499 |
-
foreach ($result as $postID) {
|
500 |
-
$pId = $pId . ',' . $postID;
|
501 |
-
$PostData[$postID] = $this->getPostDatas($postID);
|
502 |
-
#print('<pre>'); print_r($PostData); #die;
|
503 |
-
$result_query2 = $this->getPostMetaDatas($postID);
|
504 |
-
#print('<pre>'); print_r($result_query2); print('</pre>'); #die;
|
505 |
-
|
506 |
-
$possible_values = array('s:', 'a:', ':{');
|
507 |
-
if (!empty($result_query2)) {
|
508 |
-
foreach ($result_query2 as $postmeta) {
|
509 |
-
$typesFserialized = 0;
|
510 |
-
$isFound = explode('wpcf-',$postmeta->meta_key);
|
511 |
-
if(count($isFound) == 2){
|
512 |
-
foreach($wptypesfields as $typesKey => $typesVal){
|
513 |
-
if($postmeta->meta_key == 'wpcf-'.$typesKey){
|
514 |
-
foreach($possible_values as $posval){
|
515 |
-
if(strpos($postmeta->meta_value,$posval)){
|
516 |
-
$typesFserialized = 1;
|
517 |
-
} else {
|
518 |
-
$typesFserialized = 0;
|
519 |
-
}
|
520 |
-
}
|
521 |
-
if($typesFserialized == 1){
|
522 |
-
$getMetaData = get_post_meta($postID, $postmeta->meta_key);
|
523 |
-
if(!is_array($getMetaData[0])){
|
524 |
-
$get_all_values = unserialize($getMetaData[0]);
|
525 |
-
$get_values = $get_all_values[0];
|
526 |
-
} else {
|
527 |
-
$get_values = $getMetaData[0];
|
528 |
-
}
|
529 |
-
$typesFVal = null;
|
530 |
-
if($typesVal['type'] == 'checkboxes'){
|
531 |
-
foreach($get_values as $authorKey => $authorVal) {
|
532 |
-
foreach($typesVal['data']['options'] as $doKey => $doVal){
|
533 |
-
if($doKey == $authorKey)
|
534 |
-
$typesFVal .= $doVal['title'].',';
|
535 |
-
}
|
536 |
-
}
|
537 |
-
$typesFVal = substr($typesFVal, 0, -1);
|
538 |
-
} elseif($typesVal['type'] == 'skype') {
|
539 |
-
$typesFVal = $get_values['skypename'];
|
540 |
-
}
|
541 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $typesFVal;
|
542 |
-
} else {
|
543 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
|
544 |
-
}
|
545 |
-
}
|
546 |
-
}
|
547 |
-
} else {
|
548 |
-
// ACF checkbox fields
|
549 |
-
$acfserialized = 0;
|
550 |
-
if(array_key_exists($postmeta->meta_key, $this->getACFvalues())) {
|
551 |
-
foreach($possible_values as $posval){
|
552 |
-
if(strpos($postmeta->meta_value,$posval)){
|
553 |
-
$acfserialized = 1;
|
554 |
-
} else {
|
555 |
-
$acfserialized = 0;
|
556 |
-
}
|
557 |
-
}
|
558 |
-
if($acfserialized == 0) {
|
559 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
|
560 |
-
} else {
|
561 |
-
$acf_checkboxes = $this->getACFvalues('checkbox');
|
562 |
-
if(in_array($postmeta->meta_key, $acf_checkboxes)) {
|
563 |
-
$get_all_values = unserialize($postmeta->meta_value);
|
564 |
-
foreach($get_all_values as $optKey => $optVal) {
|
565 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] .= $optVal . ',';
|
566 |
-
}
|
567 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = substr($PostMetaData[$postmeta->post_id][$postmeta->meta_key], 0, -1);
|
568 |
-
}
|
569 |
-
}
|
570 |
-
}
|
571 |
-
// ACF checkbox fields ends here
|
572 |
-
// WooCommerce product meta datas
|
573 |
-
else if ($postmeta->meta_key == '_product_attributes') {
|
574 |
-
#print_r($postmeta->meta_value); #die;
|
575 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
576 |
-
$product_attribute_name = $product_attribute_value = $product_attribute_visible = $product_attribute_variation = '';
|
577 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_name'] = '';
|
578 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_value'] = '';
|
579 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_visible'] = '';
|
580 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_variation'] = '';
|
581 |
-
$eshop_products_unser1 = unserialize($postmeta->meta_value);
|
582 |
-
$check_attr_count1 = count($eshop_products_unser1);
|
583 |
-
if($check_attr_count1 == 1){
|
584 |
-
$eshop_products_unser2 = unserialize($eshop_products_unser1);
|
585 |
-
$check_attr_count2 = count($eshop_products_unser2);
|
586 |
-
}
|
587 |
-
if($check_attr_count1 < $check_attr_count2){
|
588 |
-
$unserialized_attributes = $eshop_products_unser2;
|
589 |
-
}else{
|
590 |
-
$unserialized_attributes = $eshop_products_unser1;
|
591 |
-
}
|
592 |
-
|
593 |
-
foreach ($unserialized_attributes as $key) {
|
594 |
-
foreach($key as $attr_header => $attr_value){
|
595 |
-
if($attr_header == 'name')
|
596 |
-
$product_attribute_name .= $attr_value.'|';
|
597 |
-
if($attr_header == 'value')
|
598 |
-
$product_attribute_value .= $attr_value.'|';
|
599 |
-
if($attr_header == 'is_visible')
|
600 |
-
$product_attribute_visible .= $attr_value.'|';
|
601 |
-
if($attr_header == 'is_variation'){
|
602 |
-
if(isset($attr_value))
|
603 |
-
$product_attribute_variation .= $attr_value.'|';
|
604 |
-
}
|
605 |
-
}
|
606 |
-
}
|
607 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_name'] = substr($product_attribute_name, 0, -1);
|
608 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_value'] = substr($product_attribute_value, 0, -1);
|
609 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_visible'] = substr($product_attribute_visible, 0, -1);
|
610 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_variation'] = substr($product_attribute_variation, 0, -1);
|
611 |
-
#print('<pre>'); print_r($PostMetaData); die;
|
612 |
-
}
|
613 |
-
else if ($postmeta->meta_key == '_upsell_ids') {
|
614 |
-
$upsellids = array();
|
615 |
-
$crosssellids = array();
|
616 |
-
#print('<pre>'); print('VALUE for _upsell_ids: '); print_r($postmeta->meta_value); #print_r($PostMetaData); print('</pre>'); #die;
|
617 |
-
if($postmeta->meta_value != '' && $postmeta->meta_value != null) {
|
618 |
-
$upsellids = unserialize($postmeta->meta_value);
|
619 |
-
if(is_array($upsellids)){
|
620 |
-
foreach($upsellids as $upsellID){
|
621 |
-
$upsell_ids .= $upsellID.',';
|
622 |
-
}
|
623 |
-
$PostMetaData[$postmeta->post_id]['_upsell_ids'] = substr($upsell_ids, 0, -1);
|
624 |
-
}else{
|
625 |
-
$PostMetaData[$postmeta->post_id]['_upsell_ids'] = '';
|
626 |
-
}
|
627 |
-
#print('<pre>'); print('VALUE for _upsell_ids: '); print_r($postmeta->meta_value); print_r($PostMetaData);
|
628 |
-
}
|
629 |
-
}
|
630 |
-
#print('<pre>'); print('VALUE for _upsell_ids: '); print_r($postmeta->meta_value); print_r($PostMetaData); print('</pre>'); #die;
|
631 |
-
else if ($postmeta->meta_key == '_crosssell_ids') {
|
632 |
-
if($postmeta->meta_value != '' && $postmeta->meta_value != null) {
|
633 |
-
$crosssellids = unserialize($postmeta->meta_value);
|
634 |
-
if(is_array($crosssellids)){
|
635 |
-
foreach($crosssellids as $crosssellID){
|
636 |
-
$crosssell_ids .= $crosssellID.',';
|
637 |
-
}
|
638 |
-
$PostMetaData[$postmeta->post_id]['_crosssell_ids'] = substr($crosssell_ids, 0, -1);
|
639 |
-
}else{
|
640 |
-
$PostMetaData[$postmeta->post_id]['_crosssell_ids'] = '';
|
641 |
-
}
|
642 |
-
}
|
643 |
-
}
|
644 |
-
else if ($postmeta->meta_key == '_downloadable_files') {
|
645 |
-
if($postmeta->meta_value != '' && $postmeta->meta_value != null) {
|
646 |
-
$downloadable_files = unserialize($postmeta->meta_value);
|
647 |
-
if(is_array($downloadable_files)){
|
648 |
-
foreach($downloadable_files as $dkey => $dval){
|
649 |
-
$downloadable_key = $dkey;
|
650 |
-
foreach($dval as $down_key => $down_val) {
|
651 |
-
$downloadable_value .= $down_val . ',';
|
652 |
-
}
|
653 |
-
}
|
654 |
-
$downloadable_all .= $downloadable_key . ',' . $downloadable_value;
|
655 |
-
$PostMetaData[$postmeta->post_id]['_downloadable_files'] = substr($downloadable_all ,0, -1);
|
656 |
-
}else{
|
657 |
-
$PostMetaData[$postmeta->post_id]['_downloadable_files'] = '';
|
658 |
-
}
|
659 |
-
}
|
660 |
-
}
|
661 |
-
else if ($postmeta->meta_key == '_thumbnail_id') {
|
662 |
-
$attachment_file = '';
|
663 |
-
$get_attachement = "select guid from $wpdb->posts where ID = $postmeta->meta_value AND post_type = 'attachment'";
|
664 |
-
$attachment = $wpdb->get_results($get_attachement);
|
665 |
-
$attachment_file = $attachment[0]->guid;
|
666 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
667 |
-
$postmeta->meta_key = 'featured_image';
|
668 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $attachment_file;
|
669 |
-
}
|
670 |
-
else if ($postmeta->meta_key == '_visibility') {
|
671 |
-
if($postmeta->meta_value == 'visible')
|
672 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 1;
|
673 |
-
if($postmeta->meta_value == 'catalog')
|
674 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 2;
|
675 |
-
if($postmeta->meta_value == 'search')
|
676 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 3;
|
677 |
-
if($postmeta->meta_value == 'hidden')
|
678 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 4;
|
679 |
-
}
|
680 |
-
else if ($postmeta->meta_key == '_stock_status') {
|
681 |
-
/*if($postmeta->meta_value == 'instock')
|
682 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 1;
|
683 |
-
if($postmeta->meta_value == 'outofstock')
|
684 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 2;*/
|
685 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
|
686 |
-
}
|
687 |
-
else if ($postmeta->meta_key == '_tax_status') {
|
688 |
-
if($postmeta->meta_value == 'taxable')
|
689 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 1;
|
690 |
-
if($postmeta->meta_value == 'shipping')
|
691 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 2;
|
692 |
-
if($postmeta->meta_value == 'none')
|
693 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 3;
|
694 |
-
}
|
695 |
-
else if ($postmeta->meta_key == '_tax_class') {
|
696 |
-
if($postmeta->meta_value == '')
|
697 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 1;
|
698 |
-
if($postmeta->meta_value == 'reduced-rate')
|
699 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 2;
|
700 |
-
if($postmeta->meta_value == 'zero-rate')
|
701 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 3;
|
702 |
-
}
|
703 |
-
else if ($postmeta->meta_key == '_backorders') {
|
704 |
-
if($postmeta->meta_value == 'no')
|
705 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 1;
|
706 |
-
if($postmeta->meta_value == 'notify')
|
707 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 2;
|
708 |
-
if($postmeta->meta_value == 'yes')
|
709 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 3;
|
710 |
-
}
|
711 |
-
else if ($postmeta->meta_key == '_featured') {
|
712 |
-
if($postmeta->meta_value == 'no')
|
713 |
-
$PostMetaData[$postmeta->post_id]['featured_product'] = 1;
|
714 |
-
if($postmeta->meta_value == 'yes')
|
715 |
-
$PostMetaData[$postmeta->post_id]['featured_product'] = 2;
|
716 |
-
if($postmeta->meta_value == 'zero-rate')
|
717 |
-
$PostMetaData[$postmeta->post_id]['featured_product'] = 3;
|
718 |
-
}
|
719 |
-
else if ($postmeta->meta_key == '_product_type') {
|
720 |
-
if($postmeta->meta_value == 'simple')
|
721 |
-
$PostMetaData[$postmeta->post_id]['product_type'] = 1;
|
722 |
-
if($postmeta->meta_value == 'grouped')
|
723 |
-
$PostMetaData[$postmeta->post_id]['product_type'] = 2;
|
724 |
-
if($postmeta->meta_value == 'variable')
|
725 |
-
$PostMetaData[$postmeta->post_id]['product_type'] = 4;
|
726 |
-
}
|
727 |
-
/* else if($postmeta->meta_key != '_eshop_product' && $postmeta->meta_key != '_thumbnail_id') {
|
728 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
|
729 |
-
} */
|
730 |
-
#$eshop_products = $postmeta->meta_value;
|
731 |
-
else if ($postmeta->meta_key == 'products') {
|
732 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
733 |
-
$eshop_products = unserialize($eshop_products);
|
734 |
-
foreach ($eshop_products as $key) {
|
735 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] .= $key['option'] . '|' . $key['price'] . '|' . $key['saleprice'] . ',';
|
736 |
-
}
|
737 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = substr($PostMetaData[$postmeta->post_id][$postmeta->meta_key], 0, -1);
|
738 |
-
} // WooCommerce product meta datas end here
|
739 |
-
// MarketPress product meta datas starts here
|
740 |
-
else if ($postmeta->meta_key == 'mp_var_name') {
|
741 |
-
$mp_variations = null;
|
742 |
-
$all_variations = unserialize($postmeta->meta_value);
|
743 |
-
foreach($all_variations as $variation_name) {
|
744 |
-
$mp_variations .= $variation_name . ',';
|
745 |
-
}
|
746 |
-
$mp_variations = substr($mp_variations, 0, -1);
|
747 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $mp_variations;
|
748 |
-
}
|
749 |
-
else if ($postmeta->meta_key == 'mp_sale_price') {
|
750 |
-
$mp_sale_prices = null;
|
751 |
-
$all_sale_prices = unserialize($postmeta->meta_value);
|
752 |
-
foreach($all_sale_prices as $mp_sale_price_value) {
|
753 |
-
$mp_sale_prices .= $mp_sale_price_value . ',';
|
754 |
-
}
|
755 |
-
$mp_sale_prices = substr($mp_sale_prices, 0, -1);
|
756 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $mp_sale_prices;
|
757 |
-
}
|
758 |
-
else if ($postmeta->meta_key == 'mp_price') {
|
759 |
-
$mp_prod_prices = null;
|
760 |
-
$all_mp_prod_prices = unserialize($postmeta->meta_value);
|
761 |
-
foreach($all_mp_prod_prices as $mp_prod_price_value) {
|
762 |
-
$mp_prod_prices .= $mp_prod_price_value . ',';
|
763 |
-
}
|
764 |
-
$mp_prod_prices = substr($mp_prod_prices, 0, -1);
|
765 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $mp_prod_prices;
|
766 |
-
}
|
767 |
-
else if ($postmeta->meta_key == 'mp_sku') {
|
768 |
-
$mp_sku = null;
|
769 |
-
$all_mp_prod_sku = unserialize($postmeta->meta_value);
|
770 |
-
foreach($all_mp_prod_sku as $mp_prod_sku) {
|
771 |
-
$mp_sku .= $mp_prod_sku. ',';
|
772 |
-
}
|
773 |
-
$mp_sku = substr($mp_sku, 0, -1);
|
774 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $mp_sku;
|
775 |
-
}
|
776 |
-
else if ($postmeta->meta_key == 'mp_shipping') {
|
777 |
-
$mp_prod_shipping_value = unserialize($postmeta->meta_value);
|
778 |
-
$mp_shipping_value = $mp_prod_shipping_value['extra_cost'];
|
779 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $mp_shipping_value;
|
780 |
-
}
|
781 |
-
else if ($postmeta->meta_key == 'mp_inventory') {
|
782 |
-
$mp_inventory_value = null;
|
783 |
-
$mp_prod_inventory_values = unserialize($postmeta->meta_value);
|
784 |
-
foreach($mp_prod_inventory_values as $inventory_values) {
|
785 |
-
$mp_inventory_value .= $inventory_values. ',';
|
786 |
-
}
|
787 |
-
$mp_inventory_value = substr($mp_inventory_value, 0, -1);
|
788 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $mp_inventory_value;
|
789 |
-
} // MarketPress product meta datas ends here
|
790 |
-
// WP e-Commerce product meta datas starts here
|
791 |
-
else if ($postmeta->meta_key == '_wpsc_product_metadata') {
|
792 |
-
$wpecomm_product_metadata = unserialize($postmeta->meta_value);
|
793 |
-
#print('<pre>'); print_r($wpecomm_product_metadata); die;
|
794 |
-
foreach($wpecomm_product_metadata as $prod_md_key => $prod_md_val) {
|
795 |
-
if($prod_md_key == 'dimensions') { #die('summa');
|
796 |
-
foreach($prod_md_val as $prod_dimen_key => $prod_dimen_val) {
|
797 |
-
$PostMetaData[$postmeta->post_id][$prod_dimen_key] = $prod_dimen_val;
|
798 |
-
}
|
799 |
-
}
|
800 |
-
else if($prod_md_key == 'shipping') {
|
801 |
-
$shipping = null;
|
802 |
-
foreach($prod_md_val as $prod_ship_key => $prod_ship_val) {
|
803 |
-
$shipping .= $prod_ship_val . ',';
|
804 |
-
}
|
805 |
-
$shipping = substr($shipping, 0, -1);
|
806 |
-
$PostMetaData[$postmeta->post_id][$prod_md_key] = $shipping;
|
807 |
-
}
|
808 |
-
else if($prod_md_key == 'table_rate_price') {
|
809 |
-
foreach($prod_md_val as $table_rate_key => $table_rate_val) {
|
810 |
-
if($table_rate_key == 'quantity') {
|
811 |
-
$trq_val = null;
|
812 |
-
foreach($table_rate_val as $trq) {
|
813 |
-
$trq_val .= $trq . '|';
|
814 |
-
}
|
815 |
-
$trq_val = substr($trq_val, 0, -1);
|
816 |
-
$PostMetaData[$postmeta->post_id][$table_rate_key] = $trq_val;
|
817 |
-
} else if($table_rate_key == 'table_price') {
|
818 |
-
$tbl_price_amt = null;
|
819 |
-
foreach($table_rate_val as $tbl_price) {
|
820 |
-
$tbl_price_amt .= $tbl_price . '|';
|
821 |
-
}
|
822 |
-
$tbl_price_amt = substr($tbl_price_amt, 0, -1);
|
823 |
-
$PostMetaData[$postmeta->post_id][$table_rate_key] = $tbl_price_amt;
|
824 |
-
} else {
|
825 |
-
$PostMetaData[$postmeta->post_id][$table_rate_key] = $table_rate_val;
|
826 |
-
}
|
827 |
-
}
|
828 |
-
}
|
829 |
-
else {
|
830 |
-
$PostMetaData[$postmeta->post_id][$prod_md_key] = $prod_md_val;
|
831 |
-
}
|
832 |
-
}
|
833 |
-
}
|
834 |
-
// Wp e-Commerce product meta datas ends here
|
835 |
-
// Eshop product meta datas starts here
|
836 |
-
else if ($postmeta->meta_key == 'featured') {
|
837 |
-
$isFeatured = strtolower($postmeta->meta_value);
|
838 |
-
$PostMetaData[$postmeta->post_id]['featured_product'] = $isFeatured;
|
839 |
-
}
|
840 |
-
else if ($postmeta->meta_key == 'sale') {
|
841 |
-
$is_prod_sale = strtolower($postmeta->meta_value);
|
842 |
-
$PostMetaData[$postmeta->post_id]['product_in_sale'] = $is_prod_sale;
|
843 |
-
}
|
844 |
-
else if ($postmeta->meta_key == '_eshop_stock') {
|
845 |
-
if($postmeta->meta_value == 1) {
|
846 |
-
$stock_available = 'yes';
|
847 |
-
} else {
|
848 |
-
$stock_available = 'no';
|
849 |
-
}
|
850 |
-
$PostMetaData[$postmeta->post_id]['stock_available'] = $stock_available;
|
851 |
-
}
|
852 |
-
else if ($postmeta->meta_key == 'cart_radio') {
|
853 |
-
$PostMetaData[$postmeta->post_id]['cart_option'] = $postmeta->meta_value;
|
854 |
-
}
|
855 |
-
else if ($postmeta->meta_key == 'shiprate') {
|
856 |
-
$PostMetaData[$postmeta->post_id]['shiprate'] = $postmeta->meta_value;
|
857 |
-
}
|
858 |
-
else if ($postmeta->meta_key == '_eshop_product') {
|
859 |
-
$product_attr_details = unserialize($postmeta->meta_value);
|
860 |
-
$prod_option = $sale_price = $reg_price = null;
|
861 |
-
#print('<pre>');print_r($product_attr_details); #die;
|
862 |
-
foreach($product_attr_details as $prod_att_det_Key => $prod_att_det_Val) {
|
863 |
-
if($prod_att_det_Key == 'sku') {
|
864 |
-
$PostMetaData[$postmeta->post_id]['sku'] = $prod_att_det_Val;
|
865 |
-
}
|
866 |
-
else if($prod_att_det_Key == 'products') {
|
867 |
-
foreach($prod_att_det_Val as $all_prod_options) {
|
868 |
-
$prod_option .= $all_prod_options['option'] . ',';
|
869 |
-
$sale_price .= $all_prod_options['saleprice'] . ',';
|
870 |
-
$reg_price .= $all_prod_options['price'] . ',';
|
871 |
-
}
|
872 |
-
$prod_option = substr($prod_option, 0, -1);
|
873 |
-
$sale_price = substr($sale_price, 0, -1);
|
874 |
-
$reg_price = substr($reg_price, 0, -1);
|
875 |
-
$PostMetaData[$postmeta->post_id]['products_option'] = $prod_option;
|
876 |
-
$PostMetaData[$postmeta->post_id]['sale_price'] = $sale_price;
|
877 |
-
$PostMetaData[$postmeta->post_id]['regular_price'] = $reg_price;
|
878 |
-
}
|
879 |
-
}
|
880 |
-
#$PostMetaData[$postmeta->post_id]['cart_option'] = $postmeta->meta_value;
|
881 |
-
}
|
882 |
-
// Eshop product meta datas ends here
|
883 |
-
else if ($postmeta->meta_key == '_thumbnail_id') {
|
884 |
-
$attachment_file = '';
|
885 |
-
$get_attachement = "select guid from $wpdb->posts where ID = $postmeta->meta_value AND post_type = 'attachment'";
|
886 |
-
$attachment = $wpdb->get_results($get_attachement);
|
887 |
-
$attachment_file = $attachment[0]->guid;
|
888 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
889 |
-
$postmeta->meta_key = 'featured_image';
|
890 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $attachment_file;
|
891 |
-
}
|
892 |
-
else if(is_array($checkbox_option_fields) && in_array($postmeta->meta_key,$checkbox_option_fields)){
|
893 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
894 |
-
$eshop_products = unserialize($eshop_products); //print_r($eshop_products);
|
895 |
-
foreach ($eshop_products as $key) {
|
896 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] .= $key . ',';
|
897 |
-
}
|
898 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = substr($PostMetaData[$postmeta->post_id][$postmeta->meta_key], 0, -1);
|
899 |
-
}
|
900 |
-
else {
|
901 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
|
902 |
-
}
|
903 |
-
}
|
904 |
-
}
|
905 |
-
}
|
906 |
-
# print('PostMetaData: '); print('<pre>'); print_r($Header); print_r($PostMetaData); #die;
|
907 |
-
$TermsData[$postID] = $this->getAllTerms($postID,$exporttype);
|
908 |
-
/*
|
909 |
-
// Tags & Categories
|
910 |
-
$get_tags = wp_get_post_tags($postID, array('fields' => 'names'));
|
911 |
-
$postTags = $postCategory = '';
|
912 |
-
foreach ($get_tags as $tags) {
|
913 |
-
$postTags .= $tags . ',';
|
914 |
-
}
|
915 |
-
$postTags = substr($postTags, 0, -1);
|
916 |
-
$TermsData[$postID]['post_tag'] = $postTags;
|
917 |
-
$get_categotries = wp_get_post_categories($postID, array('fields' => 'names'));
|
918 |
-
foreach ($get_categotries as $category) {
|
919 |
-
$postCategory .= $category . '|';
|
920 |
-
}
|
921 |
-
$postCategory = substr($postCategory, 0, -1);
|
922 |
-
$TermsData[$postID]['post_category'] = $postCategory;
|
923 |
-
*/
|
924 |
-
}
|
925 |
-
|
926 |
-
#$ExportData = array();
|
927 |
-
// Merge all arrays
|
928 |
-
#echo '<pre>'; print_r($TermsData); die;
|
929 |
-
// echo '<pre>'; print_r($PostData); die('sds');
|
930 |
-
foreach ($PostData as $pd_key => $pd_val) {
|
931 |
-
if (array_key_exists($pd_key, $PostMetaData)) {
|
932 |
-
$ExportData[$pd_key] = array_merge($PostData[$pd_key], $PostMetaData[$pd_key]);
|
933 |
-
// echo '<pre>'; print_r($ExportData); die('exist');
|
934 |
-
} else {
|
935 |
-
$ExportData[$pd_key] = $PostData[$pd_key];
|
936 |
-
}
|
937 |
-
if (array_key_exists($pd_key, $TermsData)) {
|
938 |
-
if (empty($ExportData[$pd_key]))
|
939 |
-
$ExportData[$pd_key] = array();
|
940 |
-
$ExportData[$pd_key] = array_merge($ExportData[$pd_key], $TermsData[$pd_key]);
|
941 |
-
}
|
942 |
-
}
|
943 |
-
}
|
944 |
-
#print('<pre>'); print_r($Header); die;
|
945 |
-
#print('<pre>'); print_r($ExportData); die;
|
946 |
-
if($exporttype == 'woocommerce') {
|
947 |
-
foreach($Header as $hkey) {
|
948 |
-
foreach($ExportData as $edkey => $edval) {
|
949 |
-
/*if(array_key_exists($hkey, $this->getACFvalues())) {
|
950 |
-
$ExportData[$edkey][$hkey] = $edval[$hkey];
|
951 |
-
unset($ExportData[$edkey]['_'.$hkey]);
|
952 |
-
}
|
953 |
-
else if(in_array($hkey, $this->getAIOSEOfields())) {
|
954 |
-
foreach($this->getAIOSEOfields() as $aioseokey => $aioseoval) {
|
955 |
-
$ExportData[$edkey][$aioseoval] = $edval[$aioseokey];
|
956 |
-
unset($ExportData[$edkey][$hkey]);
|
957 |
-
}
|
958 |
-
}
|
959 |
-
else if(array_key_exists('_'.$hkey, $edval)) {
|
960 |
-
$ExportData[$edkey][$hkey] = $edval['_'.$hkey];
|
961 |
-
unset($ExportData[$edkey]['_'.$hkey]);
|
962 |
-
} */
|
963 |
-
foreach($this->WoocommerceMetaHeaders() as $woohkey => $woohval) {
|
964 |
-
if(array_key_exists($woohval, $ExportData[$edkey])) {
|
965 |
-
$ExportData[$edkey][$woohkey] = $edval[$woohval];
|
966 |
-
unset($ExportData[$edkey][$woohval]);
|
967 |
-
}
|
968 |
-
}
|
969 |
-
}
|
970 |
-
}
|
971 |
-
}
|
972 |
-
# MarketPressHeaders
|
973 |
-
if($exporttype == 'marketpress') {
|
974 |
-
foreach($Header as $hkey) {
|
975 |
-
foreach($ExportData as $edkey => $edval) {
|
976 |
-
foreach($this->MarketPressHeaders() as $mphkey => $mphval) {
|
977 |
-
if(array_key_exists($mphval, $ExportData[$edkey])) {
|
978 |
-
$ExportData[$edkey][$mphkey] = $edval[$mphval];
|
979 |
-
// unset($ExportData[$edkey][$mphval]);
|
980 |
-
}
|
981 |
-
}
|
982 |
-
}
|
983 |
-
}
|
984 |
-
}
|
985 |
-
if($exporttype == 'wpcommerce') {
|
986 |
-
foreach($Header as $hkey) {
|
987 |
-
foreach($ExportData as $edkey => $edval) {
|
988 |
-
foreach($this->WpeCommerceHeaders() as $wpcomhkey => $wpcomhval) {
|
989 |
-
if(array_key_exists($wpcomhval, $ExportData[$edkey])) {
|
990 |
-
$ExportData[$edkey][$wpcomhkey] = $edval[$wpcomhval];
|
991 |
-
// unset($ExportData[$edkey][$wpcomhval]);
|
992 |
-
}
|
993 |
-
}
|
994 |
-
}
|
995 |
-
}
|
996 |
-
}
|
997 |
-
if($exporttype == 'eshop') {
|
998 |
-
foreach($Header as $hkey) {
|
999 |
-
foreach($ExportData as $edkey => $edval) {
|
1000 |
-
foreach($this->EshopHeaders() as $eshophkey => $eshophval) {
|
1001 |
-
if(array_key_exists($eshophval, $ExportData[$edkey])) {
|
1002 |
-
$ExportData[$edkey][$eshophkey] = $edval[$eshophval];
|
1003 |
-
// unset($ExportData[$edkey][$wpcomhval]);
|
1004 |
-
}
|
1005 |
-
}
|
1006 |
-
}
|
1007 |
-
}
|
1008 |
-
}
|
1009 |
-
#print('<pre>'); print_r($Header); print('</pre>'); #die;
|
1010 |
-
# print('<pre>'); print_r($ExportData); die;
|
1011 |
-
foreach ($Header as $header_key) {
|
1012 |
-
if (is_array($ExportData)) {
|
1013 |
-
foreach ($ExportData as $ED_key => $ED_val) {
|
1014 |
-
if (in_array($header_key, $this->getAIOSEOfields())) { #die($header_key);
|
1015 |
-
foreach($this->getAIOSEOfields() as $aioseokey => $aioseoval) {
|
1016 |
-
$CSVContent[$ED_key][$aioseoval] = $ED_val[$aioseokey];
|
1017 |
-
#unset($CSVContent[$ED_key][$header_key]);
|
1018 |
-
}
|
1019 |
-
} else if (in_array($header_key, $this->getYoastSEOfields())) {
|
1020 |
-
foreach($this->getYoastSEOfields() as $yoastseokey => $yoastseoval) {
|
1021 |
-
$CSVContent[$ED_key][$yoastseoval] = $ED_val[$yoastseokey];
|
1022 |
-
#unset($CSVContent[$ED_key][$header_key]);
|
1023 |
-
}
|
1024 |
-
} else if (in_array($header_key, $this->getTypesFields())) {
|
1025 |
-
foreach($this->getTypesFields() as $typesFkey => $typesFval) {
|
1026 |
-
$CSVContent[$ED_key][$typesFval] = $ED_val[$typesFkey];
|
1027 |
-
#unset($CSVContent[$ED_key][$header_key]);
|
1028 |
-
}
|
1029 |
-
} else if (array_key_exists($header_key, $ED_val)) {
|
1030 |
-
$CSVContent[$ED_key][$header_key] = $ED_val[$header_key];
|
1031 |
-
} else {
|
1032 |
-
$CSVContent[$ED_key][$header_key] = null;
|
1033 |
-
}
|
1034 |
-
}
|
1035 |
-
}
|
1036 |
-
}
|
1037 |
-
#print(count($CSVContent[22]));print('<br>' . count($Header));
|
1038 |
-
#print('<pre>'); print_r($CSVContent) ;print('</pre>'); die;
|
1039 |
-
$csv = new WPImpCSVParserLib();
|
1040 |
-
$csv->output ($csv_file_name, $CSVContent, $Header, $export_delimiter);
|
1041 |
-
}
|
1042 |
-
|
1043 |
-
/**
|
1044 |
-
*
|
1045 |
-
*/
|
1046 |
-
public function WPImpExportCategories($request) {
|
1047 |
-
global $wpdb;
|
1048 |
-
$export_delimiter = ',';
|
1049 |
-
$exporttype = $request['export'];
|
1050 |
-
$wpcsvsettings=get_option('wpcsvprosettings');
|
1051 |
-
if(isset($wpcsvsettings['export_delimiter'])){
|
1052 |
-
$export_delimiter = $wpcsvsettings['export_delimiter'];
|
1053 |
-
}
|
1054 |
-
if($_POST['export_filename'])
|
1055 |
-
$csv_file_name =$_POST['export_filename'].'.csv';
|
1056 |
-
else
|
1057 |
-
$csv_file_name='exportas_'.date("Y").'-'.date("m").'-'.date("d").'.csv';
|
1058 |
-
|
1059 |
-
$Header[] = 'name';
|
1060 |
-
$Header[] = 'slug';
|
1061 |
-
$Header[] = 'description';
|
1062 |
-
$get_all_categories = get_categories('hide_empty=0');
|
1063 |
-
$fieldsCount = count($get_all_categories);
|
1064 |
-
foreach( $get_all_categories as $cateKey => $cateValue ) {
|
1065 |
-
$categID = $cateValue->term_id;
|
1066 |
-
$categName = $cateValue->cat_name;
|
1067 |
-
$categSlug = $cateValue->slug;
|
1068 |
-
$categDesc = $cateValue->category_description;
|
1069 |
-
$categParent = $cateValue->parent;
|
1070 |
-
if($categParent == 0) {
|
1071 |
-
$TERM_DATA[$categID]['name'] = $categName;
|
1072 |
-
} else {
|
1073 |
-
$categParentName = get_cat_name( $categParent );
|
1074 |
-
$TERM_DATA[$categID]['name'] = $categParentName . '|' . $categName;
|
1075 |
-
}
|
1076 |
-
$TERM_DATA[$categID]['slug'] = $categSlug;
|
1077 |
-
$TERM_DATA[$categID]['description'] = $categDesc;
|
1078 |
-
}
|
1079 |
-
$csv = new WPImpCSVParserLib();
|
1080 |
-
$csv->output ($csv_file_name, $TERM_DATA, $Header, $export_delimiter);
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
/**
|
1084 |
-
*
|
1085 |
-
*/
|
1086 |
-
public function WPImpExportTags($request) {
|
1087 |
-
global $wpdb;
|
1088 |
-
$export_delimiter = ',';
|
1089 |
-
$exporttype = $request['export'];
|
1090 |
-
$wpcsvsettings=get_option('wpcsvprosettings');
|
1091 |
-
if(isset($wpcsvsettings['export_delimiter'])){
|
1092 |
-
$export_delimiter = $wpcsvsettings['export_delimiter'];
|
1093 |
-
}
|
1094 |
-
if($_POST['export_filename'])
|
1095 |
-
$csv_file_name =$_POST['export_filename'].'.csv';
|
1096 |
-
else
|
1097 |
-
$csv_file_name='exportas_'.date("Y").'-'.date("m").'-'.date("d").'.csv';
|
1098 |
-
|
1099 |
-
$Header[] = 'name';
|
1100 |
-
$Header[] = 'slug';
|
1101 |
-
$Header[] = 'description';
|
1102 |
-
$get_all_tags = get_tags('hide_empty=0');
|
1103 |
-
$fieldsCount = count($get_all_tags);
|
1104 |
-
foreach( $get_all_tags as $tagKey => $tagValue ) {
|
1105 |
-
$tagID = $tagValue->term_id;
|
1106 |
-
$tagName = $tagValue->name;
|
1107 |
-
$tagSlug = $tagValue->slug;
|
1108 |
-
$tagDesc = $tagValue->description;
|
1109 |
-
$TERM_DATA[$tagID]['name'] = $tagName;
|
1110 |
-
$TERM_DATA[$tagID]['slug'] = $tagSlug;
|
1111 |
-
$TERM_DATA[$tagID]['description'] = $tagDesc;
|
1112 |
-
}
|
1113 |
-
$csv = new WPImpCSVParserLib();
|
1114 |
-
$csv->output ($csv_file_name, $TERM_DATA, $Header, $export_delimiter);
|
1115 |
-
}
|
1116 |
-
|
1117 |
-
/**
|
1118 |
-
*
|
1119 |
-
*/
|
1120 |
-
public function WPImpExportTaxonomies($request) {
|
1121 |
-
global $wpdb;
|
1122 |
-
$export_delimiter = ',';
|
1123 |
-
$exporttype = $request['export'];
|
1124 |
-
$wpcsvsettings=get_option('wpcsvprosettings');
|
1125 |
-
if(isset($wpcsvsettings['export_delimiter'])){
|
1126 |
-
$export_delimiter = $wpcsvsettings['export_delimiter'];
|
1127 |
-
}
|
1128 |
-
if($_POST['export_filename'])
|
1129 |
-
$csv_file_name =$_POST['export_filename'].'.csv';
|
1130 |
-
else
|
1131 |
-
$csv_file_name='exportas_'.date("Y").'-'.date("m").'-'.date("d").'.csv';
|
1132 |
-
|
1133 |
-
$taxonomy_name = $_POST['export_taxo_type'];
|
1134 |
-
$taxonomies = get_terms( $taxonomy_name, 'orderby=count&hide_empty=0' );
|
1135 |
-
$Header[] = 'name';
|
1136 |
-
$Header[] = 'slug';
|
1137 |
-
$Header[] = 'description';
|
1138 |
-
$fieldsCount = count($taxonomies);
|
1139 |
-
foreach( $taxonomies as $taxoKey => $taxoValue ) {
|
1140 |
-
$taxoID = $taxoValue->term_id;
|
1141 |
-
$taxoName = $taxoValue->name;
|
1142 |
-
$taxoSlug = $taxoValue->slug;
|
1143 |
-
$taxoDesc = $taxoValue->description;
|
1144 |
-
$taxoParent = $taxoValue->parent;
|
1145 |
-
if($taxoParent == 0) {
|
1146 |
-
$TERM_DATA[$taxoID]['name'] = $taxoName;
|
1147 |
-
} else {
|
1148 |
-
$taxoParentName = get_term( $taxoParent, $taxonomy_name );
|
1149 |
-
$TERM_DATA[$taxoID]['name'] = $taxoParentName->name . '|' . $taxoName;
|
1150 |
-
}
|
1151 |
-
$TERM_DATA[$taxoID]['slug'] = $taxoSlug;
|
1152 |
-
$TERM_DATA[$taxoID]['description'] = $taxoDesc;
|
1153 |
-
}
|
1154 |
-
$csv = new WPImpCSVParserLib();
|
1155 |
-
$csv->output ($csv_file_name, $TERM_DATA, $Header, $export_delimiter);
|
1156 |
-
}
|
1157 |
-
|
1158 |
-
/**
|
1159 |
-
*
|
1160 |
-
*/
|
1161 |
-
public function WPImpExportCustomerReviews($request) {
|
1162 |
-
global $wpdb;
|
1163 |
-
$export_delimiter = ',';
|
1164 |
-
$exporttype = $request['export'];
|
1165 |
-
$wpcsvsettings=get_option('wpcsvprosettings');
|
1166 |
-
if(isset($wpcsvsettings['export_delimiter'])){
|
1167 |
-
$export_delimiter = $wpcsvsettings['export_delimiter'];
|
1168 |
-
}
|
1169 |
-
if($_POST['export_filename'])
|
1170 |
-
$csv_file_name =$_POST['export_filename'].'.csv';
|
1171 |
-
else
|
1172 |
-
$csv_file_name='exportas_'.date("Y").'-'.date("m").'-'.date("d").'.csv';
|
1173 |
-
|
1174 |
-
$header_query1 = "SELECT * FROM wp_wpcreviews";
|
1175 |
-
$header_query2 = "SELECT id FROM wp_wpcreviews";
|
1176 |
-
|
1177 |
-
$result_header_query1 = $wpdb->get_results($header_query1);
|
1178 |
-
foreach($result_header_query1 as $rhq1_key){
|
1179 |
-
foreach($rhq1_key as $rhq1_headkey => $rhq1_headval){
|
1180 |
-
if(!in_array($rhq1_headkey,$Header))
|
1181 |
-
$Header[] = $rhq1_headkey;
|
1182 |
-
}
|
1183 |
-
}
|
1184 |
-
|
1185 |
-
$result = $wpdb->get_results($header_query1);
|
1186 |
-
$result1 = $wpdb->get_results($header_query2);
|
1187 |
-
$fieldsCount = count($result);
|
1188 |
-
if ($result) {
|
1189 |
-
$i =0;
|
1190 |
-
foreach ($result as $postID) {
|
1191 |
-
foreach ($postID as $Key => $Val){
|
1192 |
-
$postData[$i][$Key] = $Val;
|
1193 |
-
}
|
1194 |
-
$i++;
|
1195 |
-
}
|
1196 |
-
$ExportData = $postData;
|
1197 |
-
$j=0;
|
1198 |
-
foreach($Header as $key)
|
1199 |
-
{
|
1200 |
-
$key=$j;
|
1201 |
-
$header[] = $key;
|
1202 |
-
$j++;
|
1203 |
-
}
|
1204 |
-
|
1205 |
-
$csv = new WPImpCSVParserLib();
|
1206 |
-
$csv->output ($csv_file_name, $ExportData, $Header, $export_delimiter);
|
1207 |
-
}
|
1208 |
-
}
|
1209 |
-
|
1210 |
-
/**
|
1211 |
-
*
|
1212 |
-
*/
|
1213 |
-
public function WPImpExportComments($request) {
|
1214 |
-
global $wpdb;
|
1215 |
-
$export_delimiter = ',';
|
1216 |
-
$exporttype = $request['export'];
|
1217 |
-
$wpcsvsettings=get_option('wpcsvprosettings');
|
1218 |
-
if(isset($wpcsvsettings['export_delimiter'])){
|
1219 |
-
$export_delimiter = $wpcsvsettings['export_delimiter'];
|
1220 |
-
}
|
1221 |
-
if($_POST['export_filename'])
|
1222 |
-
$csv_file_name =$_POST['export_filename'].'.csv';
|
1223 |
-
else
|
1224 |
-
$csv_file_name='exportas_'.date("Y").'-'.date("m").'-'.date("d").'.csv';
|
1225 |
-
|
1226 |
-
$commentQuery = "SELECT * FROM $wpdb->comments " . $orderBy;
|
1227 |
-
$comments = $wpdb->get_results( $commentQuery);
|
1228 |
-
$mappedHeader = false;
|
1229 |
-
$i = 0;
|
1230 |
-
foreach($comments as $comment){
|
1231 |
-
foreach($comment as $key => $value){
|
1232 |
-
if(!$mappedHeader){
|
1233 |
-
$Header[] = $key; // ."$export_delimiter";
|
1234 |
-
}
|
1235 |
-
$ExportData[$i][$key] = $value; //'"'.$value.'"'."$export_delimiter";
|
1236 |
-
}
|
1237 |
-
$mappedHeader = true;
|
1238 |
-
$i++;
|
1239 |
-
}
|
1240 |
-
#print('<pre>'); print_r($header); print_r($singleCommentContent);die;
|
1241 |
-
$csv = new WPImpCSVParserLib();
|
1242 |
-
$csv->output ($csv_file_name, $ExportData, $Header, $export_delimiter);
|
1243 |
-
}
|
1244 |
-
|
1245 |
-
/**
|
1246 |
-
*
|
1247 |
-
*/
|
1248 |
-
public function WPImpExportUsers($request) {
|
1249 |
-
global $wpdb;
|
1250 |
-
$export_delimiter = ',';
|
1251 |
-
$exporttype = $request['export'];
|
1252 |
-
$wpcsvsettings=get_option('wpcsvprosettings');
|
1253 |
-
if(isset($wpcsvsettings['export_delimiter'])){
|
1254 |
-
$export_delimiter = $wpcsvsettings['export_delimiter'];
|
1255 |
-
}
|
1256 |
-
if($_POST['export_filename'])
|
1257 |
-
$csv_file_name =$_POST['export_filename'].'.csv';
|
1258 |
-
else
|
1259 |
-
$csv_file_name='exportas_'.date("Y").'-'.date("m").'-'.date("d").'.csv';
|
1260 |
-
|
1261 |
-
$uId = '';
|
1262 |
-
$header_query1 = "SELECT *FROM $wpdb->users";
|
1263 |
-
$header_query2 = "SELECT user_id, meta_key, meta_value FROM $wpdb->users wp JOIN $wpdb->usermeta wpm ON wpm.user_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last')";
|
1264 |
-
$result_header_query1 = $wpdb->get_results($header_query1);
|
1265 |
-
$result_header_query2 = $wpdb->get_results($header_query2);
|
1266 |
-
/* print('<pre>'); print_r($result_header_query1);
|
1267 |
-
print_r($result_header_query2);die; */
|
1268 |
-
foreach ($result_header_query1 as $rhq1_key) {
|
1269 |
-
foreach ($rhq1_key as $rhq1_headkey => $rhq1_headval) {
|
1270 |
-
if (!in_array($rhq1_headkey, $Header))
|
1271 |
-
$Header[] = $rhq1_headkey;
|
1272 |
-
}
|
1273 |
-
}
|
1274 |
-
foreach ($result_header_query2 as $rhq2_headkey) {
|
1275 |
-
if (!in_array($rhq2_headkey->meta_key, $Header)) {
|
1276 |
-
if($rhq2_headkey->meta_key == 'mp_shipping_info' )
|
1277 |
-
{
|
1278 |
-
$mp_ship_header= unserialize($rhq2_headkey->meta_value);
|
1279 |
-
foreach($mp_ship_header as $mp_ship_key => $mp_value) { $Header[] = "msi: ".$mp_ship_key; }
|
1280 |
-
}
|
1281 |
-
if($rhq2_headkey->meta_key == 'mp_billing_info' )
|
1282 |
-
{
|
1283 |
-
$mp_ship_header= unserialize($rhq2_headkey->meta_value);
|
1284 |
-
foreach($mp_ship_header as $mp_ship_key => $mp_value) { $Header[] = "mbi: ".$mp_ship_key; }
|
1285 |
-
}
|
1286 |
-
|
1287 |
-
if ($rhq2_headkey->meta_key != '_eshop_product' && $rhq2_headkey->meta_key != '_wp_attached_file' && $rhq2_headkey->meta_key != 'mp_shipping_info' && $rhq2_headkey->meta_key != 'mp_billing_info' )
|
1288 |
-
$Header[] = $rhq2_headkey->meta_key;
|
1289 |
-
}
|
1290 |
-
}
|
1291 |
-
#echo '<pre>'; print_r($Header); die('dsd');
|
1292 |
-
$get_user_ids = "select DISTINCT ID from $wpdb->users u join $wpdb->usermeta um on um.user_id = u.ID";
|
1293 |
-
|
1294 |
-
$result = $wpdb->get_col($get_user_ids);
|
1295 |
-
$fieldsCount = count($result);
|
1296 |
-
if ($result) {
|
1297 |
-
foreach ($result as $userID) {
|
1298 |
-
$uId = $uId . ',' . $userID;
|
1299 |
-
$query1 = "SELECT *FROM $wpdb->users where ID in ($userID);";
|
1300 |
-
$result_query1 = $wpdb->get_results($query1);
|
1301 |
-
if (!empty($result_query1)) {
|
1302 |
-
foreach ($result_query1 as $users) {
|
1303 |
-
foreach ($users as $user_key => $user_value) {
|
1304 |
-
$UserData[$userID][$user_key] = $user_value;
|
1305 |
-
}
|
1306 |
-
}
|
1307 |
-
}
|
1308 |
-
// echo '<pre>'; print_r($UserData); die ('dfdf');
|
1309 |
-
$query2 = "SELECT user_id, meta_key, meta_value FROM $wpdb->users wp JOIN $wpdb->usermeta wpm ON wpm.user_id = wp.ID where ID=$userID";
|
1310 |
-
$possible_values = array('s:', 'a:', ':{');
|
1311 |
-
$result_query2 = $wpdb->get_results($query2);
|
1312 |
-
if (!empty($result_query2)) {
|
1313 |
-
foreach ($result_query2 as $usermeta) {
|
1314 |
-
// echo '<pre>'; print_r($usermeta);
|
1315 |
-
|
1316 |
-
foreach($possible_values as $posval){
|
1317 |
-
if(strpos($usermeta->meta_value,$posval)){
|
1318 |
-
if($usermeta->meta_key == 'mp_shipping_info' || $usermeta->meta_key == 'mp_billing_info')
|
1319 |
-
$typesFserialized = 1;
|
1320 |
-
} else {
|
1321 |
-
$typesFserialized = 0;
|
1322 |
-
}
|
1323 |
-
}
|
1324 |
-
if($typesFserialized == 1)
|
1325 |
-
{
|
1326 |
-
if($usermeta->meta_key == 'mp_shipping_info')
|
1327 |
-
{
|
1328 |
-
$UserID = $usermeta->user_id;
|
1329 |
-
$mp_ship_data = unserialize($usermeta->meta_value);
|
1330 |
-
foreach($mp_ship_data as $mp_ship_key => $mp_ship_value)
|
1331 |
-
{
|
1332 |
-
$mp_ship_tempkey = "msi: ".$mp_ship_key;
|
1333 |
-
$UserData[$UserID][$mp_ship_tempkey]= $mp_ship_value;
|
1334 |
-
}
|
1335 |
-
}
|
1336 |
-
|
1337 |
-
if($usermeta->meta_key == 'mp_billing_info')
|
1338 |
-
{
|
1339 |
-
$UserID = $usermeta->user_id;
|
1340 |
-
$mp_ship_data = unserialize($usermeta->meta_value);
|
1341 |
-
foreach($mp_ship_data as $mp_ship_key => $mp_ship_value)
|
1342 |
-
{
|
1343 |
-
$mp_ship_tempkey = "mbi: ".$mp_ship_key;
|
1344 |
-
$UserData[$UserID][$mp_ship_tempkey]= $mp_ship_value;
|
1345 |
-
}
|
1346 |
-
}
|
1347 |
-
|
1348 |
-
if($usermeta->meta_key != 'wp_capabilities' && $usermeta->meta_key !='mp_shipping_info' && $usermeta->meta_key != 'mp_billing_info') {
|
1349 |
-
$UserData[$userID][$usermeta->meta_key] = $usermeta->meta_value;
|
1350 |
-
} else {
|
1351 |
-
if($usermeta->meta_key == 'wp_capabilities') {
|
1352 |
-
$getUserRole = unserialize($usermeta->meta_value);
|
1353 |
-
// echo '<pre>'; print_r($getUserRole); die('ddf');
|
1354 |
-
foreach($getUserRole as $urKey => $urVal) {
|
1355 |
-
$getUserRole = get_role($urKey);
|
1356 |
-
}
|
1357 |
-
$rolelevel = 0;
|
1358 |
-
$isfound = array();
|
1359 |
-
foreach($getUserRole->capabilities as $roleKey => $roleVal){
|
1360 |
-
$isfound = explode('level_', $roleKey);
|
1361 |
-
if(is_array($isfound) && count($isfound) == 2){
|
1362 |
-
$rolelevel = $rolelevel + 1;
|
1363 |
-
}
|
1364 |
-
} $rolelevel = $rolelevel - 1;
|
1365 |
-
#$UserData[$userID][$usermeta->meta_key] = $rolelevel;
|
1366 |
-
}
|
1367 |
-
}
|
1368 |
-
} else {
|
1369 |
-
foreach($possible_values as $posval){
|
1370 |
-
if(strpos($usermeta->meta_value,$posval)){
|
1371 |
-
$UserData[$userID][$usermeta->meta_key] = null;
|
1372 |
-
} else {
|
1373 |
-
$ifSerialized = 0;
|
1374 |
-
$UserData[$userID][$usermeta->meta_key] = $usermeta->meta_value;
|
1375 |
-
}
|
1376 |
-
}
|
1377 |
-
|
1378 |
-
}
|
1379 |
-
} #echo '<pre>'; print_r($UserData); die('dd');
|
1380 |
-
}
|
1381 |
-
}
|
1382 |
-
}
|
1383 |
-
$UserHeader = array();
|
1384 |
-
foreach ($Header as $header_key) {
|
1385 |
-
foreach ($UserData as $UD_key => $UD_val) {
|
1386 |
-
if(array_key_exists($header_key, $UD_val)) {
|
1387 |
-
$CSVContent[$UD_key][$header_key] = $UD_val[$header_key];
|
1388 |
-
if(!in_array($header_key, $UserHeader))
|
1389 |
-
$UserHeader[] = $header_key;
|
1390 |
-
}
|
1391 |
-
else {
|
1392 |
-
$CSVContent[$UD_key][$header_key] = null;
|
1393 |
-
}
|
1394 |
-
}
|
1395 |
-
}
|
1396 |
-
|
1397 |
-
$csv = new WPImpCSVParserLib();
|
1398 |
-
$csv->output ($csv_file_name, $CSVContent, $UserHeader, $export_delimiter);
|
1399 |
-
}
|
1400 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/export/templates/index.php
CHANGED
@@ -362,7 +362,7 @@ $noncedata = $skinnyData['wp_nonce'];
|
|
362 |
</div>
|
363 |
<div class='col-sm-3'><input type="submit" id="exportbutton" name="exportbutton"
|
364 |
value="<?php echo __('Export', 'wp-ultimate-csv-importer'); ?>"
|
365 |
-
class='btn btn-primary'
|
366 |
|
367 |
</form>
|
368 |
</div>
|
362 |
</div>
|
363 |
<div class='col-sm-3'><input type="submit" id="exportbutton" name="exportbutton"
|
364 |
value="<?php echo __('Export', 'wp-ultimate-csv-importer'); ?>"
|
365 |
+
class='btn btn-primary'></div>
|
366 |
|
367 |
</form>
|
368 |
</div>
|
modules/old_export/actions/actions.php
DELETED
@@ -1,1428 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/******************************************************************************************
|
3 |
-
* Copyright (C) Smackcoders 2014 - All Rights Reserved
|
4 |
-
* Unauthorized copying of this file, via any medium is strictly prohibited
|
5 |
-
* Proprietary and confidential
|
6 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
7 |
-
*******************************************************************************************/
|
8 |
-
|
9 |
-
class ExportActions extends SkinnyActions {
|
10 |
-
public function __construct() {
|
11 |
-
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* The actions index method
|
16 |
-
* @param array $request
|
17 |
-
* @return array
|
18 |
-
*/
|
19 |
-
public function executeIndex($request) {
|
20 |
-
// return an array of name value pairs to send data to the template
|
21 |
-
$data = array();
|
22 |
-
if (!empty($request['POST'])) {
|
23 |
-
$type = $request['POST']['export'];
|
24 |
-
$filename = $request['POST']['export_filename'];
|
25 |
-
if (!empty($type) && !empty($filename)) {
|
26 |
-
$helper = new ultimatecsv_include_helper();
|
27 |
-
$helper->generateanddownloadcsv($type, $filename);
|
28 |
-
}
|
29 |
-
}
|
30 |
-
return $data;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* @param $request
|
35 |
-
* @return array
|
36 |
-
*/
|
37 |
-
public function executeExport($request) {
|
38 |
-
#TODO: Update phpdoc
|
39 |
-
$data = array();
|
40 |
-
#TODO: $data = array() not used in this function / overwritten immediately
|
41 |
-
ob_start();
|
42 |
-
global $wpdb;
|
43 |
-
$Header = $PostData = $PostMetaData = $TermsData = $ExportData = array();
|
44 |
-
$exporttype = $request['POST']['export'];
|
45 |
-
$export_filename = $request['POST']['export_filename'];
|
46 |
-
if ($export_filename) {
|
47 |
-
$csv_file_name = $export_filename . '.csv';
|
48 |
-
} else {
|
49 |
-
$csv_file_name = 'exportas_' . $exporttype . '_' . date("Y-m-d") . '.csv';
|
50 |
-
}
|
51 |
-
#TODO: $csv_file_name not used in this function / overwritten immediately
|
52 |
-
|
53 |
-
if ($exporttype == 'post' || $exporttype == 'page') {
|
54 |
-
$header_query1 = "SELECT wp.* FROM $wpdb->posts wp where post_type = '$exporttype'";
|
55 |
-
$header_query2 = "SELECT post_id, meta_key, meta_value FROM $wpdb->posts wp JOIN $wpdb->postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') and meta_key NOT LIKE 'field_%'";
|
56 |
-
$result_header_query1 = $wpdb->get_results($header_query1);
|
57 |
-
$result_header_query2 = $wpdb->get_results($header_query2);
|
58 |
-
|
59 |
-
foreach ($result_header_query1 as $rhq1_key) {
|
60 |
-
foreach ($rhq1_key as $rhq1_headkey => $rhq1_headval) {
|
61 |
-
if (!in_array($rhq1_headkey, $Header)) {
|
62 |
-
$Header[] = $rhq1_headkey;
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
foreach ($result_header_query2 as $rhq2_headkey) {
|
68 |
-
if (!in_array($rhq2_headkey->meta_key, $Header)) {
|
69 |
-
if ($rhq2_headkey->meta_key != '_eshop_product' && $rhq2_headkey->meta_key != '_wp_attached_file') {
|
70 |
-
$Header[] = $rhq2_headkey->meta_key;
|
71 |
-
}
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
$Header[] = 'post_tag';
|
76 |
-
$Header[] = 'featured_image';
|
77 |
-
$Header[] = 'post_category';
|
78 |
-
// Code for ACF fields
|
79 |
-
$limit = ( int )apply_filters('postmeta_form_limit', 30);
|
80 |
-
$get_acf_fields = $wpdb->get_col("SELECT meta_value FROM $wpdb->postmeta
|
81 |
-
GROUP BY meta_key
|
82 |
-
HAVING meta_key LIKE 'field_%'
|
83 |
-
ORDER BY meta_key
|
84 |
-
LIMIT $limit");
|
85 |
-
|
86 |
-
foreach ($get_acf_fields as $acf_value) {
|
87 |
-
$get_acf_field = unserialize($acf_value);
|
88 |
-
$acf_fields[$get_acf_field['name']] = "CF: " . $get_acf_field['name'];
|
89 |
-
$acf_fields_slug[$get_acf_field['name']] = "_" . $get_acf_field['name'];
|
90 |
-
if (in_array("_" . $get_acf_field['name'], $Header)) {
|
91 |
-
$Header = array_diff($Header, $acf_fields_slug);
|
92 |
-
}
|
93 |
-
if ($get_acf_field['type'] == 'checkbox') {
|
94 |
-
$checkbox_option_fields[] = $get_acf_field['name'];
|
95 |
-
}
|
96 |
-
} // Code ends here
|
97 |
-
$get_post_ids = "select DISTINCT ID from $wpdb->posts where post_type = '$exporttype' and post_status in ('publish','draft','future','private','pending')";
|
98 |
-
|
99 |
-
$result = $wpdb->get_col($get_post_ids);
|
100 |
-
$fieldsCount = count($result);
|
101 |
-
if ($result) {
|
102 |
-
foreach ($result as $postID) {
|
103 |
-
$pId = $pId . ',' . $postID;
|
104 |
-
$query1 = "SELECT wp.* FROM $wpdb->posts wp where ID=$postID";
|
105 |
-
$result_query1 = $wpdb->get_results($query1);
|
106 |
-
if (!empty($result_query1)) {
|
107 |
-
foreach ($result_query1 as $posts) {
|
108 |
-
foreach ($posts as $post_key => $post_value) {
|
109 |
-
if ($post_key == 'post_status') {
|
110 |
-
if (is_sticky($postID)) {
|
111 |
-
$PostData[$postID][$post_key] = 'Sticky';
|
112 |
-
$post_status = 'Sticky';
|
113 |
-
} else {
|
114 |
-
$PostData[$postID][$post_key] = $post_value;
|
115 |
-
$post_status = $post_value;
|
116 |
-
}
|
117 |
-
} else {
|
118 |
-
$PostData[$postID][$post_key] = $post_value;
|
119 |
-
}
|
120 |
-
if ($post_key == 'post_password') {
|
121 |
-
if ($post_value) {
|
122 |
-
$PostData[$postID]['post_status'] = "{" . $post_value . "}";
|
123 |
-
} else {
|
124 |
-
$PostData[$postID]['post_status'] = $post_status;
|
125 |
-
}
|
126 |
-
}
|
127 |
-
}
|
128 |
-
}
|
129 |
-
}
|
130 |
-
$query2 = "SELECT post_id, meta_key, meta_value FROM $wpdb->posts wp JOIN $wpdb->postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') AND ID=$postID";
|
131 |
-
$result_query2 = $wpdb->get_results($query2);
|
132 |
-
if (!empty($result_query2)) {
|
133 |
-
foreach ($result_query2 as $postmeta) {
|
134 |
-
if ($postmeta->meta_key != '_eshop_product' && $postmeta->meta_key != '_thumbnail_id') {
|
135 |
-
if (is_array($acf_fields_slug) && !in_array($postmeta->meta_key, $acf_fields_slug)) {
|
136 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
|
137 |
-
}
|
138 |
-
}
|
139 |
-
$eshop_products = $postmeta->meta_value;
|
140 |
-
if ($postmeta->meta_key == 'products') {
|
141 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
142 |
-
$eshop_products = unserialize($eshop_products);
|
143 |
-
foreach ($eshop_products as $key) {
|
144 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] .= $key['option'] . '|' . $key['price'] . '|' . $key['saleprice'] . ',';
|
145 |
-
}
|
146 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = substr($PostMetaData[$postmeta->post_id][$postmeta->meta_key], 0, -1);
|
147 |
-
}
|
148 |
-
if ($postmeta->meta_key == '_thumbnail_id') {
|
149 |
-
$attachment_file = '';
|
150 |
-
$get_attachement = "select guid from $wpdb->posts where ID = $postmeta->meta_value AND post_type = 'attachment'";
|
151 |
-
$attachment = $wpdb->get_results($get_attachement);
|
152 |
-
$attachment_file = $attachment[0]->guid;
|
153 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
154 |
-
$postmeta->meta_key = 'featured_image';
|
155 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $attachment_file;
|
156 |
-
}
|
157 |
-
if (is_array($checkbox_option_fields) && in_array($postmeta->meta_key, $checkbox_option_fields)) {
|
158 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
159 |
-
$eshop_products = unserialize($eshop_products); //print_r($eshop_products);
|
160 |
-
foreach ($eshop_products as $key) {
|
161 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] .= $key . ',';
|
162 |
-
}
|
163 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = substr($PostMetaData[$postmeta->post_id][$postmeta->meta_key], 0, -1);
|
164 |
-
}
|
165 |
-
}
|
166 |
-
|
167 |
-
}
|
168 |
-
// Tags & Categories
|
169 |
-
$get_tags = wp_get_post_tags($postID, array('fields' => 'names'));
|
170 |
-
$postTags = $postCategory = '';
|
171 |
-
foreach ($get_tags as $tags) {
|
172 |
-
$postTags .= $tags . ',';
|
173 |
-
}
|
174 |
-
$postTags = substr($postTags, 0, -1);
|
175 |
-
$TermsData[$postID]['post_tag'] = $postTags;
|
176 |
-
$get_categotries = wp_get_post_categories($postID, array('fields' => 'names'));
|
177 |
-
foreach ($get_categotries as $category) {
|
178 |
-
$postCategory .= $category . '|';
|
179 |
-
}
|
180 |
-
$postCategory = substr($postCategory, 0, -1);
|
181 |
-
$TermsData[$postID]['post_category'] = $postCategory;
|
182 |
-
}
|
183 |
-
$ExportData = array();
|
184 |
-
// Merge all arrays
|
185 |
-
foreach ($PostData as $pd_key => $pd_val) {
|
186 |
-
if (array_key_exists($pd_key, $PostMetaData)) {
|
187 |
-
$ExportData[$pd_key] = array_merge($PostData[$pd_key], $PostMetaData[$pd_key]);
|
188 |
-
} else {
|
189 |
-
$ExportData[$pd_key] = $PostData[$pd_key];
|
190 |
-
}
|
191 |
-
if (array_key_exists($pd_key, $TermsData)) {
|
192 |
-
if (empty($ExportData[$pd_key])) {
|
193 |
-
$ExportData[$pd_key] = array();
|
194 |
-
}
|
195 |
-
$ExportData[$pd_key] = array_merge($ExportData[$pd_key], $TermsData[$pd_key]);
|
196 |
-
}
|
197 |
-
}
|
198 |
-
|
199 |
-
foreach ($Header as $header_key) {
|
200 |
-
foreach ($ExportData as $ED_key) {
|
201 |
-
if (array_key_exists($header_key, $ED_key)) {
|
202 |
-
$CSVContent[$header_key][] = $ED_key[$header_key];
|
203 |
-
} else {
|
204 |
-
$CSVContent[$header_key][] = '';
|
205 |
-
}
|
206 |
-
}
|
207 |
-
}
|
208 |
-
}
|
209 |
-
|
210 |
-
# GENERATE AS CSV
|
211 |
-
$CSVDATA = array();
|
212 |
-
for ($j = 0; $j < $fieldsCount; $j++) {
|
213 |
-
foreach ($Header as $value) {
|
214 |
-
$CSVDATA[$j] .= '"' . $CSVContent[$value][$j] . '",';
|
215 |
-
}
|
216 |
-
}
|
217 |
-
$CSV_FILE_CONTENT = array();
|
218 |
-
foreach ($Header as $csv_header) {
|
219 |
-
if ($csv_header == '_eshop_stock') {
|
220 |
-
$csv_header = 'stock_available';
|
221 |
-
}
|
222 |
-
if ($csv_header == 'cart_radio') {
|
223 |
-
$csv_header = 'cart_option';
|
224 |
-
}
|
225 |
-
if ($csv_header == 'sale') {
|
226 |
-
$csv_header = 'product_in_sale';
|
227 |
-
}
|
228 |
-
if ($csv_header == 'featured') {
|
229 |
-
$csv_header = 'featured_product';
|
230 |
-
}
|
231 |
-
if ($csv_header == 'sku' || $csv_header == '_wpsc_sku') {
|
232 |
-
$csv_header = 'SKU';
|
233 |
-
}
|
234 |
-
if ($csv_header == '_aioseop_keywords') {
|
235 |
-
$csv_header = 'seo_keywords';
|
236 |
-
}
|
237 |
-
if ($csv_header == '_aioseop_description') {
|
238 |
-
$csv_header = 'seo_description';
|
239 |
-
}
|
240 |
-
if ($csv_header == '_aioseop_title') {
|
241 |
-
$csv_header = 'seo_title';
|
242 |
-
}
|
243 |
-
if ($csv_header == '_aioseop_noindex') {
|
244 |
-
$csv_header = 'seo_noindex';
|
245 |
-
}
|
246 |
-
if ($csv_header == '_aioseop_nofollow') {
|
247 |
-
$csv_header = 'seo_nofollow';
|
248 |
-
}
|
249 |
-
if ($csv_header == '_aioseop_disable') {
|
250 |
-
$csv_header = 'seo_disable';
|
251 |
-
}
|
252 |
-
if ($csv_header == '_aioseop_disable_analytics') {
|
253 |
-
$csv_header = 'seo_disable_analytics';
|
254 |
-
}
|
255 |
-
if ($csv_header == '_yoast_wpseo_focuskw') {
|
256 |
-
$csv_header = 'focus_keyword';
|
257 |
-
}
|
258 |
-
if ($csv_header == '_yoast_wpseo_title') {
|
259 |
-
$csv_header = 'title';
|
260 |
-
}
|
261 |
-
if ($csv_header == '_yoast_wpseo_metadesc') {
|
262 |
-
$csv_header = 'meta_desc';
|
263 |
-
}
|
264 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-noindex') {
|
265 |
-
$csv_header = 'meta-robots-noindex';
|
266 |
-
}
|
267 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-nofollow') {
|
268 |
-
$csv_header = 'meta-robots-nofollow';
|
269 |
-
}
|
270 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-adv') {
|
271 |
-
$csv_header = 'meta-robots-adv';
|
272 |
-
}
|
273 |
-
if ($csv_header == '_yoast_wpseo_sitemap-include') {
|
274 |
-
$csv_header = 'sitemap-include';
|
275 |
-
}
|
276 |
-
if ($csv_header == '_yoast_wpseo_sitemap-prio') {
|
277 |
-
$csv_header = 'sitemap-prio';
|
278 |
-
}
|
279 |
-
if ($csv_header == '_yoast_wpseo_canonical') {
|
280 |
-
$csv_header = 'canonical';
|
281 |
-
}
|
282 |
-
if ($csv_header == '_yoast_wpseo_redirect') {
|
283 |
-
$csv_header = 'redirect';
|
284 |
-
}
|
285 |
-
if ($csv_header == '_yoast_wpseo_opengraph-description') {
|
286 |
-
$csv_header = 'opengraph-description';
|
287 |
-
}
|
288 |
-
if ($csv_header == '_yoast_wpseo_google-plus-description') {
|
289 |
-
$csv_header = 'google-plus-description';
|
290 |
-
}
|
291 |
-
if (array_key_exists($csv_header, $acf_fields)) {
|
292 |
-
$csv_header = $acf_fields[$csv_header];
|
293 |
-
}
|
294 |
-
|
295 |
-
$CSV_FILE_CONTENT .= $csv_header . ",";
|
296 |
-
}
|
297 |
-
|
298 |
-
$CSV_FILE_CONTENT = substr($CSV_FILE_CONTENT, 0, -1);
|
299 |
-
$CSV_FILE_CONTENT .= "\n";
|
300 |
-
if ($CSVDATA) {
|
301 |
-
foreach ($CSVDATA as $csv_content) {
|
302 |
-
$csv_content = substr($csv_content, 0, -1);
|
303 |
-
$CSV_FILE_CONTENT .= $csv_content . "\n";
|
304 |
-
}
|
305 |
-
}
|
306 |
-
} elseif ($exporttype == 'customerreviews') {
|
307 |
-
$header_query1 = "SELECT * FROM wp_wpcreviews";
|
308 |
-
#TODO: Remove * from the SQL
|
309 |
-
|
310 |
-
$result_header_query1 = $wpdb->get_results($header_query1);
|
311 |
-
foreach ($result_header_query1 as $rhq1_key) {
|
312 |
-
foreach ($rhq1_key as $rhq1_headkey => $rhq1_headval) {
|
313 |
-
if (!in_array($rhq1_headkey, $Header)) {
|
314 |
-
$Header[] = $rhq1_headkey;
|
315 |
-
}
|
316 |
-
}
|
317 |
-
}
|
318 |
-
|
319 |
-
$Header[] = 'date_time';
|
320 |
-
$Header[] = 'reviewer_name';
|
321 |
-
$Header[] = 'reviewer_email';
|
322 |
-
$Header[] = 'reviewer_ip';
|
323 |
-
$Header[] = 'review_title';
|
324 |
-
$Header[] = 'review_text';
|
325 |
-
$Header[] = 'review_response';
|
326 |
-
$Header[] = 'status';
|
327 |
-
$Header[] = 'review_rating';
|
328 |
-
$Header[] = 'reviewer_url';
|
329 |
-
$Header[] = 'page_id';
|
330 |
-
$Header[] = 'custom_fields';
|
331 |
-
|
332 |
-
# GENERATE AS CSV
|
333 |
-
$CSVDATA = array();
|
334 |
-
for ($j = 0; $j < 11; $j++) {
|
335 |
-
foreach ($Header as $value) {
|
336 |
-
$CSVDATA[$j] .= '"' . $value[$j] . '",';
|
337 |
-
}
|
338 |
-
}
|
339 |
-
$CSV_FILE_CONTENT = array();
|
340 |
-
foreach ($Header as $csv_header) {
|
341 |
-
if ($csv_header == 'date_time') {
|
342 |
-
$csv_header = 'date_time';
|
343 |
-
}
|
344 |
-
if ($csv_header == 'reviewer_name') {
|
345 |
-
$csv_header = 'reviewer_name';
|
346 |
-
}
|
347 |
-
if ($csv_header == 'reviewer_email') {
|
348 |
-
$csv_header = 'reviewer_email';
|
349 |
-
}
|
350 |
-
if ($csv_header == 'reviewer_ip') {
|
351 |
-
$csv_header = 'reviewer_ip';
|
352 |
-
}
|
353 |
-
if ($csv_header == 'review_title') {
|
354 |
-
$csv_header = 'review_title';
|
355 |
-
}
|
356 |
-
if ($csv_header == 'review_text') {
|
357 |
-
$csv_header = 'review_text';
|
358 |
-
}
|
359 |
-
if ($csv_header == 'review_response') {
|
360 |
-
$csv_header = 'review_response';
|
361 |
-
}
|
362 |
-
if ($csv_header == 'status') {
|
363 |
-
$csv_header = 'status';
|
364 |
-
}
|
365 |
-
if ($csv_header == 'review_rating') {
|
366 |
-
$csv_header = 'review_rating';
|
367 |
-
}
|
368 |
-
if ($csv_header == 'reviewer_url') {
|
369 |
-
$csv_header = 'reviewer_url';
|
370 |
-
}
|
371 |
-
if ($csv_header == 'page_id') {
|
372 |
-
$csv_header = 'page_id';
|
373 |
-
}
|
374 |
-
if ($csv_header == 'custom_fields') {
|
375 |
-
$csv_header = 'custom_fields';
|
376 |
-
}
|
377 |
-
|
378 |
-
$isActive = false;
|
379 |
-
$active_plugins = get_option('active_plugins');
|
380 |
-
if (in_array('wp-customer-reviews/wp-customer-reviews.php', $active_plugins)) {
|
381 |
-
$isActive = true;
|
382 |
-
}
|
383 |
-
#TODO: $isActive not used in this function / overwritten immediately
|
384 |
-
$CSV_FILE_CONTENT .= $csv_header . ",";
|
385 |
-
}
|
386 |
-
$CSV_FILE_CONTENT = substr($CSV_FILE_CONTENT, 0, -1);
|
387 |
-
$CSV_FILE_CONTENT .= "\n";
|
388 |
-
if ($CSVDATA) {
|
389 |
-
foreach ($CSVDATA as $csv_content) {
|
390 |
-
$csv_content = substr($csv_content, 0, -1);
|
391 |
-
$CSV_FILE_CONTENT .= $csv_content . "\n";
|
392 |
-
}
|
393 |
-
}
|
394 |
-
} elseif ($exporttype == 'eshop') {
|
395 |
-
$exporttype = 'post';
|
396 |
-
$header_query1 = "SELECT wp.* FROM wp_posts wp where post_type = '$exporttype'";
|
397 |
-
$header_query2 = "SELECT post_id, meta_key, meta_value FROM wp_posts wp JOIN wp_postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last')";
|
398 |
-
$result_header_query1 = $wpdb->get_results($header_query1);
|
399 |
-
$result_header_query2 = $wpdb->get_results($header_query2);
|
400 |
-
foreach ($result_header_query1 as $rhq1_key) {
|
401 |
-
foreach ($rhq1_key as $rhq1_headkey => $rhq1_headval) {
|
402 |
-
if (!in_array($rhq1_headkey, $Header)) {
|
403 |
-
if ($rhq1_headkey != 'to_ping' && $rhq1_headkey != 'pinged' && $rhq1_headkey != 'post_mime_type') {
|
404 |
-
$Header[] = $rhq1_headkey;
|
405 |
-
}
|
406 |
-
}
|
407 |
-
}
|
408 |
-
}
|
409 |
-
foreach ($result_header_query2 as $rhq2_headkey) {
|
410 |
-
if (!in_array($rhq2_headkey->meta_key, $Header)) {
|
411 |
-
if ($rhq2_headkey->meta_key != '_eshop_product' && $rhq2_headkey->meta_key != '_wp_attached_file' && $rhq2_headkey->meta_key != 'products' && $rhq2_headkey->meta_key != '_eshop_sale' && $rhq2_headkey->meta_key != 'post_mime_type' && $rhq2_headkey->meta_key != '_thumbnail_id' && $rhq2_headkey->meta_key != '_wp_attachment_metadata' && $rhq2_headkey->meta_key != '_eshop_featured') {
|
412 |
-
$Header[] = $rhq2_headkey->meta_key;
|
413 |
-
}
|
414 |
-
}
|
415 |
-
}
|
416 |
-
$Header[] = 'products_option';
|
417 |
-
$Header[] = 'regular_price';
|
418 |
-
$Header[] = 'sale_price';
|
419 |
-
$Header[] = 'featured_image';
|
420 |
-
$Header[] = 'post_tag';
|
421 |
-
$Header[] = 'post_category';
|
422 |
-
$get_post_ids = "select DISTINCT ID from wp_posts p join wp_postmeta pm on pm.post_id = p.ID where post_type = '$exporttype' and post_status in ('publish','draft','future','private','pending') and pm.meta_key = 'sku'";
|
423 |
-
|
424 |
-
$result = $wpdb->get_col($get_post_ids);
|
425 |
-
$fieldsCount = count($result);
|
426 |
-
if ($result) {
|
427 |
-
foreach ($result as $postID) {
|
428 |
-
$pId = $pId . ',' . $postID;
|
429 |
-
$query1 = "SELECT wp.* FROM wp_posts wp where ID=$postID";
|
430 |
-
$result_query1 = $wpdb->get_results($query1);
|
431 |
-
if (!empty($result_query1)) {
|
432 |
-
foreach ($result_query1 as $posts) {
|
433 |
-
foreach ($posts as $post_key => $post_value) {
|
434 |
-
if ($post_key == 'post_status') {
|
435 |
-
if (is_sticky($postID)) {
|
436 |
-
$PostData[$postID][$post_key] = 'Sticky';
|
437 |
-
$post_status = 'Sticky';
|
438 |
-
} else {
|
439 |
-
$PostData[$postID][$post_key] = $post_value;
|
440 |
-
$post_status = $post_value;
|
441 |
-
}
|
442 |
-
} else {
|
443 |
-
$PostData[$postID][$post_key] = $post_value;
|
444 |
-
}
|
445 |
-
if ($post_key == 'post_password') {
|
446 |
-
if ($post_value) {
|
447 |
-
$PostData[$postID]['post_status'] = "{" . $post_value . "}";
|
448 |
-
} else {
|
449 |
-
$PostData[$postID]['post_status'] = $post_status;
|
450 |
-
}
|
451 |
-
}
|
452 |
-
}
|
453 |
-
}
|
454 |
-
}
|
455 |
-
$query2 = "SELECT post_id, meta_key, meta_value FROM wp_posts wp JOIN wp_postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') AND ID=$postID";
|
456 |
-
$result_query2 = $wpdb->get_results($query2);
|
457 |
-
if (!empty($result_query2)) {
|
458 |
-
foreach ($result_query2 as $postmeta) {
|
459 |
-
if ($postmeta->meta_key != '_eshop_product' && $postmeta->meta_key != '_thumbnail_id') {
|
460 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
|
461 |
-
}
|
462 |
-
$eshop_products = $postmeta->meta_value;
|
463 |
-
if ($postmeta->meta_key == 'products') {
|
464 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
465 |
-
$eshop_products = unserialize($eshop_products);
|
466 |
-
foreach ($eshop_products as $key) {
|
467 |
-
$PostMetaData[$postmeta->post_id]['products_option'] .= $key['option'] . ',';
|
468 |
-
$PostMetaData[$postmeta->post_id]['sale_price'] .= $key['saleprice'] . ',';
|
469 |
-
$PostMetaData[$postmeta->post_id]['regular_price'] .= $key['price'] . ',';
|
470 |
-
}
|
471 |
-
$PostMetaData[$postmeta->post_id]['products_option'] = substr($PostMetaData[$postmeta->post_id]['products_option'], 0, -1);
|
472 |
-
$PostMetaData[$postmeta->post_id]['sale_price'] = substr($PostMetaData[$postmeta->post_id]['sale_price'], 0, -1);
|
473 |
-
$PostMetaData[$postmeta->post_id]['regular_price'] = substr($PostMetaData[$postmeta->post_id]['regular_price'], 0, -1);
|
474 |
-
}
|
475 |
-
if ($postmeta->meta_key == '_thumbnail_id') {
|
476 |
-
$attachment_file = '';
|
477 |
-
#TODO: $attachment_file not used in this function / overwritten immediately
|
478 |
-
$get_attachement = "select guid from wp_posts where ID = $postmeta->meta_value AND post_type = 'attachment'";
|
479 |
-
$attachment = $wpdb->get_results($get_attachement);
|
480 |
-
$attachment_file = $attachment[0]->guid;
|
481 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
482 |
-
$postmeta->meta_key = 'featured_image';
|
483 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $attachment_file;
|
484 |
-
}
|
485 |
-
}
|
486 |
-
|
487 |
-
}
|
488 |
-
// Tags & Categories
|
489 |
-
$get_tags = wp_get_post_tags($postID, array('fields' => 'names'));
|
490 |
-
$postTags = $postCategory = '';
|
491 |
-
foreach ($get_tags as $tags) {
|
492 |
-
$postTags .= $tags . ',';
|
493 |
-
}
|
494 |
-
$postTags = substr($postTags, 0, -1);
|
495 |
-
$TermsData[$postID]['post_tag'] = $postTags;
|
496 |
-
$get_categotries = wp_get_post_categories($postID, array('fields' => 'names'));
|
497 |
-
foreach ($get_categotries as $category) {
|
498 |
-
$postCategory .= $category . '|';
|
499 |
-
}
|
500 |
-
$postCategory = substr($postCategory, 0, -1);
|
501 |
-
$TermsData[$postID]['post_category'] = $postCategory;
|
502 |
-
}
|
503 |
-
|
504 |
-
$ExportData = array();
|
505 |
-
// Merge all arrays
|
506 |
-
foreach ($PostData as $pd_key => $pd_val) {
|
507 |
-
if (array_key_exists($pd_key, $PostMetaData)) {
|
508 |
-
$ExportData[$pd_key] = array_merge($PostData[$pd_key], $PostMetaData[$pd_key]);
|
509 |
-
}
|
510 |
-
if (array_key_exists($pd_key, $TermsData)) {
|
511 |
-
$ExportData[$pd_key] = array_merge($ExportData[$pd_key], $TermsData[$pd_key]);
|
512 |
-
}
|
513 |
-
}
|
514 |
-
foreach ($Header as $header_key) {
|
515 |
-
foreach ($ExportData as $ED_key) {
|
516 |
-
if (array_key_exists($header_key, $ED_key)) {
|
517 |
-
$CSVContent[$header_key][] = $ED_key[$header_key];
|
518 |
-
} else {
|
519 |
-
$CSVContent[$header_key][] = '';
|
520 |
-
}
|
521 |
-
}
|
522 |
-
}
|
523 |
-
}
|
524 |
-
# GENERATE AS CSV
|
525 |
-
$CSVDATA = array();
|
526 |
-
for ($j = 0; $j < $fieldsCount; $j++) {
|
527 |
-
foreach ($Header as $value) {
|
528 |
-
$CSVDATA[$j] .= '"' . $CSVContent[$value][$j] . '",';
|
529 |
-
}
|
530 |
-
}
|
531 |
-
$CSV_FILE_CONTENT = array();
|
532 |
-
foreach ($Header as $csv_header) {
|
533 |
-
if ($csv_header == '_eshop_stock') {
|
534 |
-
$csv_header = 'stock_available';
|
535 |
-
}
|
536 |
-
if ($csv_header == 'cart_radio') {
|
537 |
-
$csv_header = 'cart_option';
|
538 |
-
}
|
539 |
-
if ($csv_header == 'sale') {
|
540 |
-
$csv_header = 'product_in_sale';
|
541 |
-
}
|
542 |
-
if ($csv_header == 'featured') {
|
543 |
-
$csv_header = 'featured_product';
|
544 |
-
}
|
545 |
-
if ($csv_header == 'sku') {
|
546 |
-
$csv_header = 'SKU';
|
547 |
-
}
|
548 |
-
if ($csv_header == '_aioseop_keywords') {
|
549 |
-
$csv_header = 'seo_keywords';
|
550 |
-
}
|
551 |
-
if ($csv_header == '_aioseop_description') {
|
552 |
-
$csv_header = 'seo_description';
|
553 |
-
}
|
554 |
-
if ($csv_header == '_aioseop_title') {
|
555 |
-
$csv_header = 'seo_title';
|
556 |
-
}
|
557 |
-
if ($csv_header == '_aioseop_noindex') {
|
558 |
-
$csv_header = 'seo_noindex';
|
559 |
-
}
|
560 |
-
if ($csv_header == '_aioseop_nofollow') {
|
561 |
-
$csv_header = 'seo_nofollow';
|
562 |
-
}
|
563 |
-
if ($csv_header == '_aioseop_disable') {
|
564 |
-
$csv_header = 'seo_disable';
|
565 |
-
}
|
566 |
-
if ($csv_header == '_aioseop_disable_analytics') {
|
567 |
-
$csv_header = 'seo_disable_analytics';
|
568 |
-
}
|
569 |
-
if ($csv_header == '_yoast_wpseo_focuskw') {
|
570 |
-
$csv_header = 'focus_keyword';
|
571 |
-
}
|
572 |
-
if ($csv_header == '_yoast_wpseo_title') {
|
573 |
-
$csv_header = 'title';
|
574 |
-
}
|
575 |
-
if ($csv_header == '_yoast_wpseo_metadesc') {
|
576 |
-
$csv_header = 'meta_desc';
|
577 |
-
}
|
578 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-noindex') {
|
579 |
-
$csv_header = 'meta-robots-noindex';
|
580 |
-
}
|
581 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-nofollow') {
|
582 |
-
$csv_header = 'meta-robots-nofollow';
|
583 |
-
}
|
584 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-adv') {
|
585 |
-
$csv_header = 'meta-robots-adv';
|
586 |
-
}
|
587 |
-
if ($csv_header == '_yoast_wpseo_sitemap-include') {
|
588 |
-
$csv_header = 'sitemap-include';
|
589 |
-
}
|
590 |
-
if ($csv_header == '_yoast_wpseo_sitemap-prio') {
|
591 |
-
$csv_header = 'sitemap-prio';
|
592 |
-
}
|
593 |
-
if ($csv_header == '_yoast_wpseo_canonical') {
|
594 |
-
$csv_header = 'canonical';
|
595 |
-
}
|
596 |
-
if ($csv_header == '_yoast_wpseo_redirect') {
|
597 |
-
$csv_header = 'redirect';
|
598 |
-
}
|
599 |
-
if ($csv_header == '_yoast_wpseo_opengraph-description') {
|
600 |
-
$csv_header = 'opengraph-description';
|
601 |
-
}
|
602 |
-
if ($csv_header == '_yoast_wpseo_google-plus-description') {
|
603 |
-
$csv_header = 'google-plus-description';
|
604 |
-
}
|
605 |
-
|
606 |
-
if ($csv_header == 'post_tag') {
|
607 |
-
$csv_header = 'tags';
|
608 |
-
}
|
609 |
-
if ($csv_header == 'post_category') {
|
610 |
-
$csv_header = 'category';
|
611 |
-
}
|
612 |
-
$CSV_FILE_CONTENT .= $csv_header . ",";
|
613 |
-
}
|
614 |
-
$CSV_FILE_CONTENT = substr($CSV_FILE_CONTENT, 0, -1);
|
615 |
-
$CSV_FILE_CONTENT .= "\n";
|
616 |
-
if ($CSVDATA) {
|
617 |
-
foreach ($CSVDATA as $csv_content) {
|
618 |
-
$csv_content = substr($csv_content, 0, -1);
|
619 |
-
$CSV_FILE_CONTENT .= $csv_content . "\n";
|
620 |
-
}
|
621 |
-
}
|
622 |
-
} elseif ($exporttype == 'wpcommerce') {
|
623 |
-
$exporttype = 'wpsc-product';
|
624 |
-
$header_query1 = "SELECT wp.* FROM wp_posts wp where post_type = '$exporttype'";
|
625 |
-
$header_query2 = "SELECT post_id, meta_key, meta_value FROM wp_posts wp JOIN wp_postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last')";
|
626 |
-
$result_header_query1 = $wpdb->get_results($header_query1);
|
627 |
-
$result_header_query2 = $wpdb->get_results($header_query2);
|
628 |
-
foreach ($result_header_query1 as $rhq1_key) {
|
629 |
-
foreach ($rhq1_key as $rhq1_headkey => $rhq1_headval) {
|
630 |
-
if (!in_array($rhq1_headkey, $Header)) {
|
631 |
-
$Header[] = $rhq1_headkey;
|
632 |
-
}
|
633 |
-
}
|
634 |
-
}
|
635 |
-
foreach ($result_header_query2 as $rhq2_headkey) {
|
636 |
-
if (!in_array($rhq2_headkey->meta_key, $Header)) {
|
637 |
-
if ($rhq2_headkey->meta_key != '_eshop_product' && $rhq2_headkey->meta_key != '_wp_attached_file' && $rhq2_headkey->meta_key != '_wpsc_product_metadata') {
|
638 |
-
$Header[] = $rhq2_headkey->meta_key;
|
639 |
-
}
|
640 |
-
}
|
641 |
-
}
|
642 |
-
$Header[] = 'featured_image';
|
643 |
-
$Header[] = 'product_tag';
|
644 |
-
$Header[] = 'wpsc_product_category';
|
645 |
-
$Header[] = 'notify_when_none_left';
|
646 |
-
$Header[] = 'unpublish_when_none_left';
|
647 |
-
$Header[] = 'wpec_taxes_taxable_amount';
|
648 |
-
$Header[] = 'wpec_taxes_taxable';
|
649 |
-
$Header[] = 'external_link';
|
650 |
-
$Header[] = 'external_link_text';
|
651 |
-
$Header[] = 'external_link_target';
|
652 |
-
$Header[] = 'no_shipping';
|
653 |
-
$Header[] = 'weight';
|
654 |
-
$Header[] = 'weight_unit';
|
655 |
-
$Header[] = 'height';
|
656 |
-
$Header[] = 'height_unit';
|
657 |
-
$Header[] = 'width';
|
658 |
-
$Header[] = 'width_unit';
|
659 |
-
$Header[] = 'length';
|
660 |
-
$Header[] = 'length_unit';
|
661 |
-
$Header[] = 'merchant_notes';
|
662 |
-
$Header[] = 'enable_comments';
|
663 |
-
$Header[] = 'quantity_limited';
|
664 |
-
$Header[] = 'special';
|
665 |
-
$Header[] = 'display_weight_as';
|
666 |
-
$Header[] = 'table_rate_price';
|
667 |
-
$Header[] = 'state';
|
668 |
-
$Header[] = 'quantity';
|
669 |
-
$Header[] = 'shipping';
|
670 |
-
$Header[] = 'table_price';
|
671 |
-
$Header[] = 'google_prohibited';
|
672 |
-
|
673 |
-
$get_post_ids = "select DISTINCT ID from wp_posts p join wp_postmeta pm on pm.post_id = p.ID where post_type = '$exporttype' and post_status in ('publish','draft','future','private','pending') and pm.meta_key = '_wpsc_sku'";
|
674 |
-
$result = $wpdb->get_col($get_post_ids);
|
675 |
-
$fieldsCount = count($result);
|
676 |
-
if ($result) {
|
677 |
-
foreach ($result as $postID) {
|
678 |
-
$pId = $pId . ',' . $postID;
|
679 |
-
$query1 = "SELECT wp.* FROM wp_posts wp where ID=$postID";
|
680 |
-
$result_query1 = $wpdb->get_results($query1);
|
681 |
-
if (!empty($result_query1)) {
|
682 |
-
foreach ($result_query1 as $posts) {
|
683 |
-
foreach ($posts as $post_key => $post_value) {
|
684 |
-
if ($post_key == 'post_status') {
|
685 |
-
if (is_sticky($postID)) {
|
686 |
-
$PostData[$postID][$post_key] = 'Sticky';
|
687 |
-
$post_status = 'Sticky';
|
688 |
-
} else {
|
689 |
-
$PostData[$postID][$post_key] = $post_value;
|
690 |
-
$post_status = $post_value;
|
691 |
-
}
|
692 |
-
} else {
|
693 |
-
$PostData[$postID][$post_key] = $post_value;
|
694 |
-
}
|
695 |
-
if ($post_key == 'post_password') {
|
696 |
-
if ($post_value) {
|
697 |
-
$PostData[$postID]['post_status'] = "{" . $post_value . "}";
|
698 |
-
} else {
|
699 |
-
$PostData[$postID]['post_status'] = $post_status;
|
700 |
-
}
|
701 |
-
}
|
702 |
-
}
|
703 |
-
}
|
704 |
-
}
|
705 |
-
$query2 = "SELECT post_id, meta_key, meta_value FROM wp_posts wp JOIN wp_postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') AND ID=$postID";
|
706 |
-
$result_query2 = $wpdb->get_results($query2);
|
707 |
-
if (!empty($result_query2)) {
|
708 |
-
foreach ($result_query2 as $postmeta) {
|
709 |
-
if ($postmeta->meta_key != '_eshop_product' && $postmeta->meta_key != '_thumbnail_id') {
|
710 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
|
711 |
-
}
|
712 |
-
$eshop_products = $postmeta->meta_value;
|
713 |
-
if ($postmeta->meta_key == 'products') {
|
714 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
715 |
-
$eshop_products = unserialize($eshop_products);
|
716 |
-
foreach ($eshop_products as $key) {
|
717 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] .= $key['option'] . '|' . $key['price'] . '|' . $key['saleprice'] . ',';
|
718 |
-
}
|
719 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = substr($PostMetaData[$postmeta->post_id][$postmeta->meta_key], 0, -1);
|
720 |
-
}
|
721 |
-
if ($postmeta->meta_key == '_thumbnail_id') {
|
722 |
-
$attachment_file = '';
|
723 |
-
$get_attachement = "select guid from wp_posts where ID = $postmeta->meta_value AND post_type = 'attachment'";
|
724 |
-
$attachment = $wpdb->get_results($get_attachement);
|
725 |
-
$attachment_file = $attachment[0]->guid;
|
726 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
727 |
-
$postmeta->meta_key = 'featured_image';
|
728 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $attachment_file;
|
729 |
-
}
|
730 |
-
if ($postmeta->meta_key == '_wpsc_product_metadata') {
|
731 |
-
$productMeta = unserialize($postmeta->meta_value);
|
732 |
-
foreach ($productMeta as $metaKey => $metaValue) {
|
733 |
-
if ($metaKey == 'notify_when_none_left' || $metaKey == 'unpublish_when_none_left' || $metaKey == 'external_link' || $metaKey == 'external_link_text' || $metaKey == 'external_link_target' || $metaKey == 'no_shipping' || $metaKey == 'weight' || $metaKey == 'weight_unit' || $metaKey == 'merchant_notes' || $metaKey == 'enable_comments' || $metaKey == 'quantity_limited' || $metaKey == 'special' || $metaKey == 'display_weight_as' || $metaKey == 'google_prohibited') {
|
734 |
-
$PostMetaData[$postmeta->post_id][$metaKey] = $metaValue;
|
735 |
-
}
|
736 |
-
if ($metaKey == 'wpec_taxes_taxable_amount') {
|
737 |
-
$PostMetaData[$postmeta->post_id]['taxable_amount'] = $metaValue;
|
738 |
-
}
|
739 |
-
if ($metaKey == 'wpec_taxes_taxable') {
|
740 |
-
$PostMetaData[$postmeta->post_id]['is_taxable'] = $metaValue;
|
741 |
-
}
|
742 |
-
if ($metaKey == 'dimensions') {
|
743 |
-
foreach ($metaValue as $mk => $mv) {
|
744 |
-
$PostMetaData[$postmeta->post_id][$mk] = $mv;
|
745 |
-
}
|
746 |
-
}
|
747 |
-
if ($metaKey == 'shipping') {
|
748 |
-
$PostMetaData[$postmeta->post_id]['shipping'] = $metaKey['local'] . '|' . $metaKey['international'];
|
749 |
-
}
|
750 |
-
if ($metaKey == 'table_rate_price') {
|
751 |
-
$PostMetaData[$postmeta->post_id]['state'] = $metaKey['table_rate_price']['state'];
|
752 |
-
$PostMetaData[$postmeta->post_id]['quantity'] = $metaKey['table_rate_price']['quantity'][0];
|
753 |
-
$PostMetaData[$postmeta->post_id]['table_price'] = $metaKey['table_rate_price']['table_price'][0];
|
754 |
-
}
|
755 |
-
}
|
756 |
-
}
|
757 |
-
}
|
758 |
-
|
759 |
-
}
|
760 |
-
// Tags & Categories
|
761 |
-
$postTags = $postCategory = '';
|
762 |
-
$taxonomies = get_object_taxonomies($exporttype);
|
763 |
-
foreach ($taxonomies as $taxonomy) {
|
764 |
-
if ($taxonomy == 'product_tag') {
|
765 |
-
$get_tags = get_the_terms($postID, $taxonomy);
|
766 |
-
if ($get_tags) {
|
767 |
-
foreach ($get_tags as $tags) {
|
768 |
-
$postTags .= $tags->name . ',';
|
769 |
-
}
|
770 |
-
}
|
771 |
-
$postTags = substr($postTags, 0, -1);
|
772 |
-
$TermsData[$postID]['product_tag'] = $postTags;
|
773 |
-
}
|
774 |
-
if ($taxonomy == 'wpsc_product_category') {
|
775 |
-
$get_categotries = wp_get_post_terms($postID, $taxonomy);
|
776 |
-
if ($get_categotries) {
|
777 |
-
foreach ($get_categotries as $category) {
|
778 |
-
$postCategory .= $category->name . '|';
|
779 |
-
}
|
780 |
-
}
|
781 |
-
$postCategory = substr($postCategory, 0, -1);
|
782 |
-
$TermsData[$postID][$taxonomy] = $postCategory;
|
783 |
-
}
|
784 |
-
}
|
785 |
-
}
|
786 |
-
|
787 |
-
$ExportData = array();
|
788 |
-
// Merge all arrays
|
789 |
-
foreach ($PostData as $pd_key => $pd_val) {
|
790 |
-
if (array_key_exists($pd_key, $PostMetaData)) {
|
791 |
-
$ExportData[$pd_key] = array_merge($PostData[$pd_key], $PostMetaData[$pd_key]);
|
792 |
-
}
|
793 |
-
if (array_key_exists($pd_key, $TermsData)) {
|
794 |
-
$ExportData[$pd_key] = array_merge($ExportData[$pd_key], $TermsData[$pd_key]);
|
795 |
-
}
|
796 |
-
}
|
797 |
-
foreach ($Header as $header_key) {
|
798 |
-
foreach ($ExportData as $ED_key) {
|
799 |
-
if (array_key_exists($header_key, $ED_key)) {
|
800 |
-
$CSVContent[$header_key][] = $ED_key[$header_key];
|
801 |
-
} else {
|
802 |
-
$CSVContent[$header_key][] = '';
|
803 |
-
}
|
804 |
-
}
|
805 |
-
}
|
806 |
-
}
|
807 |
-
# GENERATE AS CSV
|
808 |
-
$CSVDATA = array();
|
809 |
-
for ($j = 0; $j < $fieldsCount; $j++) {
|
810 |
-
foreach ($Header as $value) {
|
811 |
-
$CSVDATA[$j] .= '"' . $CSVContent[$value][$j] . '",';
|
812 |
-
}
|
813 |
-
}
|
814 |
-
|
815 |
-
$CSV_FILE_CONTENT = array();
|
816 |
-
foreach ($Header as $csv_header) {
|
817 |
-
if ($csv_header == '_wpsc_stock') {
|
818 |
-
$csv_header = 'stock';
|
819 |
-
}
|
820 |
-
if ($csv_header == '_wpsc_price') {
|
821 |
-
$csv_header = 'price';
|
822 |
-
}
|
823 |
-
if ($csv_header == '_wpsc_special_price') {
|
824 |
-
$csv_header = 'sale_price';
|
825 |
-
}
|
826 |
-
if ($csv_header == '_wpsc_sku') {
|
827 |
-
$csv_header = 'SKU';
|
828 |
-
}
|
829 |
-
if ($csv_header == 'wpec_taxes_taxable_amount') {
|
830 |
-
$csv_header = 'taxable_amount';
|
831 |
-
}
|
832 |
-
if ($csv_header == 'wpec_taxes_taxable') {
|
833 |
-
$csv_header = 'is_taxable';
|
834 |
-
}
|
835 |
-
if ($csv_header == '_aioseop_keywords') {
|
836 |
-
$csv_header = 'seo_keywords';
|
837 |
-
}
|
838 |
-
if ($csv_header == '_aioseop_description') {
|
839 |
-
$csv_header = 'seo_description';
|
840 |
-
}
|
841 |
-
if ($csv_header == '_aioseop_title') {
|
842 |
-
$csv_header = 'seo_title';
|
843 |
-
}
|
844 |
-
if ($csv_header == '_aioseop_noindex') {
|
845 |
-
$csv_header = 'seo_noindex';
|
846 |
-
}
|
847 |
-
if ($csv_header == '_aioseop_nofollow') {
|
848 |
-
$csv_header = 'seo_nofollow';
|
849 |
-
}
|
850 |
-
if ($csv_header == '_aioseop_disable') {
|
851 |
-
$csv_header = 'seo_disable';
|
852 |
-
}
|
853 |
-
if ($csv_header == '_yoast_wpseo_focuskw') {
|
854 |
-
$csv_header = 'focus_keyword';
|
855 |
-
}
|
856 |
-
if ($csv_header == '_yoast_wpseo_title') {
|
857 |
-
$csv_header = 'title';
|
858 |
-
}
|
859 |
-
if ($csv_header == '_yoast_wpseo_metadesc') {
|
860 |
-
$csv_header = 'meta_desc';
|
861 |
-
}
|
862 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-noindex') {
|
863 |
-
$csv_header = 'meta-robots-noindex';
|
864 |
-
}
|
865 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-nofollow') {
|
866 |
-
$csv_header = 'meta-robots-nofollow';
|
867 |
-
}
|
868 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-adv') {
|
869 |
-
$csv_header = 'meta-robots-adv';
|
870 |
-
}
|
871 |
-
if ($csv_header == '_yoast_wpseo_sitemap-include') {
|
872 |
-
$csv_header = 'sitemap-include';
|
873 |
-
}
|
874 |
-
if ($csv_header == '_yoast_wpseo_sitemap-prio') {
|
875 |
-
$csv_header = 'sitemap-prio';
|
876 |
-
}
|
877 |
-
if ($csv_header == '_yoast_wpseo_canonical') {
|
878 |
-
$csv_header = 'canonical';
|
879 |
-
}
|
880 |
-
if ($csv_header == '_yoast_wpseo_redirect') {
|
881 |
-
$csv_header = 'redirect';
|
882 |
-
}
|
883 |
-
if ($csv_header == '_yoast_wpseo_opengraph-description') {
|
884 |
-
$csv_header = 'opengraph-description';
|
885 |
-
}
|
886 |
-
if ($csv_header == '_yoast_wpseo_google-plus-description') {
|
887 |
-
$csv_header = 'google-plus-description';
|
888 |
-
}
|
889 |
-
if ($csv_header == '_aioseop_disable_analytics') {
|
890 |
-
$csv_header = 'seo_disable_analytics';
|
891 |
-
}
|
892 |
-
if ($csv_header == 'product_tag') {
|
893 |
-
$csv_header = 'product_tags';
|
894 |
-
}
|
895 |
-
if ($csv_header == 'wpsc_product_category') {
|
896 |
-
$csv_header = 'product_category';
|
897 |
-
}
|
898 |
-
// Code for wp-ecommerce-custom-fields support
|
899 |
-
$isActive = false;
|
900 |
-
$active_plugins = get_option('active_plugins');
|
901 |
-
if (in_array('wp-e-commerce-custom-fields/custom-fields.php', $active_plugins)) {
|
902 |
-
$isActive = true;
|
903 |
-
}
|
904 |
-
if ($isActive) {
|
905 |
-
$get_wpcf = unserialize(get_option('wpsc_cf_data'));
|
906 |
-
foreach ($get_wpcf as $wpcf_key => $wpcf_val) {
|
907 |
-
$key = '_wpsc_' . $wpcf_val['slug'];
|
908 |
-
if ($csv_header == $key) {
|
909 |
-
$csv_header = $wpcf_val['name'];
|
910 |
-
}
|
911 |
-
}
|
912 |
-
} // Code ends here
|
913 |
-
|
914 |
-
$CSV_FILE_CONTENT .= $csv_header . ",";
|
915 |
-
}
|
916 |
-
$CSV_FILE_CONTENT = substr($CSV_FILE_CONTENT, 0, -1);
|
917 |
-
$CSV_FILE_CONTENT .= "\n";
|
918 |
-
if ($CSVDATA) {
|
919 |
-
foreach ($CSVDATA as $csv_content) {
|
920 |
-
$csv_content = substr($csv_content, 0, -1);
|
921 |
-
$CSV_FILE_CONTENT .= $csv_content . "\n";
|
922 |
-
}
|
923 |
-
}
|
924 |
-
} elseif ($exporttype == 'woocommerce') {
|
925 |
-
$exporttype = 'product';
|
926 |
-
$header_query1 = "SELECT wp.* FROM wp_posts wp where post_type = '$exporttype'";
|
927 |
-
$header_query2 = "SELECT post_id, meta_key, meta_value FROM wp_posts wp JOIN wp_postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last')";
|
928 |
-
$result_header_query1 = $wpdb->get_results($header_query1);
|
929 |
-
$result_header_query2 = $wpdb->get_results($header_query2);
|
930 |
-
foreach ($result_header_query1 as $rhq1_key) {
|
931 |
-
foreach ($rhq1_key as $rhq1_headkey => $rhq1_headval) {
|
932 |
-
if (!in_array($rhq1_headkey, $Header)) {
|
933 |
-
$Header[] = $rhq1_headkey;
|
934 |
-
}
|
935 |
-
}
|
936 |
-
}
|
937 |
-
foreach ($result_header_query2 as $rhq2_headkey) {
|
938 |
-
if (!in_array($rhq2_headkey->meta_key, $Header)) {
|
939 |
-
if ($rhq2_headkey->meta_key != '_eshop_product' && $rhq2_headkey->meta_key != '_wp_attached_file') {
|
940 |
-
$Header[] = $rhq2_headkey->meta_key;
|
941 |
-
}
|
942 |
-
}
|
943 |
-
}
|
944 |
-
$Header[] = 'featured_image';
|
945 |
-
$Header[] = 'product_tag';
|
946 |
-
$Header[] = 'product_category';
|
947 |
-
$Header[] = '_product_attribute_name';
|
948 |
-
$Header[] = '_product_attribute_value';
|
949 |
-
$Header[] = '_product_attribute_visible';
|
950 |
-
$Header[] = '_product_attribute_variation';
|
951 |
-
|
952 |
-
$get_post_ids = "select DISTINCT ID from wp_posts p join wp_postmeta pm on pm.post_id = p.ID where post_type = '$exporttype' and post_status in ('publish','draft','future','private','pending') and pm.meta_key = '_sku'";
|
953 |
-
|
954 |
-
$result = $wpdb->get_col($get_post_ids);
|
955 |
-
$fieldsCount = count($result);
|
956 |
-
if ($result) {
|
957 |
-
foreach ($result as $postID) {
|
958 |
-
$pId = $pId . ',' . $postID;
|
959 |
-
$query1 = "SELECT wp.* FROM wp_posts wp where ID=$postID";
|
960 |
-
$result_query1 = $wpdb->get_results($query1);
|
961 |
-
if (!empty($result_query1)) {
|
962 |
-
foreach ($result_query1 as $posts) {
|
963 |
-
foreach ($posts as $post_key => $post_value) {
|
964 |
-
if ($post_key == 'post_status') {
|
965 |
-
if (is_sticky($postID)) {
|
966 |
-
$PostData[$postID][$post_key] = 'Sticky';
|
967 |
-
$post_status = 'Sticky';
|
968 |
-
} else {
|
969 |
-
$PostData[$postID][$post_key] = $post_value;
|
970 |
-
$post_status = $post_value;
|
971 |
-
}
|
972 |
-
} else {
|
973 |
-
$PostData[$postID][$post_key] = $post_value;
|
974 |
-
}
|
975 |
-
if ($post_key == 'post_password') {
|
976 |
-
if ($post_value) {
|
977 |
-
$PostData[$postID]['post_status'] = "{" . $post_value . "}";
|
978 |
-
} else {
|
979 |
-
$PostData[$postID]['post_status'] = $post_status;
|
980 |
-
}
|
981 |
-
}
|
982 |
-
if ($post_key == 'comment_status') {
|
983 |
-
if ($post_value == 'closed') {
|
984 |
-
$PostData[$postID]['comment_status'] = 0;
|
985 |
-
}
|
986 |
-
if ($post_value == 'open') {
|
987 |
-
$PostData[$postID]['comment_status'] = 1;
|
988 |
-
}
|
989 |
-
}
|
990 |
-
|
991 |
-
}
|
992 |
-
}
|
993 |
-
}
|
994 |
-
$query2 = "SELECT post_id, meta_key, meta_value FROM wp_posts wp JOIN wp_postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') AND ID=$postID";
|
995 |
-
$result_query2 = $wpdb->get_results($query2);
|
996 |
-
if (!empty($result_query2)) {
|
997 |
-
foreach ($result_query2 as $postmeta) {
|
998 |
-
if ($postmeta->meta_key != '_eshop_product' && $postmeta->meta_key != '_thumbnail_id') {
|
999 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
|
1000 |
-
}
|
1001 |
-
$eshop_products = $postmeta->meta_value;
|
1002 |
-
if ($postmeta->meta_key == '_product_attributes') {
|
1003 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
1004 |
-
$product_attribute_name = $product_attribute_value = $product_attribute_visible = $product_attribute_variation = '';
|
1005 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_name'] = '';
|
1006 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_value'] = '';
|
1007 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_visible'] = '';
|
1008 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_variation'] = '';
|
1009 |
-
$eshop_products_unser1 = unserialize($eshop_products);
|
1010 |
-
$check_attr_count1 = count($eshop_products_unser1);
|
1011 |
-
if ($check_attr_count1 == 1) {
|
1012 |
-
$eshop_products_unser2 = unserialize($eshop_products_unser1);
|
1013 |
-
$check_attr_count2 = count($eshop_products_unser2);
|
1014 |
-
}
|
1015 |
-
if ($check_attr_count1 < $check_attr_count2) {
|
1016 |
-
$unserialized_attributes = $eshop_products_unser2;
|
1017 |
-
} else {
|
1018 |
-
$unserialized_attributes = $eshop_products_unser1;
|
1019 |
-
}
|
1020 |
-
|
1021 |
-
foreach ($unserialized_attributes as $key) {
|
1022 |
-
foreach ($key as $attr_header => $attr_value) {
|
1023 |
-
if ($attr_header == 'name') {
|
1024 |
-
$product_attribute_name .= $attr_value . '|';
|
1025 |
-
}
|
1026 |
-
if ($attr_header == 'value') {
|
1027 |
-
$product_attribute_value .= $attr_value . '|';
|
1028 |
-
}
|
1029 |
-
if ($attr_header == 'is_visible') {
|
1030 |
-
$product_attribute_visible .= $attr_value . '|';
|
1031 |
-
}
|
1032 |
-
if ($attr_header == 'is_variation') {
|
1033 |
-
if (isset($attr_value)) {
|
1034 |
-
$product_attribute_variation .= $attr_value . '|';
|
1035 |
-
}
|
1036 |
-
}
|
1037 |
-
}
|
1038 |
-
}
|
1039 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_name'] = substr($product_attribute_name, 0, -1);
|
1040 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_value'] = substr($product_attribute_value, 0, -1);
|
1041 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_visible'] = substr($product_attribute_visible, 0, -1);
|
1042 |
-
$PostMetaData[$postmeta->post_id]['_product_attribute_variation'] = substr($product_attribute_variation, 0, -1);
|
1043 |
-
}
|
1044 |
-
$upsellids = array();
|
1045 |
-
$crosssellids = array();
|
1046 |
-
#TODO: $upsellids, $crosssellids not used in this function / overwritten immediately
|
1047 |
-
if ($postmeta->meta_key == '_upsell_ids') {
|
1048 |
-
if ($postmeta->meta_value != '' && $postmeta->meta_value != null) {
|
1049 |
-
$upsellids = unserialize($postmeta->meta_value);
|
1050 |
-
if (is_array($upsellids)) {
|
1051 |
-
$upsell_ids = null;
|
1052 |
-
foreach ($upsellids as $upsellID) {
|
1053 |
-
$upsell_ids .= $upsellID . ',';
|
1054 |
-
}
|
1055 |
-
$PostMetaData[$postmeta->post_id]['_upsell_ids'] = substr($upsell_ids, 0, -1);
|
1056 |
-
} else {
|
1057 |
-
$PostMetaData[$postmeta->post_id]['_upsell_ids'] = '';
|
1058 |
-
}
|
1059 |
-
}
|
1060 |
-
}
|
1061 |
-
if ($postmeta->meta_key == '_crosssell_ids') {
|
1062 |
-
if ($postmeta->meta_value != '' && $postmeta->meta_value != null) {
|
1063 |
-
$crosssellids = unserialize($postmeta->meta_value);
|
1064 |
-
if (is_array($crosssellids)) {
|
1065 |
-
$crosssell_ids = null;
|
1066 |
-
foreach ($crosssellids as $crosssellID) {
|
1067 |
-
$crosssell_ids .= $crosssellID . ',';
|
1068 |
-
}
|
1069 |
-
$PostMetaData[$postmeta->post_id]['_crosssell_ids'] = substr($crosssell_ids, 0, -1);
|
1070 |
-
} else {
|
1071 |
-
$PostMetaData[$postmeta->post_id]['_crosssell_ids'] = '';
|
1072 |
-
}
|
1073 |
-
}
|
1074 |
-
}
|
1075 |
-
if ($postmeta->meta_key == '_thumbnail_id') {
|
1076 |
-
$attachment_file = '';
|
1077 |
-
$get_attachement = "select guid from wp_posts where ID = $postmeta->meta_value AND post_type = 'attachment'";
|
1078 |
-
$attachment = $wpdb->get_results($get_attachement);
|
1079 |
-
$attachment_file = $attachment[0]->guid;
|
1080 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
1081 |
-
$postmeta->meta_key = 'featured_image';
|
1082 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $attachment_file;
|
1083 |
-
}
|
1084 |
-
if ($postmeta->meta_key == '_visibility') {
|
1085 |
-
if ($postmeta->meta_value == 'visible') {
|
1086 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 1;
|
1087 |
-
}
|
1088 |
-
if ($postmeta->meta_value == 'catalog') {
|
1089 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 2;
|
1090 |
-
}
|
1091 |
-
if ($postmeta->meta_value == 'search') {
|
1092 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 3;
|
1093 |
-
}
|
1094 |
-
if ($postmeta->meta_value == 'hidden') {
|
1095 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 4;
|
1096 |
-
}
|
1097 |
-
}
|
1098 |
-
if ($postmeta->meta_key == '_stock_status') {
|
1099 |
-
if ($postmeta->meta_value == 'instock') {
|
1100 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 1;
|
1101 |
-
}
|
1102 |
-
if ($postmeta->meta_value == 'outofstock') {
|
1103 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 2;
|
1104 |
-
}
|
1105 |
-
}
|
1106 |
-
if ($postmeta->meta_key == '_tax_status') {
|
1107 |
-
if ($postmeta->meta_value == 'taxable') {
|
1108 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 1;
|
1109 |
-
}
|
1110 |
-
if ($postmeta->meta_value == 'shipping') {
|
1111 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 2;
|
1112 |
-
}
|
1113 |
-
if ($postmeta->meta_value == 'none') {
|
1114 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 3;
|
1115 |
-
}
|
1116 |
-
}
|
1117 |
-
if ($postmeta->meta_key == '_tax_class') {
|
1118 |
-
if ($postmeta->meta_value == '') {
|
1119 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 1;
|
1120 |
-
}
|
1121 |
-
if ($postmeta->meta_value == 'reduced-rate') {
|
1122 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 2;
|
1123 |
-
}
|
1124 |
-
if ($postmeta->meta_value == 'zero-rate') {
|
1125 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 3;
|
1126 |
-
}
|
1127 |
-
}
|
1128 |
-
if ($postmeta->meta_key == '_backorders') {
|
1129 |
-
if ($postmeta->meta_value == 'no') {
|
1130 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 1;
|
1131 |
-
}
|
1132 |
-
if ($postmeta->meta_value == 'notify') {
|
1133 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 2;
|
1134 |
-
}
|
1135 |
-
if ($postmeta->meta_value == 'yes') {
|
1136 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = 3;
|
1137 |
-
}
|
1138 |
-
}
|
1139 |
-
if ($postmeta->meta_key == '_featured') {
|
1140 |
-
if ($postmeta->meta_value == 'no') {
|
1141 |
-
$PostMetaData[$postmeta->post_id]['featured_product'] = 1;
|
1142 |
-
}
|
1143 |
-
if ($postmeta->meta_value == 'yes') {
|
1144 |
-
$PostMetaData[$postmeta->post_id]['featured_product'] = 2;
|
1145 |
-
}
|
1146 |
-
if ($postmeta->meta_value == 'zero-rate') {
|
1147 |
-
$PostMetaData[$postmeta->post_id]['featured_product'] = 3;
|
1148 |
-
}
|
1149 |
-
}
|
1150 |
-
if ($postmeta->meta_key == '_product_type') {
|
1151 |
-
if ($postmeta->meta_value == 'simple') {
|
1152 |
-
$PostMetaData[$postmeta->post_id]['featured_product'] = 1;
|
1153 |
-
}
|
1154 |
-
if ($postmeta->meta_value == 'grouped') {
|
1155 |
-
$PostMetaData[$postmeta->post_id]['featured_product'] = 2;
|
1156 |
-
}
|
1157 |
-
if ($postmeta->meta_value == 'variable') {
|
1158 |
-
$PostMetaData[$postmeta->post_id]['featured_product'] = 4;
|
1159 |
-
}
|
1160 |
-
}
|
1161 |
-
}
|
1162 |
-
|
1163 |
-
}
|
1164 |
-
// Tags & Categories
|
1165 |
-
$postTags = $postCategory = '';
|
1166 |
-
$taxonomies = get_object_taxonomies($exporttype);
|
1167 |
-
$get_tags = get_the_terms($postID, 'product_tag');
|
1168 |
-
if ($get_tags) {
|
1169 |
-
foreach ($get_tags as $tags) {
|
1170 |
-
$postTags .= $tags->name . ',';
|
1171 |
-
}
|
1172 |
-
}
|
1173 |
-
$postTags = substr($postTags, 0, -1);
|
1174 |
-
$TermsData[$postID]['product_tag'] = $postTags;
|
1175 |
-
foreach ($taxonomies as $taxonomy) {
|
1176 |
-
if ($taxonomy == 'product_cat') {
|
1177 |
-
$get_categotries = wp_get_post_terms($postID, $taxonomy);
|
1178 |
-
if ($get_categotries) {
|
1179 |
-
foreach ($get_categotries as $category) {
|
1180 |
-
$postCategory .= $category->name . '|';
|
1181 |
-
}
|
1182 |
-
}
|
1183 |
-
$postCategory = substr($postCategory, 0, -1);
|
1184 |
-
$TermsData[$postID]['product_category'] = $postCategory;
|
1185 |
-
}
|
1186 |
-
}
|
1187 |
-
}
|
1188 |
-
|
1189 |
-
$ExportData = array();
|
1190 |
-
// Merge all arrays
|
1191 |
-
foreach ($PostData as $pd_key => $pd_val) {
|
1192 |
-
if (array_key_exists($pd_key, $PostMetaData)) {
|
1193 |
-
$ExportData[$pd_key] = array_merge($PostData[$pd_key], $PostMetaData[$pd_key]);
|
1194 |
-
}
|
1195 |
-
if (array_key_exists($pd_key, $TermsData)) {
|
1196 |
-
$ExportData[$pd_key] = array_merge($ExportData[$pd_key], $TermsData[$pd_key]);
|
1197 |
-
}
|
1198 |
-
}
|
1199 |
-
foreach ($Header as $header_key) {
|
1200 |
-
foreach ($ExportData as $ED_key) {
|
1201 |
-
if (array_key_exists($header_key, $ED_key)) {
|
1202 |
-
$CSVContent[$header_key][] = $ED_key[$header_key];
|
1203 |
-
} else {
|
1204 |
-
$CSVContent[$header_key][] = '';
|
1205 |
-
}
|
1206 |
-
}
|
1207 |
-
}
|
1208 |
-
}
|
1209 |
-
# GENERATE AS CSV
|
1210 |
-
$CSVDATA = array();
|
1211 |
-
for ($j = 0; $j < $fieldsCount; $j++) {
|
1212 |
-
foreach ($Header as $value) {
|
1213 |
-
$CSVDATA[$j] .= '"' . $CSVContent[$value][$j] . '",';
|
1214 |
-
}
|
1215 |
-
}
|
1216 |
-
$CSV_FILE_CONTENT = array();
|
1217 |
-
foreach ($Header as $csv_header) {
|
1218 |
-
if ($csv_header == 'post_title') {
|
1219 |
-
$csv_header = 'product_name';
|
1220 |
-
}
|
1221 |
-
if ($csv_header == 'post_content') {
|
1222 |
-
$csv_header = 'product_content';
|
1223 |
-
}
|
1224 |
-
if ($csv_header == 'post_name') {
|
1225 |
-
$csv_header = 'product_slug';
|
1226 |
-
}
|
1227 |
-
if ($csv_header == 'post_excerpt') {
|
1228 |
-
$csv_header = 'product_short_description';
|
1229 |
-
}
|
1230 |
-
if ($csv_header == 'post_status') {
|
1231 |
-
$csv_header = 'product_status';
|
1232 |
-
}
|
1233 |
-
if ($csv_header == 'post_date') {
|
1234 |
-
$csv_header = 'product_publish_date';
|
1235 |
-
}
|
1236 |
-
if ($csv_header == '_product_type') {
|
1237 |
-
$csv_header = 'product_type';
|
1238 |
-
}
|
1239 |
-
if ($csv_header == '_product_shipping_class') {
|
1240 |
-
$csv_header = 'product_shipping_class';
|
1241 |
-
}
|
1242 |
-
if ($csv_header == '_visibility') {
|
1243 |
-
$csv_header = 'visibility';
|
1244 |
-
}
|
1245 |
-
if ($csv_header == '_stock_status') {
|
1246 |
-
$csv_header = 'stock_status';
|
1247 |
-
}
|
1248 |
-
if ($csv_header == '_manage_stock') {
|
1249 |
-
$csv_header = 'manage_stock';
|
1250 |
-
}
|
1251 |
-
if ($csv_header == '_total_sales') {
|
1252 |
-
$csv_header = 'total_sales';
|
1253 |
-
}
|
1254 |
-
if ($csv_header == '_downloadable') {
|
1255 |
-
$csv_header = 'downloadable';
|
1256 |
-
}
|
1257 |
-
if ($csv_header == '_virtual') {
|
1258 |
-
$csv_header = 'virtual';
|
1259 |
-
}
|
1260 |
-
if ($csv_header == '_product_image_gallery') {
|
1261 |
-
$csv_header = 'product_image_gallery';
|
1262 |
-
}
|
1263 |
-
if ($csv_header == '_regular_price') {
|
1264 |
-
$csv_header = 'regular_price';
|
1265 |
-
}
|
1266 |
-
if ($csv_header == '_sale_price') {
|
1267 |
-
$csv_header = 'sale_price';
|
1268 |
-
}
|
1269 |
-
if ($csv_header == '_tax_status') {
|
1270 |
-
$csv_header = 'tax_status';
|
1271 |
-
}
|
1272 |
-
if ($csv_header == '_tax_class') {
|
1273 |
-
$csv_header = 'tax_class';
|
1274 |
-
}
|
1275 |
-
if ($csv_header == '_purchase_note') {
|
1276 |
-
$csv_header = 'purchase_note';
|
1277 |
-
}
|
1278 |
-
if ($csv_header == '_featured') {
|
1279 |
-
$csv_header = 'featured_product';
|
1280 |
-
}
|
1281 |
-
if ($csv_header == '_weight') {
|
1282 |
-
$csv_header = 'weight';
|
1283 |
-
}
|
1284 |
-
if ($csv_header == '_length') {
|
1285 |
-
$csv_header = 'length';
|
1286 |
-
}
|
1287 |
-
if ($csv_header == '_width') {
|
1288 |
-
$csv_header = 'width';
|
1289 |
-
}
|
1290 |
-
if ($csv_header == '_height') {
|
1291 |
-
$csv_header = 'height';
|
1292 |
-
}
|
1293 |
-
if ($csv_header == '_sku') {
|
1294 |
-
$csv_header = 'sku';
|
1295 |
-
}
|
1296 |
-
if ($csv_header == '_upsell_ids') {
|
1297 |
-
$csv_header = 'upsell_ids';
|
1298 |
-
}
|
1299 |
-
if ($csv_header == '_crosssell_ids') {
|
1300 |
-
$csv_header = 'crosssell_ids';
|
1301 |
-
}
|
1302 |
-
if ($csv_header == '_product_attribute_name') {
|
1303 |
-
$csv_header = 'product_attribute_name';
|
1304 |
-
}
|
1305 |
-
if ($csv_header == '_product_attribute_value') {
|
1306 |
-
$csv_header = 'product_attribute_value';
|
1307 |
-
}
|
1308 |
-
if ($csv_header == '_product_attribute_visible') {
|
1309 |
-
$csv_header = 'product_attribute_visible';
|
1310 |
-
}
|
1311 |
-
if ($csv_header == '_product_attribute_variation') {
|
1312 |
-
$csv_header = 'product_attribute_variation';
|
1313 |
-
}
|
1314 |
-
if ($csv_header == '_sale_price_dates_from') {
|
1315 |
-
$csv_header = 'sale_price_dates_from';
|
1316 |
-
}
|
1317 |
-
if ($csv_header == '_sale_price_dates_to') {
|
1318 |
-
$csv_header = 'sale_price_dates_to';
|
1319 |
-
}
|
1320 |
-
if ($csv_header == '_price') {
|
1321 |
-
$csv_header = 'price';
|
1322 |
-
}
|
1323 |
-
if ($csv_header == '_stock') {
|
1324 |
-
$csv_header = 'stock';
|
1325 |
-
}
|
1326 |
-
if ($csv_header == '_backorders') {
|
1327 |
-
$csv_header = 'backorders';
|
1328 |
-
}
|
1329 |
-
if ($csv_header == '_file_paths') {
|
1330 |
-
$csv_header = 'file_paths';
|
1331 |
-
}
|
1332 |
-
if ($csv_header == '_download_limit') {
|
1333 |
-
$csv_header = 'download_limit';
|
1334 |
-
}
|
1335 |
-
if ($csv_header == '_download_expiry') {
|
1336 |
-
$csv_header = 'download_expiry';
|
1337 |
-
}
|
1338 |
-
if ($csv_header == '_product_url') {
|
1339 |
-
$csv_header = 'product_url';
|
1340 |
-
}
|
1341 |
-
if ($csv_header == '_button_text') {
|
1342 |
-
$csv_header = 'button_text';
|
1343 |
-
}
|
1344 |
-
if ($csv_header == '_sold_individually') {
|
1345 |
-
$csv_header = 'sold_individually';
|
1346 |
-
}
|
1347 |
-
if ($csv_header == '_aioseop_keywords') {
|
1348 |
-
$csv_header = 'seo_keywords';
|
1349 |
-
}
|
1350 |
-
if ($csv_header == '_aioseop_description') {
|
1351 |
-
$csv_header = 'seo_description';
|
1352 |
-
}
|
1353 |
-
if ($csv_header == '_aioseop_title') {
|
1354 |
-
$csv_header = 'seo_title';
|
1355 |
-
}
|
1356 |
-
if ($csv_header == '_aioseop_noindex') {
|
1357 |
-
$csv_header = 'seo_noindex';
|
1358 |
-
}
|
1359 |
-
if ($csv_header == '_aioseop_nofollow') {
|
1360 |
-
$csv_header = 'seo_nofollow';
|
1361 |
-
}
|
1362 |
-
if ($csv_header == '_aioseop_disable') {
|
1363 |
-
$csv_header = 'seo_disable';
|
1364 |
-
}
|
1365 |
-
if ($csv_header == '_aioseop_disable_analytics') {
|
1366 |
-
$csv_header = 'seo_disable_analytics';
|
1367 |
-
}
|
1368 |
-
if ($csv_header == '_yoast_wpseo_focuskw') {
|
1369 |
-
$csv_header = 'focus_keyword';
|
1370 |
-
}
|
1371 |
-
if ($csv_header == '_yoast_wpseo_title') {
|
1372 |
-
$csv_header = 'title';
|
1373 |
-
}
|
1374 |
-
if ($csv_header == '_yoast_wpseo_metadesc') {
|
1375 |
-
$csv_header = 'meta_desc';
|
1376 |
-
}
|
1377 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-noindex') {
|
1378 |
-
$csv_header = 'meta-robots-noindex';
|
1379 |
-
}
|
1380 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-nofollow') {
|
1381 |
-
$csv_header = 'meta-robots-nofollow';
|
1382 |
-
}
|
1383 |
-
if ($csv_header == '_yoast_wpseo_meta-robots-adv') {
|
1384 |
-
$csv_header = 'meta-robots-adv';
|
1385 |
-
}
|
1386 |
-
if ($csv_header == '_yoast_wpseo_sitemap-include') {
|
1387 |
-
$csv_header = 'sitemap-include';
|
1388 |
-
}
|
1389 |
-
if ($csv_header == '_yoast_wpseo_sitemap-prio') {
|
1390 |
-
$csv_header = 'sitemap-prio';
|
1391 |
-
}
|
1392 |
-
if ($csv_header == '_yoast_wpseo_canonical') {
|
1393 |
-
$csv_header = 'canonical';
|
1394 |
-
}
|
1395 |
-
if ($csv_header == '_yoast_wpseo_redirect') {
|
1396 |
-
$csv_header = 'redirect';
|
1397 |
-
}
|
1398 |
-
if ($csv_header == '_yoast_wpseo_opengraph-description') {
|
1399 |
-
$csv_header = 'opengraph-description';
|
1400 |
-
}
|
1401 |
-
if ($csv_header == '_yoast_wpseo_google-plus-description') {
|
1402 |
-
$csv_header = 'google-plus-description';
|
1403 |
-
}
|
1404 |
-
$CSV_FILE_CONTENT .= $csv_header . ",";
|
1405 |
-
}
|
1406 |
-
$CSV_FILE_CONTENT = substr($CSV_FILE_CONTENT, 0, -1);
|
1407 |
-
$CSV_FILE_CONTENT .= "\n";
|
1408 |
-
if ($CSVDATA) {
|
1409 |
-
foreach ($CSVDATA as $csv_content) {
|
1410 |
-
$csv_content = substr($csv_content, 0, -1);
|
1411 |
-
$CSV_FILE_CONTENT .= $csv_content . "\n";
|
1412 |
-
}
|
1413 |
-
}
|
1414 |
-
}
|
1415 |
-
#TODO: What is this?
|
1416 |
-
echo '<pre>';
|
1417 |
-
print_r($CSV_FILE_CONTENT);
|
1418 |
-
die('it exiusrs');
|
1419 |
-
header("Content-type: text/x-csv"); # DECLARING FILE TYPE
|
1420 |
-
header("Content-Transfer-Encoding: binary");
|
1421 |
-
header("Content-Disposition: attachment; filename=" . $csv_file_name); # EXPORT GENERATED CSV FILE
|
1422 |
-
header("Pragma: no-cache");
|
1423 |
-
header("Expires: 0");
|
1424 |
-
print($CSV_FILE_CONTENT);
|
1425 |
-
die;
|
1426 |
-
return $data;
|
1427 |
-
}
|
1428 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/old_export/templates/export.php
DELETED
@@ -1,663 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/******************************************************************************************
|
3 |
-
* Copyright (C) Smackcoders 2014 - All Rights Reserved
|
4 |
-
* Unauthorized copying of this file, via any medium is strictly prohibited
|
5 |
-
* Proprietary and confidential
|
6 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
7 |
-
*******************************************************************************************/
|
8 |
-
|
9 |
-
require_once('../../../../../../wp-load.php');
|
10 |
-
require_once('../../../includes/Importer.php');
|
11 |
-
|
12 |
-
$ExportObj = new WPCSVProExportData();
|
13 |
-
#print('<pre>'); print_r($_POST); //die;
|
14 |
-
$ExportObj->executeIndex($_POST);
|
15 |
-
class WPCSVProExportData {
|
16 |
-
public function __construct() {
|
17 |
-
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* The actions index method
|
22 |
-
* @param array $request
|
23 |
-
* @return array
|
24 |
-
*/
|
25 |
-
public function executeIndex($request) {
|
26 |
-
#print('<pre>'); print_r($request); print('</pre>'); die;
|
27 |
-
if($request['export'] == 'category') {
|
28 |
-
$this->WPImpExportCategories($request);
|
29 |
-
}
|
30 |
-
else if($request['export'] == 'tags') {
|
31 |
-
$this->WPImpExportTags($request);
|
32 |
-
}
|
33 |
-
else if($request['export'] == 'customtaxonomy') {
|
34 |
-
$this->WPImpExportTaxonomies($request);
|
35 |
-
}
|
36 |
-
else if($request['export'] == 'customerreviews') {
|
37 |
-
$this->WPImpExportCustomerReviews($request);
|
38 |
-
}
|
39 |
-
else if($request['export'] == 'comments') {
|
40 |
-
$this->WPImpExportComments($request);
|
41 |
-
}
|
42 |
-
else if($request['export'] == 'users') {
|
43 |
-
$this->WPImpExportUsers($request);
|
44 |
-
}
|
45 |
-
else {
|
46 |
-
$this->WPImpFreeExportData($request);#die;
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
*
|
52 |
-
*/
|
53 |
-
public function generateCSVHeaders($exporttype){
|
54 |
-
global $wpdb;
|
55 |
-
$post_type = $exporttype;
|
56 |
-
$unwantedHeader = array('_eshop_product', '_wp_attached_file', '_wp_page_template', '_wp_attachment_metadata', '_encloseme');
|
57 |
-
if($exporttype == 'eshop')
|
58 |
-
$post_type = 'post';
|
59 |
-
if($exporttype == 'custompost') {
|
60 |
-
$post_type = $_POST['export_post_type'];
|
61 |
-
}
|
62 |
-
$header_query1 = "SELECT wp.* FROM $wpdb->posts wp where post_type = '$post_type'";
|
63 |
-
$header_query2 = "SELECT post_id, meta_key, meta_value FROM $wpdb->posts wp JOIN $wpdb->postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') and meta_key NOT LIKE 'field_%' and meta_key NOT LIKE '_wp_types%'";
|
64 |
-
$result_header_query1 = $wpdb->get_results($header_query1);
|
65 |
-
$result_header_query2 = $wpdb->get_results($header_query2);
|
66 |
-
|
67 |
-
foreach ($result_header_query1 as $rhq1_key) {
|
68 |
-
foreach ($rhq1_key as $rhq1_headkey => $rhq1_headval) {
|
69 |
-
if (!in_array($rhq1_headkey, $Header))
|
70 |
-
$Header[] = $rhq1_headkey;
|
71 |
-
}
|
72 |
-
}
|
73 |
-
foreach($this->getAIOSEOfields() as $aioseokey => $aioseoval) {
|
74 |
-
$Header[] = $aioseoval;
|
75 |
-
$unwantedHeader[] = $aioseokey;
|
76 |
-
}
|
77 |
-
foreach ($result_header_query2 as $rhq2_headkey) {
|
78 |
-
if (!in_array($rhq2_headkey->meta_key, $Header)) {
|
79 |
-
if(!in_array($rhq2_headkey->meta_key, $unwantedHeader)) {
|
80 |
-
$Header[] = $rhq2_headkey->meta_key;
|
81 |
-
}
|
82 |
-
}
|
83 |
-
}
|
84 |
-
|
85 |
-
#print('<pre>'); print_r($Header); die;
|
86 |
-
if($exporttype == 'eshop') {
|
87 |
-
foreach($this->EshopHeaders() as $eshop_hkey => $eshop_hval) {
|
88 |
-
if(in_array($eshop_hval, $Header))
|
89 |
-
$ProHeader[] = $eshop_hkey;
|
90 |
-
else
|
91 |
-
$ProHeader[] = $eshop_hkey;
|
92 |
-
}
|
93 |
-
|
94 |
-
foreach($this->getAIOSEOfields() as $aioseokey => $aioseoval) {
|
95 |
-
$ProHeader[] = $aioseoval;
|
96 |
-
}
|
97 |
-
return $ProHeader;
|
98 |
-
}
|
99 |
-
if(!in_array('', $Header) && !in_array('', $Header)){
|
100 |
-
$Header[] = 'post_tag';
|
101 |
-
$Header[] = 'post_category';
|
102 |
-
}
|
103 |
-
return $Header;
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
*
|
108 |
-
*/
|
109 |
-
public function get_all_record_ids($exporttype, $request) {
|
110 |
-
global $wpdb;
|
111 |
-
$post_type = $exporttype;
|
112 |
-
$get_post_ids = "select DISTINCT ID from $wpdb->posts p join $wpdb->postmeta pm on pm.post_id = p.ID";
|
113 |
-
if($post_type == 'eshop')
|
114 |
-
$post_type = 'post';
|
115 |
-
if($post_type == 'custompost')
|
116 |
-
$post_type = $_POST['export_post_type'];
|
117 |
-
|
118 |
-
$get_post_ids .= " where p.post_type = '$post_type'";
|
119 |
-
if(isset($request['getdatawithspecificstatus'])) {
|
120 |
-
if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'All') {
|
121 |
-
$get_post_ids .= " and p.post_status in ('publish','draft','future','private','pending')";
|
122 |
-
} else if(isset($request['postwithstatus']) && ($request['postwithstatus'] == 'Publish' || $request['postwithstatus'] == 'Sticky')) {
|
123 |
-
$get_post_ids .= " and p.post_status in ('publish')";
|
124 |
-
} else if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Draft') {
|
125 |
-
$get_post_ids .= " and p.post_status in ('draft')";
|
126 |
-
} else if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Scheduled') {
|
127 |
-
$get_post_ids .= " and p.post_status in ('future')";
|
128 |
-
} else if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Private') {
|
129 |
-
$get_post_ids .= " and p.post_status in ('private')";
|
130 |
-
} else if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Pending') {
|
131 |
-
$get_post_ids .= " and p.post_status in ('pending')";
|
132 |
-
} else if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Protected') {
|
133 |
-
$get_post_ids .= " and p.post_status in ('publish') and post_password != ''";
|
134 |
-
}
|
135 |
-
} else {
|
136 |
-
$get_post_ids .= " and p.post_status in ('publish','draft','future','private','pending')";
|
137 |
-
}
|
138 |
-
if(isset($request['getdataforspecificperiod'])) {
|
139 |
-
$get_post_ids .= " and p.post_date >= '" . $request['postdatefrom'] . "' and p.post_date <= '" . $request['postdateto'] . "'";
|
140 |
-
}
|
141 |
-
if($exporttype == 'eshop')
|
142 |
-
$get_post_ids .= " and pm.meta_key = 'sku'";
|
143 |
-
|
144 |
-
if(isset($request['getdatabyspecificauthors'])) {
|
145 |
-
if(isset($request['postauthor']) && $request['postauthor'] != 0) {
|
146 |
-
$get_post_ids .= " and p.post_author = {$request['postauthor']}";
|
147 |
-
}
|
148 |
-
}
|
149 |
-
#print_r($get_post_ids); die;
|
150 |
-
$result = $wpdb->get_col($get_post_ids);
|
151 |
-
if(isset($request['getdatawithspecificstatus'])) {
|
152 |
-
if(isset($request['postwithstatus']) && $request['postwithstatus'] == 'Sticky') {
|
153 |
-
$get_sticky_posts = get_option('sticky_posts');
|
154 |
-
foreach($get_sticky_posts as $sticky_post_id) {
|
155 |
-
if(in_array($sticky_post_id, $result))
|
156 |
-
$sticky_posts[] = $sticky_post_id;
|
157 |
-
}
|
158 |
-
return $sticky_posts;
|
159 |
-
}
|
160 |
-
}
|
161 |
-
#print_r($get_sticky_posts);
|
162 |
-
#print_r($result);die;
|
163 |
-
return $result;
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
*
|
168 |
-
*/
|
169 |
-
public function getPostDatas($postID) {
|
170 |
-
global $wpdb;
|
171 |
-
$query1 = "SELECT wp.* FROM $wpdb->posts wp where ID=$postID";
|
172 |
-
$result_query1 = $wpdb->get_results($query1);
|
173 |
-
if (!empty($result_query1)) {
|
174 |
-
foreach ($result_query1 as $posts) {
|
175 |
-
foreach ($posts as $post_key => $post_value) {
|
176 |
-
if ($post_key == 'post_status') {
|
177 |
-
if (is_sticky($postID)) {
|
178 |
-
$PostData[$post_key] = 'Sticky';
|
179 |
-
$post_status = 'Sticky';
|
180 |
-
} else {
|
181 |
-
$PostData[$post_key] = $post_value;
|
182 |
-
$post_status = $post_value;
|
183 |
-
}
|
184 |
-
} else {
|
185 |
-
$PostData[$post_key] = $post_value;
|
186 |
-
}
|
187 |
-
if ($post_key == 'post_password') {
|
188 |
-
if ($post_value) {
|
189 |
-
$PostData['post_status'] = "{" . $post_value . "}";
|
190 |
-
} else {
|
191 |
-
$PostData['post_status'] = $post_status;
|
192 |
-
}
|
193 |
-
}
|
194 |
-
if ($post_key == 'comment_status') {
|
195 |
-
if ($post_value == 'closed') {
|
196 |
-
$PostData['comment_status'] = 0;
|
197 |
-
}
|
198 |
-
if ($post_value == 'open') {
|
199 |
-
$PostData['comment_status'] = 1;
|
200 |
-
}
|
201 |
-
}
|
202 |
-
}
|
203 |
-
}
|
204 |
-
}
|
205 |
-
return $PostData;
|
206 |
-
}
|
207 |
-
|
208 |
-
/**
|
209 |
-
*
|
210 |
-
*/
|
211 |
-
public function getPostMetaDatas($postID) {
|
212 |
-
global $wpdb;
|
213 |
-
$query2 = "SELECT post_id, meta_key, meta_value FROM $wpdb->posts wp JOIN $wpdb->postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') AND ID=$postID";
|
214 |
-
#print($query2); print('<br>');
|
215 |
-
$result = $wpdb->get_results($query2);
|
216 |
-
return $result;
|
217 |
-
}
|
218 |
-
|
219 |
-
/**
|
220 |
-
*
|
221 |
-
*/
|
222 |
-
public function getAIOSEOfields() {
|
223 |
-
$aioseofields = array('_aioseop_keywords' => 'seo_keywords',
|
224 |
-
'_aioseop_description' => 'seo_description',
|
225 |
-
'_aioseop_title' => 'seo_title',
|
226 |
-
'_aioseop_noindex' => 'seo_noindex',
|
227 |
-
'_aioseop_nofollow' => 'seo_nofollow',
|
228 |
-
'_aioseop_disable' => 'seo_disable',
|
229 |
-
'_aioseop_disable_analytics' => 'seo_disable_analytics',
|
230 |
-
'_aioseop_noodp' => 'seo_noodp',
|
231 |
-
'_aioseop_noydir' => 'seo_noydir',);
|
232 |
-
return $aioseofields;
|
233 |
-
}
|
234 |
-
|
235 |
-
/**
|
236 |
-
*
|
237 |
-
*/
|
238 |
-
public function getAllTerms($postID, $type) {
|
239 |
-
// Tags & Categories
|
240 |
-
$get_tags = wp_get_post_tags($postID, array('fields' => 'names'));
|
241 |
-
$postTags = $postCategory = '';
|
242 |
-
foreach ($get_tags as $tags) {
|
243 |
-
$postTags .= $tags . ',';
|
244 |
-
}
|
245 |
-
$postTags = substr($postTags, 0, -1);
|
246 |
-
$TermsData['post_tag'] = $postTags;
|
247 |
-
$get_categotries = wp_get_post_categories($postID, array('fields' => 'names'));
|
248 |
-
foreach ($get_categotries as $category) {
|
249 |
-
$postCategory .= $category . '|';
|
250 |
-
}
|
251 |
-
$postCategory = substr($postCategory, 0, -1);
|
252 |
-
$TermsData['post_category'] = $postCategory;
|
253 |
-
return $TermsData;
|
254 |
-
}
|
255 |
-
|
256 |
-
/**
|
257 |
-
*
|
258 |
-
*/
|
259 |
-
public function EshopHeaders() {
|
260 |
-
$eshopHeaders = array('post_title' => 'post_title', 'post_content' => 'post_content', 'post_excerpt' => 'post_excerpt', 'post_date' => 'post_date', 'post_name' => 'post_name', 'post_status' => 'post_status', 'post_author' => 'post_author', 'post_parent' => 0, 'comment_status' => 'open', 'ping_status' => 'open', 'SKU' => 'sku', 'products_option' => 'products_option', 'sale_price' => 'sale_price', 'regular_price' => 'regular_price', 'description' => 'description', 'shiprate' => 'shiprate', 'optset' => null, 'featured_product' => 'featured', 'product_in_sale' => '_eshop_sale', 'stock_available' => '_eshop_stock', 'cart_option' => 'cart_radio', 'category' => 'post_category', 'tags' => 'post_tag', 'featured_image' => null,);
|
261 |
-
return $eshopHeaders;
|
262 |
-
}
|
263 |
-
|
264 |
-
/**
|
265 |
-
* @param $request
|
266 |
-
* @return array
|
267 |
-
*/
|
268 |
-
public function WPImpFreeExportData($request) {
|
269 |
-
#print('<pre>'); print_r($this->getACFvalues()); die;
|
270 |
-
global $wpdb;
|
271 |
-
$export_delimiter = ',';
|
272 |
-
$exporttype = $_POST['export'];
|
273 |
-
$wpcsvsettings=get_option('wpcsvprosettings');
|
274 |
-
if(isset($wpcsvsettings['export_delimiter'])){
|
275 |
-
$export_delimiter = $wpcsvsettings['export_delimiter'];
|
276 |
-
}
|
277 |
-
if($_POST['export_filename'])
|
278 |
-
$csv_file_name =$_POST['export_filename'].'.csv';
|
279 |
-
else
|
280 |
-
$csv_file_name='exportas_'.date("Y").'-'.date("m").'-'.date("d").'.csv';
|
281 |
-
$wptypesfields = get_option('wpcf-fields');
|
282 |
-
#print('<pre>'); print_r($wptypesfields); die;
|
283 |
-
#print('<pre>'); print_r($_POST); print('</pre>');
|
284 |
-
//if($exporttype=='post' || $exporttype=='page' || $exporttype=='custompost') {
|
285 |
-
if($exporttype == 'custompost') {
|
286 |
-
$exporttype = $_POST['export_post_type'];
|
287 |
-
}
|
288 |
-
$Header = $this->generateCSVHeaders($exporttype);
|
289 |
-
$result = $this->get_all_record_ids($exporttype, $request);
|
290 |
-
#print('<pre>'); print_r($Header); print_r($result); print('</pre>'); die;
|
291 |
-
$fieldsCount = count($result);
|
292 |
-
if ($result) {
|
293 |
-
foreach ($result as $postID) {
|
294 |
-
$pId = $pId . ',' . $postID;
|
295 |
-
$PostData[$postID] = $this->getPostDatas($postID);
|
296 |
-
#print('<pre>'); print_r($PostData); #die;
|
297 |
-
$result_query2 = $this->getPostMetaDatas($postID);
|
298 |
-
#print('<pre>'); print_r($result_query2); print('</pre>'); #die;
|
299 |
-
|
300 |
-
$possible_values = array('s:', 'a:', ':{');
|
301 |
-
if (!empty($result_query2)) {
|
302 |
-
foreach ($result_query2 as $postmeta) {
|
303 |
-
$typesFserialized = 0;
|
304 |
-
$isFound = explode('wpcf-',$postmeta->meta_key);
|
305 |
-
if(count($isFound) == 2){
|
306 |
-
foreach($wptypesfields as $typesKey => $typesVal){
|
307 |
-
if($postmeta->meta_key == 'wpcf-'.$typesKey){
|
308 |
-
foreach($possible_values as $posval){
|
309 |
-
if(strpos($postmeta->meta_value,$posval)){
|
310 |
-
$typesFserialized = 1;
|
311 |
-
} else {
|
312 |
-
$typesFserialized = 0;
|
313 |
-
}
|
314 |
-
}
|
315 |
-
if($typesFserialized == 1){
|
316 |
-
$getMetaData = get_post_meta($postID, $postmeta->meta_key);
|
317 |
-
if(!is_array($getMetaData[0])){
|
318 |
-
$get_all_values = unserialize($getMetaData[0]);
|
319 |
-
$get_values = $get_all_values[0];
|
320 |
-
} else {
|
321 |
-
$get_values = $getMetaData[0];
|
322 |
-
}
|
323 |
-
$typesFVal = null;
|
324 |
-
if($typesVal['type'] == 'checkboxes'){
|
325 |
-
foreach($get_values as $authorKey => $authorVal) {
|
326 |
-
foreach($typesVal['data']['options'] as $doKey => $doVal){
|
327 |
-
if($doKey == $authorKey)
|
328 |
-
$typesFVal .= $doVal['title'].',';
|
329 |
-
}
|
330 |
-
}
|
331 |
-
$typesFVal = substr($typesFVal, 0, -1);
|
332 |
-
} elseif($typesVal['type'] == 'skype') {
|
333 |
-
$typesFVal = $get_values['skypename'];
|
334 |
-
}
|
335 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $typesFVal;
|
336 |
-
} else {
|
337 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
|
338 |
-
}
|
339 |
-
}
|
340 |
-
}
|
341 |
-
} else {
|
342 |
-
// Eshop product meta datas starts here
|
343 |
-
if ($postmeta->meta_key == 'featured') {
|
344 |
-
$isFeatured = strtolower($postmeta->meta_value);
|
345 |
-
$PostMetaData[$postmeta->post_id]['featured_product'] = $isFeatured;
|
346 |
-
}
|
347 |
-
else if ($postmeta->meta_key == 'sale') {
|
348 |
-
$is_prod_sale = strtolower($postmeta->meta_value);
|
349 |
-
$PostMetaData[$postmeta->post_id]['product_in_sale'] = $is_prod_sale;
|
350 |
-
}
|
351 |
-
else if ($postmeta->meta_key == '_eshop_stock') {
|
352 |
-
if($postmeta->meta_value == 1) {
|
353 |
-
$stock_available = 'yes';
|
354 |
-
} else {
|
355 |
-
$stock_available = 'no';
|
356 |
-
}
|
357 |
-
$PostMetaData[$postmeta->post_id]['stock_available'] = $stock_available;
|
358 |
-
}
|
359 |
-
else if ($postmeta->meta_key == 'cart_radio') {
|
360 |
-
$PostMetaData[$postmeta->post_id]['cart_option'] = $postmeta->meta_value;
|
361 |
-
}
|
362 |
-
else if ($postmeta->meta_key == 'shiprate') {
|
363 |
-
$PostMetaData[$postmeta->post_id]['shiprate'] = $postmeta->meta_value;
|
364 |
-
}
|
365 |
-
else if ($postmeta->meta_key == '_eshop_product') {
|
366 |
-
$product_attr_details = unserialize($postmeta->meta_value);
|
367 |
-
$prod_option = $sale_price = $reg_price = null;
|
368 |
-
#print('<pre>');print_r($product_attr_details); #die;
|
369 |
-
foreach($product_attr_details as $prod_att_det_Key => $prod_att_det_Val) {
|
370 |
-
if($prod_att_det_Key == 'sku') {
|
371 |
-
$PostMetaData[$postmeta->post_id]['sku'] = $prod_att_det_Val;
|
372 |
-
}
|
373 |
-
else if($prod_att_det_Key == 'products') {
|
374 |
-
foreach($prod_att_det_Val as $all_prod_options) {
|
375 |
-
$prod_option .= $all_prod_options['option'] . ',';
|
376 |
-
$sale_price .= $all_prod_options['saleprice'] . ',';
|
377 |
-
$reg_price .= $all_prod_options['price'] . ',';
|
378 |
-
}
|
379 |
-
$prod_option = substr($prod_option, 0, -1);
|
380 |
-
$sale_price = substr($sale_price, 0, -1);
|
381 |
-
$reg_price = substr($reg_price, 0, -1);
|
382 |
-
$PostMetaData[$postmeta->post_id]['products_option'] = $prod_option;
|
383 |
-
$PostMetaData[$postmeta->post_id]['sale_price'] = $sale_price;
|
384 |
-
$PostMetaData[$postmeta->post_id]['regular_price'] = $reg_price;
|
385 |
-
}
|
386 |
-
}
|
387 |
-
#$PostMetaData[$postmeta->post_id]['cart_option'] = $postmeta->meta_value;
|
388 |
-
}
|
389 |
-
// Eshop product meta datas ends here
|
390 |
-
else if ($postmeta->meta_key == '_thumbnail_id') {
|
391 |
-
$attachment_file = '';
|
392 |
-
$get_attachement = "select guid from $wpdb->posts where ID = $postmeta->meta_value AND post_type = 'attachment'";
|
393 |
-
$attachment = $wpdb->get_results($get_attachement);
|
394 |
-
$attachment_file = $attachment[0]->guid;
|
395 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
396 |
-
$postmeta->meta_key = 'featured_image';
|
397 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $attachment_file;
|
398 |
-
}
|
399 |
-
else if(is_array($checkbox_option_fields) && in_array($postmeta->meta_key,$checkbox_option_fields)){
|
400 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
|
401 |
-
$eshop_products = unserialize($eshop_products); //print_r($eshop_products);
|
402 |
-
foreach ($eshop_products as $key) {
|
403 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] .= $key . ',';
|
404 |
-
}
|
405 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = substr($PostMetaData[$postmeta->post_id][$postmeta->meta_key], 0, -1);
|
406 |
-
}
|
407 |
-
else {
|
408 |
-
$PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
|
409 |
-
}
|
410 |
-
}
|
411 |
-
}
|
412 |
-
}
|
413 |
-
# print('PostMetaData: '); print('<pre>'); print_r($Header); print_r($PostMetaData); #die;
|
414 |
-
$TermsData[$postID] = $this->getAllTerms($postID,$exporttype);
|
415 |
-
}
|
416 |
-
|
417 |
-
#$ExportData = array();
|
418 |
-
// Merge all arrays
|
419 |
-
#echo '<pre>'; print_r($TermsData); die;
|
420 |
-
// echo '<pre>'; print_r($PostData); die('sds');
|
421 |
-
foreach ($PostData as $pd_key => $pd_val) {
|
422 |
-
if (array_key_exists($pd_key, $PostMetaData)) {
|
423 |
-
$ExportData[$pd_key] = array_merge($PostData[$pd_key], $PostMetaData[$pd_key]);
|
424 |
-
// echo '<pre>'; print_r($ExportData); die('exist');
|
425 |
-
} else {
|
426 |
-
$ExportData[$pd_key] = $PostData[$pd_key];
|
427 |
-
}
|
428 |
-
if (array_key_exists($pd_key, $TermsData)) {
|
429 |
-
if (empty($ExportData[$pd_key]))
|
430 |
-
$ExportData[$pd_key] = array();
|
431 |
-
$ExportData[$pd_key] = array_merge($ExportData[$pd_key], $TermsData[$pd_key]);
|
432 |
-
}
|
433 |
-
}
|
434 |
-
}
|
435 |
-
#print('<pre>'); print_r($Header); die;
|
436 |
-
#print('<pre>'); print_r($ExportData); die;
|
437 |
-
if($exporttype == 'eshop') {
|
438 |
-
foreach($Header as $hkey) {
|
439 |
-
foreach($ExportData as $edkey => $edval) {
|
440 |
-
foreach($this->EshopHeaders() as $eshophkey => $eshophval) {
|
441 |
-
if(array_key_exists($eshophval, $ExportData[$edkey])) {
|
442 |
-
$ExportData[$edkey][$eshophkey] = $edval[$eshophval];
|
443 |
-
// unset($ExportData[$edkey][$wpcomhval]);
|
444 |
-
}
|
445 |
-
}
|
446 |
-
}
|
447 |
-
}
|
448 |
-
}
|
449 |
-
#print('<pre>'); print_r($Header); print('</pre>'); #die;
|
450 |
-
# print('<pre>'); print_r($ExportData); die;
|
451 |
-
foreach ($Header as $header_key) {
|
452 |
-
if (is_array($ExportData)) {
|
453 |
-
foreach ($ExportData as $ED_key => $ED_val) {
|
454 |
-
if (in_array($header_key, $this->getAIOSEOfields())) { #die($header_key);
|
455 |
-
foreach($this->getAIOSEOfields() as $aioseokey => $aioseoval) {
|
456 |
-
$CSVContent[$ED_key][$aioseoval] = $ED_val[$aioseokey];
|
457 |
-
#unset($CSVContent[$ED_key][$header_key]);
|
458 |
-
}
|
459 |
-
} else if (array_key_exists($header_key, $ED_val)) {
|
460 |
-
$CSVContent[$ED_key][$header_key] = $ED_val[$header_key];
|
461 |
-
} else {
|
462 |
-
$CSVContent[$ED_key][$header_key] = null;
|
463 |
-
}
|
464 |
-
}
|
465 |
-
}
|
466 |
-
}
|
467 |
-
#print(count($CSVContent[22]));print('<br>' . count($Header));
|
468 |
-
#print('<pre>'); print_r($CSVContent) ;print('</pre>'); die;
|
469 |
-
$csv = new ImporterLib();
|
470 |
-
$csv->wmyuyn_3 ($csv_file_name, $CSVContent, $Header, $export_delimiter);
|
471 |
-
}
|
472 |
-
|
473 |
-
/**
|
474 |
-
*
|
475 |
-
*/
|
476 |
-
public function WPImpExportComments($request) {
|
477 |
-
global $wpdb;
|
478 |
-
$export_delimiter = ',';
|
479 |
-
$exporttype = $request['export'];
|
480 |
-
$wpcsvsettings=get_option('wpcsvprosettings');
|
481 |
-
if(isset($wpcsvsettings['export_delimiter'])){
|
482 |
-
$export_delimiter = $wpcsvsettings['export_delimiter'];
|
483 |
-
}
|
484 |
-
if($_POST['export_filename'])
|
485 |
-
$csv_file_name =$_POST['export_filename'].'.csv';
|
486 |
-
else
|
487 |
-
$csv_file_name='exportas_'.date("Y").'-'.date("m").'-'.date("d").'.csv';
|
488 |
-
|
489 |
-
$commentQuery = "SELECT * FROM $wpdb->comments " . $orderBy;
|
490 |
-
$comments = $wpdb->get_results( $commentQuery);
|
491 |
-
$mappedHeader = false;
|
492 |
-
$i = 0;
|
493 |
-
foreach($comments as $comment){
|
494 |
-
foreach($comment as $key => $value){
|
495 |
-
if(!$mappedHeader){
|
496 |
-
$Header[] = $key; // ."$export_delimiter";
|
497 |
-
}
|
498 |
-
$ExportData[$i][$key] = $value; //'"'.$value.'"'."$export_delimiter";
|
499 |
-
}
|
500 |
-
$mappedHeader = true;
|
501 |
-
$i++;
|
502 |
-
}
|
503 |
-
#print('<pre>'); print_r($header); print_r($singleCommentContent);die;
|
504 |
-
$csv = new ImporterLib();
|
505 |
-
$csv->wmyuyn_3 ($csv_file_name, $ExportData, $Header, $export_delimiter);
|
506 |
-
}
|
507 |
-
|
508 |
-
/**
|
509 |
-
*
|
510 |
-
*/
|
511 |
-
public function WPImpExportUsers($request) {
|
512 |
-
global $wpdb;
|
513 |
-
$export_delimiter = ',';
|
514 |
-
$exporttype = $request['export'];
|
515 |
-
$wpcsvsettings=get_option('wpcsvprosettings');
|
516 |
-
if(isset($wpcsvsettings['export_delimiter'])){
|
517 |
-
$export_delimiter = $wpcsvsettings['export_delimiter'];
|
518 |
-
}
|
519 |
-
if($_POST['export_filename'])
|
520 |
-
$csv_file_name =$_POST['export_filename'].'.csv';
|
521 |
-
else
|
522 |
-
$csv_file_name='exportas_'.date("Y").'-'.date("m").'-'.date("d").'.csv';
|
523 |
-
|
524 |
-
$uId = '';
|
525 |
-
$header_query1 = "SELECT *FROM $wpdb->users";
|
526 |
-
$header_query2 = "SELECT user_id, meta_key, meta_value FROM $wpdb->users wp JOIN $wpdb->usermeta wpm ON wpm.user_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last')";
|
527 |
-
$result_header_query1 = $wpdb->get_results($header_query1);
|
528 |
-
$result_header_query2 = $wpdb->get_results($header_query2);
|
529 |
-
/* print('<pre>'); print_r($result_header_query1);
|
530 |
-
print_r($result_header_query2);die; */
|
531 |
-
foreach ($result_header_query1 as $rhq1_key) {
|
532 |
-
foreach ($rhq1_key as $rhq1_headkey => $rhq1_headval) {
|
533 |
-
if (!in_array($rhq1_headkey, $Header))
|
534 |
-
$Header[] = $rhq1_headkey;
|
535 |
-
}
|
536 |
-
}
|
537 |
-
foreach ($result_header_query2 as $rhq2_headkey) {
|
538 |
-
if (!in_array($rhq2_headkey->meta_key, $Header)) {
|
539 |
-
if($rhq2_headkey->meta_key == 'mp_shipping_info' )
|
540 |
-
{
|
541 |
-
$mp_ship_header= unserialize($rhq2_headkey->meta_value);
|
542 |
-
foreach($mp_ship_header as $mp_ship_key => $mp_value) { $Header[] = "msi: ".$mp_ship_key; }
|
543 |
-
}
|
544 |
-
if($rhq2_headkey->meta_key == 'mp_billing_info' )
|
545 |
-
{
|
546 |
-
$mp_ship_header= unserialize($rhq2_headkey->meta_value);
|
547 |
-
foreach($mp_ship_header as $mp_ship_key => $mp_value) { $Header[] = "mbi: ".$mp_ship_key; }
|
548 |
-
}
|
549 |
-
|
550 |
-
if ($rhq2_headkey->meta_key != '_eshop_product' && $rhq2_headkey->meta_key != '_wp_attached_file' && $rhq2_headkey->meta_key != 'mp_shipping_info' && $rhq2_headkey->meta_key != 'mp_billing_info' )
|
551 |
-
$Header[] = $rhq2_headkey->meta_key;
|
552 |
-
}
|
553 |
-
}
|
554 |
-
#echo '<pre>'; print_r($Header); die('dsd');
|
555 |
-
$get_user_ids = "select DISTINCT ID from $wpdb->users u join $wpdb->usermeta um on um.user_id = u.ID";
|
556 |
-
|
557 |
-
$result = $wpdb->get_col($get_user_ids);
|
558 |
-
$fieldsCount = count($result);
|
559 |
-
if ($result) {
|
560 |
-
foreach ($result as $userID) {
|
561 |
-
$uId = $uId . ',' . $userID;
|
562 |
-
$query1 = "SELECT *FROM $wpdb->users where ID in ($userID);";
|
563 |
-
$result_query1 = $wpdb->get_results($query1);
|
564 |
-
if (!empty($result_query1)) {
|
565 |
-
foreach ($result_query1 as $users) {
|
566 |
-
foreach ($users as $user_key => $user_value) {
|
567 |
-
$UserData[$userID][$user_key] = $user_value;
|
568 |
-
}
|
569 |
-
}
|
570 |
-
}
|
571 |
-
// echo '<pre>'; print_r($UserData); die ('dfdf');
|
572 |
-
$query2 = "SELECT user_id, meta_key, meta_value FROM $wpdb->users wp JOIN $wpdb->usermeta wpm ON wpm.user_id = wp.ID where ID=$userID";
|
573 |
-
$possible_values = array('s:', 'a:', ':{');
|
574 |
-
$result_query2 = $wpdb->get_results($query2);
|
575 |
-
if (!empty($result_query2)) {
|
576 |
-
foreach ($result_query2 as $usermeta) {
|
577 |
-
// echo '<pre>'; print_r($usermeta);
|
578 |
-
|
579 |
-
foreach($possible_values as $posval){
|
580 |
-
if(strpos($usermeta->meta_value,$posval)){
|
581 |
-
if($usermeta->meta_key == 'mp_shipping_info' || $usermeta->meta_key == 'mp_billing_info')
|
582 |
-
$typesFserialized = 1;
|
583 |
-
} else {
|
584 |
-
$typesFserialized = 0;
|
585 |
-
}
|
586 |
-
}
|
587 |
-
if($typesFserialized == 1)
|
588 |
-
{
|
589 |
-
if($usermeta->meta_key == 'mp_shipping_info')
|
590 |
-
{
|
591 |
-
$UserID = $usermeta->user_id;
|
592 |
-
$mp_ship_data = unserialize($usermeta->meta_value);
|
593 |
-
foreach($mp_ship_data as $mp_ship_key => $mp_ship_value)
|
594 |
-
{
|
595 |
-
$mp_ship_tempkey = "msi: ".$mp_ship_key;
|
596 |
-
$UserData[$UserID][$mp_ship_tempkey]= $mp_ship_value;
|
597 |
-
}
|
598 |
-
}
|
599 |
-
|
600 |
-
if($usermeta->meta_key == 'mp_billing_info')
|
601 |
-
{
|
602 |
-
$UserID = $usermeta->user_id;
|
603 |
-
$mp_ship_data = unserialize($usermeta->meta_value);
|
604 |
-
foreach($mp_ship_data as $mp_ship_key => $mp_ship_value)
|
605 |
-
{
|
606 |
-
$mp_ship_tempkey = "mbi: ".$mp_ship_key;
|
607 |
-
$UserData[$UserID][$mp_ship_tempkey]= $mp_ship_value;
|
608 |
-
}
|
609 |
-
}
|
610 |
-
|
611 |
-
if($usermeta->meta_key != 'wp_capabilities' && $usermeta->meta_key !='mp_shipping_info' && $usermeta->meta_key != 'mp_billing_info') {
|
612 |
-
$UserData[$userID][$usermeta->meta_key] = $usermeta->meta_value;
|
613 |
-
} else {
|
614 |
-
if($usermeta->meta_key == 'wp_capabilities') {
|
615 |
-
$getUserRole = unserialize($usermeta->meta_value);
|
616 |
-
// echo '<pre>'; print_r($getUserRole); die('ddf');
|
617 |
-
foreach($getUserRole as $urKey => $urVal) {
|
618 |
-
$getUserRole = get_role($urKey);
|
619 |
-
}
|
620 |
-
$rolelevel = 0;
|
621 |
-
$isfound = array();
|
622 |
-
foreach($getUserRole->capabilities as $roleKey => $roleVal){
|
623 |
-
$isfound = explode('level_', $roleKey);
|
624 |
-
if(is_array($isfound) && count($isfound) == 2){
|
625 |
-
$rolelevel = $rolelevel + 1;
|
626 |
-
}
|
627 |
-
} $rolelevel = $rolelevel - 1;
|
628 |
-
#$UserData[$userID][$usermeta->meta_key] = $rolelevel;
|
629 |
-
}
|
630 |
-
}
|
631 |
-
} else {
|
632 |
-
foreach($possible_values as $posval){
|
633 |
-
if(strpos($usermeta->meta_value,$posval)){
|
634 |
-
$UserData[$userID][$usermeta->meta_key] = null;
|
635 |
-
} else {
|
636 |
-
$ifSerialized = 0;
|
637 |
-
$UserData[$userID][$usermeta->meta_key] = $usermeta->meta_value;
|
638 |
-
}
|
639 |
-
}
|
640 |
-
|
641 |
-
}
|
642 |
-
} #echo '<pre>'; print_r($UserData); die('dd');
|
643 |
-
}
|
644 |
-
}
|
645 |
-
}
|
646 |
-
$UserHeader = array();
|
647 |
-
foreach ($Header as $header_key) {
|
648 |
-
foreach ($UserData as $UD_key => $UD_val) {
|
649 |
-
if(array_key_exists($header_key, $UD_val)) {
|
650 |
-
$CSVContent[$UD_key][$header_key] = $UD_val[$header_key];
|
651 |
-
if(!in_array($header_key, $UserHeader))
|
652 |
-
$UserHeader[] = $header_key;
|
653 |
-
}
|
654 |
-
else {
|
655 |
-
$CSVContent[$UD_key][$header_key] = null;
|
656 |
-
}
|
657 |
-
}
|
658 |
-
}
|
659 |
-
|
660 |
-
$csv = new ImporterLib();
|
661 |
-
$csv->wmyuyn_3 ($csv_file_name, $CSVContent, $UserHeader, $export_delimiter);
|
662 |
-
}
|
663 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/old_export/templates/index.php
DELETED
@@ -1,225 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/******************************************************************************************
|
3 |
-
* Copyright (C) Smackcoders 2014 - All Rights Reserved
|
4 |
-
* Unauthorized copying of this file, via any medium is strictly prohibited
|
5 |
-
* Proprietary and confidential
|
6 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
7 |
-
*******************************************************************************************/
|
8 |
-
?>
|
9 |
-
<div class="accordion" id="accordion2" style = 'width:98%;'>
|
10 |
-
<div class="accordion-group">
|
11 |
-
<div id="collapseTwo" class="accordion-body in collapse">
|
12 |
-
<div class="accordion-inner">
|
13 |
-
<div class="title">
|
14 |
-
<span class="settings-icon"> <img src="<?php echo WP_CONTENT_URL;?>/plugins/<?php echo WP_CONST_ULTIMATE_CSV_IMP_SLUG;?>/images/export.png" width="24" height="24" /> </span>
|
15 |
-
<label><h3>Export Data With Advanced Filters</h3></label>
|
16 |
-
</div>
|
17 |
-
|
18 |
-
<div style="margin-top:20px;">
|
19 |
-
<div style="display:none;" id="ShowMsg"><p class="alert alert-warning" id="warning-msg"></p></div>
|
20 |
-
<form class="form-horizontal" method="post" name="exportmodule" action="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>modules/export/templates/export.php" onsubmit="return export_module();">
|
21 |
-
<!-- <form class="form-horizontal" method="post" name="exportmodule" action="" onsubmit="return export_module();"> -->
|
22 |
-
<div class="table-responsive">
|
23 |
-
<table style='width:100%;' class='table exportmodule'>
|
24 |
-
<th colspan='2'><label class='h-exportmodule'><h3 id="innertitle"> To export data based on the filters</h3> </label></th>
|
25 |
-
<tr>
|
26 |
-
<td><label><input type='checkbox' name='getdataforspecificperiod' id='getdataforspecificperiod' value='getdataforspecificperiod' onclick='addwpexportfilter(this.id);' /><span id="align"> Export data for the specific period</span></label>
|
27 |
-
<div id='specificperiodexport' style='padding:10px;display:none;'>
|
28 |
-
<label id='periodstartfrom'><b> Start From </b></label>
|
29 |
-
<input type='text' class='form-control' name='postdatefrom' style='cursor:default;width:25%;' readonly id='postdatefrom' value='' />
|
30 |
-
<label id='periodendto'><b> End To </b></label>
|
31 |
-
<input type='text' class='form-control' name='postdateto' style='cursor:default;width:25%;' readonly id='postdateto' value='' />
|
32 |
-
</div>
|
33 |
-
</td>
|
34 |
-
</tr>
|
35 |
-
<tr>
|
36 |
-
<td><label><input type='checkbox' name='getdatawithspecificstatus' id='getdatawithspecificstatus' value='getdatawithspecificstatus' onclick='addwpexportfilter(this.id);' /> <span id="align">Export data with the specific status</span></label>
|
37 |
-
<div id='specificstatusexport' style='padding:10px;display:none;'>
|
38 |
-
<label id='status'><b> Status </b></label>
|
39 |
-
<select name='postwithstatus' id='postwithstatus'>
|
40 |
-
<option>All</option>
|
41 |
-
<option>Publish</option>
|
42 |
-
<option>Sticky</option>
|
43 |
-
<option>Private</option>
|
44 |
-
<option>Protected</option>
|
45 |
-
<option>Draft</option>
|
46 |
-
<option>Pending</option>
|
47 |
-
</select>
|
48 |
-
</div>
|
49 |
-
</td>
|
50 |
-
</tr>
|
51 |
-
<tr>
|
52 |
-
<td><label><input type='checkbox' name='getdatabyspecificauthors' id='getdatabyspecificauthors' value='getdatabyspecificauthors' onclick='addwpexportfilter(this.id);' /><span id="align"> Export data by specific authors</span></label>
|
53 |
-
<div id='specificauthorexport' style='padding:10px;display:none;'>
|
54 |
-
<label id='authors'><b> Authors </b></label>
|
55 |
-
<?php $blogusers = get_users( 'blog_id=1&orderby=nicename' ); ?>
|
56 |
-
<select name='postauthor' id='postauthor' >
|
57 |
-
<option value='0'>All</option>
|
58 |
-
<?php foreach( $blogusers as $user ) { ?>
|
59 |
-
<option value='<?php echo esc_html( $user->ID ); ?>'> <?php echo esc_html( $user->display_name ); ?> </option>
|
60 |
-
<?php } ?>
|
61 |
-
</select>
|
62 |
-
</div>
|
63 |
-
</td>
|
64 |
-
</tr>
|
65 |
-
</table>
|
66 |
-
<script type = 'text/javascript'>
|
67 |
-
jQuery(document).ready(function() {
|
68 |
-
jQuery('#postdatefrom').datepicker({
|
69 |
-
dateFormat : 'yy-mm-dd'
|
70 |
-
});
|
71 |
-
jQuery('#postdateto').datepicker({
|
72 |
-
dateFormat : 'yy-mm-dd'
|
73 |
-
});
|
74 |
-
});
|
75 |
-
</script>
|
76 |
-
</div>
|
77 |
-
<div class="table-responsive" id="exporttable">
|
78 |
-
<table class='table exportmodule'>
|
79 |
-
<th colspan='2'><label class='h-exportmodule'><h3 id="innertitle"> Select your module to export the data</h3> </label></th>
|
80 |
-
<tr>
|
81 |
-
<td class='exportdatatype'><label> <input type="radio" name="export" value="post" id="post"><span id="align"> Post</span> </label></td>
|
82 |
-
<td class='exportdatatype'><label> <input type="radio" name="export" value="eshop" id="eshop"><span id="align"> Eshop</span> </label></td>
|
83 |
-
</tr>
|
84 |
-
<tr>
|
85 |
-
<td class='exportdatatype'><label> <input type="radio" name="export" value="page" id="page"><span id="align"> Page</span> </label></td>
|
86 |
-
<td class='exportdatatype'><label> <input type="radio" name="export" value="wpcommerce" id="wpcommerce" onclick="export_check(this.value);"><span id="align"> Wp-Commerce</span> <span class="mandatory">*</span></label></td>
|
87 |
-
</tr>
|
88 |
-
<tr>
|
89 |
-
<td class='exportdatatype'>
|
90 |
-
<label> <input type="radio" name="export" value="custompost" id="custompost" ><span id="align"> Custom Post</span> </label>
|
91 |
-
<select name="export_post_type" style="margin-left:10px">
|
92 |
-
<option>--Select--</option>
|
93 |
-
<?php
|
94 |
-
foreach (get_post_types() as $key => $value) {
|
95 |
-
if (($value != 'featured_image') && ($value != 'attachment') && ($value != 'wpsc-product') && ($value != 'wpsc-product-file') && ($value != 'revision') && ($value != 'nav_menu_item') && ($value != 'post') && ($value != 'page') && ($value != 'wp-types-group') && ($value != 'wp-types-user-group') && ($value != 'product') && ($value != 'product_variation') && ($value != 'shop_order') && ($value != 'shop_coupon') && ($value != 'acf')) {
|
96 |
-
?>
|
97 |
-
<option id="<?php echo($value); ?>"> <?php echo($value); ?> </option>
|
98 |
-
<?php
|
99 |
-
}
|
100 |
-
}
|
101 |
-
?>
|
102 |
-
</select>
|
103 |
-
</td>
|
104 |
-
<td class='exportdatatype'><label> <input type="radio" name="export" value="woocommerce" id="woocommerce" onclick="export_check(this.value);"><span id="align"> Woo-Commerce</span> <span class="mandatory">*</span></label></td>
|
105 |
-
</tr>
|
106 |
-
<tr>
|
107 |
-
<td class='exportdatatype'><label> <input type="radio" name="export" value="category" id="category" onclick="export_check(this.value);"><span id="align"> Category</span><span class="mandatory">*</span></label></td>
|
108 |
-
<td class='exportdatatype'><label> <input type="radio" name="export" value="marketpress" id="marketpress" onclick="export_check(this.value);"><span id="align"> Marketpress</span> <span class="mandatory">*</span></label></td>
|
109 |
-
</tr>
|
110 |
-
<tr>
|
111 |
-
<td class='exportdatatype'><label> <input type="radio" name="export" value="tags" id="tags" onclick="export_check(this.value);"><span id="align"> Tags</span> <span class="mandatory">*</span></label></td>
|
112 |
-
<td class='exportdatatype'><label> <input type="radio" name="export" value="customerreviews" id="customerreviews" onclick="export_check(this.value);"><span id="align"> Customer Reviews</span><span class="mandatory">*</span></label></td>
|
113 |
-
</tr>
|
114 |
-
<tr>
|
115 |
-
<td class='exportdatatype'>
|
116 |
-
<label> <input type="radio" name="export" value="customtaxonomy" id="customtaxonomy" onclick="export_check(this.value);"><span id="align"> Custom Taxonomy</span> <span class="mandatory">*</span></label>
|
117 |
-
<select name="export_taxo_type" style="margin-left:10px;">
|
118 |
-
<option>--Select--</option>
|
119 |
-
<?php
|
120 |
-
foreach (get_taxonomies() as $key => $value) {
|
121 |
-
if (($value != 'category') && ($value != 'post_tag') && ($value != 'nav_menu') && ($value != 'link_category') && ($value != 'post_format') && ($value != 'product_tag') && ($value != 'wpsc_product_category') && ($value != 'wpsc-variation')) {
|
122 |
-
?>
|
123 |
-
<option id="<?php echo($value); ?>"> <?php echo($value); ?> </option>
|
124 |
-
<?php
|
125 |
-
}
|
126 |
-
}
|
127 |
-
?>
|
128 |
-
</select></td>
|
129 |
-
<td class='exportdatatype'><label> <input type="radio" name="export" value="comments" id="comments"><span id="align"> Comments</span> </label></td>
|
130 |
-
</tr>
|
131 |
-
<tr>
|
132 |
-
<td class='exportdatatype'><label> <input type="radio" name="export" value="users" id="users"><span id="align"> Users</span> </label></td>
|
133 |
-
<td class='exportdatatype'></td>
|
134 |
-
</tr>
|
135 |
-
</table>
|
136 |
-
</div>
|
137 |
-
<?php /*
|
138 |
-
<div class='form-group exportedas'>
|
139 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="post"> Post </label>
|
140 |
-
</div>
|
141 |
-
</div>
|
142 |
-
<div class='form-group exportedas'>
|
143 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="page"> Page </label>
|
144 |
-
</div>
|
145 |
-
</div>
|
146 |
-
<div class='form-group exportedas'>
|
147 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="custompost"> Custom Post </label>
|
148 |
-
<select name="export_post_type">
|
149 |
-
<option>--Select--</option>
|
150 |
-
<?php
|
151 |
-
foreach (get_post_types() as $key => $value) {
|
152 |
-
if (($value != 'featured_image') && ($value != 'attachment') && ($value != 'wpsc-product') && ($value != 'wpsc-product-file') && ($value != 'revision') && ($value != 'nav_menu_item') && ($value != 'post') && ($value != 'page') && ($value != 'wp-types-group') && ($value != 'wp-types-user-group') && ($value != 'product') && ($value != 'product_variation') && ($value != 'shop_order') && ($value != 'shop_coupon') && ($value != 'acf')) {
|
153 |
-
?>
|
154 |
-
<option id="<?php echo($value); ?>"> <?php echo($value); ?> </option>
|
155 |
-
<?php
|
156 |
-
}
|
157 |
-
}
|
158 |
-
?>
|
159 |
-
</select></div>
|
160 |
-
</div>
|
161 |
-
<div class='form-group exportedas'>
|
162 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="users"> Users </label>
|
163 |
-
</div>
|
164 |
-
</div>
|
165 |
-
<div class='form-group exportedas'><div class='col-sm-3 export_action'><label><input type='radio' name='export' value='comments' id='comments' onclick="export_check(this.value)">Comments </label> </div> </div>
|
166 |
-
<div class='form-group exportedas'>
|
167 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="category"> Category
|
168 |
-
</label></div>
|
169 |
-
</div>
|
170 |
-
<div class='form-group exportedas'>
|
171 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="tags"> Tags </label>
|
172 |
-
</div>
|
173 |
-
</div>
|
174 |
-
<div class='form-group exportedas'>
|
175 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="customtaxonomy"> Custom
|
176 |
-
Taxonomy </label>
|
177 |
-
<select name="export_taxo_type">
|
178 |
-
<option>--Select--</option>
|
179 |
-
<?php
|
180 |
-
foreach (get_taxonomies() as $key => $value) {
|
181 |
-
if (($value != 'category') && ($value != 'post_tag') && ($value != 'nav_menu') && ($value != 'link_category') && ($value != 'post_format') && ($value != 'product_tag') && ($value != 'wpsc_product_category') && ($value != 'wpsc-variation')) {
|
182 |
-
?>
|
183 |
-
<option id="<?php echo($value); ?>"> <?php echo($value); ?> </option>
|
184 |
-
<?php
|
185 |
-
}
|
186 |
-
}
|
187 |
-
?>
|
188 |
-
</select></div>
|
189 |
-
</div>
|
190 |
-
<div class='form-group exportedas'>
|
191 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="eshop"> Eshop </label>
|
192 |
-
</div>
|
193 |
-
</div>
|
194 |
-
<div class='form-group exportedas'>
|
195 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="wpcommerce">
|
196 |
-
Wp-Commerce </label></div>
|
197 |
-
</div>
|
198 |
-
<div class='form-group exportedas'>
|
199 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="woocommerce">
|
200 |
-
Woo-Commerce </label></div>
|
201 |
-
</div>
|
202 |
-
<div class='form-group exportedas'>
|
203 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="marketpress">
|
204 |
-
Marketpress </label></div>
|
205 |
-
</div>
|
206 |
-
<div class='form-group exportedas'>
|
207 |
-
<div class='col-sm-3 export_action'><label> <input type="radio" name="export" value="customerreviews">
|
208 |
-
Customer Reviews </label></div>
|
209 |
-
</div>
|
210 |
-
*/ ?>
|
211 |
-
<div class='form-group exportedas'>
|
212 |
-
<label class='col-sm-2 control-label'><b> File Name: </b></label>
|
213 |
-
|
214 |
-
<div class='col-sm-6'>
|
215 |
-
<input class='form-control' type='text' name='export_filename' id='export_filename' value=''
|
216 |
-
placeholder="export_as_<?php echo(date("Y-m-d")); ?>" size="18">
|
217 |
-
</div>
|
218 |
-
<div class='col-sm-3'><input type="submit" name="exportbutton" value="Export" class='btn btn-primary'></div>
|
219 |
-
|
220 |
-
</form>
|
221 |
-
</div>
|
222 |
-
</div>
|
223 |
-
</div>
|
224 |
-
</div>
|
225 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/page/templates/index.php
CHANGED
@@ -71,7 +71,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
71 |
id='browsefile' enctype="multipart/form-data" method='post' name='browsefile'>
|
72 |
<div class="importfile" align='center'>
|
73 |
<div id='filenamedisplay'></div>
|
74 |
-
<!--<form class="add:the-list: validate" style="clear:both;" method="post" enctype="multipart/form-data" onsubmit="return file_exist();">-->
|
75 |
<div class="container">
|
76 |
<?php echo $impCE->smack_csv_import_method(); ?>
|
77 |
<input type='hidden' id="pluginurl" value="<?php echo WP_CONTENT_URL; ?>">
|
@@ -216,12 +215,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
216 |
}
|
217 |
</script>
|
218 |
<input type='hidden' name='importid' id='importid'>
|
219 |
-
|
220 |
-
<!-- <div class='section-one' align='center'>
|
221 |
-
<input type = 'button' name='clearform' id='clearform' value='Clear' onclick="Reload();" class = 'btn btn-warning' />
|
222 |
-
<input type = 'submit' name='importfile' id='importfile' value='Next>>' disabled class = 'btn btn-primary' />
|
223 |
-
<input type = 'hidden' name = 'importid' id = 'importid' >
|
224 |
-
</div> -->
|
225 |
</form>
|
226 |
</div>
|
227 |
</div>
|
@@ -308,7 +301,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
308 |
<?php echo $impCE->getImportDataConfiguration(); ?>
|
309 |
<div id='mappingheader' class='mappingheader'>
|
310 |
<?php
|
311 |
-
// $impCE = CallSkinnyObj::getInstance();
|
312 |
$allcustomposts = '';
|
313 |
$mFieldsArr = '';
|
314 |
$delimeter = '';
|
@@ -334,7 +326,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
334 |
?>
|
335 |
<table style="font-size: 12px;" class="table table-striped" id='FIELDGRP'>
|
336 |
<tr>
|
337 |
-
<td colspan='4'>
|
338 |
<div align='center' style='float:right;'>
|
339 |
<?php $cnt = count($impCE->defCols) + 2;
|
340 |
$cnt1 = count($impCE->headers);
|
@@ -387,20 +378,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
387 |
value='<?php if (isset($extracted_image_location)) {
|
388 |
echo $extracted_image_location;
|
389 |
} ?>'/>
|
390 |
-
<input type='button' id='prev_record' name='prev_record' class="btn btn-primary"
|
391 |
-
value='<<' onclick='gotoelement(this.id);'/>
|
392 |
-
<label style="padding-right:10px;"
|
393 |
-
id='preview_of_row'><?php echo __('Showing preview of row # 1', 'wp-ultimate-csv-importer'); ?></label>
|
394 |
-
<input type='button' id='next_record' name='next_record' class="btn btn-primary"
|
395 |
-
value='>>' onclick='gotoelement(this.id);'/>
|
396 |
-
<label id="importalign"
|
397 |
-
style="margin-right:8px;"> <?php echo __('Go To Row #', 'wp-ultimate-csv-importer'); ?></label><input
|
398 |
-
type='text' id='goto_element' name='goto_element'/>
|
399 |
-
<input type='button' id='apply_element' name='apply_element'
|
400 |
-
class="btn btn-success" value='Show' onclick='gotoelement(this.id);'
|
401 |
-
style="margin-right:10px;margin-left:5px"/>
|
402 |
</div>
|
403 |
-
</td>
|
404 |
</tr>
|
405 |
<?php
|
406 |
$count = 0;
|
@@ -413,17 +391,16 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
413 |
<tr>
|
414 |
<td colspan='4' class="left_align columnheader"
|
415 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
416 |
-
<div id='custfield_core'><b
|
417 |
</div>
|
418 |
</td>
|
419 |
</tr>
|
420 |
<tr>
|
421 |
-
<td class="left_align columnheader">
|
422 |
<b><?php echo __('WP FIELDS', 'wp-ultimate-csv-importer'); ?></b></td>
|
423 |
-
<td class="columnheader">
|
424 |
<b><?php echo __('CSV HEADER', 'wp-ultimate-csv-importer'); ?></b></td>
|
425 |
-
<td
|
426 |
-
</td>
|
427 |
<td></td>
|
428 |
</tr>
|
429 |
<?php
|
@@ -432,16 +409,20 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
432 |
?>
|
433 |
|
434 |
<tr>
|
435 |
-
<td class="left_align" style='
|
436 |
<input type='hidden' name='fieldname<?php print($count); ?>'
|
437 |
-
id='fieldname<?php print($count); ?>' value= <?php echo $key;
|
438 |
<label
|
439 |
class='wpfields'><?php print('<b>' . $key . '</b></label><br><label class="samptxt" style="padding-left:20px">[Name: ' . $key . ']'); ?></label>
|
440 |
</td>
|
441 |
|
442 |
<td>
|
443 |
-
|
444 |
-
|
|
|
|
|
|
|
|
|
445 |
<option><?php echo __('-- Select --', WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?></option>
|
446 |
<?php foreach ($impCE->headers as $key1 => $value1) { ?>
|
447 |
|
@@ -471,20 +452,13 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
471 |
<input type='hidden' id='wpfields' name='wpfields' value='<?php echo($count) ?>'/>
|
472 |
</table>
|
473 |
<script>
|
474 |
-
//showcsvrow();
|
475 |
</script>
|
476 |
-
<?php
|
477 |
-
/*foreach($mappingFields_arr as $mkey => $mval){
|
478 |
-
$mFieldsArr .= $mkey.',';
|
479 |
-
}
|
480 |
-
$mFieldsArr = substr($mFieldsArr, 0, -1);*/
|
481 |
-
?>
|
482 |
<table style="font-size: 12px;" class="table table-striped" id='CF_FIELDGRP'>
|
483 |
<tr>
|
484 |
|
485 |
<td colspan=5 class='left_align columnheader'
|
486 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
487 |
-
<div id='custfield_core'><b
|
488 |
</div>
|
489 |
|
490 |
</td>
|
@@ -494,7 +468,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
494 |
if (strstr($key, 'CF:')) {
|
495 |
?>
|
496 |
<tr>
|
497 |
-
<td class="left_align" style='width:
|
498 |
<input type='hidden' name='corefieldname<?php print($count); ?>'
|
499 |
id='corefieldname<?php print($count); ?>'
|
500 |
value='<?php echo $key; ?>'/>
|
@@ -543,8 +517,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
543 |
<?php
|
544 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
545 |
$active_plugins = get_option('active_plugins');
|
546 |
-
if ($wpcsvfreesettings) {
|
547 |
-
if (in_array('aioseo', $wpcsvfreesettings)) {
|
548 |
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)) {
|
549 |
?>
|
550 |
<table style="font-size: 12px;" class="table table-striped" id='SEO_FIELDGRP'>
|
@@ -552,7 +524,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
552 |
|
553 |
<td colspan=5 class='left_align columnheader'
|
554 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
555 |
-
<div id='custfield_core'><b
|
556 |
</div>
|
557 |
|
558 |
</td>
|
@@ -564,7 +536,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
564 |
?>
|
565 |
|
566 |
<tr>
|
567 |
-
<td class="left_align" style='width:
|
568 |
<input type='hidden' name='seofieldname<?php print($count); ?>'
|
569 |
id='seofieldname<?php print($count); ?>'
|
570 |
value='<?php echo $key; ?>'/>
|
@@ -604,8 +576,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
604 |
value='<?php echo($count) ?>'/>
|
605 |
</table>
|
606 |
<?php }
|
607 |
-
|
608 |
-
} ?>
|
609 |
|
610 |
<?php $basic_count = $count - 1; ?>
|
611 |
<input type="hidden" id="basic_count" name="basic_count" value="<?php echo $basic_count; ?>"/>
|
@@ -615,7 +586,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
615 |
value="<?php print_r($mFieldsArr); ?>"/>
|
616 |
|
617 |
<div>
|
618 |
-
<div class="goto_import_options"
|
619 |
<div class="mappingactions" style="margin-top:26px;">
|
620 |
<input type='button' id='clear_mapping'
|
621 |
title='<?php echo __("clear Mapping", 'wp-ultimate-csv-importer'); ?>'
|
@@ -624,17 +595,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
624 |
echo ' ';
|
625 |
echo $impCE->reduceStringLength(__(' Mapping', 'wp-ultimate-csv-importer'), 'Mapping'); ?>'
|
626 |
onclick='clearMapping();' style='float:left'/>
|
627 |
-
<span style=''>
|
628 |
-
<a href="#" class="tooltip tooltip_smack" style=''>
|
629 |
-
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png"/>
|
630 |
-
<span class="tooltipClearMapping">
|
631 |
-
<img class="callout" src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/callout.gif"/>
|
632 |
-
<strong><?php echo __('Refresh to re-map fields', 'wp-ultimate-csv-importer'); ?></strong>
|
633 |
-
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png"
|
634 |
-
style="margin-top: 6px;float:right;"/>
|
635 |
-
</span>
|
636 |
-
</a>
|
637 |
-
</span>
|
638 |
</div>
|
639 |
<div class="mappingactions">
|
640 |
<input type='submit' id='goto_importer_setting'
|
71 |
id='browsefile' enctype="multipart/form-data" method='post' name='browsefile'>
|
72 |
<div class="importfile" align='center'>
|
73 |
<div id='filenamedisplay'></div>
|
|
|
74 |
<div class="container">
|
75 |
<?php echo $impCE->smack_csv_import_method(); ?>
|
76 |
<input type='hidden' id="pluginurl" value="<?php echo WP_CONTENT_URL; ?>">
|
215 |
}
|
216 |
</script>
|
217 |
<input type='hidden' name='importid' id='importid'>
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
</form>
|
219 |
</div>
|
220 |
</div>
|
301 |
<?php echo $impCE->getImportDataConfiguration(); ?>
|
302 |
<div id='mappingheader' class='mappingheader'>
|
303 |
<?php
|
|
|
304 |
$allcustomposts = '';
|
305 |
$mFieldsArr = '';
|
306 |
$delimeter = '';
|
326 |
?>
|
327 |
<table style="font-size: 12px;" class="table table-striped" id='FIELDGRP'>
|
328 |
<tr>
|
|
|
329 |
<div align='center' style='float:right;'>
|
330 |
<?php $cnt = count($impCE->defCols) + 2;
|
331 |
$cnt1 = count($impCE->headers);
|
378 |
value='<?php if (isset($extracted_image_location)) {
|
379 |
echo $extracted_image_location;
|
380 |
} ?>'/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
</div>
|
|
|
382 |
</tr>
|
383 |
<?php
|
384 |
$count = 0;
|
391 |
<tr>
|
392 |
<td colspan='4' class="left_align columnheader"
|
393 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
394 |
+
<div id='custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('WordPress Fields:','wp-ultimate-csv-importer'); ?></b>
|
395 |
</div>
|
396 |
</td>
|
397 |
</tr>
|
398 |
<tr>
|
399 |
+
<td class="left_align columnheader" style = 'padding-left:170px;'>
|
400 |
<b><?php echo __('WP FIELDS', 'wp-ultimate-csv-importer'); ?></b></td>
|
401 |
+
<td class="columnheader" style = 'padding-left:55px;'>
|
402 |
<b><?php echo __('CSV HEADER', 'wp-ultimate-csv-importer'); ?></b></td>
|
403 |
+
<td> </td>
|
|
|
404 |
<td></td>
|
405 |
</tr>
|
406 |
<?php
|
409 |
?>
|
410 |
|
411 |
<tr>
|
412 |
+
<td class="left_align" style='padding-left:150px'>
|
413 |
<input type='hidden' name='fieldname<?php print($count); ?>'
|
414 |
+
id='fieldname<?php print($count); ?>' value= '<?php echo $key; ?>'/>
|
415 |
<label
|
416 |
class='wpfields'><?php print('<b>' . $key . '</b></label><br><label class="samptxt" style="padding-left:20px">[Name: ' . $key . ']'); ?></label>
|
417 |
</td>
|
418 |
|
419 |
<td>
|
420 |
+
<?php if($key == 'post_status'){ ?>
|
421 |
+
<select name="mapping<?php print($count); ?>" id="mapping<?php print($count); ?>" onChange=changefield();>
|
422 |
+
<?php }else{ ?>
|
423 |
+
<select name="mapping<?php print($count); ?>"
|
424 |
+
id="mapping<?php print($count); ?>">
|
425 |
+
<?php } ?>
|
426 |
<option><?php echo __('-- Select --', WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?></option>
|
427 |
<?php foreach ($impCE->headers as $key1 => $value1) { ?>
|
428 |
|
452 |
<input type='hidden' id='wpfields' name='wpfields' value='<?php echo($count) ?>'/>
|
453 |
</table>
|
454 |
<script>
|
|
|
455 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
<table style="font-size: 12px;" class="table table-striped" id='CF_FIELDGRP'>
|
457 |
<tr>
|
458 |
|
459 |
<td colspan=5 class='left_align columnheader'
|
460 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
461 |
+
<div id='custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('Custom Fields:','wp-ultimate-csv-importer'); ?></b>
|
462 |
</div>
|
463 |
|
464 |
</td>
|
468 |
if (strstr($key, 'CF:')) {
|
469 |
?>
|
470 |
<tr>
|
471 |
+
<td class="left_align" style='width:53%;padding-left:150px'>
|
472 |
<input type='hidden' name='corefieldname<?php print($count); ?>'
|
473 |
id='corefieldname<?php print($count); ?>'
|
474 |
value='<?php echo $key; ?>'/>
|
517 |
<?php
|
518 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
519 |
$active_plugins = get_option('active_plugins');
|
|
|
|
|
520 |
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)) {
|
521 |
?>
|
522 |
<table style="font-size: 12px;" class="table table-striped" id='SEO_FIELDGRP'>
|
524 |
|
525 |
<td colspan=5 class='left_align columnheader'
|
526 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
527 |
+
<div id='custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('SEO Fields:','wp-ultimate-csv-importer'); ?></b>
|
528 |
</div>
|
529 |
|
530 |
</td>
|
536 |
?>
|
537 |
|
538 |
<tr>
|
539 |
+
<td class="left_align" style='width:53%;padding-left:150px'>
|
540 |
<input type='hidden' name='seofieldname<?php print($count); ?>'
|
541 |
id='seofieldname<?php print($count); ?>'
|
542 |
value='<?php echo $key; ?>'/>
|
576 |
value='<?php echo($count) ?>'/>
|
577 |
</table>
|
578 |
<?php }
|
579 |
+
?>
|
|
|
580 |
|
581 |
<?php $basic_count = $count - 1; ?>
|
582 |
<input type="hidden" id="basic_count" name="basic_count" value="<?php echo $basic_count; ?>"/>
|
586 |
value="<?php print_r($mFieldsArr); ?>"/>
|
587 |
|
588 |
<div>
|
589 |
+
<div class="goto_import_options" style='padding-left:330px;'>
|
590 |
<div class="mappingactions" style="margin-top:26px;">
|
591 |
<input type='button' id='clear_mapping'
|
592 |
title='<?php echo __("clear Mapping", 'wp-ultimate-csv-importer'); ?>'
|
595 |
echo ' ';
|
596 |
echo $impCE->reduceStringLength(__(' Mapping', 'wp-ultimate-csv-importer'), 'Mapping'); ?>'
|
597 |
onclick='clearMapping();' style='float:left'/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
598 |
</div>
|
599 |
<div class="mappingactions">
|
600 |
<input type='submit' id='goto_importer_setting'
|
modules/post/templates/index.php
CHANGED
@@ -341,7 +341,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
341 |
?>
|
342 |
<table style="font-size: 12px;" class="table table-striped" id='FIELDGRP'>
|
343 |
<tr>
|
344 |
-
<td colspan='4'>
|
345 |
<div align='center' style='float:right;'>
|
346 |
<?php $cnt = count($impCE->defCols) + 2;
|
347 |
$cnt1 = count($impCE->headers);
|
@@ -394,20 +393,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
394 |
value='<?php if (isset($extracted_image_location)) {
|
395 |
echo $extracted_image_location;
|
396 |
} ?>'/>
|
397 |
-
<input type='button' id='prev_record' name='prev_record' class="btn btn-primary"
|
398 |
-
value='<<' onclick='gotoelement(this.id);'/>
|
399 |
-
<label style="padding-right:10px;"
|
400 |
-
id='preview_of_row'><?php echo __('Showing preview of row # 1', 'wp-ultimate-csv-importer'); ?> </label>
|
401 |
-
<input type='button' id='next_record' name='next_record' class="btn btn-primary"
|
402 |
-
value='>>' onclick='gotoelement(this.id);'/>
|
403 |
-
<label id="importalign"
|
404 |
-
style="margin-right:8px;"><?php echo __('Go To Row #', 'wp-ultimate-csv-importer'); ?> </label>
|
405 |
-
<input type='text' id='goto_element' name='goto_element'/>
|
406 |
-
<input type='button' id='apply_element' name='apply_element' class="btn btn-success"
|
407 |
-
value='<?php echo __('Show', 'wp-ultimate-csv-importer'); ?>'
|
408 |
-
onclick='gotoelement(this.id);' style="margin-right:10px;margin-left:5px"/>
|
409 |
</div>
|
410 |
-
</td>
|
411 |
</tr>
|
412 |
<?php
|
413 |
$count = 0;
|
@@ -423,17 +409,16 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
423 |
<tr>
|
424 |
<td colspan='4' class="left_align columnheader"
|
425 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
426 |
-
<div id='custfield_core'><b
|
427 |
</div>
|
428 |
</td>
|
429 |
</tr>
|
430 |
<tr>
|
431 |
-
<td class="left_align columnheader">
|
432 |
<b><?php echo __('WP FIELDS', 'wp-ultimate-csv-importer'); ?></b></td>
|
433 |
-
<td class="columnheader"><b><?php echo __('CSV HEADER', 'wp-ultimate-csv-importer'); ?></b>
|
434 |
-
</td>
|
435 |
-
<td class="columnheader"><b><?php echo __('CSV ROW', 'wp-ultimate-csv-importer'); ?></b>
|
436 |
</td>
|
|
|
437 |
<td></td>
|
438 |
</tr>
|
439 |
<?php
|
@@ -442,16 +427,21 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
442 |
?>
|
443 |
|
444 |
<tr>
|
445 |
-
<td class="left_align" style='
|
446 |
<input type='hidden' name='fieldname<?php print($count); ?>'
|
447 |
-
id='fieldname<?php print($count); ?>' value= <?php echo $key;
|
448 |
<label
|
449 |
class='wpfields'><?php print('<b>' . $key . '</b></label><br><label class="samptxt" style="padding-left:20px">[Name: ' . $key . ']'); ?></label>
|
450 |
</td>
|
451 |
|
452 |
<td>
|
453 |
-
|
454 |
-
|
|
|
|
|
|
|
|
|
|
|
455 |
<option><?php echo __('-- Select --', WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?></option>
|
456 |
<?php foreach ($impCE->headers as $key1 => $value1) { ?>
|
457 |
|
@@ -479,9 +469,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
479 |
?>
|
480 |
<input type='hidden' id='wpfields' name='wpfields' value='<?php echo($count) ?>'/>
|
481 |
</table>
|
482 |
-
<script>
|
483 |
-
//showcsvrow();
|
484 |
-
</script>
|
485 |
<?php
|
486 |
foreach ($mappingFields_arr as $mkey => $mval) {
|
487 |
$mFieldsArr .= $mkey . ',';
|
@@ -493,7 +480,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
493 |
|
494 |
<td colspan=5 class='left_align columnheader'
|
495 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
496 |
-
<div id='custfield_core'><b
|
497 |
</div>
|
498 |
|
499 |
</td>
|
@@ -503,7 +490,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
503 |
if (strstr($key, 'CF:')) {
|
504 |
?>
|
505 |
<tr>
|
506 |
-
<td class="left_align" style='width:
|
507 |
<input type='hidden' name='corefieldname<?php print($count); ?>'
|
508 |
id='corefieldname<?php print($count); ?>' value='<?php echo $key; ?>'/>
|
509 |
|
@@ -550,8 +537,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
550 |
<?php
|
551 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
552 |
$active_plugins = get_option('active_plugins');
|
553 |
-
if ($wpcsvfreesettings) {
|
554 |
-
if (in_array('aioseo', $wpcsvfreesettings)) {
|
555 |
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)) {
|
556 |
?>
|
557 |
<table style="font-size: 12px;" class="table table-striped" id='SEO_FIELDGRP'>
|
@@ -559,7 +544,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
559 |
|
560 |
<td colspan=5 class='left_align columnheader'
|
561 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
562 |
-
<div id='custfield_core'><b
|
563 |
</div>
|
564 |
|
565 |
</td>
|
@@ -568,10 +553,9 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
568 |
foreach ($impCE->defCols as $key => $value) {
|
569 |
if (strstr($key, 'SEO:')) {
|
570 |
$value = str_replace('SEO:', '', $value)
|
571 |
-
//echo '<pre>';print_r($key);echo '</pre>';
|
572 |
?>
|
573 |
<tr>
|
574 |
-
<td class="left_align" style='width:
|
575 |
<input type='hidden' name='seofieldname<?php print($count); ?>'
|
576 |
id='seofieldname<?php print($count); ?>'
|
577 |
value='<?php echo $key; ?>'/>
|
@@ -608,12 +592,10 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
608 |
<input type='hidden' id='seofields' name='seofields' value='<?php echo($count) ?>'/>
|
609 |
</table>
|
610 |
<?php }
|
611 |
-
|
612 |
-
} ?>
|
613 |
<?php $basic_count = $count - 1; ?>
|
614 |
<input type="hidden" id="basic_count" name="basic_count" value="<?php echo $basic_count; ?>"/>
|
615 |
-
<input type="hidden" id="corecustomcount" name="corecustomcount" value=0/>
|
616 |
-
<?php //echo $impCE->customfieldui($count);?>
|
617 |
<input type="hidden" id="mapping_fields_array" name="mapping_fields_array"
|
618 |
value="<?php if (isset($mFieldsArr)) {
|
619 |
print_r($mFieldsArr);
|
@@ -629,16 +611,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
629 |
echo ' ';
|
630 |
echo $impCE->reduceStringLength(__(' Mapping', 'wp-ultimate-csv-importer'), 'Mapping'); ?>'
|
631 |
onclick='clearMapping();' style='float:left'/>
|
632 |
-
<span style=''>
|
633 |
-
<a href="#" class="tooltip tooltip_smack" style=''>
|
634 |
-
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png"/>
|
635 |
-
<span class="tooltipClearMapping">
|
636 |
-
<img class="callout" src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/callout.gif"/>
|
637 |
-
<strong><?php echo __('Refresh to re-map fields', 'wp-ultimate-csv-importer'); ?></strong>
|
638 |
-
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png" style="margin-top: 6px;float:right;"/>
|
639 |
-
</span>
|
640 |
-
</a>
|
641 |
-
</span>
|
642 |
</div>
|
643 |
<div class="mappingactions">
|
644 |
<input type='submit' id='goto_importer_setting'
|
@@ -715,26 +687,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
715 |
<form method="POST">
|
716 |
<ul id="settings">
|
717 |
<li>
|
718 |
-
<!--Get all posts with an <strong>content-similarity</strong> of more than: <strong><span id="similarity_amount">80</span>%</strong>
|
719 |
-
<div id="similarity" class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" aria-disabled="false"><a class="ui-slider-handle ui-state-default ui-corner-all" href="#" style="left: 60%;"></a></div>
|
720 |
-
</li>
|
721 |
-
<input type="hidden" value="80" name="similarity">
|
722 |
-
<li id="statuses">Include these <strong>statuses</strong>: <br>
|
723 |
-
<input name="status[]" type="checkbox" value="draft"> Draft<br><input name="status[]" type="checkbox" value="pending"> Pending Review<br><input name="status[]" type="checkbox" value="private"> Private<br><input name="status[]" type="checkbox" value="publish" checked=""> Published<br> </li>
|
724 |
-
<li id="dates">Limit by <strong>post date</strong>:<br>
|
725 |
-
from <input id="datefrom" name="datefrom" class="datepicker hasDatepicker" type="text" value="" readonly="readonly"><img class="ui-datepicker-trigger" src="images/date-button.gif" alt="..." title="..."> until <input id="dateto" name="dateto" class="datepicker hasDatepicker" type="text" value="" readonly="readonly"><img class="ui-datepicker-trigger" src="images/date-button.gif" alt="..." title="...">
|
726 |
-
</li>
|
727 |
-
<li>
|
728 |
-
Compare <select name="search_field" id="search_field">
|
729 |
-
<option value="0" selected="selected">
|
730 |
-
content (post_content) </option>
|
731 |
-
<option value="1">
|
732 |
-
title (post_title) </option>
|
733 |
-
<option value="2">
|
734 |
-
content and title </option>
|
735 |
-
</select><br>
|
736 |
-
<input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
|
737 |
-
<input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
|
738 |
<label id="importalign"><input name='duplicatecontent' id='duplicatecontent'
|
739 |
type="checkbox"
|
740 |
value=""> <?php echo __('Detect duplicate post content', 'wp-ultimate-csv-importer'); ?>
|
@@ -761,17 +713,9 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
761 |
<label id='importalign'> <input type='checkbox' id='multiimage' name='multiimage'
|
762 |
value=''> <?php echo __('Insert Inline Images', 'wp-ultimate-csv-importer'); ?>
|
763 |
</label><br>
|
764 |
-
<!-- <div id='inlineimageoption' style="display:none;" >
|
765 |
-
<label id="importalign"><input type="radio" name="inlineimage_location" id="imagewithextension" value="imagewithextension" onclick="inline_image_option(this.value);" /> Image name with extension </label>
|
766 |
-
<label id="importalign"><input type="radio" name="inlineimage_location" id="inlineimage_location" value="inlineimage_location" onclick="inline_image_option(this.value);" /> <input type="text" name="imagelocation" id="imagelocation" placeholder="Inline Image Location" value="" onblur="customimagelocation(this.value);" style="margin-top:5px;margin-left:10px" /></label>
|
767 |
-
</div>-->
|
768 |
<input type='hidden' id='inlineimagevalue' name='inlineimagevalue' value='none'/>
|
769 |
</li>
|
770 |
-
<!-- <li>
|
771 |
-
Ignore these words while comparing <input name="filterwords" id="filterwords" type="text" value="">
|
772 |
-
</li>-->
|
773 |
</ul>
|
774 |
-
<!-- <input id="goto_back" name="goto_back" class="btn btn-warning" type="button" value="<< Back" onclick="gotoback();" /> -->
|
775 |
<input id="startbutton" class="btn btn-primary" type="button"
|
776 |
value="<?php echo __('Import Now', 'wp-ultimate-csv-importer'); ?>"
|
777 |
style="color: #ffffff;background:#2E9AFE;"
|
@@ -785,7 +729,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
785 |
<input id="continuebutton" class="btn btn-lg btn-success" type="button"
|
786 |
value="<?php echo __('Continue', 'wp-ultimate-csv-importer'); ?>"
|
787 |
style="display:none;color: #ffffff;" onclick="continueprocess();">
|
788 |
-
<!--<input id="continuebutton" class="button" type="button" value="Continue old search" style="color: #ffffff;background:#2E9AFE;">-->
|
789 |
<div id="ajaxloader" style="display:none"><img
|
790 |
src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/ajax-loader.gif"> <?php echo __('Processing...', 'wp-ultimate-csv-importer'); ?>
|
791 |
</div>
|
@@ -795,7 +738,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
795 |
</div>
|
796 |
<div class="clear"></div>
|
797 |
<br>
|
798 |
-
<!-- Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
|
799 |
</div>
|
800 |
</div>
|
801 |
<?php } ?>
|
@@ -834,7 +776,6 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
834 |
<div class="accordion-group">
|
835 |
<div class="accordion-body in collapse">
|
836 |
<div>
|
837 |
-
<?php //$impCE->common_footer_for_other_plugin_promotions(); ?>
|
838 |
<?php $impCE->common_footer(); ?>
|
839 |
</div>
|
840 |
</div>
|
341 |
?>
|
342 |
<table style="font-size: 12px;" class="table table-striped" id='FIELDGRP'>
|
343 |
<tr>
|
|
|
344 |
<div align='center' style='float:right;'>
|
345 |
<?php $cnt = count($impCE->defCols) + 2;
|
346 |
$cnt1 = count($impCE->headers);
|
393 |
value='<?php if (isset($extracted_image_location)) {
|
394 |
echo $extracted_image_location;
|
395 |
} ?>'/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
</div>
|
|
|
397 |
</tr>
|
398 |
<?php
|
399 |
$count = 0;
|
409 |
<tr>
|
410 |
<td colspan='4' class="left_align columnheader"
|
411 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
412 |
+
<div id='custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('WordPress Fields:','wp-ultimate-importer'); ?></b>
|
413 |
</div>
|
414 |
</td>
|
415 |
</tr>
|
416 |
<tr>
|
417 |
+
<td class="left_align columnheader" style = 'padding-left:170px;'>
|
418 |
<b><?php echo __('WP FIELDS', 'wp-ultimate-csv-importer'); ?></b></td>
|
419 |
+
<td class="columnheader" style = 'padding-left:55px;'><b><?php echo __('CSV HEADER', 'wp-ultimate-csv-importer'); ?></b>
|
|
|
|
|
420 |
</td>
|
421 |
+
<td> </td>
|
422 |
<td></td>
|
423 |
</tr>
|
424 |
<?php
|
427 |
?>
|
428 |
|
429 |
<tr>
|
430 |
+
<td class="left_align" style = 'padding-left:150px;'>
|
431 |
<input type='hidden' name='fieldname<?php print($count); ?>'
|
432 |
+
id='fieldname<?php print($count); ?>' value= '<?php echo $key; ?>' />
|
433 |
<label
|
434 |
class='wpfields'><?php print('<b>' . $key . '</b></label><br><label class="samptxt" style="padding-left:20px">[Name: ' . $key . ']'); ?></label>
|
435 |
</td>
|
436 |
|
437 |
<td>
|
438 |
+
|
439 |
+
<?php if($key == 'post_status'){ ?>
|
440 |
+
<select name="mapping<?php print($count); ?>" id="mapping<?php print($count); ?>" onChange=changefield();>
|
441 |
+
<?php }else{ ?>
|
442 |
+
<select name="mapping<?php print($count); ?>"
|
443 |
+
id="mapping<?php print($count); ?>">
|
444 |
+
<?php } ?>
|
445 |
<option><?php echo __('-- Select --', WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?></option>
|
446 |
<?php foreach ($impCE->headers as $key1 => $value1) { ?>
|
447 |
|
469 |
?>
|
470 |
<input type='hidden' id='wpfields' name='wpfields' value='<?php echo($count) ?>'/>
|
471 |
</table>
|
|
|
|
|
|
|
472 |
<?php
|
473 |
foreach ($mappingFields_arr as $mkey => $mval) {
|
474 |
$mFieldsArr .= $mkey . ',';
|
480 |
|
481 |
<td colspan=5 class='left_align columnheader'
|
482 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
483 |
+
<div id='custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('Custom Fields:','wp-ultimate-csv-importer'); ?></b>
|
484 |
</div>
|
485 |
|
486 |
</td>
|
490 |
if (strstr($key, 'CF:')) {
|
491 |
?>
|
492 |
<tr>
|
493 |
+
<td class="left_align" style='width:53%; padding-left:170px;'>
|
494 |
<input type='hidden' name='corefieldname<?php print($count); ?>'
|
495 |
id='corefieldname<?php print($count); ?>' value='<?php echo $key; ?>'/>
|
496 |
|
537 |
<?php
|
538 |
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
539 |
$active_plugins = get_option('active_plugins');
|
|
|
|
|
540 |
if (in_array('all-in-one-seo-pack/all_in_one_seo_pack.php', $active_plugins)) {
|
541 |
?>
|
542 |
<table style="font-size: 12px;" class="table table-striped" id='SEO_FIELDGRP'>
|
544 |
|
545 |
<td colspan=5 class='left_align columnheader'
|
546 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
547 |
+
<div id='custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('SEO Fields:','wp-ultimate-csv-importer'); ?></b>
|
548 |
</div>
|
549 |
|
550 |
</td>
|
553 |
foreach ($impCE->defCols as $key => $value) {
|
554 |
if (strstr($key, 'SEO:')) {
|
555 |
$value = str_replace('SEO:', '', $value)
|
|
|
556 |
?>
|
557 |
<tr>
|
558 |
+
<td class="left_align" style='width:53%; padding-left:170px;'>
|
559 |
<input type='hidden' name='seofieldname<?php print($count); ?>'
|
560 |
id='seofieldname<?php print($count); ?>'
|
561 |
value='<?php echo $key; ?>'/>
|
592 |
<input type='hidden' id='seofields' name='seofields' value='<?php echo($count) ?>'/>
|
593 |
</table>
|
594 |
<?php }
|
595 |
+
?>
|
|
|
596 |
<?php $basic_count = $count - 1; ?>
|
597 |
<input type="hidden" id="basic_count" name="basic_count" value="<?php echo $basic_count; ?>"/>
|
598 |
+
<input type="hidden" id="corecustomcount" name="corecustomcount" value=0 />
|
|
|
599 |
<input type="hidden" id="mapping_fields_array" name="mapping_fields_array"
|
600 |
value="<?php if (isset($mFieldsArr)) {
|
601 |
print_r($mFieldsArr);
|
611 |
echo ' ';
|
612 |
echo $impCE->reduceStringLength(__(' Mapping', 'wp-ultimate-csv-importer'), 'Mapping'); ?>'
|
613 |
onclick='clearMapping();' style='float:left'/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
614 |
</div>
|
615 |
<div class="mappingactions">
|
616 |
<input type='submit' id='goto_importer_setting'
|
687 |
<form method="POST">
|
688 |
<ul id="settings">
|
689 |
<li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
690 |
<label id="importalign"><input name='duplicatecontent' id='duplicatecontent'
|
691 |
type="checkbox"
|
692 |
value=""> <?php echo __('Detect duplicate post content', 'wp-ultimate-csv-importer'); ?>
|
713 |
<label id='importalign'> <input type='checkbox' id='multiimage' name='multiimage'
|
714 |
value=''> <?php echo __('Insert Inline Images', 'wp-ultimate-csv-importer'); ?>
|
715 |
</label><br>
|
|
|
|
|
|
|
|
|
716 |
<input type='hidden' id='inlineimagevalue' name='inlineimagevalue' value='none'/>
|
717 |
</li>
|
|
|
|
|
|
|
718 |
</ul>
|
|
|
719 |
<input id="startbutton" class="btn btn-primary" type="button"
|
720 |
value="<?php echo __('Import Now', 'wp-ultimate-csv-importer'); ?>"
|
721 |
style="color: #ffffff;background:#2E9AFE;"
|
729 |
<input id="continuebutton" class="btn btn-lg btn-success" type="button"
|
730 |
value="<?php echo __('Continue', 'wp-ultimate-csv-importer'); ?>"
|
731 |
style="display:none;color: #ffffff;" onclick="continueprocess();">
|
|
|
732 |
<div id="ajaxloader" style="display:none"><img
|
733 |
src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/ajax-loader.gif"> <?php echo __('Processing...', 'wp-ultimate-csv-importer'); ?>
|
734 |
</div>
|
738 |
</div>
|
739 |
<div class="clear"></div>
|
740 |
<br>
|
|
|
741 |
</div>
|
742 |
</div>
|
743 |
<?php } ?>
|
776 |
<div class="accordion-group">
|
777 |
<div class="accordion-body in collapse">
|
778 |
<div>
|
|
|
779 |
<?php $impCE->common_footer(); ?>
|
780 |
</div>
|
781 |
</div>
|
modules/settings/actions/actions.php
CHANGED
@@ -35,579 +35,30 @@
|
|
35 |
* "Copyright Smackcoders. 2015. All rights reserved".
|
36 |
********************************************************************************/
|
37 |
|
38 |
-
if (!defined('ABSPATH'))
|
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 |
-
$setingsArr = array('post', 'page', 'custompost', 'comments', 'categories', 'customtaxonomy', 'users', 'eshop', 'wpcommerce', 'woocommerce', 'custompostuitype', 'cctm', 'acf', 'aioseo', 'yoastseo', 'enable', 'disable', 'nonerseooption', 'nonercustompost', 'nonerecommerce', 'recommerce', 'enable_plugin_access_for_author', 'send_log_email', 'enable_debug', 'disable_debug', 'debug_mode');
|
64 |
-
foreach ($setingsArr as $option) {
|
65 |
-
$data[$option] = "";
|
66 |
-
}
|
67 |
-
|
68 |
-
$skinnycontroller = new WPImporter_includes_helper();
|
69 |
-
$settings = $skinnycontroller->getSettings();
|
70 |
-
foreach ($settings as $settings_key) {
|
71 |
-
$data[$settings_key] = 'checked';
|
72 |
-
}
|
73 |
-
|
74 |
-
//Settings action
|
75 |
-
//SEO option
|
76 |
-
$tableseo = get_option('wpcsvfreesettings');
|
77 |
-
$seooption = isset($tableseo['rseooption']) ? $tableseo['rseooption'] : '';
|
78 |
-
if ($seooption == 'aioseo') {
|
79 |
-
$data['aioseo'] = 'checked enablesetting';
|
80 |
-
$data['yoastseo'] = 'disablesetting';
|
81 |
-
$data['nonerseooption'] = 'disablesetting';
|
82 |
-
$data['aioseo_status'] = 'Enabled';
|
83 |
-
$data['yoastseo_status'] = 'Disabled';
|
84 |
-
$data['none_status'] = 'Disabled';
|
85 |
-
} else {
|
86 |
-
if ($seooption == 'yoastseo') {
|
87 |
-
$data['yoastseo'] = 'checked enablesetting';
|
88 |
-
$data['aioseo'] = 'disablesetting';
|
89 |
-
$data['nonerseooption'] = 'disablesetting';
|
90 |
-
$data['aioseo_status'] = 'Disabled';
|
91 |
-
$data['yoastseo_status'] = 'Enabled';
|
92 |
-
$data['none_status'] = 'Disabled';
|
93 |
-
} else {
|
94 |
-
$data['nonerseooption'] = 'checked enablesetting';
|
95 |
-
$data['aioseo'] = 'disablesetting';
|
96 |
-
$data['yoastseo'] = 'disablesetting';
|
97 |
-
$data['aioseo_status'] = 'Disabled';
|
98 |
-
$data['yoastseo_status'] = 'Disabled';
|
99 |
-
$data['none_status'] = 'Enabled';
|
100 |
-
}
|
101 |
-
}
|
102 |
-
|
103 |
-
$data['wpcustomfields'] = '';
|
104 |
-
if (isset($tableseo['wpcustomfields']) && $tableseo['wpcustomfields'] == 'on') {
|
105 |
-
$data['wpcustomfields'] = 'checked';
|
106 |
-
}
|
107 |
-
//Security and Performance
|
108 |
-
if (isset($tableseo['enable_plugin_access_for_author'])) {
|
109 |
-
$importoption = $tableseo['enable_plugin_access_for_author'];
|
110 |
-
} else {
|
111 |
-
$importoption = '';
|
112 |
-
};
|
113 |
-
if ($importoption == 'enable_plugin_access_for_author') {
|
114 |
-
$data['authorimport'] = 'checked enablesetting';
|
115 |
-
$data['noauthorimport'] = 'disablesetting';
|
116 |
-
} else {
|
117 |
-
$data['noauthorimport'] = 'checked enablesetting';
|
118 |
-
$data['authorimport'] = 'disablesetting';
|
119 |
-
}
|
120 |
-
|
121 |
-
//General Settings
|
122 |
-
if (isset($tableseo['post'])) {
|
123 |
-
$importoption = $tableseo['post'];
|
124 |
-
} else {
|
125 |
-
$importoption = '';
|
126 |
-
};
|
127 |
-
if ($importoption == 'post') {
|
128 |
-
$data['post'] = 'checked enablesetting';
|
129 |
-
$data['nopost'] = 'disablesetting';
|
130 |
-
} else {
|
131 |
-
$data['nopost'] = 'checked enablesetting';
|
132 |
-
$data['post'] = 'disablesetting';
|
133 |
-
}
|
134 |
-
|
135 |
-
if (isset($tableseo['page'])) {
|
136 |
-
$importoption = $tableseo['page'];
|
137 |
-
} else {
|
138 |
-
$importoption = '';
|
139 |
-
};
|
140 |
-
if ($importoption == 'page') {
|
141 |
-
$data['page'] = 'checked enablesetting';
|
142 |
-
$data['nopage'] = 'disablesetting';
|
143 |
-
} else {
|
144 |
-
$data['nopage'] = 'checked enablesetting';
|
145 |
-
$data['page'] = 'disablesetting';
|
146 |
-
}
|
147 |
-
|
148 |
-
if (isset($tableseo['users'])) {
|
149 |
-
$importoption = $tableseo['users'];
|
150 |
-
} else {
|
151 |
-
$importoption = '';
|
152 |
-
};
|
153 |
-
if ($importoption == 'users') {
|
154 |
-
$data['users'] = 'checked enablesetting';
|
155 |
-
$data['nousers'] = 'disablesetting';
|
156 |
-
} else {
|
157 |
-
$data['nousers'] = 'checked enablesetting';
|
158 |
-
$data['users'] = 'disablesetting';
|
159 |
-
}
|
160 |
-
|
161 |
-
if (isset($tableseo['comments'])) {
|
162 |
-
$importoption = $tableseo['comments'];
|
163 |
-
} else {
|
164 |
-
$importoption = '';
|
165 |
-
};
|
166 |
-
if ($importoption == 'comments') {
|
167 |
-
$data['comments'] = 'checked enablesetting';
|
168 |
-
$data['nocomments'] = 'disablesetting';
|
169 |
-
} else {
|
170 |
-
$data['nocomments'] = 'checked enablesetting';
|
171 |
-
$data['comments'] = 'disablesetting';
|
172 |
-
}
|
173 |
-
|
174 |
-
if (isset($tableseo['custompost'])) {
|
175 |
-
$importoption = $tableseo['custompost'];
|
176 |
-
} else {
|
177 |
-
$importoption = '';
|
178 |
-
};
|
179 |
-
if ($importoption == 'custompost') {
|
180 |
-
$data['custompost'] = 'checked enablesetting';
|
181 |
-
$data['nocustompost'] = 'disablesetting';
|
182 |
-
} else {
|
183 |
-
$data['nocustompost'] = 'checked enablesetting';
|
184 |
-
$data['custompost'] = 'disablesetting';
|
185 |
-
}
|
186 |
-
|
187 |
-
if (isset($tableseo['customtaxonomy'])) {
|
188 |
-
$importoption = $tableseo['customtaxonomy'];
|
189 |
-
} else {
|
190 |
-
$importoption = '';
|
191 |
-
};
|
192 |
-
if ($importoption == 'customtaxonomy') {
|
193 |
-
$data['customtaxonomy'] = 'checked enablesetting';
|
194 |
-
$data['nocustomtaxonomy'] = 'disablesetting';
|
195 |
-
} else {
|
196 |
-
$data['nocustomtaxonomy'] = 'checked enablesetting';
|
197 |
-
$data['customtaxonomy'] = 'disablesetting';
|
198 |
-
}
|
199 |
-
|
200 |
-
if (isset($tableseo['categories'])) {
|
201 |
-
$importoption = $tableseo['categories'];
|
202 |
-
} else {
|
203 |
-
$importoption = '';
|
204 |
-
};
|
205 |
-
if ($importoption == 'categories') {
|
206 |
-
$data['categories'] = 'checked enablesetting';
|
207 |
-
$data['nocategories'] = 'disablesetting';
|
208 |
-
} else {
|
209 |
-
$data['nocategories'] = 'checked enablesetting';
|
210 |
-
$data['categories'] = 'disablesetting';
|
211 |
-
}
|
212 |
-
|
213 |
-
if (isset($tableseo['rcustomerreviews'])) {
|
214 |
-
$importoption = $tableseo['rcustomerreviews'];
|
215 |
-
} else {
|
216 |
-
$importoption = '';
|
217 |
-
};
|
218 |
-
if ($importoption == 'customerreviews') {
|
219 |
-
$data['customerreviews'] = 'checked enablesetting';
|
220 |
-
$data['nocustomerreviews'] = 'disablesetting';
|
221 |
-
} else {
|
222 |
-
$data['nocustomerreviews'] = 'checked enablesetting';
|
223 |
-
$data['customerreviews'] = 'disablesetting';
|
224 |
-
}
|
225 |
-
|
226 |
-
// Debug mode enable / disable
|
227 |
-
if (isset($tableseo['debug_mode'])) {
|
228 |
-
$debug_mode = $tableseo['debug_mode'];
|
229 |
-
} else {
|
230 |
-
$debug_mode = '';
|
231 |
-
}
|
232 |
-
if ($debug_mode == 'enable_debug') {
|
233 |
-
$data['debugmode_enable'] = 'checked enablesetting';
|
234 |
-
$data['debugmode_disable'] = 'disablesetting';
|
235 |
-
} else {
|
236 |
-
if ($debug_mode == 'disable_debug') {
|
237 |
-
$data['debugmode_enable'] = 'disablesetting';
|
238 |
-
$data['debugmode_disable'] = 'checked enablesetting';
|
239 |
-
}
|
240 |
-
}
|
241 |
-
|
242 |
-
//Custom Fields
|
243 |
-
#$wpmemberoption = $tableseo['rwpmembers'];
|
244 |
-
if (isset($tableseo['rwpmembers']) && $tableseo['rwpmembers'] == 'wpmembers') {
|
245 |
-
$data['checkuser'] = 'checked enablesetting';
|
246 |
-
$data['uncheckuser'] = 'disablesetting';
|
247 |
-
} else {
|
248 |
-
$data['uncheckuser'] = 'checked enablesetting';
|
249 |
-
$data['checkuser'] = 'disablesetting';
|
250 |
-
}
|
251 |
-
#$customfieldoption = $tableseo['rcustomfield'];
|
252 |
-
if (isset($tableseo['rcustomfield']) && $tableseo['rcustomfield'] == 'acf') {
|
253 |
-
$data['acf'] = 'checked enablesetting';
|
254 |
-
$data['cctmcustfields'] = 'disablesetting';
|
255 |
-
$data['wptypescustfields'] = 'disablesetting';
|
256 |
-
$data['podscustomfields'] = 'disablesetting';
|
257 |
-
$data['acf_status'] = 'Enabled';
|
258 |
-
$data['cctmfield_status'] = 'Disabled';
|
259 |
-
$data['typesfield_status'] = 'Disabled';
|
260 |
-
$data['podsfield_status'] = 'Disabled';
|
261 |
-
} else {
|
262 |
-
if (isset($tableseo['rcustomfield']) && $tableseo['rcustomfield'] == 'cctmcustfields') {
|
263 |
-
$data['cctmcustfields'] = 'checked enablesetting';
|
264 |
-
$data['acf'] = 'disablesetting';
|
265 |
-
$data['wptypescustfields'] = 'disablesetting';
|
266 |
-
$data['podscustomfields'] = 'disablesetting';
|
267 |
-
$data['acf_status'] = 'Disabled';
|
268 |
-
$data['cctmfield_status'] = 'Enabled';
|
269 |
-
$data['typesfield_status'] = 'Disabled';
|
270 |
-
$data['podsfield_status'] = 'Disabled';
|
271 |
-
} else {
|
272 |
-
if (isset($tableseo['rcustomfield']) && $tableseo['rcustomfield'] == 'wptypescustfields') {
|
273 |
-
$data['wptypescustfields'] = 'checked enablesetting';
|
274 |
-
$data['acf'] = 'disablesetting';
|
275 |
-
$data['cctmcustfields'] = 'disablesetting';
|
276 |
-
$data['podscustomfields'] = 'disablesetting';
|
277 |
-
$data['acf_status'] = 'Disabled';
|
278 |
-
$data['cctmfield_status'] = 'Disabled';
|
279 |
-
$data['typesfield_status'] = 'Enabled';
|
280 |
-
$data['podsfield_status'] = 'Disabled';
|
281 |
-
} else {
|
282 |
-
if (isset($tableseo['rcustomfield']) && $tableseo['rcustomfield'] == 'podscustomfields') {
|
283 |
-
$data['podscustomfields'] = 'checked enablesetting';
|
284 |
-
$data['acf'] = 'disablesetting';
|
285 |
-
$data['cctmcustfields'] = 'disablesetting';
|
286 |
-
$data['wptypescustfields'] = 'disablesetting';
|
287 |
-
$data['acf_status'] = 'Disabled';
|
288 |
-
$data['cctmfield_status'] = 'Disabled';
|
289 |
-
$data['typesfield_status'] = 'Disabled';
|
290 |
-
$data['podsfield_status'] = 'Enabled';
|
291 |
-
} else {
|
292 |
-
$data['podscustomfields'] = 'disablesetting';
|
293 |
-
$data['acf'] = 'disablesetting';
|
294 |
-
$data['cctmcustfields'] = 'disablesetting';
|
295 |
-
$data['wptypescustfields'] = 'disablesetting';
|
296 |
-
$data['acf_status'] = 'Disabled';
|
297 |
-
$data['cctmfield_status'] = 'Disabled';
|
298 |
-
$data['typesfield_status'] = 'Disabled';
|
299 |
-
$data['podsfield_status'] = 'Disabled';
|
300 |
-
}
|
301 |
-
}
|
302 |
-
}
|
303 |
-
}
|
304 |
-
|
305 |
-
//Custom post
|
306 |
-
$tablecustompost = get_option('wpcsvfreesettings');
|
307 |
-
$customoption = isset($tablecustompost['rcustompost']) ? $tablecustompost['rcustompost'] : '';
|
308 |
-
if ($customoption == 'custompostuitype') {
|
309 |
-
$data['custompostuitype'] = 'checked enablesetting';
|
310 |
-
$data['wptypes'] = 'disablesetting';
|
311 |
-
$data['cctm'] = 'disablesetting';
|
312 |
-
$data['podspost'] = 'disablesetting';
|
313 |
-
$data['nonercustompost'] = 'disablesetting';
|
314 |
-
$data['default_status'] = 'Disabled';
|
315 |
-
$data['cptui_status'] = 'Enabled';
|
316 |
-
$data['wptypes_status'] = 'Disabled';
|
317 |
-
$data['cctm_status'] = 'Disabled';
|
318 |
-
$data['podspost_status'] = 'Disabled';
|
319 |
-
} else {
|
320 |
-
if ($customoption == 'wptypes') {
|
321 |
-
$data['wptypes'] = 'checked enablesetting';
|
322 |
-
$data['custompostuitype'] = 'disablesetting';
|
323 |
-
$data['cctm'] = 'disablesetting';
|
324 |
-
$data['podspost'] = 'disablesetting';
|
325 |
-
$data['nonercustompost'] = 'disablesetting';
|
326 |
-
$data['default_status'] = 'Disabled';
|
327 |
-
$data['cptui_status'] = 'Disabled';
|
328 |
-
$data['wptypes_status'] = 'Enabled';
|
329 |
-
$data['cctm_status'] = 'Disabled';
|
330 |
-
$data['podspost_status'] = 'Disabled';
|
331 |
-
} else {
|
332 |
-
if ($customoption == 'cctm') {
|
333 |
-
$data['cctm'] = 'checked enablesetting';
|
334 |
-
$data['wptypes'] = 'disablesetting';
|
335 |
-
$data['custompostuitype'] = 'disablesetting';
|
336 |
-
$data['podspost'] = 'disablesetting';
|
337 |
-
$data['nonercustompost'] = 'disablesetting';
|
338 |
-
$data['default_status'] = 'Disabled';
|
339 |
-
$data['cptui_status'] = 'Disabled';
|
340 |
-
$data['wptypes_status'] = 'Disabled';
|
341 |
-
$data['cctm_status'] = 'Enabled';
|
342 |
-
$data['podspost_status'] = 'Disabled';
|
343 |
-
} else {
|
344 |
-
if ($customoption == 'podspost') {
|
345 |
-
$data['podspost'] = 'checked enablesetting';
|
346 |
-
$data['cctm'] = 'disablesetting';
|
347 |
-
$data['wptypes'] = 'disablesetting';
|
348 |
-
$data['custompostuitype'] = 'disablesetting';
|
349 |
-
$data['nonercustompost'] = 'disablesetting';
|
350 |
-
$data['default_status'] = 'Disabled';
|
351 |
-
$data['cctm_status'] = 'Disabled';
|
352 |
-
$data['cptui_status'] = 'Disabled';
|
353 |
-
$data['wptypes_status'] = 'Disabled';
|
354 |
-
$data['podspost_status'] = 'Enabled';
|
355 |
-
} else {
|
356 |
-
$data['nonercustompost'] = 'checked enablesetting';
|
357 |
-
$data['cctm'] = 'disablesetting';
|
358 |
-
$data['wptypes'] = 'disablesetting';
|
359 |
-
$data['podspost'] = 'disablesetting';
|
360 |
-
$data['custompostuitype'] = 'disablesetting';
|
361 |
-
$data['default_status'] = 'Enabled';
|
362 |
-
$data['cptui_status'] = 'Disabled';
|
363 |
-
$data['wptypes_status'] = 'Disabled';
|
364 |
-
$data['cctm_status'] = 'Disabled';
|
365 |
-
$data['podspost_status'] = 'Disabled';
|
366 |
-
}
|
367 |
-
}
|
368 |
-
}
|
369 |
-
}
|
370 |
-
//Additional Settings
|
371 |
-
$scheduleoption = isset($tableseo['send_log_email']) ? $tableseo['send_log_email'] : '';
|
372 |
-
if ($scheduleoption == 'send_log_email') {
|
373 |
-
$data['schedulelog'] = 'checked enablesetting';
|
374 |
-
$data['schedulenolog'] = 'disablesetting';
|
375 |
-
} else {
|
376 |
-
$data['schedulenolog'] = 'checked enablesetting';
|
377 |
-
$data['schedulelog'] = 'disablesetting';
|
378 |
-
}
|
379 |
-
|
380 |
-
$categoryoption = isset($tableseo['rcateicons']) ? $tableseo['rcateicons'] : '';
|
381 |
-
if ($categoryoption == 'enable') {
|
382 |
-
$data['catyenable'] = 'checked enablesetting';
|
383 |
-
$data['catydisable'] = 'disablesetting';
|
384 |
-
$data['catyenablestatus'] = 'checked';
|
385 |
-
$data['catydisablestatus'] = '';
|
386 |
-
} else {
|
387 |
-
$data['catydisable'] = 'checked enablesetting';
|
388 |
-
$data['catyenable'] = 'disablesetting';
|
389 |
-
$data['catyenablestatus'] = '';
|
390 |
-
$data['catydisablestatus'] = 'checked';
|
391 |
-
}
|
392 |
-
|
393 |
-
$dropoption = $tableseo['drop_table'];
|
394 |
-
if ($dropoption == 'on') {
|
395 |
-
$data['drop_on'] = 'checked enablesetting';
|
396 |
-
$data['drop_off'] = 'disablesetting';
|
397 |
-
$data['dropon_status'] = 'checked';
|
398 |
-
$data['dropoff_status'] = '';
|
399 |
-
} else {
|
400 |
-
$data['drop_off'] = 'checked enablesetting';
|
401 |
-
$data['drop_on'] = 'disablesetting';
|
402 |
-
$data['dropon_status'] = '';
|
403 |
-
$data['dropoff_status'] = 'checked';
|
404 |
-
}
|
405 |
-
//Eccommerce option
|
406 |
-
$ecommerceoption = isset($tableseo['recommerce']) ? $tableseo['recommerce'] : '';
|
407 |
-
if ($ecommerceoption == 'eshop') {
|
408 |
-
$data['eshop'] = 'checked enablesetting';
|
409 |
-
$data['marketpress'] = 'disablesetting';
|
410 |
-
$data['woocommerce'] = 'disablesetting';
|
411 |
-
$data['wpcommerce'] = 'disablesetting';
|
412 |
-
$data['nonerecommerce'] = 'disablesetting';
|
413 |
-
|
414 |
-
$data['eshop_status'] = 'Enabled';
|
415 |
-
$data['marketpress_status'] = 'Disabled';
|
416 |
-
$data['woocommerce_status'] = 'Disabled';
|
417 |
-
$data['wpcommerce_status'] = 'Disabled';
|
418 |
-
$data['ecomnone_status'] = 'Disabled';
|
419 |
-
} else {
|
420 |
-
if ($ecommerceoption == 'marketpress') {
|
421 |
-
$data['marketpress'] = 'checked enablesetting';
|
422 |
-
$data['eshop'] = 'disablesetting';
|
423 |
-
$data['woocommerce'] = 'disablesetting';
|
424 |
-
$data['wpcommerce'] = 'disablesetting';
|
425 |
-
$data['nonerecommerce'] = 'disablesetting';
|
426 |
-
|
427 |
-
$data['eshop_status'] = 'Disabled';
|
428 |
-
$data['marketpress_status'] = 'Enabled';
|
429 |
-
$data['woocommerce_status'] = 'Disabled';
|
430 |
-
$data['wpcommerce_status'] = 'Disabled';
|
431 |
-
$data['ecomnone_status'] = 'Disabled';
|
432 |
-
} else {
|
433 |
-
if ($ecommerceoption == 'woocommerce') {
|
434 |
-
$data['woocommerce'] = 'checked enablesetting';
|
435 |
-
$data['marketpress'] = 'disablesetting';
|
436 |
-
$data['eshop'] = 'disablesetting';
|
437 |
-
$data['wpcommerce'] = 'disablesetting';
|
438 |
-
$data['nonerecommerce'] = 'disablesetting';
|
439 |
-
|
440 |
-
$data['eshop_status'] = 'Disabled';
|
441 |
-
$data['marketpress_status'] = 'Disabled';
|
442 |
-
$data['woocommerce_status'] = 'Enabled';
|
443 |
-
$data['wpcommerce_status'] = 'Disabled';
|
444 |
-
$data['ecomnone_status'] = 'Disabled';
|
445 |
-
} else {
|
446 |
-
if ($ecommerceoption == 'wpcommerce') {
|
447 |
-
$data['wpcommerce'] = 'checked enablesetting';
|
448 |
-
$data['marketpress'] = 'disablesetting';
|
449 |
-
$data['woocommerce'] = 'disablesetting';
|
450 |
-
$data['eshop'] = 'disablesetting';
|
451 |
-
$data['nonerecommerce'] = 'disablesetting';
|
452 |
-
|
453 |
-
$data['eshop_status'] = 'Disabled';
|
454 |
-
$data['marketpress_status'] = 'Disabled';
|
455 |
-
$data['woocommerce_status'] = 'Disabled';
|
456 |
-
$data['wpcommerce_status'] = 'Enabled';
|
457 |
-
$data['ecomnone_status'] = 'Disabled';
|
458 |
-
} else {
|
459 |
-
$data['nonerecommerce'] = 'checked enablesetting';
|
460 |
-
$data['wpcommerce'] = 'disablesetting';
|
461 |
-
$data['marketpress'] = 'disablesetting';
|
462 |
-
$data['woocommerce'] = 'disablesetting';
|
463 |
-
$data['eshop'] = 'disablesetting';
|
464 |
-
|
465 |
-
$data['eshop_status'] = 'Disabled';
|
466 |
-
$data['marketpress_status'] = 'Disabled';
|
467 |
-
$data['woocommerce_status'] = 'Disabled';
|
468 |
-
$data['wpcommerce_status'] = 'Disabled';
|
469 |
-
$data['ecomnone_status'] = 'Enabled';
|
470 |
-
}
|
471 |
-
}
|
472 |
-
}
|
473 |
-
}
|
474 |
-
|
475 |
-
|
476 |
-
$data['cctmtd'] = $this->getpluginstate('custom-content-type-manager/index.php');
|
477 |
-
$data['cptutd'] = $this->getpluginstate('custom-post-type-ui/custom-post-type-ui.php');
|
478 |
-
$data['eshoptd'] = $this->getpluginstate('eshop/eshop.php');
|
479 |
-
$data['wpcomtd'] = $this->getpluginstate('wp-e-commerce/wp-shopping-cart.php');
|
480 |
-
$data['woocomtd'] = $this->getpluginstate('woocommerce/woocommerce.php');
|
481 |
-
$data['aioseotd'] = $this->getpluginstate('all-in-one-seo-pack/all_in_one_seo_pack.php');
|
482 |
-
$data['yoasttd'] = $this->getpluginstate('wordpress-seo/wp-seo.php');
|
483 |
-
$data['cateicontd'] = $this->getpluginstate('category-icons/category_icons.php');
|
484 |
-
$data['wecftd'] = $this->getpluginstate('wp-e-commerce-custom-fields/custom-fields.php');
|
485 |
-
$data['acftd'] = $this->getpluginstate('advanced-custom-fields/acf.php');
|
486 |
-
|
487 |
-
$data['cctmtdi'] = $this->getpluginstate('custom-content-type-manager/index.php');
|
488 |
-
$data['cptutdi'] = $this->getpluginstate('custom-post-type-ui/custom-post-type-ui.php');
|
489 |
-
$data['eshoptdi'] = $this->getpluginstate('eshop/eshop.php');
|
490 |
-
$data['wpcomtdi'] = $this->getpluginstate('wp-e-commerce/wp-shopping-cart.php');
|
491 |
-
$data['woocomtdi'] = $this->getpluginstate('woocommerce/woocommerce.php');
|
492 |
-
$data['aioseotdi'] = $this->getpluginstate('all-in-one-seo-pack/all_in_one_seo_pack.php');
|
493 |
-
$data['yoasttdi'] = $this->getpluginstate('wordpress-seo/wp-seo.php');
|
494 |
-
$data['cateicontdi'] = $this->getpluginstate('category-icons/category_icons.php');
|
495 |
-
$data['acftdi'] = $this->getpluginstate('advanced-custom-fields/acf.php');
|
496 |
-
|
497 |
-
$data['plugStatus'] = $this->allPluginStatus($data);
|
498 |
-
return $data;
|
499 |
-
}
|
500 |
-
|
501 |
-
/**
|
502 |
-
* @param string $plugin
|
503 |
-
* @return string $state ** absent,present and active **
|
504 |
-
**/
|
505 |
-
public function getpluginstate($plugin) {
|
506 |
-
$state = 'pluginAbsent';
|
507 |
-
if ($this->isPluginPresent($plugin)) {
|
508 |
-
$state = 'pluginPresent';
|
509 |
-
}
|
510 |
-
if ($this->isPluginActive($plugin)) {
|
511 |
-
$state = 'pluginActive';
|
512 |
-
}
|
513 |
-
return $state;
|
514 |
-
}
|
515 |
-
|
516 |
-
/**
|
517 |
-
* return whether plugin is present
|
518 |
-
* @param string plugin
|
519 |
-
* @return boolean
|
520 |
-
**/
|
521 |
-
public function isPluginPresent($plugin) {
|
522 |
-
$pluginName = array();
|
523 |
-
$plugins = get_plugins();
|
524 |
-
$custompostui = get_option('cpt_custom_post_types');
|
525 |
-
$custtax = get_option('cpt_custom_tax_types');
|
526 |
-
foreach ($plugins as $plug => $key) {
|
527 |
-
$pluginName[] = $plug;
|
528 |
-
}
|
529 |
-
|
530 |
-
if (in_array($plugin, $pluginName)) {
|
531 |
-
return true;
|
532 |
-
} else {
|
533 |
-
return false;
|
534 |
-
}
|
535 |
-
}
|
536 |
-
|
537 |
-
/**
|
538 |
-
* return where plugin is active or not
|
539 |
-
* @param string $plugin
|
540 |
-
* @return boolean
|
541 |
-
**/
|
542 |
-
public function isPluginActive($plugin) {
|
543 |
-
if (in_array($plugin, $this->activePlugins)) {
|
544 |
-
return true;
|
545 |
-
} else {
|
546 |
-
return false;
|
547 |
-
}
|
548 |
-
}
|
549 |
-
|
550 |
-
public function allPluginStatus($skinnyData) {
|
551 |
-
$pluginStatus = '';
|
552 |
-
if ($skinnyData['eshop'] == 'checked') {
|
553 |
-
if ($skinnyData['eshoptdi'] == 'pluginPresent') {
|
554 |
-
$pluginStatus = 'Eshop Plugin is not Activate. ';
|
555 |
-
} elseif ($skinnyData['eshoptdi'] == 'pluginAbsent') {
|
556 |
-
$pluginStatus = 'Eshop Plugin is missing. ';
|
557 |
-
}
|
558 |
-
} elseif ($skinnyData['wpcommerce'] == 'checked') {
|
559 |
-
if ($skinnyData['wpcomtdi'] == 'pluginPresent') {
|
560 |
-
$pluginStatus = 'WPCommerce Plugin is not Activate. ';
|
561 |
-
} elseif ($skinnyData['wpcomtdi'] == 'pluginAbsent') {
|
562 |
-
$pluginStatus = 'WPCommerce Plugin is missing. ';
|
563 |
-
}
|
564 |
-
|
565 |
-
} elseif ($skinnyData['woocommerce'] == 'checked') {
|
566 |
-
if ($skinnyData['woocomtdi'] == 'pluginPresent') {
|
567 |
-
$pluginStatus = 'Woocommerce Plugin is not Activate. ';
|
568 |
-
} elseif ($skinnyData['woocomtdi'] == 'pluginAbsent') {
|
569 |
-
$pluginStatus = 'Woocommerce Plugin is missing. ';
|
570 |
-
}
|
571 |
-
|
572 |
-
}
|
573 |
-
|
574 |
-
if ($skinnyData['custompostuitype'] == 'checked') {
|
575 |
-
if ($skinnyData['cptutdi'] == 'pluginPresent') {
|
576 |
-
$pluginStatus .= 'Custom Post Type UI Plugin is not Activate. ';
|
577 |
-
} elseif ($skinnyData['cptutdi'] == 'pluginAbsent') {
|
578 |
-
$pluginStatus .= 'Custom Post Type UI Plugin is missing. ';
|
579 |
-
}
|
580 |
-
} elseif ($skinnyData['cctm'] == 'checked') {
|
581 |
-
if ($skinnyData['cctmtdi'] == 'pluginPresent') {
|
582 |
-
$pluginStatus .= 'Custom Content Type Manager Plugin is not Activate. ';
|
583 |
-
} elseif ($skinnyData['cctmtdi'] == 'pluginAbsent') {
|
584 |
-
$pluginStatus .= 'Custom Content Type Manager Plugin is missing. ';
|
585 |
-
}
|
586 |
-
}
|
587 |
-
|
588 |
-
if ($skinnyData['acf'] == 'checked') {
|
589 |
-
if ($skinnyData['acftdi'] == 'pluginPresent') {
|
590 |
-
$pluginStatus .= 'Advance Custom Field Plugin is not Activate. ';
|
591 |
-
} elseif ($skinnyData['acftdi'] == 'pluginAbsent') {
|
592 |
-
$pluginStatus .= 'Advance Custom Field Plugin is missing. ';
|
593 |
-
}
|
594 |
-
|
595 |
-
}
|
596 |
-
|
597 |
-
if ($skinnyData['aioseo'] == 'checked') {
|
598 |
-
if ($skinnyData['aioseotdi'] == 'pluginPresent') {
|
599 |
-
$pluginStatus .= 'All in One SEO Plugin is not Activate. ';
|
600 |
-
} elseif ($skinnyData['aioseotdi'] == 'pluginAbsent') {
|
601 |
-
$pluginStatus .= 'All in One SEO Plugin is missing. ';
|
602 |
-
}
|
603 |
-
} elseif ($skinnyData['yoastseo'] == 'checked') {
|
604 |
-
if ($skinnyData['yoasttdi'] == 'pluginPresent') {
|
605 |
-
$pluginStatus .= 'Yoast SEO Plugin is not Activate. ';
|
606 |
-
} elseif ($skinnyData['yoasttdi'] == 'pluginAbsent') {
|
607 |
-
$pluginStatus .= 'Yoast SEO Manager Plugin is missing. ';
|
608 |
-
}
|
609 |
-
}
|
610 |
-
return $pluginStatus;
|
611 |
-
}
|
612 |
}
|
613 |
|
35 |
* "Copyright Smackcoders. 2015. All rights reserved".
|
36 |
********************************************************************************/
|
37 |
|
38 |
+
if ( ! defined( 'ABSPATH' ) )
|
39 |
+
exit; // Exit if accessed directly
|
40 |
+
|
41 |
+
class SettingsActions extends SkinnyActions
|
42 |
+
{
|
43 |
+
public $activePlugins = array();
|
44 |
+
public function __construct()
|
45 |
+
{
|
46 |
+
$this->activePlugins = get_option('active_plugins');
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* The actions index method
|
51 |
+
* @param array $request
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
public function executeIndex($request)
|
55 |
+
{
|
56 |
+
$data = array();
|
57 |
+
$data['savesettings'] = 'notdone';
|
58 |
+
if(isset($_POST['savesettings'])){
|
59 |
+
update_option('wpcsvfreesettings',$_POST);
|
60 |
+
$data['savesettings'] = 'done';
|
61 |
+
}
|
62 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
|
modules/settings/templates/index.php
CHANGED
@@ -36,1272 +36,132 @@
|
|
36 |
********************************************************************************/
|
37 |
|
38 |
if (!defined('ABSPATH')) {
|
39 |
-
|
40 |
} // Exit if accessed directly
|
41 |
global $wp_version, $wpdb;
|
42 |
$impCE = new WPImporter_includes_helper();
|
43 |
$nonce_Key = $impCE->create_nonce_key();
|
44 |
if (!wp_verify_nonce($nonce_Key, 'smack_nonce')) {
|
45 |
-
|
46 |
}
|
47 |
?>
|
48 |
-
<div
|
49 |
-
style='text-align:center;margin:0;color:red;font-size:smaller;'> <?php echo __('Your Required Settings Configuration Please Select Security and Performance tab', 'wp-ultimate-csv-importer'); ?> </div></br>
|
50 |
-
<div id="ShowMsg" style="display:none;"><p id="warning-msg"
|
51 |
-
class="alert alert-warning"><?php echo $skinnyData['plugStatus']; ?></p>
|
52 |
</div>
|
53 |
-
<?php
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
?>
|
59 |
-
<script type="text/javascript">
|
60 |
-
jQuery(document).ready(function () {
|
61 |
-
jQuery('#ShowMsg').delay(2000).fadeOut();
|
62 |
-
jQuery('#ShowMsg').css("display", "none");
|
63 |
-
jQuery('#deletesuccess').delay(2000).fadeOut();
|
64 |
-
});
|
65 |
-
</script>
|
66 |
-
<?php
|
67 |
-
}
|
68 |
global $wpdb; ?>
|
69 |
<div class="uifree-settings">
|
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 |
-
</ul>
|
152 |
-
</div>
|
153 |
-
<div id="contentbar">
|
154 |
-
<!-- div-1-->
|
155 |
-
<div id="section1" class="generalsettings">
|
156 |
-
<div class="title">
|
157 |
-
<h3><?php echo __('Enabled Modules', 'wp-ultimate-csv-importer'); ?></h3>
|
158 |
-
<span style="float:right;margin-right:92px;margin-top:-34px;">
|
159 |
-
<a href="#" id='checkallModules'
|
160 |
-
title=<?php echo __('Check All', 'wp-ultimate-csv-importer'); ?>value = 'Check All' name='checkallModules' onclick="selectModules(this.id);
|
161 |
-
"><?php echo $impCE->reduceStringLength(__('Check All', 'wp-ultimate-csv-importer'), 'Check All'); ?></a>
|
162 |
-
</span>
|
163 |
-
<span style="float:right;margin-right:5px;margin-top:-34px;">
|
164 |
-
<a href="#" id='uncheckallModules' name='checkallModules'
|
165 |
-
title= <?php echo __('Uncheck All', 'wp-ultimate-csv-importer'); ?> value = 'Un Check All' onclick='selectModules(this.id);
|
166 |
-
'> / <?php echo $impCE->reduceStringLength(__('Uncheck All', 'wp-ultimate-csv-importer'), 'Uncheck All'); ?></a>
|
167 |
-
</span>
|
168 |
-
</div>
|
169 |
-
<div id="data">
|
170 |
-
<table>
|
171 |
-
<tr>
|
172 |
-
<td>
|
173 |
-
<h3 id="innertitle"><?php echo __('Post', 'wp-ultimate-csv-importer'); ?></h3>
|
174 |
-
<label>
|
175 |
-
<div><?php echo __('Enables to import posts with custompost and customfields.', 'wp-ultimate-csv-importer'); ?></div>
|
176 |
-
<div><?php echo __('Enable to import posts with attributes from csv.', 'wp-ultimate-csv-importer'); ?></div>
|
177 |
-
</label>
|
178 |
-
</td>
|
179 |
-
<td>
|
180 |
-
</td>
|
181 |
-
<td style="width:112px">
|
182 |
-
<label id="postlabel"
|
183 |
-
title="<?php echo __('Enable', 'wp-ultimate-csv-importer'); ?>"
|
184 |
-
class="<?php echo $skinnyData['post']; ?>"><input type='checkbox' name='post'
|
185 |
-
id='post'
|
186 |
-
value='post' <?php echo $skinnyData['post']; ?>
|
187 |
-
onclick="postsetting(this.id);"
|
188 |
-
checked disabled
|
189 |
-
style="display:none"><?php echo $impCE->reduceStringLength(__('Enable', 'wp-ultimate-csv-importer'), 'Enable'); ?>
|
190 |
-
</label>
|
191 |
-
<input type="hidden" name="post" id="post" value="post"/>
|
192 |
-
<label id="nopostlabel"
|
193 |
-
title="<?php echo __('Disable', 'wp-ultimate-csv-importer'); ?>"
|
194 |
-
class="<?php echo $skinnyData['nopost']; ?>"><input type='checkbox'
|
195 |
-
name='post'
|
196 |
-
onclick="postsetting(this.id);"
|
197 |
-
checked disabled
|
198 |
-
style="display:none"><?php echo $impCE->reduceStringLength(__('Disable', 'wp-ultimate-csv-importer'), 'Disable'); ?>
|
199 |
-
</label>
|
200 |
-
</td>
|
201 |
-
</tr>
|
202 |
-
<tr>
|
203 |
-
<td>
|
204 |
-
<h3 id="innertitle"><?php echo __('Page', 'wp-ultimate-csv-importer'); ?></h3>
|
205 |
-
<label>
|
206 |
-
<div><?php echo __('Enables to import pages with custompost and customfields.', 'wp-ultimate-csv-importer'); ?></div>
|
207 |
-
<div><?php echo __('Enable to import pages with attributes from csv.', 'wp-ultimate-csv-importer'); ?></div>
|
208 |
-
</label>
|
209 |
-
</td>
|
210 |
-
<td>
|
211 |
-
</td>
|
212 |
-
<td style="width:112px">
|
213 |
-
<label id="pagelabel"
|
214 |
-
title="<?php echo __('Enable', 'wp-ultimate-csv-importer'); ?>"
|
215 |
-
class="<?php echo $skinnyData['page']; ?>"><input type='checkbox' name='page'
|
216 |
-
id='page'
|
217 |
-
style="display:none"
|
218 |
-
value='page' <?php echo $skinnyData['page']; ?>
|
219 |
-
onclick="pagesetting(this.id);"
|
220 |
-
checked
|
221 |
-
disabled><?php echo $impCE->reduceStringLength(__('Enable', 'wp-ultimate-csv-importer'), 'Enable'); ?>
|
222 |
-
</label>
|
223 |
-
<input type="hidden" name="page" id="page" value="page"/>
|
224 |
-
<label id="nopagelabel"
|
225 |
-
title="<?php echo __('Disable', 'wp-ultimate-csv-importer'); ?>"
|
226 |
-
class="<?php echo $skinnyData['nopage']; ?>"><input type='checkbox'
|
227 |
-
name='page'
|
228 |
-
style="display:none"
|
229 |
-
onclick="pagesetting(this.id);"
|
230 |
-
checked
|
231 |
-
disabled><?php echo $impCE->reduceStringLength(__('Disable', 'wp-ultimate-csv-importer'), 'Disable'); ?>
|
232 |
-
</label>
|
233 |
-
</td>
|
234 |
-
</tr>
|
235 |
-
<tr>
|
236 |
-
<td>
|
237 |
-
<h3 id="innertitle"><?php echo __('Users', 'wp-ultimate-csv-importer'); ?></h3>
|
238 |
-
<label><?php echo __('Enable to import users with attributes from csv.', 'wp-ultimate-csv-importer'); ?></label>
|
239 |
-
</td>
|
240 |
-
<td>
|
241 |
-
</td>
|
242 |
-
<td style="width:112px">
|
243 |
-
<label id="userlabel"
|
244 |
-
title="<?php echo __('Enable', 'wp-ultimate-csv-importer'); ?>"
|
245 |
-
class="<?php echo $skinnyData['users']; ?>"><input type='checkbox'
|
246 |
-
name='users' id='users'
|
247 |
-
style="display:none"
|
248 |
-
value='users' <?php echo $skinnyData['users']; ?>
|
249 |
-
onclick="usersetting(this.id);"><?php echo $impCE->reduceStringLength(__('Enable', 'wp-ultimate-csv-importer'), 'Enable'); ?>
|
250 |
-
</label>
|
251 |
-
<label id="nouserlabel"
|
252 |
-
title="<?php echo __('Disable', 'wp-ultimate-csv-importer'); ?>"
|
253 |
-
class="<?php echo $skinnyData['nousers']; ?>"><input type='checkbox'
|
254 |
-
name='users'
|
255 |
-
style="display:none"
|
256 |
-
onclick="usersetting(this.id);"><?php echo $impCE->reduceStringLength(__('Disable', 'wp-ultimate-csv-importer'), 'Disable'); ?>
|
257 |
-
</label>
|
258 |
-
</td>
|
259 |
-
</tr>
|
260 |
-
<!--<tr><td>
|
261 |
-
<h3 id="innertitle"><?php //echo __('Comments',WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?></h3>
|
262 |
-
<label><div><?php //echo __('Enables to import posts with custompost and customfields.',WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?></div>
|
263 |
-
<div><?php //echo __('Enable to import comments for post ids from csv.',WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?></div>
|
264 |
-
</label>
|
265 |
-
</td><td>
|
266 |
-
</td><td style="width:112px">
|
267 |
-
<label id="commentslabel" title = "<?php //echo __('Enable',WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?>" class="<?php //echo $skinnyData['comments']; ?>"><input type='checkbox' name='comments' id='comments' style="display:none" value='comments' <?php //echo $skinnyData['comments']; ?> onclick="commentsetting(this.id);" ><?php //echo $impCE->reduceStringLength(__('Enable',WP_CONST_ULTIMATE_CSV_IMP_SLUG),'Enable'); ?> </label>
|
268 |
-
<label id="nocommentslabel" title = "<?php //echo __('Disable',WP_CONST_ULTIMATE_CSV_IMP_SLUG); ?>" class="<?php //echo $skinnyData['nocomments']; ?>"><input type='checkbox' name='comments' style="display:none" onclick="commentsetting(this.id);" ><?php //echo $impCE->reduceStringLength(__('Disable',WP_CONST_ULTIMATE_CSV_IMP_SLUG),'Disable'); ?> </label>
|
269 |
-
</td></tr>-->
|
270 |
-
<tr>
|
271 |
-
<td>
|
272 |
-
<h3 id="innertitle"><?php echo __('Custom Post', 'wp-ultimate-csv-importer'); ?></h3>
|
273 |
-
<label>
|
274 |
-
<div><?php echo __('Enables to import Customposts.', 'wp-ultimate-csv-importer'); ?></div>
|
275 |
-
<div><?php echo __('Enable to import custom posts with attributes from csv', 'wp-ultimate-csv-importer'); ?></div>
|
276 |
-
</label></td>
|
277 |
-
<td>
|
278 |
-
</td>
|
279 |
-
<td style="width:112px">
|
280 |
-
<label id="cplabel" title="<?php echo __('Enable', 'wp-ultimate-csv-importer'); ?>"
|
281 |
-
class="<?php echo $skinnyData['custompost']; ?>"><input type='checkbox'
|
282 |
-
name='custompost'
|
283 |
-
id='custompost'
|
284 |
-
style="display:none"
|
285 |
-
value='custompost' <?php echo $skinnyData['custompost']; ?>
|
286 |
-
onclick="cpsetting(this.id);"
|
287 |
-
checked
|
288 |
-
disabled><?php echo $impCE->reduceStringLength(__('Enable', 'wp-ultimate-csv-importer'), 'Enable'); ?>
|
289 |
-
</label>
|
290 |
-
<input type="hidden" name="custompost" id="custompost" value="custompost"/>
|
291 |
-
<label id="nocplabel"
|
292 |
-
title="<?php echo __('Disable', 'wp-ultimate-csv-importer'); ?>"
|
293 |
-
class="<?php echo $skinnyData['nocustompost']; ?>"><input type='checkbox'
|
294 |
-
name='custompost'
|
295 |
-
style="display:none"
|
296 |
-
onclick="cpsetting(this.id);"
|
297 |
-
checked
|
298 |
-
disabled><?php echo $impCE->reduceStringLength(__('Disable', 'wp-ultimate-csv-importer'), 'Disable'); ?>
|
299 |
-
</label>
|
300 |
-
</td>
|
301 |
-
</tr>
|
302 |
-
<tr>
|
303 |
-
<td>
|
304 |
-
<h3 id="innertitle"><?php echo __('Custom Taxonomy', 'wp-ultimate-csv-importer'); ?></h3>
|
305 |
-
<label>
|
306 |
-
<div><?php echo __('Enables to import Custom taxonomy.', 'wp-ultimate-csv-importer'); ?></div>
|
307 |
-
<div><?php echo __('Enable to import nested custom taxonomies with description and slug for each from csv', 'wp-ultimate-csv-importer'); ?></div>
|
308 |
-
</label>
|
309 |
-
</td>
|
310 |
-
<td>
|
311 |
-
</td>
|
312 |
-
<td style="width:112px">
|
313 |
-
<label id="custaxlabel"
|
314 |
-
title="<?php echo __('Enable', 'wp-ultimate-csv-importer'); ?>"
|
315 |
-
class="<?php echo $skinnyData['customtaxonomy']; ?>"><input type='checkbox'
|
316 |
-
name='customtaxonomy'
|
317 |
-
id='customtaxonomy'
|
318 |
-
style="display:none"
|
319 |
-
value='customtaxonomy' <?php echo $skinnyData['customtaxonomy']; ?>
|
320 |
-
onclick="check_if_avail(this.name);"><?php echo $impCE->reduceStringLength(__('Enable', 'wp-ultimate-csv-importer'), 'Enable'); ?>
|
321 |
-
</label>
|
322 |
-
<label id="nocustaxlabel"
|
323 |
-
title="<?php echo __('Disable', 'wp-ultimate-csv-importer'); ?>"
|
324 |
-
class="<?php echo $skinnyData['nocustomtaxonomy']; ?>"><input type='checkbox'
|
325 |
-
name='customtaxonomy'
|
326 |
-
style="display:none"
|
327 |
-
onclick="check_if_avail(this.name);"><?php echo $impCE->reduceStringLength(__('Disable', 'wp-ultimate-csv-importer'), 'Disable'); ?>
|
328 |
-
</label>
|
329 |
-
</td>
|
330 |
-
</tr>
|
331 |
-
<tr>
|
332 |
-
<td>
|
333 |
-
<h3 id="innertitle"><?php echo __('Categories/Tags', 'wp-ultimate-csv-importer'); ?></h3>
|
334 |
-
<label>
|
335 |
-
<div><?php echo __('Enables to import Categories.', 'wp-ultimate-csv-importer'); ?></div>
|
336 |
-
<div><?php echo __('Enable to import nested categories with description and slug for each from csv.', 'wp-ultimate-csv-importer'); ?></div>
|
337 |
-
</label></td>
|
338 |
-
<td>
|
339 |
-
</td>
|
340 |
-
<td style="width:112px">
|
341 |
-
<label id="catlabel" title="<?php echo __('Enable', 'wp-ultimate-csv-importer'); ?>"
|
342 |
-
class="<?php echo $skinnyData['categories']; ?>"><input type='checkbox'
|
343 |
-
name='categories'
|
344 |
-
id='categories'
|
345 |
-
style="display:none"
|
346 |
-
value='categories' <?php echo $skinnyData['categories']; ?>
|
347 |
-
onclick="check_if_avail(this.name);"><?php echo $impCE->reduceStringLength(__('Enable', 'wp-ultimate-csv-importer'), 'Enable'); ?>
|
348 |
-
</label>
|
349 |
-
<label id="nocatlabel"
|
350 |
-
title="<?php echo __('Disable', 'wp-ultimate-csv-importer'); ?>"
|
351 |
-
class="<?php echo $skinnyData['nocategories']; ?>"><input type='checkbox'
|
352 |
-
name='categories'
|
353 |
-
style="display:none"
|
354 |
-
onclick="check_if_avail(this.name);"><?php echo $impCE->reduceStringLength(__('Disable', 'wp-ultimate-csv-importer'), 'Disable'); ?>
|
355 |
-
</label>
|
356 |
-
</td>
|
357 |
-
</tr>
|
358 |
-
<tr>
|
359 |
-
<td>
|
360 |
-
<h3 id="innertitle"><?php echo __('Customer Reviews', 'wp-ultimate-csv-importer'); ?></h3>
|
361 |
-
<label>
|
362 |
-
<div><?php echo __('Enables to import Customer reviews.', 'wp-ultimate-csv-importer'); ?></div>
|
363 |
-
<div><?php echo __('Enable to import customer reviews with attributes from csv.', 'wp-ultimate-csv-importer'); ?></div>
|
364 |
-
</label></td>
|
365 |
-
<td>
|
366 |
-
</td>
|
367 |
-
<td style="width:112px">
|
368 |
-
<label id="custrevlabel"
|
369 |
-
title="<?php echo __('Enable', 'wp-ultimate-csv-importer'); ?>"
|
370 |
-
class="<?php echo $skinnyData['customerreviews'] . ' ' . $skinnyData['acf']; ?>"><input
|
371 |
-
type='checkbox' name='rcustomfield' id='Customerreviews'
|
372 |
-
style="display:none"
|
373 |
-
value='Customerreviews' <?php echo $skinnyData['acf']; ?>
|
374 |
-
onclick="check_if_avail(this.id);"><?php echo $impCE->reduceStringLength(__('Enable', 'wp-ultimate-csv-importer'), 'Enable'); ?>
|
375 |
-
</label>
|
376 |
-
<label id="nocustrevlabel"
|
377 |
-
title="<?php echo __('Disable', 'wp-ultimate-csv-importer'); ?>"
|
378 |
-
class="<?php echo $skinnyData['nocustomerreviews']; ?>"><input
|
379 |
-
type='checkbox' name='rcustomfield' style="display:none"
|
380 |
-
onclick="check_if_avail(this.name);"><?php echo $impCE->reduceStringLength(__('Disable', 'wp-ultimate-csv-importer'), 'Disable'); ?>
|
381 |
-
</label>
|
382 |
-
<span id="pluginavail"
|
383 |
-
class="moduleavail <?php if (isset($skinnyData['customerreviewstd'])) {
|
384 |
-
echo $skinnyData['customerreviewstd'];
|
385 |
-
} ?>"> </span>
|
386 |
-
</td>
|
387 |
-
</tr>
|
388 |
-
</tbody></table>
|
389 |
-
<br/>
|
390 |
-
<label
|
391 |
-
style='color:red;'><?php echo __("Note: Supports WordPress Custom Post by default. For Custom Post Type UI plugin, please enable it under Custom Posts & Taxonomy", 'wp-ultimate-csv-importer'); ?></label>
|
392 |
-
</div>
|
393 |
-
</div>
|
394 |
-
<!--div-2 -->
|
395 |
-
<div id="section2" class="custompost" style="display:none;">
|
396 |
-
<div class="title" class="databorder">
|
397 |
-
<h3><?php echo __('Custom Posts & Taxonomy', 'wp-ultimate-csv-importer'); ?> </h3>
|
398 |
-
</div>
|
399 |
-
<div id="data">
|
400 |
-
<table>
|
401 |
-
<tbody>
|
402 |
-
<tr>
|
403 |
-
<td>
|
404 |
-
<h3 id="innertitle"><?php echo __('Default', 'wp-ultimate-csv-importer'); ?></h3>
|
405 |
-
<label><?php echo __('Custom post types that are coded within wordpress codex apart from plugins.', 'wp-ultimate-csv-importer'); ?></label>
|
406 |
-
</td>
|
407 |
-
<td>
|
408 |
-
<label id="custompostsetting1"
|
409 |
-
class="<?php echo $skinnyData['nonercustompost']; ?>"><input type='radio'
|
410 |
-
name='rcustompost'
|
411 |
-
id='nonercustompost'
|
412 |
-
style="display:none"
|
413 |
-
value='nonercustompost' <?php echo $skinnyData['nonercustompost']; ?>
|
414 |
-
class='ecommerce'
|
415 |
-
onclick="custompostsetting(this.id);"><span
|
416 |
-
id="custompost1text"> <?php echo $skinnyData['default_status']; ?> </span></label>
|
417 |
-
</td>
|
418 |
-
</tr>
|
419 |
-
<tr>
|
420 |
-
<td>
|
421 |
-
<h3 id="innertitle"><?php echo __('Custom Post Type UI', 'wp-ultimate-csv-importer'); ?></h3>
|
422 |
-
<label><?php echo __('Import support for Custom Post Type UI data.', 'wp-ultimate-csv-importer'); ?></label>
|
423 |
-
</td>
|
424 |
-
<td>
|
425 |
-
<label id="custompostsetting2"
|
426 |
-
class="<?php echo $skinnyData['custompostuitype']; ?>"><input type='radio'
|
427 |
-
name='rcustompost'
|
428 |
-
id='custompostuitype'
|
429 |
-
style="display:none"
|
430 |
-
value='custompostuitype' <?php echo $skinnyData['custompostuitype']; ?>
|
431 |
-
onclick="custompostsetting(this.id);"><span
|
432 |
-
id="custompost2text"> <?php echo $skinnyData['cptui_status']; ?> </span></label>
|
433 |
-
|
434 |
-
<div id="pluginavail" class="<?php echo $skinnyData['cptutd'] ?>"></div>
|
435 |
-
</td>
|
436 |
-
</tr>
|
437 |
-
<tr>
|
438 |
-
<td>
|
439 |
-
<h3 id="innertitle"><?php echo __('Types Custom Posts & Taxonomy', 'wp-ultimate-csv-importer'); ?></h3>
|
440 |
-
<label><?php echo __('Import support for Types Custom Post Type and taxonomies data.', 'wp-ultimate-csv-importer'); ?></label>
|
441 |
-
</td>
|
442 |
-
<td>
|
443 |
-
<label id="custompostsetting3" class="<?php echo $skinnyData['cctm']; ?>">
|
444 |
-
<input type='radio' name='rcustompost' id='types' style="display:none"
|
445 |
-
value='types' <?php echo $skinnyData['cctm']; ?>
|
446 |
-
onclick="check_if_avail(this.id);"><span
|
447 |
-
id="custompost3text"> <?php echo $skinnyData['wptypes_status']; ?> </span></label>
|
448 |
-
|
449 |
-
<div id="pluginavail" class="<?php if (isset($skinnyData['wptypestd'])) {
|
450 |
-
echo $skinnyData['wptypestd'];
|
451 |
-
} ?>"></div>
|
452 |
-
</td>
|
453 |
-
</tr>
|
454 |
-
<tr>
|
455 |
-
<td>
|
456 |
-
<h3 id="innertitle"><?php echo __('CCTM Custom Posts', 'wp-ultimate-csv-importer'); ?></h3>
|
457 |
-
<label><?php echo __('Import support for CCTM Custom Posts from csv.', 'wp-ultimate-csv-importer'); ?></label>
|
458 |
-
</td>
|
459 |
-
<td>
|
460 |
-
<label id="custompostsetting4" class="<?php echo $skinnyData['cctm']; ?>"><input
|
461 |
-
type='radio' name='rcustompost' id='cctm' style="display:none"
|
462 |
-
value='cctm' <?php echo $skinnyData['cctm']; ?>
|
463 |
-
onclick="check_if_avail(this.id);"><span
|
464 |
-
id="custompost4text"><?php echo $skinnyData['cctm_status']; ?></span>
|
465 |
-
</label>
|
466 |
-
|
467 |
-
<div id="pluginavail" class="<?php echo $skinnyData['cctmtd'] ?>"></div>
|
468 |
-
</td>
|
469 |
-
</tr>
|
470 |
-
<tr>
|
471 |
-
<td>
|
472 |
-
<h3 id="innertitle"><?php echo __('PODS Custom Posts & Taxonomy', 'wp-ultimate-csv-importer'); ?></h3>
|
473 |
-
<label><?php echo __('Import support for PODS Custom Posts.', 'wp-ultimate-csv-importer'); ?></label>
|
474 |
-
</td>
|
475 |
-
<td>
|
476 |
-
<label id="custompostsetting5" class="<?php echo $skinnyData['podspost']; ?>"><input
|
477 |
-
type='radio' name='rcustompost' id='podspost'
|
478 |
-
value='podspost' <?php echo $skinnyData['podspost']; ?> style="display:none"
|
479 |
-
onclick="check_if_avail(this.id);"><span
|
480 |
-
id="custompost5text"> <?php echo $skinnyData['podspost_status']; ?></span></label>
|
481 |
-
|
482 |
-
<div id="pluginavail" class="<?php if (isset($skinnyData['podstd'])) {
|
483 |
-
echo $skinnyData['podstd'];
|
484 |
-
} ?>"></div>
|
485 |
-
</td>
|
486 |
-
</tr>
|
487 |
-
</tbody>
|
488 |
-
</table>
|
489 |
-
</div>
|
490 |
-
</div>
|
491 |
-
<!--div-3-->
|
492 |
-
<div id="section3" class="Customfields" style="display:none;">
|
493 |
-
<div class="title">
|
494 |
-
<h3><?php echo __('Custom Fields', 'wp-ultimate-csv-importer'); ?></h3>
|
495 |
-
<span id="resetcustfield"><a id="resetopt" href="#" value="reset" name="resetcustfield"
|
496 |
-
onclick="resetOption(this.id);"><?php echo __('Reset Custom Field', 'wp-ultimate-csv-importer'); ?></a> </span>
|
497 |
-
</div>
|
498 |
-
<div id="data" class="databorder custom-fields">
|
499 |
-
<table>
|
500 |
-
<tbody>
|
501 |
-
<tr>
|
502 |
-
<td>
|
503 |
-
<h3 id="innertitle"><?php echo __('WP-Members for Users', 'wp-ultimate-csv-importer'); ?></h3>
|
504 |
-
<label><?php echo __('Enable to add import support WP-Members user fields.', 'wp-ultimate-csv-importer'); ?></label>
|
505 |
-
</td>
|
506 |
-
<td>
|
507 |
-
<label id="wpusercheck"
|
508 |
-
title="<?php echo __('Enabled', 'wp-ultimate-csv-importer'); ?>"
|
509 |
-
class="<?php echo $skinnyData['checkuser'] . ' ' . $skinnyData['acf']; ?>"><input
|
510 |
-
type='radio' name='rwpmembers' id='WP-Members' style="display:none"
|
511 |
-
value='WP-Members' <?php echo $skinnyData['acf']; ?>
|
512 |
-
onclick="check_if_avail(this.id);"><span
|
513 |
-
id="checkuser"><?php echo $impCE->reduceStringLength(__('Enabled', 'wp-ultimate-csv-importer'), 'Enabled'); ?></span></label>
|
514 |
-
<label id="wpuseruncheck"
|
515 |
-
title="<?php echo __('Disabled', 'wp-ultimate-csv-importer'); ?>"
|
516 |
-
class="<?php echo $skinnyData['uncheckuser']; ?>"><input type='radio'
|
517 |
-
name='rwpmembers'
|
518 |
-
style="display:none"
|
519 |
-
onclick="check_if_avail(this.id);"><?php echo $impCE->reduceStringLength(__('Disabled', 'wp-ultimate-csv-importer'), 'Disabled'); ?>
|
520 |
-
</label>
|
521 |
-
</td>
|
522 |
-
</tr>
|
523 |
-
<tr>
|
524 |
-
<td>
|
525 |
-
<h3 id="innertitle"><?php echo __('WP e-Commerce Custom Fields', 'wp-ultimate-csv-importer'); ?> </h3>
|
526 |
-
<label><?php echo __('Enable to add import support for WP e-Commerce custom fields.', 'wp-ultimate-csv-importer'); ?></label>
|
527 |
-
</td>
|
528 |
-
<td style="padding-left: 20px;">
|
529 |
-
<input type='checkbox' name='recommerce' id='wpcommerce'
|
530 |
-
value='wpcommerce' <?php echo $skinnyData['wpcommerce']; ?> class='ecommerce'
|
531 |
-
onclick='check_if_avail(this.id);'>
|
532 |
-
</td>
|
533 |
-
</tr>
|
534 |
-
<tr>
|
535 |
-
<td>
|
536 |
-
<h3 id="innertitle"><?php echo __('ACF Custom Fields', 'wp-ultimate-csv-importer'); ?></h3>
|
537 |
-
<label><?php echo __('Enable to add import support for ACF Custom Fields.', 'wp-ultimate-csv-importer'); ?></label>
|
538 |
-
</td>
|
539 |
-
<td>
|
540 |
-
<label id="customfieldsetting1" class="<?php echo $skinnyData['acf']; ?>"><input
|
541 |
-
type='checkbox' name='rcustomfield' id='acf' style="display:none"
|
542 |
-
value='acf' <?php echo $skinnyData['acf']; ?>
|
543 |
-
onclick="check_if_avail(this.id);"><span
|
544 |
-
id="customfield1text"> <?php echo $skinnyData['acf_status']; ?> </span></label>
|
545 |
-
|
546 |
-
<div id="pluginavail" class="<?php echo $skinnyData['acftd'] ?>"></div>
|
547 |
-
</td>
|
548 |
-
</tr>
|
549 |
-
<tr>
|
550 |
-
<td>
|
551 |
-
<h3 id="innertitle"><?php echo __('CCTM Custom Fields', 'wp-ultimate-csv-importer'); ?></h3>
|
552 |
-
<label><?php echo __('Enable to add import support for CCTM Custom Fields.', 'wp-ultimate-csv-importer'); ?></label>
|
553 |
-
</td>
|
554 |
-
<td>
|
555 |
-
<label id="customfieldsetting2"
|
556 |
-
class="<?php echo $skinnyData['cctmcustfields'] . ' ' . $skinnyData['cctm']; ?>"><input
|
557 |
-
type='radio' name='rcustompost' id='cctmcustomfields' style="display:none"
|
558 |
-
value='cctm' <?php echo $skinnyData['cctm']; ?>
|
559 |
-
onclick="check_if_avail(this.id);"><span
|
560 |
-
id="customfield2text"> <?php echo $skinnyData['cctmfield_status']; ?> </span></label>
|
561 |
-
|
562 |
-
<div id="pluginavail" class="<?php echo $skinnyData['cctmtd'] ?>"></div>
|
563 |
-
</td>
|
564 |
-
</tr>
|
565 |
-
<tr>
|
566 |
-
<td>
|
567 |
-
<h3 id="innertitle"><?php echo __('Types Custom Fields', 'wp-ultimate-csv-importer'); ?></h3>
|
568 |
-
<label><?php echo __('Enable to add import support for Types custom fields.', 'wp-ultimate-csv-importer'); ?></label>
|
569 |
-
</td>
|
570 |
-
<td>
|
571 |
-
<label id="customfieldsetting3"
|
572 |
-
class="<?php echo $skinnyData['wptypescustfields']; ?>"><input type='radio'
|
573 |
-
name='rcustomfield'
|
574 |
-
id='typescustomfield'
|
575 |
-
value='wptypescustfields' <?php echo $skinnyData['wptypes']; ?>
|
576 |
-
style="display:none"
|
577 |
-
onclick="check_if_avail(this.id);"/><span
|
578 |
-
id="customfield3text"> <?php echo $skinnyData['typesfield_status']; ?> </span></label>
|
579 |
-
|
580 |
-
<div id="pluginavail" class="<?php if (isset($skinnyData['wptypestd'])) {
|
581 |
-
echo $skinnyData['wptypestd'];
|
582 |
-
} ?>"></div>
|
583 |
-
</td>
|
584 |
-
</tr>
|
585 |
-
<tr>
|
586 |
-
<td>
|
587 |
-
<h3 id="innertitle"><?php echo __('PODS Custom Fields', 'wp-ultimate-csv-importer'); ?> </h3>
|
588 |
-
<label><?php echo __('Enable to add import support for PODS custom fields.', 'wp-ultimate-csv-importer'); ?></label>
|
589 |
-
</td>
|
590 |
-
<td>
|
591 |
-
<label id="customfieldsetting4"
|
592 |
-
class="<?php echo $skinnyData['podscustomfields']; ?>"><input type='radio'
|
593 |
-
name='rcustomfield'
|
594 |
-
id='podscustomfield'
|
595 |
-
value='podscustomfields' <?php echo $skinnyData['podscustomfields']; ?>
|
596 |
-
style="display:none"
|
597 |
-
onclick="check_if_avail(this.id);"/><span
|
598 |
-
id="customfield4text"> <?php echo $skinnyData['podsfield_status']; ?> </span></label>
|
599 |
-
|
600 |
-
<div id="pluginavail" class="<?php if (isset($skinnyData['podstd'])) {
|
601 |
-
echo $skinnyData['podstd'];
|
602 |
-
} ?>"></div>
|
603 |
-
</td>
|
604 |
-
</tr>
|
605 |
-
</tbody>
|
606 |
-
</table>
|
607 |
-
</div>
|
608 |
-
</div>
|
609 |
-
<!--div-4 -->
|
610 |
-
<div id="section4" class="ecommercesettings" style="display:none;">
|
611 |
-
<div class="title">
|
612 |
-
<h3><?php echo __('Ecommerce Settings', 'wp-ultimate-csv-importer'); ?></h3>
|
613 |
-
</div>
|
614 |
-
<div id="data" class="databorder">
|
615 |
-
<table>
|
616 |
-
<tbody>
|
617 |
-
<tr>
|
618 |
-
<td>
|
619 |
-
<h3 id="innertitle"><?php echo __('None', 'wp-ultimate-csv-importer'); ?></h3>
|
620 |
-
<label><?php echo __('Ecommerce import is disabled.', 'wp-ultimate-csv-importer'); ?></label>
|
621 |
-
</td>
|
622 |
-
<td>
|
623 |
-
<label id="ecommercesetting1"
|
624 |
-
class="<?php echo $skinnyData['nonerecommerce']; ?>"><input type='radio'
|
625 |
-
name='recommerce'
|
626 |
-
id='nonerecommerce'
|
627 |
-
value='nonerecommerce' <?php echo $skinnyData['nonerecommerce']; ?>
|
628 |
-
class='ecommerce'
|
629 |
-
checked
|
630 |
-
style="display:none"
|
631 |
-
onclick="ecommercesetting(this.id);"><span
|
632 |
-
id="ecommerce1text"> <?php echo $skinnyData['ecomnone_status']; ?> </span></label>
|
633 |
-
</td>
|
634 |
-
</tr>
|
635 |
-
<tr>
|
636 |
-
<td>
|
637 |
-
<h3 id="innertitle"><?php echo __('Eshop', 'wp-ultimate-csv-importer'); ?> </h3>
|
638 |
-
<label><?php echo __('Enable ecommerce import for Eshop.', 'wp-ultimate-csv-importer'); ?></label>
|
639 |
-
</td>
|
640 |
-
<td>
|
641 |
-
<label id="ecommercesetting2" class="<?php echo $skinnyData['eshop']; ?>">
|
642 |
-
<input type='radio' name='recommerce' id='eshop'
|
643 |
-
value='eshop' <?php echo $skinnyData['eshop']; ?> class='ecommerce'
|
644 |
-
style="display:none" onclick="ecommercesetting(this.id);"><span
|
645 |
-
id="ecommerce2text"><?php echo $skinnyData['eshop_status']; ?></span></label>
|
646 |
-
|
647 |
-
<div id="pluginavail" class="<?php echo $skinnyData['eshoptd'] ?>"></div>
|
648 |
-
</td>
|
649 |
-
</tr>
|
650 |
-
<tr>
|
651 |
-
<td>
|
652 |
-
<h3 id="innertitle"><?php echo __('Marketpress Lite', 'wp-ultimate-csv-importer'); ?></h3>
|
653 |
-
<label><?php echo __('Enable ecommerce import for marketpress Lite.', 'wp-ultimate-csv-importer'); ?></label>
|
654 |
-
</td>
|
655 |
-
<td>
|
656 |
-
<label id="ecommercesetting3"
|
657 |
-
class="<?php echo $skinnyData['woocommerce']; ?>"><input type='radio'
|
658 |
-
name='recommerce'
|
659 |
-
id='marketpress'
|
660 |
-
value='marketpress' <?php echo $skinnyData['marketpress']; ?>
|
661 |
-
class='woocommerce'
|
662 |
-
onclick='check_if_avail(this.id);'
|
663 |
-
style="display:none"><span
|
664 |
-
id="ecommerce3text"><?php echo $skinnyData['marketpress_status']; ?></span></label>
|
665 |
-
|
666 |
-
<div id="pluginavail" class="<?php if (isset($skinnyData['marketpresslitetd'])) {
|
667 |
-
echo $skinnyData['marketpresslitetd'];
|
668 |
-
} ?>"></div>
|
669 |
-
</td>
|
670 |
-
</tr>
|
671 |
-
<tr>
|
672 |
-
<td>
|
673 |
-
<h3 id="innertitle"><?php echo __('Woocommerce', 'wp-ultimate-csv-importer'); ?> </h3>
|
674 |
-
<label><?php echo __('Enable ecommerce import for Woocommerce.', 'wp-ultimate-csv-importer'); ?></label>
|
675 |
-
</td>
|
676 |
-
<td>
|
677 |
-
<label id="ecommercesetting4"
|
678 |
-
class="<?php echo $skinnyData['woocommerce']; ?>"><input type='radio'
|
679 |
-
name='recommerce'
|
680 |
-
id='woocommerce'
|
681 |
-
value='woocommerce' <?php echo $skinnyData['woocommerce']; ?>
|
682 |
-
class='woocommerce'
|
683 |
-
onclick='check_if_avail(this.id);'
|
684 |
-
style="display:none"><span
|
685 |
-
id="ecommerce4text"><?php echo $skinnyData['woocommerce_status']; ?></span>
|
686 |
-
</label>
|
687 |
-
|
688 |
-
<div id="pluginavail" class="<?php echo $skinnyData['woocomtd'] ?>"></div>
|
689 |
-
</td>
|
690 |
-
</tr>
|
691 |
-
<tr>
|
692 |
-
<td>
|
693 |
-
<h3 id="innertitle"> <?php echo __('WP e-Commerce', 'wp-ultimate-csv-importer'); ?></h3>
|
694 |
-
<label><?php echo __('Enable ecommerce import for WP e-Commerce.', 'wp-ultimate-csv-importer'); ?></label>
|
695 |
-
</td>
|
696 |
-
<td>
|
697 |
-
<label id="ecommercesetting5" class="<?php echo $skinnyData['wpcommerce']; ?>">
|
698 |
-
<input type='radio' name='recommerce' id='wpcommerce'
|
699 |
-
value='wpcommerce' <?php echo $skinnyData['wpcommerce']; ?>
|
700 |
-
class='ecommerce' onclick='check_if_avail(this.id);'
|
701 |
-
style="display:none"><span
|
702 |
-
id="ecommerce5text"><?php echo $skinnyData['wpcommerce_status']; ?></span></label>
|
703 |
-
|
704 |
-
<div id="pluginavail" class="<?php echo $skinnyData['wpcomtd'] ?>"></div>
|
705 |
-
</td>
|
706 |
-
</tr>
|
707 |
-
</tbody>
|
708 |
-
</table>
|
709 |
-
</div>
|
710 |
-
</div>
|
711 |
-
<!--div-5-->
|
712 |
-
<div id="section5" class="seosettings" style="display:none;">
|
713 |
-
<div class="title">
|
714 |
-
<h3><?php echo __('SEO Settings', 'wp-ultimate-csv-importer'); ?></h3>
|
715 |
-
</div>
|
716 |
-
<div id="data" class="databorder">
|
717 |
-
<table>
|
718 |
-
<tbody>
|
719 |
-
<tr>
|
720 |
-
<td>
|
721 |
-
<h3 id="innertitle"><?php echo __('None', 'wp-ultimate-csv-importer'); ?></h3>
|
722 |
-
<label><?php echo __('SEO Meta import is disabled.', 'wp-ultimate-csv-importer'); ?></label>
|
723 |
-
</td>
|
724 |
-
<td>
|
725 |
-
<label id="seosetting1" class="<?php echo $skinnyData['nonerseooption']; ?>"><input
|
726 |
-
type='radio' name='rseooption' id='nonerseooption'
|
727 |
-
value='nonerseooption' <?php #echo $skinnyData['nonerseooption']; ?>
|
728 |
-
class='ecommerce' onclick="seosetting(this.id);" style="display:none"><span
|
729 |
-
id="seosetting1text"> <?php echo $skinnyData['none_status']; ?> </span>
|
730 |
-
</label>
|
731 |
-
</td>
|
732 |
-
</tr>
|
733 |
-
<tr>
|
734 |
-
<td>
|
735 |
-
<h3 id="innertitle"><?php echo __('All-in-one SEO', 'wp-ultimate-csv-importer'); ?> </h3>
|
736 |
-
<label><?php echo __('Enable All-in-one SEO import.', 'wp-ultimate-csv-importer'); ?></label>
|
737 |
-
</td>
|
738 |
-
<td>
|
739 |
-
<label id="seosetting2" class="<?php echo $skinnyData['aioseo']; ?>"><input
|
740 |
-
type='radio' name='rseooption' id='aioseo'
|
741 |
-
value='aioseo' <?php echo $skinnyData['aioseo']; ?>
|
742 |
-
onclick="seosetting(this.id);" style="display:none"><span
|
743 |
-
id="seosetting2text"> <?php echo $skinnyData['aioseo_status']; ?> </span></label>
|
744 |
-
|
745 |
-
<div id="pluginavail" class="<?php echo $skinnyData['aioseotd'] ?>"></div>
|
746 |
-
</td>
|
747 |
-
</tr>
|
748 |
-
<tr>
|
749 |
-
<td>
|
750 |
-
<h3 id="innertitle"> <?php echo __('Yoast SEO', 'wp-ultimate-csv-importer'); ?></h3>
|
751 |
-
<label><?php echo __('Enable Wordpress SEO by Yoast support.', 'wp-ultimate-csv-importer'); ?></label>
|
752 |
-
</td>
|
753 |
-
<td>
|
754 |
-
<label id="seosetting3" class="<?php echo $skinnyData['yoastseo']; ?>"><input
|
755 |
-
type='radio' name='rseooption' id='yoastseo'
|
756 |
-
value='yoastseo' <?php echo $skinnyData['yoastseo']; ?>
|
757 |
-
onclick="check_if_avail(this.id);" style="display:none"><span
|
758 |
-
id="seosetting3text"><?php echo $skinnyData['yoastseo_status']; ?> </span></label>
|
759 |
-
|
760 |
-
<div id="pluginavail" class="<?php echo $skinnyData['yoasttd'] ?>"></div>
|
761 |
-
</td>
|
762 |
-
</tr>
|
763 |
-
</tbody>
|
764 |
-
</table>
|
765 |
-
</div>
|
766 |
-
</div>
|
767 |
-
|
768 |
-
<!--div-6-->
|
769 |
-
<div id="section6" class="additionalfeatures" style="display:none;">
|
770 |
-
<div class="title">
|
771 |
-
<h3><?php echo __('Additional Features', 'wp-ultimate-csv-importer'); ?></h3>
|
772 |
-
</div>
|
773 |
-
<div id="data">
|
774 |
-
<table class="enablefeatures">
|
775 |
-
<tbody>
|
776 |
-
<tr>
|
777 |
-
<td>
|
778 |
-
<label class=$automapping>
|
779 |
-
<input type='checkbox' name='automapping' id='automapping' value='automapping'
|
780 |
-
checked disabled onclick="check_if_avail(this.id);"><span
|
781 |
-
id="align"><?php echo __('Enable Auto Mapping', 'wp-ultimate-csv-importer'); ?></span></label>
|
782 |
-
</td>
|
783 |
-
</tr>
|
784 |
-
<tr>
|
785 |
-
<td>
|
786 |
-
<label class=$utfsupport><input type='checkbox' name='rutfsupport' id='utfsupport'
|
787 |
-
value='utfsupport' checked disabled
|
788 |
-
onclick="check_if_avail(this.id);"><span
|
789 |
-
id="align"><?php echo __('Enable UTF Support', 'wp-ultimate-csv-importer'); ?></span></label>
|
790 |
-
</td>
|
791 |
-
</tr>
|
792 |
-
<!--<tr class="databorder"><td>
|
793 |
-
<label id="align">Export Delimiter
|
794 |
-
<select name="export_delimiter">
|
795 |
-
<option value = ";">;</option>
|
796 |
-
<option value = ",">,</option>
|
797 |
-
</select>
|
798 |
-
</label>
|
799 |
-
</td></tr>-->
|
800 |
-
<tr class="databorder">
|
801 |
-
<td>
|
802 |
-
<h3 id="innertitle"><?php echo __('Debug Mode', 'wp-ultimate-csv-importer'); ?></h3>
|
803 |
-
<label><?php echo __('You can enable/disable the debug mode.', 'wp-ultimate-csv-importer'); ?></label>
|
804 |
-
</td>
|
805 |
-
<td>
|
806 |
-
<label id="debugmode_enable" class="<?php echo $skinnyData['debugmode_enable']; ?>"><input
|
807 |
-
type='radio' name='debug_mode'
|
808 |
-
value='enable_debug' <?php echo $skinnyData['debugmode_enable']; ?>
|
809 |
-
id="enabled" style="display:none"
|
810 |
-
onclick="debugmode_check(this.id);"> <?php echo __('On', 'wp-ultimate-csv-importer'); ?>
|
811 |
-
</label>
|
812 |
-
<label id="debugmode_disable"
|
813 |
-
class="<?php echo $skinnyData['debugmode_disable']; ?>"><input type='radio'
|
814 |
-
name='debug_mode'
|
815 |
-
value='disable_debug' <?php echo $skinnyData['debugmode_disable']; ?>
|
816 |
-
id="disabled"
|
817 |
-
style="display:none"
|
818 |
-
onclick="debugmode_check(this.id);"> <?php echo __('Off', 'wp-ultimate-csv-importer'); ?>
|
819 |
-
</label>
|
820 |
-
</td>
|
821 |
-
</tr>
|
822 |
-
<tr class="databorder">
|
823 |
-
<td>
|
824 |
-
<h3 id="innertitle"><?php echo __('Scheduled log mails', 'wp-ultimate-csv-importer'); ?></h3>
|
825 |
-
<label><?php echo __('Enable to get scheduled log mails.', 'wp-ultimate-csv-importer'); ?></label>
|
826 |
-
</td>
|
827 |
-
<td>
|
828 |
-
<label id="schedulecheck"
|
829 |
-
title="<?php echo __('Yes', 'wp-ultimate-csv-importer'); ?>"
|
830 |
-
class="<?php echo $skinnyData['schedulelog']; ?>"><input type='radio'
|
831 |
-
name='send_log_email'
|
832 |
-
value='send_log_email' <?php echo $skinnyData['send_log_email']; ?>
|
833 |
-
id="scheduled"
|
834 |
-
style="display:none"
|
835 |
-
onclick="check_if_avail(this.id);"> <?php echo $impCE->reduceStringLength(__('Yes', 'wp-ultimate-csv-importer'), 'Yes'); ?>
|
836 |
-
</label>
|
837 |
-
<label id="scheduleuncheck"
|
838 |
-
title="<?php echo __('No', 'wp-ultimate-csv-importer'); ?>"
|
839 |
-
class="<?php echo $skinnyData['schedulenolog']; ?>"><input type='radio'
|
840 |
-
name='send_log_email'
|
841 |
-
id="noscheduled"
|
842 |
-
style="display:none"
|
843 |
-
onclick="check_if_avail(this.id);"> <?php echo $impCE->reduceStringLength(__('No', 'wp-ultimate-csv-importer'), 'No'); ?>
|
844 |
-
</label>
|
845 |
-
</td>
|
846 |
-
</tr>
|
847 |
-
<tr>
|
848 |
-
<td>
|
849 |
-
<h3 id="innertitle"><?php echo __('Drop Table', 'wp-ultimate-csv-importer'); ?></h3>
|
850 |
-
<label><?php echo __('If enabled plugin deactivation will remove plugin data, this cannot be restored.', 'wp-ultimate-csv-importer'); ?></label>
|
851 |
-
</td>
|
852 |
-
<td><label id="dropon" class="<?php echo $skinnyData['drop_on']; ?>"><input type='radio'
|
853 |
-
name='drop_table'
|
854 |
-
id='drop_table'
|
855 |
-
value='on' <?php echo $skinnyData['dropon_status']; ?>
|
856 |
-
style="display:none"
|
857 |
-
onclick="check_if_avail(this.id);"> <?php echo __('On', 'wp-ultimate-csv-importer'); ?>
|
858 |
-
</label>
|
859 |
-
<label id="dropoff" class="<?php echo $skinnyData['drop_off']; ?>"><input
|
860 |
-
type='radio' name='drop_table' id='drop_tab'
|
861 |
-
value='off' <?php echo $skinnyData['dropoff_status']; ?>
|
862 |
-
style="display:none"
|
863 |
-
onclick="check_if_avail(this.id);"> <?php echo __('Off', 'wp-ultimate-csv-importer'); ?>
|
864 |
-
</label>
|
865 |
-
</td>
|
866 |
-
</tr>
|
867 |
-
<tr>
|
868 |
-
<td>
|
869 |
-
<h3 id="innertitle"><?php echo __('Category Icons:', 'wp-ultimate-csv-importer'); ?></h3>
|
870 |
-
<label><?php echo __('Enable to import category icons for category.', 'wp-ultimate-csv-importer'); ?></label>
|
871 |
-
</td>
|
872 |
-
<td>
|
873 |
-
<label id="catenable"
|
874 |
-
title="<?php echo __('Enable', 'wp-ultimate-csv-importer'); ?>"
|
875 |
-
class="<?php echo $skinnyData['enable'] . " " . $skinnyData['catyenable']; ?>"><input
|
876 |
-
type='radio' name='rcateicons' id='caticonenable' style="display:none"
|
877 |
-
value='enable' <?php echo $skinnyData['enable']; ?> class='ecommerce'
|
878 |
-
onclick="check_if_avail(this.id);"> <?php echo $impCE->reduceStringLength(__('Enable', 'wp-ultimate-csv-importer'), 'Enable'); ?>
|
879 |
-
</label>
|
880 |
-
<label id="catdisable"
|
881 |
-
title="<?php echo __('Disable', 'wp-ultimate-csv-importer'); ?>"
|
882 |
-
class="<?php echo $skinnyData['enable'] . " " . $skinnyData['catydisable']; ?>"><input
|
883 |
-
type='radio' name='rcateicons' id='caticondisable' style="display:none"
|
884 |
-
value='disable' <?php echo $skinnyData['disable']; ?> checked
|
885 |
-
onclick="check_if_avail(this.id);"><?php echo $impCE->reduceStringLength(__('Disable', 'wp-ultimate-csv-importer'), 'Disable'); ?>
|
886 |
-
</label>
|
887 |
-
</td>
|
888 |
-
</tr>
|
889 |
-
</tbody>
|
890 |
-
</table>
|
891 |
-
</div>
|
892 |
-
</div>
|
893 |
-
<!--div-7-->
|
894 |
-
<div id="section7" class="databaseoptimization" style="display:none;">
|
895 |
-
<div class="title">
|
896 |
-
<h3><?php echo __('Database Optimization', 'wp-ultimate-csv-importer'); ?> <img
|
897 |
-
src="<?php echo WP_CONTENT_URL; ?>/plugins/<?php echo WP_CONST_ULTIMATE_CSV_IMP_SLUG; ?>/images/pro_icon.gif"
|
898 |
-
title='PRO Feature'/></h3>
|
899 |
-
<span style="float:right;margin-right:168px;margin-top:-35px;">
|
900 |
-
<a id="checkOpt" onclick="check_if_avail(this.id);"
|
901 |
-
href="#"> <?php echo $impCE->reduceStringLength(__('Check All', 'wp-ultimate-csv-importer'), 'Check All'); ?> </a>
|
902 |
-
</span>
|
903 |
-
<span style="float:right;margin-right:81px;margin-top:-35px;">
|
904 |
-
<a id="uncheckOpt" onclick="check_if_avail(this.id);" href="#">
|
905 |
-
/ <?php echo $impCE->reduceStringLength(__('Uncheck All', 'wp-ultimate-csv-importer'), 'Uncheck All'); ?> </a>
|
906 |
-
</span>
|
907 |
-
</div>
|
908 |
-
<div id="data" class="database">
|
909 |
-
<table class="databaseoptimization">
|
910 |
-
<tbody>
|
911 |
-
<tr>
|
912 |
-
<td>
|
913 |
-
<?php
|
914 |
-
$skinny_delete_all_post_page = isset($skinnyData['delete_all_orphaned_post_page_meta']) ? $skinnyData['delete_all_orphaned_post_page_meta'] : '';
|
915 |
-
$skinny_delete_all_unassigned_tag = isset($skinnyData['delete_all_unassigned_tags']) ? $skinnyData['delete_all_unassigned_tags'] : '';
|
916 |
-
$skinny_delete_all_page_revisions = isset($skinnyData['delete_all_post_page_revisions']) ? $skinnyData['delete_all_post_page_revisions'] : '';
|
917 |
-
$skinny_delete_all_auto_draft_page = isset($skinnyData['delete_all_auto_draft_post_page']) ? $skinnyData['delete_all_auto_draft_post_page'] : '';
|
918 |
-
$skinny_delete_all_post_page_trash = isset($skinnyData['delete_all_post_page_in_trash']) ? $skinnyData['delete_all_post_page_in_trash'] : '';
|
919 |
-
$skinny_delete_all_comments_trash = isset($skinnyData['delete_all_comments_in_trash']) ? $skinnyData['delete_all_comments_in_trash'] : '';
|
920 |
-
$skinny_delete_all_spam_comments = isset($skinnyData['delete_all_spam_comments']) ? $skinnyData['delete_all_spam_comments'] : '';
|
921 |
-
$skinny_delete_all_unapproved_comments = isset($skinnyData['delete_all_unapproved_comments']) ? $skinnyData['delete_all_unapproved_comments'] : '';
|
922 |
-
$skinny_delete_all_pingback_comments = isset($skinnyData['delete_all_pingback_commments']) ? $skinnyData['delete_all_pingback_commments'] : '';
|
923 |
-
$skinny_delete_all_trackback_comments = isset($skinnyData['delete_all_trackback_comments']) ? $skinnyData['delete_all_trackback_comments'] : '';
|
924 |
-
?>
|
925 |
-
<label><input type='checkbox' name='delete_all_orphaned_post_page_meta'
|
926 |
-
id='delete_all_orphaned_post_page_meta'
|
927 |
-
value='delete_all_orphaned_post_page_meta' <?php echo $skinny_delete_all_post_page; ?>
|
928 |
-
disabled/></label>
|
929 |
-
<td><span
|
930 |
-
id="align"> <?php echo __('Delete all orphaned Post/Page Meta', 'wp-ultimate-csv-importer'); ?></span>
|
931 |
-
</td>
|
932 |
-
</td>
|
933 |
-
<td>
|
934 |
-
<label><input type='checkbox' name='delete_all_unassigned_tags'
|
935 |
-
id='delete_all_unassigned_tags'
|
936 |
-
value='delete_all_unassigned_tags' <?php echo $skinny_delete_all_unassigned_tag; ?>
|
937 |
-
disabled/></label>
|
938 |
-
<td><span
|
939 |
-
id="align"> <?php echo __('Delete all unassigned tags', 'wp-ultimate-csv-importer'); ?></span>
|
940 |
-
</td>
|
941 |
-
</td></tr>
|
942 |
-
<tr>
|
943 |
-
<td>
|
944 |
-
<label><input type='checkbox' name='delete_all_post_page_revisions'
|
945 |
-
id='delete_all_post_page_revisions'
|
946 |
-
value='delete_all_post_page_revisions' <?php echo $skinny_delete_all_page_revisions; ?>
|
947 |
-
disabled/></label>
|
948 |
-
<td><span
|
949 |
-
id="align"> <?php echo __('Delete all Post/Page revisions', 'wp-ultimate-csv-importer'); ?></span>
|
950 |
-
</td>
|
951 |
-
</td>
|
952 |
-
<td>
|
953 |
-
<label><input type='checkbox' name='delete_all_auto_draft_post_page'
|
954 |
-
id='delete_all_auto_draft_post_page'
|
955 |
-
value='delete_all_auto_draft_post_page' <?php echo $skinny_delete_all_auto_draft_page; ?>
|
956 |
-
disabled/></label>
|
957 |
-
<td><span
|
958 |
-
id="align"> <?php echo __('Delete all auto drafted Post/Page', 'wp-ultimate-csv-importer'); ?></span>
|
959 |
-
</td>
|
960 |
-
</td></tr>
|
961 |
-
<tr>
|
962 |
-
<td>
|
963 |
-
<label><input type='checkbox' name='delete_all_post_page_in_trash'
|
964 |
-
id='delete_all_post_page_in_trash'
|
965 |
-
value='delete_all_post_page_in_trash' <?php echo $skinny_delete_all_post_page_trash; ?>
|
966 |
-
disabled/></label>
|
967 |
-
<td><span
|
968 |
-
id="align"> <?php echo __('Delete all Post/Page in trash', 'wp-ultimate-csv-importer'); ?></span>
|
969 |
-
</td>
|
970 |
-
</td>
|
971 |
-
<td>
|
972 |
-
<label><input type='checkbox' name='delete_all_spam_comments'
|
973 |
-
id='delete_all_spam_comments'
|
974 |
-
value='delete_all_spam_comments' <?php echo $skinny_delete_all_spam_comments; ?>
|
975 |
-
disabled/></label>
|
976 |
-
<td><span
|
977 |
-
id="align"> <?php echo __('Delete all Spam Comments', 'wp-ultimate-csv-importer'); ?></span>
|
978 |
-
</td>
|
979 |
-
</td></tr>
|
980 |
-
<tr>
|
981 |
-
<td>
|
982 |
-
<label><input type='checkbox' name='delete_all_comments_in_trash'
|
983 |
-
id='delete_all_comments_in_trash'
|
984 |
-
value='delete_all_comments_in_trash' <?php echo $skinny_delete_all_comments_trash; ?>
|
985 |
-
disabled/></label>
|
986 |
-
<td><span
|
987 |
-
id="align"> <?php echo __('Delete all Comments in trash', 'wp-ultimate-csv-importer'); ?></span>
|
988 |
-
</td>
|
989 |
-
</td>
|
990 |
-
<td>
|
991 |
-
<label><input type='checkbox' name='delete_all_unapproved_comments'
|
992 |
-
id='delete_all_unapproved_comments'
|
993 |
-
value='delete_all_unapproved_comments' <?php echo $skinny_delete_all_unapproved_comments; ?>
|
994 |
-
disabled/></label>
|
995 |
-
<td><span
|
996 |
-
id="align"> <?php echo __('Delete all Unapproved Comments', 'wp-ultimate-csv-importer'); ?></span>
|
997 |
-
</td>
|
998 |
-
</td></tr>
|
999 |
-
<tr>
|
1000 |
-
<td>
|
1001 |
-
<label><input type='checkbox' name='delete_all_pingback_commments'
|
1002 |
-
id='delete_all_pingback_commments'
|
1003 |
-
value='delete_all_pingback_commments' <?php echo $skinny_delete_all_pingback_comments; ?>
|
1004 |
-
disabled/></label>
|
1005 |
-
<td><span
|
1006 |
-
id="align"> <?php echo __('Delete all Pingback Comments', 'wp-ultimate-csv-importer'); ?></span>
|
1007 |
-
</td>
|
1008 |
-
</td>
|
1009 |
-
<td>
|
1010 |
-
<label><input type='checkbox' name='delete_all_trackback_comments'
|
1011 |
-
id='delete_all_trackback_comments'
|
1012 |
-
value='delete_all_trackback_comments' <?php echo $skinny_delete_all_trackback_comments; ?>
|
1013 |
-
disabled/> </label>
|
1014 |
-
<td><span
|
1015 |
-
id="align"> <?php echo __('Delete all Trackback Comments', 'wp-ultimate-csv-importer'); ?></span>
|
1016 |
-
</td>
|
1017 |
-
</td></tr>
|
1018 |
-
</tbody>
|
1019 |
-
</table>
|
1020 |
-
<div style="float:right;padding:17px;margin-top:-2px;">
|
1021 |
-
<input id="database_optimization" class="action btn btn-warning" type="button"
|
1022 |
-
onclick="check_if_avail();"
|
1023 |
-
value="<?php echo __('Run DB Optimizer', 'wp-ultimate-csv-importer'); ?>"
|
1024 |
-
name="database_optimization">
|
1025 |
-
</div>
|
1026 |
-
<div id="optimizelog" style="margin-top:40px;display:none;">
|
1027 |
-
<h4><?php echo __('Database Optimization Log', 'wp-ultimate-csv-importer'); ?></h4>
|
1028 |
-
|
1029 |
-
<div id="optimizationlog" class="optimizerlog">
|
1030 |
-
<div id="log" class="log">
|
1031 |
-
<p style="margin:15px;color:red;"
|
1032 |
-
id="align"><?php echo __('NO LOGS YET NOW.', 'wp-ultimate-csv-importer'); ?></p>
|
1033 |
-
</div>
|
1034 |
-
</div>
|
1035 |
-
</div>
|
1036 |
-
</div>
|
1037 |
-
</div>
|
1038 |
-
<!--div-8-->
|
1039 |
-
<div id="section8" class="securityperformance" style="display:none;">
|
1040 |
-
<div class="title">
|
1041 |
-
<h3><?php echo __('Security and Performance', 'wp-ultimate-csv-importer'); ?></h3>
|
1042 |
-
</div>
|
1043 |
-
<div id="data" class="databorder security-perfoemance">
|
1044 |
-
<table class="securityfeatures">
|
1045 |
-
<tr>
|
1046 |
-
<td>
|
1047 |
-
<h3 id="innertitle"><?php echo __('Allow authors/editors to import', 'wp-ultimate-csv-importer'); ?></h3>
|
1048 |
-
<label>
|
1049 |
-
<div><?php echo __('It helps authors/editors can import using importer.', 'wp-ultimate-csv-importer'); ?></div>
|
1050 |
-
<div><?php echo __('It does not support users.', 'wp-ultimate-csv-importer'); ?></div>
|
1051 |
-
</label></td>
|
1052 |
-
<td>
|
1053 |
-
|
1054 |
-
<!--<label><input type='checkbox' name='enable_plugin_access_for_author' value='enable_plugin_access_for_author' <?php echo $skinnyData['enable_plugin_access_for_author']; ?> /> Allow authors to import </label>-->
|
1055 |
-
|
1056 |
-
|
1057 |
-
<label id="allowimport"
|
1058 |
-
title="<?php echo __('Check', 'wp-ultimate-csv-importer'); ?>"
|
1059 |
-
class="<?php echo $skinnyData['authorimport']; ?>"><input type='radio'
|
1060 |
-
name='enable_plugin_access_for_author'
|
1061 |
-
id="enableimport"
|
1062 |
-
class="importauthor"
|
1063 |
-
value='enable_plugin_access_for_author' <?php echo $skinnyData['enable_plugin_access_for_author']; ?>
|
1064 |
-
style="display:none"
|
1065 |
-
onclick="authorimportsetting(this.id);"/><?php echo $impCE->reduceStringLength(__('Check', 'wp-ultimate-csv-importer'), 'Check All'); ?>
|
1066 |
-
</label>
|
1067 |
-
<label id="donallowimport"
|
1068 |
-
title="<?php echo __('Uncheck', 'wp-ultimate-csv-importer'); ?>"
|
1069 |
-
class="<?php echo $skinnyData['noauthorimport']; ?>"> <input type='radio'
|
1070 |
-
name='enable_plugin_access_for_author'
|
1071 |
-
class="importauthor"
|
1072 |
-
style="display:none"
|
1073 |
-
onclick="authorimportsetting(this.id);"><?php echo $impCE->reduceStringLength(__('Uncheck', 'wp-ultimate-csv-importer'), 'Uncheck All'); ?>
|
1074 |
-
</label>
|
1075 |
-
</td>
|
1076 |
-
</tr>
|
1077 |
-
</table>
|
1078 |
-
<table class="table table-striped">
|
1079 |
-
<tr>
|
1080 |
-
<th colspan="3">
|
1081 |
-
<h3 id="innertitle"><?php echo __('Minimum required php.ini values (Ini configured values)', 'wp-ultimate-csv-importer'); ?></h3>
|
1082 |
-
</th>
|
1083 |
-
</tr>
|
1084 |
-
<tr>
|
1085 |
-
<th>
|
1086 |
-
<label><?php echo __('Variables', 'wp-ultimate-csv-importer'); ?></label>
|
1087 |
-
</th>
|
1088 |
-
<th class='ini-configured-values'>
|
1089 |
-
<label><?php echo __('System values', 'wp-ultimate-csv-importer'); ?></label>
|
1090 |
-
</th>
|
1091 |
-
<th class='min-requirement-values'>
|
1092 |
-
<label><?php echo __('Minimum Requirements', 'wp-ultimate-csv-importer'); ?></label>
|
1093 |
-
</th>
|
1094 |
-
</tr>
|
1095 |
-
<tr>
|
1096 |
-
<td><?php echo __('post_max_size', 'wp-ultimate-csv-importer'); ?> </td>
|
1097 |
-
<td class='ini-configured-values'><?php echo ini_get('post_max_size') ?></td>
|
1098 |
-
<td class='min-requirement-values'>10M</td>
|
1099 |
-
</tr>
|
1100 |
-
<tr>
|
1101 |
-
<td><?php echo __('auto_append_file', 'wp-ultimate-csv-importer'); ?></td>
|
1102 |
-
<td class='ini-configured-values'>-<?php echo ini_get('auto_append_file') ?></td>
|
1103 |
-
<td class='min-requirement-values'>-</td>
|
1104 |
-
</tr>
|
1105 |
-
<tr>
|
1106 |
-
<td><?php echo __('auto_prepend_file', 'wp-ultimate-csv-importer'); ?> </td>
|
1107 |
-
<td class='ini-configured-values'>-<?php echo ini_get('auto_prepend_file') ?></td>
|
1108 |
-
<td class='min-requirement-values'>-</td>
|
1109 |
-
</tr>
|
1110 |
-
<tr>
|
1111 |
-
<td><?php echo __('upload_max_filesize', 'wp-ultimate-csv-importer'); ?> </td>
|
1112 |
-
<td class='ini-configured-values'><?php echo ini_get('upload_max_filesize') ?></td>
|
1113 |
-
<td class='min-requirement-values'>2M</td>
|
1114 |
-
</tr>
|
1115 |
-
<tr>
|
1116 |
-
<td><?php echo __('file_uploads', 'wp-ultimate-csv-importer'); ?> </td>
|
1117 |
-
<td class='ini-configured-values'><?php echo ini_get('file_uploads') ?></td>
|
1118 |
-
<td class='min-requirement-values'>1</td>
|
1119 |
-
</tr>
|
1120 |
-
<tr>
|
1121 |
-
<td><?php echo __('allow_url_fopen', 'wp-ultimate-csv-importer'); ?> </td>
|
1122 |
-
<td class='ini-configured-values'><?php echo ini_get('allow_url_fopen') ?></td>
|
1123 |
-
<td class='min-requirement-values'>1</td>
|
1124 |
-
</tr>
|
1125 |
-
<tr>
|
1126 |
-
<td><?php echo __('max_execution_time', 'wp-ultimate-csv-importer'); ?> </td>
|
1127 |
-
<td class='ini-configured-values'><?php echo ini_get('max_execution_time') ?></td>
|
1128 |
-
<td class='min-requirement-values'>3000</td>
|
1129 |
-
</tr>
|
1130 |
-
<tr>
|
1131 |
-
<td><?php echo __('max_input_time', 'wp-ultimate-csv-importer'); ?> </td>
|
1132 |
-
<td class='ini-configured-values'><?php echo ini_get('max_input_time') ?></td>
|
1133 |
-
<td class='min-requirement-values'>3000</td>
|
1134 |
-
</tr>
|
1135 |
-
<tr>
|
1136 |
-
<td><?php echo __('max_input_vars', 'wp-ultimate-csv-importer'); ?> </td>
|
1137 |
-
<td class='ini-configured-values'><?php echo ini_get('max_input_vars') ?></td>
|
1138 |
-
<td class='min-requirement-values'>3000</td>
|
1139 |
-
</tr>
|
1140 |
-
<tr>
|
1141 |
-
<td><?php echo __('memory_limit', 'wp-ultimate-csv-importer'); ?> </td>
|
1142 |
-
<td class='ini-configured-values'><?php echo ini_get('memory_limit') ?></td>
|
1143 |
-
<td class='min-requirement-values'>99M</td>
|
1144 |
-
</tr>
|
1145 |
-
</table>
|
1146 |
-
<h3 id="innertitle"
|
1147 |
-
colspan="2"><?php echo __('Required Loaders and Extentions:', 'wp-ultimate-csv-importer'); ?></h3>
|
1148 |
-
<table class="table table-striped">
|
1149 |
-
<?php $loaders_extensions = get_loaded_extensions();
|
1150 |
-
if (function_exists('apache_get_modules')) {
|
1151 |
-
$mod_security = apache_get_modules();
|
1152 |
-
}
|
1153 |
-
?>
|
1154 |
-
<tr>
|
1155 |
-
<td><?php echo __('IonCube Loader', 'wp-ultimate-csv-importer'); ?> </td>
|
1156 |
-
<td><?php if (in_array('ionCube Loader', $loaders_extensions)) {
|
1157 |
-
echo '<label style="color:green;">' . __("Yes", 'wp-ultimate-csv-importer') . '</label>';
|
1158 |
-
} else {
|
1159 |
-
echo '<label style="color:red;">' . __("No", 'wp-ultimate-csv-importer') . '</label>';
|
1160 |
-
} ?> </td>
|
1161 |
-
<td></td>
|
1162 |
-
</tr>
|
1163 |
-
<tr>
|
1164 |
-
<td>PDO</td>
|
1165 |
-
<td><?php if (in_array('PDO', $loaders_extensions)) {
|
1166 |
-
echo '<label style="color:green;">' . __("Yes", 'wp-ultimate-csv-importer') . '</label>';
|
1167 |
-
} else {
|
1168 |
-
echo '<label style="color:red;">' . __("No", 'wp-ultimate-csv-importer') . '</label>';
|
1169 |
-
} ?></td>
|
1170 |
-
<td></td>
|
1171 |
-
</tr>
|
1172 |
-
<tr>
|
1173 |
-
<td><?php echo __('Curl', 'wp-ultimate-csv-importer'); ?> </td>
|
1174 |
-
<td><?php if (in_array('curl', $loaders_extensions)) {
|
1175 |
-
echo '<label style="color:green;">' . __('Yes', 'wp-ultimate-csv-importer') . '</label>';
|
1176 |
-
} else {
|
1177 |
-
echo '<label style="color:red;">' . __("No", 'wp-ultimate-csv-importer') . '</label>';
|
1178 |
-
} ?></td>
|
1179 |
-
<td></td>
|
1180 |
-
</tr>
|
1181 |
-
<tr>
|
1182 |
-
<td><?php echo __('Mod Security', 'wp-ultimate-csv-importer'); ?> </td>
|
1183 |
-
<td><?php if (isset($mod_security) && in_array('mod_security.c', $mod_security)) {
|
1184 |
-
echo '<label style="color:green;">' . __("Yes", 'wp-ultimate-csv-importer') . '</label>';
|
1185 |
-
} else {
|
1186 |
-
echo '<label style="color:red;">' . __("No", 'wp-ultimate-csv-importer') . '</label>';
|
1187 |
-
} ?></td>
|
1188 |
-
<td>
|
1189 |
-
<div style='float:left'>
|
1190 |
-
<a href="#" class="tooltip">
|
1191 |
-
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png"
|
1192 |
-
style="margin-left:-74px;"/>
|
1193 |
<span style="margin-left:20px;margin-top:-10px;width:150px;">
|
1194 |
-
<img class="callout"
|
1195 |
-
|
1196 |
-
<
|
1197 |
-
|
1198 |
-
<b><?php echo '<IfModule mod_security.c>'; ?><?php echo __('SecFilterEngine Off SecFilterScanPOST Off', 'wp-ultimate-csv-importer'); ?><?php echo ' </IfModule>'; ?></b>
|
1199 |
|
1200 |
</span>
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
<td class='debug-info-name'><?php echo __('MySQL Version', 'wp-ultimate-csv-importer'); ?></td>
|
1222 |
-
<td><?php echo $wpdb->db_version(); ?></td>
|
1223 |
-
<td></td>
|
1224 |
-
</tr>
|
1225 |
-
<tr>
|
1226 |
-
<td class='debug-info-name'><?php echo __('Server SoftWare', 'wp-ultimate-csv-importer'); ?></td>
|
1227 |
-
<td><?php echo $_SERVER['SERVER_SOFTWARE']; ?></td>
|
1228 |
-
<td></td>
|
1229 |
-
</tr>
|
1230 |
-
<tr>
|
1231 |
-
<td class='debug-info-name'><?php echo __('Your User Agent', 'wp-ultimate-csv-importer'); ?></td>
|
1232 |
-
<td><?php echo $_SERVER['HTTP_USER_AGENT']; ?></td>
|
1233 |
-
<td></td>
|
1234 |
-
</tr>
|
1235 |
-
<tr>
|
1236 |
-
<td class='debug-info-name'><?php echo __('WPDB Prefix', 'wp-ultimate-csv-importer'); ?></td>
|
1237 |
-
<td><?php echo $wpdb->prefix; ?></td>
|
1238 |
-
<td></td>
|
1239 |
-
</tr>
|
1240 |
-
<tr>
|
1241 |
-
<td class='debug-info-name'><?php echo __('WP Multisite Mode', 'wp-ultimate-csv-importer'); ?></td>
|
1242 |
-
<td><?php if (is_multisite()) {
|
1243 |
-
echo '<label style="color:green;">' . __("Enabled", 'wp-ultimate-csv-importer') . '</label>';
|
1244 |
-
} else {
|
1245 |
-
echo '<label style="color:red;">' . __("Disabled", 'wp-ultimate-csv-importer') . '</label>';
|
1246 |
-
} ?> </td>
|
1247 |
-
<td></td>
|
1248 |
-
</tr>
|
1249 |
-
<tr>
|
1250 |
-
<td class='debug-info-name'><?php echo __('WP Memory Limit', 'wp-ultimate-csv-importer'); ?></td>
|
1251 |
-
<td><?php echo (int)ini_get('memory_limit'); ?></td>
|
1252 |
-
<td></td>
|
1253 |
-
</tr>
|
1254 |
-
</table>
|
1255 |
-
</div>
|
1256 |
-
</div>
|
1257 |
-
<div id="section9" class="documentation" style="display:none;">
|
1258 |
-
<div class="title">
|
1259 |
-
<h3><?php echo __('Documentation', 'wp-ultimate-csv-importer'); ?></h3>
|
1260 |
-
</div>
|
1261 |
-
<div id="data">
|
1262 |
-
<div id="video">
|
1263 |
-
<iframe width="560" height="315"
|
1264 |
-
src="//www.youtube.com/embed/FhTUXE5zk0o?list=PL2k3Ck1bFtbRli9VdJaqwtzTSzzkOrH4j"
|
1265 |
-
frameborder="0" allowfullscreen></iframe>
|
1266 |
-
</div>
|
1267 |
-
<div id="relatedpages">
|
1268 |
-
<h2 id="doctitle"><?php echo __('Smackcoders Guidelines', 'wp-ultimate-csv-importer'); ?> </h2>
|
1269 |
-
|
1270 |
-
<p><a href="https://www.smackcoders.com/blog/category/web-development-news/"
|
1271 |
-
target="_blank"> <?php echo __('Development News', 'wp-ultimate-csv-importer'); ?> </a>
|
1272 |
-
</p>
|
1273 |
-
|
1274 |
-
<p><a href="http://www.wpultimatecsvimporter.com/"
|
1275 |
-
target="_blank"> <?php echo __('Whats New?', 'wp-ultimate-csv-importer'); ?> </a></p>
|
1276 |
-
|
1277 |
-
<p><a href="http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer_Pro"
|
1278 |
-
target="_blank"> <?php echo __('Documentation', 'wp-ultimate-csv-importer'); ?> </a>
|
1279 |
-
</p>
|
1280 |
|
1281 |
-
<p>
|
1282 |
-
<a href="https://www.smackcoders.com/blog/csv-importer-a-simple-and-easy-csv-importer-tutorial.html"
|
1283 |
-
target="_blank"> <?php echo __('Tutorials', 'wp-ultimate-csv-importer'); ?> </a></p>
|
1284 |
|
1285 |
-
<p><a href="http://www.youtube.com/user/smackcoders/channels"
|
1286 |
-
target="_blank"> <?php echo __('Youtube Channel', 'wp-ultimate-csv-importer'); ?> </a>
|
1287 |
-
</p>
|
1288 |
|
1289 |
-
<p><a href="https://www.smackcoders.com/store/products-46/wordpress.html"
|
1290 |
-
target="_blank"> <?php echo __('Other Plugins', 'wp-ultimate-csv-importer'); ?> </a>
|
1291 |
-
</p>
|
1292 |
-
</div>
|
1293 |
-
</div>
|
1294 |
-
</div>
|
1295 |
-
</div>
|
1296 |
-
</div>
|
1297 |
-
<div id="bottomsave">
|
1298 |
-
<span style="float:right">
|
1299 |
-
<button class="action btnn btn-primary" onclick="saveSettings();"
|
1300 |
-
style="float:right;position:relative; margin: 8px 15px 5px;padding:5px 10px" value="Save"
|
1301 |
-
name="savesettings"
|
1302 |
-
type="submit"><?php echo __('Save Changes', 'wp-ultimate-csv-importer'); ?> </button>
|
1303 |
-
</span>
|
1304 |
-
</div>
|
1305 |
-
</form>
|
1306 |
-
</div>
|
1307 |
-
|
36 |
********************************************************************************/
|
37 |
|
38 |
if (!defined('ABSPATH')) {
|
39 |
+
exit;
|
40 |
} // Exit if accessed directly
|
41 |
global $wp_version, $wpdb;
|
42 |
$impCE = new WPImporter_includes_helper();
|
43 |
$nonce_Key = $impCE->create_nonce_key();
|
44 |
if (!wp_verify_nonce($nonce_Key, 'smack_nonce')) {
|
45 |
+
die('You are not allowed to do this operation.Please contact your admin.');
|
46 |
}
|
47 |
?>
|
48 |
+
<div id="ShowMsg" style="display:none;"> <p id="setting-msg" class="alert alert-success"><?php echo __('Settings Saved', 'wp-ultimate-csv-importer'); ?></p>
|
|
|
|
|
|
|
49 |
</div>
|
50 |
+
<?php
|
51 |
+
|
52 |
+
$wpcsvfreesettings = get_option('wpcsvfreesettings');
|
53 |
+
$debugmode = isset($wpcsvfreesettings['debug_mode']) ? $wpcsvfreesettings['debug_mode'] : '';
|
54 |
+
$allow_import = isset($wpcsvfreesettings['enable_plugin_access_for_author']) ? $wpcsvfreesettings['enable_plugin_access_for_author'] : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
global $wpdb; ?>
|
56 |
<div class="uifree-settings">
|
57 |
+
<form class="add:the-list: validate" style = "width:98%;" action="" name="importerSettings" method="post" enctype="multipart/form-data">
|
58 |
+
<span><label class="activemenu"><?php echo __('General Settings','wp-ultimate-csv-importer'); ?></label></span>
|
59 |
+
|
60 |
+
<table class="settings-menu">
|
61 |
+
<tbody>
|
62 |
+
<tr>
|
63 |
+
<th><label>Error Handling</label></th>
|
64 |
+
<?php if($debugmode == 'enable_debug') {?>
|
65 |
+
<td><input type="checkbox" name = "debug_mode" value= "enable_debug" checked> <span>Debug Mode</span></td>
|
66 |
+
<?php } else {?>
|
67 |
+
<td><input type="checkbox" name = "debug_mode" value= "enable_debug"> <span>Debug Mode</span></td>
|
68 |
+
<?php } ?>
|
69 |
+
</tr>
|
70 |
+
<tr>
|
71 |
+
<th><label>Enable Import</label></th>
|
72 |
+
<?php if($allow_import == 'enable_plugin_access_for_author') {?>
|
73 |
+
<td><input type="checkbox" name='enable_plugin_access_for_author' value = 'enable_plugin_access_for_author' checked><span>Author/Editor Import</span></td>
|
74 |
+
<?php } else { ?>
|
75 |
+
<td><input type="checkbox" name='enable_plugin_access_for_author' value = 'enable_plugin_access_for_author'><span>Author/Editor Import</span></td>
|
76 |
+
<?php } ?>
|
77 |
+
</tr>
|
78 |
+
</tbody>
|
79 |
+
</table>
|
80 |
+
<button class="btnn btn-primary" onclick="saveSettings();" style="margin-left:7px;padding:5px;" value="Save" name="savesettings" type="submit"><?php echo __('Save Changes','wp-ultimate-csv-importer'); ?> </button>
|
81 |
+
<p style ="padding-top:20px;">
|
82 |
+
<label class="activemenu"><?php echo __('Security and Performance','wp-ultimate-csv-importer'); ?></label>
|
83 |
+
</p>
|
84 |
+
|
85 |
+
<div id="section8" class="securityperformance">
|
86 |
+
<div class="databorder security-perfoemance">
|
87 |
+
<table class="table table-striped">
|
88 |
+
<tr><th colspan="3" >
|
89 |
+
<h3 id="innertitle">Minimum required php.ini values (Ini configured values)</h3>
|
90 |
+
</th></tr>
|
91 |
+
<tr><th>
|
92 |
+
<label>Variables</label>
|
93 |
+
</th><th class='ini-configured-values'>
|
94 |
+
<label>System values</label>
|
95 |
+
</th><th class='min-requirement-values'>
|
96 |
+
<label>Minimum Requirements</label>
|
97 |
+
</th></tr>
|
98 |
+
<tr><td>post_max_size </td><td class='ini-configured-values'><?php echo ini_get('post_max_size') ?></td><td class='min-requirement-values'>10M</td></tr>
|
99 |
+
<tr><td>auto_append_file</td><td class='ini-configured-values'>-<?php echo ini_get('auto_append_file') ?></td><td class='min-requirement-values'>-</td></tr>
|
100 |
+
<tr><td>auto_prepend_file </td><td class='ini-configured-values'>-<?php echo ini_get('auto_prepend_file') ?></td><td class='min-requirement-values'>-</td></tr>
|
101 |
+
<tr><td>upload_max_filesize </td><td class='ini-configured-values'><?php echo ini_get('upload_max_filesize') ?></td><td class='min-requirement-values'>2M</td></tr>
|
102 |
+
<tr><td>file_uploads </td><td class='ini-configured-values'><?php echo ini_get('file_uploads') ?></td><td class='min-requirement-values'>1</td></tr>
|
103 |
+
<tr><td>allow_url_fopen </td><td class='ini-configured-values'><?php echo ini_get('allow_url_fopen') ?></td><td class='min-requirement-values'>1</td></tr>
|
104 |
+
<tr><td>max_execution_time </td><td class='ini-configured-values'><?php echo ini_get('max_execution_time') ?></td><td class='min-requirement-values'>3000</td></tr>
|
105 |
+
<tr><td>max_input_time </td><td class='ini-configured-values'><?php echo ini_get('max_input_time') ?></td><td class='min-requirement-values'>3000</td></tr>
|
106 |
+
<tr><td>max_input_vars </td><td class='ini-configured-values'><?php echo ini_get('max_input_vars') ?></td><td class='min-requirement-values'>3000</td></tr>
|
107 |
+
<tr><td>memory_limit </td><td class='ini-configured-values'><?php echo ini_get('memory_limit') ?></td><td class='min-requirement-values'>99M</td></tr>
|
108 |
+
</table>
|
109 |
+
|
110 |
+
<h3 id="innertitle" colspan="2" style='padding-left:8px;'>Required Loaders and Extentions:</h3>
|
111 |
+
<table class="table table-striped">
|
112 |
+
<?php $loaders_extensions = get_loaded_extensions();
|
113 |
+
$mod_security = apache_get_modules();
|
114 |
+
?>
|
115 |
+
<!--<tr><td>IonCube Loader </td><td><?php if(in_array('ionCube Loader', $loaders_extensions)) {
|
116 |
+
echo '<label style="color:green;">Yes</label>';
|
117 |
+
} else {
|
118 |
+
echo '<label style="color:red;">No</label>';
|
119 |
+
} ?> </td><td></td></tr>-->
|
120 |
+
<tr><td>PDO </td><td><?php if(in_array('PDO', $loaders_extensions)) {
|
121 |
+
echo '<label style="color:green;">Yes</label>';
|
122 |
+
} else {
|
123 |
+
echo '<label style="color:red;">No</label>';
|
124 |
+
} ?></td><td></td></tr>
|
125 |
+
<tr><td>Curl </td><td><?php if(in_array('curl', $loaders_extensions)) {
|
126 |
+
echo '<label style="color:green;">Yes</label>';
|
127 |
+
} else {
|
128 |
+
echo '<label style="color:red;">No</label>';
|
129 |
+
} ?></td><td></td></tr>
|
130 |
+
<tr><td>Mod Security </td><td><?php if(in_array('mod_security.c', $mod_security)) {
|
131 |
+
echo '<label style="color:green;">Yes</label>';
|
132 |
+
} else {
|
133 |
+
echo '<label style="color:red;">No</label>';
|
134 |
+
} ?></td><td>
|
135 |
+
<div style='float:left'>
|
136 |
+
<a href="#" class="tooltip">
|
137 |
+
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png" style="margin-left:-74px;"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
<span style="margin-left:20px;margin-top:-10px;width:150px;">
|
139 |
+
<img class="callout" src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/callout.gif"/>
|
140 |
+
<strong>htaccess settings:</strong>
|
141 |
+
<p>Locate the .htaccess file in Apache web root,if not create a new file named .htaccess and add the following:</p>
|
142 |
+
<b><?php echo '<IfModule mod_security.c>';?> SecFilterEngine Off SecFilterScanPOST Off <?php echo ' </IfModule>';?></b>
|
|
|
143 |
|
144 |
</span>
|
145 |
+
</a>
|
146 |
+
</div>
|
147 |
+
</td></tr>
|
148 |
+
|
149 |
+
</table>
|
150 |
+
|
151 |
+
<h3 id="innertitle" colspan="2" style='padding-left:8px;' >System Status:</h3>
|
152 |
+
<table class="table table-striped">
|
153 |
+
<tr><td class='debug-info-name'>WordPress Version</td><td><?php echo $wp_version; ?></td><td></td></tr>
|
154 |
+
<tr><td class='debug-info-name'>PHP Version</td><td><?php echo phpversion(); ?></td><td></td></tr>
|
155 |
+
<tr><td class='debug-info-name'>MySQL Version</td><td><?php echo $wpdb->db_version(); ?></td><td></td></tr>
|
156 |
+
<tr><td class='debug-info-name'>Server SoftWare</td><td><?php echo $_SERVER[ 'SERVER_SOFTWARE' ]; ?></td><td></td></tr> <tr><td class='debug-info-name'>Your User Agent</td><td><?php echo $_SERVER['HTTP_USER_AGENT']; ?></td><td></td></tr>
|
157 |
+
<tr><td class='debug-info-name'>WPDB Prefix</td><td><?php echo $wpdb->prefix; ?></td><td></td></tr>
|
158 |
+
<tr><td class='debug-info-name'>WP Multisite Mode</td><td><?php if ( is_multisite() ) { echo '<label style="color:green;">Enabled</label>'; } else { echo '<label style="color:red;">Disabled</label>'; } ?> </td><td></td></tr>
|
159 |
+
<tr><td class='debug-info-name'>WP Memory Limit</td><td><?php echo (int) ini_get('memory_limit'); ?></td><td></td></tr>
|
160 |
+
</table>
|
161 |
+
</div>
|
162 |
+
</div>
|
163 |
+
</form>
|
164 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
|
|
|
|
|
|
|
166 |
|
|
|
|
|
|
|
167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/users/actions/actions.php
CHANGED
@@ -172,7 +172,7 @@ class UsersActions extends SkinnyActions {
|
|
172 |
$this->insPostCount++; // = $this->insPostCount+1;
|
173 |
}
|
174 |
|
175 |
-
$this->detailedLog[$currentLimit][] = "<b>Created User_ID: </b>" . $user_id . " - Success, <b>Username</b> - " . $UserLogin . " , <b>E-mail</b> - " . $UserEmail . " , <b>Role</b> - " . $user_role . " , <b>Verify Here</b> - <a href='" . get_edit_user_link($user_id, true) . "'>" . __('User Profile') . "</a>";
|
176 |
|
177 |
$getUsers1 = $wpdb->get_results("select count(ID) as users from $user_table");
|
178 |
$no_of_users = ($getUsers1[0]->users) - ($getUsers[0]->users);
|
172 |
$this->insPostCount++; // = $this->insPostCount+1;
|
173 |
}
|
174 |
|
175 |
+
$this->detailedLog[$currentLimit][] = "<b>Created User_ID: </b>" . $user_id . " - Success, <b>Username</b> - " . $UserLogin . " , <b>E-mail</b> - " . $UserEmail . " , <b>Role</b> - " . $user_role . " , <b>Verify Here</b> - <a href='" . get_edit_user_link($user_id, true) . "' target='_blank'>" . __('User Profile') . "</a>";
|
176 |
|
177 |
$getUsers1 = $wpdb->get_results("select count(ID) as users from $user_table");
|
178 |
$no_of_users = ($getUsers1[0]->users) - ($getUsers[0]->users);
|
modules/users/templates/index.php
CHANGED
@@ -72,8 +72,7 @@ require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . '/includes/WPImporter_include
|
|
72 |
action='<?php echo admin_url() . 'admin.php?page=' . WP_CONST_ULTIMATE_CSV_IMP_SLUG . '/index.php&__module=' . $_REQUEST['__module'] . '&step=mapping_settings' ?>'
|
73 |
id='browsefile' method='post' name='browsefile'>
|
74 |
<div class="importfile" align='center'>
|
75 |
-
<div id='filenamedisplay'>
|
76 |
-
<!--<span class='importer_icon' style="float:left;"><img src = "<?php //echo WP_CONST_ULTIMATE_CSV_IMP_DIR;?>/images/Importicon_24.png"></span><span style="float:left;"><h2>Import CSV File</h2></span>--></div>
|
77 |
<form class="add:the-list: validate" style="clear:both;" method="post"
|
78 |
enctype="multipart/form-data" onsubmit="return file_exist();">
|
79 |
<div class="container">
|
@@ -224,11 +223,6 @@ require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . '/includes/WPImporter_include
|
|
224 |
}
|
225 |
</script>
|
226 |
<input type='hidden' name='importid' id='importid'>
|
227 |
-
<!-- <div class='section-one' align='center'>
|
228 |
-
<input type='button' name='clearform' id='clearform' value='Clear' onclick="Reload();" class = 'btn btn-warning' />
|
229 |
-
<input type='submit' name='importfile' id='importfile' value='Next>>' class = 'btn btn-primary' disabled/>
|
230 |
-
<input type = 'hidden' name = 'importid' id = 'importid' >
|
231 |
-
</div> -->
|
232 |
</form>
|
233 |
</div>
|
234 |
</div>
|
@@ -261,7 +255,6 @@ require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . '/includes/WPImporter_include
|
|
261 |
</div>
|
262 |
<div id='mappingheader' class='mappingheader'>
|
263 |
<?php
|
264 |
-
// $impCE = CallSkinnyObj::getInstance();
|
265 |
if (isset($_POST['uploadfilename']) && $_POST['uploadfilename'] != '') {
|
266 |
$file_name = $_POST['uploadfilename'];
|
267 |
$filename = $impCE->convert_string2hash_key($file_name);
|
@@ -284,7 +277,6 @@ require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . '/includes/WPImporter_include
|
|
284 |
?>
|
285 |
<table style="font-size: 12px;" class='table table-striped'>
|
286 |
<tr>
|
287 |
-
<td colspan='4'>
|
288 |
<div align='center' style='float:right;'>
|
289 |
<?php $cnt = count($impCE->defCols) + 2;
|
290 |
$cnt1 = count($impCE->headers);
|
@@ -328,21 +320,7 @@ require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . '/includes/WPImporter_include
|
|
328 |
echo $_REQUEST['step'];
|
329 |
} ?>'/>
|
330 |
<input type='hidden' id='mappingArr' name='mappingArr' value=''/>
|
331 |
-
<input type='button' id='prev_record' name='prev_record' value='<<'
|
332 |
-
class="btn btn-primary" onclick='gotoelement(this.id);'/>
|
333 |
-
<label style="padding-right:10px;"
|
334 |
-
id='preview_of_row'><?php echo __('Showing preview of row # 1', 'wp-ultimate-csv-importer'); ?></label>
|
335 |
-
<input type='button' id='next_record' name='next_record' value='>>'
|
336 |
-
class="btn btn-primary" onclick='gotoelement(this.id);'/>
|
337 |
-
<label id="importalign"
|
338 |
-
style="margin-right:8px;"> <?php echo __('Go To Row #', 'wp-ultimate-csv-importer'); ?> </label><input
|
339 |
-
type='text' id='goto_element' name='goto_element'/>
|
340 |
-
<input type='button' id='apply_element' name='apply_element'
|
341 |
-
value='<?php echo __('Show', 'wp-ultimate-csv-importer'); ?>'
|
342 |
-
class="btn btn-success" onclick='gotoelement(this.id);'
|
343 |
-
style="margin-right:10px;margin-left:5px"/>
|
344 |
</div>
|
345 |
-
</td>
|
346 |
</tr>
|
347 |
<?php
|
348 |
$count = 0;
|
@@ -351,26 +329,25 @@ require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . '/includes/WPImporter_include
|
|
351 |
<tr>
|
352 |
<td colspan='4' class="left_align columnheader"
|
353 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
354 |
-
<div id='custfield_core'><b
|
355 |
</div>
|
356 |
</td>
|
357 |
</tr>
|
358 |
<tr>
|
359 |
-
<td class="left_align columnheader">
|
360 |
<b><?php echo __('WP FIELDS', 'wp-ultimate-csv-importer'); ?></b></td>
|
361 |
-
<td class="columnheader">
|
362 |
<b><?php echo __('CSV HEADER', 'wp-ultimate-csv-importer'); ?></b></td>
|
363 |
-
<td
|
364 |
-
</td>
|
365 |
<td></td>
|
366 |
</tr>
|
367 |
<?php
|
368 |
foreach ($usersObj->defCols as $key => $value) {
|
369 |
?>
|
370 |
<tr>
|
371 |
-
<td class="left_align" style='
|
372 |
<input type='hidden' name='fieldname<?php print($count); ?>'
|
373 |
-
id='fieldname<?php print($count); ?>' value= <?php echo $key;
|
374 |
<label
|
375 |
class='wpfields'><?php print('<b>' . $key . '</b></label><br><label class="samptxt" style="padding-left:20px">[Name: ' . $key . ']'); ?></label>
|
376 |
</td>
|
@@ -416,7 +393,7 @@ require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . '/includes/WPImporter_include
|
|
416 |
} ?>"/>
|
417 |
|
418 |
<div>
|
419 |
-
<div class="goto_import_options"
|
420 |
<div class="mappingactions" style="margin-top:26px;">
|
421 |
<input type='button' id='clear_mapping'
|
422 |
title='<?php echo __('clear Mapping', 'wp-ultimate-csv-importer'); ?>'
|
@@ -425,17 +402,6 @@ require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . '/includes/WPImporter_include
|
|
425 |
echo ' ';
|
426 |
echo $impCE->reduceStringLength(__(" Mapping", 'wp-ultimate-csv-importer'), 'Mapping'); ?>'
|
427 |
onclick='clearMapping();' style='float:left'/>
|
428 |
-
<span style=''>
|
429 |
-
<a href="#" class="tooltip tooltip_smack" style=''>
|
430 |
-
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png"/>
|
431 |
-
<span class="tooltipClearMapping">
|
432 |
-
<img class="callout" src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/callout.gif"/>
|
433 |
-
<strong><?php echo __('Refresh to re-map fields', 'wp-ultimate-csv-importer'); ?></strong>
|
434 |
-
<img src="<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>images/help.png"
|
435 |
-
style="margin-top: 6px;float:right;"/>
|
436 |
-
</span>
|
437 |
-
</a>
|
438 |
-
</span>
|
439 |
</div>
|
440 |
<div class="mappingactions">
|
441 |
<input type='submit' id='goto_importer_setting'
|
@@ -482,7 +448,6 @@ require_once(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . '/includes/WPImporter_include
|
|
482 |
<?php } ?>
|
483 |
<!-- Import settings options -->
|
484 |
<div class="postbox" id="options" style=" margin-bottom:0px;">
|
485 |
-
<!-- <h4 class="hndle">Search settings</h4>-->
|
486 |
<div class="inside">
|
487 |
<label id='importalign'><input type='radio' id='importNow' name='importMode' value=''
|
488 |
onclick='choose_import_mode(this.id);'
|
72 |
action='<?php echo admin_url() . 'admin.php?page=' . WP_CONST_ULTIMATE_CSV_IMP_SLUG . '/index.php&__module=' . $_REQUEST['__module'] . '&step=mapping_settings' ?>'
|
73 |
id='browsefile' method='post' name='browsefile'>
|
74 |
<div class="importfile" align='center'>
|
75 |
+
<div id='filenamedisplay'> </div>
|
|
|
76 |
<form class="add:the-list: validate" style="clear:both;" method="post"
|
77 |
enctype="multipart/form-data" onsubmit="return file_exist();">
|
78 |
<div class="container">
|
223 |
}
|
224 |
</script>
|
225 |
<input type='hidden' name='importid' id='importid'>
|
|
|
|
|
|
|
|
|
|
|
226 |
</form>
|
227 |
</div>
|
228 |
</div>
|
255 |
</div>
|
256 |
<div id='mappingheader' class='mappingheader'>
|
257 |
<?php
|
|
|
258 |
if (isset($_POST['uploadfilename']) && $_POST['uploadfilename'] != '') {
|
259 |
$file_name = $_POST['uploadfilename'];
|
260 |
$filename = $impCE->convert_string2hash_key($file_name);
|
277 |
?>
|
278 |
<table style="font-size: 12px;" class='table table-striped'>
|
279 |
<tr>
|
|
|
280 |
<div align='center' style='float:right;'>
|
281 |
<?php $cnt = count($impCE->defCols) + 2;
|
282 |
$cnt1 = count($impCE->headers);
|
320 |
echo $_REQUEST['step'];
|
321 |
} ?>'/>
|
322 |
<input type='hidden' id='mappingArr' name='mappingArr' value=''/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
</div>
|
|
|
324 |
</tr>
|
325 |
<?php
|
326 |
$count = 0;
|
329 |
<tr>
|
330 |
<td colspan='4' class="left_align columnheader"
|
331 |
style='background-color: #F5F5F5; border: 1px solid #d6e9c6;padding: 10px; width:100%;'>
|
332 |
+
<div id='custfield_core' style='font-size:18px; font-family:times;'><b><?php echo __('WordPress Fields:','wp-ultimate-importer'); ?></b>
|
333 |
</div>
|
334 |
</td>
|
335 |
</tr>
|
336 |
<tr>
|
337 |
+
<td class="left_align columnheader" style='padding-left:170px;'>
|
338 |
<b><?php echo __('WP FIELDS', 'wp-ultimate-csv-importer'); ?></b></td>
|
339 |
+
<td class="columnheader" style ='padding-left:55px;'>
|
340 |
<b><?php echo __('CSV HEADER', 'wp-ultimate-csv-importer'); ?></b></td>
|
341 |
+
<td> </td>
|
|
|
342 |
<td></td>
|
343 |
</tr>
|
344 |
<?php
|
345 |
foreach ($usersObj->defCols as $key => $value) {
|
346 |
?>
|
347 |
<tr>
|
348 |
+
<td class="left_align" style='padding-left:150px;'>
|
349 |
<input type='hidden' name='fieldname<?php print($count); ?>'
|
350 |
+
id='fieldname<?php print($count); ?>' value= '<?php echo $key; ?>'/>
|
351 |
<label
|
352 |
class='wpfields'><?php print('<b>' . $key . '</b></label><br><label class="samptxt" style="padding-left:20px">[Name: ' . $key . ']'); ?></label>
|
353 |
</td>
|
393 |
} ?>"/>
|
394 |
|
395 |
<div>
|
396 |
+
<div class="goto_import_options" style ='padding-left:330px;'>
|
397 |
<div class="mappingactions" style="margin-top:26px;">
|
398 |
<input type='button' id='clear_mapping'
|
399 |
title='<?php echo __('clear Mapping', 'wp-ultimate-csv-importer'); ?>'
|
402 |
echo ' ';
|
403 |
echo $impCE->reduceStringLength(__(" Mapping", 'wp-ultimate-csv-importer'), 'Mapping'); ?>'
|
404 |
onclick='clearMapping();' style='float:left'/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
</div>
|
406 |
<div class="mappingactions">
|
407 |
<input type='submit' id='goto_importer_setting'
|
448 |
<?php } ?>
|
449 |
<!-- Import settings options -->
|
450 |
<div class="postbox" id="options" style=" margin-bottom:0px;">
|
|
|
451 |
<div class="inside">
|
452 |
<label id='importalign'><input type='radio' id='importNow' name='importMode' value=''
|
453 |
onclick='choose_import_mode(this.id);'
|
modules/woocommerce/actions/actions.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
if ( ! defined( 'ABSPATH' ) )
|
38 |
-
exit; // Exit if accessed directly
|
39 |
-
|
40 |
-
class WoocommerceActions extends SkinnyActions {
|
41 |
-
|
42 |
-
public function __construct()
|
43 |
-
{
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* The actions index method
|
48 |
-
* @param array $request
|
49 |
-
* @return array
|
50 |
-
*/
|
51 |
-
public function executeIndex($request)
|
52 |
-
{
|
53 |
-
// return an array of name value pairs to send data to the template
|
54 |
-
$data = array();
|
55 |
-
return $data;
|
56 |
-
}
|
57 |
-
|
58 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/woocommerce/templates/index.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
if ( ! defined( 'ABSPATH' ) )
|
38 |
-
exit; // Exit if accessed directly
|
39 |
-
echo "<div align='center' style='width:100%;'> <p class='warnings' style='width:50%;text-align:center;color:red;'>".__('This feature is only available in PRO!.','wp-ultimate-csv-importer')."</p></div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/wpcommerce/actions/actions.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
if ( ! defined( 'ABSPATH' ) )
|
38 |
-
exit; // Exit if accessed directly
|
39 |
-
|
40 |
-
class WpcommerceActions extends SkinnyActions {
|
41 |
-
|
42 |
-
public function __construct()
|
43 |
-
{
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* The actions index method
|
48 |
-
* @param array $request
|
49 |
-
* @return array
|
50 |
-
*/
|
51 |
-
public function executeIndex($request)
|
52 |
-
{
|
53 |
-
// return an array of name value pairs to send data to the template
|
54 |
-
$data = array();
|
55 |
-
return $data;
|
56 |
-
}
|
57 |
-
|
58 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/wpcommerce/templates/index.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
if ( ! defined( 'ABSPATH' ) )
|
38 |
-
exit; // Exit if accessed directly
|
39 |
-
echo "<div align='center' style='width:100%;'> <p class='warnings' style='width:50%;text-align:center;color:red;'>". __('This feature is only available in PRO!.','wp-ultimate-csv-importer')."</p></div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plugins/README
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
|
2 |
-
Put your plugins here.
|
3 |
-
The file name of a plugin must be formatted like this:
|
4 |
-
skinnyPlugin*.php
|
5 |
-
|
6 |
-
For example:
|
7 |
-
skinnyPluginCaptcha.php
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
CHANGED
Binary file
|
screenshot-5.png
CHANGED
Binary file
|
screenshot-6.png
CHANGED
Binary file
|
screenshot-7.png
CHANGED
Binary file
|
screenshot-8.png
DELETED
Binary file
|
templates/Addcustomfields.php
CHANGED
@@ -43,7 +43,7 @@ $count = isset($_POST['corecount']) ? $_POST['corecount'] : '';
|
|
43 |
$impobj = new WPImporter_includes_helper();
|
44 |
$getrec = $impobj->csv_file_data($filename);
|
45 |
$csvheaders = $impobj->headers;
|
46 |
-
$returndata = "<tr><td><input type='text' name='addcorefieldname$count' id = 'addcorefieldname$count'/></td>";
|
47 |
$returndata .= "<td class='left_align'> <select name='addcoremapping$count' id='addcoremapping$count' class='uiButton'>";
|
48 |
$returndata .= "<option id = 'select'>-- Select --</option>";
|
49 |
foreach ($csvheaders as $headerkey => $headervalue) {
|
@@ -52,4 +52,4 @@ foreach ($csvheaders as $headerkey => $headervalue) {
|
|
52 |
$returndata .= "</select></td>";
|
53 |
$returndata .= "<td></td><td></td></tr>";
|
54 |
print_r($returndata);
|
55 |
-
die;
|
43 |
$impobj = new WPImporter_includes_helper();
|
44 |
$getrec = $impobj->csv_file_data($filename);
|
45 |
$csvheaders = $impobj->headers;
|
46 |
+
$returndata = "<tr><td class='left_align' style='width:54.5%; padding-left:150px;'><input type='text' name='addcorefieldname$count' id = 'addcorefieldname$count'/></td>";
|
47 |
$returndata .= "<td class='left_align'> <select name='addcoremapping$count' id='addcoremapping$count' class='uiButton'>";
|
48 |
$returndata .= "<option id = 'select'>-- Select --</option>";
|
49 |
foreach ($csvheaders as $headerkey => $headervalue) {
|
52 |
$returndata .= "</select></td>";
|
53 |
$returndata .= "<td></td><td></td></tr>";
|
54 |
print_r($returndata);
|
55 |
+
die;
|
templates/UploadHandler.php
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/import.php
CHANGED
@@ -111,6 +111,7 @@ if ($count < $totRecords) {
|
|
111 |
$resultArr = array();
|
112 |
$res2 = array();
|
113 |
$res1 = array();
|
|
|
114 |
$mapping_value = '';
|
115 |
$filename = $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['uploadedFile'];
|
116 |
$delim = $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['select_delimeter'];
|
@@ -122,17 +123,22 @@ if ($_POST['postdata']['dupContent']) {
|
|
122 |
$importObj->conDupCheck = $_POST['postdata']['dupContent'];
|
123 |
}
|
124 |
$csv_rec_count = $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['h2'];
|
125 |
-
|
126 |
//mapped and unmapped count
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
136 |
}
|
137 |
$mapped = count($res2);
|
138 |
$unmapped = count($res1);
|
111 |
$resultArr = array();
|
112 |
$res2 = array();
|
113 |
$res1 = array();
|
114 |
+
$get_mapped_array = array();
|
115 |
$mapping_value = '';
|
116 |
$filename = $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['uploadedFile'];
|
117 |
$delim = $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['select_delimeter'];
|
123 |
$importObj->conDupCheck = $_POST['postdata']['dupContent'];
|
124 |
}
|
125 |
$csv_rec_count = $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['h2'];
|
126 |
+
$available_groups = $skinnyObj->get_availgroups($curr_action);
|
127 |
//mapped and unmapped count
|
128 |
+
foreach ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'] as $seskey => $sesval ) {
|
129 |
+
foreach($available_groups as $groupKey => $groupVal) {
|
130 |
+
$current_mapped = explode($groupVal.'mapping', $seskey);
|
131 |
+
if(is_array($current_mapped) && count($current_mapped) == 2) {
|
132 |
+
$get_mapped_array['mapping'.$current_mapped[1]] = $sesval;
|
133 |
+
if($sesval == '-- Select --' ) {
|
134 |
+
$res1[$seskey] = $sesval;
|
135 |
+
}
|
136 |
+
else {
|
137 |
+
if ($sesval != '')
|
138 |
+
$res2[] = $sesval;
|
139 |
+
}
|
140 |
+
}
|
141 |
+
}
|
142 |
}
|
143 |
$mapped = count($res2);
|
144 |
$unmapped = count($res1);
|
templates/menu.php
CHANGED
@@ -48,7 +48,14 @@ if ($impCheckobj != 'true') {
|
|
48 |
die($impCheckobj);
|
49 |
}
|
50 |
|
51 |
-
$post = $page = $custompost = $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
$impCEM = CallWPImporterObj::getInstance();
|
53 |
$get_settings = array();
|
54 |
$get_settings = $impCEM->getSettings();
|
@@ -56,7 +63,7 @@ $mod = isset($_REQUEST['__module']) ? $_REQUEST['__module'] : '';
|
|
56 |
$module = $manager = '';
|
57 |
if (is_array($get_settings) && !empty($get_settings)) {
|
58 |
foreach ($get_settings as $key) {
|
59 |
-
|
60 |
}
|
61 |
}
|
62 |
if (isset($_POST['post_csv']) && $_POST['post_csv'] == 'Import') {
|
@@ -68,7 +75,7 @@ if (isset($_POST['post_csv']) && $_POST['post_csv'] == 'Import') {
|
|
68 |
$$action = 'activate';
|
69 |
} else {
|
70 |
if (isset($mod) && !empty($mod)) {
|
71 |
-
$module_array = array('post', 'page', 'custompost', 'users', '
|
72 |
foreach ($module_array as $val) {
|
73 |
if ($val = $mod) {
|
74 |
$$mod = 'activate';
|
@@ -110,14 +117,12 @@ $menuHTML = "<nav class='navbar navbar-default' role='navigation'>
|
|
110 |
</a>
|
111 |
<ul class='dropdown-menu'>
|
112 |
<li class= '{$post}'><a href= 'admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=post&step=uploadfile'>" . __('Post', 'wp-ultimate-csv-importer') . "</a></li>
|
113 |
-
<li class = '{$page}'><a href='admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=page&step=uploadfile'>" . __('Page', 'wp-ultimate-csv-importer') . "</a></li>
|
114 |
-
|
115 |
-
|
116 |
-
$menuHTML .= "<li class = '{$comments}'><a href='admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=comments&step=uploadfile'>" . __('Comments', 'wp-ultimate-csv-importer') . "</a></li>";
|
117 |
}
|
118 |
-
if ($users) {
|
119 |
$menuHTML .= "<li class = '{$users}'><a href='admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=users&step=uploadfile'>" . __('Users', 'wp-ultimate-csv-importer') . "</a></li>";
|
120 |
-
|
121 |
if ($eshop) {
|
122 |
$menuHTML .= "<li class = '{$eshop}'><a href='admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=eshop&step=uploadfile'>" . __('Eshop', 'wp-ultimate-csv-importer') . "</a></li>";
|
123 |
}
|
@@ -138,7 +143,7 @@ $menuHTML .= "<li class = '{$export}'><a href='admin.php?page=" . WP_CONST_ULTIM
|
|
138 |
$menuHTML .= "<li class= '{$settings}'><a href='admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=settings' />" . __('Settings', 'wp-ultimate-csv-importer') . "</a></li>
|
139 |
<li class = '{$support}'><a href= 'admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=support'>" . __('Support', 'wp-ultimate-csv-importer') . "</a></li>
|
140 |
|
141 |
-
<li ><a href='
|
142 |
<li ><a href='http://demo.smackcoders.com/demowpthree/wp-admin/admin.php?page=wp-ultimate-csv-importer-pro/index.php&__module=dashboard' target='_blank'>" . __('Try Live Demo Now', 'wp-ultimate-csv-importer') . "</a></li>
|
143 |
</ul>";
|
144 |
$plugin_version = get_option('ULTIMATE_CSV_IMP_VERSION');
|
48 |
die($impCheckobj);
|
49 |
}
|
50 |
|
51 |
+
$post = $page = $custompost = $users = $eshop = $settings = $support = $dashboard = $filemanager = $mappingtemplate = $schedulemapping = $export = '';
|
52 |
+
$active_plugins = get_option('active_plugins');
|
53 |
+
if(in_array('eshop/eshop.php', $active_plugins)){
|
54 |
+
$eshop = true;
|
55 |
+
}
|
56 |
+
if(in_array('custom-post-type-ui/custom-post-type-ui.php', $active_plugins)){
|
57 |
+
$custompost = true;
|
58 |
+
}
|
59 |
$impCEM = CallWPImporterObj::getInstance();
|
60 |
$get_settings = array();
|
61 |
$get_settings = $impCEM->getSettings();
|
63 |
$module = $manager = '';
|
64 |
if (is_array($get_settings) && !empty($get_settings)) {
|
65 |
foreach ($get_settings as $key) {
|
66 |
+
$key = true;
|
67 |
}
|
68 |
}
|
69 |
if (isset($_POST['post_csv']) && $_POST['post_csv'] == 'Import') {
|
75 |
$$action = 'activate';
|
76 |
} else {
|
77 |
if (isset($mod) && !empty($mod)) {
|
78 |
+
$module_array = array('post', 'page', 'custompost', 'users', 'eshop', 'dashboard');
|
79 |
foreach ($module_array as $val) {
|
80 |
if ($val = $mod) {
|
81 |
$$mod = 'activate';
|
117 |
</a>
|
118 |
<ul class='dropdown-menu'>
|
119 |
<li class= '{$post}'><a href= 'admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=post&step=uploadfile'>" . __('Post', 'wp-ultimate-csv-importer') . "</a></li>
|
120 |
+
<li class = '{$page}'><a href='admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=page&step=uploadfile'>" . __('Page', 'wp-ultimate-csv-importer') . "</a></li>";
|
121 |
+
if ($custompost) {
|
122 |
+
$menuHTML .= "<li class = '{$custompost}'><a href= 'admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=custompost&step=uploadfile'>" . __('Custom Post', 'wp-ultimate-csv-importer') . "</a></li>";
|
|
|
123 |
}
|
|
|
124 |
$menuHTML .= "<li class = '{$users}'><a href='admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=users&step=uploadfile'>" . __('Users', 'wp-ultimate-csv-importer') . "</a></li>";
|
125 |
+
|
126 |
if ($eshop) {
|
127 |
$menuHTML .= "<li class = '{$eshop}'><a href='admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=eshop&step=uploadfile'>" . __('Eshop', 'wp-ultimate-csv-importer') . "</a></li>";
|
128 |
}
|
143 |
$menuHTML .= "<li class= '{$settings}'><a href='admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=settings' />" . __('Settings', 'wp-ultimate-csv-importer') . "</a></li>
|
144 |
<li class = '{$support}'><a href= 'admin.php?page=" . WP_CONST_ULTIMATE_CSV_IMP_SLUG . "/index.php&__module=support'>" . __('Support', 'wp-ultimate-csv-importer') . "</a></li>
|
145 |
|
146 |
+
<li ><a href='https://www.wpultimatecsvimporter.com?utm_source=WpPlugin&utm_medium=Free&utm_campaign=SupportTraffic' target='_blank'>" . __('Go Pro Now', 'wp-ultimate-csv-importer') . "</a></li>
|
147 |
<li ><a href='http://demo.smackcoders.com/demowpthree/wp-admin/admin.php?page=wp-ultimate-csv-importer-pro/index.php&__module=dashboard' target='_blank'>" . __('Try Live Demo Now', 'wp-ultimate-csv-importer') . "</a></li>
|
148 |
</ul>";
|
149 |
$plugin_version = get_option('ULTIMATE_CSV_IMP_VERSION');
|
templates/savetemplate.php
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
|
38 |
-
require_once('../config/settings.php');
|
39 |
-
require_once('../lib/skinnymvc/controller/SkinnyController.php');
|
40 |
-
require_once('../../../../wp-load.php');
|
41 |
-
if($_REQUEST['stepstatus']){
|
42 |
-
foreach($_REQUEST as $reqKey => $reqVal){
|
43 |
-
if($reqKey == 'h2'){
|
44 |
-
$getArr = explode(',',$reqVal);
|
45 |
-
foreach($getArr as $v){
|
46 |
-
$mapArr[] = $v;
|
47 |
-
}
|
48 |
-
$_SESSION['SMACK_IMP_OPTIONS']['mapArr'] = $mapArr;
|
49 |
-
}elseif($reqKey != 'h2'){
|
50 |
-
$_SESSION['SMACK_IMP_OPTIONS'][$reqKey] = $reqVal;
|
51 |
-
}
|
52 |
-
}
|
53 |
-
print_r(json_encode($_REQUEST));
|
54 |
-
}
|
55 |
-
die;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/uploader.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/versioncheck.php
DELETED
@@ -1,78 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*********************************************************************************
|
3 |
-
* WP Ultimate CSV Importer is a Tool for importing CSV for the Wordpress
|
4 |
-
* plugin developed by Smackcoder. Copyright (C) 2014 Smackcoders.
|
5 |
-
*
|
6 |
-
* WP Ultimate CSV Importer is free software; you can redistribute it and/or
|
7 |
-
* modify it under the terms of the GNU Affero General Public License version 3
|
8 |
-
* as published by the Free Software Foundation with the addition of the
|
9 |
-
* following permission added to Section 15 as permitted in Section 7(a): FOR
|
10 |
-
* ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY WP Ultimate
|
11 |
-
* CSV Importer, WP Ultimate CSV Importer DISCLAIMS THE WARRANTY OF NON
|
12 |
-
* INFRINGEMENT OF THIRD PARTY RIGHTS.
|
13 |
-
*
|
14 |
-
* WP Ultimate CSV Importer is distributed in the hope that it will be useful,
|
15 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
17 |
-
* License for more details.
|
18 |
-
*
|
19 |
-
* You should have received a copy of the GNU Affero General Public License
|
20 |
-
* along with this program; if not, see http://www.gnu.org/licenses or write
|
21 |
-
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
22 |
-
* Boston, MA 02110-1301 USA.
|
23 |
-
*
|
24 |
-
* You can contact Smackcoders at email address info@smackcoders.com.
|
25 |
-
*
|
26 |
-
* The interactive user interfaces in original and modified versions
|
27 |
-
* of this program must display Appropriate Legal Notices, as required under
|
28 |
-
* Section 5 of the GNU Affero General Public License version 3.
|
29 |
-
*
|
30 |
-
* In accordance with Section 7(b) of the GNU Affero General Public License
|
31 |
-
* version 3, these Appropriate Legal Notices must retain the display of the
|
32 |
-
* WP Ultimate CSV Importer copyright notice. If the display of the logo is
|
33 |
-
* not reasonably feasible for technical reasons, the Appropriate Legal
|
34 |
-
* Notices must display the words
|
35 |
-
* "Copyright Smackcoders. 2014. All rights reserved".
|
36 |
-
********************************************************************************/
|
37 |
-
if ( ! defined( 'ABSPATH' ) )
|
38 |
-
exit; // Exit if accessed directly
|
39 |
-
$impObj = new WPImporter_includes_helper();
|
40 |
-
$nonceKey = $impObj->create_nonce_key();
|
41 |
-
if(! wp_verify_nonce($nonceKey, 'smack_nonce'))
|
42 |
-
die('You are not allowed to do this operation.Please contact your admin.');
|
43 |
-
$impCheckobj = CallWPImporterObj::checkSecurity();
|
44 |
-
if($impCheckobj != 'true')
|
45 |
-
die($impCheckobj);
|
46 |
-
|
47 |
-
global $wpdb;
|
48 |
-
$all_arr = array();
|
49 |
-
$all_arr = $_REQUEST['postdata'];
|
50 |
-
$all_arr = $all_arr[0];
|
51 |
-
if ($all_arr['action'] == 'file_exist_check') {
|
52 |
-
$file_with_version = $all_arr['filename'];
|
53 |
-
|
54 |
-
$temp_arr = array();
|
55 |
-
$temp_arr = explode("(", $file_with_version);
|
56 |
-
$file_name = $temp_arr[0] . '.csv';
|
57 |
-
$all_csv_names = $wpdb->get_results("select csv_name from smack_dashboard_manager");
|
58 |
-
$all_names = array();
|
59 |
-
foreach ($all_csv_names as $key1 => $value1) {
|
60 |
-
|
61 |
-
foreach ($value1 as $key2 => $value2) {
|
62 |
-
$all_names[] = $value2;
|
63 |
-
}
|
64 |
-
|
65 |
-
}
|
66 |
-
|
67 |
-
if (in_array($file_name, $all_names)) {
|
68 |
-
print('exist');
|
69 |
-
} else {
|
70 |
-
print('not_exist');
|
71 |
-
}
|
72 |
-
} elseif ($all_arr['action'] == 'move_file') {
|
73 |
-
$plugin_dir = wp_upload_dir();
|
74 |
-
$file_name = $all_arr['filename'];
|
75 |
-
$source = $plugin_dir['basedir'] . '/ultimate_importer/temp_importer/' . $file_name;
|
76 |
-
$destination = $plugin_dir['basedir'] . '/ultimate_importer/' . $file_name;
|
77 |
-
copy($source, $destination);
|
78 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|