WassUp Real Time Analytics - Version 1.9.1

Version Description

  • Critical security, compatibility and bugfix upgrade.
    64MB memory is now required for Wassup! See codex document "Editing wp-config.php" to increase memory allocated to Wordpress before upgrading.
    DO NOT UPGRADE when your site busy! Read installation instructions for safe upgrade instructions.

=

Download this release

Release Info

Developer michelem
Plugin Icon 128x128 WassUp Real Time Analytics
Version 1.9.1
Comparing to
See all releases

Code changes from version 1.9 to 1.9.1

Files changed (61) hide show
  1. README.md +257 -0
  2. badhosts-intl.txt +0 -347
  3. badhosts.txt +0 -1707
  4. css/images/Thumbs.db +0 -0
  5. css/index.php +3 -3
  6. {js/jquery-ui/css → css/jquery-ui}/images/animated-overlay.gif +0 -0
  7. {js/jquery-ui/css → css/jquery-ui}/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  8. {js/jquery-ui/css → css/jquery-ui}/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  9. {js/jquery-ui/css → css/jquery-ui}/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  10. {js/jquery-ui/css → css/jquery-ui}/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  11. {js/jquery-ui/css → css/jquery-ui}/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  12. {js/jquery-ui/css → css/jquery-ui}/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  13. {js/jquery-ui/css → css/jquery-ui}/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  14. {js/jquery-ui/css → css/jquery-ui}/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  15. {js/jquery-ui/css → css/jquery-ui}/images/ui-icons_222222_256x240.png +0 -0
  16. {js/jquery-ui/css → css/jquery-ui}/images/ui-icons_2e83ff_256x240.png +0 -0
  17. {js/jquery-ui/css → css/jquery-ui}/images/ui-icons_454545_256x240.png +0 -0
  18. {js/jquery-ui/css → css/jquery-ui}/images/ui-icons_888888_256x240.png +0 -0
  19. {js/jquery-ui/css → css/jquery-ui}/images/ui-icons_cd0a0a_256x240.png +0 -0
  20. {js/jquery-ui/css → css/jquery-ui}/jquery.ui.core.css +0 -0
  21. {js/jquery-ui/css → css/jquery-ui}/jquery.ui.tabs.css +0 -0
  22. {js/jquery-ui/css → css/jquery-ui}/jquery.ui.theme.css +0 -0
  23. css/wassup.css +29 -12
  24. img/Thumbs.db +0 -0
  25. img/flags/Thumbs.db +0 -0
  26. img/flags/catalonia.png +0 -0
  27. img/flags/england.png +0 -0
  28. img/flags/europeanunion.png +0 -0
  29. img/flags/scotland.png +0 -0
  30. img/flags/sv_old.png +0 -0
  31. img/flags/wales.png +0 -0
  32. img/index.php +3 -3
  33. index.php +3 -3
  34. js/index.php +3 -3
  35. js/jquery-migrate.js +0 -2
  36. js/jquery-ui/css/jquery-ui.css +0 -4
  37. js/jquery-ui/js/jquery-ui.min.js +0 -7
  38. js/jquery.js +0 -3
  39. js/jquery.min.js +0 -4
  40. js/spia.js +40 -10
  41. js/thickbox.js +0 -10
  42. js/thickbox/thickbox-orig.js +0 -10
  43. js/thickbox/thickbox.js +317 -1
  44. js/ui.base.js +0 -2
  45. js/ui.tabs.js +0 -2
  46. js/wassup.js +20 -9
  47. language/da_DA.mo +0 -0
  48. language/index.php +3 -3
  49. language/wassup.pot +1595 -1475
  50. lib/action.php +143 -214
  51. lib/admin.class.php +0 -215
  52. lib/akismet.class.php +58 -66
  53. lib/compat-lib/admin.class.php +0 -212
  54. lib/compat-lib/compat_functions.php +0 -149
  55. lib/compat-lib/wassup.class.php +0 -2157
  56. lib/compat_functions.php +0 -65
  57. lib/compatibility.php +98 -0
  58. lib/index.php +3 -3
  59. lib/main.php +297 -201
  60. lib/settings.php +275 -187
  61. lib/uadetector.class.php +1040 -137
README.md ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WassUp Real Time Analytics for WordPress
2
+ Contributors: michelem, helened
3
+ Donate link: [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=michele%40befree%2eit&item_name=WassUp&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=IT&bn=PP%2dDonationsBF&charset=UTF%2d8)
4
+ Tags: analytics, counter, online, seo, statistics, stats, tracker, traffic, trends, user, visitor, web
5
+ Requires at least: WordPress 4.0
6
+ Tested up to: 4.6.1
7
+ Stable tag: 1.9.1
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ #### Analyze your website traffic with accurate, real-time stats, live views, visitor counts, top stats, IP geolocation, customizable tracking, and more.
12
+ -----
13
+ ## Description
14
+
15
+ WassUp is a Wordpress plugin to analyze your visitors traffic with accurate, real-time stats, lots of detailed chronological information, customizable tracking, live views, visitor and pageview counts, top stats, charts, IP geolocation, map, two aside widgets, and a dashboard widget.
16
+
17
+ Wassup does in-depth visitor tracking and shows you incredible details about your site's latest hits...more than you can get from almost any other single plugin. It is very useful for SEO and statistics maniacs who want to see accurate, up-to-date stats displayed in a straightforward, easy to understand manner.
18
+
19
+ The aim of WassUp is the timely knowledge of what your visitors do when they surf your site. It is not intended to show grouped statistics over preset, long-term time periods like visitors per month, pageviews per quarter, and so on (there are many others tools to better gain that, like Google Analytics). WassUp's flexible, easy-to-read views are the best for learning the details about your visitors' latest activities. With it's customizable filters and search capability, you can drill deeply into the data to learn even more about specific visitors, visitor types, etc.
20
+
21
+ ### Detailed Specs:
22
+ #### WassUp comes with 4 admin screen panels for viewing your visitors' activities and for customizing those views
23
+ * There is a fancy "Visitors Details" screen that lets you to see almost everything about your visitors and what they do on your site and that includes search capability, view filters, plus a chart and top stats summary.
24
+ * There is an ajax "Spy View" screen (like Digg Spy) that lets you monitor your visitors live, with optional geolocation on a Google!maps world map.
25
+ * There is a "Current Visitors Online" screen that shows a summary of your online visitors in real-time.
26
+ * There is an "Options" panel with lots of customizable settings for WassUp.
27
+
28
+ There is a nice Dashboard widget that shows a line chart of hits over time (24 hours default) and a count of current visitors online and their latest activities.
29
+
30
+ #### WassUp comes with two useful sidebar Widgets that lets you display your site's latest data to your visitors
31
+ * The "Online" widget shows counts of current visitors online and includes options to display logged-in usernames and country flags.
32
+ * The "Top Stats" widgets lets you display trending or timed top items about your site based on the latest stats. You can list top search engine keywords, top external referrers, top url requests, top articles, top browsers, top OSes, and more.
33
+ * The widgets are fully customizable.
34
+
35
+ #### WassUp's advanced tracking features can:
36
+ * Distinguish registered users from anonymous visitors, and administrators from other registered users.
37
+ * Identify and label new browsers, robots, and feed readers, heuristically.
38
+ * Track page requests that generate 404 (not found) redirects.
39
+ * Detect some spiders that pretend to be regular visitors/browsers.
40
+ * Expose spam and malware activity such as hack attempts, script injection, and xss exploit attempts.¹
41
+
42
+ WassUp works with two anti-spam functions to detect and omit (if you want) referrers spammers and comment spammers. It can also detect and omit malware activity such as unauthorized users' login attempts, script injection, and xss exploit attempts.
43
+
44
+ For people with database size limitations, WassUp has a few options to manage the database table growth: you can empty it; you can delete old records automatically; and you can set a warning notice for when it exceeds a preset size limit.
45
+
46
+ #### WassUp gives a detailed chronology of your hits with a lot of information for each single user session:
47
+ * ip / hostname
48
+ * referrer
49
+ * spider
50
+ * search engines used
51
+ * keywords
52
+ * SERP (search engine result page)
53
+ * operating system / language / browser
54
+ * pages viewed (chronologically and per user session)
55
+ * complete user agent
56
+ * name of user logged in
57
+ * name of comment's author
58
+ * spam and hack attempts
59
+
60
+ #### Wassup admin console has flexible view filters that show:
61
+ * records by time period
62
+ * record count per page
63
+ * records by entry type (spider, users logged in, comment authors, search engine, referrer)
64
+ * search by keyword
65
+ * expand/collapse informations (with ajax support)
66
+ * usage chart (Google!chart)
67
+ * top stats lists with aggregate data (top queries, requests, os, browsers)
68
+
69
+ #### There are many options to customize how WassUp tracks and displays data:
70
+ * Enable/Disable recording (tracking)
71
+ * Screen refresh frequency (minutes)
72
+ * Screen resolution (browser width)
73
+ * User permission levels
74
+ * Top stats selections
75
+ * Record or not logged-in users
76
+ * Record or not spiders and bots
77
+ * Record or not exploit attempts
78
+ * Record or not comment spammers
79
+ * Record or not referrer spammers
80
+ * registered users to exclude from recording
81
+ * IP or hostname to exclude from recording
82
+ * Email alert for table growth
83
+ * Auto delete of old records
84
+
85
+ ### IMPORTANT NOTICES
86
+ * To run Wassup in Wordpress 2.2 - 3.7, you must install the full copy of Wassup with backward-compatibility features available at [http://github.com/michelem09/wassup/](http://github.com/michelem09/wassup/)
87
+ * WassUp is incompatible with static page caching plugins such as "WP Super-Cache"
88
+ * ¹WassUp is NOT a security plugin. It does not block unwanted visitors nor protect your site from malware attempts. You need a separate security plugin for that
89
+
90
+ ## Screenshots
91
+ 1. Wassup - Visitor Details view.
92
+ 2. Wassup - SPY Visitors view.
93
+
94
+ You can find more screenshots at [http://www.wpwp.org](http://www.wpwp.org)
95
+
96
+ ## Installation
97
+
98
+ ### Installation
99
+ A. If your Wordpress setup is up-to-date, you can install this plugin automatically from Wordpress admin panel:
100
+ 1. Navigate to Plugins >> `Add New`
101
+ 2. Type "WassUp" plugin name in the "Search Plugins" box.
102
+ 3. Locate "Wassup Real-Time Analytics" and click `Install Now`
103
+ 4. Activate it and you are done!
104
+
105
+ B. If you prefer to install the plugin manually or you are running an older version of Wordpress, download the latest full release of WassUp (Real-Time Analytics) plugin directly from [gitHub.com/michelem09/wassup/releases/](https://github.com/michelem09/wassup/releases/) and save onto your local computer
106
+
107
+ * If available, use Wordpress' `Upload Plugin` option in the plugins panel to complete your install:
108
+ 1. Navigate to Plugins panel >> `Add New` >> `Upload Plugin`
109
+ 2. Click `Browse`, then find and select the plugin zip file that you downloaded
110
+ 3. Click `Install Now`
111
+ 4. Activate WassUp plugin and you are done!
112
+
113
+ * Otherwise, unpack the plugin's zip or gz file with your preferred unzip/untar program or use the command line: `tar xzvf wassup.tar.gz` (linux), then follow these steps to complete your install:
114
+ 1. Upload the entire "wassup" folder into your `/wp-content/plugins` directory on your Wordpress host using their Cpanel File manager or an ftp client software
115
+ 2. Login to Wordpress admin panel and navigate to Plugins page
116
+ 3. Activate WassUp plugin and you are done!
117
+
118
+ -----
119
+ ### Upgrading**
120
+
121
+ Check your current visitors count under WassUp >>Current Visitors Online panel. If your site is busy, STOP! Don't upgrade. Wait until there are no visitors or follow the "Safe Upgrade Instructions" below.
122
+
123
+ A. If your Wordpress setup is up-to-date, you can upgrade this plugin automatically from Wordpress admin panel:
124
+
125
+ 1. Navigate to "Plugins" page, and under WassUp plugin name, click the `Update Now` link.
126
+
127
+ B. If you prefer to manually upgrade OR you are running an older version of Wordpress, follow these instructions:
128
+
129
+ 1. Deactivate WassUp plugin under Wordpress admin panel >>Plugins page
130
+ 2. Manually delete the "wassup" folder from your plugins directory (`/wp-content/plugins/`) on your Wordpress host using their CPanel File manager or with an ftp client software. Do NOT click the `delete` link in Wordpress.
131
+ 3. Download the latest full release of Wassup Real-Time Analytics directly from [gitHub.com/michelem09/wassup/releases/](https://github.com/michelem09/wassup/releases/) and save onto your local computer.
132
+ 4. Then follow the manual install instructions in section B:i-iv above.
133
+
134
+
135
+ ### **IMPORTANT Safe Upgrade Instructions
136
+
137
+ To safely upgrade WassUp when your site is busy, you must manually stop visitor recording beforehand, do the upgrade, then manually resume recording afterwards:
138
+
139
+ 1. In WordPress admin panel, navigate to WassUp >>Options >>[Genernal Setup] tab. Uncheck the box for "Enable statistics recording" and save.
140
+ 1. Navigate to Plugins page and click the "Update Now" link under "WassUp" plugin name or follow the manual upgrade instructions above
141
+ 1. After the upgrade is done, go back to WassUp >>Options >>[General Setup] tab, and check the box for "Enable statistics recording" and save.
142
+
143
+ ### Usage
144
+ When you activate this plugin (as described in "Installation"), it works "as is". You don't have anything to do. Wait for visitors to hit your site and start seeing details (click the dashboard and go to WassUp page)
145
+
146
+ ### Compatibility Notice
147
+ * WassUp is incompatible with the following static page caching plugins: WP Super Cache, WP Cache, and WP Hyper Cache.
148
+
149
+
150
+ ## Upgrade Notice
151
+
152
+ ### v1.9.1
153
+ * Critical security, compatibility and bugfix upgrade.
154
+ 64MB memory is now required for Wassup! See [codex document "Editing wp-config.php"](https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP) to increase memory allocated to Wordpress before upgrading.
155
+ DO NOT UPGRADE when your site busy! Read [installation instructions](http://wordpress.org/plugins/wassup/installation/) for safe upgrade instructions.
156
+
157
+ ## Changelog
158
+ ### v1.9.1: Critical security, compatibility, and bugfix upgrade
159
+ * patched security loopholes (xss vulnerability) in the 'Top stats' widget and in `wassupURI::add_siteurl` method
160
+ * revised plugin code to improve prevention of XSS attacks via it's interface and widgets
161
+ * revised plugin code to comply with the latest requirements for inclusion in Wordpress.org plugin repository
162
+ * revised 'readme.txt' to comply with Wordpress.org plugin repository guidelines.
163
+ * new module, 'wassupadmin.php' for WassUp admin panels and dashboard widget
164
+ * new module, 'compatibility.php' to check for Wordpress and PHP compatibility and to load compatibility modules from `/lib/compat-lib/` subfolder when available
165
+ * removed backward compatibility folder, modules, and javascripts from Wordpress's copy of Wassup package to comply with Wordpress plugin repository requirements.
166
+ Wassup's backward-compatibility feature remains in the full copy of Wassup available at [http://github.com/michelem09/wassup/](http://github.com/michelem09/wassup/)
167
+ * removed obsolete files 'badhosts.txt', 'badhosts-intl.txt'
168
+ * updated Google!Maps API link to use a common API key for Wassup-Spy (required by Google since 2016-06-22).
169
+ * updated WassUp 'wp-cron' scheduled tasks to terminate (and restart) at reset-to-default, recording stop/start, and at plugin deactivate/reactivate events.
170
+ * updated Wassup table export to omit all known spam/malware records from export by default...to avoid propagation of malware code when exported records are imported into other applications.
171
+ * updated `wassup_Akismet` class to abort remote requests with timeout error after 5 seconds to avoid plugin slowdown due to slow server response.
172
+ * updated 'UADetector' and 'wDetector' classes to improve browser and os detection (Microsoft Edge, Win10).
173
+ * updated translation template, 'wassup.pot'.
174
+ * fixed problem with login page hits not being recorded.
175
+ * fixed errors caused by disabled 'set_time_limit' function in some configurations.
176
+ * fixed a 'preg_match' error that affected 404 and spam detection.
177
+ * fixed a "script timeout" calculation/test error in Visitor-details.
178
+ * fixed incorrect Wassup menu "href" values in network admin panels.
179
+ * fixed a MySQL timezone/offset calculation error in some queries.
180
+ * fixed a scheduled task validation error that caused some wp-cron tasks to fail.
181
+ * miscellaneous minor bugfixes.
182
+ * miscellaneous minor text changes
183
+ * minor css changes for small screen devices.
184
+
185
+ ### v1.9: Important compatibility and feature improvement upgrade.
186
+ * new caching of MySQL expensive queries to improve plugin performance
187
+ * new options for improved MySQL table management
188
+ * new multisite network compatibility feature added
189
+ * new and improved aside widgets with multi-widget capability
190
+ * new tracking filters to exclude some automated requests and to add wildcard filtering by hostnames and ip
191
+ * new "FAQ" and "Donate" panels in Wassup-Options submenu
192
+ * new "top stats" popup-window in Visitor Details panel
193
+ * updated code for Wordpress 4.x, PHP 5.6-mysqli compatibility, and Akismet 3.0 plugin compatibility
194
+ * updated plugin security with more input validation, deprecated functions removal, and escaped output
195
+ * updated javascripts libraries, `jquery.js`,`jquery-ui.js` and added jquery-migrate.js and wassup.js
196
+ * updated css and validated as 100% W3C CSS3 compliant
197
+ * updated browser and os detection for new agents (Win10)
198
+ * updated translation template (wassup.pot)
199
+ * updated "readme.txt"
200
+ * fixed search engine referrer data to substitute "not provided" for missing keywords from secure searches (https-to-http omission)
201
+ * fixed a fatal error in Wassup-options caused by disabled PHP functions in some host configurations
202
+ * fixed a bug in Wassup-options that caused table export to fail
203
+ * fixed an activation failure problem in `upgrade.php` that occurred in some host configurations
204
+ * 3 new classes added to code: `wassupDb` for MySQL table operations and caching, `wassupURI` to format and clean urls/links for safe output, and `Wassup_Widget` a base widget for building Wassup widgets
205
+ * minor text changes
206
+ * minor bugfixes
207
+
208
+ ### v1.8.6
209
+ * Removed deprecated Wordpress methods, minor text changes.
210
+
211
+ ### v1.8.5
212
+ * Changes to GEOIP API for Map geolocation, minor CSS changes.
213
+
214
+ ### v1.8.4
215
+ * Migrated to Google Maps API v3
216
+ * New locales: English (United Kingdom) [complete], Persian [partial], Sinhalese [partial], Vietnamese [partial]
217
+ * New donate button in WassUp menu
218
+ * fixed CSS for WassUp menu.
219
+
220
+ ### v1.8.3.1
221
+ * Security fix for xss attempts via useragent string.
222
+
223
+ ### v1.8.3
224
+ * bugfixes, improved tracking, changes for Wordpress compatibility.
225
+
226
+ ### v1.8.2
227
+ * bugfixes, improved browser/agent detection.
228
+
229
+ ### v1.8.1
230
+ * bugfix and minor changes.
231
+
232
+ ### v1.8: Important feature improvement upgrade.
233
+ * new table `wassup_meta` for caching and stats collection.
234
+ * new admin interface style.
235
+ * new GEOIP API [freegeoip.net](http://freegeoip.net) for map geolocation in SPY view. Thanks to [@AlexandreFiori](http://twitter.com/alexandrefiori) for giving us access to his API.
236
+ * bugfixes, security fixes, and changes for Wordpress compatibility.
237
+
238
+
239
+ ## Infos
240
+ ### Plugin Home
241
+ * [http://www.wpwp.org](http://www.wpwp.org "http://www.wpwp.org")
242
+
243
+ ### Plugin Development
244
+ * For pre-release bugfixes and other changes to WassUp, you can download the development version of Wassup from GitHub:
245
+ [https://github.com/michelem09/wassup](https://github.com/michelem09/wassup "https://github.com/michelem09/wassup")
246
+ * For the latest browsers, os, and spider detection updates, you can download the `uadetector.class.php` module separately on GitHub:
247
+ [https://github.com/hdunk/uadetector.class.php](https://github.com/hdunk/uadetector.class.php "https://github.com/hdunk/uadetector.class.php")
248
+
249
+ ### Developers Home
250
+ * Michele M: [http://www.michelem.org](http://www.michelem.org "http://www.michelem.org")
251
+ * Helene D: [http://helenesit.com](http://helenesit.com "http://helenesit.com")
252
+
253
+ ### Credits
254
+ * [Jquery](http://www.jquery.com) for the amazing Ajax framework
255
+ * [FAMFAMFAM](http://www.famfamfam.com/) for the flags icons
256
+ * Thanks to [@AlexandreFiori](http://twitter.com/alexandrefiori) for access to his GeoIP API at [freegeoip.net](http://freegeoip.net)
257
+ * A big thanks to [Helene D.](http://helenesit.com/) for her help to improve WassUp!
badhosts-intl.txt DELETED
@@ -1,347 +0,0 @@
1
- /**
2
- * known referrer spammer domains with 2-digit TLDS and in regex format.
3
- *
4
- * @package WassUp Real-time Analytics
5
- * @subpackage badhosts-intl.txt module
6
- */
7
- 111odfuod\.us
8
- 111ouroue\.us
9
- 1ead1ead\.us
10
- 1owinterest\.us
11
- 24h\.to
12
- 88\.to
13
- 88dns\.cn
14
- [a-z]+19[0-9]{2}\.co\.cc
15
- a\-team\.com\.sg
16
- a1car\.com\.sg
17
- aa0ru08\.us
18
- abe8748biz\.us
19
- abjuration2appaloosa\.us
20
- abv\.bg
21
- accessibly4168pi11\.us
22
- actualize2achy\.us
23
- adrugstoreandmore\.us
24
- advantagedrugstore\.us
25
- aelefa\.us
26
- aenf55\.neoplus\.adsl\.tpnet\.pl
27
- affinitydrugstores\.us
28
- affordable\-drugstore\.us
29
- agents\.com\.sg
30
- aghous\.us
31
- aghoyoe\.us
32
- aghtus\.us
33
- aheueiooo\.cn
34
- alitalia9689pi11\.us
35
- antipuff\.nom\.br
36
- aopdufo\.us
37
- aosotue\.us
38
- aphrodite1260rx\.us
39
- argaaa\.cn
40
- artmedia\.com\.ru
41
- asiabizhub\.com\.sg
42
- asiamobile\.tk
43
- aslsdfi\.bi
44
- asoutoe\.us
45
- asperse6bak\.us
46
- assenting4762pill\.us
47
- at\.cx
48
- atoelujd\.us
49
- atoerul\.us
50
- atouel\.us
51
- attendee9327tads\.us
52
- aurelius\.co\.uk
53
- axing5875pi11s\.us
54
- banikay\.hk
55
- barraca\.us
56
- barscan\.com\.sg
57
- base191tads\.us
58
- basicgentle\.cn
59
- bayanbag\.tk
60
- bazaprac\.pl
61
- bb03480\.us
62
- bb30480\.us
63
- bcgroup\.com\.sg
64
- bestratesnow\.us
65
- beyonder\.co\.uk
66
- bio3532\.us
67
- biocel\.us
68
- bizzy1\.tk
69
- bluebarz\.us
70
- bluehorizon\.com\.sg
71
- bluvoice\.com\.sg
72
- bookntravel\.com\.sg
73
- bowman8103drug\.us
74
- bridegroom6963rx\.us
75
- broadcastemail\.us
76
- buy\-herbal\.us
77
- buythebest\.us
78
- cacert\.nl
79
- callcentrenews\.com\.au
80
- candytech\.com\.tw
81
- caraway307biz\.us
82
- careerjet\.com\.au
83
- carlz\.us
84
- cartsite\.us
85
- cheapchristianlouboutins\.us
86
- cheapermortgage\.cn
87
- choice\-funds\.us
88
- clan\.ws
89
- classear\.cn
90
- clients\.your\-server\.de
91
- cmachina\.cn
92
- coleman\.edu\.sg
93
- com\-yahoo\.com\.ph
94
- coolcool\.us
95
- cornmany\.cn
96
- countess8253tads\.us
97
- courtly4086rx\.us
98
- craigz\.us
99
- cricket6735drugs\.us
100
- crocistheking\.us
101
- customerservice\.com\.au
102
- d\-square\.com\.sg
103
- d4f\.de
104
- de\.tc
105
- deux\.fr
106
- dfsdsdf\.cc
107
- digi\.ws
108
- directwife\.cn
109
- disneyland1937pill\.us
110
- dubnh\.us
111
- duunot\.eu
112
- east\.net\.cn
113
- easy\-herbal\.us
114
- edificagrowth\.tc
115
- eflair\.com\.sg
116
- eledlfj\.us
117
- emailbroadcast\.us
118
- especiallylove\.cn
119
- eu\.cx
120
- flonosoft\.eu
121
- foetus4647rx\.us
122
- forgivable8459biz\.us
123
- fractionfield\.cn
124
- fragmenty\.masternet\.pl
125
- frankly8033pi11s\.us
126
- freesexonthewebs\.bz
127
- freewarechannel\.de
128
- fundingdeport\.co\.gy
129
- fundingmort\.us
130
- furrier550rneds\.us
131
- fycluse\.cn
132
- g\-d\-w\.tv
133
- gainprosite\.tc
134
- gallicism2795biz\.us
135
- garvi\.com\.br
136
- gesture9403tads\.us
137
- ghkp\.us
138
- globalvoice\.com\.sg
139
- gogo\.com\.tw
140
- gokgle\.us
141
- goodway\.com\.sg
142
- great\-herb\.us
143
- great\-stuff\.us
144
- gtrrrez\.us
145
- guaranapureza\.us
146
- guidefamily\.cn
147
- h\-1.+\.cssgroup\.lv
148
- harsh8isobit\.us
149
- healthproducts\.bz
150
- helllobay\.ch
151
- herbalmart\.us
152
- here\.ws
153
- hfgr33\.us
154
- him\.com\.sg
155
- hisbefore\.cn
156
- hope\-to\-get\-laid\.us
157
- hu\.tc
158
- ibogleif\.dk
159
- idv\.tc
160
- idv\.tw
161
- ilink\.to
162
- imedo\.hk
163
- inbox\.lv
164
- info\-tech\.com\.sg
165
- intendant491pills\.us
166
- internetcars\.com\.sg
167
- involute6538drygs\.us
168
- isdrin\.de
169
- jia\.com\.sg
170
- jixx\.de
171
- jody\-fustini\.it
172
- joke1903meds\.us
173
- js4\.de
174
- juan7steno\.us
175
- kimo\.com\.tw
176
- knowthyself\.com\.sg
177
- korkd\.cn
178
- kpth\.us
179
- levin\.hk
180
- lifemedien\.de
181
- lifesaver5subitem\.us
182
- lineout\.pl
183
- lists\.com\.sg
184
- livemarket\.com\.ua
185
- looking\-to\-get\-laid\.us
186
- looktruck\.cn
187
- luia\.ru
188
- mafer\.hk
189
- manhole4962biz\.us
190
- manifesto8098tads\.us
191
- mantilla7896rx\.us
192
- maron\.hk
193
- meantlot\.cn
194
- medcity\.ws
195
- messagemanager\.com\.au
196
- microhertz\.com\.sg
197
- milkpose\.cn
198
- mitglied\.lycos\.de
199
- mothernoun\.cn
200
- mt\.st
201
- mtgdefault\.us
202
- multimed\.ws
203
- murmur3unboiled\.us
204
- my\-pills\.be
205
- narrowly9558pi11\.us
206
- net\-salez\.us
207
- newhorizons\.com\.sg
208
- newportcorp\.cn
209
- news4all\.pl
210
- nextcars\.net
211
- ni\.com\.au
212
- ninemilk\.cn
213
- nlp\-transform\.com\.sg
214
- nocensor\.to
215
- nom\.br
216
- nonews\.ru
217
- noticestring\.cn
218
- nrtas\.hk
219
- ns\-dois\.us
220
- ns\-quatro\.us
221
- nsa\.com\.sg
222
- nude7755pi11s\.us
223
- o2\.ie
224
- ocsc\.com\.sg
225
- oil\-bank\.ru
226
- oma\-chat\-live\.de
227
- omnisoft\.ws
228
- onet\.pl
229
- online\.cx
230
- online\-pills\.us
231
- onlinerussianbrides\.cn
232
- oombu\.hk
233
- openz\.us
234
- optimax\.com\.sg
235
- optin2millions\.us
236
- ourmagicbox\.tv
237
- outgoing9256pi11s\.us
238
- oz\.com\.sg
239
- p\.cx
240
- pacificpaper\.com\.sg
241
- packsite\.us
242
- pantropic\.com\.sg
243
- papasite\.us
244
- paperhis\.cn
245
- patronizer6687tads\.us
246
- pc\-games\-10\.de
247
- pekingtrail\.com\.ph
248
- penumbral7470drugs\.us
249
- phonehome\.com\.sg
250
- pillsdoc\.us
251
- pluckz\.us
252
- poker\-review\.tk
253
- polsurvey\.com\.sg
254
- pornobesto\.ru
255
- practiceled\.cn
256
- prado29\.us
257
- presentindicate\.cn
258
- pressemitteilung\.ws
259
- prestigeoffice\.com\.sg
260
- primness6560nx\.us
261
- prism1115dryg\.us
262
- prix\.fr
263
- processhad\.cn
264
- professor\.com\.sg
265
- promote9796drug\.us
266
- propulsion3417drug\.us
267
- provable6567pi11\.us
268
- przezorni\.civ\.pl
269
- pssp\.com\.cn
270
- puddle2\.us
271
- puling7796meds\.us
272
- pushtime\.cn
273
- puzzc\.cn
274
- qts7851drygs\.us
275
- qua5hmm\.us
276
- quickclick\.com\.sg
277
- quint997meds\.us
278
- rabbet5073tabs\.us
279
- raildv\.cn
280
- railod\.cn
281
- railtr\.cn
282
- rami8allelic\.us
283
- randomness3999pi11\.us
284
- ranked3bandana\.us
285
- rates4unow\.us
286
- readingpower\.com\.sg
287
- reassess837rx\.us
288
- recherche\.fr
289
- recruitu\.to
290
- red\-black\.ru
291
- redrawing5984biz\.us
292
- referral9466pill\.us
293
- remake9252tabs\.us
294
- removes\-here\.com\.ar
295
- rhubarb454rneds\.us
296
- rulen\.de
297
- samaengineering\.com\.pk
298
- saver9straight\.us
299
- scout\.org\.tw
300
- scrapbook3383meds\.us
301
- sensownie\.edu\.pl
302
- servsite\.us
303
- sevrre\.co
304
- sexcam\-girls\.at
305
- shop\.tc
306
- shopin\.to
307
- shrink\.ws
308
- siamesefins\.com\.sg
309
- sina\.com\.cn
310
- skysofta\.cn
311
- slimdoctor\.ru
312
- sminet\.com\.my
313
- smuuchi\.hk
314
- snap\.to
315
- socratestheme\.me
316
- sp\.st
317
- squareskin\.cn
318
- start\.bg
319
- statysta\.ionic\.pl
320
- stesa\.com\.sg
321
- surepass\.com\.sg
322
- syphilitic1illustrate\.us
323
- talonet\.it
324
- tanieculicy\.pl
325
- target\.sg
326
- telcall\.com\.au
327
- terra\.es
328
- thoughteach\.cn
329
- top100\.ro
330
- topsitez\.us
331
- tr\.cx
332
- uggs\-for\-sale\.us
333
- uol\.com\.br
334
- up\.com\.sg
335
- us\.tc
336
- v56yu8rt\.ph
337
- web\-ip\.de
338
- webholder\.pl
339
- website\.ws
340
- wetrack\.it
341
- wholegrew\.cn
342
- wholesalelobster\.ca
343
- withpoem\.cn
344
- wonderdrug\.ws
345
- wycinki\.iswift\.eu
346
- x67fr22v\.ph
347
- xer\.com\.au
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
badhosts.txt DELETED
@@ -1,1707 +0,0 @@
1
- /**
2
- * known referrer spammer domains in regex format.
3
- *
4
- * @package WassUp Real-time Analytics
5
- * @subpackage badhosts.txt module
6
- */
7
- 0k0k\.net
8
- 0riginals\.net
9
- 1010101010\.biz
10
- 123666123\.com
11
- 123bargain\.net
12
- 123getit\.com
13
- 123getnow\.com
14
- 123hammertime\.biz
15
- 123refinancing\.net
16
- 123rxmeds\.biz
17
- 123store\.biz
18
- 12freehost\.com
19
- 163\.com
20
- 1clickagency\.info
21
- 1clickave\.info
22
- 1clickholdem\.com
23
- 1gaminghub\.com
24
- 1homebusinesshub\.com
25
- 1ps\.biz
26
- 1saving\.(com|net)
27
- 1stemperor\.com
28
- 1stopgallery\.info
29
- 1stopnet\.info
30
- 22cn\.com
31
- 23run\.biz
32
- 247systems\.info
33
- 2911\.net
34
- 2rate\.com
35
- 2y\.net
36
- 3\-m\-n\.com
37
- 300[0-9]hosting\.com
38
- 3322\.org
39
- 3kserver8\.com
40
- 3newmail\.com
41
- 3xcom\.net
42
- 4all\-credit\.com
43
- 4all\-prescription\.com
44
- 4drugs123\.com
45
- 4rate\.net
46
- 4t\.com
47
- 4u\-money\.com
48
- 4u\.net
49
- 4u\.com
50
- 5discountdays\.info
51
- 6mg\.net
52
- 6not\.com
53
- 6q\.org
54
- [89]00[0-9]hosting\.com
55
- 859fs\.com
56
- 888\-luvu\.com
57
- 95777\.com
58
- a\-pills\.(com|net)
59
- a\-promotion\.com
60
- a\-z\-soft\.info
61
- a8k\.net
62
- aahtech\.com
63
- aaiy\.com
64
- aamedical\.net
65
- abandonedlove\.com
66
- abetterfutureforyou\.com
67
- about\-finance\.com
68
- about\-islam\.org
69
- about\-money\.info
70
- aboutstamina\.com
71
- abuddysetyouup\.com
72
- accesskl\.com
73
- ace\-host\.org
74
- achapeloflove\.com
75
- achievebetter\.com
76
- achucklehead\.com
77
- acidprint\.com
78
- aclum\.com
79
- actionmedsupply\.com
80
- addynamix\.com
81
- adipren1[0-9]\.com
82
- admanmail\.com
83
- adultactioncam\.com
84
- adultactioncash\.com
85
- adultmegacash\.com
86
- advertising\.com
87
- aerhaethjsry\.com
88
- aeterna\-tech\.com
89
- afdb\.org
90
- afeet\.com
91
- affordablerolex\.net
92
- afteryousubmit\.com
93
- agelessliving\.biz
94
- ahilles\.com
95
- ahmort\.(com|net)
96
- ahomelender\.com
97
- aidemail\.net
98
- aimtrust\.com
99
- akella\.biz
100
- akmort\.net
101
- alansis\.com
102
- all\-lasik\-centers\.com
103
- allaboutfatloss\.com
104
- allbestprice\.info
105
- allbigcocks\.com
106
- alleghanyeda\.com
107
- allflash\.net
108
- allforhealth\.info
109
- allinfohere\.info
110
- allinternal\.com
111
- allisonroyce\.com
112
- allmymovies\.biz
113
- allpassports\.com
114
- allpharmaonline\.com
115
- allthemeds\.info
116
- allthesoft\.(info|org)
117
- allyourmeds\.net
118
- aloanprocess\.com
119
- alohacasino\.biz
120
- alreadyestablished\.com
121
- always\-casino\.com
122
- always\-credit\.com
123
- amason\.info
124
- amateurvoetbal\.net
125
- ambein\.net
126
- america\-loans\.net
127
- american\-insurance\-companies\.com
128
- american\-loans\.org
129
- americangreetings\.com
130
- amhang\.com
131
- amipregnantquizzes\.com
132
- amomentlikethisagain\.com
133
- amtradebiz\.com
134
- andthen\.info
135
- andrewsaluk\.com
136
- andipink\.com
137
- andysreviews\.com
138
- angellenders\.com
139
- annualised\.net
140
- antiaging\.com
141
- antiagingcure\.com
142
- antiquemarketplace\.net
143
- antispysoft2005\.com
144
- apcotinternational\.com
145
- approved\-loans\.net
146
- articlemarketingrobots\.org
147
- artsmallforsenate\.com
148
- asdce\.com
149
- asstraffic\.com
150
- astromagia\.info
151
- atlanticclub\.net
152
- attentionhotties\.com
153
- attiring\.com
154
- aujobs\.net
155
- auniv\.com
156
- aussieoffers\.com
157
- autoknivesnow\.com
158
- available\-casino\.com
159
- available\-credit\.com
160
- available\-prescription\.com
161
- availableonlyonline\.com
162
- Avanti\.net
163
- awayoutofdebtfast\.com
164
- axionfootwear\.com
165
- azogle\.com
166
- b3tterh3alth\.com
167
- b7x\.net
168
- b888\.info
169
- baba\-song\.com
170
- baby\-kleidung\.runashop\.com
171
- baby30\.com
172
- babz\.info
173
- backpackgirl\.com
174
- bahbah\.info
175
- bananarepublic\.com
176
- bangmatch\.com
177
- bangthem\.com
178
- bankgeld\.com
179
- bankir\.info
180
- bantaloh\.net
181
- barnyardteenies\.com
182
- base\-poker\.com
183
- basedn\.com
184
- bayfronthomes\.net
185
- bbahostcity\.com
186
- bbbrx\.org
187
- be\-young\.com
188
- beachvitality\.com
189
- beatrxbillz\.com
190
- beautifulpants\.com
191
- beill\.com
192
- bellevuehomes\.net
193
- best\-bio\.com
194
- best\-oem\-sellers\.biz
195
- bestbuyreplicas\.com
196
- bestdrugsonline\.net
197
- bestexpressrx\.com
198
- bestformen\.info
199
- bestforyou\.biz
200
- bestlowrate\.com
201
- bestonthenet\.biz
202
- bestpills\.info
203
- bestpractical\.com
204
- bestqualityinfo\.com
205
- bestspecials\.biz
206
- bestvabiz\.com
207
- bestvalueit\.com
208
- bestwatches\.(info|net)
209
- bestyourpills\.com
210
- betterfuturetoday\.com
211
- betterhealth\.biz
212
- betterservice\.info
213
- beud\.com
214
- red\.bezeqint\.net
215
- bhex\.com
216
- bibles\.com
217
- big2bigger\.com
218
- bigcocksex\.com
219
- bigsitecity\.com
220
- billionaireboysclub\.info
221
- bimonthly\.org
222
- bitlocker\.net
223
- bkmark\.com
224
- bkndr\.com
225
- black\-poker\.com
226
- blackhistoryquiz\.com
227
- blah\-rx\.com
228
- blankmaven\.com
229
- blazinwebtraffic\.com
230
- blest\-money\.com
231
- bloggingtomakemoney\.net
232
- blueberryvitamin\.com
233
- bluebroom\.com
234
- bluedolphin\.com
235
- bluemountain\.com
236
- bluerockdove\.com
237
- bnik\.com
238
- boatrx\.net
239
- bonewrench\.com
240
- bonxie\.com
241
- bounding\.net
242
- bovanno\.org
243
- boxings\.net
244
- boysfirsttime\.com
245
- bp9\.net
246
- br1lliant\.(com|net)
247
- braccoteam\.com
248
- brachia\.com
249
- brandcontent\.com
250
- brandedwatches\.info
251
- breccias\.com
252
- brehault\.net
253
- bridgemailsystem\.com
254
- brightgame\.com
255
- brightonrs\.com
256
- brilliantmoney\.com
257
- broadcastadvertise\.org
258
- broadcastemailingtoday\.biz
259
- brutalblowjobs\.com
260
- bservicesp\.com
261
- budgethawaii\.net
262
- bumphero\.com
263
- businesswire\.com
264
- butidoloveyou\.com
265
- buy\-2005\.com
266
- buy\-hgh\-human\-growth\-hormone\.net
267
- buy\-n\-shoot\.com
268
- buyherbalsonline\.com
269
- buysea\.com
270
- bvlgarl\.com
271
- bwdow\.com
272
- c\-f\-1\.com
273
- c\-u\-i\.com
274
- c0ok\.com
275
- c0py\.com
276
- c1tracking\.com
277
- ca\-america\.com
278
- ca\-t\.com
279
- cabledescrambler\.com
280
- cafexml\.com
281
- cahla\.com
282
- callcenterdemo\.com
283
- callcentertoday\.com
284
- callin\.net
285
- calvarypress\.com
286
- camdenliving\.com
287
- cameralover\.net
288
- camfun24\.
289
- camgirlslive\.com
290
- camgirlz\.com
291
- cancelnow\.info
292
- candidhosting\.com
293
- candiria\.com
294
- candrugs\.info
295
- candypersonal\.com
296
- capillarychromatogr\.org
297
- capstonemortgage\.info
298
- capturehost\.com
299
- carcases\.net
300
- careerbooster\.info
301
- carlson\.info
302
- cartler\.com
303
- cash\-2u\.com
304
- cash\-?advance
305
- cash\-?money
306
- cash\-world\.biz
307
- cashflowclub\.org
308
- cashring\.com
309
- casino\-500\.com
310
- casino\-bu\.com
311
- casinos4spain\.com
312
- casiono\.info
313
- caughtcatching\.com
314
- cbsdfowef\.info
315
- ccbn\.com
316
- ccdemo\.com
317
- cchaos\.com
318
- cd\-forever\.info
319
- cdatlow\.com
320
- centerhealthinfo\.com
321
- centralremovalservice\.com
322
- cfak\.com
323
- chain\-mail\.net
324
- changeyourlifeforever\.biz
325
- charmedbeauty\.com
326
- charstnd\.com
327
- chat\-nett\.com
328
- cheapdrugsplus\.com
329
- cheaperoffer\.com
330
- cheaping\.net
331
- cheapoemsoft\.info
332
- cheapsoftshop\.com
333
- cheapwarehousemeds\.com
334
- cheapwatches\.biz
335
- cheapwindows\.info
336
- cheat\-elite\.com
337
- cheating\-?wives
338
- chemsymphony\.com
339
- childevaders\.com
340
- childlearning\.biz
341
- chile\-online\.com
342
- chillblow\.com
343
- chillsunday\.com
344
- chilltoday\.com
345
- chillypeppers\.biz
346
- chinajute\.com
347
- chinaour\.com
348
- chlending\.com
349
- chooseyourwatch4u\.(com|net)
350
- chorally\.com
351
- christian\-?dating
352
- cialagen\.biz
353
- cialis\-gl\-pills.com
354
- citizensbank\.com
355
- city\-guide\.com
356
- ckmark\.com
357
- cleverfinance\.info
358
- click2out\.com
359
- click4hotgirls\.com
360
- clickforsales\.com
361
- clicktraq\.com
362
- clickzs\.com
363
- clinicsingapore\.com
364
- clodly\.com
365
- clubshop\.com
366
- cmaholdings\.com
367
- cmik\.com
368
- cminteractive\.com
369
- cmpevents\.com
370
- cn4e\.com
371
- cnacom\.com
372
- cnbearing\.biz
373
- cnhptz\.com
374
- cnmhjdsu\.com
375
- codns\.com
376
- codychesnutt\.com
377
- coffeecup\.com
378
- collegefuckfest\.com
379
- college\-scholarships\.com
380
- com\.info
381
- compare\-lenders\.net
382
- competentbank\.com
383
- compforme\.com
384
- computercup\.com
385
- conecrusher\.org
386
- confuting\.com
387
- connectjokes\.com
388
- connoting\.com
389
- consumer\-loans\.net
390
- consumerincentivepromotions\.com
391
- contactprofessional\.com
392
- continentaltirebowl\.com
393
- cool\-extreme\.com
394
- coolfreepages\.com
395
- coolhealth\.info
396
- coolpharma\.com
397
- coolresource\.com
398
- computerxchange\.com
399
- conjuratia\.com
400
- coreoneon\.org
401
- corefiles\.com
402
- corpique\.com
403
- corporate\-ir\.net
404
- corporatequote\.com
405
- coresat\.com
406
- cr3am\.com
407
- cr3at3\.com
408
- cream\-?pies.*
409
- creamy\-facials\.com
410
- crescentarian\.net
411
- credit\-4me\.com
412
- credit\-dreams\.com
413
- crossdaily\.com
414
- crvalues\.com
415
- cs\.com
416
- cttrk\.com
417
- cumbly\.com
418
- cupring\.com
419
- cups\.cs\.cmu\.edu
420
- curdle\.net
421
- cutprice11\.com
422
- cutpricerxpills\.com
423
- cutthepayment\.com
424
- cvgf\.com
425
- cvvbb\.com
426
- cynergyasia\.com
427
- dahl\.biz
428
- dailyfill\.com
429
- dailyherbals\.com
430
- dailysoft\.(biz|info)
431
- daisysnail\.com
432
- datashaping\.com
433
- date\-?jump\.com
434
- datesaturday\.com
435
- dating\-s\.net
436
- dating\-?christian.*
437
- dating\.blogs\.com
438
- datinggoldengirls.com
439
- datingoffers\.com
440
- datingwebsiteemail\.info
441
- dawncities\.com
442
- day2daybymail\.biz
443
- deafinformation\.com
444
- dealloan\.info
445
- dealzonthenet\.com
446
- debtal\.com
447
- debteraserpro\.com
448
- deepsubject\.com
449
- deirhaus\.com
450
- delivfast\.com
451
- dementia\.biz
452
- depletive\.com
453
- deskhelp\.info
454
- devaddict\.com
455
- dfgsgs\.info
456
- dfpcn\.com
457
- dgko\.com
458
- dhghost\.net
459
- dhomeinsurance\.com
460
- diarrhoeal\.com
461
- diazmovie\.com
462
- diet[0345]{2}\.com
463
- dietfacts\.com
464
- digxdigx\.com
465
- dimur\.com
466
- diplender\.com
467
- discountbuyers\.net
468
- discounted\-inks\.com
469
- discountherbals\.com
470
- discountloan\.info
471
- discountrx4u\.info
472
- discoverdownloads\.com
473
- discrete\-?encounters.*
474
- dishtvforpc\.com
475
- dkdns\.com
476
- dna\.info
477
- dock1\.com
478
- doctor\.com
479
- doctor\-here\.com
480
- doctor\-test\.com
481
- doctorconsult\.info
482
- doctorproof\.com
483
- dojobs\.net
484
- dollarmachine\.com
485
- domainfactory\.com
486
- domainprogram\.com
487
- domainsforeveryone\.com
488
- domainsforpeople\.com
489
- domainsultan\.com
490
- donehernow\.com
491
- doobu\.com
492
- doubleclick\.net
493
- download\-central\.com
494
- downloadnow\.biz
495
- downloadsupercenter\.com
496
- dq03\.net
497
- drdatinsukia\.org
498
- dreamreplicas\.com
499
- drizzlier\.com
500
- droopiest\.com
501
- dropsofjupiter\.info
502
- drugsquads\.com
503
- drugstore\.info
504
- drutheme\.com
505
- dumfounds\.com
506
- dvd\-copy\.com
507
- dvdsforpleasure\.com
508
- dvdsqueeze\.com
509
- dynamichealthpromotion\.com
510
- e\-hostzz\.com
511
- e65\.biz
512
- ealz\.com
513
- easy\-as\-1\-2\-3\.com
514
- easy\-finances\.net
515
- easy\-mortgages\.info
516
- easydatingoffers\.com
517
- easyoffers\.biz
518
- easysavings\.net
519
- eaton\-inc\.com
520
- ebetterfuture\.com
521
- ebuyage\.com
522
- ebuypay\.com
523
- ebuytm\.com
524
- ecomomics\.net
525
- ecoquote\.com
526
- edfspace\.com
527
- edthompson\.com
528
- edyo\.com
529
- efficacies\.net
530
- eggscity\.info
531
- eglobal\.org
532
- el9\.net
533
- elenders\.biz
534
- elite\-pills\.com
535
- eloanlenders\.com
536
- eloanservices\.com
537
- elongates\.net
538
- emailcashpro\.com
539
- emaildeals\.biz
540
- emailremovals\.com
541
- emperorwatches\.com
542
- endosonic\.com
543
- engradas\.com
544
- enlargementmanual\.com
545
- enlargepills\.net
546
- entraads\.com
547
- entrefinance\.net
548
- envoyww\.com
549
- eowk\.info
550
- eparchy\.net
551
- epharmarcy\.com
552
- equard\.info
553
- erectionpills\.net
554
- eroticy\.com
555
- eslender\.com
556
- esmtp\.biz
557
- euro\-cscl\.org
558
- eurocasinomili\.com
559
- eurousd\.com
560
- evif\.com
561
- evolution\-x\.info
562
- ewholesaleloan\.com
563
- excellent1\.com
564
- exitq\.com
565
- exorcized\.net
566
- expertaide\.com
567
- extendit\.info
568
- extramed\.info
569
- extrasearches\.com
570
- eyou\.com
571
- ez\-refi\.net
572
- ezloans123\.net
573
- ezppv\.com
574
- ezul\.com
575
- ezyfinancial\.com
576
- faithweb\.com
577
- familymeds\.info
578
- famousreplicas\.com
579
- farmersfound\.com
580
- fassol\.org
581
- fast\-loanz\.com
582
- fasteasysolution\.com
583
- fastlenderz\.com
584
- fastslashmarket\.com
585
- fdav\.com
586
- fdun\.com
587
- fearlesstrading\.com
588
- feathersandfurvanlines\.com
589
- fgcdirect9\.com
590
- fickenfetzt\.com
591
- fidelityfunding\.net
592
- filmogenka\.com
593
- finalsavings\.com
594
- finance\-4all\.com
595
- financeadvise\.com
596
- financialfirms\.net
597
- findawoman\.net
598
- finder\-?adult.*
599
- finder\-?friend.*
600
- findfunhere\.com
601
- findtheoneonthissite\.com
602
- findwebhostingnow\.com
603
- fine\-women\.com
604
- finestrealty\.net
605
- findwebhostingnow\.com
606
- finhelp\.biz
607
- firsthorizonmtg\.com
608
- fisha\.biz
609
- fistabitch\.com
610
- fitnetsv\.com
611
- fkot\.com
612
- fleacpeot\.info
613
- flowersdeliveredquick\.com
614
- fndos\.com
615
- footballmotion\.com
616
- foreclosuretraining\.com
617
- forloaninfo\.com
618
- fortexasholdem\.com
619
- fortherest\.info
620
- fossilized\.net
621
- foxmediasolutions\.com
622
- freakycheats\.com
623
- free\-?sms.*
624
- freeautobot\.com
625
- freekin\.info
626
- freeride\.com
627
- freetest\.info
628
- freshperiod\.com
629
- friend\-?adult.*
630
- friend\-?finder.*
631
- fsck\.com
632
- ftgoal\.com
633
- ftke\.com
634
- fullhost\.org
635
- fundegree\.com
636
- funutilities\.info
637
- futureobject\.com
638
- gaipin\.com
639
- gala\.net
640
- gallanted\.com
641
- garyshawkey\.com
642
- gasep\.com
643
- gay\-?chat.*
644
- gay\-?teen.*
645
- gb\.com
646
- gdries\.com
647
- genaholincorporated\.com
648
- genericpharmacies\.biz
649
- geniusbroker\.com
650
- genuinely\.net
651
- get\-ever\.com
652
- get\-it\-online\.info
653
- get\-recruited\.com
654
- getallgirls\.com
655
- getawebloan\.com
656
- getbestmeds\.com
657
- getgoodtraffic\.com
658
- gethelpu\.com
659
- getitnowtoday\.com
660
- getloanz\.info
661
- getmeinshape\.biz
662
- getnoticednow\.net
663
- getthemonline\.com
664
- getwellsoononline\.com
665
- gfd\-online\.com
666
- gg\-medical\.com
667
- gh6\.net
668
- ghnp\.com
669
- ghtflscvsfreak\.com
670
- gimmeabreak\.info
671
- ginfection\.com
672
- girlsinyourarea\.com
673
- glassjaws\.com
674
- globaleducationeurope\.net
675
- globaltrustsavings\.com
676
- gmgmedical\.com
677
- gmi\-autoimports.*\.com
678
- go\.com
679
- go\-medz\.com
680
- go\-refi\.com
681
- gofordgo\.com
682
- goforvalue\.com
683
- gogopage\.com
684
- goldenoffer\.info
685
- goldenopps\.info
686
- golfshoot\.com
687
- golosko\.com
688
- good\-health\.info
689
- goodallsoft\.com
690
- goodleads\.net
691
- goodlist\.info
692
- goodloane\.biz
693
- goodserver\.biz
694
- goodsites\.biz
695
- goodslook\.com
696
- goodwayz\.com
697
- gopachat\.com
698
- gorgeouschick\.com
699
- gossipy\.net
700
- gotmeadate\.com
701
- gr3at\.com
702
- grabmail\.com
703
- grantgiveawayprogram\.com
704
- gratifyher\.info
705
- gravesides\.com
706
- great\-finance\.com
707
- great\-money\.com
708
- great\-porn\-site\.com
709
- greatbizservices\.com
710
- greatfins\.com
711
- greatnewmeds\.com
712
- greatpharmacy\.info
713
- greatsoftmike\.info
714
- greenpies\.com
715
- greenzer\.com
716
- grl4u\.com
717
- groupshopper\.com
718
- growmeds\.com
719
- grudgingly\.net
720
- grx\-meds\.com
721
- guaranteed\-scholarships\.com
722
- guestbookz\.com
723
- guide\.info
724
- gundoo\.com
725
- guzzling\.net
726
- h\-e\-r\-b\.com
727
- h1gher\.net
728
- h3ll0\.com
729
- h64\.net
730
- h67\.net
731
- hackerssupply\.com
732
- hadaga\.com
733
- hanafos\.com
734
- happyhomesite\.com
735
- hardspeed\.com
736
- hbemedicalno1\.com
737
- health\-livening\.com
738
- healthbynature\.info
739
- healthfrom\.com
740
- healthpills\.info
741
- healthproducts\.biz
742
- healthpronews\.com
743
- healthram\.com
744
- healthtoday\.net
745
- hedrugs\.com
746
- helpbuyer\.com
747
- hensi\.com
748
- herbalbrand\.net
749
- herbalicious\.net
750
- herbalmagic\.info
751
- herbalpillsonline\.biz
752
- herbalwholesale\.info
753
- herbalworld\.biz
754
- herbon\.info
755
- herhelp\.com
756
- herpills\.com
757
- hgee1\.info
758
- hgh\-.*
759
- hidor\.com
760
- himailer\.com
761
- himsearch\.com
762
- \.sg[0-9]+\.myweb\.hinet\.net
763
- hitprofile\.com
764
- hj68\.com
765
- hlplmanhds\.biz
766
- hmm88\.com
767
- holidate\.info
768
- holidayy\.com
769
- hollywoodclicks\.com
770
- home1oan\.com
771
- homefastcash\.com
772
- homel0ans\.com
773
- homeloanbasics\.(com|net)
774
- homeloansline\.com
775
- homeloansmarket\.com
776
- homesair\.com
777
- hometownfire\.com
778
- hookupinnotime\.com
779
- hookupsoon\.com
780
- hopeisnear4you\.com
781
- hopone\.net
782
- host4\.biz
783
- hostinghive\.com
784
- hostingprod\.com
785
- hostingsky\.com
786
- hotcap\.net
787
- hotfunsingles\.com
788
- hothgh\.com
789
- hotsweetsingles\.com
790
- hotterpersonals\.com
791
- howboutit\.info
792
- howsoever\.net
793
- hqmeds\.info
794
- hqreplicas\.info
795
- html\-email\-marketing\.com
796
- huai\.info
797
- hugeorgan\.com
798
- huntandfind\.com
799
- hurtfully\.com
800
- hybridisms\.com
801
- hydrocodine\.net
802
- i\-dealz\.net
803
- i\-pharm\.net
804
- iaea\.org
805
- iazy\.com
806
- ibestrate\.com
807
- ibzi\.com
808
- iccm\.com
809
- icedrive\.com
810
- icors\.com
811
- icptrack\.com
812
- idealreplica\.com
813
- idkcon\.com
814
- idncon\.com
815
- idownloadnow\.com
816
- ientry\.(com|net)
817
- ientrymail\.com
818
- iepills\.com
819
- ifinancialblueprint\.com
820
- ifuh\.com
821
- ifvv\.com
822
- iherbs\.biz
823
- ihomebroker\.com
824
- illumanated\.com
825
- iloveitupme\.com
826
- imagespool\.com
827
- imlive\.com
828
- impactlearn\.com
829
- inaptness\.com
830
- incco\.net
831
- including\-poker\.com
832
- incoming\.com
833
- incrediblevisions\.com
834
- incredimeds\.com
835
- indfx\.net
836
- industrycds\.com
837
- inexhibit\.com
838
- infofrom\.com
839
- infokay\.biz
840
- infolibria\.com
841
- inforn\.biz
842
- ingoodhealth\.info
843
- inpillform\.com
844
- insidefinancial\.net
845
- instant\-approval\.net
846
- instantinternetempires\.com
847
- int3lligent\.com
848
- interactivepoker\.net
849
- intermed36\.info
850
- internetseer\.com
851
- internetserviceteam\.com
852
- internettexashold\.com
853
- intervivos\.com
854
- invenmanager\.com
855
- invernessxxx\.com
856
- iroj\.com
857
- ironsnake\.com
858
- irwinsolutions\.com
859
- isacommie\.com
860
- isaving\.net
861
- istarthere\.com
862
- itfeelit\.com
863
- its\-simple\.net
864
- itsforyouonly\.com
865
- ivoiremarketing\.com
866
- iwantu\.com
867
- iwarp\.com
868
- iwebtool\.com
869
- jaja\-jak\-globusy\.com
870
- jamielynntressy\.com
871
- jeffersondarcy\.com
872
- jenniferyoungtart\.com
873
- jettisonit\.com
874
- jewish-?singles.*
875
- jhex\.com
876
- ji2\.net
877
- jinhai\.info
878
- jintianhao\.com
879
- jmhic\.com
880
- jo1nt\.com
881
- jobruler\.com
882
- jobs\.msdinc\.com
883
- jobsupermart\.com
884
- joebucks\.biz
885
- johka\.biz
886
- joinme\.com
887
- jollied\.com
888
- jomr\.com
889
- jpe\.com
890
- jroundup\.com
891
- js4a\.com
892
- jubr\.com
893
- jugr\.com
894
- just\-pharmacy\.com
895
- just1ce\.com
896
- justlender\.com
897
- justsayinghello\.com
898
- justthisday\.net
899
- k5medical\.com
900
- kabula\.info
901
- kaser\.biz
902
- kayline\.com
903
- kazaapro\.info
904
- kebi\.com
905
- keeponlovinme\.com
906
- kellykapowski\.com
907
- kennyboy\.net
908
- kf98\.com
909
- kicks\-ass\.net
910
- kikv\.com
911
- kinkygirlsxxx\.com
912
- kjomkaasc\.biz
913
- kkimmigration\.com
914
- korea\.com
915
- kqet\.com
916
- kr3\.net
917
- krazykash\.com
918
- kredite\-kredit\.(com|net|info)
919
- krline\.net
920
- kuev\.com
921
- kvvb\.com
922
- l73\.net
923
- ladytoysite\.info
924
- landmarkgreen\.com
925
- landrater\.com
926
- lankiest\.net
927
- largerlover\.com
928
- lastlender\.com
929
- latestrxpills\.com
930
- latinmail\.com
931
- latne\.com
932
- layleader\.com
933
- lazv\.com
934
- lc5\.net
935
- learnhowtoplay\.com
936
- legalhelpcenter\.org
937
- lendera\.com
938
- lenderserv\.com
939
- lendersforyou\.com
940
- lenderto\.com
941
- lenderz\.net
942
- lending\-now\.com
943
- lendingneed\.com
944
- lendx\.biz
945
- lessclan\.com
946
- letsjustgo\.biz
947
- lettersubmit\.com
948
- lifemedic\.com
949
- lifestylescenter\.com
950
- liketobeclever\.com
951
- limitedinfo\.com
952
- link\-builder\.com
953
- link55\.com
954
- lipase\.net
955
- listmail\.net
956
- liveperson\.net
957
- liveplanets\.com
958
- liverymen\.com
959
- loanabout\.com
960
- loanhelpamerica\.com
961
- loanpoly\.com
962
- loansavail\.com
963
- loansweethome\.com
964
- loant\.net
965
- lobangalores\.com
966
- local247\.biz
967
- lockdowncorp\.com
968
- logods\.com
969
- logolyx\.com
970
- lol21\.com
971
- lonelyenough\.com
972
- lonelywife\.org
973
- lookingforahotone\.com
974
- looloo\.biz
975
- loudfrog\.com
976
- loveaffairboutique\.com
977
- loveandfreedom\.com
978
- loveportion\.biz
979
- low\-price\-soft\.biz
980
- low\-rates\-usa\.com
981
- lowcoscanadarx\.com
982
- lower\-loans\.com
983
- lowsee\.com
984
- ltxmeds\.com
985
- lzac\.com
986
- m0dels\.com
987
- m0r\.net
988
- m0re\.net
989
- m0rt\.com
990
- machomall\.com
991
- madpot\.info
992
- magictablets\.net
993
- magnifeye\.biz
994
- magzone\.com
995
- mailtracking\.com
996
- mailworkz\.com
997
- mainsqueezelove\.biz
998
- makeitmetronow\.com
999
- makemelogo\.com
1000
- makingthemost\.net
1001
- malemanual\.com
1002
- maletoyz\-x\.info
1003
- mamma\.com
1004
- manawork\.com
1005
- marketwatch\.com
1006
- marksite\.biz
1007
- marswebsite\.com
1008
- masfre\.info
1009
- massivethree\.com
1010
- mateinfo\.com
1011
- mathome\.com
1012
- mature\-lessons\.com
1013
- mcr8\.com
1014
- mcwell\-design\.com
1015
- md20\.com
1016
- me2all\.com
1017
- mecei\.com
1018
- med6547\.biz
1019
- medcarepharmacy\.net
1020
- medi\-place\.com
1021
- medianly\.com
1022
- mediaonweb\.info
1023
- medicalhere\.com
1024
- medkit\.info
1025
- medmembership\.com
1026
- medsfig\.com
1027
- medsoffshore\.com
1028
- medsonthego\.com
1029
- medz\-store\.com
1030
- medz4cheap\.com
1031
- meetingsmile\.com
1032
- meettomorrow\.com
1033
- mega\-health\.net
1034
- mega\-oem\.info
1035
- megacheapmeds\.com
1036
- mejc\.com
1037
- merchantgalaxy\.com
1038
- merchantmegasite\.com
1039
- messagereach\.com
1040
- metro\-savings\.com
1041
- mezd\.com
1042
- mfek\.com
1043
- mfound\.com
1044
- mgmhomeloan\.net
1045
- midnightlaundries\.com
1046
- migrationexpert\.com
1047
- milkywilky\.com
1048
- mindtransformations\.com
1049
- mine\-betting\.com
1050
- misterguide\.info
1051
- mmachine\.com
1052
- mmbn\.info
1053
- mmeds\.info
1054
- mnm1\.com
1055
- moblook\.com
1056
- mobnight\.info
1057
- modelled\.net
1058
- monehome\.com
1059
- monetised\.net
1060
- moneyfirms\.com
1061
- moneysharp\.info
1062
- moneystates\.com
1063
- more\-salz\.com
1064
- more4lessrx\.com
1065
- morecheaprx\.com
1066
- morequote\.com
1067
- morethanwhatiwant\.com
1068
- mort\-your\.com
1069
- mortga12\.com
1070
- mortgageofficer\.net
1071
- mortgauge\.net
1072
- mortzgagez\.com
1073
- mosper\.com
1074
- motorcityescorts\.com
1075
- mp3bundle\.com
1076
- mq5\.net
1077
- mrev\.biz
1078
- mrg\-now\-yes\.com
1079
- mrut\.com
1080
- mtgz\.net
1081
- musicbox1\.com
1082
- mx01\.com
1083
- mxsoft\.biz
1084
- my\-dna\.net
1085
- my\-cash\.(biz|net)
1086
- myabsinth\.com
1087
- myautowarranty\.com
1088
- mydatingtype\.com
1089
- mydivx\.info
1090
- mydnnweb\.com
1091
- myeasysavings\.com
1092
- myfreelivewebcam\.com
1093
- myfriendlyshop\.com
1094
- mygalt\.com
1095
- mygamma\.com
1096
- mygreatrate\.com
1097
- myhomeloanstore\.com
1098
- myhostingdeal\.com
1099
- mylastlove\.com
1100
- mymeltingmoments\.com
1101
- mynetbizz\.com
1102
- mynetbizztravel\.com
1103
- mypillswebsites\.com
1104
- myrice\.com
1105
- mythingsusa\.com
1106
- myvaluepc\.com
1107
- myway\.com
1108
- n3\.net
1109
- namewith\.com
1110
- nanan2\.info
1111
- nate\.com
1112
- natgain\.com
1113
- national\-net\.com
1114
- natural\-herbs\.info
1115
- naturalremedy\.biz
1116
- naturalways\.biz
1117
- naughtysmile\.com
1118
- ncol\.com
1119
- nease\.net
1120
- neopdf\.com
1121
- nepel\.com
1122
- net\-cash\.net
1123
- netaexplicit\.com
1124
- netcistern\.com
1125
- netfirms\.com
1126
- netmail2\.com
1127
- netsolos\.com
1128
- neverstoplearning\.info
1129
- new\-doctor\.com
1130
- newcollage\.com
1131
- newdeals\.biz
1132
- neweraonline\.com
1133
- newkk\.com
1134
- newlowestrates\.com
1135
- newquotes\.net
1136
- newreplicas\.info
1137
- nextfrontiersonline\.com
1138
- nexthost\.org
1139
- nexuste\.com
1140
- nf0\.net
1141
- nicepharmacy\.com
1142
- niceviagra\.info
1143
- nlav\.com
1144
- nlcomp\.com
1145
- nobulldeals\.com
1146
- nohassleloan\.net
1147
- nohavoc\.com
1148
- noizbox\.info
1149
- nookpage\.com
1150
- nosleep4me\.com
1151
- notyesterdaysnews\.com
1152
- now\-cash\.com
1153
- nrik\.com
1154
- nufan\.net
1155
- nvhomevalues\.com
1156
- oasbmedsw\.com
1157
- oculosdesol\.info
1158
- offerindex\.com
1159
- offeros\.com
1160
- offerplanet\.com
1161
- offerscard\.com
1162
- officeoffer\.com
1163
- oflist\.com
1164
- ohgo\.com
1165
- ohosts\.net
1166
- oi6\.net
1167
- oijia\.com
1168
- okmekw\.com
1169
- oldnavy\.com
1170
- on\-money\.com
1171
- ondemandmeds\.com
1172
- onemoreshot\.info
1173
- onereplica\.net
1174
- onestopaccounting\.com
1175
- online\-casino\-gambling\-pros\.com
1176
- onlinedm\.com
1177
- onlinedns\.org
1178
- onlinegenericrx\.com
1179
- onlinegenericshop\.com
1180
- onlinemedscheap\.com
1181
- onlinepc\.info
1182
- onlinepharm\.com
1183
- onlinerefi\.biz
1184
- onlinerxmeds\.info
1185
- only\-casino\.com
1186
- openforex\.org
1187
- optin2millions\.net
1188
- optinemailing\.net
1189
- oqhg\.com
1190
- order\-wizard\.com
1191
- ordergalaxy\.com
1192
- orderlandz\.com
1193
- orgtechservice\.com
1194
- our\-mortgage\.com
1195
- ourlearningspace\.com
1196
- ourmemory\-of\.com
1197
- ourtexasholdem\.com
1198
- outloan\.com
1199
- overdone\.biz
1200
- owndoctor\.info
1201
- owned\.com
1202
- oxxford\.info
1203
- p1k\.net
1204
- p3rfect\.com
1205
- pacificmeds\.com
1206
- packpage\.com
1207
- pageroot\.net
1208
- palaregs\.com
1209
- palepage\.com
1210
- pancakeking\.com
1211
- parasoft\.info
1212
- partied\.net
1213
- partyshopcentral\.com
1214
- patsonslearning\.com
1215
- paycation\.net
1216
- paylesscanadiandrugs\.com
1217
- pcsecurityshield\.com
1218
- pcsri\.com
1219
- pdhost\.com
1220
- pelvics\.net
1221
- penisreview\.com
1222
- pennyweb\.com
1223
- peoplelenders\.com
1224
- peoplesuggest\.com
1225
- perfectreplica\.net
1226
- perfectvgr\.com
1227
- periodcheck\.com
1228
- personal\-doc\.info
1229
- pervertedtaboo\.com
1230
- petercopter\.com
1231
- petsellers\.net
1232
- pflzer\.com
1233
- pharma\-rx\.info
1234
- pharmacy\.info
1235
- pharmacy\-here\.com
1236
- pharmbrand\.com
1237
- pharmdze\.com
1238
- pharmfarm\.biz
1239
- pharmom\.com
1240
- phxice\.com
1241
- pi11s\.com
1242
- pills\-of\-passion\.com
1243
- pills\-only\.com
1244
- pills888\.com
1245
- pillscash\.com
1246
- pillsforlife\.info
1247
- pillsofdesire\.com
1248
- pillspharm\.net
1249
- pillstock\.com
1250
- pinghetang\.com
1251
- pipe\-34\.net
1252
- pipero\.com
1253
- pix4u\.net
1254
- pixelproduction\.com
1255
- pjat\.com
1256
- pjew\.com
1257
- plantboat\.com
1258
- plasticdragon\.info
1259
- plasticow\.com
1260
- plenty\-cash\.com
1261
- plentyofgas\.com
1262
- pm0\.net
1263
- pockmarked\.com
1264
- poker\-check\.com
1265
- poker\-online\.com
1266
- poker\-spanish\.com
1267
- politicalpoison\.com
1268
- ponudba\.net
1269
- poog\.info
1270
- popkashop\.com
1271
- popupprotector\.com
1272
- portion\.biz
1273
- pottyplay\.com
1274
- powerviagra\.com
1275
- poxz\.com
1276
- ppcexperience\.com
1277
- pq4\.net
1278
- prefixing\.com
1279
- premiumdiscounts\.net
1280
- pretax\.info
1281
- pricecer\.com
1282
- printpal\.com
1283
- pro\-site\.biz
1284
- pro\-software\.biz
1285
- pro\-soil\.net
1286
- profitableproducts\.com
1287
- progressiveupdate\.net
1288
- projectrefinance\.com
1289
- promohost\.org
1290
- promote\-biz\.net
1291
- protus\.com
1292
- provencaux\.net
1293
- prserv\.net
1294
- przc\.com
1295
- psjned\.info
1296
- psxtreme\.com
1297
- psychicmarie\.com
1298
- publicmeds\.com
1299
- puerperal\.com
1300
- pullpushstop\.com
1301
- puresfuel\.com
1302
- purpletrain\.com
1303
- pusssystretchers\.com
1304
- pycnanthemumyogurts\.net
1305
- q1tv\.com
1306
- qepr\.com
1307
- qiwuz\.com
1308
- qrrnet\.com
1309
- qu0tes\.net
1310
- quadrasoft\.org
1311
- qualinet\.biz
1312
- quality\-mortgages\.com
1313
- quality\-poker\.com
1314
- qualitytimepiece\.com
1315
- quickcollegedegrees?\.com
1316
- quickeasysolution\.com
1317
- quickerpage\.com
1318
- quickz\.info
1319
- quikrx\.net
1320
- quitplayinggameswithmyheart\.com
1321
- quotedot\.com
1322
- quotestore\.net
1323
- quotetalk\.com
1324
- qwild\.com
1325
- rabbet\.info
1326
- rafflescity\.net
1327
- raginfo\.com
1328
- raiseyourpower\.com
1329
- rc\-cars\-boats2003\.com
1330
- reachsoftware\.com
1331
- reale\-amateure\.com
1332
- realityofdating\.com
1333
- realtorx2\.com
1334
- reattain\.com
1335
- redgrand\.com
1336
- rednest\.org
1337
- redoffers\.com
1338
- reebok\.com
1339
- refinanceangels\.com
1340
- refitalk\.com
1341
- reginter\.com
1342
- rehire\.net
1343
- rekz\.com
1344
- remeasures\.net
1345
- removethisemail\.com
1346
- renask\.com
1347
- repl\.org
1348
- replicamall\.info
1349
- replicasinternational\.com
1350
- reproofs\.com
1351
- resdet\.com
1352
- research\-project\.org
1353
- returned\.biz
1354
- revenging\.net
1355
- rf6\.net
1356
- rgosweb\.com
1357
- rightsy\.com
1358
- ringagain\.com
1359
- ringofbeauty\.com
1360
- rlox\.com
1361
- rm05\.net
1362
- ro7kalbe\.com
1363
- roared\.net
1364
- robertgraham\.com
1365
- roiex\.com
1366
- rolexeverywhere\.info
1367
- rolexnmore\.info
1368
- rolexplace\.com
1369
- romna\.com
1370
- roninnz\.com
1371
- roody\.com
1372
- rosetlimo\.com
1373
- roving\.com
1374
- roxlab\.com
1375
- royalfreehost\.com
1376
- rqvq\.com
1377
- rrrfff\.com
1378
- rtnnet\.com
1379
- runmen\.info
1380
- ruojrxor\.com
1381
- rushrate\.com
1382
- rx\-land\.(biz|com)
1383
- rx\-zone\.com
1384
- rx6\.org
1385
- rxbest\.org
1386
- rxchoice\.org
1387
- rxmedicalonline\.net
1388
- rxwholesale\.info
1389
- safetymeds\.biz
1390
- safetymoney\.info
1391
- saloan\.com
1392
- salver\.info
1393
- sav1ngs\.com
1394
- save1\.com
1395
- savecashtoday\.net
1396
- savemorenow\.biz
1397
- savenowtoday\.com
1398
- saverpage\.com
1399
- savev\.com
1400
- savingsalerts\.com
1401
- savingz\.biz
1402
- saydk\.com
1403
- scenting\.net
1404
- schnazzyboot\.com
1405
- sdcode\.com
1406
- searchrt\.com
1407
- see4c\.com
1408
- sellinter\.net
1409
- selyn\.com
1410
- seo\-action\.com
1411
- seo\-profits\.com
1412
- sermeds\.com
1413
- sesfocus\.com
1414
- sex2go\.com
1415
- sexaffair\.org
1416
- sgplink\.com
1417
- shadowcrew\.com
1418
- sharesoft\.net
1419
- sigloan\.com
1420
- simplerx\.org
1421
- sina\.com
1422
- singaire\.com
1423
- sizehelp\.com
1424
- skycn\.net
1425
- skylender\.com
1426
- slashmonthlypayments\.com
1427
- smartcontrol\.biz
1428
- smartdebt\.net
1429
- smartprotection\.net
1430
- sml338\.org
1431
- smmwatch\.com
1432
- smsportali.net
1433
- snorter\.net
1434
- snowfalls\.net
1435
- soft\-paradise\.com
1436
- softavailable\.com
1437
- softdisks\-ltd\.com
1438
- softis\.info
1439
- softli\.com
1440
- softwaresuite\.net
1441
- soggiest\.com
1442
- solodrugs\.com
1443
- someones\.biz
1444
- sonicatom\.com
1445
- soulfinder\.info
1446
- southeasthosters\.com
1447
- sp66\.com
1448
- spanish\-casino\-4u\.com
1449
- special\-selections\.com
1450
- specialcartoon\.com
1451
- specialitystore\.info
1452
- spellsbook\.com
1453
- speshials\.info
1454
- spinpage\.com
1455
- splitwem\.com
1456
- sporeserver\.com
1457
- spyelimination\.com
1458
- spywareremove\.info
1459
- stamtrex\.com
1460
- standard\-poker\.com
1461
- startpackin\.com
1462
- startquote\.com
1463
- startsaverx\.com
1464
- statcounter\.com
1465
- sterlinglenders\.com
1466
- stna\.info
1467
- stopbills\.info
1468
- storedk\.com
1469
- storegenius\.com
1470
- stpt\.com
1471
- stratatica\.com
1472
- subvalue\.com
1473
- sumwin\.biz
1474
- super\-puper\.info
1475
- supercheapmeds\.com
1476
- superfrog\.net
1477
- superlaugh\.com
1478
- supposable\.net
1479
- surewinsoccer\.net
1480
- swfr\.biz
1481
- swingersmatch\.com
1482
- swishzone\.com
1483
- swissrolexes4me\.com
1484
- swissworlds\.com
1485
- t0w\.net
1486
- t6i\.net
1487
- tableforty\.com
1488
- taikang\.com
1489
- take\-mortgage\.com
1490
- takeofflist\.com
1491
- tbuh\.com
1492
- technoprise\.net
1493
- teenfuk\.com
1494
- teezrus\.com
1495
- templatezone\.com
1496
- terashells\.com
1497
- texasholdfun\.com
1498
- texas\-holdem\.[bcino][a-z]{1,2}
1499
- texas\-va\-loan\.com
1500
- thankyoufor\.info
1501
- theanswerto\.com
1502
- thebestmortage\.net
1503
- thebestofthebest\.info
1504
- thebettermail\.com
1505
- thebiggestand\.com
1506
- the\-discount\-store\.com
1507
- thefilecompany\.com
1508
- theorder\.biz
1509
- theproxyconnection\.com
1510
- therxshop\.net
1511
- thesitefordating\.com
1512
- thetrafficbooster\.com
1513
- thuroebian\.info
1514
- ti4\.net
1515
- timath\.com
1516
- timeminute\.com
1517
- timezoneforpcs\.com
1518
- tina\.biz
1519
- todaysmagic\.com
1520
- toels\.com
1521
- tolr\.com
1522
- tom\.com
1523
- toolto\.com
1524
- toomuchsnow\.com
1525
- top\-\-sites\.com
1526
- top10homejobs\.net
1527
- topcasinovegas\.com
1528
- tophgh\.com
1529
- toplenders\.(biz|net)
1530
- topwinsoft\.com
1531
- totalplayers\.biz
1532
- toyzwireless\.com
1533
- tra1ns\.com
1534
- trackerom\.com
1535
- trafficmagnet\.com
1536
- trafficyoursite\.com
1537
- trakkerd\.net
1538
- treasuresguide\.com
1539
- trnnet\.com
1540
- troubleismymiddlename\.com
1541
- trustdoctors\.com
1542
- trustit\.info
1543
- trustsave\.com
1544
- truthfu1ly\.com
1545
- trypharmacy\.com
1546
- tt48\.com
1547
- ttlive\.com
1548
- turbomailing\.biz
1549
- tzig\.com
1550
- ua\-princeton\.com
1551
- ud7\.net
1552
- udcorp\.com
1553
- uhrmxxd\.info
1554
- ultimo\.biz
1555
- ummrx\.com
1556
- uncharredkk\.com
1557
- unique\-pills\.com
1558
- unixlover\.com
1559
- unixusa\.net
1560
- unsolder\.com
1561
- unusual\-ideas\.com
1562
- unv\.net
1563
- unvl\.com
1564
- unwarily\.com
1565
- uosb\.com
1566
- upower\.info
1567
- upstem\.com
1568
- urchoise\.com
1569
- usagmail\.com
1570
- usagreetings\.com
1571
- usaloanworks\.biz
1572
- useful\-pills\.com
1573
- usonyx\.net
1574
- vacationpower\.com
1575
- vadoptions\.com
1576
- vaguer\.com
1577
- val10\.com
1578
- validpage\.com
1579
- valleysite\.com
1580
- value\-loans\.com
1581
- valuen\.com
1582
- valueprogram\.net
1583
- vanai\.com
1584
- vcats\.com
1585
- vdif\.com
1586
- vegas\-hair\.com
1587
- verybestmeds\.com
1588
- vgr100\.com
1589
- viags\.com
1590
- victoriassecret\.com
1591
- viewhelp\.info
1592
- vinetka\.info
1593
- vinsider\.com
1594
- vippills\.net
1595
- virtual\-pc\.org
1596
- virtualstoragecenter\.com
1597
- visagraph\.net
1598
- visionsave\.com
1599
- visionsavings\.com
1600
- vit\-co\.com
1601
- vixv\.com
1602
- vjackpot\.com
1603
- vlew\.com
1604
- vmousetrap\.com
1605
- voippricer\.com
1606
- vplaymate\.com
1607
- vpshs\.com
1608
- vp888\.net
1609
- vrajitor\.com
1610
- vselling\.com
1611
- vsymphony\.com
1612
- vthought\.com
1613
- vz6\.net
1614
- wandweb\.com
1615
- wannavisit\.com
1616
- wantahomeloan\.com
1617
- warehousemedical\.com
1618
- watchesbazaar\.com
1619
- wauy\.com
1620
- wayaround\.info
1621
- wayhere\.com
1622
- web\-lender\.com
1623
- web4deals\.com
1624
- webcamadventures\.com
1625
- webleads\.info
1626
- webpronews\.com
1627
- weightlossbusiness\.net
1628
- weightlossfirm\.com
1629
- wellness\-i\.com
1630
- wetparts\.com
1631
- who\-remembers\-me\.com
1632
- whvc\.net
1633
- wickedground\.com
1634
- wieg\.biz
1635
- wifecheaters\.info
1636
- wildpass\.com
1637
- windowflower\.com
1638
- windowscasino\.com
1639
- wiseschool\.com
1640
- wisesoft\.info
1641
- wissengroup\.com
1642
- wizsystems\.com
1643
- wkelleylucas\.com
1644
- wlue\.com
1645
- wmsgroup\.net
1646
- wondermed\.info
1647
- wonderstuff\.biz
1648
- woomen\.biz
1649
- workandsleep\.com
1650
- worlduniversityonline\.com
1651
- wowhealth\.info
1652
- wowoffer\.com
1653
- wowpillzale\.com
1654
- wowrates\.com
1655
- wringman\.com
1656
- wrongsideoftown\.com
1657
- wst123\.com
1658
- wuniv\.com
1659
- wv8\.net
1660
- wwmeds\.com
1661
- x\-forms\.net
1662
- xanaz\.net
1663
- xanex\.org
1664
- xans\.net
1665
- xantz\.com
1666
- xcce\.com
1667
- xciconsulting\.com
1668
- xftp\.net
1669
- xiagra\.net
1670
- xmassavings\.com
1671
- xmr3\.com
1672
- xnue\.biz
1673
- xognei.com
1674
- xoware\.com
1675
- xpays\.com
1676
- xsalez\.org
1677
- xstore\.biz
1678
- xtrameg\.com
1679
- xtst\.com
1680
- xxxdate\.com
1681
- y73\.net
1682
- yaadig\.com
1683
- yahoososupersite\.com
1684
- yahoosotime\.com
1685
- yayshop\.com
1686
- yellfore\.com
1687
- yellowrate\.com
1688
- yelpp\.biz
1689
- yelucie\.com
1690
- yf4\.net
1691
- yo6\.net
1692
- your\-financial\.com
1693
- yourbignight\.com
1694
- yourcasinobiz\.com
1695
- yourhostingaccount\.com
1696
- yourmeds\.info
1697
- yourname\.com
1698
- yourowndoctor\.info
1699
- yourpsychic\.net
1700
- yourtablet\.info
1701
- ypx132\.com
1702
- yx\-colorweaving\.com
1703
- zapbook\.info
1704
- zolotko\.info
1705
- zoomgirls\.net
1706
- zowk\.com
1707
- zwallet\.com
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/images/Thumbs.db DELETED
Binary file
css/index.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
- header('Status: 403 Forbidden');
3
- header('HTTP/1.1 403 Forbidden');
4
  ?>
1
+ <?php
2
+ header('Status: 403 Forbidden');
3
+ header('HTTP/1.1 403 Forbidden');
4
  ?>
{js/jquery-ui/css → css/jquery-ui}/images/animated-overlay.gif RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-bg_flat_0_aaaaaa_40x100.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-bg_flat_75_ffffff_40x100.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-bg_glass_55_fbf9ee_1x400.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-bg_glass_65_ffffff_1x400.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-bg_glass_75_dadada_1x400.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-bg_glass_75_e6e6e6_1x400.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-bg_glass_95_fef1ec_1x400.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-bg_highlight-soft_75_cccccc_1x100.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-icons_222222_256x240.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-icons_2e83ff_256x240.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-icons_454545_256x240.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-icons_888888_256x240.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/images/ui-icons_cd0a0a_256x240.png RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/jquery.ui.core.css RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/jquery.ui.tabs.css RENAMED
File without changes
{js/jquery-ui/css → css/jquery-ui}/jquery.ui.theme.css RENAMED
File without changes
css/wassup.css CHANGED
@@ -26,15 +26,16 @@
26
  .wassup-icon{}
27
  #wassup-wrap .favicon{vertical-align:middle;width:16px;height:16px;}
28
  .wassup-content{min-height:225px;}
29
- .wassup-nowrap{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
30
  #wassup-wrap .indent-text,#wassup-wrap li.indent-text{text-indent:10px;}
31
  #wassup-wrap .scrolltop{position:absolute;bottom:0;right:0;width:50px;padding:5px 10px 5px 5px;text-align:right;}
32
  #wassup-message{font-size:13px;color:#447;padding:10px;}
33
  #wassup-message.error{color:#d00;}
34
- #wassup-message.notice-warning{color:#a21;}
35
  #wassup-message.updated{color:#040;}
36
  /* Form fields */
37
  #wassup-wrap input,#wassup-wrap select,#wassup-wrap textarea,#wassup-wrap text{font-size:13px;background-color:#fdfdfd;border-color:#d6d6d3;}
 
38
  /* Wassup buttons */
39
  #wassup-wrap button,#wassup-wrap .button,#wassup-wrap input[type="button"],#wassup-wrap input[type="reset"],#wassup-wrap input[type="submit"] {display:inline;display:inline-block;height:auto;min-height:25px;margin-left:5px;margin-right:5px;padding:2px 10px;font-size:13px;font-weight:normal;line-height:1.7em;text-align:center;color:#123;text-shadow:0 1px 2px #fff;text-decoration:none;white-space:nowrap;vertical-align:baseline;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;background-image:none;background-color:#ececec;box-sizing:border-box;border:1px solid #bcbcbc;border-bottom-color:#999;-moz-border-radius:5px;-webkit-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);-webkit-box-shadow:0 1px 0 #fff inset,0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 #fff inset,0 1px 0 rgba(0,0,0,0.25);}
40
  #wassup-wrap .button:hover,#wassup-wrap .button:focus,#wassup-wrap .button:active {background-color:#d9d9d9;border-color:#9f9f9f;border-bottom-color:#888;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;}
@@ -60,7 +61,7 @@
60
  #wassup-menu #donate-link a img {vertical-align:middle;margin:0 auto;}
61
  #wassup-menu li:first-child {margin-right:20px;}
62
  .wassup-wp-legacy #screen-meta #contextual-help-link,.wassup-wp-legacy #screen-meta #contextual-help-link.show-settings{display:none;}
63
- @media (max-width: 640px) {
64
  #wassup-menu #donate-link{display:none;}
65
  }
66
  /* ------------------------------------------------------------------
@@ -82,7 +83,7 @@ div.main-tabs{margin:10px auto 3px;padding:3px;color:#445;background-color:#e1df
82
  #wassup-wrap .boxed{display:inline;display:inline-block;min-width:100px;margin:0 3px;padding:2px 5px;text-align:center;background-color:#ededee;border:1px solid #d6d6df !important;}
83
  #wassup-wrap .borders a{text-decoration:none !important;border-bottom:0 none;}
84
  #wassup-wrap .sum-rec{margin:0;padding:0;background-color:#fffdfe;border:1px solid #bbb;}
85
- #wassup-wrap .sum-nav{clear:left;min-height:50px;padding:10px 0 0;border-top:1px solid #fffcff;border-left:1px solid #efefe0;border-right:1px solid #efefe0;border-bottom:0 none;background:url("images/list-bg3.png") repeat-x;}
86
  #wassup-wrap .sum-mark{background-color:#f7f707;}
87
  #wassup-wrap .sum-nav-mark{background-image:none;background-color:#f7f707;}
88
  #wassup-wrap .delbut{position:absolute;top:-15px;right:0;width:130px;}
@@ -96,11 +97,13 @@ div.main-tabs{margin:10px auto 3px;padding:3px;color:#445;background-color:#e1df
96
  #wassup-wrap .sum-det .det1{padding-left:10px;text-indent:-5px;font-size:14px;}
97
  #wassup-wrap .det3{padding-left:20px;}
98
  #wassup-wrap .det1 span{color:#00284a;}
 
 
99
  #wassup-wrap .det1 a{font-weight:bold;border-bottom:1px solid !important;}
100
  #wassup-wrap .det2 a,#wassup-wrap .det2 a:link, #wassup-wrap .sum-det span.det2 a{color:#02a !important;}
101
  #wassup-wrap .det2 a:hover, #wassup-wrap .sum-det span.det2 a:hover {color:#d54d22 !important;}
102
  #wassup-wrap .det2 strong{color:#001616;font-weight:normal;text-shadow:none;}
103
- #wassup-wrap .sum-box{float:left;display:block;width:180px;min-height:50px;margin:0 0 3px 0;padding:0;color:#00284a;text-align:center;}
104
  #wassup-wrap .sum-box span{display:block;margin:0 auto;padding:0;}
105
  #wassup-wrap .sum-box-ip{width:140px;height:25px;padding:5px 0 0 0 !important;font-family:tahoma,verdana,arial,sans-serif;font-weight:bold;text-shadow:rgba(255,253,240,0.7) 0 -1px 0;background:#dde url("images/sum-box.png") bottom left;border:1px solid #b6c6cf;border-radius:3px;}
106
  #wassup-wrap .sum-det-spy span{margin:0;padding:0;margin:0 3px 0 2px;padding:0;}
@@ -120,6 +123,8 @@ div.main-tabs{margin:10px auto 3px;padding:3px;color:#445;background-color:#e1df
120
  #wassup-wrap .detail-data ul{list-style-type:none;width:100%;min-height:28px;margin:0;padding:0;clear:left;border-top:1px solid #ccc;overflow:hidden;}
121
  #wassup-wrap .detail-data li{list-style-type:none;min-height:27px;margin:0;padding:0;line-height:1.4em;display:block;display:inline-block;float:left;}
122
  #wassup-wrap .detail-data li span{display:inline;display:inline-block;padding:3px 0 0;}
 
 
123
  #wassup-wrap ul.searcheng{background-color:#abdbff;border-color:#9cd;}
124
  #wassup-wrap .searchmedia{background-color:#abbbff !important;border-color:#9b9bff !important;}
125
  #wassup-wrap ul.useragent{background-color:#46a;border-bottom:2px solid #67a;}
@@ -135,7 +140,7 @@ div.main-tabs{margin:10px auto 3px;padding:3px;color:#445;background-color:#e1df
135
  #wassup-wrap ul.feed{background-color:#edc !important;border-color:#dcb !important;}
136
  #wassup-wrap li.feed,#wassup-wrap li.searcheng{padding:2px 10px 0 5px;border-right:1px dotted #8e8e8e;}
137
  #wassup-wrap ul.agent{border-color:#bbb;}
138
- #wassup-wrap .detail-data li.agent{padding:0 10px 0 5px;border-right:1px dotted #8e8e8e;}
139
  #wassup-wrap li.agent strong{color:#00284a;}
140
  #wassup-wrap ul.users{background-color:#faeaaa;border-color:#db7;}
141
  #wassup-wrap ul.userslogged{background-color:#cfff99;border-color:#bc6;}
@@ -146,14 +151,12 @@ div.main-tabs{margin:10px auto 3px;padding:3px;color:#445;background-color:#e1df
146
  #wassup-wrap ul.url li{width:100%;display:block;background:#fffdfe url("images/list-bg3.png") repeat-x;border-top:1px solid #c0cfcf;}
147
  #wassup-wrap .url a,#wassup-wrap .url a:link {border-bottom:1px solid !important;}
148
  #wassup-wrap .indent-li{padding-left:12px;}
 
 
149
  #wassup-wrap .detail-data li.url span{color:#00284a;}
150
  #wassup-wrap .detail-data li .request-time{width:180px;margin:0;padding-left:0;padding-right:0;text-align:right;}
151
  #wassup-wrap .detail-data li .request-uri{padding-left:5px !important;text-align:left;}
152
  #wassup-wrap .detail-data .time{padding-right:2px;text-align:right;}
153
- #wassup-wrap .detail-data li .indent-li-agent{padding:3px 12px 0;display:block;float:left;}
154
- @media (max-width: 768px) {
155
- #wassup-wrap .detail-data li .request-time{width:115px;}
156
- }
157
  #wassup-wrap .box-log{margin:0;padding:0;background-color:#e7f1c8;border:1px #bbb solid;}
158
  #wassup-wrap .box-aut{margin:0;padding:0;background-color:#fbf9d3;border:1px #ccc solid;}
159
  #wassup-wrap .box-spider{margin:0;padding:0;background-color:#c98;border:1px #999 solid;}
@@ -177,6 +180,17 @@ div.main-tabs{margin:10px auto 3px;padding:3px;color:#445;background-color:#e1df
177
  #wassup-wrap ul.varlist{list-style:none;margin:0;padding:5px 0 0 17px;}
178
  #wassup-wrap .varlist li{display:block !important;clear:right !important;}
179
  #wassup-wrap .no-top-border{border-top:0 none;}
 
 
 
 
 
 
 
 
 
 
 
180
  /* ------------------------------------------------------------------
181
  * Chart and Map */
182
  #wassup-wrap .placeholder{width:100%;margin:0 -3px;padding:0 3px;text-align:center;overflow-x:auto;overflow-y:hidden;}
@@ -240,6 +254,9 @@ div.main-tabs{margin:10px auto 3px;padding:3px;color:#445;background-color:#e1df
240
  #wassup-wrap #tabcontainer em{color:#641;}
241
  #wassup-wrap #delete-dialog{display:none;}
242
  #wassup-wrap .alertstyle{color:red;background-color:#ffd;}
 
 
 
243
  #wassup-wrap .opt-prev-next{position:absolute;bottom:0;right:0;width:220px;padding:5px 10px 10px 5px;text-align:right;}
244
  #wassup-wrap .opt-prev-next a{color:#999;text-decoration:none;}
245
  #wassup-wrap .opt-info{width:100%;clear:right;}
@@ -262,7 +279,7 @@ div.main-tabs{margin:10px auto 3px;padding:3px;color:#445;background-color:#e1df
262
  #wassup-wrap #tabcontainer li.ui-tabs-active a:focus,#wassup-wrap #tabcontainer li.ui-tabs-active a:active {outline:none;}
263
  #wassup-wrap #tabcontainer .ui-state-active a,#wassup-wrap li.ui-tabs-active a{color:#212121 !important;}
264
  #wassup-wrap #tabcontainer .ui-tabs-nav a:hover {color:#212121;}
265
- @media (max-width: 640px) {
266
  #wassup-wrap p.description,#wassup-wrap p.opt-note{display:none;}
267
  #wassup-wrap #info-sysinfo{display:none;}
268
  }
@@ -300,7 +317,7 @@ body.wassup-ajax{margin:0;padding:0;background-color:#fdfcf9;width:100%;}
300
  #wassup-topstats td{padding:0;border-spacing:0;border-right:1px solid #b9c9cf;}
301
  #wassup-topstats td.stat-rownum{min-width:8px;}
302
  #wassup-topstats ul.charts{list-style-type:none;margin:0;padding:0;font:8pt sans-serif;line-height:1.1em;min-width:20px;max-width:600px;}
303
- #wassup-topstats .charts li{height:27px;margin:0;padding:0 2px;list-style-type:none;line-height:22px;border-top:1px solid #c3ccdd;background:url("images/list-bg3.png") top left repeat-x;}
304
  #wassup-topstats .charts li.chartsT{padding:6px 0 1px 5px;line-height:1.2em;color:#059;text-transform:uppercase;vertical-align:bottom;background-color:#cee1ef;background-image:none;border:1px solid #eee;border-bottom:2px solid #acd;border-left:0 none;}
305
  #wassup-topstats .firstcol{}
306
  #wassup-topstats .lastcol{}
26
  .wassup-icon{}
27
  #wassup-wrap .favicon{vertical-align:middle;width:16px;height:16px;}
28
  .wassup-content{min-height:225px;}
29
+ .wassup-nowrap{white-space:nowrap;text-overflow:ellipsis;}
30
  #wassup-wrap .indent-text,#wassup-wrap li.indent-text{text-indent:10px;}
31
  #wassup-wrap .scrolltop{position:absolute;bottom:0;right:0;width:50px;padding:5px 10px 5px 5px;text-align:right;}
32
  #wassup-message{font-size:13px;color:#447;padding:10px;}
33
  #wassup-message.error{color:#d00;}
34
+ #wassup-message.notice-warning{color:#447;}
35
  #wassup-message.updated{color:#040;}
36
  /* Form fields */
37
  #wassup-wrap input,#wassup-wrap select,#wassup-wrap textarea,#wassup-wrap text{font-size:13px;background-color:#fdfdfd;border-color:#d6d6d3;}
38
+ #wassup-wrap input[type="checkbox"]:disabled, #wassup-wrap input.disabled[type="checkbox"], #wassup-wrap input[type="radio"]:disabled, #wassup-wrap input.disabled[type="radio"], #wassup-wrap input[type="checkbox"]:disabled:checked::before, #wassup-wrap input.disabled[type="checkbox"]:checked::before, #wassup-wrap input[type="radio"]:disabled:checked::before, #wassup-wrap input.disabled[type="radio"]:checked::before {opacity:0.9;}
39
  /* Wassup buttons */
40
  #wassup-wrap button,#wassup-wrap .button,#wassup-wrap input[type="button"],#wassup-wrap input[type="reset"],#wassup-wrap input[type="submit"] {display:inline;display:inline-block;height:auto;min-height:25px;margin-left:5px;margin-right:5px;padding:2px 10px;font-size:13px;font-weight:normal;line-height:1.7em;text-align:center;color:#123;text-shadow:0 1px 2px #fff;text-decoration:none;white-space:nowrap;vertical-align:baseline;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;background-image:none;background-color:#ececec;box-sizing:border-box;border:1px solid #bcbcbc;border-bottom-color:#999;-moz-border-radius:5px;-webkit-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);-webkit-box-shadow:0 1px 0 #fff inset,0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 #fff inset,0 1px 0 rgba(0,0,0,0.25);}
41
  #wassup-wrap .button:hover,#wassup-wrap .button:focus,#wassup-wrap .button:active {background-color:#d9d9d9;border-color:#9f9f9f;border-bottom-color:#888;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;}
61
  #wassup-menu #donate-link a img {vertical-align:middle;margin:0 auto;}
62
  #wassup-menu li:first-child {margin-right:20px;}
63
  .wassup-wp-legacy #screen-meta #contextual-help-link,.wassup-wp-legacy #screen-meta #contextual-help-link.show-settings{display:none;}
64
+ @media (max-width: 639px) {
65
  #wassup-menu #donate-link{display:none;}
66
  }
67
  /* ------------------------------------------------------------------
83
  #wassup-wrap .boxed{display:inline;display:inline-block;min-width:100px;margin:0 3px;padding:2px 5px;text-align:center;background-color:#ededee;border:1px solid #d6d6df !important;}
84
  #wassup-wrap .borders a{text-decoration:none !important;border-bottom:0 none;}
85
  #wassup-wrap .sum-rec{margin:0;padding:0;background-color:#fffdfe;border:1px solid #bbb;}
86
+ #wassup-wrap .sum-nav{clear:left;min-height:50px;padding:5px 0 0;border-top:1px solid #fffcff;border-left:1px solid #efefe0;border-right:1px solid #efefe0;border-bottom:0 none;background:url("images/list-bg3.png") repeat-x;}
87
  #wassup-wrap .sum-mark{background-color:#f7f707;}
88
  #wassup-wrap .sum-nav-mark{background-image:none;background-color:#f7f707;}
89
  #wassup-wrap .delbut{position:absolute;top:-15px;right:0;width:130px;}
97
  #wassup-wrap .sum-det .det1{padding-left:10px;text-indent:-5px;font-size:14px;}
98
  #wassup-wrap .det3{padding-left:20px;}
99
  #wassup-wrap .det1 span{color:#00284a;}
100
+ #wassup-wrap span.malware{color:#777;}
101
+ #wassup-wrap ul.useragent >li span.malware{color:inherit;}
102
  #wassup-wrap .det1 a{font-weight:bold;border-bottom:1px solid !important;}
103
  #wassup-wrap .det2 a,#wassup-wrap .det2 a:link, #wassup-wrap .sum-det span.det2 a{color:#02a !important;}
104
  #wassup-wrap .det2 a:hover, #wassup-wrap .sum-det span.det2 a:hover {color:#d54d22 !important;}
105
  #wassup-wrap .det2 strong{color:#001616;font-weight:normal;text-shadow:none;}
106
+ #wassup-wrap .sum-box{float:left;display:block;width:180px;min-height:50px;margin:5px 0 3px 0;padding:0;color:#00284a;text-align:center;}
107
  #wassup-wrap .sum-box span{display:block;margin:0 auto;padding:0;}
108
  #wassup-wrap .sum-box-ip{width:140px;height:25px;padding:5px 0 0 0 !important;font-family:tahoma,verdana,arial,sans-serif;font-weight:bold;text-shadow:rgba(255,253,240,0.7) 0 -1px 0;background:#dde url("images/sum-box.png") bottom left;border:1px solid #b6c6cf;border-radius:3px;}
109
  #wassup-wrap .sum-det-spy span{margin:0;padding:0;margin:0 3px 0 2px;padding:0;}
123
  #wassup-wrap .detail-data ul{list-style-type:none;width:100%;min-height:28px;margin:0;padding:0;clear:left;border-top:1px solid #ccc;overflow:hidden;}
124
  #wassup-wrap .detail-data li{list-style-type:none;min-height:27px;margin:0;padding:0;line-height:1.4em;display:block;display:inline-block;float:left;}
125
  #wassup-wrap .detail-data li span{display:inline;display:inline-block;padding:3px 0 0;}
126
+ #wassup-wrap .detail-data li.agent >span{min-width:165px;}
127
+ #wassup-wrap .detail-data li.agent >.indent-li-agent{width:165px;}
128
  #wassup-wrap ul.searcheng{background-color:#abdbff;border-color:#9cd;}
129
  #wassup-wrap .searchmedia{background-color:#abbbff !important;border-color:#9b9bff !important;}
130
  #wassup-wrap ul.useragent{background-color:#46a;border-bottom:2px solid #67a;}
140
  #wassup-wrap ul.feed{background-color:#edc !important;border-color:#dcb !important;}
141
  #wassup-wrap li.feed,#wassup-wrap li.searcheng{padding:2px 10px 0 5px;border-right:1px dotted #8e8e8e;}
142
  #wassup-wrap ul.agent{border-color:#bbb;}
143
+ #wassup-wrap .detail-data li.agent{padding:0 5px;border-right:1px dotted #8e8e8e;}
144
  #wassup-wrap li.agent strong{color:#00284a;}
145
  #wassup-wrap ul.users{background-color:#faeaaa;border-color:#db7;}
146
  #wassup-wrap ul.userslogged{background-color:#cfff99;border-color:#bc6;}
151
  #wassup-wrap ul.url li{width:100%;display:block;background:#fffdfe url("images/list-bg3.png") repeat-x;border-top:1px solid #c0cfcf;}
152
  #wassup-wrap .url a,#wassup-wrap .url a:link {border-bottom:1px solid !important;}
153
  #wassup-wrap .indent-li{padding-left:12px;}
154
+ #wassup-wrap .detail-data li >.indent-li-agent{padding:3px 5px 0;display:block;float:left;}
155
+ #wassup-wrap .detail-data li.users >.indent-li-agent{padding:3px 10px 0;}
156
  #wassup-wrap .detail-data li.url span{color:#00284a;}
157
  #wassup-wrap .detail-data li .request-time{width:180px;margin:0;padding-left:0;padding-right:0;text-align:right;}
158
  #wassup-wrap .detail-data li .request-uri{padding-left:5px !important;text-align:left;}
159
  #wassup-wrap .detail-data .time{padding-right:2px;text-align:right;}
 
 
 
 
160
  #wassup-wrap .box-log{margin:0;padding:0;background-color:#e7f1c8;border:1px #bbb solid;}
161
  #wassup-wrap .box-aut{margin:0;padding:0;background-color:#fbf9d3;border:1px #ccc solid;}
162
  #wassup-wrap .box-spider{margin:0;padding:0;background-color:#c98;border:1px #999 solid;}
180
  #wassup-wrap ul.varlist{list-style:none;margin:0;padding:5px 0 0 17px;}
181
  #wassup-wrap .varlist li{display:block !important;clear:right !important;}
182
  #wassup-wrap .no-top-border{border-top:0 none;}
183
+ @media (max-width: 479px) {
184
+ #wassup-wrap .main-tabs .detail-data li.agent >.indent-li-res{display:none;}
185
+ }
186
+ @media (max-width: 639px) {
187
+ #wassup-wrap .main-tabs .detail-data ul.agent{height:28px;}
188
+ #wassup-wrap .main-tabs .detail-data li.agent >span{min-width:140px;}
189
+ #wassup-wrap .main-tabs .detail-data li.agent >.indent-li-agent{width:150px;}
190
+ }
191
+ @media (max-width: 767px) {
192
+ #wassup-wrap .detail-data .url >li >.request-time{width:115px;}
193
+ }
194
  /* ------------------------------------------------------------------
195
  * Chart and Map */
196
  #wassup-wrap .placeholder{width:100%;margin:0 -3px;padding:0 3px;text-align:center;overflow-x:auto;overflow-y:hidden;}
254
  #wassup-wrap #tabcontainer em{color:#641;}
255
  #wassup-wrap #delete-dialog{display:none;}
256
  #wassup-wrap .alertstyle{color:red;background-color:#ffd;}
257
+ #wassup-wrap .noticestyle{color:#d26400;background-color:#f9f9ff;}
258
+ #wassup-wrap .goodstyle{color:green;}
259
+ #wassup-wrap .disabledstyle,#wassup-wrap input:disabled {color:#999;background-color:#999;}
260
  #wassup-wrap .opt-prev-next{position:absolute;bottom:0;right:0;width:220px;padding:5px 10px 10px 5px;text-align:right;}
261
  #wassup-wrap .opt-prev-next a{color:#999;text-decoration:none;}
262
  #wassup-wrap .opt-info{width:100%;clear:right;}
279
  #wassup-wrap #tabcontainer li.ui-tabs-active a:focus,#wassup-wrap #tabcontainer li.ui-tabs-active a:active {outline:none;}
280
  #wassup-wrap #tabcontainer .ui-state-active a,#wassup-wrap li.ui-tabs-active a{color:#212121 !important;}
281
  #wassup-wrap #tabcontainer .ui-tabs-nav a:hover {color:#212121;}
282
+ @media (max-width: 639px) {
283
  #wassup-wrap p.description,#wassup-wrap p.opt-note{display:none;}
284
  #wassup-wrap #info-sysinfo{display:none;}
285
  }
317
  #wassup-topstats td{padding:0;border-spacing:0;border-right:1px solid #b9c9cf;}
318
  #wassup-topstats td.stat-rownum{min-width:8px;}
319
  #wassup-topstats ul.charts{list-style-type:none;margin:0;padding:0;font:8pt sans-serif;line-height:1.1em;min-width:20px;max-width:600px;}
320
+ #wassup-topstats .charts li{height:27px;margin:0;padding:0 2px;list-style-type:none;line-height:22px;overflow:hidden;border-top:1px solid #c3ccdd;background:url("images/list-bg3.png") top left repeat-x;}
321
  #wassup-topstats .charts li.chartsT{padding:6px 0 1px 5px;line-height:1.2em;color:#059;text-transform:uppercase;vertical-align:bottom;background-color:#cee1ef;background-image:none;border:1px solid #eee;border-bottom:2px solid #acd;border-left:0 none;}
322
  #wassup-topstats .firstcol{}
323
  #wassup-topstats .lastcol{}
img/Thumbs.db DELETED
Binary file
img/flags/Thumbs.db DELETED
Binary file
img/flags/catalonia.png DELETED
Binary file
img/flags/england.png DELETED
Binary file
img/flags/europeanunion.png DELETED
Binary file
img/flags/scotland.png DELETED
Binary file
img/flags/sv_old.png DELETED
Binary file
img/flags/wales.png DELETED
Binary file
img/index.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
- header('Status: 403 Forbidden');
3
- header('HTTP/1.1 403 Forbidden');
4
  ?>
1
+ <?php
2
+ header('Status: 403 Forbidden');
3
+ header('HTTP/1.1 403 Forbidden');
4
  ?>
index.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
- header('Status: 403 Forbidden');
3
- header('HTTP/1.1 403 Forbidden');
4
  ?>
1
+ <?php
2
+ header('Status: 403 Forbidden');
3
+ header('HTTP/1.1 403 Forbidden');
4
  ?>
js/index.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
- header('Status: 403 Forbidden');
3
- header('HTTP/1.1 403 Forbidden');
4
  ?>
1
+ <?php
2
+ header('Status: 403 Forbidden');
3
+ header('HTTP/1.1 403 Forbidden');
4
  ?>
js/jquery-migrate.js DELETED
@@ -1,2 +0,0 @@
1
- /*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
2
- jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
 
 
js/jquery-ui/css/jquery-ui.css DELETED
@@ -1,4 +0,0 @@
1
- /*! jQuery UI - v1.10.3 - 2013-05-03
2
- * http://jqueryui.com
3
- * Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
4
- * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:400}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.ui-menu .ui-state-disabled{font-weight:400;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(images/animated-overlay.gif);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:0;background:0;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:700}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:400;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.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{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
 
 
 
 
js/jquery-ui/js/jquery-ui.min.js DELETED
@@ -1,7 +0,0 @@
1
- /*! jQuery UI - v1.10.4 - 2014-04-02
2
- * http://jqueryui.com
3
- * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
4
- * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
5
-
6
- (function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),k=t.position.getScrollInfo(y),w=(e.collision||"flip").split(" "),D={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=h.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=h.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),D[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),a=i(D.at,p,g),v.left+=a[0],v.top+=a[1],this.each(function(){var n,h,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),x=u+f+s(this,"marginRight")+k.width,C=d+_+s(this,"marginBottom")+k.height,M=t.extend({},v),T=i(D.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?M.left-=u:"center"===e.my[0]&&(M.left-=u/2),"bottom"===e.my[1]?M.top-=d:"center"===e.my[1]&&(M.top-=d/2),M.left+=T[0],M.top+=T[1],t.support.offsetFractions||(M.left=l(M.left),M.top=l(M.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[w[i]]&&t.ui.position[w[i]][s](M,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:x,collisionHeight:C,offset:[a[0]+T[0],a[1]+T[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(h=function(t){var i=m.left-M.left,s=i+p-u,n=m.top-M.top,a=n+g-d,l={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:M.left,top:M.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(l.horizontal="center"),d>g&&g>r(n+a)&&(l.vertical="middle"),l.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-o-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-o-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-o-a,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(e){var t=0,i={},a={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",a.height=a.paddingTop=a.paddingBottom=a.borderTopWidth=a.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.10.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e(),content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),undefined):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),undefined)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,a=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:n=this.headers[(s+1)%a];break;case i.LEFT:case i.UP:n=this.headers[(s-1+a)%a];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:n=this.headers[0];break;case i.END:n=this.headers[a-1]}n&&(e(t.target).attr("tabIndex",-1),e(n).attr("tabIndex",0),n.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,a=this.options,s=a.heightStyle,n=this.element.parent(),r=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t);this.active=this._findActive(a.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(t){var i=e(this),a=i.attr("id"),s=i.next(),n=s.attr("id");a||(a=r+"-header-"+t,i.attr("id",a)),n||(n=r+"-panel-"+t,s.attr("id",n)),i.attr("aria-controls",n),s.attr("aria-labelledby",a)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(a.event),"fill"===s?(i=n.height(),this.element.siblings(":visible").each(function(){var t=e(this),a=t.css("position");"absolute"!==a&&"fixed"!==a&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(i=0,this.headers.next().each(function(){i=Math.max(i,e(this).css("height","").height())}).height(i))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,a=this.active,s=e(t.currentTarget),n=s[0]===a[0],r=n&&i.collapsible,o=r?e():s.next(),h=a.next(),d={oldHeader:a,oldPanel:h,newHeader:r?e():s,newPanel:o};t.preventDefault(),n&&!i.collapsible||this._trigger("beforeActivate",t,d)===!1||(i.active=r?!1:this.headers.index(s),this.active=n?e():s,this._toggle(d),a.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&a.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),n||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,a=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=a,this.options.animate?this._animate(i,a,t):(a.hide(),i.show(),this._toggleComplete(t)),a.attr({"aria-hidden":"true"}),a.prev().attr("aria-selected","false"),i.length&&a.length?a.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,t,s){var n,r,o,h=this,d=0,c=e.length&&(!t.length||e.index()<t.index()),l=this.options.animate||{},u=c&&l.down||l,v=function(){h._toggleComplete(s)};return"number"==typeof u&&(o=u),"string"==typeof u&&(r=u),r=r||u.easing||l.easing,o=o||u.duration||l.duration,t.length?e.length?(n=e.show().outerHeight(),t.animate(i,{duration:o,easing:r,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(a,{duration:o,easing:r,complete:v,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?d+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(n-t.outerHeight()-d),d=0)}}),undefined):t.animate(i,o,r,v):e.animate(a,o,r,v)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}})})(jQuery);(function(e){e.widget("ui.autocomplete",{version:"1.10.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,undefined;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:s})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):undefined},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[e](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})})(jQuery);(function(e){var t,i="ui-button ui-widget ui-state-default ui-corner-all",n="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",s=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},a=function(t){var i=t.name,n=t.form,s=e([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.10.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,s),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var n=this,o=this.options,r="checkbox"===this.type||"radio"===this.type,h=r?"":"ui-state-active";null===o.label&&(o.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){o.disabled||this===t&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){o.disabled||e(this).removeClass(h)}).bind("click"+this.eventNamespace,function(e){o.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),r&&this.element.bind("change"+this.eventNamespace,function(){n.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return o.disabled?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(o.disabled)return!1;e(this).addClass("ui-state-active"),n.buttonElement.attr("aria-pressed","true");var t=n.element[0];a(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return o.disabled?!1:(e(this).addClass("ui-state-active"),t=this,n.document.one("mouseup",function(){t=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return o.disabled?!1:(e(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(t){return o.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",o.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(i+" ui-state-active "+n).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.element.prop("disabled",!!t),t&&this.buttonElement.removeClass("ui-state-focus"),undefined):(this._resetButton(),undefined)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?a(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var t=this.buttonElement.removeClass(n),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,a=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(a?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(a?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):o.push("ui-button-text-only"),t.addClass(o.join(" "))}}),e.widget("ui.buttonset",{version:"1.10.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function(e,t){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.dpDiv=a(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){e.datepicker._isDisabledDatepicker(n.inline?t.parent()[0]:n.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))})}function s(t,i){e.extend(t,i);for(var a in i)null==i[a]&&(t[a]=i[a]);return t}e.extend(e.ui,{datepicker:{version:"1.10.4"}});var n,r="datepicker";e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return s(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var a,s,n;a=t.nodeName.toLowerCase(),s="div"===a||"span"===a,t.id||(this.uuid+=1,t.id="dp"+this.uuid),n=this._newInst(e(t),s),n.settings=e.extend({},i||{}),"input"===a?this._connectDatepicker(t,n):s&&this._inlineDatepicker(t,n)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var a=e(t);i.append=e([]),i.trigger=e([]),a.hasClass(this.markerClassName)||(this._attachments(a,i),a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,r,i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var a,s,n,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=e("<span class='"+this._appendClass+"'>"+r+"</span>"),t[o?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),a=this._get(i,"showOn"),("focus"===a||"both"===a)&&t.focus(this._showDatepicker),("button"===a||"both"===a)&&(s=this._get(i,"buttonText"),n=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:n,alt:s,title:s}):e("<button type='button'></button>").addClass(this._triggerClass).html(n?e("<img/>").attr({src:n,alt:s,title:s}):s)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,a,s,n=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,a=0,s=0;e.length>s;s++)e[s].length>i&&(i=e[s].length,a=s);return a},n.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),e.input.attr("size",this._formatDate(e,n).length)}},_inlineDatepicker:function(t,i){var a=e(t);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(i.dpDiv),e.data(t,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,a,n,o){var u,c,h,l,d,p=this._dialogInst;return p||(this.uuid+=1,u="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+u+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],r,p)),s(p.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(c=document.documentElement.clientWidth,h=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+l,h/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(t){var i,a=e(t),s=e.data(t,r);a.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,r),"input"===i?(s.append.remove(),s.trigger.remove(),a.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&a.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,a,n){var r,o,u,c,h=this._getInst(i);return 2===arguments.length&&"string"==typeof a?"defaults"===a?e.extend({},e.datepicker._defaults):h?"all"===a?e.extend({},h.settings):this._get(h,a):null:(r=a||{},"string"==typeof a&&(r={},r[a]=n),h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),u=this._getMinMaxDate(h,"min"),c=this._getMinMaxDate(h,"max"),s(h.settings,r),null!==u&&r.dateFormat!==t&&r.minDate===t&&(h.settings.minDate=this._formatDate(h,u)),null!==c&&r.dateFormat!==t&&r.maxDate===t&&(h.settings.maxDate=this._formatDate(h,c)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h)),t)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,a,s,n=e.datepicker._getInst(t.target),r=!0,o=n.dpDiv.is(".ui-datepicker-rtl");if(n._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",n.dpDiv),s[0]&&e.datepicker._selectDay(t.target,n.selectedMonth,n.selectedYear,s[0]),i=e.datepicker._get(n,"onSelect"),i?(a=e.datepicker._formatDate(n),i.apply(n.input?n.input[0]:null,[a,n])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(i){var a,s,n=e.datepicker._getInst(i.target);return e.datepicker._get(n,"constrainInput")?(a=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">s||!a||a.indexOf(s)>-1):t},_doKeyUp:function(t){var i,a=e.datepicker._getInst(t.target);if(a.input.val()!==a.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,e.datepicker._getFormatConfig(a)),i&&(e.datepicker._setDateFromField(a),e.datepicker._updateAlternate(a),e.datepicker._updateDatepicker(a))}catch(s){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,a,n,r,o,u,c;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),a=e.datepicker._get(i,"beforeShow"),n=a?a.apply(t,[t,i]):{},n!==!1&&(s(i.settings,n),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return r|="fixed"===e(this).css("position"),!r}),o={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),o=e.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(u=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[u]?i.dpDiv.show(u,e.datepicker._get(i,"showOptions"),c):i.dpDiv[u||"show"](u?c:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,n=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,a=this._getNumberOfMonths(t),s=a[1],r=17;t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),t.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,a){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,u=document.documentElement.clientWidth+(a?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-r:0,i.left-=a&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=a&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>u&&u>s?Math.abs(i.left+s-u):0),i.top-=Math.min(i.top,i.top+n>c&&c>n?Math.abs(n+o):0),i},_findPos:function(t){for(var i,a=this._getInst(t),s=this._get(a,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,a,s,n,o=this._curInst;!o||t&&o!==e.data(t,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),a=this._get(o,"duration"),s=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),a,s):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?a:null,s),i||s(),this._datepickerShowing=!1,n=this._get(o,"onClose"),n&&n.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),a=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==a)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,a){var s=e(t),n=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(n,i+("M"===a?this._get(n,"showCurrentAtPos"):0),a),this._updateDatepicker(n))},_gotoToday:function(t){var i,a=e(t),s=this._getInst(a[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(a)},_selectMonthYear:function(t,i,a){var s=e(t),n=this._getInst(s[0]);n["selected"+("M"===a?"Month":"Year")]=n["draw"+("M"===a?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(n),this._adjustDate(s)},_selectDay:function(t,i,a,s){var n,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(n=this._getInst(r[0]),n.selectedDay=n.currentDay=e("a",s).html(),n.selectedMonth=n.currentMonth=i,n.selectedYear=n.currentYear=a,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var a,s=e(t),n=this._getInst(s[0]);i=null!=i?i:this._formatDate(n),n.input&&n.input.val(i),this._updateAlternate(n),a=this._get(n,"onSelect"),a?a.apply(n.input?n.input[0]:null,[i,n]):n.input&&n.input.trigger("change"),n.inline?this._updateDatepicker(n):(this._hideDatepicker(),this._lastInput=n.input[0],"object"!=typeof n.input[0]&&n.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,a,s,n=this._get(t,"altField");n&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),a=this._getDate(t),s=this.formatDate(i,a,this._getFormatConfig(t)),e(n).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(i,a,s){if(null==i||null==a)throw"Invalid arguments";if(a="object"==typeof a?""+a:a+"",""===a)return null;var n,r,o,u,c=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,p=(s?s.dayNames:null)||this._defaults.dayNames,g=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,m=(s?s.monthNames:null)||this._defaults.monthNames,f=-1,_=-1,v=-1,k=-1,y=!1,b=function(e){var t=i.length>n+1&&i.charAt(n+1)===e;return t&&n++,t},D=function(e){var t=b(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s=RegExp("^\\d{1,"+i+"}"),n=a.substring(c).match(s);if(!n)throw"Missing number at position "+c;return c+=n[0].length,parseInt(n[0],10)},w=function(i,s,n){var r=-1,o=e.map(b(i)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,i){var s=i[1];return a.substr(c,s.length).toLowerCase()===s.toLowerCase()?(r=i[0],c+=s.length,!1):t}),-1!==r)return r+1;throw"Unknown name at position "+c},M=function(){if(a.charAt(c)!==i.charAt(n))throw"Unexpected literal at position "+c;c++};for(n=0;i.length>n;n++)if(y)"'"!==i.charAt(n)||b("'")?M():y=!1;else switch(i.charAt(n)){case"d":v=D("d");break;case"D":w("D",d,p);break;case"o":k=D("o");break;case"m":_=D("m");break;case"M":_=w("M",g,m);break;case"y":f=D("y");break;case"@":u=new Date(D("@")),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"!":u=new Date((D("!")-this._ticksTo1970)/1e4),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"'":b("'")?M():y=!0;break;default:M()}if(a.length>c&&(o=a.substr(c),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===f?f=(new Date).getFullYear():100>f&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(l>=f?0:-100)),k>-1)for(_=1,v=k;;){if(r=this._getDaysInMonth(f,_-1),r>=v)break;_++,v-=r}if(u=this._daylightSavingAdjust(new Date(f,_-1,v)),u.getFullYear()!==f||u.getMonth()+1!==_||u.getDate()!==v)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var a,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,n=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,u=function(t){var i=e.length>a+1&&e.charAt(a+1)===t;return i&&a++,i},c=function(e,t,i){var a=""+t;if(u(e))for(;i>a.length;)a="0"+a;return a},h=function(e,t,i,a){return u(e)?a[t]:i[t]},l="",d=!1;if(t)for(a=0;e.length>a;a++)if(d)"'"!==e.charAt(a)||u("'")?l+=e.charAt(a):d=!1;else switch(e.charAt(a)){case"d":l+=c("d",t.getDate(),2);break;case"D":l+=h("D",t.getDay(),s,n);break;case"o":l+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=c("m",t.getMonth()+1,2);break;case"M":l+=h("M",t.getMonth(),r,o);break;case"y":l+=u("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=1e4*t.getTime()+this._ticksTo1970;break;case"'":u("'")?l+="'":d=!0;break;default:l+=e.charAt(a)}return l},_possibleChars:function(e){var t,i="",a=!1,s=function(i){var a=e.length>t+1&&e.charAt(t+1)===i;return a&&t++,a};for(t=0;e.length>t;t++)if(a)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):a=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":a=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),a=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),n=s,r=this._getFormatConfig(e);try{n=this.parseDate(i,a,r)||s}catch(o){a=t?"":a}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=a?n.getDate():0,e.currentMonth=a?n.getMonth():0,e.currentYear=a?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,a){var s=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},n=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(a){}for(var s=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,n=s.getFullYear(),r=s.getMonth(),o=s.getDate(),u=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=u.exec(i);c;){switch(c[2]||"d"){case"d":case"D":o+=parseInt(c[1],10);break;case"w":case"W":o+=7*parseInt(c[1],10);break;case"m":case"M":r+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r));break;case"y":case"Y":n+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r))}c=u.exec(i)}return new Date(n,r,o)},r=null==i||""===i?a:"string"==typeof i?n(i):"number"==typeof i?isNaN(i)?a:s(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?a:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var a=!t,s=e.selectedMonth,n=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&n===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(a?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),a="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(a,-i,"M")},next:function(){e.datepicker._adjustDate(a,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(a)},selectDay:function(){return e.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(a,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,a,s,n,r,o,u,c,h,l,d,p,g,m,f,_,v,k,y,b,D,w,M,C,x,I,N,T,A,E,S,Y,F,P,O,j,K,R,H=new Date,W=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),L=this._get(e,"isRTL"),U=this._get(e,"showButtonPanel"),B=this._get(e,"hideIfNoPrevNext"),z=this._get(e,"navigationAsDateFormat"),q=this._getNumberOfMonths(e),G=this._get(e,"showCurrentAtPos"),J=this._get(e,"stepMonths"),Q=1!==q[0]||1!==q[1],V=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),$=this._getMinMaxDate(e,"min"),X=this._getMinMaxDate(e,"max"),Z=e.drawMonth-G,et=e.drawYear;if(0>Z&&(Z+=12,et--),X)for(t=this._daylightSavingAdjust(new Date(X.getFullYear(),X.getMonth()-q[0]*q[1]+1,X.getDate())),t=$&&$>t?$:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=z?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-J,1)),this._getFormatConfig(e)):i,a=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"e":"w")+"'>"+i+"</span></a>":B?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"e":"w")+"'>"+i+"</span></a>",s=this._get(e,"nextText"),s=z?this.formatDate(s,this._daylightSavingAdjust(new Date(et,Z+J,1)),this._getFormatConfig(e)):s,n=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"w":"e")+"'>"+s+"</span></a>":B?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"w":"e")+"'>"+s+"</span></a>",r=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?V:W,r=z?this.formatDate(r,o,this._getFormatConfig(e)):r,u=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",c=U?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(L?u:"")+(this._isInRange(e,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(L?"":u)+"</div>":"",h=parseInt(this._get(e,"firstDay"),10),h=isNaN(h)?0:h,l=this._get(e,"showWeek"),d=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),g=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),f=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),v=this._get(e,"selectOtherMonths"),k=this._getDefaultDate(e),y="",D=0;q[0]>D;D++){for(w="",this.maxRows=4,M=0;q[1]>M;M++){if(C=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),x=" ui-corner-all",I="",Q){if(I+="<div class='ui-datepicker-group",q[1]>1)switch(M){case 0:I+=" ui-datepicker-group-first",x=" ui-corner-"+(L?"right":"left");break;case q[1]-1:I+=" ui-datepicker-group-last",x=" ui-corner-"+(L?"left":"right");break;default:I+=" ui-datepicker-group-middle",x=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+x+"'>"+(/all|left/.test(x)&&0===D?L?n:a:"")+(/all|right/.test(x)&&0===D?L?a:n:"")+this._generateMonthYearHeader(e,Z,et,$,X,D>0||M>0,g,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",N=l?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",b=0;7>b;b++)T=(b+h)%7,N+="<th"+((b+h+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[T]+"'>"+p[T]+"</span></th>";for(I+=N+"</tr></thead><tbody>",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),E=(this._getFirstDayOfMonth(et,Z)-h+7)%7,S=Math.ceil((E+A)/7),Y=Q?this.maxRows>S?this.maxRows:S:S,this.maxRows=Y,F=this._daylightSavingAdjust(new Date(et,Z,1-E)),P=0;Y>P;P++){for(I+="<tr>",O=l?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(F)+"</td>":"",b=0;7>b;b++)j=f?f.apply(e.input?e.input[0]:null,[F]):[!0,""],K=F.getMonth()!==Z,R=K&&!v||!j[0]||$&&$>F||X&&F>X,O+="<td class='"+((b+h+6)%7>=5?" ui-datepicker-week-end":"")+(K?" ui-datepicker-other-month":"")+(F.getTime()===C.getTime()&&Z===e.selectedMonth&&e._keyEvent||k.getTime()===F.getTime()&&k.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(K&&!_?"":" "+j[1]+(F.getTime()===V.getTime()?" "+this._currentClass:"")+(F.getTime()===W.getTime()?" ui-datepicker-today":""))+"'"+(K&&!_||!j[2]?"":" title='"+j[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+F.getMonth()+"' data-year='"+F.getFullYear()+"'")+">"+(K&&!_?"&#xa0;":R?"<span class='ui-state-default'>"+F.getDate()+"</span>":"<a class='ui-state-default"+(F.getTime()===W.getTime()?" ui-state-highlight":"")+(F.getTime()===V.getTime()?" ui-state-active":"")+(K?" ui-priority-secondary":"")+"' href='#'>"+F.getDate()+"</a>")+"</td>",F.setDate(F.getDate()+1),F=this._daylightSavingAdjust(F);I+=O+"</tr>"}Z++,Z>11&&(Z=0,et++),I+="</tbody></table>"+(Q?"</div>"+(q[0]>0&&M===q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=I}y+=w}return y+=c,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,i,a,s,n,r,o){var u,c,h,l,d,p,g,m,f=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),v=this._get(e,"showMonthAfterYear"),k="<div class='ui-datepicker-title'>",y="";if(n||!f)y+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(u=a&&a.getFullYear()===i,c=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;12>h;h++)(!u||h>=a.getMonth())&&(!c||s.getMonth()>=h)&&(y+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"</option>");y+="</select>"}if(v||(k+=y+(!n&&f&&_?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",n||!_)k+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(l=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);
7
- return isNaN(t)?d:t},g=p(l[0]),m=Math.max(g,p(l[1]||"")),g=a?Math.max(g,a.getFullYear()):g,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=g;g++)e.yearshtml+="<option value='"+g+"'"+(g===i?" selected='selected'":"")+">"+g+"</option>";e.yearshtml+="</select>",k+=e.yearshtml,e.yearshtml=null}return k+=this._get(e,"yearSuffix"),v&&(k+=(!n&&f&&_?"":"&#xa0;")+y),k+="</div>"},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),n=Math.min(e.selectedDay,this._getDaysInMonth(a,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,s,n)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return a&&s>a?a:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var s=this._getNumberOfMonths(e),n=this._daylightSavingAdjust(new Date(i,a+(0>t?t:s[0]*s[1]),1));return 0>t&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(e,n)},_isInRange:function(e,t){var i,a,s=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),r=null,o=null,u=this._get(e,"yearRange");return u&&(i=u.split(":"),a=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=a),i[1].match(/[+\-].*/)&&(o+=a)),(!s||t.getTime()>=s.getTime())&&(!n||t.getTime()<=n.getTime())&&(!r||t.getFullYear()>=r)&&(!o||o>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.10.4"})(jQuery);(function(e){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.10.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,a=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._destroyOverlay(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(s){}this._hide(this.uiDialog,this.options.hide,function(){a._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",e),i},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var e=this.element.find("[autofocus]");e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),undefined;if(t.keyCode===e.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),a=i.filter(":first"),s=i.filter(":last");t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==a[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(s.focus(1),t.preventDefault()):(a.focus(1),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(e.each(i,function(i,a){var s,n;a=e.isFunction(a)?{click:a,text:i}:a,a=e.extend({type:"button"},a),s=a.click,a.click=function(){s.apply(t.element[0],arguments)},n={icons:a.icons,text:a.showText},delete a.icons,delete a.showText,e("<button></button>",a).button(n).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,a=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(a,s){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",a,t(s))},drag:function(e,a){i._trigger("drag",e,t(a))},stop:function(s,n){a.position=[n.position.left-i.document.scrollLeft(),n.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,t(n))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,a=this.options,s=a.resizable,n=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:this._minHeight(),handles:r,start:function(a,s){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",a,t(s))},resize:function(e,a){i._trigger("resize",e,t(a))},stop:function(s,n){a.height=e(this).height(),a.width=e(this).width(),e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,t(n))}}).css("position",n)},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(a){var s=this,n=!1,r={};e.each(a,function(e,a){s._setOption(e,a),e in t&&(n=!0),e in i&&(r[e]=a)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(e,t){var i,a,s=this.uiDialog;"dialogClass"===e&&s.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!t&&s.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(a=s.is(":data(ui-resizable)"),a&&!t&&s.resizable("destroy"),a&&"string"==typeof t&&s.resizable("option","handles",t),a||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,a=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),a.minWidth>a.width&&(a.width=a.minWidth),e=this.uiDialog.css({height:"auto",width:a.width}).outerHeight(),t=Math.max(0,a.minHeight-e),i="number"==typeof a.maxHeight?Math.max(0,a.maxHeight-e):"none","auto"===a.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,a.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=this,i=this.widgetFullName;e.ui.dialog.overlayInstances||this._delay(function(){e.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(a){t._allowInteraction(a)||(a.preventDefault(),e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),e.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(e.ui.dialog.overlayInstances--,e.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),e.ui.dialog.overlayInstances=0,e.uiBackCompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{_position:function(){var t,i=this.options.position,a=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(a=i.split?i.split(" "):[i[0],i[1]],1===a.length&&(a[1]=a[0]),e.each(["left","top"],function(e,t){+a[e]===a[e]&&(s[e]=a[e],a[e]=t)}),i={my:a[0]+(0>s[0]?s[0]:"+"+s[0])+" "+a[1]+(0>s[1]?s[1]:"+"+s[1]),at:a.join(" ")}),i=e.extend({},e.ui.dialog.prototype.options.position,i)):i=e.ui.dialog.prototype.options.position,t=this.uiDialog.is(":visible"),t||this.uiDialog.show(),this.uiDialog.position(i),t||this.uiDialog.hide()}})})(jQuery);(function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,a=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,a))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,a,o,r,l,h,c,u,d,p=t(this).data("ui-draggable"),g=p.options,f=g.snapTolerance,m=i.offset.left,_=m+p.helperProportions.width,v=i.offset.top,b=v+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,l=r+p.snapElements[u].width,h=p.snapElements[u].top,c=h+p.snapElements[u].height,r-f>_||m>l+f||h-f>b||v>c+f||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==g.snapMode&&(s=f>=Math.abs(h-b),n=f>=Math.abs(c-v),a=f>=Math.abs(r-_),o=f>=Math.abs(l-m),s&&(i.position.top=p._convertPositionTo("relative",{top:h-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=s||n||a||o,"outer"!==g.snapMode&&(s=f>=Math.abs(h-v),n=f>=Math.abs(c-b),a=f>=Math.abs(r-m),o=f>=Math.abs(l-_),s&&(i.position.top=p._convertPositionTo("relative",{top:h,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||a||o||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],undefined):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},t.ui.ddmanager.droppables[i.scope]=t.ui.ddmanager.droppables[i.scope]||[],t.ui.ddmanager.droppables[i.scope].push(this),i.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,a,o=(t.positionAbs||t.position.absolute).left,r=(t.positionAbs||t.position.absolute).top,l=o+t.helperProportions.width,h=r+t.helperProportions.height,c=i.offset.left,u=i.offset.top,d=c+i.proportions().width,p=u+i.proportions().height;switch(s){case"fit":return o>=c&&d>=l&&r>=u&&p>=h;case"intersect":return o+t.helperProportions.width/2>c&&d>l-t.helperProportions.width/2&&r+t.helperProportions.height/2>u&&p>h-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,a=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(a,u,i.proportions().height)&&e(n,c,i.proportions().width);case"touch":return(r>=u&&p>=r||h>=u&&p>=h||u>r&&h>p)&&(o>=c&&d>=o||l>=c&&d>=l||c>o&&l>d);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,a=t.ui.ddmanager.droppables[e.options.scope]||[],o=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||e&&!a[s].accept.call(a[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue t}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=t.ui.intersect(e,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),a.length&&(s=t.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,a){var o,r=a.re.exec(i),l=r&&a.parse(r),h=a.space||"rgba";return l?(o=s[h](l),s[c[h].cache]=o[c[h].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,o,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,l],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),a=c[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],h=s[a],c=u[n.type]||{};null!==h&&(null===o?l[a]=h:(c.mod&&(h-o>c.mod/2?o+=c.mod:o-h>c.mod/2&&(o-=c.mod)),l[a]=i((h-o)*e+o,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),l=Math.min(s,n,a),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-a)/h+360:n===r?60*(a-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[o]&&(this[o]=l(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[o]=d,n):h(d)},f(a,function(e,i){h.fn[e]||(h.fn[e]=function(n){var a,o=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=h(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",h=l.children?o.find("*").addBack():o;h=h.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),h=h.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.4",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),a=t.effects.createWrapper(l).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,m[p]=v?o:0,g||(l.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:o+r),v&&(a.css(p,0),g||a.css(f,r+o)),a.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removeWrapper(l),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"effect"),h="hide"===l,c="show"===l,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||h?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||h)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,g,m)),h&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m).animate(a,g,m),d=h?2*d:d/2;h&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m)),o.queue(function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"hide"),h="show"===l,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),h&&(n.css(d,0),n.css(p,a/2)),f[d]=h?a:0,f[p]=h?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(h,"pos"===c?-s:s),u[h]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var a,o,r,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(l=m.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=m.left+o*v,h=o-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?h*v:0),top:l+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),l="show"===r,h="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[h?0:1]),l&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=l?n[0]:c,v[f[1]]=l?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){h&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(e.times||5)+(l?1:0),c=e.duration/h,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;h>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerHeight:l.outerHeight*r,outerWidth:l.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*c.y,width:h.width*c.x,outerHeight:h.outerHeight*c.y,outerWidth:h.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=o.css("position"),_=f?r:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===g||"both"===g)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===g||"both"===g)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(h),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(n=t.effects.getBaseline(m,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),h=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+l,g[d]=(p?"+=":"-=")+2*l,m[d]=(p?"-=":"+=")+2*l,n.animate(f,u,e.easing),s=1;h>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(h,c?isNaN(s)?"-"+s:-s:s),u[h]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,l=a?o.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);(function(t,e){t.widget("ui.progressbar",{version:"1.10.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),a="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,a;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,a),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(t(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),o.containment&&(s+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-a.left||0,d=e.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,a=s?0:c.sizeDiff.width,o={width:c.helper.width()-a,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(o,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,a=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),a&&(t.height=e.maxHeight),o&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),a&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,a=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:o,h=t.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,a,o=t(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,c=o._aspectRatio||e.shiftKey,u={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-u.left),c&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),c&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-u.left:o.offset.left-u.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-u.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=Math.abs(o.parentData.left)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,c&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,c&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,a=e.containerElement,o=t(e.helper),r=o.offset(),h=o.outerWidth()-e.sizeDiff.width,l=o.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(a[e]=i||null)}),e.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,a=e.originalPosition,o=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(o)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.top=a.top-u):/^(sw)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.left=a.left-c):(p-l>0?(e.size.height=p,e.position.top=a.top-u):(e.size.height=l,e.position.top=a.top+n.height-l),d-h>0?(e.size.width=d,e.position.left=a.left-c):(e.size.width=h,e.position.left=a.left+n.width-h))}})})(jQuery);(function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=e.pageX,l=e.pageY;return a>r&&(i=r,r=a,a=i),o>l&&(i=l,l=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:l-o}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?h=!(i.left>r||a>i.right||i.top>l||o>i.bottom):"fit"===n.tolerance&&(h=i.left>a&&r>i.right&&i.top>o&&l>i.bottom),h?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()/2,top:e.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t=t.cloneNode(!1),t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.4",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);
 
 
 
 
 
 
 
js/jquery.js DELETED
@@ -1,3 +0,0 @@
1
- /*! jQuery v1.8.3 jquery.com | jquery.org/license */
2
- (function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window);
3
- jQuery.noConflict();
 
 
 
js/jquery.min.js DELETED
@@ -1,4 +0,0 @@
1
- /*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */
2
- (function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(Q.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(w,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g+"With"](this===b?d:this,[h])}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete
3
- t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},F=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?a.type:"",c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var K={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=S.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bb.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean
4
- (a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bv(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bv)return bv(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cr(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cq("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cq("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cr(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||co(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cs=/^t(?:able|d|h)$/i,ct=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cu(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cs.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
 
 
 
 
js/spia.js CHANGED
@@ -25,21 +25,31 @@ $.fn.spy = function(settings) {
25
  // always returns false, so you need to implement it manually.
26
  spy.isDupe = function(latest, last) {
27
  if(last){ //Wassup v1.9 bugfix for undefined error
28
- if((last.constructor == Object) && (o.method == 'html')) {return (String(latest.text()).substring(0,32) == String(last.text()).substring(0,32));}
29
- else if(last.constructor == String){ return (latest == last);}
30
- else{ return false; }
31
  } else {
32
  return false;
33
  }
34
  }
35
- spy.timestamp = function() {var now=new Date();return Math.floor((now - spy.epoch) / 1000);}
 
 
 
36
  spy.parse = function(e, r) {
37
  spy.parsing = 1; // flag to stop pull via ajax
38
- if(o.method == 'html'){$('div#_spyTmp').html(r);
39
- }else if(o.method == 'json'){ eval('spy.json = ' + r);}
40
  if ((o.method == 'json' && spy.json.constructor == Array) || o.method == 'html') {
41
  if (spy.parseItem(e)) {
42
- spy.waitTimer = window.setInterval(function(){if(spyRunning){ if(!spy.parseItem(e)){ spy.parsing = 0;clearInterval(spy.waitTimer);}}},o.pushTimeout);
 
 
 
 
 
 
 
43
  } else {
44
  spy.parsing = 0;
45
  }
@@ -88,13 +98,33 @@ $.fn.spy = function(settings) {
88
  var e = this;
89
  var timestamp = o.timestamp.call();
90
  var lr = ''; // last ajax return
91
- spy.ajaxTimer = window.setInterval(function() { if (spyRunning && (!spy.parsing)){ $.post(o.ajax,{'timestamp': timestamp},function(r){ spy.parse(e,r);}); timestamp = o.timestamp.call();}}, o.timeout);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  });
93
  };
94
- $.fn.fadeEachDown = function() {var s=this.size(); return this.each(function(i){ var o = 1 - (s == 1 ? 0.5 : 0.85/s*(i+1)); var e = this.style; if (window.ActiveXObject) e.filter = "alpha(opacity=" + o*100 + ")"; e.opacity = o; });};
95
  })(jQuery);
96
 
 
97
  function pauseSpy(){spyRunning=0;return false;}
98
  function playSpy(){spyRunning=1;return false;}
99
  function pad(n){n=n.toString();return (n.length==1?'0'+n:n);}
100
- function spiaTimestamp(){var d=new Date();var timestamp=d.getFullYear()+'-'+pad(d.getMonth())+'-'+pad(d.getDate());timestamp +=' ';timestamp +=pad(d.getHours())+':'+pad(d.getMinutes())+':'+pad(d.getSeconds());return timestamp;}
 
 
 
 
 
 
25
  // always returns false, so you need to implement it manually.
26
  spy.isDupe = function(latest, last) {
27
  if(last){ //Wassup v1.9 bugfix for undefined error
28
+ if ((last.constructor == Object) && (o.method == 'html')) {return (String(latest.text()).substring(0,32) == String(last.text()).substring(0,32));}
29
+ else if (last.constructor == String) {return (latest == last);}
30
+ else {return false;}
31
  } else {
32
  return false;
33
  }
34
  }
35
+ spy.timestamp = function() {
36
+ var now=new Date();
37
+ return Math.floor((now - spy.epoch) / 1000);
38
+ }
39
  spy.parse = function(e, r) {
40
  spy.parsing = 1; // flag to stop pull via ajax
41
+ if (o.method == 'html'){$('div#_spyTmp').html(r);}
42
+ else if(o.method == 'json'){ eval('spy.json = ' + r);}
43
  if ((o.method == 'json' && spy.json.constructor == Array) || o.method == 'html') {
44
  if (spy.parseItem(e)) {
45
+ spy.waitTimer = window.setInterval(function(){
46
+ if(spyRunning){
47
+ if(!spy.parseItem(e)){
48
+ spy.parsing = 0;
49
+ clearInterval(spy.waitTimer);
50
+ }
51
+ }
52
+ },o.pushTimeout);
53
  } else {
54
  spy.parsing = 0;
55
  }
98
  var e = this;
99
  var timestamp = o.timestamp.call();
100
  var lr = ''; // last ajax return
101
+ spy.ajaxTimer = window.setInterval(function() {
102
+ if (spyRunning && (!spy.parsing)){
103
+ $.post(o.ajax,{'timestamp': timestamp},function(r){ spy.parse(e,r);});
104
+ timestamp = o.timestamp.call();
105
+ }
106
+ }, o.timeout);
107
+ });
108
+ };
109
+ $.fn.fadeEachDown = function() {
110
+ var s=this.size();
111
+ return this.each(function(i){
112
+ var o = 1 - (s == 1 ? 0.5 : 0.85/s*(i+1));
113
+ var e = this.style;
114
+ if (window.ActiveXObject) e.filter = "alpha(opacity=" + o*100 + ")";
115
+ e.opacity = o;
116
  });
117
  };
 
118
  })(jQuery);
119
 
120
+ //Wassup add-ons functions...
121
  function pauseSpy(){spyRunning=0;return false;}
122
  function playSpy(){spyRunning=1;return false;}
123
  function pad(n){n=n.toString();return (n.length==1?'0'+n:n);}
124
+ function spiaTimestamp(){
125
+ var d=new Date();
126
+ var timestamp=d.getFullYear()+'-'+pad(d.getMonth())+'-'+pad(d.getDate());
127
+ timestamp +=' ';
128
+ timestamp +=pad(d.getHours())+':'+pad(d.getMinutes())+':'+pad(d.getSeconds());
129
+ return timestamp;
130
+ }
js/thickbox.js DELETED
@@ -1,10 +0,0 @@
1
- /*
2
- * Thickbox 3 - One Box To Rule Them All.
3
- * By Cody Lindley (http://www.codylindley.com)
4
- * Copyright (c) 2007 cody lindley
5
- * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
6
- */
7
-
8
- var tb_pathToImage = "/wp-content/plugins/wassup/img/loadingAnimation.gif";
9
-
10
- eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(o).2S(9(){1u(\'a.18, 3n.18, 3i.18\');1w=1p 1t();1w.L=2H});9 1u(b){$(b).s(9(){6 t=X.Q||X.1v||M;6 a=X.u||X.23;6 g=X.1N||P;19(t,a,g);X.2E();H P})}9 19(d,f,g){3m{3(2t o.v.J.2i==="2g"){$("v","11").r({A:"28%",z:"28%"});$("11").r("22","2Z");3(o.1Y("1F")===M){$("v").q("<U 5=\'1F\'></U><4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}n{3(o.1Y("B")===M){$("v").q("<4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}3(1K()){$("#B").1J("2B")}n{$("#B").1J("2z")}3(d===M){d=""}$("v").q("<4 5=\'K\'><1I L=\'"+1w.L+"\' /></4>");$(\'#K\').2y();6 h;3(f.O("?")!==-1){h=f.3l(0,f.O("?"))}n{h=f}6 i=/\\.2s$|\\.2q$|\\.2m$|\\.2l$|\\.2k$/;6 j=h.1C().2h(i);3(j==\'.2s\'||j==\'.2q\'||j==\'.2m\'||j==\'.2l\'||j==\'.2k\'){1D="";1G="";14="";1z="";1x="";R="";1n="";1r=P;3(g){E=$("a[@1N="+g+"]").36();25(D=0;((D<E.1c)&&(R===""));D++){6 k=E[D].u.1C().2h(i);3(!(E[D].u==f)){3(1r){1z=E[D].Q;1x=E[D].u;R="<1e 5=\'1X\'>&1d;&1d;<a u=\'#\'>2T &2R;</a></1e>"}n{1D=E[D].Q;1G=E[D].u;14="<1e 5=\'1U\'>&1d;&1d;<a u=\'#\'>&2O; 2N</a></1e>"}}n{1r=1b;1n="1t "+(D+1)+" 2L "+(E.1c)}}}S=1p 1t();S.1g=9(){S.1g=M;6 a=2x();6 x=a[0]-1M;6 y=a[1]-1M;6 b=S.z;6 c=S.A;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}13=b+30;1a=c+2G;$("#8").q("<a u=\'\' 5=\'1L\' Q=\'1o\'><1I 5=\'2F\' L=\'"+f+"\' z=\'"+b+"\' A=\'"+c+"\' 23=\'"+d+"\'/></a>"+"<4 5=\'2D\'>"+d+"<4 5=\'2C\'>"+1n+14+R+"</4></4><4 5=\'2A\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4>");$("#Z").s(G);3(!(14==="")){9 12(){3($(o).N("s",12)){$(o).N("s",12)}$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1D,1G,g);H P}$("#1U").s(12)}3(!(R==="")){9 1i(){$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1z,1x,g);H P}$("#1X").s(1i)}o.1h=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}n 3(I==3k){3(!(R=="")){o.1h="";1i()}}n 3(I==3j){3(!(14=="")){o.1h="";12()}}};16();$("#K").C();$("#1L").s(G);$("#8").r({Y:"T"})};S.L=f}n{6 l=f.2r(/^[^\\?]+\\??/,\'\');6 m=2p(l);13=(m[\'z\']*1)+30||3h;1a=(m[\'A\']*1)+3g||3f;W=13-30;V=1a-3e;3(f.O(\'2j\')!=-1){1E=f.1B(\'3d\');$("#15").C();3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4></4><U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\' > </U>")}n{$("#B").N();$("#8").q("<U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\'> </U>")}}n{3($("#8").r("Y")!="T"){3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\'>1l</a> 1k 1j 1s</4></4><4 5=\'F\' J=\'z:"+W+"p;A:"+V+"p\'></4>")}n{$("#B").N();$("#8").q("<4 5=\'F\' 3c=\'3b\' J=\'z:"+W+"p;A:"+V+"p;\'></4>")}}n{$("#F")[0].J.z=W+"p";$("#F")[0].J.A=V+"p";$("#F")[0].3a=0;$("#1H").11(d)}}$("#Z").s(G);3(f.O(\'37\')!=-1){$("#F").q($(\'#\'+m[\'26\']).1T());$("#8").24(9(){$(\'#\'+m[\'26\']).q($("#F").1T())});16();$("#K").C();$("#8").r({Y:"T"})}n 3(f.O(\'2j\')!=-1){16();3($.1q.35){$("#K").C();$("#8").r({Y:"T"})}}n{$("#F").34(f+="&1y="+(1p 33().32()),9(){16();$("#K").C();1u("#F a.18");$("#8").r({Y:"T"})})}}3(!m[\'1A\']){o.21=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}}}}31(e){}}9 1m(){$("#K").C();$("#8").r({Y:"T"})}9 G(){$("#2Y").N("s");$("#Z").N("s");$("#8").2X("2W",9(){$(\'#8,#B,#1F\').2V("24").N().C()});$("#K").C();3(2t o.v.J.2i=="2g"){$("v","11").r({A:"1Z",z:"1Z"});$("11").r("22","")}o.1h="";o.21="";H P}9 16(){$("#8").r({2U:\'-\'+20((13/2),10)+\'p\',z:13+\'p\'});3(!(1V.1q.2Q&&1V.1q.2P<7)){$("#8").r({38:\'-\'+20((1a/2),10)+\'p\'})}}9 2p(a){6 b={};3(!a){H b}6 c=a.1B(/[;&]/);25(6 i=0;i<c.1c;i++){6 d=c[i].1B(\'=\');3(!d||d.1c!=2){39}6 e=2a(d[0]);6 f=2a(d[1]);f=f.2r(/\\+/g,\' \');b[e]=f}H b}9 2x(){6 a=o.2M;6 w=1S.2o||1R.2o||(a&&a.1Q)||o.v.1Q;6 h=1S.1P||1R.1P||(a&&a.2n)||o.v.2n;1O=[w,h];H 1O}9 1K(){6 a=2K.2J.1C();3(a.O(\'2I\')!=-1&&a.O(\'3o\')!=-1){H 1b}}',62,211,'|||if|div|id|var||TB_window|function||||||||||||||else|document|px|append|css|click||href|body||||width|height|TB_overlay|remove|TB_Counter|TB_TempArray|TB_ajaxContent|tb_remove|return|keycode|style|TB_load|src|null|unbind|indexOf|false|title|TB_NextHTML|imgPreloader|block|iframe|ajaxContentH|ajaxContentW|this|display|TB_closeWindowButton||html|goPrev|TB_WIDTH|TB_PrevHTML|TB_iframeContent|tb_position||thickbox|tb_show|TB_HEIGHT|true|length|nbsp|span|Math|onload|onkeydown|goNext|Esc|or|close|tb_showIframe|TB_imageCount|Close|new|browser|TB_FoundURL|Key|Image|tb_init|name|imgLoader|TB_NextURL|random|TB_NextCaption|modal|split|toLowerCase|TB_PrevCaption|urlNoQuery|TB_HideSelect|TB_PrevURL|TB_ajaxWindowTitle|img|addClass|tb_detectMacXFF|TB_ImageOff|150|rel|arrayPageSize|innerHeight|clientWidth|self|window|children|TB_prev|jQuery|frameborder|TB_next|getElementById|auto|parseInt|onkeyup|overflow|alt|unload|for|inlineId||100||unescape|1000|round|hspace|TB_closeAjaxWindow|TB_title|undefined|match|maxHeight|TB_iframe|bmp|gif|png|clientHeight|innerWidth|tb_parseQuery|jpeg|replace|jpg|typeof|which|keyCode|event|tb_getPageSize|show|TB_overlayBG|TB_closeWindow|TB_overlayMacFFBGHack|TB_secondLine|TB_caption|blur|TB_Image|60|tb_pathToImage|mac|userAgent|navigator|of|documentElement|Prev|lt|version|msie|gt|ready|Next|marginLeft|trigger|fast|fadeOut|TB_imageOff|hidden||catch|getTime|Date|load|safari|get|TB_inline|marginTop|continue|scrollTop|TB_modal|class|TB_|45|440|40|630|input|188|190|substr|try|area|firefox'.split('|'),0,{}))
 
 
 
 
 
 
 
 
 
 
js/thickbox/thickbox-orig.js DELETED
@@ -1,10 +0,0 @@
1
- /*
2
- * Thickbox 3 - One Box To Rule Them All.
3
- * By Cody Lindley (http://www.codylindley.com)
4
- * Copyright (c) 2007 cody lindley
5
- * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
6
- */
7
-
8
- var tb_pathToImage = "/wp-content/plugins/wassup/thickbox/loadingAnimation.gif";
9
-
10
- eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(o).2S(9(){1u(\'a.18, 3n.18, 3i.18\');1w=1p 1t();1w.L=2H});9 1u(b){$(b).s(9(){6 t=X.Q||X.1v||M;6 a=X.u||X.23;6 g=X.1N||P;19(t,a,g);X.2E();H P})}9 19(d,f,g){3m{3(2t o.v.J.2i==="2g"){$("v","11").r({A:"28%",z:"28%"});$("11").r("22","2Z");3(o.1Y("1F")===M){$("v").q("<U 5=\'1F\'></U><4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}n{3(o.1Y("B")===M){$("v").q("<4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}3(1K()){$("#B").1J("2B")}n{$("#B").1J("2z")}3(d===M){d=""}$("v").q("<4 5=\'K\'><1I L=\'"+1w.L+"\' /></4>");$(\'#K\').2y();6 h;3(f.O("?")!==-1){h=f.3l(0,f.O("?"))}n{h=f}6 i=/\\.2s$|\\.2q$|\\.2m$|\\.2l$|\\.2k$/;6 j=h.1C().2h(i);3(j==\'.2s\'||j==\'.2q\'||j==\'.2m\'||j==\'.2l\'||j==\'.2k\'){1D="";1G="";14="";1z="";1x="";R="";1n="";1r=P;3(g){E=$("a[@1N="+g+"]").36();25(D=0;((D<E.1c)&&(R===""));D++){6 k=E[D].u.1C().2h(i);3(!(E[D].u==f)){3(1r){1z=E[D].Q;1x=E[D].u;R="<1e 5=\'1X\'>&1d;&1d;<a u=\'#\'>2T &2R;</a></1e>"}n{1D=E[D].Q;1G=E[D].u;14="<1e 5=\'1U\'>&1d;&1d;<a u=\'#\'>&2O; 2N</a></1e>"}}n{1r=1b;1n="1t "+(D+1)+" 2L "+(E.1c)}}}S=1p 1t();S.1g=9(){S.1g=M;6 a=2x();6 x=a[0]-1M;6 y=a[1]-1M;6 b=S.z;6 c=S.A;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}13=b+30;1a=c+2G;$("#8").q("<a u=\'\' 5=\'1L\' Q=\'1o\'><1I 5=\'2F\' L=\'"+f+"\' z=\'"+b+"\' A=\'"+c+"\' 23=\'"+d+"\'/></a>"+"<4 5=\'2D\'>"+d+"<4 5=\'2C\'>"+1n+14+R+"</4></4><4 5=\'2A\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4>");$("#Z").s(G);3(!(14==="")){9 12(){3($(o).N("s",12)){$(o).N("s",12)}$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1D,1G,g);H P}$("#1U").s(12)}3(!(R==="")){9 1i(){$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1z,1x,g);H P}$("#1X").s(1i)}o.1h=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}n 3(I==3k){3(!(R=="")){o.1h="";1i()}}n 3(I==3j){3(!(14=="")){o.1h="";12()}}};16();$("#K").C();$("#1L").s(G);$("#8").r({Y:"T"})};S.L=f}n{6 l=f.2r(/^[^\\?]+\\??/,\'\');6 m=2p(l);13=(m[\'z\']*1)+30||3h;1a=(m[\'A\']*1)+3g||3f;W=13-30;V=1a-3e;3(f.O(\'2j\')!=-1){1E=f.1B(\'3d\');$("#15").C();3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4></4><U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\' > </U>")}n{$("#B").N();$("#8").q("<U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\'> </U>")}}n{3($("#8").r("Y")!="T"){3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\'>1l</a> 1k 1j 1s</4></4><4 5=\'F\' J=\'z:"+W+"p;A:"+V+"p\'></4>")}n{$("#B").N();$("#8").q("<4 5=\'F\' 3c=\'3b\' J=\'z:"+W+"p;A:"+V+"p;\'></4>")}}n{$("#F")[0].J.z=W+"p";$("#F")[0].J.A=V+"p";$("#F")[0].3a=0;$("#1H").11(d)}}$("#Z").s(G);3(f.O(\'37\')!=-1){$("#F").q($(\'#\'+m[\'26\']).1T());$("#8").24(9(){$(\'#\'+m[\'26\']).q($("#F").1T())});16();$("#K").C();$("#8").r({Y:"T"})}n 3(f.O(\'2j\')!=-1){16();3($.1q.35){$("#K").C();$("#8").r({Y:"T"})}}n{$("#F").34(f+="&1y="+(1p 33().32()),9(){16();$("#K").C();1u("#F a.18");$("#8").r({Y:"T"})})}}3(!m[\'1A\']){o.21=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}}}}31(e){}}9 1m(){$("#K").C();$("#8").r({Y:"T"})}9 G(){$("#2Y").N("s");$("#Z").N("s");$("#8").2X("2W",9(){$(\'#8,#B,#1F\').2V("24").N().C()});$("#K").C();3(2t o.v.J.2i=="2g"){$("v","11").r({A:"1Z",z:"1Z"});$("11").r("22","")}o.1h="";o.21="";H P}9 16(){$("#8").r({2U:\'-\'+20((13/2),10)+\'p\',z:13+\'p\'});3(!(1V.1q.2Q&&1V.1q.2P<7)){$("#8").r({38:\'-\'+20((1a/2),10)+\'p\'})}}9 2p(a){6 b={};3(!a){H b}6 c=a.1B(/[;&]/);25(6 i=0;i<c.1c;i++){6 d=c[i].1B(\'=\');3(!d||d.1c!=2){39}6 e=2a(d[0]);6 f=2a(d[1]);f=f.2r(/\\+/g,\' \');b[e]=f}H b}9 2x(){6 a=o.2M;6 w=1S.2o||1R.2o||(a&&a.1Q)||o.v.1Q;6 h=1S.1P||1R.1P||(a&&a.2n)||o.v.2n;1O=[w,h];H 1O}9 1K(){6 a=2K.2J.1C();3(a.O(\'2I\')!=-1&&a.O(\'3o\')!=-1){H 1b}}',62,211,'|||if|div|id|var||TB_window|function||||||||||||||else|document|px|append|css|click||href|body||||width|height|TB_overlay|remove|TB_Counter|TB_TempArray|TB_ajaxContent|tb_remove|return|keycode|style|TB_load|src|null|unbind|indexOf|false|title|TB_NextHTML|imgPreloader|block|iframe|ajaxContentH|ajaxContentW|this|display|TB_closeWindowButton||html|goPrev|TB_WIDTH|TB_PrevHTML|TB_iframeContent|tb_position||thickbox|tb_show|TB_HEIGHT|true|length|nbsp|span|Math|onload|onkeydown|goNext|Esc|or|close|tb_showIframe|TB_imageCount|Close|new|browser|TB_FoundURL|Key|Image|tb_init|name|imgLoader|TB_NextURL|random|TB_NextCaption|modal|split|toLowerCase|TB_PrevCaption|urlNoQuery|TB_HideSelect|TB_PrevURL|TB_ajaxWindowTitle|img|addClass|tb_detectMacXFF|TB_ImageOff|150|rel|arrayPageSize|innerHeight|clientWidth|self|window|children|TB_prev|jQuery|frameborder|TB_next|getElementById|auto|parseInt|onkeyup|overflow|alt|unload|for|inlineId||100||unescape|1000|round|hspace|TB_closeAjaxWindow|TB_title|undefined|match|maxHeight|TB_iframe|bmp|gif|png|clientHeight|innerWidth|tb_parseQuery|jpeg|replace|jpg|typeof|which|keyCode|event|tb_getPageSize|show|TB_overlayBG|TB_closeWindow|TB_overlayMacFFBGHack|TB_secondLine|TB_caption|blur|TB_Image|60|tb_pathToImage|mac|userAgent|navigator|of|documentElement|Prev|lt|version|msie|gt|ready|Next|marginLeft|trigger|fast|fadeOut|TB_imageOff|hidden||catch|getTime|Date|load|safari|get|TB_inline|marginTop|continue|scrollTop|TB_modal|class|TB_|45|440|40|630|input|188|190|substr|try|area|firefox'.split('|'),0,{}))
 
 
 
 
 
 
 
 
 
 
js/thickbox/thickbox.js CHANGED
@@ -1 +1,317 @@
1
- eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('6 1z="31.1D";(9($){$.14=9(1k){14(1k)};$.O=9(t,a,g){O(t,a,g)};$.v=9(){v()};$(c).32(9(){14(\'a.1f, 39.1f, 3r.1f\');1q=1E 1U();3(1L 1z!=="1B")1q.J=1z});9 14(1k){$(1k).l(9(){6 t=Q.U||Q.1w||K;6 a=Q.n||Q.2k;6 g=Q.2e||M;O(t,a,g);Q.3s();G M})}9 O(B,d,16){3d{3(1L c.o.H.2D==="1B"){$("o","12").D({q:"2b%",p:"2b%"});$("12").D("2z","2X");3(c.2c("1K")===K){$("o").m("<T 5=\'1K\'></T><4 5=\'r\'></4><4 5=\'8\'></4>");$("#r").l(v)}}b{3(c.2c("r")===K){$("o").m("<4 5=\'r\'></4><4 5=\'8\'></4>");$("#r").l(v)}}3(2s()){$("#r").2d("3a")}b{$("#r").2d("3D")}3(B===K){B=""}$("o").m("<4 5=\'F\'><2n J=\'"+1q.J+"\' /></4>");$(\'#F\').3B();6 1n;3(d.L("?")!==-1){1n=d.35(0,d.L("?"))}b{1n=d}6 1O=/\\.2a$|\\.28$|\\.24$|\\.1D$|\\.26$/;6 P=1n.1Q().2f(1O);3(P==\'.2a\'||P==\'.28\'||P==\'.24\'||P==\'.1D\'||P==\'.26\'){1G="";1u="";15="";1s="";1x="";R="";1F="";1J=M;3(16){z=$("a[@2e="+16+"]").37();2F(s=0;((s<z.1b)&&(R===""));s++){6 3b=z[s].n.1Q().2f(1O);3(!(z[s].n==d)){3(1J){1s=z[s].U;1x=z[s].n;R="<1h 5=\'2h\'>&1a;&1a;<a n=\'#\'>38 &3c;</a></1h>"}b{1G=z[s].U;1u=z[s].n;15="<1h 5=\'2j\'>&1a;&1a;<a n=\'#\'>&2Q; 2P</a></1h>"}}b{1J=19;1F="1U "+(s+1)+" 2T "+(z.1b)}}}S=1E 1U();S.1e=9(){S.1e=K;6 1R=2I();6 x=1R[0]-2m;6 y=1R[1]-2m;6 f=S.p;6 k=S.q;3(f>x){k=k*(x/f);f=x;3(k>y){f=f*(y/k);k=y}}b 3(k>y){f=f*(y/k);k=y;3(f>x){k=k*(x/f);f=x}}X=f+30;1l=k+3E;$("#8").m("<a n=\'\' 5=\'2o\' U=\'1P\'><2n 5=\'3v\' J=\'"+d+"\' p=\'"+f+"\' q=\'"+k+"\' 2k=\'"+B+"\'/></a>"+"<4 5=\'3x\'>"+B+"<4 5=\'3y\'>"+1F+15+R+"</4></4><4 5=\'3C\'><a n=\'#\' 5=\'V\' U=\'1P\'>1T</a> 1I 1H 1W</4>");$("#V").l(v);3(!(15==="")){9 18(){3($(c).I("l",18)){$(c).I("l",18)}$("#8").u();$("o").m("<4 5=\'8\'></4>");O(1G,1u,16);G M}$("#2j").l(18)}3(!(R==="")){9 1y(){$("#8").u();$("o").m("<4 5=\'8\'></4>");O(1s,1x,16);G M}$("#2h").l(1y)}c.1m=9(e){3(e==K){C=2q.2r}b{C=e.2H}3(C==27){v()}b 3(C==3g){3(!(R=="")){c.1m="";1y()}}b 3(C==3j){3(!(15=="")){c.1m="";18()}}};Z();$("#F").u();$("#2o").l(v);$("#8").1d(3o)};S.J=d}b{6 21=d.2u(/^[^\\?]+\\??/,\'\');6 E=2B(21);X=(E[\'p\']*1)+30||3m;1l=(E[\'q\']*1)+3w||3n;W=X-30;N=1l-3p;3(d.L(\'2w\')!=-1){1M=d.1N(\'3i\');$("#11").u();3(E[\'1r\']!="19"){$("#8").m("<4 5=\'2M\'><4 5=\'1v\'>"+B+"</4><4 5=\'2K\'><a n=\'#\' 5=\'V\' U=\'1P\'>1T</a> 1I 1H 1W</4></4><T 1Y=\'0\' 22=\'0\' J=\'"+1M[0]+"\' 5=\'11\' 1w=\'11"+1j.20(1j.1C()*2p)+"\' 1e=\'1S()\' H=\'p:"+(W+29)+"j;q:"+(N+17)+"j;\' > </T>")}b{$("#r").I();$("#8").m("<T 1Y=\'0\' 22=\'0\' J=\'"+1M[0]+"\' 5=\'11\' 1w=\'11"+1j.20(1j.1C()*2p)+"\' 1e=\'1S()\' H=\'p:"+(W+29)+"j;q:"+(N+17)+"j;\'> </T>")}}b{3($("#8").D("2x")!="2y"){3(E[\'1r\']!="19"){$("#8").m("<4 5=\'2M\'><4 5=\'1v\'>"+B+"</4><4 5=\'2K\'><a n=\'#\' 5=\'V\'>1T</a> 1I 1H 1W</4></4><4 5=\'A\' H=\'p:"+W+"j;q:"+N+"j\'></4>")}b{$("#r").I();$("#8").m("<4 5=\'A\' 2Z=\'2U\' H=\'p:"+W+"j;q:"+N+"j;\'></4>")}}b{$("#A")[0].H.p=W+"j";$("#A")[0].H.q=N+"j";$("#A")[0].3A=0;$("#1v").12(B)}}$("#V").l(v);3(d.L(\'3l\')!=-1){$("#A").m($(\'#\'+E[\'2G\']).2v());$("#8").2E(9(){$(\'#\'+E[\'2G\']).m($("#A").2v())});Z();$("#F").u();$("#8").1d(1p)}b 3(d.L(\'2w\')!=-1){Z();3($.1o.3k){$("#F").u();$("#8").1d(1p)}}b{$("#A").3f(d+="&1C="+(1E 3e().3h()),9(){Z();$("#F").u();14("#A a.1f");$("#8").1d(1p)})}}3(!E[\'1r\']){c.2A=9(e){3(e==K){C=2q.2r}b{C=e.2H}3(C==27){v()}}}}3u(e){}}9 1S(){$("#F").u();$("#8").D({2x:"2y"})}9 v(){$("#2V").I("l");$("#V").I("l");$("#8").2O(2N,9(){$(\'#8,#r,#1K\').2R("2E").I().u()});$("#F").u();3(1L c.o.H.2D=="1B"){$("o","12").D({q:"2C",p:"2C"});$("12").D("2z","")}c.1m="";c.2A="";G M}9 Z(){$("#8").D({33:\'-\'+2L((X/2),10)+\'j\',p:X+\'j\'});3(!(1V.1o.34&&1V.1o.3t<7)){$("#8").D({3q:\'-\'+2L((1l/2),10)+\'j\'})}}})(1V);9 2B(1A){6 1i={};3(!1A){G 1i}6 1t=1A.1N(/[;&]/);2F(6 i=0;i<1t.1b;i++){6 13=1t[i].1N(\'=\');3(!13||13.1b!=2){2Y}6 2J=2t(13[0]);6 1g=2t(13[1]);1g=1g.2u(/\\+/g,\' \');1i[2J]=1g}G 1i}9 2I(){6 Y=c.2W;6 w=2i.1X||2g.1X||(Y&&Y.1Z)||c.o.1Z;6 h=2i.23||2g.23||(Y&&Y.25)||c.o.25;2l=[w,h];G 2l}9 2s(){6 1c=2S.1c.1Q();3(1c.L(\'3z\')!=-1&&1c.L(\'36\')!=-1){G 19}}',62,227,'|||if|div|id|var||TB_window|function||else|document|url||imageWidth||||px|imageHeight|click|append|href|body|width|height|TB_overlay|TB_Counter||remove|tb_remove||||TB_TempArray|TB_ajaxContent|caption|keycode|css|params|TB_load|return|style|unbind|src|null|indexOf|false|ajaxContentH|tb_show|urlType|this|TB_NextHTML|imgPreloader|iframe|title|TB_closeWindowButton|ajaxContentW|TB_WIDTH|de|tb_position||TB_iframeContent|html|KeyVal|tb_init|TB_PrevHTML|imageGroup||goPrev|true|nbsp|length|userAgent|slideDown|onload|thickbox|val|span|Params|Math|domChunk|TB_HEIGHT|onkeydown|baseURL|browser|500|imgLoader|modal|TB_NextCaption|Pairs|TB_PrevURL|TB_ajaxWindowTitle|name|TB_NextURL|goNext|tb_pathToImage|query|undefined|random|gif|new|TB_imageCount|TB_PrevCaption|Esc|or|TB_FoundURL|TB_HideSelect|typeof|urlNoQuery|split|urlString|Close|toLowerCase|pagesize|tb_showIframe|close|Image|jQuery|Key|innerWidth|frameborder|clientWidth|round|queryString|hspace|innerHeight|png|clientHeight|bmp||jpeg||jpg|100|getElementById|addClass|rel|match|self|TB_next|window|TB_prev|alt|arrayPageSize|150|img|TB_ImageOff|1000|event|keyCode|tb_detectMacXFF|unescape|replace|children|TB_iframe|display|block|overflow|onkeyup|tb_parseQuery|auto|maxHeight|unload|for|inlineId|which|tb_getPageSize|key|TB_closeAjaxWindow|parseInt|TB_title|600|slideUp|Prev|lt|trigger|navigator|of|TB_modal|TB_imageOff|documentElement|hidden|continue|class||loadingAnimation|ready|marginLeft|msie|substr|firefox|get|Next|area|TB_overlayMacFFBGHack|urlTypeTemp|gt|try|Date|load|190|getTime|TB_|188|safari|TB_inline|630|440|900|45|marginTop|input|blur|version|catch|TB_Image|40|TB_caption|TB_secondLine|mac|scrollTop|show|TB_closeWindow|TB_overlayBG|60'.split('|'),0,{}))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Thickbox 3.1 - One Box To Rule Them All.
3
+ * By Cody Lindley (http://www.codylindley.com)
4
+ * Copyright (c) 2007 cody lindley
5
+ * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
6
+ */
7
+
8
+ /*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
9
+ (function($) {
10
+ //on page load call tb_init
11
+ $(document).ready(function(){
12
+ tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
13
+ imgLoader = new Image();// preload image
14
+ imgLoader.src = tb_pathToImage;
15
+ });
16
+
17
+ //add thickbox to href & area elements that have a class of .thickbox
18
+ function tb_init(domChunk){
19
+ $(domChunk).click(function(){
20
+ var t = this.title || this.name || null;
21
+ var a = this.href || this.alt;
22
+ var g = this.rel || false;
23
+ tb_show(t,a,g);
24
+ this.blur();
25
+ return false;
26
+ });
27
+ }
28
+
29
+ function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
30
+
31
+ try {
32
+ if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
33
+ $("body","html").css({height: "100%", width: "100%"});
34
+ $("html").css("overflow","hidden");
35
+ if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
36
+ $("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
37
+ $("#TB_overlay").click(tb_remove);
38
+ }
39
+ }else{//all others
40
+ if(document.getElementById("TB_overlay") === null){
41
+ $("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
42
+ $("#TB_overlay").click(tb_remove);
43
+ }
44
+ }
45
+
46
+ if(tb_detectMacXFF()){
47
+ $("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
48
+ }else{
49
+ $("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
50
+ }
51
+
52
+ if(caption===null){caption="";}
53
+ $("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page
54
+ $('#TB_load').show();//show loader
55
+
56
+ var baseURL;
57
+ if(url.indexOf("?")!==-1){ //ff there is a query string involved
58
+ baseURL = url.substr(0, url.indexOf("?"));
59
+ }else{
60
+ baseURL = url;
61
+ }
62
+
63
+ var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
64
+ var urlType = baseURL.toLowerCase().match(urlString);
65
+
66
+ if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
67
+
68
+ TB_PrevCaption = "";
69
+ TB_PrevURL = "";
70
+ TB_PrevHTML = "";
71
+ TB_NextCaption = "";
72
+ TB_NextURL = "";
73
+ TB_NextHTML = "";
74
+ TB_imageCount = "";
75
+ TB_FoundURL = false;
76
+ if(imageGroup){
77
+ TB_TempArray = $("a[@rel="+imageGroup+"]").get();
78
+ for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
79
+ var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
80
+ if (!(TB_TempArray[TB_Counter].href == url)) {
81
+ if (TB_FoundURL) {
82
+ TB_NextCaption = TB_TempArray[TB_Counter].title;
83
+ TB_NextURL = TB_TempArray[TB_Counter].href;
84
+ TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";
85
+ } else {
86
+ TB_PrevCaption = TB_TempArray[TB_Counter].title;
87
+ TB_PrevURL = TB_TempArray[TB_Counter].href;
88
+ TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";
89
+ }
90
+ } else {
91
+ TB_FoundURL = true;
92
+ TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length);
93
+ }
94
+ }
95
+ }
96
+
97
+ imgPreloader = new Image();
98
+ imgPreloader.onload = function(){
99
+ imgPreloader.onload = null;
100
+
101
+ // Resizing large images - orginal by Christian Montoya edited by me.
102
+ var pagesize = tb_getPageSize();
103
+ var x = pagesize[0] - 150;
104
+ var y = pagesize[1] - 150;
105
+ var imageWidth = imgPreloader.width;
106
+ var imageHeight = imgPreloader.height;
107
+ if (imageWidth > x) {
108
+ imageHeight = imageHeight * (x / imageWidth);
109
+ imageWidth = x;
110
+ if (imageHeight > y) {
111
+ imageWidth = imageWidth * (y / imageHeight);
112
+ imageHeight = y;
113
+ }
114
+ } else if (imageHeight > y) {
115
+ imageWidth = imageWidth * (y / imageHeight);
116
+ imageHeight = y;
117
+ if (imageWidth > x) {
118
+ imageHeight = imageHeight * (x / imageWidth);
119
+ imageWidth = x;
120
+ }
121
+ }
122
+ // End Resizing
123
+
124
+ TB_WIDTH = imageWidth + 30;
125
+ TB_HEIGHT = imageHeight + 60;
126
+ $("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");
127
+
128
+ $("#TB_closeWindowButton").click(tb_remove);
129
+
130
+ if (!(TB_PrevHTML === "")) {
131
+ function goPrev(){
132
+ if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
133
+ $("#TB_window").remove();
134
+ $("body").append("<div id='TB_window'></div>");
135
+ tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
136
+ return false;
137
+ }
138
+ $("#TB_prev").click(goPrev);
139
+ }
140
+
141
+ if (!(TB_NextHTML === "")) {
142
+ function goNext(){
143
+ $("#TB_window").remove();
144
+ $("body").append("<div id='TB_window'></div>");
145
+ tb_show(TB_NextCaption, TB_NextURL, imageGroup);
146
+ return false;
147
+ }
148
+ $("#TB_next").click(goNext);
149
+
150
+ }
151
+
152
+ document.onkeydown = function(e){
153
+ if (e == null) { // ie
154
+ keycode = event.keyCode;
155
+ } else { // mozilla
156
+ keycode = e.which;
157
+ }
158
+ if(keycode == 27){ // close
159
+ tb_remove();
160
+ } else if(keycode == 190){ // display previous image
161
+ if(!(TB_NextHTML == "")){
162
+ document.onkeydown = "";
163
+ goNext();
164
+ }
165
+ } else if(keycode == 188){ // display next image
166
+ if(!(TB_PrevHTML == "")){
167
+ document.onkeydown = "";
168
+ goPrev();
169
+ }
170
+ }
171
+ };
172
+
173
+ tb_position();
174
+ $("#TB_load").remove();
175
+ $("#TB_ImageOff").click(tb_remove);
176
+ $("#TB_window").css({display:"block"}); //for safari using css instead of show
177
+ };
178
+
179
+ imgPreloader.src = url;
180
+ }else{//code to show html
181
+
182
+ var queryString = url.replace(/^[^\?]+\??/,'');
183
+ var params = tb_parseQuery( queryString );
184
+
185
+ TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
186
+ TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL
187
+ ajaxContentW = TB_WIDTH - 30;
188
+ ajaxContentH = TB_HEIGHT - 45;
189
+
190
+ if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window
191
+ urlNoQuery = url.split('TB_');
192
+ $("#TB_iframeContent").remove();
193
+ if(params['modal'] != "true"){//iframe no modal
194
+ $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>");
195
+ }else{//iframe modal
196
+ $("#TB_overlay").unbind();
197
+ $("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>");
198
+ }
199
+ }else{// not an iframe, ajax
200
+ if($("#TB_window").css("display") != "block"){
201
+ if(params['modal'] != "true"){//ajax no modal
202
+ $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
203
+ }else{//ajax modal
204
+ $("#TB_overlay").unbind();
205
+ $("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
206
+ }
207
+ }else{//this means the window is already up, we are just loading new content via ajax
208
+ $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
209
+ $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
210
+ $("#TB_ajaxContent")[0].scrollTop = 0;
211
+ $("#TB_ajaxWindowTitle").html(caption);
212
+ }
213
+ }
214
+
215
+ $("#TB_closeWindowButton").click(tb_remove);
216
+
217
+ if(url.indexOf('TB_inline') != -1){
218
+ $("#TB_ajaxContent").append($('#' + params['inlineId']).children());
219
+ $("#TB_window").unload(function () {
220
+ $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished
221
+ });
222
+ tb_position();
223
+ $("#TB_load").remove();
224
+ $("#TB_window").css({display:"block"});
225
+ }else if(url.indexOf('TB_iframe') != -1){
226
+ tb_position();
227
+ if($.browser.safari){//safari needs help because it will not fire iframe onload
228
+ $("#TB_load").remove();
229
+ $("#TB_window").css({display:"block"});
230
+ }
231
+ }else{
232
+ $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
233
+ tb_position();
234
+ $("#TB_load").remove();
235
+ tb_init("#TB_ajaxContent a.thickbox");
236
+ $("#TB_window").css({display:"block"});
237
+ });
238
+ }
239
+
240
+ }
241
+
242
+ if(!params['modal']){
243
+ document.onkeyup = function(e){
244
+ if (e == null) { // ie
245
+ keycode = event.keyCode;
246
+ } else { // mozilla
247
+ keycode = e.which;
248
+ }
249
+ if(keycode == 27){ // close
250
+ tb_remove();
251
+ }
252
+ };
253
+ }
254
+
255
+ } catch(e) {
256
+ //nothing here
257
+ }
258
+ }
259
+
260
+ //helper functions below
261
+ function tb_showIframe(){
262
+ $("#TB_load").remove();
263
+ $("#TB_window").css({display:"block"});
264
+ }
265
+
266
+ function tb_remove() {
267
+ $("#TB_imageOff").unbind("click");
268
+ $("#TB_closeWindowButton").unbind("click");
269
+ $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
270
+ $("#TB_load").remove();
271
+ if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
272
+ $("body","html").css({height: "auto", width: "auto"});
273
+ $("html").css("overflow","");
274
+ }
275
+ document.onkeydown = "";
276
+ document.onkeyup = "";
277
+ return false;
278
+ }
279
+
280
+ function tb_position() {
281
+ $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
282
+ if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
283
+ $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
284
+ }
285
+ }
286
+
287
+ function tb_parseQuery ( query ) {
288
+ var Params = {};
289
+ if ( ! query ) {return Params;}// return empty object
290
+ var Pairs = query.split(/[;&]/);
291
+ for ( var i = 0; i < Pairs.length; i++ ) {
292
+ var KeyVal = Pairs[i].split('=');
293
+ if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
294
+ var key = unescape( KeyVal[0] );
295
+ var val = unescape( KeyVal[1] );
296
+ val = val.replace(/\+/g, ' ');
297
+ Params[key] = val;
298
+ }
299
+ return Params;
300
+ }
301
+
302
+ function tb_getPageSize(){
303
+ var de = document.documentElement;
304
+ var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
305
+ var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
306
+ arrayPageSize = [w,h];
307
+ return arrayPageSize;
308
+ }
309
+
310
+ function tb_detectMacXFF() {
311
+ var userAgent = navigator.userAgent.toLowerCase();
312
+ if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
313
+ return true;
314
+ }
315
+ }
316
+ }(jQuery));
317
+
js/ui.base.js DELETED
@@ -1,2 +0,0 @@
1
- eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3(C){C.8=C.8||{};C.L(C.8,{2m:{1f:3(E,F,H){7 G=C.8[E].1d;1p(7 D 2l H){G.R[D]=G.R[D]||[];G.R[D].2k([F,H[D]])}},m:3(D,E,G){7 H=D.R[E];6(!H){4}1p(7 F=0;F<H.2j;F++){6(D.5[H[F][0]]){H[F][1].d(D.a,G)}}}},w:{},g:3(D){6(C.8.w[D]){4 C.8.w[D]}7 E=C(\'<2i 2h="8-2g-2f">\').2e(D).g({11:"2d",b:"-1o",j:"-1o",2c:"2b"}).2a("O");C.8.w[D]=!!((!/29|28/.k(E.g("27"))||(/^[1-9]/).k(E.g("26"))||(/^[1-9]/).k(E.g("25"))||!(/1m/).k(E.g("24"))||!(/23|22\\(0, 0, 0, 0\\)/).k(E.g("21"))));20{C("O").1n(0).1Z(E.1n(0))}1Y(F){}4 C.8.w[D]},1X:3(D){D.X="1e";D.1l=3(){4 c};6(D.Q){D.Q.1k="1m"}},1W:3(D){D.X="1V";D.1l=3(){4 h};6(D.Q){D.Q.1k=""}},1U:3(G,E){7 D=/b/.k(E||"b")?"1h":"1j",F=c;6(G[D]>0){4 h}G[D]=1;F=G[D]>0?h:c;G[D]=0;4 F}});C.M(["12","1i"],3(E,D){6(!C.P["p"+D]){C.P["p"+D]=3(F){4 F!=1T?2.M(3(){2==v||2==f?v.1S(D=="12"?F:C(v)["1j"](),D=="1i"?F:C(v)["1h"]()):2["p"+D]=F}):2[0]==v||2[0]==f?1R[(D=="12"?"1Q":"1P")]||C.1O&&f.1N["p"+D]||f.O["p"+D]:2[0]["p"+D]}}});7 B=C.P.10;C.P.L({11:3(){7 F=2.1g();7 E=2.N();7 D=E.1g();4{b:F.b-A(2[0],"1M")-D.b-A(E,"1L"),j:F.j-A(2[0],"1K")-D.j-A(E,"1J")}},N:3(){7 D=2[0].N;1I(D&&(!/^O|1H$/i.k(D.1G)&&C.g(D,"11")=="1F")){D=D.N}4 C(D)},K:3(D){4 2.M(3(){1E C.8.K(2,D)})},1D:3(D){4 2.M(3(){6(C.Z(2,"8-Y")){C.Z(2,"8-Y").1c()}})},10:3(){13("*",2).1f(2).1a("10");4 B.d(2,u)}});3 A(D,E){4 1C(C.1B(D.1A?D[0]:D,E,h))||0}C.8.K=3(F,E){7 D=2;2.a=F;C.Z(2.a,"8-Y",2);2.5=C.L({},E);C(F).V("1b.e",3(){4 D.W.d(D,u)});6(C.16.15){C(F).1z("X","1e")}C(F).J(3(){6(D.t){18(D.t)}})};C.L(C.8.K.1d,{1c:3(){C(2.a).s("1b.e")},1a:3(){4 2.W.d(2,u)},W:3(F){6(F.1y!=1||C.1x(F.1w.1v.1u(),2.5.1t||[])!=-1||(2.5.19&&!2.5.19.d(2.5.l||2,[F,2.a]))){4 h}7 E=2;7 D=3(){E.q={j:F.T,b:F.S};C(f).V("J.e",3(){4 E.r.d(E,u)});C(f).V("U.e",3(){4 E.n.d(E,u)});6(!E.1s&&I.z(E.q.j-F.T)>=E.5.y||I.z(E.q.b-F.S)>=E.5.y){6(E.5.x){E.5.x.m(E.5.l||E,F,E.a)}6(E.5.n){E.5.n.m(E.5.l||E,F,2.a)}E.o=h}};6(2.5.17){6(2.t){18(2.t)}2.t=1r(D,2.5.17)}14{D()}4 c},r:3(D){7 E=2.5;6(!2.o){4 C(f).s("J.e").s("U.e")}6(2.5.r){2.5.r.m(2.5.l||2,D,2.a)}C(f).s("J.e").s("U.e");2.o=c;4 c},n:3(D){7 E=2.5;6(C.16.15&&!D.1q){4 2.r.d(2,[D])}6(!2.o&&(I.z(2.q.j-D.T)>=E.y||I.z(2.q.b-D.S)>=E.y)){6(2.5.x){2.5.x.m(2.5.l||2,D,2.a)}2.o=h}14{6(!2.o){4 c}}6(E.n){E.n.m(2.5.l||2,D,2.a)}4 c}})})(13);',62,147,'||this|function|return|options|if|var|ui||element|top|false|apply|draggable|document|css|true||left|test|executor|call|drag|initialized|scroll|_MP|stop|unbind|timer|arguments|window|cssCache|start|distance|abs|||||||||Math|mouseup|mouseInteraction|extend|each|offsetParent|body|fn|style|plugins|pageY|pageX|mousemove|bind|click|unselectable|mouse|data|remove|position|Left|jQuery|else|msie|browser|delay|clearInterval|condition|trigger|mousedown|destroy|prototype|on|add|offset|scrollTop|Top|scrollLeft|MozUserSelect|onselectstart|none|get|5000px|for|button|setTimeout|initalized|dragPrevention|toLowerCase|nodeName|target|inArray|which|attr|jquery|curCSS|parseInt|removeMouseInteraction|new|static|tagName|html|while|borderLeftWidth|marginLeft|borderTopWidth|marginTop|documentElement|boxModel|pageYOffset|pageXOffset|self|scrollTo|undefined|hasScroll|off|enableSelection|disableSelection|catch|removeChild|try|backgroundColor|rgba|transparent|backgroundImage|width|height|cursor|default|auto|appendTo|block|display|absolute|addClass|gen|resizable|class|div|length|push|in|plugin'.split('|'),0,{}))
2
-
 
 
js/ui.tabs.js DELETED
@@ -1,2 +0,0 @@
1
- eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4(A){A.3a.3=4(){6 C=1O 1v[0]=="1N"&&1v[0];6 B=C&&22.1x.39.38(1v,1)||1v;e C=="n"?A.b(2[0],"3").$3.n:2.y(4(){5(C){6 D=A.b(2,"3");5(D){D[C].37(D,B)}}m{36 A.8.3(2,B[0]||{})}})};A.8.3=4(D,C){6 B=2;2.7=A.1j({},A.8.3.28,C);2.f=D;5(C.d===t){2.7.d=t}2.7.w+=".3";A(D).U("35.3",4(F,E,G){5((/^d/).1Y(E)){B.16(G)}m{B.7[E]=G;B.1g()}}).U("34.3",4(F,E){e B.7[E]});A.b(D,"3",2);2.1g(1c)};A.8.3.28={d:0,1t:l,w:"1E",k:[],13:t,1p:"33&#32;",z:l,24:"8-3-",1m:{},14:t,1X:\'<1u><a o="#{o}"><1o>#{1d}</1o></a></1u>\',1C:"<27></27>",1k:"8-3-31",i:"8-3-d",1y:"8-3-1t",V:"8-3-k",Y:"8-3-23",x:"8-3-30",1b:"8-3-2Z"};A.1j(A.8.3.1x,{1D:4(B){e B.26&&B.26.12(/\\s/g,"25").12(/[^A-2Y-2X-9\\-25:\\.]/g,"")||2.7.24+A.b(B)},8:4(C,B){e{2W:2,7:2.7,2V:C,23:B}},1g:4(N){2.$j=A("1u:2U(a[o])",2.f);2.$3=2.$j.1r(4(){e A("a",2)[0]});2.$c=A([]);6 O=2,E=2.7;2.$3.y(4(Q,P){5(P.u&&P.u.12("#","")){O.$c=O.$c.19(P.u)}m{5(A(P).11("o")!="#"){A.b(P,"o.3",P.o);A.b(P,"p.3",P.o);6 S=O.1D(P);P.o="#"+S;6 R=A("#"+S);5(!R.n){R=A(E.1C).11("1h",S).h(E.Y).2T(O.$c[Q-1]||O.f);R.b("18.3",1c)}O.$c=O.$c.19(R)}m{E.k.1R(Q+1)}}});5(N){A(2.f).v(E.1k)||A(2.f).h(E.1k);2.$c.y(4(){6 P=A(2);P.v(E.Y)||P.h(E.Y)});2.$3.y(4(S,P){5(1I.u){5(P.u==1I.u){E.d=S;5(A.X.1i||A.X.2S){6 R=A(1I.u),T=R.11("1h");R.11("1h","");1z(4(){R.11("1h",T)},2R)}2Q(0,0);e l}}m{5(E.13){6 Q=2P(A.13("8-3"+A.b(O.f)),10);5(Q&&O.$3[Q]){E.d=Q;e l}}m{5(O.$j.r(S).v(E.i)){E.d=S;e l}}}});2.$c.h(E.x);2.$j.q(E.i);5(E.d!==t){2.$c.r(E.d).1Z().q(E.x);2.$j.r(E.d).h(E.i)}6 D=E.d!==t&&A.b(2.$3[E.d],"p.3");5(D){2.p(E.d)}E.k=A.2O(E.k.2N(A.1r(2.$j.Z("."+E.V),4(Q,P){e O.$j.1e(Q)}))).1Q();A(2M).U("2L",4(){O.$3.15(".3");O.$j=O.$3=O.$c=t})}2K(6 H=0,M;M=2.$j[H];H++){A(M)[A.1U(H,E.k)!=-1&&!A(M).v(E.i)?"h":"q"](E.V)}5(E.z===l){2.$3.1a("z.3")}6 C,J,B={"2J-2I":0,1H:1},F="2H";5(E.14&&E.14.2G==22){C=E.14[0]||B,J=E.14[1]||B}m{C=J=E.14||B}6 I={1q:"",2F:"",2E:""};5(!A.X.1i){I.1G=""}4 L(Q,P,R){P.21(C,C.1H||F,4(){P.h(E.x).1f(I);5(A.X.1i&&C.1G){P[0].20.Z=""}5(R){K(Q,R,P)}})}4 K(Q,R,P){5(J===B){R.1f("1q","1B")}R.21(J,J.1H||F,4(){R.q(E.x).1f(I);5(A.X.1i&&J.1G){R[0].20.Z=""}A(O.f).W("2D",[O.8(Q,R[0])],E.1Z)})}4 G(Q,S,P,R){S.h(E.i).2C().q(E.i);L(Q,P,R)}2.$3.15(".3").U(E.w,4(){6 S=A(2).2B("1u:r(0)"),P=O.$c.Z(":2A"),R=A(2.u);5((S.v(E.i)&&!E.1t)||S.v(E.V)||A(2).v(E.1b)||A(O.f).W("2z",[O.8(2,R[0])],E.16)===l){2.1s();e l}O.7.d=O.$3.1e(2);5(E.1t){5(S.v(E.i)){O.7.d=t;S.q(E.i);O.$c.1F();L(2,P);2.1s();e l}m{5(!P.n){O.$c.1F();6 Q=2;O.p(O.$3.1e(2),4(){S.h(E.i).h(E.1y);K(Q,R)});2.1s();e l}}}5(E.13){A.13("8-3"+A.b(O.f),O.7.d,E.13)}O.$c.1F();5(R.n){6 Q=2;O.p(O.$3.1e(2),P.n?4(){G(Q,S,P,R)}:4(){S.h(E.i);K(Q,R)})}m{2y"1J 2x 2w: 2v 2u 2t."}5(A.X.1i){2.1s()}e l});5(!(/^1E/).1Y(E.w)){2.$3.U("1E.3",4(){e l})}},19:4(E,D,C){5(C==1M){C=2.$3.n}6 G=2.7;6 I=A(G.1X.12(/#\\{o\\}/,E).12(/#\\{1d\\}/,D));I.b("18.3",1c);6 H=E.2s("#")==0?E.12("#",""):2.1D(A("a:2r-2q",I)[0]);6 F=A("#"+H);5(!F.n){F=A(G.1C).11("1h",H).h(G.Y).h(G.x);F.b("18.3",1c)}5(C>=2.$j.n){I.1W(2.f);F.1W(2.f.2p)}m{I.1V(2.$j[C]);F.1V(2.$c[C])}G.k=A.1r(G.k,4(K,J){e K>=C?++K:K});2.1g();5(2.$3.n==1){I.h(G.i);F.q(G.x);6 B=A.b(2.$3[0],"p.3");5(B){2.p(C,B)}}A(2.f).W("2o",[2.8(2.$3[C],2.$c[C])],G.19)},17:4(B){6 D=2.7,E=2.$j.r(B).17(),C=2.$c.r(B).17();5(E.v(D.i)&&2.$3.n>1){2.16(B+(B+1<2.$3.n?1:-1))}D.k=A.1r(A.1T(D.k,4(G,F){e G!=B}),4(G,F){e G>=B?--G:G});2.1g();A(2.f).W("2n",[2.8(E.2m("a")[0],C[0])],D.17)},1S:4(B){6 C=2.7;5(A.1U(B,C.k)==-1){e}6 D=2.$j.r(B).q(C.V);5(A.X.2l){D.1f("1q","2k-1B");1z(4(){D.1f("1q","1B")},0)}C.k=A.1T(C.k,4(F,E){e F!=B});A(2.f).W("2j",[2.8(2.$3[B],2.$c[B])],C.1S)},1P:4(C){6 B=2,D=2.7;5(C!=D.d){2.$j.r(C).h(D.V);D.k.1R(C);D.k.1Q();A(2.f).W("2i",[2.8(2.$3[C],2.$c[C])],D.1P)}},16:4(B){5(1O B=="1N"){B=2.$3.1e(2.$3.Z("[o$="+B+"]")[0])}2.$3.r(B).2h(2.7.w)},p:4(F,K){6 L=2,C=2.7,D=2.$3.r(F),J=D[0],G=K==1M||K===l,B=D.b("p.3");K=K||4(){};5(!B||(A.b(J,"z.3")&&!G)){K();e}5(C.1p){6 H=A("1o",J);H.b("1d.3",H.1n()).1n("<1L>"+C.1p+"</1L>")}6 I=4(){L.$3.Z("."+C.1b).y(4(){A(2).q(C.1b);5(C.1p){6 M=A("1o",2);M.1n(M.b("1d.3")).1a("1d.3")}});L.1l=t};6 E=A.1j({},C.1m,{1K:B,1A:4(N,M){A(J.u).1n(N);I();K();5(C.z){A.b(J,"z.3",1c)}A(L.f).W("2g",[L.8(L.$3[F],L.$c[F])],C.p);C.1m.1A&&C.1m.1A(N,M)}});5(2.1l){2.1l.2f();I()}D.h(C.1b);1z(4(){L.1l=A.2e(E)},0)},1K:4(C,B){2.$3.r(C).1a("z.3").b("p.3",B)},18:4(){6 B=2.7;A(2.f).15(".3").q(B.1k).1a("3");2.$3.y(4(){6 C=A.b(2,"o.3");5(C){2.o=C}6 D=A(2).15(".3");A.y(["o","p","z"],4(E,F){D.1a(F+".3")})});2.$j.19(2.$c).y(4(){5(A.b(2,"18.3")){A(2).17()}m{A(2).q([B.i,B.1y,B.V,B.Y,B.x].2d(" "))}})}});A.1j(A.8.3.1x,{1w:t,2c:4(C,F){F=F||l;6 B=2,E=2.7.d;4 G(){B.1w=2b(4(){E=++E<B.$3.n?E:0;B.16(E)},C)}4 D(H){5(!H||H.2a){29(B.1w)}}5(C){G();5(!F){2.$3.U(2.7.w,D)}m{2.$3.U(2.7.w,4(){D();E=B.7.d;G()})}}m{D();2.$3.15(2.7.w,D)}}})})(1J);',62,197,'||this|tabs|function|if|var|options|ui|||data|panels|selected|return|element||addClass|selectedClass|lis|disabled|false|else|length|href|load|removeClass|eq||null|hash|hasClass|event|hideClass|each|cache|||||||||||||||||||||bind|disabledClass|triggerHandler|browser|panelClass|filter||attr|replace|cookie|fx|unbind|select|remove|destroy|add|removeData|loadingClass|true|label|index|css|tabify|id|msie|extend|navClass|xhr|ajaxOptions|html|span|spinner|display|map|blur|unselect|li|arguments|rotation|prototype|unselectClass|setTimeout|success|block|panelTemplate|tabId|click|stop|opacity|duration|location|jQuery|url|em|undefined|string|typeof|disable|sort|push|enable|grep|inArray|insertBefore|appendTo|tabTemplate|test|show|style|animate|Array|panel|idPrefix|_|title|div|defaults|clearInterval|clientX|setInterval|rotate|join|ajax|abort|tabsload|trigger|tabsdisable|tabsenable|inline|safari|find|tabsremove|tabsadd|parentNode|child|first|indexOf|identifier|fragment|Mismatching|Tabs|UI|throw|tabsselect|visible|parents|siblings|tabsshow|height|overflow|constructor|normal|width|min|for|unload|window|concat|unique|parseInt|scrollTo|500|opera|insertAfter|has|tab|instance|z0|Za|loading|hide|nav|8230|Loading|getData|setData|new|apply|call|slice|fn'.split('|'),0,{}))
2
-
 
 
js/wassup.js CHANGED
@@ -1,14 +1,25 @@
1
  /**
2
- * wassup.js - Javascripts for wassup
3
- * version 0.1 2015-10-05
4
  */
5
- //for refresh countdown in wassup-detail and wassup-online
6
- var _countDowncontainer="0";
7
  var _currentSeconds=0;
8
- var tickerID = 0;
9
- function ActivateCountDown(strContainerID, initialValue){_countDowncontainer=document.getElementById(strContainerID);SetCountdownText(initialValue);tickerID=window.setInterval("CountDownTick()",1000);}
10
- function CountDownTick(){if(_currentSeconds >0){SetCountdownText(_currentSeconds-1);}else{clearInterval(tickerID);tickerID=0;}}
11
- function SetCountdownText(seconds){_currentSeconds=seconds;var strText=AddZero(seconds);if(_countDowncontainer){_countDowncontainer.innerHTML=strText;}}
 
 
 
 
 
 
 
 
 
 
 
12
  function AddZero(num){return((num >= "0")&&(num < 10))?"0"+num:num+"";}
13
- //common javascripts
14
  function wScrollTop(){document.body.scrollTop=document.documentElement.scrollTop=0;}
1
  /**
2
+ * wassup.js - Some common javascripts used in Wassup
3
+ * @since v1.9 (2015-10-05)
4
  */
5
+ var actionparam=""; //for Wassup ajax actions
6
+ var _countDowncontainer="0"; //for Detail/Online refresh countdown
7
  var _currentSeconds=0;
8
+ var tickerID=0;
9
+ function ActivateCountDown(strContainerID, initialValue){
10
+ _countDowncontainer=document.getElementById(strContainerID);
11
+ SetCountdownText(initialValue);
12
+ tickerID=window.setInterval("CountDownTick()",1000);
13
+ }
14
+ function CountDownTick(){
15
+ if(_currentSeconds >0){SetCountdownText(_currentSeconds-1);}
16
+ else{clearInterval(tickerID);tickerID=0;}
17
+ }
18
+ function SetCountdownText(seconds){
19
+ _currentSeconds=seconds;
20
+ var strText=AddZero(seconds);
21
+ if(_countDowncontainer){_countDowncontainer.innerHTML=strText;}
22
+ }
23
  function AddZero(num){return((num >= "0")&&(num < 10))?"0"+num:num+"";}
24
+ //for Options screen navigation
25
  function wScrollTop(){document.body.scrollTop=document.documentElement.scrollTop=0;}
language/da_DA.mo CHANGED
Binary file
language/index.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
- header('Status: 403 Forbidden');
3
- header('HTTP/1.1 403 Forbidden');
4
  ?>
1
+ <?php
2
+ header('Status: 403 Forbidden');
3
+ header('HTTP/1.1 403 Forbidden');
4
  ?>
language/wassup.pot CHANGED
@@ -1,2835 +1,2955 @@
1
  # LANGUAGE translation for WassUp Real-time Analytics plugin
2
- # Copyright (C) 2009-2015
3
  # This file is distributed under the same license as WassUp plugin.
4
  # Michele Marcucci <michele(at)befree.it>, 2009.
5
  #
6
  #, fuzzy
7
  msgid ""
8
  msgstr ""
9
- "Project-Id-Version: WassUp 1.9\n"
10
  "Report-Msgid-Bugs-To: michele@befree.it\n"
11
- "POT-Creation-Date: 2015-12-12 12:20-0700\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
 
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=CHARSET\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
 
19
- #: wassup.php:25
20
- msgid "Sorry. Unable to display requested page."
21
- msgstr ""
22
-
23
- #: wassup.php:95
24
- msgid "Sorry, WassUp requires WordPress 2.2 or higher to work"
25
- msgstr ""
26
-
27
- #: wassup.php:102
28
  #, php-format
29
  msgid "File %s does not exist!"
30
  msgstr ""
31
 
32
- #: wassup.php:111
33
  msgid ""
34
  "Sorry, WassUp requires WordPress 3.1 or higher to work in multisite setups"
35
  msgstr ""
36
 
37
- #: wassup.php:119
38
- msgid ""
39
- "Sorry! Network activation is DISABLED in subdomain networks. WassUp plugin "
40
- "must be activated on each subdomain site separately."
 
 
 
41
  msgstr ""
42
 
43
- #: wassup.php:119
44
  msgid ""
45
- "Activate Wassup on your main site/parent domain to set default options for "
46
- "network."
 
 
 
 
47
  msgstr ""
48
 
49
- #: wassup.php:165 lib/upgrade.php:632
50
  msgid "Database created/upgraded successfully"
51
  msgstr ""
52
 
53
- #: wassup.php:167
54
  msgid ""
55
  "An error occurred during the upgrade. WassUp table structure may not have "
56
  "been updated properly."
57
  msgstr ""
58
 
59
- #: wassup.php:172
60
- msgid "activation successful. No upgrade necessary."
61
  msgstr ""
62
 
63
- #: wassup.php:174
64
- msgid "activation successful"
65
  msgstr ""
66
 
67
- #: wassup.php:197
68
  #, php-format
69
  msgid "%s: database upgrade failed!"
70
  msgstr ""
71
 
72
- #: wassup.php:218
73
  #, php-format
74
  msgid "%s: plugin install/upgrade failed!"
75
  msgstr ""
76
 
77
- #: wassup.php:353 wassup.php:356 wassup.php:359
78
  msgid "Bad request!"
79
  msgstr ""
80
 
81
- #: wassup.php:634
82
- msgid "paused"
83
  msgstr ""
84
 
85
- #: wassup.php:664 wassup.php:667
86
- msgid "Sorry, delete failed!"
87
  msgstr ""
88
 
89
- #: wassup.php:675 wassup.php:676 wassup.php:1926
90
- msgid "Hide Search"
91
  msgstr ""
92
 
93
- #: wassup.php:675 wassup.php:676 wassup.php:1927 wassup.php:1955
94
- #: lib/main.php:441
95
- msgid "Search"
96
  msgstr ""
97
 
98
- #: wassup.php:678 wassup.php:701
99
- msgid "Collapse All"
 
100
  msgstr ""
101
 
102
- #: wassup.php:678 wassup.php:701 wassup.php:1363 wassup.php:1963
103
- msgid "Expand All"
104
  msgstr ""
105
 
106
- #: wassup.php:679
107
- msgid "Expand Chronology"
108
  msgstr ""
109
 
110
- #: wassup.php:679 wassup.php:1964
111
- msgid "Collapse Chronology"
 
112
  msgstr ""
113
 
114
- #: wassup.php:882 wassup.php:976
115
- msgid "Visitor Details"
116
  msgstr ""
117
 
118
- #: wassup.php:883
119
- msgid "Spy Visitors"
120
  msgstr ""
121
 
122
- #: wassup.php:883 wassup.php:975 wassup.php:1275 lib/settings.php:951
123
- msgid "SPY Visitors"
 
 
124
  msgstr ""
125
 
126
- #: wassup.php:884 wassup.php:956 wassup.php:974 wassup.php:1272
127
- msgid "Current Visitors Online"
128
  msgstr ""
129
 
130
- #: wassup.php:886 wassup.php:1278 lib/settings.php:945 lib/settings.php:951
131
- #: lib/settings.php:953 lib/settings.php:955 lib/settings.php:957
132
- #: lib/settings.php:959 lib/settings.php:960 lib/settings.php:963
133
- #: lib/settings.php:964 lib/settings.php:965 lib/settings.php:970
134
- #: lib/settings.php:976 lib/settings.php:978 lib/settings.php:982
135
- #: lib/settings.php:986 lib/settings.php:992 lib/settings.php:993
136
- msgid "Options"
137
  msgstr ""
138
 
139
- #: wassup.php:892
140
- msgid "WassUp Stats"
141
  msgstr ""
142
 
143
- #: wassup.php:913 wassup.php:915
144
- msgid "Settings"
 
 
145
  msgstr ""
146
 
147
- #: wassup.php:990 wassup.php:1286 lib/settings.php:119
148
- msgid "Donate"
149
  msgstr ""
150
 
151
- #: wassup.php:1087 lib/wassup.class.php:752
152
- #: lib/compat-lib/wassup.class.php:752
153
- msgid "Wassup options updated successfully"
154
  msgstr ""
155
 
156
- #: wassup.php:1132
157
- msgid "Nothing to do! Check a \"Delete\" option and try again"
158
  msgstr ""
159
 
160
- #: wassup.php:1135
161
- #, php-format
162
- msgid "%d records DELETED permanently!"
163
  msgstr ""
164
 
165
- #: wassup.php:1148
166
- msgid "0 records deleted!"
167
  msgstr ""
168
 
169
- #: wassup.php:1168
170
- msgid "Wassup uninstall option updated successfully"
171
  msgstr ""
172
 
173
- #: wassup.php:1174
174
- msgid "Wassup options reset successfully"
175
  msgstr ""
176
 
177
- #: wassup.php:1180 wassup.php:1194
178
- msgid "Sorry! You're not allowed to do that."
 
179
  msgstr ""
180
 
181
- #: wassup.php:1191
182
- msgid "Wassup spam options updated successfully"
183
  msgstr ""
184
 
185
- #: wassup.php:1231
186
- msgid "records deleted"
187
  msgstr ""
188
 
189
- #: wassup.php:1233
190
- msgid "Sorry! You're not allowed to delete records."
191
  msgstr ""
192
 
193
- #: wassup.php:1246 wassup.php:1250
194
- msgid "WARNING: WassUp is NOT recording new statistics."
195
  msgstr ""
196
 
197
- #: wassup.php:1246
198
- msgid ""
199
- "To collect visitor data you must check \"Enable statistics recording\" in "
200
- "\"WassUp-Options: General Setup\" tab"
201
  msgstr ""
202
 
203
- #: wassup.php:1250
204
- msgid "Contact your site administrator about enabling statistics recording."
205
  msgstr ""
206
 
207
- #: wassup.php:1269
208
- msgid "Latest hits"
209
  msgstr ""
210
 
211
- #: wassup.php:1286
212
- msgid "Donations are really welcome"
 
213
  msgstr ""
214
 
215
- #: wassup.php:1286
216
- msgid "Check the official"
217
  msgstr ""
218
 
219
- #: wassup.php:1286
220
- msgid "page for updates, bug reports and your hints to improve it"
221
  msgstr ""
222
 
223
- #: wassup.php:1286
224
- msgid "WassUp Support"
225
  msgstr ""
226
 
227
- #: wassup.php:1286
228
- msgid "Wassup Support"
229
  msgstr ""
230
 
231
- #: wassup.php:1287
232
- msgid "Exec time"
233
  msgstr ""
234
 
235
- #: wassup.php:1365 lib/settings.php:274 lib/settings.php:328
236
- #: lib/settings.php:920 lib/settings.php:921 lib/settings.php:937
237
- #: lib/settings.php:997 lib/settings.php:1017 widgets/widgets.php:597
238
- #: widgets/widget_functions.php:400
239
- msgid "Top"
240
  msgstr ""
241
 
242
- #: wassup.php:1386 wassup.php:1559
243
- msgid "Legend"
244
  msgstr ""
245
 
246
- #: wassup.php:1386 wassup.php:1415 wassup.php:1559
247
- msgid "Logged-in Users"
248
  msgstr ""
249
 
250
- #: wassup.php:1386
251
- msgid "Comment Authors"
 
 
 
252
  msgstr ""
253
 
254
- #: wassup.php:1386 wassup.php:1559
255
- msgid "Spiders/bots"
256
  msgstr ""
257
 
258
- #: wassup.php:1414 lib/admin.class.php:144 lib/compat-lib/admin.class.php:141
259
- #: widgets/widget_functions.php:217
260
- msgid "Visitors online"
 
261
  msgstr ""
262
 
263
- #: wassup.php:1416 lib/admin.class.php:197 lib/wassup.class.php:467
264
- #: lib/compat-lib/admin.class.php:194 lib/compat-lib/wassup.class.php:467
265
- #: widgets/widgets.php:248 widgets/widget_functions.php:237
266
- msgid "Comment authors"
267
  msgstr ""
268
 
269
- #: wassup.php:1427 wassup.php:1997 lib/main.php:489 lib/main.php:562
270
- #: lib/main.php:711 lib/main.php:713 lib/main.php:722 lib/main.php:724
271
- #: lib/settings.php:480 lib/settings.php:484 lib/settings.php:564
272
- #: lib/settings.php:582 lib/settings.php:593 lib/settings.php:647
273
- #: lib/settings.php:655 lib/settings.php:660 lib/settings.php:768
274
- #: lib/settings.php:777 lib/settings.php:785 lib/settings.php:798
275
- #: lib/settings.php:833 lib/settings.php:843 lib/settings.php:851
276
- #: lib/settings.php:861 lib/settings.php:880 lib/settings.php:888
277
- #: lib/settings.php:894
278
- msgid "unknown"
279
  msgstr ""
280
 
281
- #: wassup.php:1435 lib/main.php:549
282
- msgid "Direct hit"
283
  msgstr ""
284
 
285
- #: wassup.php:1456 wassup.php:2015
286
- msgid "LOGGED IN USER"
 
287
  msgstr ""
288
 
289
- #: wassup.php:1461 wassup.php:2022
290
- msgid "ADMINISTRATOR"
291
  msgstr ""
292
 
293
- #: wassup.php:1473 wassup.php:2043
294
- msgid "COMMENT AUTHOR"
295
  msgstr ""
296
 
297
- #: wassup.php:1494 wassup.php:2098
298
- msgid "show raw table"
299
  msgstr ""
300
 
301
- #: wassup.php:1494 wassup.php:2098
302
- msgid "Show the items as raw table"
303
  msgstr ""
304
 
305
- #: wassup.php:1559
306
- msgid "Comments Authors"
307
  msgstr ""
308
 
309
- #: wassup.php:1563
310
- msgid "Pause"
311
  msgstr ""
312
 
313
- #: wassup.php:1564
314
- msgid "Play"
315
  msgstr ""
316
 
317
- #: wassup.php:1575
318
- msgid "Show map"
319
  msgstr ""
320
 
321
- #: wassup.php:1575
322
- msgid "Show ip geo location on map"
323
  msgstr ""
324
 
325
- #: wassup.php:1581
326
- msgid "Spy items by"
 
 
327
  msgstr ""
328
 
329
- #: wassup.php:1627
330
- msgid "WassUp recording is disabled"
331
  msgstr ""
332
 
333
- #: wassup.php:1825
334
- msgid "Show details from the last"
335
  msgstr ""
336
 
337
- #: wassup.php:1834
338
- msgid "Items per page"
339
  msgstr ""
340
 
341
- #: wassup.php:1844
342
- msgid "Filter items for"
343
  msgstr ""
344
 
345
- #: wassup.php:1858
346
- msgid "Visits"
347
  msgstr ""
348
 
349
- #: wassup.php:1858
350
- msgid "Pageviews"
351
  msgstr ""
352
 
353
- #: wassup.php:1858
354
- msgid "Pages/Visits"
 
355
  msgstr ""
356
 
357
- #: wassup.php:1867
358
- msgid "Spams"
 
359
  msgstr ""
360
 
361
- #: wassup.php:1888
362
- msgid "Spam/Malware Options"
363
  msgstr ""
364
 
365
- #: wassup.php:1894
366
- msgid "Enable Spam and Malware Check on Records"
 
367
  msgstr ""
368
 
369
- #: wassup.php:1895 lib/settings.php:293
370
- msgid "Record Akismet comment spam attempts"
371
  msgstr ""
372
 
373
- #: wassup.php:1896 lib/settings.php:294
374
- msgid "Record referrer spam attempts"
375
  msgstr ""
376
 
377
- #: wassup.php:1897 lib/settings.php:296
378
- msgid "Record attack/exploit attempts (libwww-perl agent)"
379
  msgstr ""
380
 
381
- #: wassup.php:1898 lib/settings.php:295
382
- msgid "Record admin break-in/hacker attempts"
383
  msgstr ""
384
 
385
- #: wassup.php:1899 lib/settings.php:273 lib/settings.php:327
386
- #: lib/settings.php:469 lib/settings.php:936
387
- msgid "Save Settings"
388
  msgstr ""
389
 
390
- #: wassup.php:1906
391
- msgid "refresh screen"
392
  msgstr ""
393
 
394
- #: wassup.php:1908
395
- #, php-format
396
- msgid "Auto refresh in %s seconds"
397
  msgstr ""
398
 
399
- #: wassup.php:1913
400
- msgid "hide chart"
401
  msgstr ""
402
 
403
- #: wassup.php:1913
404
- msgid "Hide the chart"
 
 
405
  msgstr ""
406
 
407
- #: wassup.php:1913
408
- msgid "Hide chart"
409
  msgstr ""
410
 
411
- #: wassup.php:1915
412
- msgid "show chart"
413
  msgstr ""
414
 
415
- #: wassup.php:1915
416
- msgid "Show the chart"
417
  msgstr ""
418
 
419
- #: wassup.php:1915
420
- msgid "Show chart"
421
  msgstr ""
422
 
423
- #: wassup.php:1922
424
- #, php-format
425
- msgid "Top Stats for %s"
426
  msgstr ""
427
 
428
- #: wassup.php:1922
429
- msgid "Show top stats"
430
  msgstr ""
431
 
432
- #: wassup.php:1924
433
- #, php-format
434
- msgid "Top stats for %s in popup"
 
 
 
 
 
 
 
435
  msgstr ""
436
 
437
- #: wassup.php:1932
438
  #, php-format
439
- msgid "%s matches found for search"
440
  msgstr ""
441
 
442
- #: wassup.php:1936
443
- #, php-format
444
- msgid "%s items marked for IP"
445
  msgstr ""
446
 
447
- #: wassup.php:1937
448
- msgid "Filter by marked IP"
449
  msgstr ""
450
 
451
- #: wassup.php:2049
452
- msgid "FEEDREADER"
453
  msgstr ""
454
 
455
- #: wassup.php:2051
456
- msgid "SUBSCRIBER(S)"
457
  msgstr ""
458
 
459
- #: wassup.php:2054
460
- msgid "SPIDER"
461
  msgstr ""
462
 
463
- #: wassup.php:2088 wassup.php:2093
464
- msgid "delete"
465
  msgstr ""
466
 
467
- #: wassup.php:2088
468
- msgid "Delete ALL marked records with this IP"
469
  msgstr ""
470
 
471
- #: wassup.php:2090
472
- msgid "unmark"
473
  msgstr ""
474
 
475
- #: wassup.php:2090
476
- msgid "UnMark IP"
477
  msgstr ""
478
 
479
- #: wassup.php:2093
480
- msgid "Delete this record"
 
 
481
  msgstr ""
482
 
483
- #: wassup.php:2095
484
- msgid "mark"
485
  msgstr ""
486
 
487
- #: wassup.php:2095
488
- msgid "Mark IP"
489
  msgstr ""
490
 
491
- #: wassup.php:2104 lib/admin.class.php:181 lib/main.php:437
492
- #: lib/compat-lib/admin.class.php:178
493
- msgid "Referrer"
494
  msgstr ""
495
 
496
- #: wassup.php:2107 lib/main.php:421
497
- msgid "Hostname"
498
  msgstr ""
499
 
500
- #: wassup.php:2126
501
- msgid "SEARCH ENGINE"
502
  msgstr ""
503
 
504
- #: wassup.php:2126
505
- msgid "page"
506
  msgstr ""
507
 
508
- #: wassup.php:2127
509
- msgid "KEYWORDS"
510
  msgstr ""
511
 
512
- #: wassup.php:2127 lib/main.php:1025
513
- msgid "not provided"
514
  msgstr ""
515
 
516
- #: wassup.php:2150
517
- msgid "Probably SPAM!"
518
  msgstr ""
519
 
520
- #: wassup.php:2152
521
- msgid "Referer Spam"
522
  msgstr ""
523
 
524
- #: wassup.php:2154 lib/main.php:472 lib/wassup.class.php:463
525
- #: lib/wassup.class.php:518 lib/compat-lib/wassup.class.php:463
526
- #: lib/compat-lib/wassup.class.php:518
527
- msgid "Spam"
528
  msgstr ""
529
 
530
- #: wassup.php:2156
531
- msgid "Comment Spam"
532
  msgstr ""
533
 
534
- #: wassup.php:2164
535
- msgid "Probably hack/malware attempt!"
536
  msgstr ""
537
 
538
- #: wassup.php:2169 lib/main.php:444
539
- msgid "User Agent"
540
  msgstr ""
541
 
542
- #: wassup.php:2176 lib/main.php:624 lib/settings.php:502
543
- msgid "Language"
544
  msgstr ""
545
 
546
- #: wassup.php:2181 lib/main.php:449
547
- msgid "OS"
548
  msgstr ""
549
 
550
- #: wassup.php:2182
551
- msgid "BROWSER"
552
  msgstr ""
553
 
554
- #: wassup.php:2185
555
- msgid "RESOLUTION"
556
  msgstr ""
557
 
558
- #: wassup.php:2251
559
- msgid "Graph of visitor hits"
560
  msgstr ""
561
 
562
- #: wassup.php:2253
563
- msgid "Too few records to print chart"
564
  msgstr ""
565
 
566
- #: wassup.php:2262
567
- #, php-format
568
- msgid "Invalid page request %s"
569
  msgstr ""
570
 
571
- #: wassup.php:2294
572
- msgid "Export ERROR: nonce failure!"
573
  msgstr ""
574
 
575
- #: wassup.php:2297 lib/wassup.class.php:1759
576
- #: lib/compat-lib/wassup.class.php:1756
577
- msgid "Export ERROR: login required!"
578
  msgstr ""
579
 
580
- #: wassup.php:2332
581
- msgid "Export failed due to script interruption or timeout error!"
582
  msgstr ""
583
 
584
- #: wassup.php:2346
585
- msgid "ERROR: Nothing to Export."
586
  msgstr ""
587
 
588
- #: wassup.php:2581 wassup.php:4610 lib/uadetector.class.php:71
589
- #: lib/uadetector.class.php:151
590
- msgid "Unknown Spider"
591
  msgstr ""
592
 
593
- #: wassup.php:2582
594
- msgid "Unknown Browser"
 
 
595
  msgstr ""
596
 
597
- #: wassup.php:3098
598
- msgid "Spoofer bot"
599
  msgstr ""
600
 
601
- #: wassup.php:3484
602
- #, php-format
603
- msgid "%s WassUp Plugin table has reached maximum size!"
604
  msgstr ""
605
 
606
- #: wassup.php:3484
607
- msgid "ALERT"
608
  msgstr ""
609
 
610
- #: wassup.php:3485
611
- msgid "Hi"
612
  msgstr ""
613
 
614
- #: wassup.php:3485
 
615
  msgid ""
616
- "you have received this email because your WassUp Database table at your "
617
- "Wordpress blog"
618
- msgstr ""
619
-
620
- #: wassup.php:3485
621
- msgid "has reached the maximum value set in the options menu"
622
  msgstr ""
623
 
624
- #: wassup.php:3486
625
- msgid ""
626
- "This is only a reminder, please take the actions you want in the WassUp "
627
- "options menu"
628
  msgstr ""
629
 
630
- #: wassup.php:3486
631
- msgid "This alert now will be removed and you will be able to set a new one"
 
 
 
632
  msgstr ""
633
 
634
- #: wassup.php:3487
635
- msgid ""
636
- "Thank you for using WassUp plugin. Check if there is a new version available "
637
- "here:"
638
  msgstr ""
639
 
640
- #: wassup.php:3487
641
- msgid "Have a nice day!"
642
  msgstr ""
643
 
644
- #: wassup.php:3651 wassup.php:4088
645
- msgid "encrypted search"
646
  msgstr ""
647
 
648
- #: wassup.php:4598 wassup.php:4605
649
- msgid "Feed Reader"
650
  msgstr ""
651
 
652
- #: wassup.php:4606
653
- msgid "feed reader"
654
  msgstr ""
655
 
656
- #: wassup.php:5212
657
- msgid "timestamp"
658
  msgstr ""
659
 
660
- #: wassup.php:5213
661
- msgid "If above timestamp is not current time, this page is cached"
662
  msgstr ""
663
 
664
- #: wassup.php:5317
665
- msgid "Visitors Online"
 
 
666
  msgstr ""
667
 
668
- #: wassup.php:5332 widgets/widgets.php:141 widgets/widgets.php:351
669
- #: widgets/widgets.php:569
670
- msgid "No Data"
671
  msgstr ""
672
 
673
- #: lib/action.php:90
674
- msgid "login required!"
 
675
  msgstr ""
676
 
677
- #: lib/action.php:134
678
- msgid "An error occurred during delete"
679
  msgstr ""
680
 
681
- #: lib/action.php:139
682
- #, php-format
683
- msgid "%d records deleted!"
684
  msgstr ""
685
 
686
- #: lib/action.php:145
687
- msgid "Error: invalid id parameter:"
 
 
 
688
  msgstr ""
689
 
690
- #: lib/action.php:148
691
- msgid "Error: missing id parameter"
692
  msgstr ""
693
 
694
- #: lib/action.php:166
695
- msgid "ERROR: file not found"
696
  msgstr ""
697
 
698
- #: lib/action.php:219
699
- msgid "ERROR: bad date"
700
  msgstr ""
701
 
702
- #: lib/action.php:270
703
- msgid "ERROR: Missing or unknown parameters"
 
 
704
  msgstr ""
705
 
706
- #: lib/action.php:279
707
- msgid "ERROR: Nothing to do here"
708
  msgstr ""
709
 
710
- #: lib/admin.class.php:76 lib/compat-lib/admin.class.php:73
711
- msgid "Stats"
712
  msgstr ""
713
 
714
- #: lib/admin.class.php:76 lib/compat-lib/admin.class.php:73
715
- msgid "More"
716
  msgstr ""
717
 
718
- #: lib/admin.class.php:78 lib/admin.class.php:115
719
- #: lib/compat-lib/admin.class.php:75 lib/compat-lib/admin.class.php:112
720
- msgid "visitor stats chart"
721
  msgstr ""
722
 
723
- #: lib/admin.class.php:110 lib/compat-lib/admin.class.php:107
724
- msgid "More Stats"
 
 
725
  msgstr ""
726
 
727
- #: lib/admin.class.php:191 lib/compat-lib/admin.class.php:188
728
- msgid "Registered users"
729
  msgstr ""
730
 
731
- #: lib/admin.class.php:201 lib/compat-lib/admin.class.php:198
732
- #: widgets/widget_functions.php:216
733
- msgid "Visitor online"
 
734
  msgstr ""
735
 
736
- #: lib/admin.class.php:206 lib/compat-lib/admin.class.php:203
737
- msgid "No online data!"
 
 
738
  msgstr ""
739
 
740
- #: lib/admin.class.php:210 lib/compat-lib/admin.class.php:207
741
- #: widgets/widget_functions.php:120
742
- msgid "powered by"
743
  msgstr ""
744
 
745
- #: lib/admin.class.php:210 lib/compat-lib/admin.class.php:207
746
- #: widgets/widget_functions.php:120
747
- msgid "Real Time Visitors Tracking"
748
  msgstr ""
749
 
750
- #: lib/akismet.class.php:118
751
- msgid "The response could not be retrieved."
752
  msgstr ""
753
 
754
- #: lib/akismet.class.php:126
755
- msgid "Could not connect to akismet server."
 
756
  msgstr ""
757
 
758
- #: lib/akismet.class.php:180
759
- msgid "Your Akismet API key is not valid."
760
  msgstr ""
761
 
762
- #: lib/akismet.class.php:192 lib/akismet.class.php:198
763
- msgid "Timed out waiting for server response."
764
  msgstr ""
765
 
766
- #: lib/main.php:46 lib/settings.php:274 lib/settings.php:328
767
- #: lib/settings.php:920 lib/settings.php:921 lib/settings.php:937
768
- #: lib/settings.php:997 lib/settings.php:1017
769
- msgid "Next"
770
  msgstr ""
771
 
772
- #: lib/main.php:48
773
- msgid "Previous"
774
  msgstr ""
775
 
776
- #: lib/main.php:105
777
- #, php-format
778
- msgid "You must specify the %s"
779
  msgstr ""
780
 
781
- #: lib/main.php:105
782
- msgid "number of pages"
783
  msgstr ""
784
 
785
- #: lib/main.php:109
786
- #, php-format
787
- msgid "You must specify the %s to show per page"
788
  msgstr ""
789
 
790
- #: lib/main.php:109
791
- msgid "limit of items"
 
 
792
  msgstr ""
793
 
794
- #: lib/main.php:158
795
- msgid "Pages"
796
  msgstr ""
797
 
798
- #: lib/main.php:392
799
- msgid "Raw data"
800
  msgstr ""
801
 
802
- #: lib/main.php:393
803
- msgid "Visitor type"
804
  msgstr ""
805
 
806
- #: lib/main.php:405 widgets/widget_functions.php:226
807
- msgid "Logged-in user"
808
  msgstr ""
809
 
810
- #: lib/main.php:407
811
- msgid "Spammer/Hacker"
812
  msgstr ""
813
 
814
- #: lib/main.php:409 lib/main.php:569
815
- msgid "Spammer"
816
  msgstr ""
817
 
818
- #: lib/main.php:411 lib/main.php:589 widgets/widget_functions.php:236
819
- msgid "Comment author"
820
  msgstr ""
821
 
822
- #: lib/main.php:413 lib/main.php:464 lib/main.php:466
823
- msgid "Feed"
824
  msgstr ""
825
 
826
- #: lib/main.php:415 lib/main.php:469 lib/main.php:576 lib/wassup.class.php:461
827
- #: lib/wassup.class.php:517 lib/compat-lib/wassup.class.php:461
828
- #: lib/compat-lib/wassup.class.php:517
829
- msgid "Spider"
830
  msgstr ""
831
 
832
- #: lib/main.php:417 lib/main.php:548 widgets/widget_functions.php:246
833
- msgid "Regular visitor"
834
  msgstr ""
835
 
836
- #: lib/main.php:420
837
- msgid "IP"
838
  msgstr ""
839
 
840
- #: lib/main.php:422
841
- msgid "Url Requested"
842
  msgstr ""
843
 
844
- #: lib/main.php:429
845
- msgid "Post/page ID"
 
 
846
  msgstr ""
847
 
848
- #: lib/main.php:433
849
- msgid "none or deleted post"
850
  msgstr ""
851
 
852
- #: lib/main.php:435
853
- msgid "Post/page Title"
854
  msgstr ""
855
 
856
- #: lib/main.php:440
857
- msgid "Search Engine"
858
  msgstr ""
859
 
860
- #: lib/main.php:442
861
- msgid "Page"
862
  msgstr ""
863
 
864
- #: lib/main.php:447
865
- msgid "Browser"
866
  msgstr ""
867
 
868
- #: lib/main.php:450
869
- msgid "Locale/Language"
870
  msgstr ""
871
 
872
- #: lib/main.php:451
873
- msgid "Screen Resolution"
874
  msgstr ""
875
 
876
- #: lib/main.php:454
877
- msgid "Username"
878
  msgstr ""
879
 
880
- #: lib/main.php:458
881
- msgid "Comment Author"
882
  msgstr ""
883
 
884
- #: lib/main.php:473
885
- msgid "comment spam"
886
  msgstr ""
887
 
888
- #: lib/main.php:474
889
- msgid "referrer spam"
890
  msgstr ""
891
 
892
- #: lib/main.php:475
893
- msgid "hack/malware attempt"
894
  msgstr ""
895
 
896
- #: lib/main.php:476
897
- msgid "not spam"
898
  msgstr ""
899
 
900
- #: lib/main.php:480
901
- msgid "End timestamp"
902
  msgstr ""
903
 
904
- #: lib/main.php:481
905
- msgid "Timestamp"
906
  msgstr ""
907
 
908
- #: lib/main.php:493
909
- #, php-format
910
- msgid "%d URLs visited in session"
911
  msgstr ""
912
 
913
- #: lib/main.php:571
914
- msgid "Spam/Malware"
915
  msgstr ""
916
 
917
- #: lib/main.php:575
918
- msgid "Feedreader"
919
  msgstr ""
920
 
921
- #: lib/main.php:584 lib/main.php:633 lib/main.php:634
922
- msgid "Logged user"
923
  msgstr ""
924
 
925
- #: lib/main.php:613 lib/main.php:614
926
- msgid "Country"
 
927
  msgstr ""
928
 
929
- #: lib/main.php:637
930
- msgid "Country:"
 
931
  msgstr ""
932
 
933
- #: lib/main.php:637
934
- msgid "URL Request:"
 
935
  msgstr ""
936
 
937
- #: lib/main.php:679
938
- msgid "No visitor activity"
 
 
 
939
  msgstr ""
940
 
941
- #: lib/main.php:707 lib/main.php:711 lib/main.php:713 lib/main.php:718
942
- #: lib/main.php:722 lib/main.php:724
943
- #, php-format
944
- msgid "City: %s"
945
  msgstr ""
946
 
947
- #: lib/main.php:727
948
- msgid "Country: unknown, City: unknown"
 
 
 
949
  msgstr ""
950
 
951
- #: lib/main.php:985
952
- msgid "Print"
953
  msgstr ""
954
 
955
- #: lib/main.php:987
956
- #, php-format
957
- msgid "Top Stats for Period: %s"
958
  msgstr ""
959
 
960
- #: lib/main.php:1017
961
- msgid "TOP QUERY"
962
  msgstr ""
963
 
964
- #: lib/main.php:1048
965
- msgid "TOP REFERRER"
966
  msgstr ""
967
 
968
- #: lib/main.php:1077
969
- msgid "TOP REQUEST"
970
  msgstr ""
971
 
972
- #: lib/main.php:1108
973
- msgid "TOP BROWSER"
974
  msgstr ""
975
 
976
- #: lib/main.php:1135
977
- msgid "TOP OS"
978
  msgstr ""
979
 
980
- #: lib/main.php:1161
981
- msgid "TOP LOCALE"
982
  msgstr ""
983
 
984
- #: lib/main.php:1189
985
- msgid "TOP VISITOR"
986
  msgstr ""
987
 
988
- #: lib/main.php:1221
989
- msgid "TOP ARTICLE"
990
  msgstr ""
991
 
992
- #: lib/main.php:1244
993
- msgid "This report excludes spam and spider records"
994
  msgstr ""
995
 
996
- #: lib/main.php:1246
997
- msgid "This report excludes spider records"
998
  msgstr ""
999
 
1000
- #: lib/main.php:1248
1001
- msgid "This report excludes spam records"
1002
  msgstr ""
1003
 
1004
- #: lib/main.php:1680
1005
- msgid "Last 1 Hour"
1006
  msgstr ""
1007
 
1008
- #: lib/main.php:1689
1009
- msgid "Last 6 Hours"
 
 
1010
  msgstr ""
1011
 
1012
- #: lib/main.php:1698
1013
- msgid "Last 12 Hours"
 
 
1014
  msgstr ""
1015
 
1016
- #: lib/main.php:1707
1017
- msgid "Last 7 Days"
1018
  msgstr ""
1019
 
1020
- #: lib/main.php:1721
1021
- msgid "Last 2 Weeks"
1022
  msgstr ""
1023
 
1024
- #: lib/main.php:1740
1025
- msgid "Last Month"
1026
  msgstr ""
1027
 
1028
- #: lib/main.php:1754
1029
- msgid "Last 3 Months"
 
 
1030
  msgstr ""
1031
 
1032
- #: lib/main.php:1768
1033
- msgid "Last 6 Months"
1034
  msgstr ""
1035
 
1036
- #: lib/main.php:1776
1037
- msgid "Last Year"
1038
  msgstr ""
1039
 
1040
- #: lib/main.php:1784 lib/main.php:1800
1041
- msgid "All Time"
1042
  msgstr ""
1043
 
1044
- #: lib/main.php:1791
1045
- msgid "Last 24 Hours"
 
 
1046
  msgstr ""
1047
 
1048
- #: lib/settings.php:44
1049
- msgid ""
1050
- "ATTENTION! Your WassUp table have reached the maximum value you set, I "
1051
- "disabled the alert, you can re-enable it here."
1052
  msgstr ""
1053
 
1054
- #: lib/settings.php:65
1055
- msgid "IMPORTANT"
1056
  msgstr ""
1057
 
1058
- #: lib/settings.php:65
1059
- msgid "table empty or does not exist!"
 
 
1060
  msgstr ""
1061
 
1062
- #: lib/settings.php:67
1063
- msgid "Visitors Online or Top Stats"
1064
  msgstr ""
1065
 
1066
- #: lib/settings.php:68
1067
- msgid "Widgets menu"
1068
  msgstr ""
1069
 
1070
- #: lib/settings.php:70
1071
- #, php-format
1072
  msgid ""
1073
- "You can add a sidebar Widget with some useful statistics information by "
1074
- "activating the %s widget from the %s."
1075
  msgstr ""
1076
 
1077
- #: lib/settings.php:71
1078
- msgid "Select the options you want for WassUp plugin"
1079
- msgstr ""
1080
-
1081
- #: lib/settings.php:109 lib/settings.php:945 lib/settings.php:951
1082
- #: lib/settings.php:953 lib/settings.php:957 lib/settings.php:959
1083
- #: lib/settings.php:960 lib/settings.php:963 lib/settings.php:964
1084
- #: lib/settings.php:982 lib/settings.php:986
1085
- msgid "General Setup"
1086
  msgstr ""
1087
 
1088
- #: lib/settings.php:110 lib/settings.php:955 lib/settings.php:978
1089
- msgid "Filters & Exclusions"
1090
  msgstr ""
1091
 
1092
- #: lib/settings.php:111
1093
- msgid "Manage Files & Data"
1094
  msgstr ""
1095
 
1096
- #: lib/settings.php:114 lib/settings.php:992 lib/settings.php:993
1097
- msgid "Uninstall"
 
 
1098
  msgstr ""
1099
 
1100
- #: lib/settings.php:128
1101
- msgid "Networkwide Settings"
 
 
 
1102
  msgstr ""
1103
 
1104
- #: lib/settings.php:129
1105
- msgid "Multisite settings that applies to all subsites in the network."
1106
  msgstr ""
1107
 
1108
- #: lib/settings.php:131
1109
- msgid "Network Statistics Recording"
1110
  msgstr ""
1111
 
1112
- #: lib/settings.php:132
1113
- msgid ""
1114
- "Enables Wassup visitor tracking on all subsites in network. Do NOT disable "
1115
- "unless upgrading plugin."
1116
  msgstr ""
1117
 
1118
- #: lib/settings.php:133
1119
- msgid "Enable Statistics Recording for network."
1120
  msgstr ""
1121
 
1122
- #: lib/settings.php:134
1123
- msgid ""
1124
- "Can be overridden on individual subsites to disable statistics recording."
1125
  msgstr ""
1126
 
1127
- #: lib/settings.php:136
1128
- msgid "Network Subsites Options"
1129
  msgstr ""
1130
 
1131
- #: lib/settings.php:137
1132
- msgid "Show Wassup's main admin menu to subsite administrators."
1133
  msgstr ""
1134
 
1135
- #: lib/settings.php:138
 
1136
  msgid ""
1137
- "Uncheck to disable Wassup main menu and Wassup-options submenu for all users "
1138
- "except Network administrator (super-admin). Dashboard submenu \"Wassup-stats"
1139
- "\" and dashboard widget display are unaffected."
1140
  msgstr ""
1141
 
1142
- #: lib/settings.php:141
1143
- msgid "Site Settings"
1144
  msgstr ""
1145
 
1146
- #: lib/settings.php:142
1147
- msgid "Main site settings/default settings for network subsites."
1148
  msgstr ""
1149
 
1150
- #: lib/settings.php:145
1151
- msgid "Statistics Recording"
1152
  msgstr ""
1153
 
1154
- #: lib/settings.php:146
1155
- msgid ""
1156
- "By default, Wassup collects, analyzes, and stores new visitor hits and "
1157
- "checks each record for spam and malware activity."
1158
  msgstr ""
1159
 
1160
- #: lib/settings.php:147
1161
- msgid "Enable statistics recording"
1162
  msgstr ""
1163
 
1164
- #: lib/settings.php:149
1165
- msgid "Do NOT disable unless upgrading or troubleshooting plugin problems."
1166
  msgstr ""
1167
 
1168
- #: lib/settings.php:150
1169
- msgid "Do NOT disable unless troubleshooting plugin problems."
1170
  msgstr ""
1171
 
1172
- #: lib/settings.php:153
1173
- msgid "Enable spam and malware detection on records"
1174
  msgstr ""
1175
 
1176
- #: lib/settings.php:154
1177
- msgid "For identification only. Does NOT stop attacks nor protect your site."
1178
  msgstr ""
1179
 
1180
- #: lib/settings.php:156
1181
- msgid "User Permissions"
1182
  msgstr ""
1183
 
1184
- #: lib/settings.php:157
1185
- msgid ""
1186
- "Grants readonly access to Wassup-stats dashboard submenu and to the "
1187
- "dashboard widget for users with the selected role or higher. Only "
1188
- "administrators have access to Wassup main menu and Wassup Options panel to "
1189
- "edit settings and delete data."
1190
  msgstr ""
1191
 
1192
- #: lib/settings.php:158
1193
- msgid "Set minimum user level that can view WassUp stats"
1194
  msgstr ""
1195
 
1196
- #: lib/settings.php:162
1197
- msgid "default administrator"
1198
  msgstr ""
1199
 
1200
- #: lib/settings.php:164
1201
- msgid "Screen resolution"
1202
  msgstr ""
1203
 
1204
- #: lib/settings.php:165
1205
  msgid ""
1206
- "Adjusts chart size and resets the max-width/truncation point of long texts."
 
 
1207
  msgstr ""
1208
 
1209
- #: lib/settings.php:166
1210
- msgid "Your default screen resolution (in pixels)"
1211
  msgstr ""
1212
 
1213
- #: lib/settings.php:171
1214
- msgid "Dashboard Widget"
 
 
1215
  msgstr ""
1216
 
1217
- #: lib/settings.php:172
1218
- msgid "Enable widget/small chart in admin dashboard"
 
 
1219
  msgstr ""
1220
 
1221
- #: lib/settings.php:174
1222
- msgid "Spy Visitors Settings"
1223
  msgstr ""
1224
 
1225
- #: lib/settings.php:177 lib/wassup.class.php:661
1226
- #: lib/compat-lib/wassup.class.php:661
1227
- msgid "not required"
 
1228
  msgstr ""
1229
 
1230
- #: lib/settings.php:190
1231
- msgid "Display a GEO IP Map in the spy visitors view"
1232
  msgstr ""
1233
 
1234
- #: lib/settings.php:192
1235
- msgid "key"
 
 
 
1236
  msgstr ""
1237
 
1238
- #: lib/settings.php:192
1239
- msgid "signup for your key"
1240
  msgstr ""
1241
 
1242
- #: lib/settings.php:193
1243
- msgid "For usage exceeding 25000 daily map views per domain."
1244
  msgstr ""
1245
 
1246
- #: lib/settings.php:198
1247
- msgid "Visitor Detail Settings"
1248
  msgstr ""
1249
 
1250
- #: lib/settings.php:199
1251
- msgid "Show visitor details from the last"
1252
  msgstr ""
1253
 
1254
- #: lib/settings.php:204
1255
- msgid "Time format 12/24 Hour"
1256
  msgstr ""
1257
 
1258
- #: lib/settings.php:208
1259
- msgid "Filter visitor details for"
1260
  msgstr ""
1261
 
1262
- #: lib/settings.php:213
1263
- msgid "Display line chart in detail view"
1264
  msgstr ""
1265
 
1266
- #: lib/settings.php:214
1267
- msgid "Line chart type - how many axes?"
 
1268
  msgstr ""
1269
 
1270
- #: lib/settings.php:215
1271
- msgid "Set how many minutes wait for automatic page refresh"
1272
  msgstr ""
1273
 
1274
- #: lib/settings.php:216 lib/settings.php:873 widgets/widgets.php:475
1275
- msgid "minutes"
 
1276
  msgstr ""
1277
 
1278
- #: lib/settings.php:217
1279
- msgid "default 3, 0=no refresh"
 
1280
  msgstr ""
1281
 
1282
- #: lib/settings.php:219
1283
- msgid "Number of items per page"
1284
  msgstr ""
1285
 
1286
- #: lib/settings.php:224
1287
- msgid "Top Stats Lists"
1288
  msgstr ""
1289
 
1290
- #: lib/settings.php:225
1291
- msgid "Customize Top stats by selected criteria below."
1292
  msgstr ""
1293
 
1294
- #: lib/settings.php:225
1295
  msgid ""
1296
- "Stats are in descending order from highest count and known spam and malware "
1297
- "attempts are excluded from counts."
 
 
 
1298
  msgstr ""
1299
 
1300
- #: lib/settings.php:232
1301
- msgid "Length size limit of top lists"
1302
  msgstr ""
1303
 
1304
- #: lib/settings.php:234
1305
- msgid "default 10"
1306
  msgstr ""
1307
 
1308
- #: lib/settings.php:236
1309
- msgid "Choose one or more items to list in Top Stats"
1310
  msgstr ""
1311
 
1312
- #: lib/settings.php:236
1313
- msgid "over 5 selections may cause horizontal scrolling"
1314
  msgstr ""
1315
 
1316
- #: lib/settings.php:239
1317
- msgid "Top Searches"
1318
  msgstr ""
1319
 
1320
- #: lib/settings.php:240
1321
- msgid "Top Referrers"
 
 
1322
  msgstr ""
1323
 
1324
- #: lib/settings.php:241
1325
- msgid "Top Articles"
1326
  msgstr ""
1327
 
1328
- #: lib/settings.php:244
1329
- msgid "Top Requests"
 
1330
  msgstr ""
1331
 
1332
- #: lib/settings.php:245
1333
- msgid "Top Browsers"
1334
  msgstr ""
1335
 
1336
- #: lib/settings.php:246
1337
- msgid "Top OS"
1338
  msgstr ""
1339
 
1340
- #: lib/settings.php:249
1341
- msgid "Top Locales"
1342
  msgstr ""
1343
 
1344
- #: lib/settings.php:250
1345
- msgid "Top Visitors"
1346
  msgstr ""
1347
 
1348
- #: lib/settings.php:255
1349
- msgid "Exclude the following website domains from Top Referrers"
1350
  msgstr ""
1351
 
1352
- #: lib/settings.php:255 lib/settings.php:263
1353
- msgid "applies to top stats view and widgets"
 
1354
  msgstr ""
1355
 
1356
- #: lib/settings.php:258
1357
- msgid "comma separated value"
 
1358
  msgstr ""
1359
 
1360
- #: lib/settings.php:258
1361
- msgid "List whole domains only. Wildcards and partial domains will be ignored."
1362
  msgstr ""
1363
 
1364
- #: lib/settings.php:259
1365
- msgid "Don't list your website domain defined in WordPress"
1366
  msgstr ""
1367
 
1368
- #: lib/settings.php:263
1369
- msgid "Exclude site front page from Top Articles"
1370
  msgstr ""
1371
 
1372
- #: lib/settings.php:270
1373
- msgid "Exclude all spider records from Top Stats"
1374
  msgstr ""
1375
 
1376
- #: lib/settings.php:273 lib/settings.php:327 lib/settings.php:469
1377
- #: lib/settings.php:936
1378
- msgid "Reset"
1379
  msgstr ""
1380
 
1381
- #: lib/settings.php:273 lib/settings.php:327 lib/settings.php:469
1382
- #: lib/settings.php:936
1383
- msgid "Reset to Default"
1384
  msgstr ""
1385
 
1386
- #: lib/settings.php:278
1387
- msgid "Recording Filters and Exclusions"
1388
  msgstr ""
1389
 
1390
- #: lib/settings.php:279
1391
- msgid ""
1392
- "Use the filter checkboxes and exclusion input fields below to customize "
1393
- "Wassup's statistics recording so that only the data that you need for your "
1394
- "site analyses are stored."
1395
  msgstr ""
1396
 
1397
- #: lib/settings.php:281
1398
- msgid "Visitor Type Filters:"
1399
  msgstr ""
1400
 
1401
- #: lib/settings.php:282
1402
- msgid "Checkbox to enable recording by type of \"visitor\""
1403
  msgstr ""
1404
 
1405
- #: lib/settings.php:284
1406
- msgid "Record regular visitors"
1407
  msgstr ""
1408
 
1409
- #: lib/settings.php:285
1410
- msgid "Record logged in users"
1411
  msgstr ""
1412
 
1413
- #: lib/settings.php:286
1414
- msgid "Record logged in administrators"
1415
  msgstr ""
1416
 
1417
- #: lib/settings.php:287
1418
- msgid "Record spiders and bots"
1419
  msgstr ""
1420
 
1421
- #: lib/settings.php:290
1422
- msgid "Spam and Malware Filters:"
1423
  msgstr ""
1424
 
1425
- #: lib/settings.php:291
1426
- msgid "Checkbox to enable recording of each type of \"spam\""
1427
  msgstr ""
1428
 
1429
- #: lib/settings.php:293
1430
- msgid "check if an IP has previous comments as spam"
1431
  msgstr ""
1432
 
1433
- #: lib/settings.php:299
1434
- msgid "Recording Exceptions"
1435
  msgstr ""
1436
 
1437
- #: lib/settings.php:300
1438
- msgid ""
1439
- "You can exclude a single visitor (by IP, hostname or username) or you can "
1440
- "exclude a specific URL request from being stored in WassUp records."
1441
  msgstr ""
1442
 
1443
- #: lib/settings.php:301
1444
- msgid ""
1445
- "Note that recording exceptions lower overall statistics counts and excessive "
1446
- "exclusions can affect page load speed on slow host servers."
1447
  msgstr ""
1448
 
1449
- #: lib/settings.php:303
1450
- msgid "Exclude by IP"
1451
  msgstr ""
1452
 
1453
- #: lib/settings.php:304
1454
- msgid "Enter source IPs to omit from recording"
1455
  msgstr ""
1456
 
1457
- #: lib/settings.php:307
1458
- msgid "comma separated value (ex: 127.0.0.1, 10.0.0.1, etc...)."
1459
  msgstr ""
1460
 
1461
- #: lib/settings.php:307
1462
- msgid ""
1463
- "A single wildcard (*) can be placed after the last '.' or '::' position for "
1464
- "range exclusions (ex: 10.10.100.*, 192.168.*)."
1465
  msgstr ""
1466
 
1467
- #: lib/settings.php:309
1468
- msgid "Exclude by Hostname"
1469
  msgstr ""
1470
 
1471
- #: lib/settings.php:310
1472
- msgid "Enter source hostnames to omit from recording"
1473
  msgstr ""
1474
 
1475
- #: lib/settings.php:313
1476
- msgid "comma separated value (ex: host1.domain.com, host2.domain.net, etc...)."
1477
  msgstr ""
1478
 
1479
- #: lib/settings.php:313
1480
- msgid ""
1481
- "A single wildcard (*) can be placed before the first '.' for domain network "
1482
- "exclusions (ex: *.spamdomain.com, *.hackers.malware.net)."
1483
  msgstr ""
1484
 
1485
- #: lib/settings.php:315
1486
- msgid "Exclude by Username"
1487
  msgstr ""
1488
 
1489
- #: lib/settings.php:316
1490
- msgid "Enter usernames to omit from recording"
1491
  msgstr ""
1492
 
1493
- #: lib/settings.php:319
1494
- msgid ""
1495
- "comma separated value, enter a registered user's login name (ex: bobmarley, "
1496
- "enyabrennan, etc.)"
1497
  msgstr ""
1498
 
1499
- #: lib/settings.php:321
1500
- msgid "Exclude by URL request"
1501
  msgstr ""
1502
 
1503
- #: lib/settings.php:322
1504
- msgid "Enter URLs of page/post/feed to omit from recording"
1505
  msgstr ""
1506
 
1507
- #: lib/settings.php:325
1508
- msgid ""
1509
- "comma separated value, don't enter entire url, only the last path or some "
1510
- "word to exclude (ex: /category/wordpress, 2007, etc...)"
1511
  msgstr ""
1512
 
1513
- #: lib/settings.php:328 lib/settings.php:920 lib/settings.php:921
1514
- #: lib/settings.php:937 lib/settings.php:997 lib/settings.php:1017
1515
- msgid "Prev"
1516
  msgstr ""
1517
 
1518
- #: lib/settings.php:332
1519
- msgid "Table Management Options"
1520
  msgstr ""
1521
 
1522
- #: lib/settings.php:339
1523
- msgid "Select actions for table growth"
1524
  msgstr ""
1525
 
1526
- #: lib/settings.php:340
1527
- msgid ""
1528
- "WassUp table grows very fast, especially if your site is frequently visited. "
1529
- "I recommend you delete old records sometimes."
 
 
1530
  msgstr ""
1531
 
1532
- #: lib/settings.php:341
1533
  msgid ""
1534
- "You can delete all Wassup records now (Empty Table), you can set an "
1535
- "automatic delete option to delete selected old records daily, and you can "
1536
- "manually delete selected old records once (Delete NOW)."
1537
  msgstr ""
1538
 
1539
- #: lib/settings.php:342
1540
- msgid "If you haven't database space problems, you can leave the table as is."
1541
  msgstr ""
1542
 
1543
- #: lib/settings.php:343
1544
- msgid "Current WassUp table usage is"
1545
  msgstr ""
1546
 
1547
- #: lib/settings.php:346
1548
- msgid "records"
 
 
1549
  msgstr ""
1550
 
1551
- #: lib/settings.php:349
1552
- msgid "Alert me"
 
 
 
1553
  msgstr ""
1554
 
1555
- #: lib/settings.php:349
1556
- msgid "email to"
 
1557
  msgstr ""
1558
 
1559
- #: lib/settings.php:349
1560
- msgid "when table reaches"
1561
  msgstr ""
1562
 
1563
- #: lib/settings.php:352
1564
- msgid "Delete old records"
1565
  msgstr ""
1566
 
1567
- #: lib/settings.php:355
1568
  #, php-format
1569
  msgid ""
1570
- "Before deleting, you can save Wassup data in SQL 'export' format onto your "
1571
- "local computer by clicking %s below."
1572
  msgstr ""
1573
 
1574
- #: lib/settings.php:355
1575
- msgid "export table"
 
 
 
 
 
 
1576
  msgstr ""
1577
 
1578
- #: lib/settings.php:356
1579
- msgid "Reload this screen after export to view export messages."
1580
  msgstr ""
1581
 
1582
- #: lib/settings.php:357
1583
- msgid "Automatically delete"
 
 
 
 
1584
  msgstr ""
1585
 
1586
- #: lib/settings.php:359 lib/settings.php:364
1587
- msgid "records older than"
 
 
1588
  msgstr ""
1589
 
1590
- #: lib/settings.php:360
1591
- msgid "daily"
 
 
 
1592
  msgstr ""
1593
 
1594
- #: lib/settings.php:362
1595
- msgid "Manually delete"
1596
  msgstr ""
1597
 
1598
- #: lib/settings.php:365
1599
- msgid "once"
 
 
 
1600
  msgstr ""
1601
 
1602
- #: lib/settings.php:371
1603
- msgid "Delete all records up to record ID#"
 
1604
  msgstr ""
1605
 
1606
- #: lib/settings.php:372
1607
- msgid "Last exported record ID#:"
 
 
1608
  msgstr ""
1609
 
1610
- #: lib/settings.php:374
1611
- msgid "Empty table"
 
 
1612
  msgstr ""
1613
 
1614
- #: lib/settings.php:375
1615
- msgid "export table in SQL format"
 
 
 
1616
  msgstr ""
1617
 
1618
- #: lib/settings.php:378
1619
- msgid "Delete NOW"
1620
  msgstr ""
1621
 
1622
- #: lib/settings.php:378
1623
- msgid "Action is NOT undoable!"
1624
  msgstr ""
1625
 
1626
- #: lib/settings.php:381
1627
- msgid "Table Optimization"
 
 
 
1628
  msgstr ""
1629
 
1630
- #: lib/settings.php:386
1631
  msgid ""
1632
- "By default, WassUp tables are automatically optimized weekly and after each "
1633
- "bulk deletion. This helps keep WassUp running fast, but it can sometimes "
1634
- "cause slowdowns especially when there is a corrupt record in the table."
1635
  msgstr ""
1636
 
1637
- #: lib/settings.php:387
1638
- msgid "You can cancel automatic optimization by unchecking the box below."
 
1639
  msgstr ""
1640
 
1641
- #: lib/settings.php:394
1642
- msgid "Your table engine does NOT support the \"optimize\" command."
 
 
1643
  msgstr ""
1644
 
1645
- #: lib/settings.php:401
1646
- msgid "Enable automatic table optimization"
 
 
 
 
1647
  msgstr ""
1648
 
1649
- #: lib/settings.php:409
1650
- msgid "is overdue"
 
 
 
 
1651
  msgstr ""
1652
 
1653
- #: lib/settings.php:411
1654
- msgid "today"
 
 
1655
  msgstr ""
1656
 
1657
- #: lib/settings.php:414
1658
  #, php-format
1659
- msgid "%d days"
 
 
1660
  msgstr ""
1661
 
1662
- #: lib/settings.php:415
1663
- msgid "1 week"
 
1664
  msgstr ""
1665
 
1666
- #: lib/settings.php:421
1667
  #, php-format
1668
- msgid "Next scheduled optimization is: %s (approximately)"
 
 
 
 
 
1669
  msgstr ""
1670
 
1671
- #: lib/settings.php:423
 
 
 
 
1672
  #, php-format
1673
- msgid "Next scheduled optimization is: %s"
 
 
 
1674
  msgstr ""
1675
 
1676
- #: lib/settings.php:423
1677
- msgid "never"
 
 
1678
  msgstr ""
1679
 
1680
- #: lib/settings.php:427
1681
- msgid "Data Storage Methods"
 
 
 
1682
  msgstr ""
1683
 
1684
- #: lib/settings.php:442 lib/settings.php:866 lib/settings.php:884
1685
- #: lib/settings.php:886
1686
- msgid "Delayed Insert"
 
 
 
1687
  msgstr ""
1688
 
1689
- #: lib/settings.php:444
1690
  msgid ""
1691
- "When possible, WassUp uses the \"Delayed insert\" method of saving records "
1692
- "in MySQL to store new visitor records. This method helps keep Wassup running "
1693
- "fast on high-volume sites and during volume spikes on all sites. However, it "
1694
- "can be inefficient on low-volume sites and sometimes host administrators "
1695
- "disable it on shared servers."
1696
  msgstr ""
1697
 
1698
- #: lib/settings.php:445
1699
- msgid "You can turn off \"delayed insert\" by unchecking the box below."
 
 
 
 
1700
  msgstr ""
1701
 
1702
- #: lib/settings.php:449
1703
- msgid "This method is unavailable for your storage engine type."
1704
  msgstr ""
1705
 
1706
- #: lib/settings.php:459
1707
- msgid "This method is disabled on your host server."
 
1708
  msgstr ""
1709
 
1710
- #: lib/settings.php:466
1711
- msgid "Store new visitor records with \"delayed insert\""
1712
  msgstr ""
1713
 
1714
- #: lib/settings.php:473
1715
- msgid "Server Settings and Memory Resources"
 
 
 
1716
  msgstr ""
1717
 
1718
- #: lib/settings.php:474
 
 
 
 
 
 
1719
  #, php-format
1720
  msgid ""
1721
- "For information only. Some values may be adjustable in startup files: %s"
 
1722
  msgstr ""
1723
 
1724
- #: lib/settings.php:474
1725
- msgid "\"wp_config.php\", \"php.ini\" and \"my.ini\""
 
 
 
1726
  msgstr ""
1727
 
1728
- #: lib/settings.php:475 lib/settings.php:486 lib/settings.php:596
1729
- #: lib/settings.php:768
1730
- msgid "Version"
 
 
1731
  msgstr ""
1732
 
1733
- #: lib/settings.php:477
1734
- msgid "Table name"
 
 
1735
  msgstr ""
1736
 
1737
- #: lib/settings.php:478
1738
- msgid "Table Charset/collation"
 
 
 
 
 
1739
  msgstr ""
1740
 
1741
- #: lib/settings.php:482
1742
- msgid "Table engine"
1743
  msgstr ""
1744
 
1745
- #: lib/settings.php:484
1746
- msgid "Upgrade date"
 
 
 
 
 
1747
  msgstr ""
1748
 
1749
- #: lib/settings.php:492
1750
- msgid "Multisite network"
1751
  msgstr ""
1752
 
1753
- #: lib/settings.php:495 lib/settings.php:508 lib/settings.php:604
1754
- #: lib/settings.php:613 lib/settings.php:617
1755
- msgid "on"
 
 
 
 
 
1756
  msgstr ""
1757
 
1758
- #: lib/settings.php:497 lib/settings.php:605 lib/settings.php:611
1759
- #: lib/settings.php:618
1760
- msgid "off"
1761
  msgstr ""
1762
 
1763
- #: lib/settings.php:501
1764
- msgid "Character set"
 
 
 
1765
  msgstr ""
1766
 
1767
- #: lib/settings.php:505 lib/settings.php:664
1768
- msgid "not set"
 
 
 
 
 
 
 
1769
  msgstr ""
1770
 
1771
- #: lib/settings.php:513 lib/settings.php:635
1772
- msgid "Memory Allocation"
 
 
 
 
 
1773
  msgstr ""
1774
 
1775
- #: lib/settings.php:541 lib/settings.php:680 lib/settings.php:897
1776
- msgid "Timezone"
 
 
 
 
 
 
 
 
1777
  msgstr ""
1778
 
1779
- #: lib/settings.php:542 lib/settings.php:683
1780
- msgid "Time Offset"
 
1781
  msgstr ""
1782
 
1783
- #: lib/settings.php:554 lib/settings.php:686 lib/settings.php:688
1784
- msgid "hours"
1785
  msgstr ""
1786
 
1787
- #: lib/settings.php:555
1788
- msgid "Host Timezone"
1789
  msgstr ""
1790
 
1791
- #: lib/settings.php:566
1792
- msgid "Host Server"
 
 
1793
  msgstr ""
1794
 
1795
- #: lib/settings.php:584
1796
- msgid "Browser Client"
 
1797
  msgstr ""
1798
 
1799
- #: lib/settings.php:602
1800
- msgid "Safe Mode"
 
1801
  msgstr ""
1802
 
1803
- #: lib/settings.php:608
1804
- msgid "File Open Restrictions"
1805
  msgstr ""
1806
 
1807
- #: lib/settings.php:615
1808
- msgid "URL File Open"
1809
  msgstr ""
1810
 
1811
- #: lib/settings.php:620
1812
- msgid "Disabled functions"
1813
  msgstr ""
1814
 
1815
- #: lib/settings.php:632
1816
- msgid "none"
1817
  msgstr ""
1818
 
1819
- #: lib/settings.php:650
1820
- msgid "Memory Usage"
 
 
1821
  msgstr ""
1822
 
1823
- #: lib/settings.php:657
1824
- msgid "Script Timeout Limit"
1825
  msgstr ""
1826
 
1827
- #: lib/settings.php:659 lib/settings.php:875 lib/settings.php:892
1828
- msgid "seconds"
 
 
 
 
1829
  msgstr ""
1830
 
1831
- #: lib/settings.php:662
1832
- msgid "Browser Capabilities File"
 
 
 
1833
  msgstr ""
1834
 
1835
- #: lib/settings.php:668
1836
- msgid "not installed"
 
1837
  msgstr ""
1838
 
1839
- #: lib/settings.php:669
1840
- msgid "installed"
1841
  msgstr ""
1842
 
1843
- #: lib/settings.php:691
1844
- msgid "as modified in Wordpress"
1845
  msgstr ""
1846
 
1847
- #: lib/settings.php:770
1848
- msgid "Storage Engine"
 
1849
  msgstr ""
1850
 
1851
- #: lib/settings.php:779
1852
- msgid "Charset/collation"
1853
  msgstr ""
1854
 
1855
- #: lib/settings.php:788
1856
- msgid "Max User Connections"
1857
  msgstr ""
1858
 
1859
- #: lib/settings.php:792
1860
- msgid "possibly too small"
1861
  msgstr ""
1862
 
1863
- #: lib/settings.php:795
1864
- msgid "unlimited/up to server maximum"
1865
  msgstr ""
1866
 
1867
- #: lib/settings.php:800
1868
- msgid "Query Cache Allocation"
1869
  msgstr ""
1870
 
1871
- #: lib/settings.php:806
1872
- msgid "possibly too big, reduces available RAM."
1873
  msgstr ""
1874
 
1875
- #: lib/settings.php:813
1876
- msgid "on demand"
1877
  msgstr ""
1878
 
1879
- #: lib/settings.php:815
1880
- msgid "Cached Query Limit"
1881
  msgstr ""
1882
 
1883
- #: lib/settings.php:818 lib/settings.php:821 lib/settings.php:831
1884
- #: lib/settings.php:841 lib/settings.php:849 lib/settings.php:858
1885
- #: lib/settings.php:866 lib/settings.php:886
1886
- msgid "disabled"
1887
  msgstr ""
1888
 
1889
- #: lib/settings.php:823
1890
- msgid "Index Buffer"
1891
  msgstr ""
1892
 
1893
- #: lib/settings.php:853
1894
- msgid "Read Buffer"
1895
  msgstr ""
1896
 
1897
- #: lib/settings.php:868 lib/settings.php:880 lib/settings.php:888
1898
- msgid "Delayed Insert Queue"
1899
  msgstr ""
1900
 
1901
- #: lib/settings.php:869
1902
- msgid "rows"
 
 
1903
  msgstr ""
1904
 
1905
- #: lib/settings.php:871
1906
- msgid "Delayed Handler Timeout"
1907
  msgstr ""
1908
 
1909
- #: lib/settings.php:884
1910
- msgid "not supported"
1911
  msgstr ""
1912
 
1913
- #: lib/settings.php:890
1914
- msgid "Wait Timeout"
1915
  msgstr ""
1916
 
1917
- #: lib/settings.php:915
1918
- msgid "may be different from PHP offset"
 
1919
  msgstr ""
1920
 
1921
- #: lib/settings.php:926
1922
- msgid "Want to uninstall WassUp?"
 
1923
  msgstr ""
1924
 
1925
- #: lib/settings.php:927
1926
- msgid ""
1927
- "No problem. Before you deactivate this plugin, check the box below to "
1928
- "cleanup any data that was collected by WassUp that could be left behind."
1929
  msgstr ""
1930
 
1931
- #: lib/settings.php:928
1932
- msgid "Permanently remove WassUp data and settings."
 
1933
  msgstr ""
1934
 
1935
- #: lib/settings.php:930
1936
- msgid "WARNING"
 
1937
  msgstr ""
1938
 
1939
- #: lib/settings.php:930
1940
- msgid ""
1941
- "All WassUp data and settings will be DELETED upon deactivation of this "
1942
- "plugin."
1943
  msgstr ""
1944
 
1945
- #: lib/settings.php:932
1946
- #, php-format
1947
- msgid ""
1948
- "This action cannot be undone. Before uninstalling WassUp, you should backup "
1949
- "your Wordpress database first. WassUp data is stored in the table %s."
1950
  msgstr ""
1951
 
1952
- #: lib/settings.php:934
1953
- #, php-format
1954
- msgid "To help improve this plugin, we would appreciate your feedback at %s."
1955
  msgstr ""
1956
 
1957
- #: lib/settings.php:942
1958
- msgid "Frequently Asked Questions"
1959
  msgstr ""
1960
 
1961
- #: lib/settings.php:944
1962
- msgid "How do I add WassUp's chart to my admin dashboard?"
1963
  msgstr ""
1964
 
1965
- #: lib/settings.php:945
1966
- #, php-format
1967
- msgid ""
1968
- "Check the box for \"Enable widget/small chart in admin dashboard\" under %s "
1969
- "tab."
1970
  msgstr ""
1971
 
1972
- #: lib/settings.php:946
1973
- msgid "How do I display WassUp widgets on my site?"
1974
  msgstr ""
1975
 
1976
- #: lib/settings.php:947
1977
- msgid ""
1978
- "From Wordpress widgets panel, drag the \"WassUp Online\" widget or the "
1979
- "\"Wassup Top Stats\" widget from the list of available widgets on the left "
1980
- "into your theme's \"Sidebar\" or \"Footer\" area on the right or use the "
1981
- "Customizer to add Wassup widgets interactively."
1982
  msgstr ""
1983
 
1984
- #: lib/settings.php:948
1985
- msgid ""
1986
- "My Wordpress theme is not widget ready. Is it possible to display WassUp "
1987
- "widgets on my site?"
1988
  msgstr ""
1989
 
1990
- #: lib/settings.php:949
 
 
 
 
1991
  msgid ""
1992
- "Yes. Insert the template tag \"wassup_sidebar()\" into your theme's "
1993
- "\"sidebar.php\" file to display Wassup widgets as a single combined widget "
1994
- "on your site."
1995
  msgstr ""
1996
 
1997
- #: lib/settings.php:950
1998
- msgid "How do I view the real-time visitor geolocation map in WassUp?"
1999
  msgstr ""
2000
 
2001
- #: lib/settings.php:951
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2002
  #, php-format
2003
- msgid ""
2004
- "Check the box for \"Display a GEO IP Map in spy visitors view\" in %s tab "
2005
- "and save, then navigate to %s panel to see the map."
2006
  msgstr ""
2007
 
2008
- #: lib/settings.php:952
2009
- msgid ""
2010
- "The map has vanished and I get the message: \"Google has disabled use of the "
2011
- "Maps API for this application\". How do I fix this?"
 
 
 
2012
  msgstr ""
2013
 
2014
- #: lib/settings.php:953
2015
  #, php-format
2016
- msgid ""
2017
- "Erase the contents of \"Google Maps API Key\" field under %s tab. Since "
2018
- "WassUp 1.8.4, an API key is not required for viewing Google!Maps API v3 maps "
2019
- "in WassUp."
2020
  msgstr ""
2021
 
2022
- #: lib/settings.php:954
2023
- msgid "How do I exclude a visitor from being recorded?"
 
2024
  msgstr ""
2025
 
2026
- #: lib/settings.php:955
2027
  #, php-format
2028
- msgid ""
2029
- "Navigate to %s tab and enter a visitor's username, IP address, or hostname "
2030
- "into the appropriate text area for that \"Recording Exclusion\" type."
2031
  msgstr ""
2032
 
2033
- #: lib/settings.php:956
2034
- msgid ""
2035
- "How do I stop (temporarily) WassUp from recording new visits on my site?"
2036
  msgstr ""
2037
 
2038
- #: lib/settings.php:957
2039
  #, php-format
2040
- msgid "Uncheck the box for \"Enable statistics recording\" under %s tab."
2041
  msgstr ""
2042
 
2043
- #: lib/settings.php:958
2044
- msgid ""
2045
- "In Wordpress multisite, how do I stop (temporarily) WassUp from recording "
2046
- "new visits on all sites in the network?"
2047
  msgstr ""
2048
 
2049
- #: lib/settings.php:959
2050
  #, php-format
2051
- msgid ""
2052
- "If plugin is \"network activated\", login as network admin, go to the "
2053
- "Network admin dashboard, navigate to %s tab and Uncheck the box for \"Enable "
2054
- "Statistics Recording for network\" and save."
2055
  msgstr ""
2056
 
2057
- #: lib/settings.php:960
2058
  #, php-format
2059
- msgid ""
2060
- "If plugin is NOT \"network activated\", login as network admin, go to the "
2061
- "main site/parent domain admin dashboard, navigate to %s tab, then Uncheck "
2062
- "the box for \"Enable Statistics Recording for network\" and save."
2063
  msgstr ""
2064
 
2065
- #: lib/settings.php:962
2066
- msgid ""
2067
- "No data is being displayed; or \"Visitor Details\" panel show 0 records for "
2068
- "the last 24 hours. How do I fix this?"
2069
  msgstr ""
2070
 
2071
- #: lib/settings.php:963
2072
  #, php-format
2073
- msgid ""
2074
- "Check the box for \"Enable statistics recording\" setting under %s tab and "
2075
- "save."
2076
  msgstr ""
2077
 
2078
- #: lib/settings.php:964
2079
  #, php-format
2080
- msgid "Click the [Reset to Default] button under %s tab."
2081
  msgstr ""
2082
 
2083
- #: lib/settings.php:965
2084
  #, php-format
2085
- msgid ""
2086
- "Navigate to %s tab and uncheck the \"MySQL Delayed Insert\" setting and save."
2087
  msgstr ""
2088
 
2089
- #: lib/settings.php:965 lib/settings.php:970 lib/settings.php:976
2090
- msgid "Manage File & Data"
 
2091
  msgstr ""
2092
 
2093
- #: lib/settings.php:966
2094
- msgid "Deactivate and Re-activate Wassup from Wordpress Plugins panel."
 
 
2095
  msgstr ""
2096
 
2097
- #: lib/settings.php:967
 
2098
  #, php-format
2099
- msgid ""
2100
- "If you have access to MySql/phpMyAdmin on your host server, run the MySql "
2101
- "command %s to repair and release any locks on wassup table. Note that wassup "
2102
- "table name may be different in other Wordpress setups."
2103
  msgstr ""
2104
 
2105
- #: lib/settings.php:968
2106
- msgid ""
2107
- "As a last resort, uninstall WassUp cleanly (delete data and files) and "
2108
- "reinstall it."
2109
  msgstr ""
2110
 
2111
- #: lib/settings.php:969
2112
- msgid ""
2113
- "My popular web site is hosted on a shared server with restrictive database "
2114
- "size limits. How do I prevent WassUp's table from growing too big for my "
2115
- "allocated quota?"
2116
  msgstr ""
2117
 
2118
- #: lib/settings.php:970
2119
- #, php-format
2120
- msgid ""
2121
- "Navigate to %s tab and enable the setting for \"Auto Delete\" of old records "
2122
- "and/or check the box to receive an email alert when the table size limit is "
2123
- "exceeded."
2124
  msgstr ""
2125
 
2126
- #: lib/settings.php:971
2127
- msgid ""
2128
- "WassUp visitor counts are much lower than actual for my website. Why is "
2129
- "there a discrepancy and how do I fix it?"
2130
  msgstr ""
2131
 
2132
- #: lib/settings.php:972
2133
- msgid ""
2134
- "Low visitor count is likely caused by page caching on your website. WassUp "
2135
- "is incompatible with static page caching plugins such as WP Supercache, WP "
2136
- "Cache, and Hyper Cache. To fix, uninstall your cache plugin or switch to a "
2137
- "different (javascript-based) statistics plugin."
2138
  msgstr ""
2139
 
2140
- #: lib/settings.php:973
2141
- msgid "Is there any caching plugin that works with WassUp?"
2142
  msgstr ""
2143
 
2144
- #: lib/settings.php:974
2145
- #, php-format
2146
- msgid "%s is the only caching plugin verified to work with WassUp."
2147
  msgstr ""
2148
 
2149
- #: lib/settings.php:975
2150
- msgid "How can I make Wassup run faster?"
 
2151
  msgstr ""
2152
 
2153
- #: lib/settings.php:976
2154
- #, php-format
2155
- msgid ""
2156
- "Keep Wassup table size small with automatic deletions or periodic manual "
2157
- "delete of old records under %s tab."
2158
  msgstr ""
2159
 
2160
- #: lib/settings.php:977
2161
- msgid ""
2162
- "If using the \"Top Stats\" widget on your site, set refresh frequency to 15 "
2163
- "minutes or higher."
2164
  msgstr ""
2165
 
2166
- #: lib/settings.php:978
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2167
  #, php-format
2168
- msgid ""
2169
- "Reduce the number of recording exclusions (by ip/hostname/username/url) "
2170
- "under %s tab."
 
 
 
 
 
 
 
 
 
 
2171
  msgstr ""
2172
 
2173
- #: lib/settings.php:980
2174
- msgid "and"
2175
  msgstr ""
2176
 
2177
- #: lib/settings.php:981
2178
- #, php-format
2179
- msgid ""
2180
- "Delete the files %s from Wassup plugin folder to force reduce I/O usage in "
2181
- "spam/malware detection."
2182
  msgstr ""
2183
 
2184
- #: lib/settings.php:982
2185
- #, php-format
2186
- msgid ""
2187
- "Stop all spam/malware detection by unchecking \"Enable Spam and malware "
2188
- "detection on records\" under %s tab."
2189
  msgstr ""
2190
 
2191
- #: lib/settings.php:983
2192
- msgid ""
2193
- "Why does WassUp stats sometimes show more page views than actual pages "
2194
- "clicked by a person?"
 
 
2195
  msgstr ""
2196
 
2197
- #: lib/settings.php:984
2198
  msgid ""
2199
- "\"Phantom\" page views can occur when a user's browser does automatic feed "
2200
- "retrieval, link pre-fetching, a page refresh, or automatically adds your "
2201
- "website to it's \"Top sites\" window (Safari). WassUp tracks these because "
2202
- "they are valid requests from the browser and are sometimes indistinguishable "
2203
- "from user link clicks."
2204
  msgstr ""
2205
 
2206
- #: lib/settings.php:985
2207
- msgid "How do I upgrade WassUp safely when my site has frequent visitors?"
 
 
2208
  msgstr ""
2209
 
2210
- #: lib/settings.php:986
2211
- #, php-format
2212
  msgid ""
2213
- "To upgrade WassUp when your site is busy, you must first disable statistics "
2214
- "recording manually under %s tab, then do the plugin upgrade, and afterwards "
2215
- "re-enable recording manually when the upgrade is complete and the plugin is "
2216
- "active."
2217
  msgstr ""
2218
 
2219
- #: lib/settings.php:987
2220
- msgid "An unspecified error occurred during plugin upgrade. What do I do next?"
2221
  msgstr ""
2222
 
2223
- #: lib/settings.php:988
2224
- msgid ""
2225
- "Wait a few minutes. Do NOT re-attempt to upgrade nor try to activate the "
2226
- "plugin again! An activation error with no explanation is probably due to "
2227
- "your browser timing out, not an upgrade failure. WassUp continues it's "
2228
- "upgrade in the background and will activate automatically when it is done. "
2229
- "After a few minutes (5-10) has passed, revisit Wordpress admin Plugins panel "
2230
- "and verify that Wassup plugin has activated."
2231
  msgstr ""
2232
 
2233
- #: lib/settings.php:989
2234
- msgid "How do I uninstall WassUp cleanly?"
2235
  msgstr ""
2236
 
2237
- #: lib/settings.php:990
2238
- msgid ""
2239
- "From a single Wordpress site: navigate to Wordpress Plugins panel and "
2240
- "deactivate WassUp plugin. Then, on the same page, click the \"delete\" link "
2241
- "below WassUp name. This deletes both data and files permanently."
2242
  msgstr ""
2243
 
2244
- #: lib/settings.php:991
2245
- msgid ""
2246
- "From Wordpress multisite Network admin panel: navigate to Plugins panel and "
2247
- "deactivate WassUp plugin. If the plugin is not \"network activated\", "
2248
- "navigate to the main site/parent domain Plugins panel and deactivate Wassup "
2249
- "plugin there, then return to Network admin Plugins panel. Click the \"delete"
2250
- "\" link below WassUp name. This deletes both data and files permanently from "
2251
- "the main site/parent domain and deletes Wassup data from all the subsites in "
2252
- "the network."
2253
  msgstr ""
2254
 
2255
- #: lib/settings.php:992
2256
- #, php-format
2257
- msgid ""
2258
- "From a subsite in Wordpress multisite: navigate to %s tab and check the box "
2259
- "for \"Permanently remove WassUp data and settings\" and save. Next, go to "
2260
- "the subsite's Plugins panel and deactivate WassUp plugin. This deletes the "
2261
- "subsite's data permanently. No files are deleted (not needed)."
2262
  msgstr ""
2263
 
2264
- #: lib/settings.php:993
2265
- #, php-format
2266
- msgid ""
2267
- "From a Wordpress 2.x site: navigate to %s tab and check the box for "
2268
- "\"Permanently remove WassUp data and settings\" and save. Next, go to "
2269
- "Wordpress Plugins panel and deactivate WassUp plugin. This deletes the data "
2270
- "permanently. To delete the plugin files from Wordpress 2.x, use an ftp "
2271
- "client software on your PC or login to your host server's \"cpanel\" and use "
2272
- "\"File Manager\" to delete the folder \"wassup\" from the %s directory on "
2273
- "your host server."
2274
  msgstr ""
2275
 
2276
- #: lib/settings.php:995
2277
- #, php-format
2278
- msgid "Visit the %s to find more answers to your WassUp questions."
2279
  msgstr ""
2280
 
2281
- #: lib/settings.php:995
2282
- msgid "Plugin Forum"
2283
  msgstr ""
2284
 
2285
- #: lib/settings.php:1000
2286
- msgid "How you can donate"
2287
  msgstr ""
2288
 
2289
- #: lib/settings.php:1001
2290
- msgid ""
2291
- "If you like this plugin, please consider making a donation to help keep it's "
2292
- "development active."
2293
  msgstr ""
2294
 
2295
- #: lib/settings.php:1003
2296
- #, php-format
2297
- msgid "Donate by %s"
2298
  msgstr ""
2299
 
2300
- #: lib/settings.php:1004
2301
- #, php-format
2302
- msgid "Donate %s"
2303
  msgstr ""
2304
 
2305
- #: lib/settings.php:1006
2306
- msgid "Send your bitcoin donation to this address"
2307
  msgstr ""
2308
 
2309
- #: lib/uadetector.class.php:62 lib/uadetector.class.php:101
2310
- msgid "Script Injection Bot"
2311
  msgstr ""
2312
 
2313
- #: lib/uadetector.class.php:71
2314
- msgid "Unknown Feedreader"
2315
  msgstr ""
2316
 
2317
- #: lib/upgrade.php:123
2318
- msgid "COMPATIBILITY WARNING: non-MySQL database type detected!"
2319
  msgstr ""
2320
 
2321
- #: lib/upgrade.php:123
2322
- msgid ""
2323
- "WassUp uses complex MySQL queries that may not run on a different database "
2324
- "type."
2325
  msgstr ""
2326
 
2327
- #: lib/upgrade.php:125
2328
- msgid "WassUp cannot generate accurate statistics with page caching enabled."
2329
  msgstr ""
2330
 
2331
- #: lib/upgrade.php:125
2332
- msgid ""
2333
- "If your cache plugin stores whole Wordpress pages/posts as static HTML, then "
2334
- "WassUp won't run properly. Please deactivate your cache plugin and remove "
2335
- "\"WP_CACHE\" from \"wp_config.php\" or switch to a different statistics "
2336
- "plugin."
2337
  msgstr ""
2338
 
2339
- #: lib/upgrade.php:132
2340
- #, php-format
2341
- msgid ""
2342
- "WARNING: Insufficient memory: %s found! A minimum allocation of %s is "
2343
- "recommended for WassUp and Wordpress."
2344
  msgstr ""
2345
 
2346
- #: lib/upgrade.php:133
2347
- #, php-format
2348
- msgid "See %s for information about increasing Wordpress memory."
2349
  msgstr ""
2350
 
2351
- #: lib/upgrade.php:140
2352
- msgid "IMPORTANT: Wassup Widget has changed and must be re-installed."
2353
  msgstr ""
2354
 
2355
- #: lib/upgrade.php:322
2356
- msgid "Welcome to WassUP"
2357
  msgstr ""
2358
 
2359
- #: lib/upgrade.php:345 lib/upgrade.php:388
2360
- #, php-format
2361
- msgid "An error occurred during the install of table %s."
2362
  msgstr ""
2363
 
2364
- #: lib/wassup.class.php:429 lib/compat-lib/wassup.class.php:429
2365
- msgid "Administrator"
2366
  msgstr ""
2367
 
2368
- #: lib/wassup.class.php:430 lib/compat-lib/wassup.class.php:430
2369
- msgid "Editor"
2370
  msgstr ""
2371
 
2372
- #: lib/wassup.class.php:431 lib/compat-lib/wassup.class.php:431
2373
- msgid "Author"
2374
  msgstr ""
2375
 
2376
- #: lib/wassup.class.php:432 lib/compat-lib/wassup.class.php:432
2377
- msgid "Contributor"
2378
  msgstr ""
2379
 
2380
- #: lib/wassup.class.php:433 lib/compat-lib/wassup.class.php:433
2381
- msgid "Subscriber"
2382
  msgstr ""
2383
 
2384
- #: lib/wassup.class.php:439 lib/compat-lib/wassup.class.php:439
2385
- msgid "One - 2 lines chart 1 axis"
2386
  msgstr ""
2387
 
2388
- #: lib/wassup.class.php:440 lib/compat-lib/wassup.class.php:440
2389
- msgid "Two - 2 lines chart 2 axes"
2390
  msgstr ""
2391
 
2392
- #: lib/wassup.class.php:460 lib/compat-lib/wassup.class.php:460
2393
- msgid "Everything"
2394
  msgstr ""
2395
 
2396
- #: lib/wassup.class.php:462 lib/compat-lib/wassup.class.php:462
2397
- msgid "No spider"
2398
  msgstr ""
2399
 
2400
- #: lib/wassup.class.php:464 lib/compat-lib/wassup.class.php:464
2401
- msgid "No Spam"
2402
  msgstr ""
2403
 
2404
- #: lib/wassup.class.php:465 lib/compat-lib/wassup.class.php:465
2405
- msgid "No Spam, No Spider"
2406
  msgstr ""
2407
 
2408
- #: lib/wassup.class.php:466 lib/compat-lib/wassup.class.php:466
2409
- msgid "Users logged in"
2410
  msgstr ""
2411
 
2412
- #: lib/wassup.class.php:468 lib/compat-lib/wassup.class.php:468
2413
- msgid "Referrer from search engine"
 
2414
  msgstr ""
2415
 
2416
- #: lib/wassup.class.php:469 lib/compat-lib/wassup.class.php:469
2417
- msgid "Referrer from ext link"
2418
  msgstr ""
2419
 
2420
- #: lib/wassup.class.php:502 lib/compat-lib/wassup.class.php:502
2421
- msgid "Don't delete anything"
2422
  msgstr ""
2423
 
2424
- #: lib/wassup.class.php:503 lib/wassup.class.php:539
2425
- #: lib/compat-lib/wassup.class.php:503 lib/compat-lib/wassup.class.php:539
2426
- msgid "24 hours"
2427
  msgstr ""
2428
 
2429
- #: lib/wassup.class.php:504 lib/wassup.class.php:540
2430
- #: lib/compat-lib/wassup.class.php:504 lib/compat-lib/wassup.class.php:540
2431
- msgid "7 days"
2432
  msgstr ""
2433
 
2434
- #: lib/wassup.class.php:505 lib/wassup.class.php:541
2435
- #: lib/compat-lib/wassup.class.php:505 lib/compat-lib/wassup.class.php:541
2436
- msgid "2 weeks"
2437
  msgstr ""
2438
 
2439
- #: lib/wassup.class.php:506 lib/wassup.class.php:542
2440
- #: lib/compat-lib/wassup.class.php:506 lib/compat-lib/wassup.class.php:542
2441
- msgid "1 month"
2442
  msgstr ""
2443
 
2444
- #: lib/wassup.class.php:507 lib/wassup.class.php:543
2445
- #: lib/compat-lib/wassup.class.php:507 lib/compat-lib/wassup.class.php:543
2446
- msgid "3 months"
2447
  msgstr ""
2448
 
2449
- #: lib/wassup.class.php:508 lib/wassup.class.php:544
2450
- #: lib/compat-lib/wassup.class.php:508 lib/compat-lib/wassup.class.php:544
2451
- msgid "6 months"
2452
  msgstr ""
2453
 
2454
- #: lib/wassup.class.php:509 lib/wassup.class.php:545
2455
- #: lib/compat-lib/wassup.class.php:509 lib/compat-lib/wassup.class.php:545
2456
- msgid "1 year"
2457
  msgstr ""
2458
 
2459
- #: lib/wassup.class.php:516 lib/compat-lib/wassup.class.php:516
2460
- msgid "All"
 
2461
  msgstr ""
2462
 
2463
- #: lib/wassup.class.php:519 lib/compat-lib/wassup.class.php:519
2464
- msgid "Spider and spam"
 
2465
  msgstr ""
2466
 
2467
- #: lib/wassup.class.php:529 lib/compat-lib/wassup.class.php:529
2468
- msgid "IP Address"
2469
  msgstr ""
2470
 
2471
- #: lib/wassup.class.php:530 lib/compat-lib/wassup.class.php:530
2472
- msgid "URL Request"
2473
  msgstr ""
2474
 
2475
- #: lib/wassup.class.php:536 lib/compat-lib/wassup.class.php:536
2476
- msgid "1 hour"
2477
  msgstr ""
2478
 
2479
- #: lib/wassup.class.php:537 lib/compat-lib/wassup.class.php:537
2480
- msgid "6 hours"
2481
  msgstr ""
2482
 
2483
- #: lib/wassup.class.php:538 lib/compat-lib/wassup.class.php:538
2484
- msgid "12 hours"
2485
  msgstr ""
2486
 
2487
- #: lib/wassup.class.php:546 lib/compat-lib/wassup.class.php:546
2488
- msgid "all time"
2489
  msgstr ""
2490
 
2491
- #: lib/wassup.class.php:641 lib/compat-lib/wassup.class.php:641
2492
- msgid "Nothing to do!"
2493
  msgstr ""
2494
 
2495
- #: lib/wassup.class.php:766 lib/compat-lib/wassup.class.php:766
2496
- msgid "Unknown"
2497
  msgstr ""
2498
 
2499
- #: lib/wassup.class.php:947 lib/compat-lib/wassup.class.php:947
2500
- msgid "error"
2501
  msgstr ""
2502
 
2503
- #: lib/wassup.class.php:948 lib/compat-lib/wassup.class.php:948
2504
- msgid "warning"
2505
  msgstr ""
2506
 
2507
- #: lib/wassup.class.php:949 lib/compat-lib/wassup.class.php:949
2508
- msgid "updated"
2509
  msgstr ""
2510
 
2511
- #: lib/wassup.class.php:950 lib/compat-lib/wassup.class.php:950
2512
- msgid "upgraded"
2513
  msgstr ""
2514
 
2515
- #: lib/wassup.class.php:951 lib/compat-lib/wassup.class.php:951
2516
- msgid "deleted"
2517
  msgstr ""
2518
 
2519
- #: lib/wassup.class.php:1630 lib/compat-lib/wassup.class.php:1627
2520
- #, php-format
2521
- msgid "%s Error!"
2522
  msgstr ""
2523
 
2524
- #: lib/wassup.class.php:1731 lib/compat-lib/wassup.class.php:1728
2525
- msgid "Wassup auto-delete notice"
2526
  msgstr ""
2527
 
2528
- #: lib/wassup.class.php:1732 lib/compat-lib/wassup.class.php:1729
2529
- #, php-format
2530
- msgid "Auto-delete deleted %d old %s table records today."
2531
  msgstr ""
2532
 
2533
- #: lib/wassup.class.php:1767 lib/compat-lib/wassup.class.php:1764
2534
- #, php-format
2535
- msgid "Error with TABLE %s: Not found"
2536
  msgstr ""
2537
 
2538
- #: lib/wassup.class.php:1789 lib/compat-lib/wassup.class.php:1786
2539
- #, php-format
2540
- msgid "Error with \"SHOW CREATE TABLE\" for %s."
2541
  msgstr ""
2542
 
2543
- #: lib/wassup.class.php:1796 lib/compat-lib/wassup.class.php:1793
2544
- #, php-format
2545
- msgid "Table structure of table %s"
2546
  msgstr ""
2547
 
2548
- #: lib/wassup.class.php:1802 lib/compat-lib/wassup.class.php:1799
2549
- #, php-format
2550
- msgid "Data contents of table %s"
2551
  msgstr ""
2552
 
2553
- #: lib/wassup.class.php:1810 lib/compat-lib/wassup.class.php:1807
2554
- #, php-format
2555
- msgid "Error getting table structure of %s: %s"
2556
  msgstr ""
2557
 
2558
- #: lib/wassup.class.php:1813 lib/compat-lib/wassup.class.php:1810
2559
- #, php-format
2560
- msgid "Error getting table structure of %s"
2561
  msgstr ""
2562
 
2563
- #: lib/wassup.class.php:1819 lib/compat-lib/wassup.class.php:1816
2564
- #, php-format
2565
- msgid "Error with table %s: %s"
2566
  msgstr ""
2567
 
2568
- #: lib/wassup.class.php:1821 lib/compat-lib/wassup.class.php:1818
2569
- #, php-format
2570
- msgid "Error with table %s: No data"
2571
  msgstr ""
2572
 
2573
- #: lib/wassup.class.php:1883 lib/compat-lib/wassup.class.php:1880
2574
  #, php-format
2575
- msgid "Error exporting data from table %s: %s"
2576
  msgstr ""
2577
 
2578
- #: lib/wassup.class.php:1932 lib/compat-lib/wassup.class.php:1929
2579
- #, php-format
2580
- msgid "End of data contents of table %s"
2581
  msgstr ""
2582
 
2583
- #: lib/wassup.class.php:1934 lib/compat-lib/wassup.class.php:1931
2584
- #, php-format
2585
- msgid "Interrupted data contents of table %s"
2586
  msgstr ""
2587
 
2588
- #: lib/wassup.class.php:1943 lib/compat-lib/wassup.class.php:1940
2589
- #, php-format
2590
- msgid "End time: %d"
2591
  msgstr ""
2592
 
2593
- #: lib/wassup.class.php:1944 lib/wassup.class.php:1949
2594
- #: lib/compat-lib/wassup.class.php:1941 lib/compat-lib/wassup.class.php:1946
2595
- #, php-format
2596
- msgid "%d out of %d records exported."
2597
  msgstr ""
2598
 
2599
- #: lib/wassup.class.php:1944 lib/wassup.class.php:1949
2600
- #: lib/compat-lib/wassup.class.php:1941 lib/compat-lib/wassup.class.php:1946
2601
- #, php-format
2602
- msgid "Last record ID: %d"
2603
  msgstr ""
2604
 
2605
- #: lib/wassup.class.php:2063 lib/wassup.class.php:2070
2606
- #: lib/compat-lib/wassup.class.php:2058 lib/compat-lib/wassup.class.php:2065
2607
- msgid "direct hit"
2608
  msgstr ""
2609
 
2610
- #: lib/wassup.class.php:2067 lib/compat-lib/wassup.class.php:2062
2611
- msgid "from your site"
2612
  msgstr ""
2613
 
2614
- #: widgets/widgets.php:47
2615
- msgid "base widget"
 
2616
  msgstr ""
2617
 
2618
- #: widgets/widgets.php:90 widgets/widgets.php:241 widgets/widgets.php:419
2619
- msgid "Title"
 
2620
  msgstr ""
2621
 
2622
- #: widgets/widgets.php:93 widgets/widgets.php:261 widgets/widgets.php:479
 
2623
  msgid "Widget style options"
2624
  msgstr ""
2625
 
2626
- #: widgets/widgets.php:95 widgets/widgets.php:263 widgets/widgets.php:481
 
2627
  #, php-format
2628
  msgid "Class attribute for %s list:"
2629
  msgstr ""
2630
 
2631
- #: widgets/widgets.php:97 widgets/widgets.php:265 widgets/widgets.php:483
 
2632
  msgid "Max. chars to display from left"
2633
  msgstr ""
2634
 
2635
- #: widgets/widgets.php:98 widgets/widgets.php:266 widgets/widgets.php:484
 
2636
  msgid "enter \"0\" for theme default/line wrap of long texts"
2637
  msgstr ""
2638
 
2639
- #: widgets/widgets.php:212
 
 
 
 
2640
  msgid "Online"
2641
  msgstr ""
2642
 
2643
- #: widgets/widgets.php:213
2644
  msgid "Show counts of your site's visitors who are currently online."
2645
  msgstr ""
2646
 
2647
- #: widgets/widgets.php:224
2648
  msgid "Online Now"
2649
  msgstr ""
2650
 
2651
- #: widgets/widgets.php:244
2652
  msgid "Show online counts for:"
2653
  msgstr ""
2654
 
2655
- #: widgets/widgets.php:246
2656
  msgid "All current visitors"
2657
  msgstr ""
2658
 
2659
- #: widgets/widgets.php:247 widgets/widget_functions.php:227
2660
  msgid "Logged-in users"
2661
  msgstr ""
2662
 
2663
- #: widgets/widgets.php:249 widgets/widget_functions.php:247
2664
  msgid "Regular visitors"
2665
  msgstr ""
2666
 
2667
- #: widgets/widgets.php:250 widgets/widget_functions.php:257
2668
  msgid "Others"
2669
  msgstr ""
2670
 
2671
- #: widgets/widgets.php:254
2672
  msgid "Online Users Details"
2673
  msgstr ""
2674
 
2675
- #: widgets/widgets.php:256
2676
  msgid "Show online usernames to registered users"
2677
  msgstr ""
2678
 
2679
- #: widgets/widgets.php:257
2680
  msgid "Show country flags of users online"
2681
  msgstr ""
2682
 
2683
- #: widgets/widgets.php:270
2684
  msgid "online counts are automatically cached for 1 minute."
2685
  msgstr ""
2686
 
2687
- #: widgets/widgets.php:271 widgets/widgets.php:489
2688
  msgid "empty results are not displayed."
2689
  msgstr ""
2690
 
2691
- #: widgets/widgets.php:386
2692
  msgid "Top Stats"
2693
  msgstr ""
2694
 
2695
- #: widgets/widgets.php:387
2696
  msgid ""
2697
  "List your site's most popular or trending items from Wassup's latest stats "
2698
  "data."
2699
  msgstr ""
2700
 
2701
- #: widgets/widgets.php:420
2702
  msgid "of first checked item below"
2703
  msgstr ""
2704
 
2705
- #: widgets/widgets.php:422
2706
  msgid "List Top Results for"
2707
  msgstr ""
2708
 
2709
- #: widgets/widgets.php:426
2710
  msgid "Stat item"
2711
  msgstr ""
2712
 
2713
- #: widgets/widgets.php:427
2714
  msgid "max limit"
2715
  msgstr ""
2716
 
2717
- #: widgets/widgets.php:429
2718
  msgid "Titles of posts and pages"
2719
  msgstr ""
2720
 
2721
- #: widgets/widgets.php:429
2722
  msgid "Latest articles"
2723
  msgstr ""
2724
 
2725
- #: widgets/widgets.php:435
2726
  msgid "Search engine searches"
2727
  msgstr ""
2728
 
2729
- #: widgets/widgets.php:435
2730
  msgid "Latest searches"
2731
  msgstr ""
2732
 
2733
- #: widgets/widgets.php:441
2734
  msgid "External links that generated referrals to your site"
2735
  msgstr ""
2736
 
2737
- #: widgets/widgets.php:441
2738
  msgid "Latest referrers"
2739
  msgstr ""
2740
 
2741
- #: widgets/widgets.php:447
2742
  msgid "Latest URL requests"
2743
  msgstr ""
2744
 
2745
- #: widgets/widgets.php:453
2746
  msgid "Client browser software"
2747
  msgstr ""
2748
 
2749
- #: widgets/widgets.php:453
2750
  msgid "Latest browsers"
2751
  msgstr ""
2752
 
2753
- #: widgets/widgets.php:459
2754
  msgid "Client device/operating software"
2755
  msgstr ""
2756
 
2757
- #: widgets/widgets.php:459
2758
  msgid "Latest OS"
2759
  msgstr ""
2760
 
2761
- #: widgets/widgets.php:465
2762
  msgid "Visitors country/language"
2763
  msgstr ""
2764
 
2765
- #: widgets/widgets.php:465
2766
  msgid "Latest locale"
2767
  msgstr ""
2768
 
2769
- #: widgets/widgets.php:472
2770
  msgid "Show counts for each item"
2771
  msgstr ""
2772
 
2773
- #: widgets/widgets.php:473
2774
  msgid "Statistics timeframe"
2775
  msgstr ""
2776
 
2777
- #: widgets/widgets.php:474
2778
  msgid ""
2779
  "select 1-30 days for latest top results, 1-12 hours for trending results"
2780
  msgstr ""
2781
 
2782
- #: widgets/widgets.php:475
2783
  msgid "Refresh statistics every:"
2784
  msgstr ""
2785
 
2786
- #: widgets/widgets.php:488
2787
  msgid "known spammers and spiders are excluded from results."
2788
  msgstr ""
2789
 
2790
- #: widgets/widgets.php:596
2791
  msgid "Trending"
2792
  msgstr ""
2793
 
2794
- #: widgets/widget_functions.php:256
2795
  msgid "Other"
2796
  msgstr ""
2797
 
2798
- #: widgets/widget_functions.php:401
2799
  #, php-format
2800
  msgid "%s articles"
2801
  msgstr ""
2802
 
2803
- #: widgets/widget_functions.php:402
2804
  #, php-format
2805
  msgid "%s searches"
2806
  msgstr ""
2807
 
2808
- #: widgets/widget_functions.php:403
2809
  #, php-format
2810
  msgid "%s referrers"
2811
  msgstr ""
2812
 
2813
- #: widgets/widget_functions.php:404
2814
  #, php-format
2815
  msgid "%s requests"
2816
  msgstr ""
2817
 
2818
- #: widgets/widget_functions.php:405
2819
  #, php-format
2820
  msgid "%s browsers"
2821
  msgstr ""
2822
 
2823
- #: widgets/widget_functions.php:406
2824
  #, php-format
2825
  msgid "%s OS"
2826
  msgstr ""
2827
 
2828
- #: widgets/widget_functions.php:407
2829
  #, php-format
2830
  msgid "%s locale"
2831
  msgstr ""
2832
-
2833
- #: widgets/widget_compat.php:40
2834
- msgid "There are no options for this widget."
2835
- msgstr ""
1
  # LANGUAGE translation for WassUp Real-time Analytics plugin
2
+ # Copyright (C) 2009-2016
3
  # This file is distributed under the same license as WassUp plugin.
4
  # Michele Marcucci <michele(at)befree.it>, 2009.
5
  #
6
  #, fuzzy
7
  msgid ""
8
  msgstr ""
9
+ "Project-Id-Version: WassUp 1.9.1\n"
10
  "Report-Msgid-Bugs-To: michele@befree.it\n"
11
+ "POT-Creation-Date: 2016-10-04 18:34-0400\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
  "MIME-Version: 1.0\n"
17
  "Content-Type: text/plain; charset=CHARSET\n"
18
  "Content-Transfer-Encoding: 8bit\n"
19
 
20
+ #: wassup.php:132
 
 
 
 
 
 
 
 
21
  #, php-format
22
  msgid "File %s does not exist!"
23
  msgstr ""
24
 
25
+ #: wassup.php:142
26
  msgid ""
27
  "Sorry, WassUp requires WordPress 3.1 or higher to work in multisite setups"
28
  msgstr ""
29
 
30
+ #: wassup.php:153
31
+ msgid "Sorry! \"Network Activation\" is DISABLED for subdomain networks."
32
+ msgstr ""
33
+
34
+ #: wassup.php:154
35
+ #, php-format
36
+ msgid "%s must be activated on each subdomain site separately."
37
  msgstr ""
38
 
39
+ #: wassup.php:155
40
  msgid ""
41
+ "Activate plugin on your parent domain (main site) to set default options for "
42
+ "your network."
43
+ msgstr ""
44
+
45
+ #: wassup.php:156
46
+ msgid "Back to Plugins"
47
  msgstr ""
48
 
49
+ #: wassup.php:218 lib\upgrade.php:717
50
  msgid "Database created/upgraded successfully"
51
  msgstr ""
52
 
53
+ #: wassup.php:220
54
  msgid ""
55
  "An error occurred during the upgrade. WassUp table structure may not have "
56
  "been updated properly."
57
  msgstr ""
58
 
59
+ #: wassup.php:224
60
+ msgid "activation successful"
61
  msgstr ""
62
 
63
+ #: wassup.php:226
64
+ msgid "activation successful. No upgrade necessary."
65
  msgstr ""
66
 
67
+ #: wassup.php:253
68
  #, php-format
69
  msgid "%s: database upgrade failed!"
70
  msgstr ""
71
 
72
+ #: wassup.php:264
73
  #, php-format
74
  msgid "%s: plugin install/upgrade failed!"
75
  msgstr ""
76
 
77
+ #: wassup.php:444 wassup.php:447 wassup.php:450 lib\action.php:59
78
  msgid "Bad request!"
79
  msgstr ""
80
 
81
+ #: wassup.php:636
82
+ msgid "Export ERROR: nonce failure!"
83
  msgstr ""
84
 
85
+ #: wassup.php:639 lib\wassup.class.php:1907 lib\compat-lib\compat_php.php:1917
86
+ msgid "Export ERROR: login required!"
87
  msgstr ""
88
 
89
+ #: wassup.php:683
90
+ msgid "Export failed due to script interruption or timeout error!"
91
  msgstr ""
92
 
93
+ #: wassup.php:697
94
+ msgid "ERROR: Nothing to Export."
 
95
  msgstr ""
96
 
97
+ #: wassup.php:970 wassup.php:3210 lib\uadetector.class.php:607
98
+ #: lib\uadetector.class.php:1438
99
+ msgid "Unknown Spider"
100
  msgstr ""
101
 
102
+ #: wassup.php:971
103
+ msgid "Unknown Browser"
104
  msgstr ""
105
 
106
+ #: wassup.php:1580
107
+ msgid "Spoofer bot"
108
  msgstr ""
109
 
110
+ #: wassup.php:1993
111
+ #, php-format
112
+ msgid "%s WassUp Plugin table has reached maximum size!"
113
  msgstr ""
114
 
115
+ #: wassup.php:1993
116
+ msgid "ALERT"
117
  msgstr ""
118
 
119
+ #: wassup.php:1994
120
+ msgid "Hi"
121
  msgstr ""
122
 
123
+ #: wassup.php:1994
124
+ msgid ""
125
+ "you have received this email because your WassUp Database table at your "
126
+ "Wordpress blog"
127
  msgstr ""
128
 
129
+ #: wassup.php:1994
130
+ msgid "has reached the maximum value set in the options menu"
131
  msgstr ""
132
 
133
+ #: wassup.php:1995
134
+ msgid ""
135
+ "This is only a reminder, please take the actions you want in the WassUp "
136
+ "options menu"
 
 
 
137
  msgstr ""
138
 
139
+ #: wassup.php:1995
140
+ msgid "This alert now will be removed and you will be able to set a new one"
141
  msgstr ""
142
 
143
+ #: wassup.php:1996
144
+ msgid ""
145
+ "Thank you for using WassUp plugin. Check if there is a new version available "
146
+ "here:"
147
  msgstr ""
148
 
149
+ #: wassup.php:1996
150
+ msgid "Have a nice day!"
151
  msgstr ""
152
 
153
+ #: wassup.php:2237 wassup.php:2681
154
+ msgid "encrypted search"
 
155
  msgstr ""
156
 
157
+ #: wassup.php:3197 wassup.php:3204
158
+ msgid "Feed Reader"
159
  msgstr ""
160
 
161
+ #: wassup.php:3205
162
+ msgid "feed reader"
 
163
  msgstr ""
164
 
165
+ #: wassup.php:3812
166
+ msgid "timestamp"
167
  msgstr ""
168
 
169
+ #: wassup.php:3813
170
+ msgid "If above timestamp is not current time, this page is cached"
171
  msgstr ""
172
 
173
+ #: wassup.php:3994
174
+ msgid "Visitors Online"
175
  msgstr ""
176
 
177
+ #: wassup.php:4009 lib\compat-lib\compat_widget.php:157 widgets\widgets.php:151
178
+ #: widgets\widgets.php:342 widgets\widgets.php:556
179
+ msgid "No Data"
180
  msgstr ""
181
 
182
+ #: lib\action.php:50
183
+ msgid "Missing or invalid action parameter!"
184
  msgstr ""
185
 
186
+ #: lib\action.php:62
187
+ msgid "Login required!"
188
  msgstr ""
189
 
190
+ #: lib\action.php:66
191
+ msgid "Missing or invalid whash parameter!"
192
  msgstr ""
193
 
194
+ #: lib\action.php:76
195
+ msgid "invalid hash parameter!"
196
  msgstr ""
197
 
198
+ #: lib\action.php:80
199
+ msgid "Nothing to do"
 
 
200
  msgstr ""
201
 
202
+ #: lib\action.php:100
203
+ msgid "An error occurred during delete of"
204
  msgstr ""
205
 
206
+ #: lib\action.php:105 lib\action.php:116 lib\action.php:119 lib\action.php:122
207
+ msgid "Error"
208
  msgstr ""
209
 
210
+ #: lib\action.php:109
211
+ #, php-format
212
+ msgid "%d records deleted!"
213
  msgstr ""
214
 
215
+ #: lib\action.php:155
216
+ msgid "ERROR: bad date parameter"
217
  msgstr ""
218
 
219
+ #: lib\action.php:208
220
+ msgid "Error: Nothing to do!"
221
  msgstr ""
222
 
223
+ #: lib\akismet.class.php:127
224
+ msgid "Timed out waiting for server response."
225
  msgstr ""
226
 
227
+ #: lib\akismet.class.php:129 lib\akismet.class.php:132
228
+ msgid "The response could not be retrieved."
229
  msgstr ""
230
 
231
+ #: lib\akismet.class.php:139
232
+ msgid "Could not connect to Akismet server."
233
  msgstr ""
234
 
235
+ #: lib\akismet.class.php:193
236
+ msgid "Your Akismet API key is not valid."
 
 
 
237
  msgstr ""
238
 
239
+ #: lib\compatibility.php:79
240
+ msgid "Sorry, WassUp requires WordPress 2.2 or higher to work"
241
  msgstr ""
242
 
243
+ #: lib\compatibility.php:85
244
+ msgid "WARNING! WassUp's backward compatibility modules are missing."
245
  msgstr ""
246
 
247
+ #: lib\compatibility.php:86 lib\compatibility.php:89
248
+ #, php-format
249
+ msgid ""
250
+ "Download and install the full version of Wassup with compatibility library "
251
+ "included directly from %s."
252
  msgstr ""
253
 
254
+ #: lib\compatibility.php:88
255
+ msgid "WARNING! WassUp's PHP compatibility module is missing."
256
  msgstr ""
257
 
258
+ #: lib\main.php:63 lib\settings.php:320 lib\settings.php:374
259
+ #: lib\settings.php:1008 lib\settings.php:1024 lib\settings.php:1085
260
+ #: lib\settings.php:1105
261
+ msgid "Next"
262
  msgstr ""
263
 
264
+ #: lib\main.php:65
265
+ msgid "Previous"
 
 
266
  msgstr ""
267
 
268
+ #: lib\main.php:119
269
+ #, php-format
270
+ msgid "You must specify the %s"
 
 
 
 
 
 
 
271
  msgstr ""
272
 
273
+ #: lib\main.php:119
274
+ msgid "number of pages"
275
  msgstr ""
276
 
277
+ #: lib\main.php:123
278
+ #, php-format
279
+ msgid "You must specify the %s to show per page"
280
  msgstr ""
281
 
282
+ #: lib\main.php:123
283
+ msgid "limit of items"
284
  msgstr ""
285
 
286
+ #: lib\main.php:172
287
+ msgid "Pages"
288
  msgstr ""
289
 
290
+ #: lib\main.php:412
291
+ msgid "Raw data"
292
  msgstr ""
293
 
294
+ #: lib\main.php:413
295
+ msgid "Visitor type"
296
  msgstr ""
297
 
298
+ #: lib\main.php:425 widgets\widget_functions.php:230
299
+ msgid "Logged-in user"
300
  msgstr ""
301
 
302
+ #: lib\main.php:427
303
+ msgid "Spammer/Hacker"
304
  msgstr ""
305
 
306
+ #: lib\main.php:429 lib\main.php:594
307
+ msgid "Spammer"
308
  msgstr ""
309
 
310
+ #: lib\main.php:431 lib\main.php:614 widgets\widget_functions.php:240
311
+ msgid "Comment author"
312
  msgstr ""
313
 
314
+ #: lib\main.php:433 lib\main.php:484 lib\main.php:486
315
+ msgid "Feed"
316
  msgstr ""
317
 
318
+ #: lib\main.php:435 lib\main.php:489 lib\main.php:601 lib\wassup.class.php:481
319
+ #: lib\wassup.class.php:537 lib\compat-lib\compat_php.php:494
320
+ #: lib\compat-lib\compat_php.php:550
321
+ msgid "Spider"
322
  msgstr ""
323
 
324
+ #: lib\main.php:437 lib\main.php:573 widgets\widget_functions.php:250
325
+ msgid "Regular visitor"
326
  msgstr ""
327
 
328
+ #: lib\main.php:440
329
+ msgid "IP"
330
  msgstr ""
331
 
332
+ #: lib\main.php:441 lib\wassupadmin.php:1773
333
+ msgid "Hostname"
334
  msgstr ""
335
 
336
+ #: lib\main.php:442
337
+ msgid "Url Requested"
338
  msgstr ""
339
 
340
+ #: lib\main.php:449
341
+ msgid "Post/page ID"
342
  msgstr ""
343
 
344
+ #: lib\main.php:453
345
+ msgid "none or deleted post"
346
  msgstr ""
347
 
348
+ #: lib\main.php:455 lib\compat-lib\compat_widget.php:108
349
+ #: widgets\widgets.php:105 widgets\widgets.php:236 widgets\widgets.php:410
350
+ msgid "Title"
351
  msgstr ""
352
 
353
+ #: lib\main.php:457 lib\wassupadmin.php:1770 lib\wassupadmin.php:2116
354
+ #: lib\compat-lib\compat_php.php:2627
355
+ msgid "Referrer"
356
  msgstr ""
357
 
358
+ #: lib\main.php:460
359
+ msgid "Search Engine"
360
  msgstr ""
361
 
362
+ #: lib\main.php:461 lib\wassupadmin.php:209 lib\wassupadmin.php:212
363
+ #: lib\wassupadmin.php:1571 lib\wassupadmin.php:1603
364
+ msgid "Search"
365
  msgstr ""
366
 
367
+ #: lib\main.php:462
368
+ msgid "Page"
369
  msgstr ""
370
 
371
+ #: lib\main.php:464 lib\wassupadmin.php:1842
372
+ msgid "User Agent"
373
  msgstr ""
374
 
375
+ #: lib\main.php:467
376
+ msgid "Browser"
377
  msgstr ""
378
 
379
+ #: lib\main.php:469 lib\wassupadmin.php:1863
380
+ msgid "OS"
381
  msgstr ""
382
 
383
+ #: lib\main.php:470
384
+ msgid "Locale/Language"
 
385
  msgstr ""
386
 
387
+ #: lib\main.php:471
388
+ msgid "Screen Resolution"
389
  msgstr ""
390
 
391
+ #: lib\main.php:474
392
+ msgid "Username"
 
393
  msgstr ""
394
 
395
+ #: lib\main.php:478
396
+ msgid "Comment Author"
397
  msgstr ""
398
 
399
+ #: lib\main.php:492 lib\wassup.class.php:483 lib\wassup.class.php:538
400
+ #: lib\wassupadmin.php:1827 lib\compat-lib\compat_php.php:496
401
+ #: lib\compat-lib\compat_php.php:551
402
+ msgid "Spam"
403
  msgstr ""
404
 
405
+ #: lib\main.php:493
406
+ msgid "comment spam"
407
  msgstr ""
408
 
409
+ #: lib\main.php:494
410
+ msgid "referrer spam"
411
  msgstr ""
412
 
413
+ #: lib\main.php:495
414
+ msgid "hack/malware attempt"
415
  msgstr ""
416
 
417
+ #: lib\main.php:496
418
+ msgid "not spam"
419
  msgstr ""
420
 
421
+ #: lib\main.php:500
422
+ msgid "End timestamp"
 
423
  msgstr ""
424
 
425
+ #: lib\main.php:501
426
+ msgid "Timestamp"
427
  msgstr ""
428
 
429
+ #: lib\main.php:509 lib\main.php:587 lib\main.php:736 lib\main.php:738
430
+ #: lib\main.php:747 lib\main.php:749 lib\settings.php:535 lib\settings.php:539
431
+ #: lib\settings.php:617 lib\settings.php:635 lib\settings.php:646
432
+ #: lib\settings.php:703 lib\settings.php:713 lib\settings.php:729
433
+ #: lib\settings.php:732 lib\settings.php:844 lib\settings.php:853
434
+ #: lib\settings.php:861 lib\settings.php:878 lib\settings.php:913
435
+ #: lib\settings.php:923 lib\settings.php:931 lib\settings.php:941
436
+ #: lib\settings.php:947 lib\settings.php:973 lib\settings.php:978
437
+ #: lib\wassupadmin.php:1056 lib\wassupadmin.php:1663
438
+ msgid "unknown"
439
  msgstr ""
440
 
441
+ #: lib\main.php:513
442
  #, php-format
443
+ msgid "%d URLs visited in session"
444
  msgstr ""
445
 
446
+ #: lib\main.php:574 lib\wassupadmin.php:1065
447
+ msgid "Direct hit"
 
448
  msgstr ""
449
 
450
+ #: lib\main.php:596
451
+ msgid "Spam/Malware"
452
  msgstr ""
453
 
454
+ #: lib\main.php:600
455
+ msgid "Feedreader"
456
  msgstr ""
457
 
458
+ #: lib\main.php:609 lib\main.php:658 lib\main.php:659
459
+ msgid "Logged user"
460
  msgstr ""
461
 
462
+ #: lib\main.php:638 lib\main.php:639
463
+ msgid "Country"
464
  msgstr ""
465
 
466
+ #: lib\main.php:649 lib\settings.php:557 lib\wassupadmin.php:1856
467
+ msgid "Language"
468
  msgstr ""
469
 
470
+ #: lib\main.php:662
471
+ msgid "Country:"
472
  msgstr ""
473
 
474
+ #: lib\main.php:662
475
+ msgid "URL Request:"
476
  msgstr ""
477
 
478
+ #: lib\main.php:705
479
+ msgid "No visitor activity"
480
  msgstr ""
481
 
482
+ #: lib\main.php:732 lib\main.php:736 lib\main.php:738 lib\main.php:743
483
+ #: lib\main.php:747 lib\main.php:749
484
+ #, php-format
485
+ msgid "City: %s"
486
  msgstr ""
487
 
488
+ #: lib\main.php:752
489
+ msgid "Country: unknown, City: unknown"
490
  msgstr ""
491
 
492
+ #: lib\main.php:1023
493
+ msgid "Print"
494
  msgstr ""
495
 
496
+ #: lib\main.php:1025
497
+ #, php-format
498
+ msgid "Top Stats for Period: %s"
499
  msgstr ""
500
 
501
+ #: lib\main.php:1060
502
+ msgid "TOP QUERY"
503
  msgstr ""
504
 
505
+ #: lib\main.php:1068 lib\wassupadmin.php:1794
506
+ msgid "not provided"
507
  msgstr ""
508
 
509
+ #: lib\main.php:1096
510
+ msgid "TOP REFERRER"
511
  msgstr ""
512
 
513
+ #: lib\main.php:1135
514
+ msgid "TOP REQUEST"
515
  msgstr ""
516
 
517
+ #: lib\main.php:1174
518
+ msgid "TOP BROWSER"
519
  msgstr ""
520
 
521
+ #: lib\main.php:1207
522
+ msgid "TOP OS"
523
  msgstr ""
524
 
525
+ #: lib\main.php:1239
526
+ msgid "TOP LOCALE"
527
  msgstr ""
528
 
529
+ #: lib\main.php:1273
530
+ msgid "TOP VISITOR"
 
 
531
  msgstr ""
532
 
533
+ #: lib\main.php:1311
534
+ msgid "TOP ARTICLE"
535
  msgstr ""
536
 
537
+ #: lib\main.php:1334
538
+ msgid "This report excludes spam and spider records"
539
  msgstr ""
540
 
541
+ #: lib\main.php:1336
542
+ msgid "This report excludes spider records"
543
  msgstr ""
544
 
545
+ #: lib\main.php:1338
546
+ msgid "This report excludes spam records"
547
  msgstr ""
548
 
549
+ #: lib\main.php:1784
550
+ msgid "Last 1 Hour"
551
  msgstr ""
552
 
553
+ #: lib\main.php:1793
554
+ msgid "Last 6 Hours"
555
  msgstr ""
556
 
557
+ #: lib\main.php:1802
558
+ msgid "Last 12 Hours"
559
  msgstr ""
560
 
561
+ #: lib\main.php:1811
562
+ msgid "Last 7 Days"
563
  msgstr ""
564
 
565
+ #: lib\main.php:1825
566
+ msgid "Last 2 Weeks"
567
  msgstr ""
568
 
569
+ #: lib\main.php:1844
570
+ msgid "Last Month"
 
571
  msgstr ""
572
 
573
+ #: lib\main.php:1858
574
+ msgid "Last 3 Months"
575
  msgstr ""
576
 
577
+ #: lib\main.php:1872
578
+ msgid "Last 6 Months"
 
579
  msgstr ""
580
 
581
+ #: lib\main.php:1880
582
+ msgid "Last Year"
583
  msgstr ""
584
 
585
+ #: lib\main.php:1888 lib\main.php:1904
586
+ msgid "All Time"
587
  msgstr ""
588
 
589
+ #: lib\main.php:1895
590
+ msgid "Last 24 Hours"
 
591
  msgstr ""
592
 
593
+ #: lib\settings.php:88
594
+ msgid ""
595
+ "ATTENTION! Your WassUp table have reached the maximum value you set, I "
596
+ "disabled the alert, you can re-enable it here."
597
  msgstr ""
598
 
599
+ #: lib\settings.php:109
600
+ msgid "IMPORTANT"
601
  msgstr ""
602
 
603
+ #: lib\settings.php:109
604
+ msgid "table empty or does not exist!"
 
605
  msgstr ""
606
 
607
+ #: lib\settings.php:111
608
+ msgid "Visitors Online or Top Stats"
609
  msgstr ""
610
 
611
+ #: lib\settings.php:112
612
+ msgid "Widgets menu"
613
  msgstr ""
614
 
615
+ #: lib\settings.php:114
616
+ #, php-format
617
  msgid ""
618
+ "You can add a sidebar Widget with some useful statistics information by "
619
+ "activating the %s widget from the %s."
 
 
 
 
620
  msgstr ""
621
 
622
+ #: lib\settings.php:115
623
+ msgid "Select the options you want for WassUp plugin"
 
 
624
  msgstr ""
625
 
626
+ #: lib\settings.php:152 lib\settings.php:1032 lib\settings.php:1038
627
+ #: lib\settings.php:1041 lib\settings.php:1045 lib\settings.php:1047
628
+ #: lib\settings.php:1048 lib\settings.php:1051 lib\settings.php:1052
629
+ #: lib\settings.php:1070 lib\settings.php:1074
630
+ msgid "General Setup"
631
  msgstr ""
632
 
633
+ #: lib\settings.php:153 lib\settings.php:1043 lib\settings.php:1066
634
+ msgid "Filters & Exclusions"
 
 
635
  msgstr ""
636
 
637
+ #: lib\settings.php:154
638
+ msgid "Manage Files & Data"
639
  msgstr ""
640
 
641
+ #: lib\settings.php:157 lib\settings.php:1080 lib\settings.php:1081
642
+ msgid "Uninstall"
643
  msgstr ""
644
 
645
+ #: lib\settings.php:162 lib\wassupadmin.php:554 lib\wassupadmin.php:900
646
+ msgid "Donate"
647
  msgstr ""
648
 
649
+ #: lib\settings.php:169
650
+ msgid "Networkwide Settings"
651
  msgstr ""
652
 
653
+ #: lib\settings.php:170
654
+ msgid "Multisite settings that applies to all subsites in the network."
655
  msgstr ""
656
 
657
+ #: lib\settings.php:172
658
+ msgid "Network Statistics Recording"
659
  msgstr ""
660
 
661
+ #: lib\settings.php:173
662
+ msgid ""
663
+ "Enables Wassup visitor tracking on all subsites in network. Do NOT disable "
664
+ "unless upgrading plugin."
665
  msgstr ""
666
 
667
+ #: lib\settings.php:174
668
+ msgid "Enable Statistics Recording for network."
 
669
  msgstr ""
670
 
671
+ #: lib\settings.php:175
672
+ msgid ""
673
+ "Can be overridden on individual subsites to disable statistics recording."
674
  msgstr ""
675
 
676
+ #: lib\settings.php:177
677
+ msgid "Network Subsites Options"
678
  msgstr ""
679
 
680
+ #: lib\settings.php:178
681
+ msgid "Show Wassup's Main menu and options panel to subsite administrators."
 
682
  msgstr ""
683
 
684
+ #: lib\settings.php:179
685
+ msgid ""
686
+ "Uncheck to hide Wassup Main menu and options panel from all users except "
687
+ "Network administrator (super-admin). Dashboard submenu \"Wassup-stats\" and "
688
+ "dashboard widget display are unaffected."
689
  msgstr ""
690
 
691
+ #: lib\settings.php:182
692
+ msgid "Site Settings"
693
  msgstr ""
694
 
695
+ #: lib\settings.php:183
696
+ msgid "Main site settings / Default settings for new network subsites."
697
  msgstr ""
698
 
699
+ #: lib\settings.php:186
700
+ msgid "Statistics Recording"
701
  msgstr ""
702
 
703
+ #: lib\settings.php:187
704
+ msgid ""
705
+ "By default, Wassup collects and stores incoming visitor hits and checks each "
706
+ "new record for spam and malware activity."
707
  msgstr ""
708
 
709
+ #: lib\settings.php:188
710
+ msgid "Enable statistics recording"
711
  msgstr ""
712
 
713
+ #: lib\settings.php:190
714
+ msgid "Do NOT disable unless upgrading or troubleshooting plugin problems."
715
  msgstr ""
716
 
717
+ #: lib\settings.php:191
718
+ msgid "Do NOT disable unless troubleshooting plugin problems."
719
  msgstr ""
720
 
721
+ #: lib\settings.php:194
722
+ msgid "Enable spam and malware detection on new records"
 
723
  msgstr ""
724
 
725
+ #: lib\settings.php:195
726
+ msgid ""
727
+ "For identification of incoming spam/malware hits only. Does NOT stop attacks "
728
+ "nor protect your site."
729
  msgstr ""
730
 
731
+ #: lib\settings.php:199
732
+ msgid "User Permissions"
733
  msgstr ""
734
 
735
+ #: lib\settings.php:200
736
+ msgid ""
737
+ "Gives selected users read-only access to Wassup-stats dashboard submenu "
738
+ "panels and the ability to view the dashboard widget."
739
  msgstr ""
740
 
741
+ #: lib\settings.php:201
742
+ msgid ""
743
+ "Only administrators have full access to Wassup main admin menu and Wassup-"
744
+ "options panels to delete data and edit plugin settings."
745
  msgstr ""
746
 
747
+ #: lib\settings.php:202
748
+ msgid "Set minimum user level that can view WassUp stats"
 
749
  msgstr ""
750
 
751
+ #: lib\settings.php:206
752
+ msgid "default administrator"
 
753
  msgstr ""
754
 
755
+ #: lib\settings.php:211
756
+ msgid "Screen resolution"
757
  msgstr ""
758
 
759
+ #: lib\settings.php:212
760
+ msgid ""
761
+ "Adjusts chart size and resets the max-width/truncation point of long texts."
762
  msgstr ""
763
 
764
+ #: lib\settings.php:213
765
+ msgid "Your default screen resolution (in pixels)"
766
  msgstr ""
767
 
768
+ #: lib\settings.php:218
769
+ msgid "Dashboard Widget"
770
  msgstr ""
771
 
772
+ #: lib\settings.php:219
773
+ msgid "Enable widget/small chart in admin dashboard"
 
 
774
  msgstr ""
775
 
776
+ #: lib\settings.php:221
777
+ msgid "Spy Visitors Settings"
778
  msgstr ""
779
 
780
+ #: lib\settings.php:236
781
+ msgid "Display a GEO IP Map in the spy visitors view"
 
782
  msgstr ""
783
 
784
+ #: lib\settings.php:237
785
+ msgid "key"
786
  msgstr ""
787
 
788
+ #: lib\settings.php:237
789
+ msgid "signup for your key"
 
790
  msgstr ""
791
 
792
+ #: lib\settings.php:238
793
+ msgid ""
794
+ "Use your own key to avoid map denial when Wassup API total usage exceeds "
795
+ "Google!Maps limits."
796
  msgstr ""
797
 
798
+ #: lib\settings.php:244
799
+ msgid "Visitor Detail Settings"
800
  msgstr ""
801
 
802
+ #: lib\settings.php:245
803
+ msgid "Show visitor details from the last"
804
  msgstr ""
805
 
806
+ #: lib\settings.php:250
807
+ msgid "Time format 12/24 Hour"
808
  msgstr ""
809
 
810
+ #: lib\settings.php:254
811
+ msgid "Filter visitor details for"
812
  msgstr ""
813
 
814
+ #: lib\settings.php:259
815
+ msgid "Display line chart in detail view"
816
  msgstr ""
817
 
818
+ #: lib\settings.php:260
819
+ msgid "Line chart type - how many axes?"
820
  msgstr ""
821
 
822
+ #: lib\settings.php:261
823
+ msgid "Set how many minutes wait for automatic page refresh"
824
  msgstr ""
825
 
826
+ #: lib\settings.php:262 lib\settings.php:966 widgets\widgets.php:466
827
+ msgid "minutes"
828
  msgstr ""
829
 
830
+ #: lib\settings.php:263
831
+ msgid "default 3, 0=no refresh"
 
 
832
  msgstr ""
833
 
834
+ #: lib\settings.php:265
835
+ msgid "Number of items per page"
836
  msgstr ""
837
 
838
+ #: lib\settings.php:270
839
+ msgid "Top Stats Lists"
840
  msgstr ""
841
 
842
+ #: lib\settings.php:271
843
+ msgid "Customize Top stats by selected criteria below."
844
  msgstr ""
845
 
846
+ #: lib\settings.php:271
847
+ msgid ""
848
+ "Stats are in descending order from highest count and known spam and malware "
849
+ "attempts are excluded from counts."
850
  msgstr ""
851
 
852
+ #: lib\settings.php:278
853
+ msgid "List limit of top items"
854
  msgstr ""
855
 
856
+ #: lib\settings.php:280
857
+ msgid "default 10"
858
  msgstr ""
859
 
860
+ #: lib\settings.php:282
861
+ msgid "Choose one or more items to list in Top Stats"
862
  msgstr ""
863
 
864
+ #: lib\settings.php:282
865
+ msgid "over 5 selections may cause horizontal scrolling"
866
  msgstr ""
867
 
868
+ #: lib\settings.php:285
869
+ msgid "Top Searches"
870
  msgstr ""
871
 
872
+ #: lib\settings.php:286
873
+ msgid "Top Referrers"
874
  msgstr ""
875
 
876
+ #: lib\settings.php:287
877
+ msgid "Top Articles"
878
  msgstr ""
879
 
880
+ #: lib\settings.php:290
881
+ msgid "Top Requests"
882
  msgstr ""
883
 
884
+ #: lib\settings.php:291
885
+ msgid "Top Browsers"
886
  msgstr ""
887
 
888
+ #: lib\settings.php:292
889
+ msgid "Top OS"
890
  msgstr ""
891
 
892
+ #: lib\settings.php:295
893
+ msgid "Top Locales"
894
  msgstr ""
895
 
896
+ #: lib\settings.php:296
897
+ msgid "Top Visitors"
898
  msgstr ""
899
 
900
+ #: lib\settings.php:301
901
+ msgid "Exclude the following website domains from Top Referrers"
902
  msgstr ""
903
 
904
+ #: lib\settings.php:301 lib\settings.php:309
905
+ msgid "applies to top stats view and widgets"
906
  msgstr ""
907
 
908
+ #: lib\settings.php:304
909
+ msgid "comma separated value"
910
  msgstr ""
911
 
912
+ #: lib\settings.php:304
913
+ msgid "List whole domains only. Wildcards and partial domains will be ignored."
 
914
  msgstr ""
915
 
916
+ #: lib\settings.php:305
917
+ msgid "Don't list your website domain defined in WordPress"
918
  msgstr ""
919
 
920
+ #: lib\settings.php:309
921
+ msgid "Exclude site front page from Top Articles"
922
  msgstr ""
923
 
924
+ #: lib\settings.php:316
925
+ msgid "Exclude all spider records from Top Stats"
926
  msgstr ""
927
 
928
+ #: lib\settings.php:319 lib\settings.php:373 lib\settings.php:524
929
+ #: lib\settings.php:1023 lib\wassupadmin.php:1539
930
+ msgid "Save Settings"
931
  msgstr ""
932
 
933
+ #: lib\settings.php:319 lib\settings.php:373 lib\settings.php:524
934
+ #: lib\settings.php:1023
935
+ msgid "Reset"
936
  msgstr ""
937
 
938
+ #: lib\settings.php:319 lib\settings.php:373 lib\settings.php:524
939
+ #: lib\settings.php:1023
940
+ msgid "Reset to Default"
941
  msgstr ""
942
 
943
+ #: lib\settings.php:320 lib\settings.php:374 lib\settings.php:1008
944
+ #: lib\settings.php:1024 lib\settings.php:1085 lib\settings.php:1105
945
+ #: lib\wassupadmin.php:982 widgets\widgets.php:584
946
+ #: widgets\widget_functions.php:416
947
+ msgid "Top"
948
  msgstr ""
949
 
950
+ #: lib\settings.php:324
951
+ msgid "Recording Filters and Exclusions"
 
 
952
  msgstr ""
953
 
954
+ #: lib\settings.php:325
955
+ msgid ""
956
+ "Use the filter checkboxes and exclusion input fields below to customize "
957
+ "Wassup's statistics recording so that only the data that you need for your "
958
+ "site analyses are stored."
959
  msgstr ""
960
 
961
+ #: lib\settings.php:327
962
+ msgid "Visitor Type Filters:"
963
  msgstr ""
964
 
965
+ #: lib\settings.php:328
966
+ msgid "Checkbox to enable recording by type of \"visitor\""
 
967
  msgstr ""
968
 
969
+ #: lib\settings.php:330
970
+ msgid "Record regular visitors"
971
  msgstr ""
972
 
973
+ #: lib\settings.php:331
974
+ msgid "Record logged in users"
975
  msgstr ""
976
 
977
+ #: lib\settings.php:332
978
+ msgid "Record logged in administrators"
979
  msgstr ""
980
 
981
+ #: lib\settings.php:333
982
+ msgid "Record spiders and bots"
983
  msgstr ""
984
 
985
+ #: lib\settings.php:336
986
+ msgid "Spam and Malware Filters:"
987
  msgstr ""
988
 
989
+ #: lib\settings.php:337
990
+ msgid "Checkbox to enable recording of each type of \"spam\""
991
  msgstr ""
992
 
993
+ #: lib\settings.php:339 lib\wassupadmin.php:1535
994
+ msgid "Record Akismet comment spam attempts"
995
  msgstr ""
996
 
997
+ #: lib\settings.php:339
998
+ msgid "checks IP for previous spam comments"
999
  msgstr ""
1000
 
1001
+ #: lib\settings.php:340 lib\wassupadmin.php:1536
1002
+ msgid "Record referrer spam attempts"
1003
  msgstr ""
1004
 
1005
+ #: lib\settings.php:341 lib\wassupadmin.php:1538
1006
+ msgid "Record admin break-in/hacker attempts"
1007
  msgstr ""
1008
 
1009
+ #: lib\settings.php:342 lib\wassupadmin.php:1537
1010
+ msgid "Record attack/exploit attempts (libwww-perl agent)"
1011
  msgstr ""
1012
 
1013
+ #: lib\settings.php:345
1014
+ msgid "Recording Exceptions"
1015
  msgstr ""
1016
 
1017
+ #: lib\settings.php:346
1018
+ msgid ""
1019
+ "You can exclude a single visitor (by IP, hostname or username) or you can "
1020
+ "exclude a specific URL request from being stored in WassUp records."
1021
  msgstr ""
1022
 
1023
+ #: lib\settings.php:347
1024
+ msgid ""
1025
+ "Note that recording exceptions lower overall statistics counts and excessive "
1026
+ "exclusions can affect page load speed on slow host servers."
1027
  msgstr ""
1028
 
1029
+ #: lib\settings.php:349
1030
+ msgid "Exclude by IP"
1031
  msgstr ""
1032
 
1033
+ #: lib\settings.php:350
1034
+ msgid "Enter source IPs to omit from recording"
1035
  msgstr ""
1036
 
1037
+ #: lib\settings.php:353
1038
+ msgid "comma separated value (ex: 127.0.0.1, 10.0.0.1, etc...)."
1039
  msgstr ""
1040
 
1041
+ #: lib\settings.php:353
1042
+ msgid ""
1043
+ "A single wildcard (*) can be placed after the last '.' in the IP ('::' in "
1044
+ "IPv6) for range exclusions (ex: 10.10.100.*, 192.168.*)."
1045
  msgstr ""
1046
 
1047
+ #: lib\settings.php:355
1048
+ msgid "Exclude by Hostname"
1049
  msgstr ""
1050
 
1051
+ #: lib\settings.php:356
1052
+ msgid "Enter source hostnames to omit from recording"
1053
  msgstr ""
1054
 
1055
+ #: lib\settings.php:359
1056
+ msgid "comma separated value (ex: host1.domain.com, host2.domain.net, etc...)."
1057
  msgstr ""
1058
 
1059
+ #: lib\settings.php:359
1060
+ msgid ""
1061
+ "A single wildcard (*) can be placed before the first '.' for domain network "
1062
+ "exclusions (ex: *.spamdomain.com, *.hackers.malware.net)."
1063
  msgstr ""
1064
 
1065
+ #: lib\settings.php:361
1066
+ msgid "Exclude by Username"
 
 
1067
  msgstr ""
1068
 
1069
+ #: lib\settings.php:362
1070
+ msgid "Enter usernames to omit from recording"
1071
  msgstr ""
1072
 
1073
+ #: lib\settings.php:365
1074
+ msgid ""
1075
+ "comma separated value, enter a registered user's login name (ex: bobmarley, "
1076
+ "enyabrennan, etc.)"
1077
  msgstr ""
1078
 
1079
+ #: lib\settings.php:367
1080
+ msgid "Exclude by URL request"
1081
  msgstr ""
1082
 
1083
+ #: lib\settings.php:368
1084
+ msgid "Enter URLs of page/post/feed to omit from recording"
1085
  msgstr ""
1086
 
1087
+ #: lib\settings.php:371
 
1088
  msgid ""
1089
+ "comma separated value, don't enter entire url, only the last path or some "
1090
+ "word to exclude (ex: /category/wordpress, 2007, etc...)"
1091
  msgstr ""
1092
 
1093
+ #: lib\settings.php:374 lib\settings.php:1008 lib\settings.php:1024
1094
+ #: lib\settings.php:1085 lib\settings.php:1105
1095
+ msgid "Prev"
 
 
 
 
 
 
1096
  msgstr ""
1097
 
1098
+ #: lib\settings.php:378
1099
+ msgid "Table Management Options"
1100
  msgstr ""
1101
 
1102
+ #: lib\settings.php:385
1103
+ msgid "Select actions for table growth"
1104
  msgstr ""
1105
 
1106
+ #: lib\settings.php:386
1107
+ msgid ""
1108
+ "WassUp table grows very fast, especially if your site is frequently visited. "
1109
+ "I recommend you delete old records sometimes."
1110
  msgstr ""
1111
 
1112
+ #: lib\settings.php:387
1113
+ msgid ""
1114
+ "You can delete all Wassup records now (Empty Table), you can set an "
1115
+ "automatic delete option to delete selected old records daily, and you can "
1116
+ "manually delete selected old records once (Delete NOW)."
1117
  msgstr ""
1118
 
1119
+ #: lib\settings.php:388
1120
+ msgid "If you haven't database space problems, you can leave the table as is."
1121
  msgstr ""
1122
 
1123
+ #: lib\settings.php:389
1124
+ msgid "Current WassUp table usage is"
1125
  msgstr ""
1126
 
1127
+ #: lib\settings.php:392
1128
+ msgid "records"
 
 
1129
  msgstr ""
1130
 
1131
+ #: lib\settings.php:395
1132
+ msgid "Alert me"
1133
  msgstr ""
1134
 
1135
+ #: lib\settings.php:395
1136
+ msgid "email to"
 
1137
  msgstr ""
1138
 
1139
+ #: lib\settings.php:395
1140
+ msgid "when table reaches"
1141
  msgstr ""
1142
 
1143
+ #: lib\settings.php:396
1144
+ msgid "Delete old records"
1145
  msgstr ""
1146
 
1147
+ #: lib\settings.php:400
1148
+ #, php-format
1149
  msgid ""
1150
+ "Before deleting, you can save Wassup data in SQL 'export' format onto your "
1151
+ "local computer by clicking %s below."
 
1152
  msgstr ""
1153
 
1154
+ #: lib\settings.php:400
1155
+ msgid "export table"
1156
  msgstr ""
1157
 
1158
+ #: lib\settings.php:401
1159
+ msgid "Reload this screen after export to view export messages."
1160
  msgstr ""
1161
 
1162
+ #: lib\settings.php:402
1163
+ msgid "Automatically delete"
1164
  msgstr ""
1165
 
1166
+ #: lib\settings.php:404 lib\settings.php:409
1167
+ msgid "records older than"
 
 
1168
  msgstr ""
1169
 
1170
+ #: lib\settings.php:405
1171
+ msgid "daily"
1172
  msgstr ""
1173
 
1174
+ #: lib\settings.php:407
1175
+ msgid "Manually delete"
1176
  msgstr ""
1177
 
1178
+ #: lib\settings.php:410
1179
+ msgid "once"
1180
  msgstr ""
1181
 
1182
+ #: lib\settings.php:416
1183
+ msgid "Delete all records up to record ID#"
1184
  msgstr ""
1185
 
1186
+ #: lib\settings.php:417
1187
+ msgid "Last exported record ID#:"
1188
  msgstr ""
1189
 
1190
+ #: lib\settings.php:419
1191
+ msgid "Empty table"
1192
  msgstr ""
1193
 
1194
+ #: lib\settings.php:420
1195
+ msgid "export table in SQL format"
 
 
 
 
1196
  msgstr ""
1197
 
1198
+ #: lib\settings.php:423
1199
+ msgid "Delete NOW"
1200
  msgstr ""
1201
 
1202
+ #: lib\settings.php:423
1203
+ msgid "Action is NOT undoable!"
1204
  msgstr ""
1205
 
1206
+ #: lib\settings.php:426
1207
+ msgid "Table Export Options"
1208
  msgstr ""
1209
 
1210
+ #: lib\settings.php:428
1211
  msgid ""
1212
+ "By default, known spam/malware records are omitted from Wassup's export data "
1213
+ "to reduce the risk of malware code becoming active and causing damage when "
1214
+ "records are imported into other applications."
1215
  msgstr ""
1216
 
1217
+ #: lib\settings.php:429
1218
+ msgid "Include spam records in exported data"
1219
  msgstr ""
1220
 
1221
+ #: lib\settings.php:430
1222
+ msgid ""
1223
+ "Security NOTICE: Wassup is not configured to identify spam/malware, so all "
1224
+ "records are exported, including spam."
1225
  msgstr ""
1226
 
1227
+ #: lib\settings.php:431
1228
+ msgid ""
1229
+ "Security NOTICE: Enabling this could expose your computer or website to "
1230
+ "malware when spam records are imported."
1231
  msgstr ""
1232
 
1233
+ #: lib\settings.php:432
1234
+ msgid "Omit record ID from exported fields"
1235
  msgstr ""
1236
 
1237
+ #: lib\settings.php:433
1238
+ msgid ""
1239
+ "Check this box when importing data into another Wassup table that already "
1240
+ "has records (appending data)."
1241
  msgstr ""
1242
 
1243
+ #: lib\settings.php:435
1244
+ msgid "Table Optimization"
1245
  msgstr ""
1246
 
1247
+ #: lib\settings.php:440
1248
+ msgid ""
1249
+ "By default, WassUp tables are automatically optimized weekly and after each "
1250
+ "bulk deletion. This helps keep WassUp running fast, but it can sometimes "
1251
+ "cause slowdowns especially when there is a corrupt record in the table."
1252
  msgstr ""
1253
 
1254
+ #: lib\settings.php:449
1255
+ msgid "You can cancel automatic optimization by unchecking the box below."
1256
  msgstr ""
1257
 
1258
+ #: lib\settings.php:451
1259
+ msgid "Login as network admin to cancel automatic optimization below."
1260
  msgstr ""
1261
 
1262
+ #: lib\settings.php:452
1263
+ msgid "Login as network admin to enable automatic optimization below."
1264
  msgstr ""
1265
 
1266
+ #: lib\settings.php:454
1267
+ msgid "Your table engine does NOT support the \"optimize\" command."
1268
  msgstr ""
1269
 
1270
+ #: lib\settings.php:464
1271
+ msgid "Enable automatic table optimization"
1272
  msgstr ""
1273
 
1274
+ #: lib\settings.php:472
1275
+ msgid "is overdue"
1276
  msgstr ""
1277
 
1278
+ #: lib\settings.php:474
1279
+ msgid "today"
1280
  msgstr ""
1281
 
1282
+ #: lib\settings.php:477
1283
+ #, php-format
1284
+ msgid "%d days"
1285
  msgstr ""
1286
 
1287
+ #: lib\settings.php:478
1288
+ msgid "1 week"
1289
  msgstr ""
1290
 
1291
+ #: lib\settings.php:484
1292
+ #, php-format
1293
+ msgid "Next scheduled optimization is: %s (approximately)"
1294
  msgstr ""
1295
 
1296
+ #: lib\settings.php:486
1297
+ #, php-format
1298
+ msgid "Next scheduled optimization is: %s"
1299
  msgstr ""
1300
 
1301
+ #: lib\settings.php:486
1302
+ msgid "never"
1303
  msgstr ""
1304
 
1305
+ #: lib\settings.php:490
1306
+ msgid "Data Storage Methods"
1307
  msgstr ""
1308
 
1309
+ #: lib\settings.php:493
1310
+ msgid "Delayed Insert"
1311
  msgstr ""
1312
 
1313
+ #: lib\settings.php:495
1314
  msgid ""
1315
+ "When possible, WassUp uses the \"Delayed insert\" method of saving records "
1316
+ "in MySQL to store new visitor records. This method helps keep Wassup running "
1317
+ "fast on high-volume sites and during volume spikes on all sites. However, it "
1318
+ "can be inefficient on low-volume sites and sometimes host administrators "
1319
+ "disable it on shared servers."
1320
  msgstr ""
1321
 
1322
+ #: lib\settings.php:496
1323
+ msgid "You can turn off \"delayed insert\" by unchecking the box below."
1324
  msgstr ""
1325
 
1326
+ #: lib\settings.php:500
1327
+ msgid "This method is unavailable for your storage engine type."
1328
  msgstr ""
1329
 
1330
+ #: lib\settings.php:512
1331
+ msgid "This method is disabled on your host server."
1332
  msgstr ""
1333
 
1334
+ #: lib\settings.php:521
1335
+ msgid "Store new visitor records with \"delayed insert\""
1336
  msgstr ""
1337
 
1338
+ #: lib\settings.php:528
1339
+ msgid "Server Settings and Memory Resources"
1340
  msgstr ""
1341
 
1342
+ #: lib\settings.php:529
1343
+ #, php-format
1344
+ msgid ""
1345
+ "For information only. Some values may be adjustable in startup files: %s"
1346
  msgstr ""
1347
 
1348
+ #: lib\settings.php:529
1349
+ msgid "\"wp_config.php\", \"php.ini\" and \"my.ini\""
1350
  msgstr ""
1351
 
1352
+ #: lib\settings.php:530 lib\settings.php:541 lib\settings.php:649
1353
+ #: lib\settings.php:844
1354
+ msgid "Version"
1355
  msgstr ""
1356
 
1357
+ #: lib\settings.php:532
1358
+ msgid "Table name"
1359
  msgstr ""
1360
 
1361
+ #: lib\settings.php:533
1362
+ msgid "Table Charset/collation"
1363
  msgstr ""
1364
 
1365
+ #: lib\settings.php:537
1366
+ msgid "Table engine"
1367
  msgstr ""
1368
 
1369
+ #: lib\settings.php:539
1370
+ msgid "Upgrade date"
1371
  msgstr ""
1372
 
1373
+ #: lib\settings.php:547
1374
+ msgid "network"
1375
  msgstr ""
1376
 
1377
+ #: lib\settings.php:550 lib\settings.php:563 lib\settings.php:659
1378
+ #: lib\settings.php:670 lib\settings.php:674 lib\settings.php:954
1379
+ msgid "on"
1380
  msgstr ""
1381
 
1382
+ #: lib\settings.php:552 lib\settings.php:661 lib\settings.php:668
1383
+ #: lib\settings.php:675 lib\settings.php:952
1384
+ msgid "off"
1385
  msgstr ""
1386
 
1387
+ #: lib\settings.php:556
1388
+ msgid "Character set"
1389
  msgstr ""
1390
 
1391
+ #: lib\settings.php:560 lib\settings.php:737
1392
+ msgid "not set"
1393
  msgstr ""
1394
 
1395
+ #: lib\settings.php:568 lib\settings.php:689
1396
+ msgid "Memory Allocation"
1397
  msgstr ""
1398
 
1399
+ #: lib\settings.php:593
1400
+ msgid "no limit/unknown"
1401
  msgstr ""
1402
 
1403
+ #: lib\settings.php:597 lib\settings.php:753 lib\settings.php:980
1404
+ msgid "Timezone"
 
1405
  msgstr ""
1406
 
1407
+ #: lib\settings.php:598 lib\settings.php:756
1408
+ msgid "Time Offset"
 
1409
  msgstr ""
1410
 
1411
+ #: lib\settings.php:610 lib\settings.php:759 lib\settings.php:761
1412
+ msgid "hours"
1413
  msgstr ""
1414
 
1415
+ #: lib\settings.php:611
1416
+ msgid "Host Timezone"
 
 
 
1417
  msgstr ""
1418
 
1419
+ #: lib\settings.php:619
1420
+ msgid "Host Server"
1421
  msgstr ""
1422
 
1423
+ #: lib\settings.php:637
1424
+ msgid "Browser Client"
1425
  msgstr ""
1426
 
1427
+ #: lib\settings.php:655
1428
+ msgid "Safe Mode"
1429
  msgstr ""
1430
 
1431
+ #: lib\settings.php:665
1432
+ msgid "File Open Restrictions"
1433
  msgstr ""
1434
 
1435
+ #: lib\settings.php:672
1436
+ msgid "URL File Open"
1437
  msgstr ""
1438
 
1439
+ #: lib\settings.php:677
1440
+ msgid "Disabled functions"
1441
  msgstr ""
1442
 
1443
+ #: lib\settings.php:684
1444
+ msgid "none"
1445
  msgstr ""
1446
 
1447
+ #: lib\settings.php:686
1448
+ msgid "not applicable/safe mode set"
1449
  msgstr ""
1450
 
1451
+ #: lib\settings.php:700 lib\settings.php:875
1452
+ msgid "unlimited/up to server maximum"
1453
  msgstr ""
1454
 
1455
+ #: lib\settings.php:708
1456
+ msgid "Memory Usage"
1457
  msgstr ""
1458
 
1459
+ #: lib\settings.php:715
1460
+ msgid "Script Timeout Limit"
 
 
1461
  msgstr ""
1462
 
1463
+ #: lib\settings.php:720 lib\settings.php:721 lib\settings.php:722
1464
+ #: lib\settings.php:724 lib\settings.php:945 lib\settings.php:968
1465
+ msgid "seconds"
 
1466
  msgstr ""
1467
 
1468
+ #: lib\settings.php:727
1469
+ msgid "unlimited"
1470
  msgstr ""
1471
 
1472
+ #: lib\settings.php:735
1473
+ msgid "Browser Capabilities File"
1474
  msgstr ""
1475
 
1476
+ #: lib\settings.php:741
1477
+ msgid "not installed"
1478
  msgstr ""
1479
 
1480
+ #: lib\settings.php:742
1481
+ msgid "installed"
 
 
1482
  msgstr ""
1483
 
1484
+ #: lib\settings.php:764
1485
+ msgid "as modified in Wordpress"
1486
  msgstr ""
1487
 
1488
+ #: lib\settings.php:846
1489
+ msgid "Storage Engine"
1490
  msgstr ""
1491
 
1492
+ #: lib\settings.php:855
1493
+ msgid "Charset/collation"
1494
  msgstr ""
1495
 
1496
+ #: lib\settings.php:864
1497
+ msgid "Max User Connections"
 
 
1498
  msgstr ""
1499
 
1500
+ #: lib\settings.php:870
1501
+ msgid "possibly too small"
1502
  msgstr ""
1503
 
1504
+ #: lib\settings.php:880
1505
+ msgid "Allocation"
1506
  msgstr ""
1507
 
1508
+ #: lib\settings.php:886
1509
+ msgid "possibly too big, reduces available RAM."
 
 
1510
  msgstr ""
1511
 
1512
+ #: lib\settings.php:893
1513
+ msgid "on demand"
1514
  msgstr ""
1515
 
1516
+ #: lib\settings.php:895
1517
+ msgid "Cached Query Limit"
1518
  msgstr ""
1519
 
1520
+ #: lib\settings.php:898 lib\settings.php:901 lib\settings.php:911
1521
+ #: lib\settings.php:921 lib\settings.php:929 lib\settings.php:938
1522
+ #: lib\settings.php:959 lib\settings.php:977
1523
+ msgid "disabled"
1524
  msgstr ""
1525
 
1526
+ #: lib\settings.php:943
1527
+ msgid "Wait Timeout"
 
1528
  msgstr ""
1529
 
1530
+ #: lib\settings.php:962
1531
+ msgid "rows"
1532
  msgstr ""
1533
 
1534
+ #: lib\settings.php:976
1535
+ msgid "not available"
1536
  msgstr ""
1537
 
1538
+ #: lib\settings.php:1003
1539
+ msgid "may be different from PHP offset"
1540
+ msgstr ""
1541
+
1542
+ #: lib\settings.php:1013
1543
+ msgid "Want to uninstall WassUp?"
1544
  msgstr ""
1545
 
1546
+ #: lib\settings.php:1014
1547
  msgid ""
1548
+ "No problem. Before you deactivate this plugin, check the box below to "
1549
+ "cleanup any data that was collected by WassUp that could be left behind."
 
1550
  msgstr ""
1551
 
1552
+ #: lib\settings.php:1015
1553
+ msgid "Permanently remove WassUp data and settings."
1554
  msgstr ""
1555
 
1556
+ #: lib\settings.php:1017
1557
+ msgid "WARNING"
1558
  msgstr ""
1559
 
1560
+ #: lib\settings.php:1017
1561
+ msgid ""
1562
+ "All WassUp data and settings will be DELETED upon deactivation of this "
1563
+ "plugin."
1564
  msgstr ""
1565
 
1566
+ #: lib\settings.php:1019
1567
+ #, php-format
1568
+ msgid ""
1569
+ "This action cannot be undone. Before uninstalling WassUp, you should backup "
1570
+ "your Wordpress database first. WassUp data is stored in the table %s."
1571
  msgstr ""
1572
 
1573
+ #: lib\settings.php:1021
1574
+ #, php-format
1575
+ msgid "To help improve this plugin, we would appreciate your feedback at %s."
1576
  msgstr ""
1577
 
1578
+ #: lib\settings.php:1029
1579
+ msgid "Frequently Asked Questions"
1580
  msgstr ""
1581
 
1582
+ #: lib\settings.php:1031
1583
+ msgid "How do I add WassUp's chart to my admin dashboard?"
1584
  msgstr ""
1585
 
1586
+ #: lib\settings.php:1032
1587
  #, php-format
1588
  msgid ""
1589
+ "Check the box for \"Enable widget/small chart in admin dashboard\" under %s "
1590
+ "tab."
1591
  msgstr ""
1592
 
1593
+ #: lib\settings.php:1032 lib\settings.php:1038 lib\settings.php:1041
1594
+ #: lib\settings.php:1043 lib\settings.php:1045 lib\settings.php:1047
1595
+ #: lib\settings.php:1048 lib\settings.php:1051 lib\settings.php:1052
1596
+ #: lib\settings.php:1053 lib\settings.php:1058 lib\settings.php:1064
1597
+ #: lib\settings.php:1066 lib\settings.php:1070 lib\settings.php:1074
1598
+ #: lib\settings.php:1080 lib\settings.php:1081 lib\wassupadmin.php:455
1599
+ #: lib\wassupadmin.php:892
1600
+ msgid "Options"
1601
  msgstr ""
1602
 
1603
+ #: lib\settings.php:1033
1604
+ msgid "How do I display WassUp widgets on my site?"
1605
  msgstr ""
1606
 
1607
+ #: lib\settings.php:1034
1608
+ msgid ""
1609
+ "From Wordpress widgets panel, drag the \"WassUp Online\" widget or the "
1610
+ "\"Wassup Top Stats\" widget from the list of available widgets on the left "
1611
+ "into your theme's \"Sidebar\" or \"Footer\" area on the right or use the "
1612
+ "Customizer to add Wassup widgets interactively."
1613
  msgstr ""
1614
 
1615
+ #: lib\settings.php:1035
1616
+ msgid ""
1617
+ "My Wordpress theme is not widget ready. Is it possible to display WassUp "
1618
+ "widgets on my site?"
1619
  msgstr ""
1620
 
1621
+ #: lib\settings.php:1036
1622
+ msgid ""
1623
+ "Yes. Insert the template tag \"wassup_sidebar()\" into your theme's "
1624
+ "\"sidebar.php\" file to display Wassup widgets as a single combined widget "
1625
+ "on your site."
1626
  msgstr ""
1627
 
1628
+ #: lib\settings.php:1037
1629
+ msgid "How do I view the real-time visitor geolocation map in WassUp?"
1630
  msgstr ""
1631
 
1632
+ #: lib\settings.php:1038
1633
+ #, php-format
1634
+ msgid ""
1635
+ "Check the box for \"Display a GEO IP Map in spy visitors view\" in %s tab "
1636
+ "and save, then navigate to %s panel to see the map."
1637
  msgstr ""
1638
 
1639
+ #: lib\settings.php:1038 lib\wassupadmin.php:452 lib\wassupadmin.php:539
1640
+ #: lib\wassupadmin.php:889
1641
+ msgid "SPY Visitors"
1642
  msgstr ""
1643
 
1644
+ #: lib\settings.php:1039
1645
+ msgid ""
1646
+ "The map has vanished and I get a message like: \"Google has disabled use of "
1647
+ "the Maps API for this application\". How do I fix this?"
1648
  msgstr ""
1649
 
1650
+ #: lib\settings.php:1040
1651
+ msgid ""
1652
+ "Wassup-spy total daily map views has likely exceeded the Google!maps usage "
1653
+ "limit for Wassup plugin."
1654
  msgstr ""
1655
 
1656
+ #: lib\settings.php:1041
1657
+ #, php-format
1658
+ msgid ""
1659
+ "To fix, sign up for a free %s for your site's sole usage and enter the key "
1660
+ "under \"Spy Visitors settings\" in %s tab."
1661
  msgstr ""
1662
 
1663
+ #: lib\settings.php:1041
1664
+ msgid "Key"
1665
  msgstr ""
1666
 
1667
+ #: lib\settings.php:1042
1668
+ msgid "How do I exclude a visitor from being recorded?"
1669
  msgstr ""
1670
 
1671
+ #: lib\settings.php:1043
1672
+ #, php-format
1673
+ msgid ""
1674
+ "Navigate to %s tab and enter a visitor's username, IP address, or hostname "
1675
+ "into the appropriate text area for that \"Recording Exclusion\" type."
1676
  msgstr ""
1677
 
1678
+ #: lib\settings.php:1044
1679
  msgid ""
1680
+ "How do I stop (temporarily) WassUp from recording new visits on my site?"
 
 
1681
  msgstr ""
1682
 
1683
+ #: lib\settings.php:1045
1684
+ #, php-format
1685
+ msgid "Uncheck the box for \"Enable statistics recording\" under %s tab."
1686
  msgstr ""
1687
 
1688
+ #: lib\settings.php:1046
1689
+ msgid ""
1690
+ "In Wordpress multisite, how do I stop (temporarily) WassUp from recording "
1691
+ "new visits on all sites in the network?"
1692
  msgstr ""
1693
 
1694
+ #: lib\settings.php:1047
1695
+ #, php-format
1696
+ msgid ""
1697
+ "If plugin is \"network activated\", login as network admin, go to the "
1698
+ "Network admin dashboard, navigate to %s tab and Uncheck the box for \"Enable "
1699
+ "Statistics Recording for network\" and save."
1700
  msgstr ""
1701
 
1702
+ #: lib\settings.php:1048
1703
+ #, php-format
1704
+ msgid ""
1705
+ "If plugin is NOT \"network activated\", login as network admin, go to the "
1706
+ "main site/parent domain admin dashboard, navigate to %s tab, then Uncheck "
1707
+ "the box for \"Enable Statistics Recording for network\" and save."
1708
  msgstr ""
1709
 
1710
+ #: lib\settings.php:1050
1711
+ msgid ""
1712
+ "No data is being displayed; or \"Visitor Details\" panel show 0 records for "
1713
+ "the last 24 hours. How do I fix this?"
1714
  msgstr ""
1715
 
1716
+ #: lib\settings.php:1051
1717
  #, php-format
1718
+ msgid ""
1719
+ "Check the box for \"Enable statistics recording\" setting under %s tab and "
1720
+ "save."
1721
  msgstr ""
1722
 
1723
+ #: lib\settings.php:1052
1724
+ #, php-format
1725
+ msgid "Click the [Reset to Default] button under %s tab."
1726
  msgstr ""
1727
 
1728
+ #: lib\settings.php:1053
1729
  #, php-format
1730
+ msgid ""
1731
+ "Navigate to %s tab and uncheck the \"MySQL Delayed Insert\" setting and save."
1732
+ msgstr ""
1733
+
1734
+ #: lib\settings.php:1053 lib\settings.php:1058 lib\settings.php:1064
1735
+ msgid "Manage File & Data"
1736
  msgstr ""
1737
 
1738
+ #: lib\settings.php:1054
1739
+ msgid "Deactivate and Re-activate Wassup from Wordpress Plugins panel."
1740
+ msgstr ""
1741
+
1742
+ #: lib\settings.php:1055
1743
  #, php-format
1744
+ msgid ""
1745
+ "If you have access to MySql/phpMyAdmin on your host server, run the MySql "
1746
+ "command %s to repair and release any locks on wassup table. Note that wassup "
1747
+ "table name may be different in other Wordpress setups."
1748
  msgstr ""
1749
 
1750
+ #: lib\settings.php:1056
1751
+ msgid ""
1752
+ "As a last resort, uninstall WassUp cleanly (delete data and files) and "
1753
+ "reinstall it."
1754
  msgstr ""
1755
 
1756
+ #: lib\settings.php:1057
1757
+ msgid ""
1758
+ "My popular web site is hosted on a shared server with restrictive database "
1759
+ "size limits. How do I prevent WassUp's table from growing too big for my "
1760
+ "allocated quota?"
1761
  msgstr ""
1762
 
1763
+ #: lib\settings.php:1058
1764
+ #, php-format
1765
+ msgid ""
1766
+ "Navigate to %s tab and enable the setting for \"Auto Delete\" of old records "
1767
+ "and/or check the box to receive an email alert when the table size limit is "
1768
+ "exceeded."
1769
  msgstr ""
1770
 
1771
+ #: lib\settings.php:1059
1772
  msgid ""
1773
+ "WassUp visitor counts are much lower than actual for my website. Why is "
1774
+ "there a discrepancy and how do I fix it?"
 
 
 
1775
  msgstr ""
1776
 
1777
+ #: lib\settings.php:1060
1778
+ msgid ""
1779
+ "Low visitor count is likely caused by page caching on your website. WassUp "
1780
+ "is incompatible with static page caching plugins such as WP Supercache, WP "
1781
+ "Cache, and Hyper Cache. To fix, uninstall your cache plugin or switch to a "
1782
+ "different (javascript-based) statistics plugin."
1783
  msgstr ""
1784
 
1785
+ #: lib\settings.php:1061
1786
+ msgid "Is there any caching plugin that works with WassUp?"
1787
  msgstr ""
1788
 
1789
+ #: lib\settings.php:1062
1790
+ #, php-format
1791
+ msgid "%s is the only caching plugin verified to work with WassUp."
1792
  msgstr ""
1793
 
1794
+ #: lib\settings.php:1063
1795
+ msgid "How can I make Wassup run faster?"
1796
  msgstr ""
1797
 
1798
+ #: lib\settings.php:1064
1799
+ #, php-format
1800
+ msgid ""
1801
+ "Keep Wassup table size small by setting automatic delete of old records or "
1802
+ "do manual delete periodically under %s tab."
1803
  msgstr ""
1804
 
1805
+ #: lib\settings.php:1065
1806
+ msgid ""
1807
+ "If using the \"Top Stats\" widget on your site, set refresh frequency to 15 "
1808
+ "minutes or higher."
1809
+ msgstr ""
1810
+
1811
+ #: lib\settings.php:1066
1812
  #, php-format
1813
  msgid ""
1814
+ "Reduce the number of recording exclusions (by ip/hostname/username/url) "
1815
+ "under %s tab."
1816
  msgstr ""
1817
 
1818
+ #: lib\settings.php:1069
1819
+ #, php-format
1820
+ msgid ""
1821
+ "Delete the file(s) %s from the plugin subfolder 'lib' to stop Wassup from "
1822
+ "doing remote server queries for spam identification."
1823
  msgstr ""
1824
 
1825
+ #: lib\settings.php:1070
1826
+ #, php-format
1827
+ msgid ""
1828
+ "As a last resort, stop all spam/malware detection on new hits by unchecking "
1829
+ "\"Enable Spam and malware detection on records\" under %s tab."
1830
  msgstr ""
1831
 
1832
+ #: lib\settings.php:1071
1833
+ msgid ""
1834
+ "Why does WassUp stats sometimes show more page views than actual pages "
1835
+ "clicked by a person?"
1836
  msgstr ""
1837
 
1838
+ #: lib\settings.php:1072
1839
+ msgid ""
1840
+ "\"Phantom\" page views can occur when a user's browser does automatic feed "
1841
+ "retrieval, link pre-fetching, a page refresh, or automatically adds your "
1842
+ "website to it's \"Top sites\" window (Safari). WassUp tracks these because "
1843
+ "they are valid requests from the browser and are sometimes indistinguishable "
1844
+ "from user link clicks."
1845
  msgstr ""
1846
 
1847
+ #: lib\settings.php:1073
1848
+ msgid "How do I upgrade WassUp safely when my site has frequent visitors?"
1849
  msgstr ""
1850
 
1851
+ #: lib\settings.php:1074
1852
+ #, php-format
1853
+ msgid ""
1854
+ "To upgrade WassUp when your site is busy, you must first disable statistics "
1855
+ "recording manually under %s tab, then do the plugin upgrade, and afterwards "
1856
+ "re-enable recording manually when the upgrade is complete and the plugin is "
1857
+ "active."
1858
  msgstr ""
1859
 
1860
+ #: lib\settings.php:1075
1861
+ msgid "An unspecified error occurred during plugin upgrade. What do I do next?"
1862
  msgstr ""
1863
 
1864
+ #: lib\settings.php:1076
1865
+ msgid ""
1866
+ "Wait a few minutes. Do NOT re-attempt to upgrade nor try to activate the "
1867
+ "plugin again! An activation error with no explanation is probably due to "
1868
+ "your browser timing out, not an upgrade failure. WassUp continues it's "
1869
+ "upgrade in the background and will activate automatically when it is done. "
1870
+ "After a few minutes (5-10) has passed, revisit Wordpress admin Plugins panel "
1871
+ "and verify that Wassup plugin has activated."
1872
  msgstr ""
1873
 
1874
+ #: lib\settings.php:1077
1875
+ msgid "How do I uninstall WassUp cleanly?"
 
1876
  msgstr ""
1877
 
1878
+ #: lib\settings.php:1078
1879
+ msgid ""
1880
+ "From a single Wordpress site: navigate to Wordpress Plugins panel and "
1881
+ "deactivate WassUp plugin. Then, on the same page, click the \"delete\" link "
1882
+ "below WassUp name. This deletes both data and files permanently."
1883
  msgstr ""
1884
 
1885
+ #: lib\settings.php:1079
1886
+ msgid ""
1887
+ "From Wordpress multisite Network admin panel: navigate to Plugins panel and "
1888
+ "deactivate WassUp plugin. If the plugin is not \"network activated\", "
1889
+ "navigate to the main site/parent domain Plugins panel and deactivate Wassup "
1890
+ "plugin there, then return to Network admin Plugins panel. Click the \"delete"
1891
+ "\" link below WassUp name. This deletes both data and files permanently from "
1892
+ "the main site/parent domain and deletes Wassup data from all the subsites in "
1893
+ "the network."
1894
  msgstr ""
1895
 
1896
+ #: lib\settings.php:1080
1897
+ #, php-format
1898
+ msgid ""
1899
+ "From a subsite in Wordpress multisite: navigate to %s tab and check the box "
1900
+ "for \"Permanently remove WassUp data and settings\" and save. Next, go to "
1901
+ "the subsite's Plugins panel and deactivate WassUp plugin. This deletes the "
1902
+ "subsite's data permanently. No files are deleted (not needed)."
1903
  msgstr ""
1904
 
1905
+ #: lib\settings.php:1081
1906
+ #, php-format
1907
+ msgid ""
1908
+ "From a Wordpress 2.x site: navigate to %s tab and check the box for "
1909
+ "\"Permanently remove WassUp data and settings\" and save. Next, go to "
1910
+ "Wordpress Plugins panel and deactivate WassUp plugin. This deletes the data "
1911
+ "permanently. To delete the plugin files from Wordpress 2.x, use an ftp "
1912
+ "client software on your PC or login to your host server's \"cpanel\" and use "
1913
+ "\"File Manager\" to delete the folder \"wassup\" from the %s directory on "
1914
+ "your host server."
1915
  msgstr ""
1916
 
1917
+ #: lib\settings.php:1083
1918
+ #, php-format
1919
+ msgid "Visit the %s to find more answers to your WassUp questions."
1920
  msgstr ""
1921
 
1922
+ #: lib\settings.php:1083
1923
+ msgid "Plugin Forum"
1924
  msgstr ""
1925
 
1926
+ #: lib\settings.php:1088
1927
+ msgid "How you can donate"
1928
  msgstr ""
1929
 
1930
+ #: lib\settings.php:1089
1931
+ msgid ""
1932
+ "If you like this plugin, please consider making a donation to help keep it's "
1933
+ "development active."
1934
  msgstr ""
1935
 
1936
+ #: lib\settings.php:1091
1937
+ #, php-format
1938
+ msgid "Donate by %s"
1939
  msgstr ""
1940
 
1941
+ #: lib\settings.php:1092
1942
+ #, php-format
1943
+ msgid "Donate %s"
1944
  msgstr ""
1945
 
1946
+ #: lib\settings.php:1094
1947
+ msgid "Send your bitcoin donation to this address"
1948
  msgstr ""
1949
 
1950
+ #: lib\uadetector.class.php:459 lib\uadetector.class.php:782
1951
+ msgid "Script Injection Bot"
1952
  msgstr ""
1953
 
1954
+ #: lib\uadetector.class.php:608
1955
+ msgid "Unknown Feedreader"
1956
  msgstr ""
1957
 
1958
+ #: lib\upgrade.php:138
1959
+ msgid "COMPATIBILITY WARNING: non-MySQL database type detected!"
1960
  msgstr ""
1961
 
1962
+ #: lib\upgrade.php:138
1963
+ msgid ""
1964
+ "WassUp uses complex MySQL queries that may not run on a different database "
1965
+ "type."
1966
  msgstr ""
1967
 
1968
+ #: lib\upgrade.php:140
1969
+ msgid "WassUp cannot generate accurate statistics with page caching enabled."
1970
  msgstr ""
1971
 
1972
+ #: lib\upgrade.php:140
1973
+ msgid ""
1974
+ "If your cache plugin stores whole Wordpress pages/posts as static HTML, then "
1975
+ "WassUp won't run properly. Please deactivate your cache plugin and remove "
1976
+ "\"WP_CACHE\" from \"wp_config.php\" or switch to a different statistics "
1977
+ "plugin."
1978
  msgstr ""
1979
 
1980
+ #: lib\upgrade.php:147
1981
+ #, php-format
1982
+ msgid ""
1983
+ "WARNING: Insufficient memory: %s found! A minimum allocation of %s is "
1984
+ "recommended for WassUp and Wordpress."
1985
  msgstr ""
1986
 
1987
+ #: lib\upgrade.php:150
1988
+ #, php-format
1989
+ msgid "See %s for information about increasing Wordpress memory."
1990
  msgstr ""
1991
 
1992
+ #: lib\upgrade.php:157
1993
+ msgid "IMPORTANT: Wassup Widget has changed and must be re-installed."
1994
  msgstr ""
1995
 
1996
+ #: lib\upgrade.php:344
1997
+ msgid "Welcome to WassUP"
1998
  msgstr ""
1999
 
2000
+ #: lib\upgrade.php:364 lib\upgrade.php:407
2001
+ #, php-format
2002
+ msgid "An error occurred during the install of table %s."
2003
  msgstr ""
2004
 
2005
+ #: lib\wassup.class.php:449 lib\compat-lib\compat_php.php:462
2006
+ msgid "Administrator"
2007
  msgstr ""
2008
 
2009
+ #: lib\wassup.class.php:450 lib\compat-lib\compat_php.php:463
2010
+ msgid "Editor"
2011
  msgstr ""
2012
 
2013
+ #: lib\wassup.class.php:451 lib\compat-lib\compat_php.php:464
2014
+ msgid "Author"
2015
  msgstr ""
2016
 
2017
+ #: lib\wassup.class.php:452 lib\compat-lib\compat_php.php:465
2018
+ msgid "Contributor"
2019
  msgstr ""
2020
 
2021
+ #: lib\wassup.class.php:453 lib\compat-lib\compat_php.php:466
2022
+ msgid "Subscriber"
2023
  msgstr ""
2024
 
2025
+ #: lib\wassup.class.php:459 lib\compat-lib\compat_php.php:472
2026
+ msgid "One - 2 lines chart 1 axis"
2027
  msgstr ""
2028
 
2029
+ #: lib\wassup.class.php:460 lib\compat-lib\compat_php.php:473
2030
+ msgid "Two - 2 lines chart 2 axes"
2031
  msgstr ""
2032
 
2033
+ #: lib\wassup.class.php:480 lib\compat-lib\compat_php.php:493
2034
+ msgid "Everything"
2035
  msgstr ""
2036
 
2037
+ #: lib\wassup.class.php:482 lib\compat-lib\compat_php.php:495
2038
+ msgid "No spider"
 
 
2039
  msgstr ""
2040
 
2041
+ #: lib\wassup.class.php:484 lib\compat-lib\compat_php.php:497
2042
+ msgid "No Spam"
2043
  msgstr ""
2044
 
2045
+ #: lib\wassup.class.php:485 lib\compat-lib\compat_php.php:498
2046
+ msgid "No Spam, No Spider"
2047
  msgstr ""
2048
 
2049
+ #: lib\wassup.class.php:486 lib\compat-lib\compat_php.php:499
2050
+ msgid "Users logged in"
2051
  msgstr ""
2052
 
2053
+ #: lib\wassup.class.php:487 lib\wassupadmin.php:1041 lib\wassupadmin.php:2132
2054
+ #: lib\compat-lib\compat_php.php:500 lib\compat-lib\compat_php.php:2643
2055
+ #: widgets\widgets.php:243 widgets\widget_functions.php:241
2056
+ msgid "Comment authors"
2057
  msgstr ""
2058
 
2059
+ #: lib\wassup.class.php:488 lib\compat-lib\compat_php.php:501
2060
+ msgid "Referrer from search engine"
2061
  msgstr ""
2062
 
2063
+ #: lib\wassup.class.php:489 lib\compat-lib\compat_php.php:502
2064
+ msgid "Referrer from ext link"
2065
  msgstr ""
2066
 
2067
+ #: lib\wassup.class.php:522 lib\compat-lib\compat_php.php:535
2068
+ msgid "Don't delete anything"
2069
  msgstr ""
2070
 
2071
+ #: lib\wassup.class.php:523 lib\wassup.class.php:559
2072
+ #: lib\compat-lib\compat_php.php:536 lib\compat-lib\compat_php.php:572
2073
+ msgid "24 hours"
2074
  msgstr ""
2075
 
2076
+ #: lib\wassup.class.php:524 lib\wassup.class.php:560
2077
+ #: lib\compat-lib\compat_php.php:537 lib\compat-lib\compat_php.php:573
2078
+ msgid "7 days"
2079
  msgstr ""
2080
 
2081
+ #: lib\wassup.class.php:525 lib\wassup.class.php:561
2082
+ #: lib\compat-lib\compat_php.php:538 lib\compat-lib\compat_php.php:574
2083
+ msgid "2 weeks"
 
2084
  msgstr ""
2085
 
2086
+ #: lib\wassup.class.php:526 lib\wassup.class.php:562
2087
+ #: lib\compat-lib\compat_php.php:539 lib\compat-lib\compat_php.php:575
2088
+ msgid "1 month"
2089
  msgstr ""
2090
 
2091
+ #: lib\wassup.class.php:527 lib\wassup.class.php:563
2092
+ #: lib\compat-lib\compat_php.php:540 lib\compat-lib\compat_php.php:576
2093
+ msgid "3 months"
2094
  msgstr ""
2095
 
2096
+ #: lib\wassup.class.php:528 lib\wassup.class.php:564
2097
+ #: lib\compat-lib\compat_php.php:541 lib\compat-lib\compat_php.php:577
2098
+ msgid "6 months"
 
2099
  msgstr ""
2100
 
2101
+ #: lib\wassup.class.php:529 lib\wassup.class.php:565
2102
+ #: lib\compat-lib\compat_php.php:542 lib\compat-lib\compat_php.php:578
2103
+ msgid "1 year"
 
 
2104
  msgstr ""
2105
 
2106
+ #: lib\wassup.class.php:536 lib\compat-lib\compat_php.php:549
2107
+ msgid "All"
 
2108
  msgstr ""
2109
 
2110
+ #: lib\wassup.class.php:539 lib\compat-lib\compat_php.php:552
2111
+ msgid "Spider and spam"
2112
  msgstr ""
2113
 
2114
+ #: lib\wassup.class.php:549 lib\compat-lib\compat_php.php:562
2115
+ msgid "IP Address"
2116
  msgstr ""
2117
 
2118
+ #: lib\wassup.class.php:550 lib\compat-lib\compat_php.php:563
2119
+ msgid "URL Request"
 
 
 
2120
  msgstr ""
2121
 
2122
+ #: lib\wassup.class.php:556 lib\compat-lib\compat_php.php:569
2123
+ msgid "1 hour"
2124
  msgstr ""
2125
 
2126
+ #: lib\wassup.class.php:557 lib\compat-lib\compat_php.php:570
2127
+ msgid "6 hours"
 
 
 
 
2128
  msgstr ""
2129
 
2130
+ #: lib\wassup.class.php:558 lib\compat-lib\compat_php.php:571
2131
+ msgid "12 hours"
 
 
2132
  msgstr ""
2133
 
2134
+ #: lib\wassup.class.php:566 lib\compat-lib\compat_php.php:579
2135
+ msgid "all time"
2136
+ msgstr ""
2137
+
2138
+ #: lib\wassup.class.php:659 lib\compat-lib\compat_php.php:672
2139
  msgid ""
2140
+ "Permission denied! Sorry, you must be an 'administrator' to change settings."
 
 
2141
  msgstr ""
2142
 
2143
+ #: lib\wassup.class.php:662 lib\compat-lib\compat_php.php:675
2144
+ msgid "Nothing to do!"
2145
  msgstr ""
2146
 
2147
+ #: lib\wassup.class.php:690 lib\compat-lib\compat_php.php:703
2148
+ msgid "not required"
2149
+ msgstr ""
2150
+
2151
+ #: lib\wassup.class.php:792 lib\wassupadmin.php:673
2152
+ #: lib\compat-lib\compat_php.php:805
2153
+ msgid "Wassup options updated successfully"
2154
+ msgstr ""
2155
+
2156
+ #: lib\wassup.class.php:1036 lib\compat-lib\compat_php.php:1049
2157
+ msgid "error"
2158
+ msgstr ""
2159
+
2160
+ #: lib\wassup.class.php:1037 lib\compat-lib\compat_php.php:1050
2161
+ msgid "warning"
2162
+ msgstr ""
2163
+
2164
+ #: lib\wassup.class.php:1038 lib\compat-lib\compat_php.php:1051
2165
+ msgid "updated"
2166
+ msgstr ""
2167
+
2168
+ #: lib\wassup.class.php:1039 lib\compat-lib\compat_php.php:1052
2169
+ msgid "upgraded"
2170
+ msgstr ""
2171
+
2172
+ #: lib\wassup.class.php:1040 lib\compat-lib\compat_php.php:1053
2173
+ msgid "deleted"
2174
+ msgstr ""
2175
+
2176
+ #: lib\wassup.class.php:1710 lib\compat-lib\compat_php.php:1720
2177
+ msgid "ERROR"
2178
+ msgstr ""
2179
+
2180
+ #: lib\wassup.class.php:1770 lib\compat-lib\compat_php.php:1780
2181
  #, php-format
2182
+ msgid "%s error!"
 
 
2183
  msgstr ""
2184
 
2185
+ #: lib\wassup.class.php:1771 lib\compat-lib\compat_php.php:1781
2186
+ #, php-format
2187
+ msgid "%s encountered an error."
2188
+ msgstr ""
2189
+
2190
+ #: lib\wassup.class.php:1878 lib\compat-lib\compat_php.php:1888
2191
+ msgid "Wassup auto-delete notice"
2192
  msgstr ""
2193
 
2194
+ #: lib\wassup.class.php:1879 lib\compat-lib\compat_php.php:1889
2195
  #, php-format
2196
+ msgid "Auto-delete deleted %d old %s records today."
 
 
 
2197
  msgstr ""
2198
 
2199
+ #: lib\wassup.class.php:1915 lib\compat-lib\compat_php.php:1925
2200
+ #, php-format
2201
+ msgid "Error with TABLE %s: Not found"
2202
  msgstr ""
2203
 
2204
+ #: lib\wassup.class.php:1950 lib\compat-lib\compat_php.php:1960
2205
  #, php-format
2206
+ msgid "Error with \"SHOW CREATE TABLE\" for %s."
 
 
2207
  msgstr ""
2208
 
2209
+ #: lib\wassup.class.php:1957 lib\compat-lib\compat_php.php:1967
2210
+ #, php-format
2211
+ msgid "Table structure of table %s"
2212
  msgstr ""
2213
 
2214
+ #: lib\wassup.class.php:1963 lib\compat-lib\compat_php.php:1973
2215
  #, php-format
2216
+ msgid "Data contents of table %s"
2217
  msgstr ""
2218
 
2219
+ #: lib\wassup.class.php:1971 lib\compat-lib\compat_php.php:1981
2220
+ #, php-format
2221
+ msgid "Error getting table structure of %s: %s"
 
2222
  msgstr ""
2223
 
2224
+ #: lib\wassup.class.php:1974 lib\compat-lib\compat_php.php:1984
2225
  #, php-format
2226
+ msgid "Error getting table structure of %s"
 
 
 
2227
  msgstr ""
2228
 
2229
+ #: lib\wassup.class.php:1980 lib\compat-lib\compat_php.php:1990
2230
  #, php-format
2231
+ msgid "Error with table %s: %s"
 
 
 
2232
  msgstr ""
2233
 
2234
+ #: lib\wassup.class.php:1982 lib\compat-lib\compat_php.php:1992
2235
+ #, php-format
2236
+ msgid "Error with table %s: No data"
 
2237
  msgstr ""
2238
 
2239
+ #: lib\wassup.class.php:2063 lib\compat-lib\compat_php.php:2073
2240
  #, php-format
2241
+ msgid "Error exporting data from table %s: %s"
 
 
2242
  msgstr ""
2243
 
2244
+ #: lib\wassup.class.php:2119 lib\compat-lib\compat_php.php:2129
2245
  #, php-format
2246
+ msgid "End of data contents of table %s"
2247
  msgstr ""
2248
 
2249
+ #: lib\wassup.class.php:2121 lib\compat-lib\compat_php.php:2131
2250
  #, php-format
2251
+ msgid "Interrupted data contents of table %s"
 
2252
  msgstr ""
2253
 
2254
+ #: lib\wassup.class.php:2130 lib\compat-lib\compat_php.php:2140
2255
+ #, php-format
2256
+ msgid "End time: %d"
2257
  msgstr ""
2258
 
2259
+ #: lib\wassup.class.php:2131 lib\wassup.class.php:2136
2260
+ #: lib\compat-lib\compat_php.php:2141 lib\compat-lib\compat_php.php:2146
2261
+ #, php-format
2262
+ msgid "%d out of %d records exported."
2263
  msgstr ""
2264
 
2265
+ #: lib\wassup.class.php:2131 lib\wassup.class.php:2136
2266
+ #: lib\compat-lib\compat_php.php:2141 lib\compat-lib\compat_php.php:2146
2267
  #, php-format
2268
+ msgid "Last record ID: %d"
 
 
 
2269
  msgstr ""
2270
 
2271
+ #: lib\wassup.class.php:2280 lib\wassup.class.php:2313
2272
+ #: lib\compat-lib\compat_php.php:2288 lib\compat-lib\compat_php.php:2321
2273
+ msgid "direct hit"
 
2274
  msgstr ""
2275
 
2276
+ #: lib\wassup.class.php:2291 lib\wassup.class.php:2294
2277
+ #: lib\compat-lib\compat_php.php:2299 lib\compat-lib\compat_php.php:2302
2278
+ msgid "from your site"
 
 
2279
  msgstr ""
2280
 
2281
+ #: lib\wassupadmin.php:155
2282
+ msgid "paused"
 
 
 
 
2283
  msgstr ""
2284
 
2285
+ #: lib\wassupadmin.php:194
2286
+ msgid "Sorry, delete failed!"
 
 
2287
  msgstr ""
2288
 
2289
+ #: lib\wassupadmin.php:197
2290
+ msgid "Delete record failed!"
 
 
 
 
2291
  msgstr ""
2292
 
2293
+ #: lib\wassupadmin.php:207 lib\wassupadmin.php:214 lib\wassupadmin.php:1570
2294
+ msgid "Hide Search"
2295
  msgstr ""
2296
 
2297
+ #: lib\wassupadmin.php:219 lib\wassupadmin.php:262
2298
+ msgid "Collapse All"
 
2299
  msgstr ""
2300
 
2301
+ #: lib\wassupadmin.php:221 lib\wassupadmin.php:264 lib\wassupadmin.php:980
2302
+ #: lib\wassupadmin.php:1611
2303
+ msgid "Expand All"
2304
  msgstr ""
2305
 
2306
+ #: lib\wassupadmin.php:224
2307
+ msgid "Expand Chronology"
 
 
 
2308
  msgstr ""
2309
 
2310
+ #: lib\wassupadmin.php:226 lib\wassupadmin.php:1612
2311
+ msgid "Collapse Chronology"
 
 
2312
  msgstr ""
2313
 
2314
+ #: lib\wassupadmin.php:451 lib\wassupadmin.php:540 lib\wassupadmin.php:883
2315
+ msgid "Visitor Details"
2316
+ msgstr ""
2317
+
2318
+ #: lib\wassupadmin.php:452
2319
+ msgid "Spy Visitors"
2320
+ msgstr ""
2321
+
2322
+ #: lib\wassupadmin.php:453 lib\wassupadmin.php:523 lib\wassupadmin.php:538
2323
+ #: lib\wassupadmin.php:886
2324
+ msgid "Current Visitors Online"
2325
+ msgstr ""
2326
+
2327
+ #: lib\wassupadmin.php:460
2328
+ msgid "WassUp Stats"
2329
+ msgstr ""
2330
+
2331
+ #: lib\wassupadmin.php:480 lib\wassupadmin.php:482
2332
+ msgid "Settings"
2333
+ msgstr ""
2334
+
2335
+ #: lib\wassupadmin.php:718
2336
+ msgid "Nothing to do! Check a \"Delete\" option and try again"
2337
+ msgstr ""
2338
+
2339
+ #: lib\wassupadmin.php:722
2340
  #, php-format
2341
+ msgid "%d records DELETED permanently!"
2342
+ msgstr ""
2343
+
2344
+ #: lib\wassupadmin.php:740
2345
+ msgid "0 records deleted!"
2346
+ msgstr ""
2347
+
2348
+ #: lib\wassupadmin.php:767
2349
+ msgid "Wassup uninstall option updated successfully"
2350
+ msgstr ""
2351
+
2352
+ #: lib\wassupadmin.php:775
2353
+ msgid "Wassup options reset successfully"
2354
  msgstr ""
2355
 
2356
+ #: lib\wassupadmin.php:782 lib\wassupadmin.php:796
2357
+ msgid "Sorry! You're not allowed to do that."
2358
  msgstr ""
2359
 
2360
+ #: lib\wassupadmin.php:793
2361
+ msgid "Wassup spam options updated successfully"
 
 
 
2362
  msgstr ""
2363
 
2364
+ #: lib\wassupadmin.php:833
2365
+ msgid "records deleted"
 
 
 
2366
  msgstr ""
2367
 
2368
+ #: lib\wassupadmin.php:835
2369
+ msgid "Sorry! You're not allowed to delete records."
2370
+ msgstr ""
2371
+
2372
+ #: lib\wassupadmin.php:848
2373
+ msgid "WARNING: WassUp is NOT recording new statistics."
2374
  msgstr ""
2375
 
2376
+ #: lib\wassupadmin.php:851
2377
  msgid ""
2378
+ "To collect visitor data you must check \"Enable statistics recording\" in "
2379
+ "\"WassUp-Options: General Setup\" tab"
 
 
 
2380
  msgstr ""
2381
 
2382
+ #: lib\wassupadmin.php:853
2383
+ msgid ""
2384
+ "To collect visitor data you must check \"Enable Statistics Recording for "
2385
+ "network\" in \"WassUp-Options: General Setup\" tab"
2386
  msgstr ""
2387
 
2388
+ #: lib\wassupadmin.php:855 lib\wassupadmin.php:861
 
2389
  msgid ""
2390
+ "Contact your site administrator about enabling statistics recording for the "
2391
+ "network."
 
 
2392
  msgstr ""
2393
 
2394
+ #: lib\wassupadmin.php:859
2395
+ msgid "Contact your site administrator about enabling statistics recording."
2396
  msgstr ""
2397
 
2398
+ #: lib\wassupadmin.php:883
2399
+ msgid "Latest Hits"
 
 
 
 
 
 
2400
  msgstr ""
2401
 
2402
+ #: lib\wassupadmin.php:900
2403
+ msgid "Donations are really welcome"
2404
  msgstr ""
2405
 
2406
+ #: lib\wassupadmin.php:902
2407
+ #, php-format
2408
+ msgid "Check the %s for updates, bug reports and your hints to improve it"
 
 
2409
  msgstr ""
2410
 
2411
+ #: lib\wassupadmin.php:902
2412
+ msgid "Official WassUp page"
 
 
 
 
 
 
 
2413
  msgstr ""
2414
 
2415
+ #: lib\wassupadmin.php:903
2416
+ msgid "WassUp Support"
 
 
 
 
 
2417
  msgstr ""
2418
 
2419
+ #: lib\wassupadmin.php:903
2420
+ msgid "Wassup Support"
 
 
 
 
 
 
 
 
2421
  msgstr ""
2422
 
2423
+ #: lib\wassupadmin.php:904
2424
+ msgid "Exec time"
 
2425
  msgstr ""
2426
 
2427
+ #: lib\wassupadmin.php:1011 lib\wassupadmin.php:1198
2428
+ msgid "Legend"
2429
  msgstr ""
2430
 
2431
+ #: lib\wassupadmin.php:1011 lib\wassupadmin.php:1040 lib\wassupadmin.php:1198
2432
+ msgid "Logged-in Users"
2433
  msgstr ""
2434
 
2435
+ #: lib\wassupadmin.php:1011
2436
+ msgid "Comment Authors"
 
 
2437
  msgstr ""
2438
 
2439
+ #: lib\wassupadmin.php:1011 lib\wassupadmin.php:1198
2440
+ msgid "Spiders/bots"
 
2441
  msgstr ""
2442
 
2443
+ #: lib\wassupadmin.php:1039 lib\wassupadmin.php:2079
2444
+ #: lib\compat-lib\compat_php.php:2590 widgets\widget_functions.php:221
2445
+ msgid "Visitors online"
2446
  msgstr ""
2447
 
2448
+ #: lib\wassupadmin.php:1067
2449
+ msgid "From your site"
2450
  msgstr ""
2451
 
2452
+ #: lib\wassupadmin.php:1089 lib\wassupadmin.php:1681
2453
+ msgid "LOGGED IN USER"
2454
  msgstr ""
2455
 
2456
+ #: lib\wassupadmin.php:1094 lib\wassupadmin.php:1688
2457
+ msgid "ADMINISTRATOR"
2458
  msgstr ""
2459
 
2460
+ #: lib\wassupadmin.php:1109 lib\wassupadmin.php:1709
2461
+ msgid "COMMENT AUTHOR"
2462
  msgstr ""
2463
 
2464
+ #: lib\wassupadmin.php:1130 lib\wassupadmin.php:1764
2465
+ msgid "show raw table"
 
 
2466
  msgstr ""
2467
 
2468
+ #: lib\wassupadmin.php:1130 lib\wassupadmin.php:1764
2469
+ msgid "Show the items as raw table"
2470
  msgstr ""
2471
 
2472
+ #: lib\wassupadmin.php:1198
2473
+ msgid "Comments Authors"
 
 
 
 
2474
  msgstr ""
2475
 
2476
+ #: lib\wassupadmin.php:1202
2477
+ msgid "Pause"
 
 
 
2478
  msgstr ""
2479
 
2480
+ #: lib\wassupadmin.php:1203
2481
+ msgid "Play"
 
2482
  msgstr ""
2483
 
2484
+ #: lib\wassupadmin.php:1214
2485
+ msgid "Show map"
2486
  msgstr ""
2487
 
2488
+ #: lib\wassupadmin.php:1214
2489
+ msgid "Show ip geo location on map"
2490
  msgstr ""
2491
 
2492
+ #: lib\wassupadmin.php:1220
2493
+ msgid "Spy items by"
 
2494
  msgstr ""
2495
 
2496
+ #: lib\wassupadmin.php:1267
2497
+ msgid "WassUp recording is disabled"
2498
  msgstr ""
2499
 
2500
+ #: lib\wassupadmin.php:1269
2501
+ msgid "WassUp recording is disabled for network."
2502
  msgstr ""
2503
 
2504
+ #: lib\wassupadmin.php:1467
2505
+ msgid "Show details from the last"
2506
  msgstr ""
2507
 
2508
+ #: lib\wassupadmin.php:1476
2509
+ msgid "Items per page"
2510
  msgstr ""
2511
 
2512
+ #: lib\wassupadmin.php:1486
2513
+ msgid "Filter items for"
2514
  msgstr ""
2515
 
2516
+ #: lib\wassupadmin.php:1500
2517
+ msgid "Visits"
2518
  msgstr ""
2519
 
2520
+ #: lib\wassupadmin.php:1501
2521
+ msgid "Pageviews"
2522
  msgstr ""
2523
 
2524
+ #: lib\wassupadmin.php:1502
2525
+ msgid "Pages/Visits"
2526
  msgstr ""
2527
 
2528
+ #: lib\wassupadmin.php:1518
2529
+ msgid "Spams"
2530
  msgstr ""
2531
 
2532
+ #: lib\wassupadmin.php:1528
2533
+ msgid "Spam/Malware Options"
2534
  msgstr ""
2535
 
2536
+ #: lib\wassupadmin.php:1534
2537
+ msgid "Enable Spam and Malware Check on Records"
2538
  msgstr ""
2539
 
2540
+ #: lib\wassupadmin.php:1546
2541
+ msgid "refresh screen"
2542
  msgstr ""
2543
 
2544
+ #: lib\wassupadmin.php:1548
2545
+ #, php-format
2546
+ msgid "Auto refresh in %s seconds"
2547
  msgstr ""
2548
 
2549
+ #: lib\wassupadmin.php:1553
2550
+ msgid "hide chart"
2551
  msgstr ""
2552
 
2553
+ #: lib\wassupadmin.php:1553
2554
+ msgid "Hide the chart"
2555
  msgstr ""
2556
 
2557
+ #: lib\wassupadmin.php:1553
2558
+ msgid "Hide chart"
 
2559
  msgstr ""
2560
 
2561
+ #: lib\wassupadmin.php:1555
2562
+ msgid "show chart"
 
2563
  msgstr ""
2564
 
2565
+ #: lib\wassupadmin.php:1555
2566
+ msgid "Show the chart"
 
2567
  msgstr ""
2568
 
2569
+ #: lib\wassupadmin.php:1555
2570
+ msgid "Show chart"
 
2571
  msgstr ""
2572
 
2573
+ #: lib\wassupadmin.php:1566
2574
+ #, php-format
2575
+ msgid "Top Stats for %s"
2576
  msgstr ""
2577
 
2578
+ #: lib\wassupadmin.php:1566
2579
+ msgid "Show top stats"
 
2580
  msgstr ""
2581
 
2582
+ #: lib\wassupadmin.php:1568
2583
+ #, php-format
2584
+ msgid "Top stats for %s in popup"
2585
  msgstr ""
2586
 
2587
+ #: lib\wassupadmin.php:1576
2588
+ #, php-format
2589
+ msgid "%s matches found for search"
2590
  msgstr ""
2591
 
2592
+ #: lib\wassupadmin.php:1580
2593
+ #, php-format
2594
+ msgid "%s items marked for IP"
2595
  msgstr ""
2596
 
2597
+ #: lib\wassupadmin.php:1581
2598
+ msgid "Filter by marked IP"
2599
  msgstr ""
2600
 
2601
+ #: lib\wassupadmin.php:1645
2602
+ msgid "Records display interrupted."
2603
  msgstr ""
2604
 
2605
+ #: lib\wassupadmin.php:1648
2606
+ msgid "Unable to display records."
2607
  msgstr ""
2608
 
2609
+ #: lib\wassupadmin.php:1715
2610
+ msgid "FEEDREADER"
2611
  msgstr ""
2612
 
2613
+ #: lib\wassupadmin.php:1717
2614
+ msgid "SUBSCRIBER(S)"
2615
  msgstr ""
2616
 
2617
+ #: lib\wassupadmin.php:1720
2618
+ msgid "SPIDER"
2619
  msgstr ""
2620
 
2621
+ #: lib\wassupadmin.php:1754 lib\wassupadmin.php:1759
2622
+ msgid "delete"
2623
  msgstr ""
2624
 
2625
+ #: lib\wassupadmin.php:1754
2626
+ msgid "Delete ALL marked records with this IP"
2627
  msgstr ""
2628
 
2629
+ #: lib\wassupadmin.php:1756
2630
+ msgid "unmark"
2631
  msgstr ""
2632
 
2633
+ #: lib\wassupadmin.php:1756
2634
+ msgid "UnMark IP"
2635
  msgstr ""
2636
 
2637
+ #: lib\wassupadmin.php:1759
2638
+ msgid "Delete this record"
2639
  msgstr ""
2640
 
2641
+ #: lib\wassupadmin.php:1761
2642
+ msgid "mark"
2643
  msgstr ""
2644
 
2645
+ #: lib\wassupadmin.php:1761
2646
+ msgid "Mark IP"
2647
  msgstr ""
2648
 
2649
+ #: lib\wassupadmin.php:1799
2650
+ msgid "SEARCH ENGINE"
 
2651
  msgstr ""
2652
 
2653
+ #: lib\wassupadmin.php:1799
2654
+ msgid "page"
2655
  msgstr ""
2656
 
2657
+ #: lib\wassupadmin.php:1800
2658
+ msgid "KEYWORDS"
 
2659
  msgstr ""
2660
 
2661
+ #: lib\wassupadmin.php:1823
2662
+ msgid "Probably SPAM!"
 
2663
  msgstr ""
2664
 
2665
+ #: lib\wassupadmin.php:1825
2666
+ msgid "Referer Spam"
 
2667
  msgstr ""
2668
 
2669
+ #: lib\wassupadmin.php:1829
2670
+ msgid "Comment Spam"
 
2671
  msgstr ""
2672
 
2673
+ #: lib\wassupadmin.php:1837
2674
+ msgid "Probably hack/malware attempt!"
 
2675
  msgstr ""
2676
 
2677
+ #: lib\wassupadmin.php:1864
2678
+ msgid "BROWSER"
 
2679
  msgstr ""
2680
 
2681
+ #: lib\wassupadmin.php:1867
2682
+ msgid "RESOLUTION"
 
2683
  msgstr ""
2684
 
2685
+ #: lib\wassupadmin.php:1937
2686
+ msgid "Graph of visitor hits"
 
2687
  msgstr ""
2688
 
2689
+ #: lib\wassupadmin.php:1939
2690
+ msgid "Too few records to print chart"
 
2691
  msgstr ""
2692
 
2693
+ #: lib\wassupadmin.php:1948
2694
  #, php-format
2695
+ msgid "Invalid page request %s"
2696
  msgstr ""
2697
 
2698
+ #: lib\wassupadmin.php:2013 lib\compat-lib\compat_php.php:2524
2699
+ msgid "Stats"
 
2700
  msgstr ""
2701
 
2702
+ #: lib\wassupadmin.php:2013 lib\compat-lib\compat_php.php:2524
2703
+ msgid "More"
 
2704
  msgstr ""
2705
 
2706
+ #: lib\wassupadmin.php:2015 lib\wassupadmin.php:2050
2707
+ #: lib\compat-lib\compat_php.php:2526 lib\compat-lib\compat_php.php:2561
2708
+ msgid "visitor stats chart"
2709
  msgstr ""
2710
 
2711
+ #: lib\wassupadmin.php:2045 lib\compat-lib\compat_php.php:2556
2712
+ msgid "More Stats"
 
 
2713
  msgstr ""
2714
 
2715
+ #: lib\wassupadmin.php:2126 lib\compat-lib\compat_php.php:2637
2716
+ msgid "Registered users"
 
 
2717
  msgstr ""
2718
 
2719
+ #: lib\wassupadmin.php:2136 lib\compat-lib\compat_php.php:2647
2720
+ #: widgets\widget_functions.php:220
2721
+ msgid "Visitor online"
2722
  msgstr ""
2723
 
2724
+ #: lib\wassupadmin.php:2141 lib\compat-lib\compat_php.php:2652
2725
+ msgid "No online data!"
2726
  msgstr ""
2727
 
2728
+ #: lib\wassupadmin.php:2145 lib\compat-lib\compat_php.php:2656
2729
+ #: widgets\widget_functions.php:125
2730
+ msgid "powered by"
2731
  msgstr ""
2732
 
2733
+ #: lib\wassupadmin.php:2145 lib\compat-lib\compat_php.php:2656
2734
+ #: widgets\widget_functions.php:125
2735
+ msgid "Real Time Visitors Tracking"
2736
  msgstr ""
2737
 
2738
+ #: lib\compat-lib\compat_widget.php:111 widgets\widgets.php:108
2739
+ #: widgets\widgets.php:256 widgets\widgets.php:470
2740
  msgid "Widget style options"
2741
  msgstr ""
2742
 
2743
+ #: lib\compat-lib\compat_widget.php:113 widgets\widgets.php:110
2744
+ #: widgets\widgets.php:258 widgets\widgets.php:472
2745
  #, php-format
2746
  msgid "Class attribute for %s list:"
2747
  msgstr ""
2748
 
2749
+ #: lib\compat-lib\compat_widget.php:115 widgets\widgets.php:112
2750
+ #: widgets\widgets.php:260 widgets\widgets.php:474
2751
  msgid "Max. chars to display from left"
2752
  msgstr ""
2753
 
2754
+ #: lib\compat-lib\compat_widget.php:116 widgets\widgets.php:113
2755
+ #: widgets\widgets.php:261 widgets\widgets.php:475
2756
  msgid "enter \"0\" for theme default/line wrap of long texts"
2757
  msgstr ""
2758
 
2759
+ #: widgets\widgets.php:64
2760
+ msgid "base widget"
2761
+ msgstr ""
2762
+
2763
+ #: widgets\widgets.php:208
2764
  msgid "Online"
2765
  msgstr ""
2766
 
2767
+ #: widgets\widgets.php:209
2768
  msgid "Show counts of your site's visitors who are currently online."
2769
  msgstr ""
2770
 
2771
+ #: widgets\widgets.php:219
2772
  msgid "Online Now"
2773
  msgstr ""
2774
 
2775
+ #: widgets\widgets.php:239
2776
  msgid "Show online counts for:"
2777
  msgstr ""
2778
 
2779
+ #: widgets\widgets.php:241
2780
  msgid "All current visitors"
2781
  msgstr ""
2782
 
2783
+ #: widgets\widgets.php:242 widgets\widget_functions.php:231
2784
  msgid "Logged-in users"
2785
  msgstr ""
2786
 
2787
+ #: widgets\widgets.php:244 widgets\widget_functions.php:251
2788
  msgid "Regular visitors"
2789
  msgstr ""
2790
 
2791
+ #: widgets\widgets.php:245 widgets\widget_functions.php:261
2792
  msgid "Others"
2793
  msgstr ""
2794
 
2795
+ #: widgets\widgets.php:249
2796
  msgid "Online Users Details"
2797
  msgstr ""
2798
 
2799
+ #: widgets\widgets.php:251
2800
  msgid "Show online usernames to registered users"
2801
  msgstr ""
2802
 
2803
+ #: widgets\widgets.php:252
2804
  msgid "Show country flags of users online"
2805
  msgstr ""
2806
 
2807
+ #: widgets\widgets.php:265
2808
  msgid "online counts are automatically cached for 1 minute."
2809
  msgstr ""
2810
 
2811
+ #: widgets\widgets.php:266 widgets\widgets.php:480
2812
  msgid "empty results are not displayed."
2813
  msgstr ""
2814
 
2815
+ #: widgets\widgets.php:377
2816
  msgid "Top Stats"
2817
  msgstr ""
2818
 
2819
+ #: widgets\widgets.php:378
2820
  msgid ""
2821
  "List your site's most popular or trending items from Wassup's latest stats "
2822
  "data."
2823
  msgstr ""
2824
 
2825
+ #: widgets\widgets.php:411
2826
  msgid "of first checked item below"
2827
  msgstr ""
2828
 
2829
+ #: widgets\widgets.php:413
2830
  msgid "List Top Results for"
2831
  msgstr ""
2832
 
2833
+ #: widgets\widgets.php:417
2834
  msgid "Stat item"
2835
  msgstr ""
2836
 
2837
+ #: widgets\widgets.php:418
2838
  msgid "max limit"
2839
  msgstr ""
2840
 
2841
+ #: widgets\widgets.php:420
2842
  msgid "Titles of posts and pages"
2843
  msgstr ""
2844
 
2845
+ #: widgets\widgets.php:420
2846
  msgid "Latest articles"
2847
  msgstr ""
2848
 
2849
+ #: widgets\widgets.php:426
2850
  msgid "Search engine searches"
2851
  msgstr ""
2852
 
2853
+ #: widgets\widgets.php:426
2854
  msgid "Latest searches"
2855
  msgstr ""
2856
 
2857
+ #: widgets\widgets.php:432
2858
  msgid "External links that generated referrals to your site"
2859
  msgstr ""
2860
 
2861
+ #: widgets\widgets.php:432
2862
  msgid "Latest referrers"
2863
  msgstr ""
2864
 
2865
+ #: widgets\widgets.php:438
2866
  msgid "Latest URL requests"
2867
  msgstr ""
2868
 
2869
+ #: widgets\widgets.php:444
2870
  msgid "Client browser software"
2871
  msgstr ""
2872
 
2873
+ #: widgets\widgets.php:444
2874
  msgid "Latest browsers"
2875
  msgstr ""
2876
 
2877
+ #: widgets\widgets.php:450
2878
  msgid "Client device/operating software"
2879
  msgstr ""
2880
 
2881
+ #: widgets\widgets.php:450
2882
  msgid "Latest OS"
2883
  msgstr ""
2884
 
2885
+ #: widgets\widgets.php:456
2886
  msgid "Visitors country/language"
2887
  msgstr ""
2888
 
2889
+ #: widgets\widgets.php:456
2890
  msgid "Latest locale"
2891
  msgstr ""
2892
 
2893
+ #: widgets\widgets.php:463
2894
  msgid "Show counts for each item"
2895
  msgstr ""
2896
 
2897
+ #: widgets\widgets.php:464
2898
  msgid "Statistics timeframe"
2899
  msgstr ""
2900
 
2901
+ #: widgets\widgets.php:465
2902
  msgid ""
2903
  "select 1-30 days for latest top results, 1-12 hours for trending results"
2904
  msgstr ""
2905
 
2906
+ #: widgets\widgets.php:466
2907
  msgid "Refresh statistics every:"
2908
  msgstr ""
2909
 
2910
+ #: widgets\widgets.php:479
2911
  msgid "known spammers and spiders are excluded from results."
2912
  msgstr ""
2913
 
2914
+ #: widgets\widgets.php:583
2915
  msgid "Trending"
2916
  msgstr ""
2917
 
2918
+ #: widgets\widget_functions.php:260
2919
  msgid "Other"
2920
  msgstr ""
2921
 
2922
+ #: widgets\widget_functions.php:417
2923
  #, php-format
2924
  msgid "%s articles"
2925
  msgstr ""
2926
 
2927
+ #: widgets\widget_functions.php:418
2928
  #, php-format
2929
  msgid "%s searches"
2930
  msgstr ""
2931
 
2932
+ #: widgets\widget_functions.php:419
2933
  #, php-format
2934
  msgid "%s referrers"
2935
  msgstr ""
2936
 
2937
+ #: widgets\widget_functions.php:420
2938
  #, php-format
2939
  msgid "%s requests"
2940
  msgstr ""
2941
 
2942
+ #: widgets\widget_functions.php:421
2943
  #, php-format
2944
  msgid "%s browsers"
2945
  msgstr ""
2946
 
2947
+ #: widgets\widget_functions.php:422
2948
  #, php-format
2949
  msgid "%s OS"
2950
  msgstr ""
2951
 
2952
+ #: widgets\widget_functions.php:423
2953
  #, php-format
2954
  msgid "%s locale"
2955
  msgstr ""
 
 
 
 
lib/action.php CHANGED
@@ -4,256 +4,197 @@
4
  *
5
  * @package WassUp Real-time Analytics
6
  * @subpackage action.php
7
- *
8
- * USAGE:
9
- * action.php?action=dosomething&arg1=x&arg2=y (as ajax url)
10
- * -'action' query parameter is required.
11
  */
12
- //security check#1: wassup referrer required
13
- $is_attack=false;
14
- if (!empty($_SERVER['HTTP_REFERER'])&& stristr($_SERVER['HTTP_REFERER'],"wassup")===false) {
15
- die('Bad referer!');
16
- }
17
- //security check#2: block obvious hack attempts on request and referer
18
- if(empty($_SERVER['HTTP_REFERER'])) $targets=array($_SERVER['REQUEST_URI']);
19
- else $targets=array($_SERVER['REQUEST_URI'],$_SERVER['HTTP_REFERER']);
20
- foreach($targets AS $target){
21
- if (preg_match('/["\';<>\$\\\*]/',$target)>0) {
22
- $is_attack=true;
23
- break;
24
- } elseif (preg_match('/(\.+\/){3,}/',$target)>0) {
25
- $is_attack=true;
26
- break;
27
- } elseif (preg_match('/(&lt;|&#60;|%3C)/',$target)>0) {
28
- $is_attack=true;
29
- break;
30
- } elseif (preg_match('#[^a-z_/\-](select|delete|update|alter|drop|create|union|\-1|\-9+)[^a-z_/]#i',$target)>0) {
31
- $is_attack=true;
32
- break;
33
- } elseif (preg_match('/[^a-z_\-](dir|file|href|img|location|path|src|thisdir|document_root.?)\=/i',$target)>0) {
34
- $is_attack=true;
35
- break;
36
- } elseif(preg_match('/[\.\/](aspx?|bin|dll|cgi|cmd|etc|exe|ini|jsp)/i',$target)>0) {
37
- $is_attack=true;
38
- break;
39
- } elseif(preg_match('/(document|function|script|window|cookie)[^a-z0-9\s]/i',$target)>0) {
40
- $is_attack=true;
41
- break;
42
- } elseif(preg_match('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/',$target)>0){
43
- $is_attack=true;
44
- break;
45
- }
46
- } //end foreach
47
- if($is_attack){
48
- if($target == $_SERVER['HTTP_REFERER']) die('#2:Bad referer!'.$_SERVER['HTTP_REFERER']);
49
- else die('Bad request!');
50
- }
51
- //security check#3: check that hash exists
52
- if(!isset($_GET['whash'])){
53
- die('Missing or invalid parameter!');
54
  }
55
- //include required wordpress files
56
- $thisfile=preg_replace('/\\\\/','/',__FILE__);
57
- if ( !function_exists('get_bloginfo') ) {
58
- //IMPORTANT NOTE: The additional GET parameter, "wpabspath=ABSPATH", is required whenever "/wp-content/" directory is in a different directory from Wordpress core files (WP v2.6+).
59
- if ( !empty($_GET['wpabspath']) ) {
60
- //esc_attr not used because it wouldn't be defined here
61
- $wpabspath=htmlspecialchars((base64_decode(urldecode($_GET['wpabspath']))),ENT_QUOTES);
 
 
 
 
 
 
62
  }
63
- if(empty($wpabspath)|| !is_dir($wpabspath)){
64
- $wpabspath=substr($thisfile,0,strpos($thisfile,'/wp-content/')+1);
 
65
  }
66
- //clean up $wpabspath in case misconfigured
67
- if(!empty($wpabspath)){
68
- $cleanpath=preg_replace(array('/\\\\/','#[ /]+$#'),array('/',''),$wpabspath);
69
- $wpabspath=$cleanpath;
 
 
 
 
 
70
  }
71
- if(is_readable($wpabspath. '/wp-config.php')){
72
- include_once($wpabspath.'/wp-config.php');
73
- }elseif(is_readable($wpabspath. '/../wp-config.php')){
74
- include_once($wpabspath.'/../wp-config.php');
75
- }else{
76
- die('wp-config.php not found!');
77
  }
78
- if(!defined('ABSPATH')) die('wp-config.php do not load!');
79
- }
80
- //security check#4: check that user is logged in (can be faked)
81
- $validuser=false;
82
- $current_user = $GLOBALS['current_user'];
83
- //#only logged-in users are allowed to run this script -Helene D.
84
- if(empty($current_user->user_login)) {
85
- $logged_user = wp_get_current_user();
86
- $validuser = (!empty($logged_user->user_login)? true: false);
87
- }else{
88
- $validuser=true;
89
- }
90
- if (!$validuser) wp_die(__("login required!"));
91
-
92
- //security check#5: check hash value
93
- $hashfail = true;
94
- $wassup_options=$GLOBALS['wassup_options'];
95
- if (isset($_GET['whash']) && !empty($wassup_options->whash)){
96
- if ($_GET['whash'] == $wassup_options->whash || $_GET['whash'] == htmlspecialchars($wassup_options->whash,ENT_QUOTES))
97
- $hashfail=false;
98
- }
99
 
100
- //#perform an "action" and display the results, if any
101
- if (!$hashfail) {
102
- $wp_version=$GLOBALS['wp_version'];
103
- $wpdb=$GLOBALS['wpdb'];
104
-
105
- //define WassUp constants
106
- if(!defined('WASSUPVERSION')) wassup_init();
107
- //load wassupOptions class
108
- if (empty($wassup_options)){
109
- if(!class_exists('wassupOptions') && file_exists(WASSUPDIR.'/lib/wassup.class.php')){
110
- if(defined('PHP_VERSION') && version_compare(PHP_VERSION,'5.1','<')) require_once(WASSUPDIR."/lib/compat-lib/wassup.class.php");
111
- else require_once(WASSUPDIR.'/lib/wassup.class.php');
112
- }
113
- $wassup_options = new wassupOptions;
 
 
 
 
 
 
 
 
 
 
114
  }
115
- //#set required variables
116
- $wassup_table = $wassup_options->wassup_table;
117
- $wassup_tmp_table = $wassup_table . "_tmp";
118
- $wdebug_mode=false; //debug set below
119
-
120
- // ### Separate "delete" action for non-html output
121
  // ACTION: DELETE ON THE FLY FROM VISITOR DETAILS VIEW
122
- if ($_GET['action'] == "deleteID") {
123
- if (!empty($_GET['id'])) {
124
- //make sure there is no suspicious chars in id
125
- $wassup_id=$wassup_options->cleanFormText($_GET['id']);
126
- if($wassup_id == $_GET['id']){
127
- if (method_exists($wpdb,'prepare'))
128
- $deleted=$wpdb->query($wpdb->prepare("DELETE FROM $wassup_table WHERE `wassup_id`='%s'", $wassup_id));
129
- else
130
- $deleted=$wpdb->query(sprintf("DELETE FROM $wassup_table WHERE `wassup_id`='%s'",$wassup_id));
131
- if(is_wp_error($deleted)){
132
- $errno=$deleted->get_error_code();
133
- if((int)$errno > 0){
134
- $msg=__("An error occurred during delete","wassup")." id=".$wassup_id."\n<br/>";
135
- $msg.="$errno: ".$deleted->get_error_message()."\n";
 
 
 
 
 
 
 
 
 
 
136
  }
137
- $deleted=0;
138
  }else{
139
- $msg=sprintf(__("%d records deleted!","wassup"),$deleted);
140
- }
141
- if(empty($deleted)) {
142
- die($msg);
143
  }
144
  }else{
145
- die(__("Error: invalid id parameter:".esc_attr($_GET['id'])));
146
  }
147
- } else {
148
- die(__("Error: missing id parameter","wassup"));
149
- }
150
- exit;
151
- } //end if action==deleteID
152
-
153
- // ### Begin actions that have output...
154
- if (!empty($_GET['debug_mode'])) {
155
- $wdebug_mode=true;
156
- $mode_reset=ini_get('display_errors');
157
- if(defined('PHP_VERSION')&& version_compare(PHP_VERSION,5.4,'<'))@error_reporting(E_ALL);
158
- else @error_reporting(E_ALL ^ E_STRICT);
159
- ini_set('display_errors','On');
160
- }
161
- //load wassup core functions
162
- if (!function_exists('stringShortener')) {
163
- if (file_exists(WASSUPDIR .'/lib/main.php')) {
164
- include_once(WASSUPDIR . '/lib/main.php');
165
- } else {
166
- echo '<span style="font-color:red;">Action '.__("ERROR: file not found","wassup").' - main.php</span>';
167
- exit;
168
  }
169
- }
170
- //#perform an action and display output
171
- //force browser to disable caching so action.php works as an ajax request
172
- nocache_headers();
173
- // ACTION: RUN SPY VIEW
174
- if ($_GET['action'] == "spia") {
175
- $rows=0;
176
- $spytype="";
177
- //cannot use 'get_user_option' for spy timestamp...causes query caching causes duplicates (needs SQL_NO_CACHE)
178
- //$wassup_user_settings=get_user_option('_wassup_settings');
179
- //$from_spydate=$wassup_user_settings['utimestamp'];
180
- $from_spydate=wassupDb::get_wassupmeta($current_user->user_login,"_spytimestamp",true);
181
- if(empty($from_spydate) || !is_numeric($from_spydate)) $from_spydate="";
182
- if(!empty($_GET['rows']) && is_numeric($_GET['rows'])) $rows = (int)$_GET['rows'];
183
- if(!empty($_GET['spiatype'])) $spytype=$wassup_options->cleanFormText($_GET['spiatype']);
184
- wassup_spiaView($from_spydate,$rows,$spytype);
185
  exit;
186
  }
 
187
  $vers='?ver='.WASSUPVERSION;
188
- if($wdebug_mode)$vers.='b'.rand(0,9999);
189
  $html_head= '
190
  <!DOCTYPE html>
191
  <html>
192
  <head>
193
- <title>WassUp '.esc_attr($_GET['action']).'</title>
194
  <link rel="stylesheet" href="'.WASSUPURL.'/css/wassup.css'.$vers.'" type="text/css" />
195
  </head>
196
  <body class="wassup-ajax">'."\n";
197
- if($wdebug_mode){
198
- $html_head.="<!-- *WassUp DEBUG On-->\n";
199
- $html_head.="<!-- *normal setting: display_errors=$mode_reset -->\n";
200
- }
201
  $html_foot='
202
  </body>
203
  </html>';
204
- //#retrieve common command-line arguments
205
  $to_date=0;
206
  $from_date=0;
207
- if (isset($_GET['to_date']) && is_numeric($_GET['to_date'])) {
208
- $to_date = (int)$_GET['to_date'];
209
  } else {
210
  $to_date = current_time('timestamp');
211
  }
212
- if (isset($_GET['from_date']) && is_numeric($_GET['from_date'])) {
213
- $from_date = (int)$_GET['from_date'];
214
  } else {
215
  $from_date = ($to_date - 180); //3 minutes
216
  }
217
- //#check that $to_date is a number
218
- if (!is_numeric($to_date)) { //bad date sent
219
- echo '<span style="color:red;">Action '.__("ERROR: bad date","wassup").', '.$to_date.'</span>';
220
- exit;
221
  }
222
- // ACTION: SUMMARY PIE CHART - TODO
223
- if ($_GET['action'] == "piechart") {
224
- // Prepare Pie Chart
225
- $wTot = New WassupItems($table_name,$from_date,$to_date);
226
- $items_pie[] = $wTot->calc_tot("count", $search, "AND spam>0", "DISTINCT");
227
- $items_pie[] = $wTot->calc_tot("count", $search, "AND searchengine!='' AND spam=0", "DISTINCT");
228
- $items_pie[] = $wTot->calc_tot("count", $search, "AND searchengine='' AND referrer NOT LIKE '%".$this->WpUrl."%' AND referrer!='' AND spam=0", "DISTINCT");
229
- $items_pie[] = $wTot->calc_tot("count", $search, "AND searchengine='' AND (referrer LIKE '%".$this->WpUrl."%' OR referrer='') AND spam=0", "DISTINCT");
230
- echo $html_head;?>
231
- <div style="text-align: center"><img src="http://chart.apis.google.com/chart?cht=p3&amp;chco=0000ff&amp;chs=600x300&amp;chl=Spam|Search%20Engine|Referrer|Direct&amp;chd=<?php Gchart_data($items_pie, null, null, null, 'pie'); ?>" /></div><?php
232
- echo $html_foot;
 
 
 
 
 
 
 
233
 
234
  // ACTION: SHOW TOP TEN
235
- } elseif ($_GET['action'] == "topten"|| $_GET['action']=="Topstats") {
236
  $top_limit=0;
237
  $title="";
238
  $res=670;
239
- if(isset($_GET['width']) && is_numeric($_GET['width'])){
240
- $res = (int)$_GET['width'];
 
 
 
241
  }
242
  //show title and print button in popup window
243
- if(!empty($_GET['popup'])){
244
  $res=$wassup_options->wassup_screen_res;
245
  echo '<html>
246
  <head>
247
  <title>'.$title.'</title>
248
- <link rel="stylesheet" id="wassup-style-css" href="'.WASSUPURL.'/css/wassup.css?ver='.WASSUPVERSION.'" type="text/css" media="all" />
249
  <script type="text/javascript">function printstat(){if(typeof(window.print)!="undefined")window.print();}</script>
250
  </head>
251
  <body class="wassup-ajax">
252
  <div id="wassup-wrap" class="topstats topstats-print">'."\n";
253
- if($wdebug_mode){
254
- echo "<!-- *WassUp DEBUG On-->\n";
255
- echo "<!-- *normal setting: display_errors=$mode_reset -->\n";
256
- }
257
  }else{
258
  echo $html_head;
259
  echo '<div id="wassup-wrap" class="topstats">'."\n";
@@ -263,20 +204,8 @@ if (!$hashfail) {
263
  echo '</div><!-- /wassup-wrap -->'."\n";
264
  echo $html_foot;
265
  exit;
266
-
267
- // ACTION: DISPLAY GEOGRAPHIC AND WHOIS DETAILS - TODO
268
- } else {
269
- echo $html_head;
270
- echo '<span style="color:red;">Action.php '.__("ERROR: Missing or unknown parameters","wassup").', action='.esc_attr($_GET["action"]).'</span>';
271
- echo $html_foot;
272
- }
273
- if ($wdebug_mode) {
274
- //$wpdb->print_error(); //debug
275
- ini_set('display_errors',$mode_reset); //turn off debug
276
- }
277
- } else {
278
- echo '<html><head><title>WassUp Action Error</title></head><body>';
279
- echo '<span style="color:red;">Action.php '.__("ERROR: Nothing to do here","wassup").'</span>';
280
- echo '</body></html>';
281
- } //end if !$hashfail
282
  ?>
4
  *
5
  * @package WassUp Real-time Analytics
6
  * @subpackage action.php
 
 
 
 
7
  */
8
+ //-------------------------------------------------
9
+ //# No direct requests for this plugin module
10
+ $wfile=preg_replace('/\\\\/','/',__FILE__); //for windows
11
+ //abort if this is direct uri request for file
12
+ if((!empty($_SERVER['PHP_SELF']) && preg_match('#'.preg_quote($_SERVER['PHP_SELF']).'$#',$wfile)>0) ||
13
+ (!empty($_SERVER['SCRIPT_FILENAME']) && realpath($_SERVER['SCRIPT_FILENAME'])===realpath($wfile))){
14
+ //try track this uri request
15
+ if(!headers_sent()){
16
+ //triggers redirect to 404 error page so Wassup can track this attempt to access itself (original request_uri is lost)
17
+ header('Location: /?p=404page&err=wassup403'.'&wf='.basename($wfile));
18
+ exit;
19
+ }else{
20
+ //'wp_die' may be undefined here
21
+ die('<strong>Sorry. Unable to display requested page.</strong>');
22
+ }
23
+ exit;
24
+ //abort if no WordPress
25
+ }elseif(!defined('ABSPATH') || empty($GLOBALS['wp_version'])){
26
+ //show escaped bad request on exit
27
+ die("Bad Request: ".htmlspecialchars(preg_replace('/(&#0*37;|&amp;#0*37;|&#0*38;#0*37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
29
+ unset($wfile); //to free memory
30
+ //-------------------------------------------------
31
+ /**
32
+ * Wassup ajax action handler function.
33
+ *
34
+ * @since v1.9.1
35
+ * @param string (action type)
36
+ */
37
+ function wassup_action_handler($action=""){
38
+ global $wpdb,$wassup_options,$current_user,$wdebug_mode;
39
+ //check for action request
40
+ if(empty($action) && !empty($_REQUEST['action'])){
41
+ $action=$_REQUEST['action'];
42
  }
43
+ if($action=="wassup_action_handler"){
44
+ $action="";
45
+ if(!empty($_REQUEST['type'])) $action=$_REQUEST['type'];
46
  }
47
+ //check for invalid Wassup action requests
48
+ if(empty($action)){
49
+ if($_REQUEST['action']=="wassup_action_handler"){
50
+ $msg=__("Missing or invalid action parameter!","wassup");
51
+ die($msg);
52
+ }else{
53
+ //return not exit, in case is Wordpress action
54
+ return;
55
+ }
56
  }
57
+ //must have a Wassup referrer
58
+ if(empty($_SERVER['HTTP_REFERER']) || stristr($_SERVER['HTTP_REFERER'],"wassup")===false){
59
+ die(__("Bad request!","wassup"));
 
 
 
60
  }
61
+ //..must be logged in
62
+ if(!is_user_logged_in()) die(__("Login required!","wassup"));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
64
+ // check for valid hash
65
+ if(!isset($_REQUEST['whash'])){
66
+ die(__('Missing or invalid whash parameter!','wassup'));
67
+ }
68
+ $whash=$_REQUEST['whash'];
69
+ $wassup_settings=get_option('wassup_settings');
70
+ if(!empty($wassup_settings['whash']) && ($whash == $wassup_settings['whash'] || $whash == htmlspecialchars($wassup_settings['whash'],ENT_QUOTES))){
71
+ $hashfail=false;
72
+ }else{
73
+ $hashfail=true;
74
+ }
75
+ if($hashfail){
76
+ die(__('invalid hash parameter!','wassup'));
77
+ }
78
+ if(empty($current_user->ID)) $user=wp_get_current_user();
79
+ if(!class_exists('wassupOptions')){
80
+ if(!wassup_init()) die(__("Nothing to do","wassup"));
81
+ }
82
+ if(empty($wassup_options->wassup_table)) $wassup_options=new wassupOptions;
83
+ //#Ajax action / no output (unless error)
84
+ //ACTION: export request
85
+ if($action=="exportSQL"){
86
+ export_wassup();
87
+ exit;
88
  }
 
 
 
 
 
 
89
  // ACTION: DELETE ON THE FLY FROM VISITOR DETAILS VIEW
90
+ if($action=="deleteID"){
91
+ if(!empty($_REQUEST['id'])){
92
+ //id must be simple chars
93
+ $wassup_id=$wassup_options->cleanFormText($_REQUEST['id']);
94
+ $wassup_table=$wassup_options->wassup_table;
95
+ if($wassup_id==$_REQUEST['id'] && !empty($wassup_table)){
96
+ //only administrators can delete
97
+ if(current_user_can('manage_options') && !empty($_REQUEST['_wpnonce']) && wp_verify_nonce($_REQUEST['_wpnonce'],'wassupdeleteID-'.$current_user->ID)){
98
+ $deleted=$wpdb->query(sprintf("DELETE FROM `$wassup_table` WHERE `wassup_id`='%s'",$wassup_id));
99
+ if(!is_numeric($deleted)){
100
+ $msg=__("An error occurred during delete of","wassup")." id=".$wassup_id." ";
101
+ if(!empty($deleted) && is_wp_error($deleted)){
102
+ $errno=$deleted->get_error_code();
103
+ if((int)$errno > 0) $msg.="<br/> $errno: ".$deleted->get_error_message()."\n";
104
+ }else{
105
+ $msg .='<br/> '.__("Error","wassup").':'.esc_attr($deleted);
106
+ }
107
+ $deleted=0;
108
+ }else{
109
+ $msg=sprintf(__("%d records deleted!","wassup"),$deleted);
110
+ }
111
+ if($deleted==0){
112
+ if(!empty($atype)) return $msg;
113
+ else echo $msg;
114
  }
 
115
  }else{
116
+ die(__("Error","wassup").": admin login required!");
 
 
 
117
  }
118
  }else{
119
+ die(__("Error","wassup").": invalid parameter: ".esc_attr($_REQUEST['id']));
120
  }
121
+ }else{
122
+ die(__("Error","wassup").": missing id parameter");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  exit;
125
  }
126
+ //#Ajax action with html output
127
  $vers='?ver='.WASSUPVERSION;
128
+ if($wdebug_mode) $vers.='b'.rand(0,9999);
129
  $html_head= '
130
  <!DOCTYPE html>
131
  <html>
132
  <head>
133
+ <title>WassUp '.esc_attr($action).'</title>
134
  <link rel="stylesheet" href="'.WASSUPURL.'/css/wassup.css'.$vers.'" type="text/css" />
135
  </head>
136
  <body class="wassup-ajax">'."\n";
 
 
 
 
137
  $html_foot='
138
  </body>
139
  </html>';
140
+ //#retrieve common query arguments
141
  $to_date=0;
142
  $from_date=0;
143
+ if (isset($_REQUEST['to_date']) && is_numeric($_REQUEST['to_date'])) {
144
+ $to_date = (int)$_REQUEST['to_date'];
145
  } else {
146
  $to_date = current_time('timestamp');
147
  }
148
+ if (isset($_REQUEST['from_date']) && is_numeric($_REQUEST['from_date'])) {
149
+ $from_date = (int)$_REQUEST['from_date'];
150
  } else {
151
  $from_date = ($to_date - 180); //3 minutes
152
  }
153
+ //#check that date range is valid
154
+ if ($to_date < $from_date || $from_date < strtotime("Jan 1,2005") || $to_date > time()+86400) { //bad date sent
155
+ die(__("ERROR: bad date parameter","wassup"));
 
156
  }
157
+ // ACTION: RUN SPY VIEW
158
+ if($action == "Spia"){
159
+ $rows=0;
160
+ $spytype="";
161
+ //cannot use 'get_user_option' for spy timestamp...query caching causes duplicates (needs SQL_NO_CACHE)
162
+ //$wassup_user_settings=get_user_option('_wassup_settings');
163
+ //$from_spydate=$wassup_user_settings['utimestamp'];
164
+ $from_spydate=wassupDb::get_wassupmeta($current_user->user_login,"_spytimestamp",true);
165
+ if(empty($from_spydate) || !is_numeric($from_spydate)) $from_spydate="";
166
+ if(!empty($_REQUEST['rows']) && is_numeric($_REQUEST['rows'])) $rows = (int)$_REQUEST['rows'];
167
+ if(!empty($_REQUEST['spiatype'])) $spytype=$wassup_options->cleanFormText($_REQUEST['spiatype']);
168
+ if(!function_exists('wassup_spiaView')){
169
+ require_once(WASSUPDIR . "/lib/main.php");
170
+ }
171
+ //force browser to disable caching for ajax request
172
+ nocache_headers();
173
+ wassup_spiaView($from_spydate,$rows,$spytype);
174
+ exit;
175
 
176
  // ACTION: SHOW TOP TEN
177
+ } elseif ($action=="Topstats") {
178
  $top_limit=0;
179
  $title="";
180
  $res=670;
181
+ if(isset($_REQUEST['width']) && is_numeric($_REQUEST['width'])){
182
+ $res = (int)$_REQUEST['width'];
183
+ }
184
+ if(!function_exists('wassup_top10view')){
185
+ require_once(WASSUPDIR . "/lib/main.php");
186
  }
187
  //show title and print button in popup window
188
+ if(!empty($_REQUEST['popup'])){
189
  $res=$wassup_options->wassup_screen_res;
190
  echo '<html>
191
  <head>
192
  <title>'.$title.'</title>
193
+ <link rel="stylesheet" id="wassup-style-css" href="'.WASSUPURL.'/css/wassup.css?ver='.$vers.'" type="text/css" media="all" />
194
  <script type="text/javascript">function printstat(){if(typeof(window.print)!="undefined")window.print();}</script>
195
  </head>
196
  <body class="wassup-ajax">
197
  <div id="wassup-wrap" class="topstats topstats-print">'."\n";
 
 
 
 
198
  }else{
199
  echo $html_head;
200
  echo '<div id="wassup-wrap" class="topstats">'."\n";
204
  echo '</div><!-- /wassup-wrap -->'."\n";
205
  echo $html_foot;
206
  exit;
207
+ }else{
208
+ die(__("Error: Nothing to do!","wassup"));
209
+ } //end if action
210
+ } //end wassup_action_handler
 
 
 
 
 
 
 
 
 
 
 
 
211
  ?>
lib/admin.class.php DELETED
@@ -1,215 +0,0 @@
1
- <?php
2
- /**
3
- * Defines admin dashboard widget and chart
4
- *
5
- * @package WassUp Real-time Analytics
6
- * @subpackage admin.class.php module
7
- * @since: v1.9
8
- * @author: Helene D. <http://helenesit.com>
9
- */
10
- //no direct request for this plugin module
11
- $wfile=preg_replace('/\\\\/','/',__FILE__); //for windows
12
- if(!defined('ABSPATH')|| empty($GLOBALS['wp_version'])|| preg_match('#'.preg_quote(basename($wfile)).'#',$_SERVER['PHP_SELF'])|| !empty($_SERVER['SCRIPT_FILENAME'])&& realpath($wfile)===realpath($_SERVER['SCRIPT_FILENAME'])){
13
- if(!headers_sent()){header('Location: /?p=404page&err=wassup403');exit;
14
- }elseif(function_exists('wp_die')){wp_die("Bad Request: ".esc_attr(wp_kses(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI']),array())));exit;
15
- }else{die("Bad Request: ".htmlspecialchars(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));exit;}
16
- exit;
17
- }
18
- unset($wfile);
19
-
20
- if (!class_exists('wassup_Dashboard_Widgets')){
21
- /**
22
- * Static class container for WassUp dashboard widgets functions
23
- * @since v1.9
24
- * @author Helene D. - 2014-11-05
25
- */
26
- class wassup_Dashboard_Widgets{
27
- //Private constructor for true static class - prevents direct creation of object
28
- private function __construct(){}
29
-
30
- static function init(){
31
- global $wp_version,$wassup_options;
32
- $dashwidget_access=$wassup_options->get_access_capability();
33
- if(!empty($dashwidget_access)&& current_user_can($dashwidget_access)){
34
- //load Wassup modules as needed
35
- if(!class_exists('WassupItems')) require_once(WASSUPDIR."/lib/main.php");
36
- if(version_compare($wp_version,'2.7','<')){
37
- add_action('activity_box_end',array(__CLASS__,'dash_chart'));
38
- }else{
39
- add_action('admin_head',array(__CLASS__,'add_dash_css'),20);
40
- if(is_network_admin()){
41
- wp_add_dashboard_widget('wassup-dashwidget1','Visitors Summary',array(__CLASS__,'dash_widget1'));
42
- }else{
43
- add_meta_box('wassup-dashwidget1','Visitors Summary',array(__CLASS__,'dash_widget1'),'dashboard','side','high');
44
- }
45
- }
46
- }
47
- }
48
- static function remove_dash_widget($widgetid="wassup-dashwidget1"){
49
- remove_meta_box($widgetid,'dashboard','side');
50
- }
51
- static function add_dash_css(){
52
- global $wdebug_mode;
53
-
54
- $vers=WASSUPVERSION;
55
- if($wdebug_mode)$vers.='b'.rand(0,9999);
56
- echo "\n";?>
57
- <link rel="stylesheet" href="<?php echo WASSUPURL.'/css/wassup.css?ver='.$vers;?>" type="text/css" /><?php
58
- }
59
- /**
60
- * print a chart in the dashboard for WP < 2.7
61
- */
62
- static function dash_chart(){
63
- global $wpdb,$wassup_options;
64
- $wassup_table=$wassup_options->wassup_table;
65
- $wassupfolder=plugin_basename(WASSUPDIR);
66
- $chart_type = ($wassup_options->wassup_chart_type >0)? $wassup_options->wassup_chart_type: "2";
67
- $to_date = current_time("timestamp");
68
- $ctime = 1;
69
- $date_from = $to_date - (int)(($ctime*24)*3600);
70
- $whereis="";
71
- $Chart = New WassupItems($wassup_table,$date_from,$to_date,$whereis);
72
- $chart_url="";
73
- if($Chart->totrecords >1){
74
- $chart_url = $Chart->TheChart($ctime,"400","125","",$chart_type,"bg,s,efebef|c,lg,90,edffff,0,efebef,0.8","dashboard");
75
- }?>
76
- <h3>WassUp <?php _e('Stats','wassup'); ?> <cite><a href="admin.php?page=<?php echo $wassupfolder; ?>"><?php _e('More','wassup'); ?> &raquo;</a></cite></h3>
77
- <div id="wassup-dashchart" class="placeholder" align="center">
78
- <img src="<?php echo $chart_url; ?>" alt="WassUp <?php _e('visitor stats chart','wassup'); ?>"/>
79
- </div>
80
- <?php
81
- } //end dash_chart
82
-
83
- /**
84
- * Output WassUp main dashboard widget
85
- */
86
- static function dash_widget1(){
87
- global $wpdb,$wp_version,$wassup_options,$wdebug_mode;
88
-
89
- $wassup_table=$wassup_options->wassup_table;
90
- $wassup_tmp_table=$wassup_table."_tmp";
91
- $chart_type=($wassup_options->wassup_chart_type >0)?$wassup_options->wassup_chart_type:"2";
92
- $res=((int)$wassup_options->wassup_screen_res-160)/2;
93
- $to_date=current_time("timestamp");
94
- $ctime=1;
95
- $date_from=$to_date - (int)(($ctime*24)*3600);
96
- $whereis="";
97
- if(is_multisite() && $wassup_options->network_activated_plugin()){
98
- if(!is_network_admin() && !empty($GLOBALS['current_blog']->blog_id)) $whereis .=sprintf(" AND `subsite_id`=%d",(int)$GLOBALS['current_blog']->blog_id);
99
- }
100
- $Chart=New WassupItems($wassup_table,$date_from,$to_date,$whereis);
101
- $chart_url="";
102
- if($Chart->totrecords >1){
103
- $chart_url=$Chart->TheChart($ctime,$res,"180","",$chart_type,"bg,s,f3f5f5|c,lg,90,edffff,0,f3f5f5,0.8","dashboard");
104
- }
105
- $max_char_len=40;
106
- echo "\n";?>
107
- <div class="wassup-dashbox"<?php
108
- if(version_compare($wp_version,"3.5","<")) echo ' style="margin:-10px;"';
109
- elseif(version_compare($wp_version,"3.8","<")) echo ' style="margin:-10px -12px -10px -10px;"';?>>
110
- <cite><a href="<?php echo admin_url('index.php?page=wassup-stats');?>"><?php _e('More Stats','wassup');?> &raquo;</a></cite><?php
111
- echo "\n";
112
- //Show chart...
113
- if(!empty($chart_url)){?>
114
- <div class="wassup-dashitem no-bottom-border">
115
- <p id="wassup-dashchart" class="placeholder" align="center" style="margin:0 auto;padding:0;"><img src="<?php echo$chart_url.'" alt="[img: WassUp '.__('visitor stats chart','wassup').']';?>"/></p>
116
- </div><?php
117
- echo "\n";
118
- }
119
- //Show online count...
120
- $currenttot=0;
121
- if(!empty($wassup_options->wassup_active)){
122
- //New in v1.9: variable timeframes for online counts: spiders for 1 min, regular visitors for 3 minutes, logged-in users for 10 minutes
123
- $to_date=current_time('timestamp');
124
- $from_date=$to_date - 10*60; //-10 minutes
125
- $sql=sprintf("SELECT wassup_id, max(timestamp) as max_timestamp, `ip`, urlrequested, `referrer`, searchengine, spider, `username`, comment_author, language, spam FROM $wassup_tmp_table WHERE `timestamp`>'%d' AND (`username`!='' OR `timestamp`>'%d' OR (`timestamp`>'%d' AND `spider`='')) %s GROUP BY wassup_id ORDER BY max_timestamp DESC",$from_date,$to_date - 1*60,$to_date - 3*60,$whereis);
126
- $qryC=$wpdb->get_results($sql);
127
- if(!empty($qryC)){
128
- if(is_array($qryC)) $currenttot=count($qryC);
129
- elseif(is_wp_error($qryC)) $error_msg=" error# ".$qryC->get_error_code().": ".$qryC->get_error_message()."\nSQL=".esc_attr($sql)."\n";
130
- }
131
- if($wdebug_mode){
132
- echo "\n<!-- ";
133
- if(!empty($error_msg)){
134
- echo "wassup_Dashboard_Widgets ERROR: ".$error_msg;
135
- }elseif($currenttot >0){
136
- echo "&nbsp; &nbsp; qryC=";
137
- print_r($qryC);
138
- }
139
- echo "\n-->";
140
- }
141
- }
142
- if($currenttot > 0){ ?>
143
- <div class="wassup-dashitem no-top-border">
144
- <h5><?php echo '<strong>'.$currenttot."</strong>".__("Visitors online","wassup");?></h5><?php
145
- echo "\n";?>
146
- </div>
147
- <div class="wassup-dashitem"><?php
148
- $Ousername=array();
149
- $Ocomment_author=array();
150
- $prev_url="";
151
- $prev_wassupid="";
152
- $char_len=$max_char_len;
153
- $siteurl=wassupURI::get_sitehome();
154
- $wpurl=wassupURI::get_wphome();
155
- foreach($qryC as $cv){
156
- //don't show duplicates
157
- if(($cv->urlrequested!=$prev_url || $cv->wassup_id!=$prev_wassupid)){
158
- $prev_url=$cv->urlrequested;
159
- $prev_wassupid=$cv->wassup_id;
160
- if ($wassup_options->wassup_time_format == 24) $timed = gmdate("H:i:s", $cv->max_timestamp);
161
- else $timed = gmdate("h:i:s a", $cv->max_timestamp);
162
- $ip=wassup_clientIP($cv->ip);
163
- $referrer="";
164
- if($cv->referrer !='' && stristr($cv->referrer,$wpurl)!=$cv->referrer && stristr($cv->referrer,$siteurl)!=$cv->referrer){
165
- if ($cv->searchengine !="")$referrer=wassupURI::se_link($cv->referrer,$char_len,$cv->spam);
166
- else $referrer=wassupURI::referrer_link($cv->referrer,$cv->urlrequested,$char_len,$cv->spam);
167
- }
168
- $requrl=wassupURI::url_link($cv->urlrequested,$char_len,$cv->spam);
169
- if($cv->username!="" || $cv->comment_author!=""){
170
- if($cv->username!=""){
171
- $Ousername[]=esc_attr($cv->username);
172
- if(!empty($cv->comment_author))$Ocomment_author[]=esc_attr($cv->comment_author);
173
- }elseif($cv->comment_author!=""){
174
- $Ocomment_author[]=esc_attr($cv->comment_author);
175
- }
176
- }
177
- //don't show admin requests to users
178
- if(preg_match('#\/wp\-(admin|includes|content)\/#',$cv->urlrequested)==0 || current_user_can('manage_options')){
179
- echo "\n";?>
180
- <p><strong><?php echo esc_attr($timed);?></strong> &middot; <?php echo esc_attr($ip); ?> &rarr; <?php echo $requrl;
181
- if(!empty($referrer)) echo '<br />'.__("Referrer","wassup").': <span class="widgetref">'.$referrer.'</span>';?></p><?php
182
- }
183
- } //end if cv->urlrequested
184
- } //end foreach qryC
185
- echo "\n";?>
186
- </div><?php
187
- if(count($Ousername)>0){
188
- natcasesort($Ousername);
189
- echo "\n";?>
190
- <div class="wassup-dashitem<?php if(count($Ocomment_author)==0)echo ' no-bottom-border';?>"><p><?php
191
- echo __('Registered users','wassup').': <span class="loggedin">'.implode('</span> &middot; <span class="loggedin">',array_unique($Ousername)).'</span>';?></p></div><?php
192
- }
193
- if(count($Ocomment_author)>0){
194
- natcasesort($Ocomment_author);
195
- echo "\n";?>
196
- <div class="wassup-dashitem no-bottom-border"><p><?php
197
- echo __('Comment authors','wassup').': <span class="commentaut">'.implode('</span> &middot; <span class="commentaut">',$Ocomment_author).'</span>';?></p></div><?php
198
- }
199
- }elseif(!empty($wassup_options->wassup_active)){ ?>
200
- <div class="wassup-dashitem no-top-border no-bottom-border">
201
- <h5><strong>1</strong> <?php _e("Visitor online","wassup");?></h5>
202
- </div><?php
203
-
204
- }else{ ?>
205
- <div class="wassup-dashitem no-top-border no-bottom-border">
206
- <p><?php echo "&nbsp; ".__("No online data!","wassup");?></p>
207
- </div><?php
208
- } //end if currentot>0
209
- echo "\n";?>
210
- <div class="wassup-dashitem no-top-border no-bottom-border"><span class="wassup-marque"><?php echo __("powered by","wassup").' <a href="http://www.wpwp.org/" title="WassUp - '.__("Real Time Visitors Tracking","wassup").'">WassUp</a>';?></span></div>
211
- </div><!-- /wassup-dashbox --><?php
212
- $wdebug_mode=false; //turn off debug after display of widget due to ajax conflict.
213
- } //end dash_widget1
214
- } //end Class wassup_Dashboard_Widgets
215
- } //end if class_exists
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/akismet.class.php CHANGED
@@ -1,20 +1,34 @@
1
  <?php
2
  /**
3
- * For Akismet spam check on wassup visitor records
4
  *
5
  * @package WassUp Real-time Analytics
6
  * @subpackage akismet.class.php module
7
  */
8
- //no direct request for this plugin module
 
9
  $wfile=preg_replace('/\\\\/','/',__FILE__); //for windows
10
- if(!defined('ABSPATH')|| empty($GLOBALS['wp_version'])|| preg_match('#'.preg_quote(basename($wfile)).'#',$_SERVER['PHP_SELF'])|| !empty($_SERVER['SCRIPT_FILENAME'])&& realpath($wfile)===realpath($_SERVER['SCRIPT_FILENAME'])){
11
- if(!headers_sent()){header('Location: /?p=404page&err=wassup403');exit;
12
- }elseif(function_exists('wp_die')){wp_die("Bad Request: ".esc_attr(wp_kses(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI']),array())));exit;
13
- }else{die("Bad Request: ".htmlspecialchars(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));exit;}
 
 
 
 
 
 
 
 
14
  exit;
 
 
 
 
15
  }
16
  unset($wfile);
17
- //New in Wassup v1.9: Classes and constants renamed for compatibility with Akismet v3.0.0 -Helene D. 2014-05-01
 
18
  /**
19
  * 08.11.2010 22:25:17est
20
  *
@@ -53,33 +67,23 @@ define("WASSUP_AKISMET_SERVER_NOT_FOUND", 0);
53
  define("WASSUP_AKISMET_RESPONSE_FAILED", 1);
54
  define("WASSUP_AKISMET_INVALID_KEY", 2);
55
 
56
- // Base class to assist in error handling between Akismet classes
57
  class wassup_AkismetObject {
58
  var $errors = array();
59
-
60
- // Set an error in the object
61
  function setError($name,$message){$this->errors[$name]=$message;}
62
  function getError($name){
63
  if($this->isError($name)){return $this->errors[$name];}
64
  else {return false;}
65
  }
66
-
67
- //Return all errors in the object
68
  function getErrors(){return (array)$this->errors;}
69
-
70
- // Check if a certain error exists
71
  function isError($name){return isset($this->errors[$name]);}
72
-
73
- // Check if any errors exist
74
  function errorsExist(){return (count($this->errors)>0);}
75
-
76
- //New in Wassup v1.9: Remove timeout error
77
  function removeError($name,$message){
78
  if(!empty($this->errors[$name])&& $this->errors[$name]==$message)unset($this->errors[$name]);
79
  }
80
  }
81
-
82
- // Used by the wassup_Akismet class to communicate with the Akismet service
83
  class wassup_AkismetHttpClient extends wassup_AkismetObject {
84
  var $akismetVersion='1.1';
85
  var $con;
@@ -89,15 +93,14 @@ class wassup_AkismetHttpClient extends wassup_AkismetObject {
89
  var $blogUrl;
90
  var $errors=array();
91
 
92
- // Constructor
93
  function wassup_AkismetHttpClient($host,$blogUrl,$apiKey,$port=80){
94
  $this->host=$host;
95
  $this->port=$port;
96
  $this->blogUrl=$blogUrl;
97
  $this->apiKey=$apiKey;
98
  }
99
-
100
- // Use the connection active in $con to get a response from the server and return that response
101
  function getResponse($request,$path,$type="post",$responseLength=1160){
102
  $this->_connect();
103
  if($this->con && !$this->isError(WASSUP_AKISMET_SERVER_NOT_FOUND)){
@@ -109,29 +112,41 @@ class wassup_AkismetHttpClient extends wassup_AkismetObject {
109
  "\r\n".$request;
110
  $response="";
111
  @fwrite($this->con,$request);
112
- while(!feof($this->con)){
 
 
 
113
  $response .= @fgets($this->con,$responseLength);
 
 
 
 
 
 
 
 
 
 
114
  }
115
- $response=explode("\r\n\r\n",$response,2);
116
- return $response[1];
117
  }else{
118
  $this->setError(WASSUP_AKISMET_RESPONSE_FAILED, __("The response could not be retrieved.","wassup"));
119
  }
120
  $this->_disconnect();
121
  }
122
-
123
- // Connect to the Akismet server and store that connection in the instance variable $con
124
  function _connect(){
125
  if(!($this->con=@fsockopen($this->host,$this->port))){
126
- $this->setError(WASSUP_AKISMET_SERVER_NOT_FOUND,__("Could not connect to akismet server.","wassup"));
127
  }
128
  }
129
-
130
- // Close the connection to the Akismet server
131
  function _disconnect(){@fclose($this->con);}
132
  } //end Class
133
 
134
- // The controlling class. This is the ONLY class the user should instantiate in order to use the Akismet service!
 
 
 
135
  class wassup_Akismet extends wassup_AkismetObject {
136
  var $apiPort=80;
137
  var $akismetServer='rest.akismet.com';
@@ -168,49 +183,31 @@ class wassup_Akismet extends wassup_AkismetObject {
168
  $this->blogUrl=$blogUrl;
169
  $this->apiKey =$apiKey;
170
  $this->setComment($comment);
171
-
172
  // Connect to the Akismet server and populate errors if they exist
173
  $this->http=new wassup_AkismetHttpClient($this->akismetServer,$blogUrl,$apiKey);
174
  if($this->http->errorsExist()) {
175
  $this->errors = array_merge($this->errors, $this->http->getErrors());
176
  }
177
-
178
  // Check if the API key is valid
179
  if(!$this->_isValidApiKey($apiKey)){
180
  $this->setError(WASSUP_AKISMET_INVALID_KEY,__("Your Akismet API key is not valid.","wassup"));
181
  }
182
  }
183
-
184
- //Query the Akismet and determine if the comment is spam or not
185
  function isSpam() {
186
- //New in Wassup v1.9: shorten script timeout to prevent slowdowns due to slow server response
187
- //lets not wait for slow server response //TODO - test
188
- $stimeout=0;
189
- if(!ini_get('safe_mode')){
190
- $stimeout=ini_get("max_execution_time");
191
- //set error in case of timeout
192
- $this->setError(WASSUP_AKISMET_RESPONSE_FAILED,__("Timed out waiting for server response.","wassup"));
193
- if((int)$stimeout>7)set_time_limit(7);
194
- }
195
- $response=$this->http->getResponse($this->_getQueryString(),'comment-check');
196
- if(!empty($stimeout)){
197
- set_time_limit($stimeout);
198
- $this->removeError(WASSUP_AKISMET_RESPONSE_FAILED,__("Timed out waiting for server response.","wassup"));
199
- }
200
  return ($response=="true");
201
  }
202
-
203
- // Submit this comment as an unchecked spam to the Akismet server
204
  function submitSpam(){
205
  $this->http->getResponse($this->_getQueryString(),'submit-spam');
206
  }
207
-
208
- // Submit a false-positive comment as "ham" to the Akismet server
209
  function submitHam(){
210
  $this->http->getResponse($this->_getQueryString(),'submit-ham');
211
  }
212
-
213
- // Manually set the comment value of the instantiated object.
214
  function setComment($comment){
215
  $this->comment = $comment;
216
  if(!empty($comment)){
@@ -218,17 +215,14 @@ class wassup_Akismet extends wassup_AkismetObject {
218
  $this->_fillCommentValues();
219
  }
220
  }
221
-
222
- // Returns the current value of the object's comment array.
223
  function getComment(){return $this->comment;}
224
-
225
- // Check with the Akismet server to determine if the API key is valid
226
  function _isValidApiKey($key){
227
  $keyCheck=$this->http->getResponse("key=".$this->apiKey."&blog=".$this->blogUrl,'verify-key');
228
  return ($keyCheck=="valid");
229
  }
230
-
231
- // Format the comment array in accordance to the Akismet API
232
  function _formatCommentArray(){
233
  $format=array( 'type' =>'comment_type',
234
  'author'=>'comment_author',
@@ -242,8 +236,7 @@ class wassup_Akismet extends wassup_AkismetObject {
242
  }
243
  }
244
  }
245
-
246
- // Fill any values not provided by the developer with available values.
247
  function _fillCommentValues(){
248
  if(!isset($this->comment['user_ip'])){
249
  $this->comment['user_ip']=($_SERVER['REMOTE_ADDR']!=getenv('SERVER_ADDR')) ?$_SERVER['REMOTE_ADDR'] :getenv('HTTP_X_FORWARDED_FOR');
@@ -258,8 +251,7 @@ class wassup_Akismet extends wassup_AkismetObject {
258
  $this->comment['blog']=$this->blogUrl;
259
  }
260
  }
261
-
262
- // Build a query string for use with HTTP requests
263
  function _getQueryString(){
264
  foreach($_SERVER as $key=>$value){
265
  if(!in_array($key,$this->ignore)){
1
  <?php
2
  /**
3
+ * For Akismet spam check on Wassup visitor records.
4
  *
5
  * @package WassUp Real-time Analytics
6
  * @subpackage akismet.class.php module
7
  */
8
+ //-------------------------------------------------
9
+ //# No direct requests for this plugin module
10
  $wfile=preg_replace('/\\\\/','/',__FILE__); //for windows
11
+ //abort if this is direct uri request for file
12
+ if((!empty($_SERVER['PHP_SELF']) && preg_match('#'.preg_quote($_SERVER['PHP_SELF']).'$#',$wfile)>0) ||
13
+ (!empty($_SERVER['SCRIPT_FILENAME']) && realpath($_SERVER['SCRIPT_FILENAME'])===realpath($wfile))){
14
+ //try track this uri request
15
+ if(!headers_sent()){
16
+ //triggers redirect to 404 error page so Wassup can track this attempt to access itself (original request_uri is lost)
17
+ header('Location: /?p=404page&err=wassup403'.'&wf='.basename($wfile));
18
+ exit;
19
+ }else{
20
+ //'wp_die' may be undefined here
21
+ die('<strong>Sorry. Unable to display requested page.</strong>');
22
+ }
23
  exit;
24
+ //abort if no WordPress
25
+ }elseif(!defined('ABSPATH') || empty($GLOBALS['wp_version'])){
26
+ //show escaped bad request on exit
27
+ die("Bad Request: ".htmlspecialchars(preg_replace('/(&#0*37;|&amp;#0*37;|&#0*38;#0*37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));
28
  }
29
  unset($wfile);
30
+ //-------------------------------------------------
31
+ //Classes and constants renamed for compatibility with Akismet v3.0 -Helene D. @since v1.9
32
  /**
33
  * 08.11.2010 22:25:17est
34
  *
67
  define("WASSUP_AKISMET_RESPONSE_FAILED", 1);
68
  define("WASSUP_AKISMET_INVALID_KEY", 2);
69
 
70
+ /** Base class to assist in error handling between Akismet classes */
71
  class wassup_AkismetObject {
72
  var $errors = array();
 
 
73
  function setError($name,$message){$this->errors[$name]=$message;}
74
  function getError($name){
75
  if($this->isError($name)){return $this->errors[$name];}
76
  else {return false;}
77
  }
 
 
78
  function getErrors(){return (array)$this->errors;}
 
 
79
  function isError($name){return isset($this->errors[$name]);}
 
 
80
  function errorsExist(){return (count($this->errors)>0);}
81
+ //remove timeout error @since v1.9
 
82
  function removeError($name,$message){
83
  if(!empty($this->errors[$name])&& $this->errors[$name]==$message)unset($this->errors[$name]);
84
  }
85
  }
86
+ /** Class to communicate with Akismet service */
 
87
  class wassup_AkismetHttpClient extends wassup_AkismetObject {
88
  var $akismetVersion='1.1';
89
  var $con;
93
  var $blogUrl;
94
  var $errors=array();
95
 
96
+ /** Constructor */
97
  function wassup_AkismetHttpClient($host,$blogUrl,$apiKey,$port=80){
98
  $this->host=$host;
99
  $this->port=$port;
100
  $this->blogUrl=$blogUrl;
101
  $this->apiKey=$apiKey;
102
  }
103
+ /** Use the connection active in $con to get a response from the server and return that response */
 
104
  function getResponse($request,$path,$type="post",$responseLength=1160){
105
  $this->_connect();
106
  if($this->con && !$this->isError(WASSUP_AKISMET_SERVER_NOT_FOUND)){
112
  "\r\n".$request;
113
  $response="";
114
  @fwrite($this->con,$request);
115
+ //new in v1.9.1: don't wait for slow server
116
+ stream_set_timeout($this->con,5);
117
+ $info=stream_get_meta_data($this->con);
118
+ while(!feof($this->con) && !$info['timed_out']){
119
  $response .= @fgets($this->con,$responseLength);
120
+ $info=stream_get_meta_data($this->con); //new in v1.9.1: for timeout checking
121
+ }
122
+ //New in v1.9.1: timeout error message
123
+ if(!empty($response)){
124
+ $response=explode("\r\n\r\n",$response,2);
125
+ return $response[1];
126
+ }elseif($info['timed_out']){
127
+ $this->setError(WASSUP_AKISMET_RESPONSE_FAILED,__("Timed out waiting for server response.","wassup"));
128
+ }else{
129
+ $this->setError(WASSUP_AKISMET_RESPONSE_FAILED, __("The response could not be retrieved.","wassup"));
130
  }
 
 
131
  }else{
132
  $this->setError(WASSUP_AKISMET_RESPONSE_FAILED, __("The response could not be retrieved.","wassup"));
133
  }
134
  $this->_disconnect();
135
  }
136
+ /** Connect to the Akismet server and store that connection in the instance variable $con */
 
137
  function _connect(){
138
  if(!($this->con=@fsockopen($this->host,$this->port))){
139
+ $this->setError(WASSUP_AKISMET_SERVER_NOT_FOUND,__("Could not connect to Akismet server.","wassup"));
140
  }
141
  }
142
+ /** Close the connection to the Akismet server */
 
143
  function _disconnect(){@fclose($this->con);}
144
  } //end Class
145
 
146
+ /**
147
+ * The controlling class.
148
+ * This is the ONLY class the user should instantiate in order to use the Akismet service!
149
+ */
150
  class wassup_Akismet extends wassup_AkismetObject {
151
  var $apiPort=80;
152
  var $akismetServer='rest.akismet.com';
183
  $this->blogUrl=$blogUrl;
184
  $this->apiKey =$apiKey;
185
  $this->setComment($comment);
 
186
  // Connect to the Akismet server and populate errors if they exist
187
  $this->http=new wassup_AkismetHttpClient($this->akismetServer,$blogUrl,$apiKey);
188
  if($this->http->errorsExist()) {
189
  $this->errors = array_merge($this->errors, $this->http->getErrors());
190
  }
 
191
  // Check if the API key is valid
192
  if(!$this->_isValidApiKey($apiKey)){
193
  $this->setError(WASSUP_AKISMET_INVALID_KEY,__("Your Akismet API key is not valid.","wassup"));
194
  }
195
  }
196
+ /** Query Akismet server to check if comment is spam or not */
 
197
  function isSpam() {
198
+ //v1.9.1 bugfix: removed 'set_time_limit' code (since v1.9) because it has no effect on remote requests
199
+ $response=$this->http->getResponse($this->_getQueryString(), 'comment-check');
 
 
 
 
 
 
 
 
 
 
 
 
200
  return ($response=="true");
201
  }
202
+ /** Submit comment as an unchecked spam to Akismet server */
 
203
  function submitSpam(){
204
  $this->http->getResponse($this->_getQueryString(),'submit-spam');
205
  }
206
+ /** Submit a false-positive comment as "ham" to Akismet server */
 
207
  function submitHam(){
208
  $this->http->getResponse($this->_getQueryString(),'submit-ham');
209
  }
210
+ /** Manually set comment value of the instantiated object */
 
211
  function setComment($comment){
212
  $this->comment = $comment;
213
  if(!empty($comment)){
215
  $this->_fillCommentValues();
216
  }
217
  }
218
+ /** Returns the current value of the object's comment array */
 
219
  function getComment(){return $this->comment;}
220
+ /** Confirm valid API key on the Akismet server */
 
221
  function _isValidApiKey($key){
222
  $keyCheck=$this->http->getResponse("key=".$this->apiKey."&blog=".$this->blogUrl,'verify-key');
223
  return ($keyCheck=="valid");
224
  }
225
+ /** Format the comment array to match the Akismet API */
 
226
  function _formatCommentArray(){
227
  $format=array( 'type' =>'comment_type',
228
  'author'=>'comment_author',
236
  }
237
  }
238
  }
239
+ /** Fill comment array field values when possible */
 
240
  function _fillCommentValues(){
241
  if(!isset($this->comment['user_ip'])){
242
  $this->comment['user_ip']=($_SERVER['REMOTE_ADDR']!=getenv('SERVER_ADDR')) ?$_SERVER['REMOTE_ADDR'] :getenv('HTTP_X_FORWARDED_FOR');
251
  $this->comment['blog']=$this->blogUrl;
252
  }
253
  }
254
+ /** Build a query string for use with HTTP requests */
 
255
  function _getQueryString(){
256
  foreach($_SERVER as $key=>$value){
257
  if(!in_array($key,$this->ignore)){
lib/compat-lib/admin.class.php DELETED
@@ -1,212 +0,0 @@
1
- <?php
2
- /**
3
- * Defines admin dashboard widget and chart...with PHP4/backward compatible code
4
- *
5
- * @package WassUp Real-time Analytics
6
- * @subpackage compat/admin.class.php module
7
- * @since: v1.9
8
- * @author: Helene D. <http://helenesit.com>
9
- */
10
- //no direct request for this plugin module
11
- $wfile=preg_replace('/\\\\/','/',__FILE__); //for windows
12
- if(!defined('ABSPATH')|| empty($GLOBALS['wp_version'])|| preg_match('#'.preg_quote(basename($wfile)).'#',$_SERVER['PHP_SELF'])|| !empty($_SERVER['SCRIPT_FILENAME'])&& realpath($wfile)===realpath($_SERVER['SCRIPT_FILENAME'])){
13
- if(!headers_sent()){header('Location: /?p=404page&err=wassup403');exit;
14
- }elseif(function_exists('wp_die')){wp_die("Bad Request: ".esc_attr(wp_kses(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI']),array())));exit;
15
- }else{die("Bad Request: ".htmlspecialchars(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));exit;}
16
- exit;
17
- }
18
- unset($wfile);
19
-
20
- if (!class_exists('wassup_Dashboard_Widgets')){
21
- /**
22
- * Static class container for WassUp dashboard widgets functions
23
- * @since v1.9
24
- * @author Helene D. - 2014-11-05
25
- */
26
- class wassup_Dashboard_Widgets{
27
- function init(){
28
- global $wp_version,$wassup_options;
29
- $dashwidget_access=$wassup_options->get_access_capability();
30
- if(!empty($dashwidget_access)&& current_user_can($dashwidget_access)){
31
- //load Wassup modules as needed
32
- if(!class_exists('WassupItems')) require_once(WASSUPDIR."/lib/main.php");
33
- if(version_compare($wp_version,'2.7','<')){
34
- add_action('activity_box_end',array(__CLASS__,'dash_chart'));
35
- }else{
36
- add_action('admin_head',array(__CLASS__,'add_dash_css'),20);
37
- if(is_network_admin()){
38
- wp_add_dashboard_widget('wassup-dashwidget1','Visitors Summary',array(__CLASS__,'dash_widget1'));
39
- }else{
40
- add_meta_box('wassup-dashwidget1','Visitors Summary',array(__CLASS__,'dash_widget1'),'dashboard','side','high');
41
- }
42
- }
43
- }
44
- }
45
- function remove_dash_widget($widgetid="wassup-dashwidget1"){
46
- remove_meta_box($widgetid,'dashboard','side');
47
- }
48
- function add_dash_css(){
49
- global $wdebug_mode;
50
-
51
- $vers=WASSUPVERSION;
52
- if($wdebug_mode)$vers.='b'.rand(0,9999);
53
- echo "\n";?>
54
- <link rel="stylesheet" href="<?php echo WASSUPURL.'/css/wassup.css?ver='.$vers;?>" type="text/css" /><?php
55
- }
56
- /**
57
- * print a chart in the dashboard for WP < 2.7
58
- */
59
- function dash_chart(){
60
- global $wpdb,$wassup_options;
61
- $wassup_table=$wassup_options->wassup_table;
62
- $wassupfolder=plugin_basename(WASSUPDIR);
63
- $chart_type = ($wassup_options->wassup_chart_type >0)? $wassup_options->wassup_chart_type: "2";
64
- $to_date = current_time("timestamp");
65
- $ctime = 1;
66
- $date_from = $to_date - (int)(($ctime*24)*3600);
67
- $whereis="";
68
- $Chart = New WassupItems($wassup_table,$date_from,$to_date,$whereis);
69
- $chart_url="";
70
- if($Chart->totrecords >1){
71
- $chart_url = $Chart->TheChart($ctime,"400","125","",$chart_type,"bg,s,efebef|c,lg,90,edffff,0,efebef,0.8","dashboard");
72
- }?>
73
- <h3>WassUp <?php _e('Stats','wassup'); ?> <cite><a href="admin.php?page=<?php echo $wassupfolder; ?>"><?php _e('More','wassup'); ?> &raquo;</a></cite></h3>
74
- <div id="wassup-dashchart" class="placeholder" align="center">
75
- <img src="<?php echo $chart_url; ?>" alt="WassUp <?php _e('visitor stats chart','wassup'); ?>"/>
76
- </div>
77
- <?php
78
- } //end dash_chart
79
-
80
- /**
81
- * Output WassUp main dashboard widget
82
- */
83
- function dash_widget1(){
84
- global $wpdb,$wp_version,$wassup_options,$wdebug_mode;
85
-
86
- $wassup_table=$wassup_options->wassup_table;
87
- $wassup_tmp_table=$wassup_table."_tmp";
88
- $chart_type=($wassup_options->wassup_chart_type >0)?$wassup_options->wassup_chart_type:"2";
89
- $res=((int)$wassup_options->wassup_screen_res-160)/2;
90
- $to_date=current_time("timestamp");
91
- $ctime=1;
92
- $date_from=$to_date - (int)(($ctime*24)*3600);
93
- $whereis="";
94
- if(is_multisite() && $wassup_options->network_activated_plugin()){
95
- if(!is_network_admin() && !empty($GLOBALS['current_blog']->blog_id)) $whereis .=sprintf(" AND `subsite_id`=%d",(int)$GLOBALS['current_blog']->blog_id);
96
- }
97
- $Chart=New WassupItems($wassup_table,$date_from,$to_date,$whereis);
98
- $chart_url="";
99
- if($Chart->totrecords >1){
100
- $chart_url=$Chart->TheChart($ctime,$res,"180","",$chart_type,"bg,s,f3f5f5|c,lg,90,edffff,0,f3f5f5,0.8","dashboard");
101
- }
102
- $max_char_len=40;
103
- echo "\n";?>
104
- <div class="wassup-dashbox"<?php
105
- if(version_compare($wp_version,"3.5","<")) echo ' style="margin:-10px;"';
106
- elseif(version_compare($wp_version,"3.8","<")) echo ' style="margin:-10px -12px -10px -10px;"';?>>
107
- <cite><a href="<?php echo admin_url('index.php?page=wassup-stats');?>"><?php _e('More Stats','wassup');?> &raquo;</a></cite><?php
108
- echo "\n";
109
- //Show chart...
110
- if(!empty($chart_url)){?>
111
- <div class="wassup-dashitem no-bottom-border">
112
- <p id="wassup-dashchart" class="placeholder" align="center" style="margin:0 auto;padding:0;"><img src="<?php echo$chart_url.'" alt="[img: WassUp '.__('visitor stats chart','wassup').']';?>"/></p>
113
- </div><?php
114
- echo "\n";
115
- }
116
- //Show online count...
117
- $currenttot=0;
118
- if(!empty($wassup_options->wassup_active)){
119
- //New in v1.9: variable timeframes for online counts: spiders for 1 min, regular visitors for 3 minutes, logged-in users for 10 minutes
120
- $to_date=current_time('timestamp');
121
- $from_date=$to_date - 10*60; //-10 minutes
122
- $sql=sprintf("SELECT wassup_id, max(timestamp) as max_timestamp, `ip`, urlrequested, `referrer`, searchengine, spider, `username`, comment_author, language, spam FROM $wassup_tmp_table WHERE `timestamp`>'%d' AND (`username`!='' OR `timestamp`>'%d' OR (`timestamp`>'%d' AND `spider`='')) %s GROUP BY wassup_id ORDER BY max_timestamp DESC",$from_date,$to_date - 1*60,$to_date - 3*60,$whereis);
123
- $qryC=$wpdb->get_results($sql);
124
- if(!empty($qryC)){
125
- if(is_array($qryC)) $currenttot=count($qryC);
126
- elseif(is_wp_error($qryC)) $error_msg=" error# ".$qryC->get_error_code().": ".$qryC->get_error_message()."\nSQL=".esc_attr($sql)."\n";
127
- }
128
- if($wdebug_mode){
129
- echo "\n<!-- ";
130
- if(!empty($error_msg)){
131
- echo "wassup_Dashboard_Widgets ERROR: ".$error_msg;
132
- }elseif($currenttot >0){
133
- echo "&nbsp; &nbsp; qryC=";
134
- print_r($qryC);
135
- }
136
- echo "\n-->";
137
- }
138
- }
139
- if($currenttot > 0){ ?>
140
- <div class="wassup-dashitem no-top-border">
141
- <h5><?php echo '<strong>'.$currenttot."</strong>".__("Visitors online","wassup");?></h5><?php
142
- echo "\n";?>
143
- </div>
144
- <div class="wassup-dashitem"><?php
145
- $Ousername=array();
146
- $Ocomment_author=array();
147
- $prev_url="";
148
- $prev_wassupid="";
149
- $char_len=$max_char_len;
150
- $siteurl=wassupURI::get_sitehome();
151
- $wpurl=wassupURI::get_wphome();
152
- foreach($qryC as $cv){
153
- //don't show duplicates
154
- if(($cv->urlrequested!=$prev_url || $cv->wassup_id!=$prev_wassupid)){
155
- $prev_url=$cv->urlrequested;
156
- $prev_wassupid=$cv->wassup_id;
157
- if ($wassup_options->wassup_time_format == 24) $timed = gmdate("H:i:s", $cv->max_timestamp);
158
- else $timed = gmdate("h:i:s a", $cv->max_timestamp);
159
- $ip=wassup_clientIP($cv->ip);
160
- $referrer="";
161
- if($cv->referrer !='' && stristr($cv->referrer,$wpurl)!=$cv->referrer && stristr($cv->referrer,$siteurl)!=$cv->referrer){
162
- if ($cv->searchengine !="")$referrer=wassupURI::se_link($cv->referrer,$char_len,$cv->spam);
163
- else $referrer=wassupURI::referrer_link($cv->referrer,$cv->urlrequested,$char_len,$cv->spam);
164
- }
165
- $requrl=wassupURI::url_link($cv->urlrequested,$char_len,$cv->spam);
166
- if($cv->username!="" || $cv->comment_author!=""){
167
- if($cv->username!=""){
168
- $Ousername[]=esc_attr($cv->username);
169
- if(!empty($cv->comment_author))$Ocomment_author[]=esc_attr($cv->comment_author);
170
- }elseif($cv->comment_author!=""){
171
- $Ocomment_author[]=esc_attr($cv->comment_author);
172
- }
173
- }
174
- //don't show admin requests to users
175
- if(preg_match('#\/wp\-(admin|includes|content)\/#',$cv->urlrequested)==0 || current_user_can('manage_options')){
176
- echo "\n";?>
177
- <p><strong><?php echo esc_attr($timed);?></strong> &middot; <?php echo esc_attr($ip); ?> &rarr; <?php echo $requrl;
178
- if(!empty($referrer)) echo '<br />'.__("Referrer","wassup").': <span class="widgetref">'.$referrer.'</span>';?></p><?php
179
- }
180
- } //end if cv->urlrequested
181
- } //end foreach qryC
182
- echo "\n";?>
183
- </div><?php
184
- if(count($Ousername)>0){
185
- natcasesort($Ousername);
186
- echo "\n";?>
187
- <div class="wassup-dashitem<?php if(count($Ocomment_author)==0)echo ' no-bottom-border';?>"><p><?php
188
- echo __('Registered users','wassup').': <span class="loggedin">'.implode('</span> &middot; <span class="loggedin">',array_unique($Ousername)).'</span>';?></p></div><?php
189
- }
190
- if(count($Ocomment_author)>0){
191
- natcasesort($Ocomment_author);
192
- echo "\n";?>
193
- <div class="wassup-dashitem no-bottom-border"><p><?php
194
- echo __('Comment authors','wassup').': <span class="commentaut">'.implode('</span> &middot; <span class="commentaut">',$Ocomment_author).'</span>';?></p></div><?php
195
- }
196
- }elseif(!empty($wassup_options->wassup_active)){ ?>
197
- <div class="wassup-dashitem no-top-border no-bottom-border">
198
- <h5><strong>1</strong> <?php _e("Visitor online","wassup");?></h5>
199
- </div><?php
200
-
201
- }else{ ?>
202
- <div class="wassup-dashitem no-top-border no-bottom-border">
203
- <p><?php echo "&nbsp; ".__("No online data!","wassup");?></p>
204
- </div><?php
205
- } //end if currentot>0
206
- echo "\n";?>
207
- <div class="wassup-dashitem no-top-border no-bottom-border"><span class="wassup-marque"><?php echo __("powered by","wassup").' <a href="http://www.wpwp.org/" title="WassUp - '.__("Real Time Visitors Tracking","wassup").'">WassUp</a>';?></span></div>
208
- </div><!-- /wassup-dashbox --><?php
209
- $wdebug_mode=false; //turn off debug after display of widget due to ajax conflict.
210
- } //end dash_widget1
211
- } //end Class wassup_Dashboard_Widgets
212
- } //end if class_exists
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/compat-lib/compat_functions.php DELETED
@@ -1,149 +0,0 @@
1
- <?php
2
- /**
3
- * Compatibility functions required for Wassup to run in PHP 4.3-5.1 and Wordpress 2.2-3.1
4
- *
5
- * Emulates functions from PHP 5.2+ and Wordpress 2.8+. for backwards compatibility with PHP 4.3-5.1 and Wordpress 2.2-3.1
6
- *
7
- * @package WassUp Real-time Analytics
8
- * @subpackage /lib/compat-lib/compat_functions.php module
9
- * @since: v1.8
10
- * @author: Helene D. <http://helenesit.com>
11
- */
12
- //no direct request for this plugin module
13
- $wfile=preg_replace('/\\\\/','/',__FILE__); //for windows
14
- if(!defined('ABSPATH')|| !isset($GLOBALS['wp_version'])|| preg_match('#'.preg_quote(basename($wfile)).'#',$_SERVER['PHP_SELF'])>0|| !empty($_SERVER['SCRIPT_FILENAME'])&& realpath($wfile)===realpath($_SERVER['SCRIPT_FILENAME'])){
15
- if(!headers_sent()){header('Location: /?p=404page&err=wassup403');exit;
16
- }elseif(function_exists('wp_die')){wp_die("Bad Request: ".esc_attr(wp_kses(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI']),array())));exit;
17
- }else{die("Bad Request: ".htmlspecialchars(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));exit;}
18
- exit;
19
- }
20
- unset($wfile);
21
- //-------------------------------------------------
22
- //define PHP5+ functions used in Wassup
23
- if(!function_exists('json_decode')){ //added in PHP 5.2
24
- function json_decode($json,$to_array=false){
25
- $x=false;
26
- if(!empty($json)&& strpos($json,'{"')!==false){
27
- $out='$x='.str_replace(array('{','":','}'),array('array(','"=>',')'),$json);
28
- eval($out.';');
29
- if(!$to_array)$x=(object)$x;
30
- }
31
- return $x;
32
- }
33
- }
34
- //-------------------------------------------------
35
- //define Wordpress 2.3-2.8 functions used in Wassup
36
- if(!function_exists('wp_safe_redirect')){ //added in Wordpress 2.3
37
- function wp_safe_redirect($location,$status="302"){
38
- wp_redirect($location,$status);
39
- exit;
40
- }
41
- }
42
- if(!function_exists('like_escape')){ //added in Wordpress 2.5
43
- function like_escape($text){ //deprecated in Wordpress 4.0
44
- global $wpdb;
45
- if(method_exists($wpdb,'esc_like'))$escaped_text=$wpdb->esc_like($text);
46
- else $escaped_text=str_replace(array("%","_"),array("\\%","\\_"),trim($text));
47
- return $escaped_text;
48
- }
49
- }
50
- if(!function_exists('get_avatar')){ //added in Wordpress 2.5
51
- function get_avatar($userid=0,$imgsize=18){return "";}
52
- }
53
- if(!function_exists('has_action')){ //added in Wordpress 2.5
54
- function has_filter($tag,$function_to_check=false){
55
- $wp_filter = $GLOBALS['wp_filter'];
56
- $has=false;
57
- if(!empty($wp_filter[$tag])){
58
- foreach ($wp_filter[$tag] as $callbacks){if(!empty($callbacks)){$has=true;break;}}
59
- if ($has && $function_to_check!==false){
60
- $has=false;
61
- if(is_string($function_to_check))$idx=$function_to_check;
62
- elseif(function_exists('_wp_filter_build_unique_id'))$idx = _wp_filter_build_unique_id($tag,$function_to_check,10);
63
- else $idx=false;
64
- if($idx!==false){
65
- foreach((array)array_keys($callbacks) as $priority){if(isset($callbacks[$priority][$idx])){$has=$priority;break;}}
66
- }
67
- }
68
- }
69
- return $has;
70
- }
71
- function has_action($tag,$function_to_check = false){
72
- return has_filter($tag,$function_to_check);
73
- }
74
- }
75
- if(!function_exists('admin_url')){ //added in Wordpress 2.6
76
- function admin_url($admin_file=""){
77
- $adminurl=get_bloginfo('wpurl')."/wp-admin/".$admin_file;
78
- return $adminurl;
79
- }
80
- }
81
- if(!function_exists('plugins_url')){ //added in Wordpress 2.6
82
- function plugins_url($plugin_file=""){
83
- if(defined('WP_CONTENT_URL')&& defined('WP_CONTENT_DIR')&& strpos(WP_CONTENT_DIR,ABSPATH)===FALSE)$pluginurl=rtrim(WP_CONTENT_URL,"/")."/plugins/".$plugin_file;
84
- else $pluginurl=get_bloginfo('wpurl')."/wp-content/plugins/".$plugin_file;
85
- return $pluginurl;
86
- }
87
- }
88
- if(!function_exists('get_user_by')){ //added in Wordpress 2.8
89
- function get_user_by($ufield,$uvalue){
90
- $user=false;
91
- if(!empty($uvalue)){
92
- if($ufield=="login"){
93
- if(function_exists('get_userdatabylogin')) $user=get_userdatabylogin($uvalue);
94
- }elseif(is_numeric($uvalue)){
95
- $user=get_userdata($uvalue); //ID is default
96
- }
97
- }
98
- return $user;
99
- }
100
- }
101
- if(!function_exists('esc_attr')){ //added in Wordpress 2.8
102
- function esc_attr($text){return attribute_escape($text);}
103
- function esc_html($html){return wp_specialchars($html, ENT_QUOTES);}
104
- function esc_url($url,$protocol=null,$context='display'){
105
- $newurl=clean_url($url,$protocol,$context);
106
- if(empty($newurl) && !empty($url)){ //oops, clean_url chomp
107
- $new_url = attribute_escape(strip_tags(html_entity_decode(wp_kses(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$url),array()))));
108
- }
109
- return $newurl;
110
- }
111
- function esc_sql($data){
112
- global $wpdb;
113
- if (empty($wpdb->use_mysqli)) return mysql_real_escape_string($data);
114
- else return mysqli_real_escape_string();
115
- }
116
- }
117
- //-------------------------------------------------
118
- //define Wordpress 3+ functions used in Wassup
119
- if(!function_exists('delete_user_option')){ //added in Wordpress 3.0
120
- function delete_user_option($user_id,$option_name,$option_value=''){
121
- if(function_exists('delete_user_meta')) return delete_user_meta($user_id,$option_name);
122
- else return delete_usermeta($user_id,$option_name,$option_value);
123
- }
124
- }
125
- if(!function_exists('is_multisite')){ //added in Wordpress 3.0
126
- function is_multisite(){
127
- if(defined('MULTISITE')) return MULTISITE;
128
- if(defined('SUBDOMAIN_INSTALL') || defined('VHOST') || defined('SUNRISE')) return true;
129
- return false;
130
- }
131
- function is_subdomain_install(){
132
- if(defined('SUBDOMAIN_INSTALL')) return SUBDOMAIN_INSTALL;
133
- if(defined('VHOST') && VHOST=='yes') return true;
134
- return false;
135
- }
136
- function is_main_site($site_id=null) {
137
- if(!is_multisite()) return true;
138
- if(!$site_id) $site_id=get_current_blog_id();
139
- return (int)$site_id === (int)$GLOBALS['current_site']->blog_id;
140
- }
141
- }
142
- if(!function_exists('is_network_admin')){ //added in Wordpress 3.1
143
- function is_network_admin() {
144
- if(isset($GLOBALS['current_screen'])) return $GLOBALS['current_screen']->in_admin('network');
145
- elseif(defined('WP_NETWORK_ADMIN')) return WP_NETWORK_ADMIN;
146
- return false;
147
- }
148
- }
149
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/compat-lib/wassup.class.php DELETED
@@ -1,2157 +0,0 @@
1
- <?php
2
- /**
3
- * Contains 3 PHP4 classes for managing settings, tables, and url links.
4
- * wassupOptions: displays and update plugin settings,
5
- * wassupDb: manages plugin tables,
6
- * wassupURI: generates safe url links for display.
7
- *
8
- * @package WassUp Real-time Analytics
9
- * @subpackage compat-lib/wassup.class.php module
10
- * @author Helene D. <http://helenesit.com>
11
- */
12
- //no direct request for this plugin module
13
- $wfile=preg_replace('/\\\\/','/',__FILE__); //for windows
14
- if(!defined('ABSPATH')|| empty($GLOBALS['wp_version'])|| preg_match('#'.preg_quote(basename($wfile)).'#',$_SERVER['PHP_SELF'])|| !empty($_SERVER['SCRIPT_FILENAME'])&& realpath($wfile)===realpath($_SERVER['SCRIPT_FILENAME'])){
15
- if(!headers_sent()){header('Location: /?p=404page&err=wassup403');exit;
16
- }elseif(function_exists('wp_die')){wp_die("Bad Request: ".esc_attr(wp_kses(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI']),array())));exit;
17
- }else{die("Bad Request: ".htmlspecialchars(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));exit;}
18
- exit;
19
- }
20
- unset($wfile);
21
- if (!class_exists('wassupOptions')) {
22
- /**
23
- * Class for display, update, and validation of settings form data.
24
- * @author: Helene Duncker <http://helenesit.com>
25
- */
26
- class wassupOptions {
27
- /* general/detail settings */
28
- var $wassup_refresh = "3";
29
- var $wassup_userlevel = "8";
30
- var $wassup_screen_res = "800";
31
- var $wassup_default_type = "everything";
32
- var $wassup_default_spy_type = "everything";
33
- var $wassup_default_limit = "10";
34
- var $wassup_top10;
35
- var $wassup_time_format = "24";
36
- var $wassup_time_period = "1";
37
-
38
- /* recording settings */
39
- var $wassup_active = "1";
40
- var $wassup_loggedin = "1";
41
- var $wassup_admin = "1";
42
- var $wassup_spider = "1";
43
- var $wassup_exclude = "";
44
- var $wassup_exclude_host = ""; //new in v1.9: for exclusion by hostname
45
- var $wassup_exclude_url = "";
46
- var $wassup_exclude_user = "";
47
-
48
- /* spam and malware settings */
49
- var $wassup_spamcheck = "1";
50
- var $wassup_spam = "1";
51
- var $wassup_refspam = "1";
52
- var $wassup_attack = "1";
53
- var $wassup_hack = "1";
54
-
55
- /* table/file management settings */
56
- var $wassup_table;
57
- var $wassup_dbengine = "";
58
- var $wassup_uninstall; //for uninstall of wassup tables
59
- var $delete_auto = "never";
60
- var $delete_filter = "";
61
- var $wassup_optimize = "0"; //for scheduled optimization
62
- var $wassup_remind_mb = "100";
63
- var $wassup_remind_flag = "1";
64
- var $delayed_insert = "1"; //New in v1.9: for use of "Delayed" option in MySQL INSERT command
65
-
66
- /* chart/map display settings */
67
- var $wassup_dashboard_chart = 0;
68
- var $wassup_chart = "1";
69
- var $wassup_chart_type = "2";
70
- var $wassup_geoip_map = "1";
71
- var $wassup_googlemaps_key;
72
-
73
- /* widget settings */
74
- //New in v1.9: removed widget settings because multi-widgets store their own settings in wordpress options table
75
-
76
- /* temporary action settings */
77
- //New in v1.9: dip,mark and other temp settings moved to new user option '_wassup_settings' so that multiple users can view wassup admin panel and customize their views
78
- var $whash = "";
79
- var $wassup_alert_message = ""; //to display alerts
80
- var $wassup_version = "";
81
- var $wassup_upgraded = 0; //New in v1.9: upgrade timestamp
82
-
83
- /**
84
- * PHP4 constructor.
85
- *
86
- * New in v1.9: optional argument to set default values for new/empty class vars.
87
- * @param boolean $add_defaults
88
- * @return void
89
- *
90
- */
91
- function wassupoptions($add_defaults=false){
92
- if($add_defaults)$this->_initSettings();
93
- else $this->loadSettings();
94
- }
95
- /** loads current settings/initializes empty class vars. */
96
- function _initSettings(){
97
- $settings=$this->getSettings(true);
98
- $this->loadSettings($settings);
99
- }
100
- /** loads default settings into class vars. */
101
- function loadDefaults(){
102
- $defaults = $this->defaultSettings();
103
- $this->loadSettings($defaults);
104
- }
105
- /**
106
- * Return array of default values or one default variable.
107
- * @param string
108
- * @return string|array
109
- */
110
- function defaultSettings($dsetting="") {
111
- global $wpdb,$wdebug_mode;
112
- $retvalue=false;
113
- //New in v1.9: default settings for current user
114
- if($dsetting=="user_settings" || $dsetting=="wassup_user_settings"){
115
- $user_defaults=array(
116
- 'detail_filter' =>$this->wassup_default_type,
117
- 'detail_chart' =>$this->wassup_chart,
118
- 'detail_limit' =>$this->wassup_default_limit,
119
- 'detail_time_period'=>$this->wassup_time_period,
120
- 'spy_filter' =>$this->wassup_default_spy_type,
121
- 'spy_map' =>$this->wassup_geoip_map,
122
- 'ualert_message'=>"",
123
- 'unonce' =>rand(1,999999),
124
- 'umark' =>"",
125
- 'uip' =>"",
126
- 'urecid' =>0,
127
- 'utimestamp' =>0,
128
- 'uwassupid' =>"",
129
- 'uversion' =>WASSUPVERSION,
130
- );
131
- return $user_defaults;
132
- }
133
- //default top stats settings
134
- $top10_defaults = array(
135
- "toplimit"=>"10",
136
- "topsearch"=>"1",
137
- "topreferrer"=>"1",
138
- "toppostid"=>"1",
139
- "toprequest"=>"1",
140
- "topbrowser"=>"1",
141
- "topos"=>"1",
142
- "toplocale"=>"0",
143
- "topvisitor"=>"0",
144
- "topreferrer_exclude"=>"",
145
- "top_nofrontpage"=>"0",
146
- "top_nospider"=>"0",
147
- );
148
- if($dsetting=="top10" || $dsetting=="wassup_top10" || $dsetting=="top_stats"){
149
- return $top10_defaults;
150
- }
151
- //general default settings
152
- $defaults = array(
153
- 'wassup_active' =>"1",
154
- 'wassup_loggedin' =>"1",
155
- 'wassup_admin' =>"1",
156
- 'wassup_spider' =>"1",
157
- 'wassup_attack' =>"1",
158
- 'wassup_hack' =>"1",
159
- 'wassup_spamcheck' =>"1",
160
- 'wassup_spam' =>"1",
161
- 'wassup_refspam' =>"1",
162
- 'wassup_exclude' =>"",
163
- 'wassup_exclude_host' =>"",
164
- 'wassup_exclude_url' =>"",
165
- 'wassup_exclude_user' =>"",
166
- 'wassup_chart' =>"1",
167
- 'wassup_chart_type' =>"2",
168
- 'delete_auto' =>"never",
169
- 'delete_filter' =>"",
170
- 'wassup_remind_mb' =>"100", //v1.9 new default setting
171
- 'wassup_remind_flag' =>"1", //v1.9 new default setting
172
- 'wassup_refresh' =>"3",
173
- 'wassup_userlevel' =>"8",
174
- 'wassup_screen_res' =>"800",
175
- 'wassup_default_type' =>"everything",
176
- 'wassup_default_spy_type'=>"everything",
177
- 'wassup_default_limit' =>"10",
178
- 'wassup_dashboard_chart'=>"0",
179
- 'wassup_geoip_map' =>"1", //New in v1.9 - new default setting
180
- 'wassup_googlemaps_key' =>"",
181
- 'wassup_time_format' =>"24",
182
- 'wassup_time_period' =>"1",
183
- 'wassup_alert_message' =>"",
184
- 'wassup_uninstall' =>"0",
185
- 'wassup_optimize'=>"0",
186
- 'wassup_top10' =>$top10_defaults,
187
- 'whash' =>"",
188
- 'wassup_table' =>$wpdb->prefix . "wassup",
189
- 'wassup_dbengine'=>"",
190
- 'delayed_insert'=>"1",
191
- 'wassup_version'=>"",
192
- 'wassup_upgraded'=>0,
193
- );
194
- //New in v1.9: for multisite, use main site settings as default, except for table name and engine
195
- if(is_multisite() && !is_main_site() && !is_network_admin()){
196
- $main_site_settings=get_blog_option($GLOBALS['current_site']->blog_id,'wassup_settings',$defaults);
197
- if(!empty($main_site_settings) && $main_site_settings!=$defaults){
198
- $defaults=$main_site_settings;
199
- $defaults['wassup_table']=$wpdb->prefix . "wassup";
200
- }
201
- }
202
- //never discard google maps api key with "reset-to-default"
203
- if(!empty($this->wassup_googlemaps_key)) $defaults['wassup_googlemaps_key']= $this->wassup_googlemaps_key;
204
- //never discard wassup_version' with "reset-to-default"
205
- if(!empty($this->wassup_version)) $defaults['wassup_version']= $this->wassup_version;
206
- $wassupdb_installed=false;
207
- //never change 'wassup_table' with "reset-to-default" ..unless table doesn't exist
208
- if(!empty($this->wassup_table) && wassupDb::table_exists($this->wassup_table)){
209
- $defaults['wassup_table']= $this->wassup_table;
210
- $defaults['wassup_dbengine']= $this->wassup_dbengine;
211
- $defaults['wassup_optimize']= $this->wassup_optimize;
212
- $wassupdb_installed=true;
213
- }elseif(is_multisite() && !is_network_admin() && !is_main_site()){
214
- $network_settings=get_site_option('wassup_network_settings');
215
- if(!empty($network_settings['wassup_table'])){
216
- $defaults['wassup_table']=$network_settings['wassup_table'];
217
- $wassupdb_installed=true;
218
- }elseif(wassupDb::table_exists($defaults['wassup_table'])){
219
- $wassupdb_installed=true;
220
- }
221
- }elseif(wassupDb::table_exists($defaults['wassup_table'])){
222
- $wassupdb_installed=true;
223
- }
224
- //reset table engine with reset-to-default ..after default wassup_table is set
225
- if($dsetting=='wassup_dbengine' || empty($dsetting)){
226
- if(empty($defaults['wassup_dbengine'])){
227
- $tengine="";
228
- if ($defaults['wassup_table']== $this->wassup_table){
229
- $tengine=$this->wassup_dbengine;
230
- }elseif(!$wassupdb_installed){
231
- $result=$wpdb->get_results("SHOW VARIABLES LIKE 'storage_engine'",ARRAY_A);
232
- if(!empty($result) && !is_wp_error($result) && !empty($result[0]->Value)) $tengine=$result[0]->Value;
233
- }else{
234
- //$tengine=wassupDb::get_db_setting('engine',$defaults['wassup_table']); //TODO: find cause of mysql timeout error
235
- $result=$wpdb->get_results("SHOW VARIABLES LIKE 'storage_engine'",ARRAY_A);
236
- if(!empty($result) && !is_wp_error($result) && !empty($result[0]->Value)) $tengine=$result[0]->Value;
237
- }
238
- $defaults['wassup_dbengine']=$tengine;
239
- }
240
- }
241
- //never change optimize schedule with reset-to-default ..unless table engine has changed
242
- if($dsetting=='wassup_optimize' || (empty($dbsetting) && $this->wassup_dbengine != $defaults['wassup_dbengine'])){
243
- $tengine=$defaults['wassup_dbengine'];
244
- //v1.9 bugfix: set optimization when for table engine's myisam, archive, or innodb with file-per-table option only
245
- if($tengine=="myisam" || $tengine=="archive"){
246
- $defaults['wassup_optimize']=strtotime("next Sunday 2:00am");
247
- }elseif($wassupdb_installed && wassupDb::is_optimizable_table($defaults['wassup_table'])){
248
- $defaults['wassup_optimize']=strtotime("next Sunday 2:00am");
249
- }else{
250
- $defaults['wassup_optimize']="0";
251
- }
252
- }else{
253
- $defaults['wassup_optimize']=$this->wassup_optimize;
254
- }
255
- //reset hash with reset-to-default
256
- $defaults['whash']=$this->whash;
257
- if($dsetting=='whash' || empty($dsetting)){
258
- $defaults['whash']=$this->get_wp_hash();
259
- }
260
- //serialize top10 array for insert into wp_options
261
- if(empty($dsetting)) $defaults['wassup_top10']=maybe_serialize($top10_defaults);
262
- //check that can use delayed insert
263
- //$defaults['delayed_insert']=$this->delayed_insert;
264
- if(empty($dsetting) || $dsetting=="delayed_insert"){
265
- if (stristr($defaults['wassup_dbengine'],"isam")===false && stristr($defaults['wassup_dbengine'],"archive")===false){
266
- $defaults['delayed_insert']="0";
267
- }else{
268
- $delayed_queue_size=wassupDb::get_db_setting("delayed_queue_size");
269
- if(!is_numeric($delayed_queue_size) || (int)$delayed_queue_size==0){
270
- $defaults['delayed_insert']="0";
271
- }else{
272
- $max_delayed_threads=wassupDb::get_db_setting("max_delayed_threads");
273
- if((int)$max_delayed_threads==0) $defaults['delayed_insert']="0";
274
- }
275
- }
276
- }
277
- //Return default value for "dsetting" argument, if any
278
- if(!empty($dsetting)){
279
- if ($dsetting == "user_setting" || $dsetting == "wassup_user_settings"){
280
- $retvalue = $user_defaults;
281
- }elseif ($dsetting == "top10" || $dsetting == "wassup_top10" || $dsetting == "top_stats"){
282
- $retvalue = $top10_defaults;
283
- }elseif(isset($defaults[$dsetting])){
284
- $retvalue = $defaults[$dsetting];
285
- }else{
286
- $retvalue = false;
287
- }
288
- }else{
289
- $retvalue=$defaults;
290
- }
291
- return $retvalue;
292
- } //end defaultSettings
293
-
294
- /** Load up class variables with wp_option settings. */
295
- function loadSettings($settings=array()){
296
- if(empty($settings)){
297
- $settings=get_option('wassup_settings');
298
- }
299
- if(!empty($settings) && is_array($settings)){
300
- $this->_options2class($settings);
301
- }else{
302
- return false;
303
- }
304
- return true;
305
- }
306
-
307
- /**
308
- * Retrieve wassup settings from 'wp_options' in an array.
309
- * - includes optional flag argument to add new settings and omit deprecated settings.
310
- * @since version 1.8
311
- * @param boolean $add_defaults
312
- * @return array $settings
313
- */
314
- function getSettings($add_defaults=false){
315
- global $wpdb;
316
- $current_opts=get_option('wassup_settings');
317
- if($add_defaults || empty($current_opts)){
318
- //in multisite, use main site as defaults
319
- if(is_multisite() && !is_network_admin() && !is_main_site()){
320
- $default_opts=get_blog_option($GLOBALS['current_site']->blog_id,'wassup_settings');
321
- if(empty($default_opts)) $default_opts=$this->defaultSettings();
322
- else $default_opts['wassup_table']=$this->defaultSettings('wassup_table');
323
- }else{
324
- $default_opts=$this->defaultSettings();
325
- }
326
- if(!empty($current_opts)){
327
- foreach($default_opts as $skey=>$defaultvalue){
328
- if(array_key_exists($skey,$current_opts))$settings[$skey]=$current_opts[$skey];
329
- else $settings[$skey]=$defaultvalue;
330
- }
331
- }else{
332
- $settings=$default_opts;
333
- }
334
- }else{
335
- $settings=$current_opts;
336
- }
337
- return $settings;
338
- } //end getSettings
339
-
340
- /** Save class vars as 'wassup_settings' in wp_options. */
341
- function saveSettings() {
342
- global $wpdb;
343
- $settings_array = array();
344
- $obj = $this;
345
- //convert class vars into array
346
- foreach (array_keys(get_class_vars(get_class($obj))) as $k){
347
- if (is_array($obj->$k)) {
348
- //serialize any arrays within $obj
349
- if (count($obj->$k)>0) {
350
- $settings_array[$k] = maybe_serialize($obj->$k);
351
- } else {
352
- $settings_array[$k] = "";
353
- }
354
- } else {
355
- $settings_array[$k] = "{$obj->$k}";
356
- }
357
- }
358
- //save array to wp_options
359
- /* if(is_multisite() && function_exists('is_network_admin') && is_network_admin()){
360
- $subsite_id=$GLOBALS['current_site']->blog_id;
361
- update_blog_option($subsite_id,'wassup_settings', $settings_array);
362
- }else{
363
- update_option('wassup_settings', $settings_array);
364
- } */
365
- update_option('wassup_settings', $settings_array);
366
- return true;
367
- } //end saveSettings
368
-
369
- /** delete 'wassup_settings' from wp_options table and reset class vars to defaults. */
370
- function deleteSettings(){
371
- global $wpdb;
372
- $this->loadDefaults();
373
- if(!is_multisite()){
374
- delete_option('wassup_settings');
375
- }else{
376
- if(function_exists('is_network_admin') && is_network_admin()) $subsite_id=$GLOBALS['current_site']->blog_id;
377
- else $subsite_id=$GLOBALS['current_blog']->blog_id;
378
- delete_blog_option($subsite_id,'wassup_settings');
379
- }
380
- }
381
- /**
382
- * Reset wassup user option '_wassup_settings' to defaults
383
- * - runs when a user logs in, after upgrade/install, and with reset-to-default
384
- * - contains 2 user arguments required by 'wp_login' hook.
385
- *
386
- * @since v1.9
387
- * @param (2) string $user_login, object(WP_User) $user
388
- * @return array $wassup_user_settings
389
- */
390
- function resetUserSettings($user_login="",$user=false){
391
- global $current_user;
392
- if(!defined('WASSUPVERSION')) wassup_init();
393
- if(empty($user)) $user=$current_user;
394
- if(empty($user->ID)) $user=wp_get_current_user();
395
- $wassup_user_settings=get_user_option('_wassup_settings',$user->ID);
396
- if(!empty($wassup_user_settings)){
397
- $wassup_user_defaults=$this->defaultSettings('wassup_user_settings');
398
- $wassup_user_settings=$wassup_user_defaults;
399
- update_user_option($user->ID,'_wassup_settings',$wassup_user_settings);
400
- }
401
- return $wassup_user_settings;
402
- }
403
- /**
404
- * Return an array of valid input field values or a single default value for a field in wassup settings form.
405
- * - value returned could be field value, field name, or the sql associated with the field, depending on the $meta param
406
- * @param string(3) ($field,$meta,$selected)
407
- * @return array
408
- */
409
- function getFieldOptions($field,$meta="",$selected="") {
410
- $field_options = array();
411
- $field_options_meta = array();
412
- $field_options_sql = array();
413
- $default_key = ""; //default value
414
- switch ($field) {
415
- case "wassup_screen_res":
416
- //"Options" setting
417
- $field_options = array("640","800","1024","1200",1600);
418
- $field_options_meta = array("&nbsp;640",
419
- "&nbsp;800",
420
- "1024",
421
- "1200",
422
- "1600");
423
- $default_key=1;
424
- break;
425
- case "wassup_userlevel":
426
- //"Options" setting
427
- $field_options = array("8","6","2","1","0");
428
- $field_options_meta = array(
429
- __("Administrator"),
430
- '&nbsp;'.__("Editor"),
431
- '&nbsp;'.__("Author"),
432
- '&nbsp;'.__("Contributor"),
433
- '&nbsp;'.__("Subscriber"));
434
- break;
435
- case "wassup_chart_type":
436
- //"Options" setting
437
- $field_options = array("1","2");
438
- $field_options_meta = array(
439
- __("One - 2 lines chart 1 axis","wassup"),
440
- __("Two - 2 lines chart 2 axes","wassup"));
441
- $default_key = "1";
442
- break;
443
- case "wassup_default_type":
444
- case "wassup_default_spy_type":
445
- $sitehome = wassupURI::get_sitehome();
446
- $wurl = parse_url(strtolower($sitehome));
447
- $sitehome = $wurl['host'];
448
- if(is_multisite() && !is_subdomain_install() && !empty($wurl['path'])) $sitehome=$wurl['host'].$wurl['path'];
449
- $sitedomain=rtrim(str_replace('.','\\.',$sitehome),'/ ');
450
- $field_options = array("everything",
451
- "spider",
452
- "nospider",
453
- "spam",
454
- "nospam",
455
- "nospamspider",
456
- "loggedin",
457
- "comauthor",
458
- "searchengine",
459
- "referrer");
460
- $field_options_meta = array(__("Everything","wassup"),
461
- __("Spider","wassup"),
462
- __("No spider","wassup"),
463
- __("Spam","wassup"),
464
- __("No Spam","wassup"),
465
- __("No Spam, No Spider","wassup"),
466
- __("Users logged in","wassup"),
467
- __("Comment authors","wassup"),
468
- __("Referrer from search engine","wassup"),
469
- __("Referrer from ext link","wassup"));
470
- $field_options_sql = array("",
471
- " AND spider!=''",
472
- " AND spider=''",
473
- " AND spam>0",
474
- " AND spam=0",
475
- " AND spam=0 AND spider=''",
476
- " AND username!=''",
477
- " AND comment_author!=''",
478
- " AND searchengine!=''",
479
- " AND referrer!='' AND searchengine='' AND TRIM(LEADING 'http://' FROM TRIM(LEADING 'https://' FROM `referrer`)) NOT RLIKE '^(www".'\\.'.")?(".$sitedomain."/)'",
480
- //" AND referrer!='' AND referrer NOT LIKE 'http://".$sitedomain."%' AND referrer NOT LIKE 'https://".$sitedomain."%' AND referrer NOT LIKE 'http://www.".$sitedomain."%'",
481
- );
482
- break;
483
- case "wassup_default_limit":
484
- //"Options" setting, report and chart option
485
- $field_options = array("10","20","50","100");
486
- $field_options_meta = array("&nbsp;10",
487
- "&nbsp;20",
488
- "&nbsp;50",
489
- "100");
490
- break;
491
- case "delete_auto":
492
- //"Options" settings
493
- $field_options = array("never",
494
- "-1 day",
495
- "-1 week",
496
- "-2 weeks",
497
- "-1 month",
498
- "-3 months",
499
- "-6 months",
500
- "-1 year");
501
- $field_options_meta = array(
502
- __("Don't delete anything","wassup"),
503
- __("24 hours","wassup"),
504
- __("7 days","wassup"),
505
- __("2 weeks","wassup"),
506
- __("1 month","wassup"),
507
- __("3 months","wassup"),
508
- __("6 months","wassup"),
509
- __("1 year","wassup"));
510
- break;
511
- case "delete_filter":
512
- $field_options = array("all",
513
- "spider",
514
- "spam",
515
- "spider_spam");
516
- $field_options_meta = array(__("All"),
517
- __("Spider"),
518
- __("Spam"),
519
- __("Spider and spam","wassup"));
520
- $field_options_sql=array("",
521
- " AND `spider`!=''",
522
- " AND `spam`!='0' AND `spam`!=''",
523
- " AND (`spider`!='' OR (`spam`!='0' AND `spam`!=''))");
524
- break;
525
- case "sort_group":
526
- //TODO add to dislay options in Main/details screen
527
- $field_options = array("IP","URL");
528
- $field_options_meta = array(
529
- __("IP Address","wassup"),
530
- __("URL Request","wassup"));
531
- break;
532
- case "wassup_time_period":
533
- //"Details" report and chart option
534
- $field_options = array(".05",".25","0.5","1","7","14","30","90","180","365","0");
535
- $field_options_meta = array(
536
- __("1 hour"),
537
- __("6 hours"),
538
- __("12 hours"),
539
- __("24 hours"),
540
- __("7 days"),
541
- __("2 weeks"),
542
- __("1 month"),
543
- __("3 months"),
544
- __("6 months"),
545
- __("1 year"),
546
- __("all time","wassup"),
547
- );
548
- $default_key=3; //default:meta[3]=24 hours
549
- break;
550
- default: //enable/disable is default
551
- $field_options = array("1","0");
552
- $field_options_meta = array("Enable","Disable");
553
- } //end switch
554
- if (empty($default_key)) $default_key=0;
555
- $retval = "";
556
- if ($meta == "meta") {
557
- //return 1 item
558
- if ($selected!="") {
559
- $key = array_search($selected,$field_options);
560
- if ($key) {
561
- $retval=$field_options_meta[$key];
562
- } elseif (!is_numeric($default_key)) {
563
- $key = array_search($default_key,$field_options);
564
- $retval=$field_options_meta[$key];
565
- } else {
566
- $retval=$field_options_meta[$default_key];
567
- }
568
- //return array of items
569
- } else {
570
- $retval=$field_options_meta;
571
- }
572
- } elseif ($meta == "default") {
573
- $retval = $default_key;
574
- } elseif ($meta == "sql") {
575
- if (!empty($field_options_sql)) {
576
- if ($selected!="") { //return 1 item
577
- $key = array_search($selected,$field_options);
578
- if($key) $retval=$field_options_sql[$key];
579
- else $retval=$field_options_sql[$default_key];
580
- } else { $retval=$field_options_sql; }
581
- }
582
- }else{
583
- $retval=$field_options;
584
- }
585
- return $retval;
586
- } //end getFieldOptions
587
-
588
- /**
589
- * Generates <options> tags for use in a <select> form field.
590
- * - 1st argument $itemkey must an input field name from the "wassup-options" form or from 'getFieldOptions' above.
591
- * @param mixed(3) (string $itemkey,integer $selected, string $optionargs)
592
- * @return string (html)
593
- */
594
- function showFieldOptions($itemkey,$selected="",$optionargs=""){
595
- $form_items =$this->getFieldOptions($itemkey);
596
- if(count($form_items) > 0){
597
- $form_items_meta=$this->getFieldOptions($itemkey,"meta");
598
- if($selected == ""){
599
- if(isset($this->$itemkey)){
600
- $selected=$this->$itemkey;
601
- }else{
602
- $default=$this->getFieldOptions($itemkey,"default");
603
- if(!empty($default) && is_numeric($default)) $selected=$form_items[$default];
604
- else $selected=$form_items[0];
605
- }
606
- }
607
- foreach($form_items as $k => $option_item){
608
- echo "\n\t\t".'<option value="'.$optionargs.$option_item.'"';
609
- if($selected==$option_item) echo ' SELECTED>';
610
- else echo '>';
611
- echo $form_items_meta[$k].'&nbsp;&nbsp;</option>';
612
- }
613
- }
614
- } //end showFieldOptions
615
-
616
- /**
617
- * strip bad characters from a text or textarea input string
618
- * @since v1.9
619
- * @param string
620
- * @return string
621
- */
622
- function cleanFormText($input){
623
- $text=wp_kses($input,array());
624
- return preg_replace('/([^0-9a-z\-_\.,\:*#\'" ]+)/i','',strip_tags(html_entity_decode($text)));
625
- }
626
- /** strip bad characters from a text or textarea input for URLs. @since v1.9 */
627
- function cleanFormURL($input){
628
- $loc=wp_kses_bad_protocol($input,array('http','https','feed'));
629
- $loc=preg_replace('/([^0-9a-z\-_\.,\:\*#\/&\?=;% ]+)/i','',strip_tags(html_entity_decode(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$loc))));
630
- return $loc;
631
- }
632
- /**
633
- * Save settings form changes stored in $_POST global.
634
- * @since v1.9
635
- * @param none
636
- * @return string
637
- */
638
- function saveFormChanges(){
639
- global $current_user;
640
- if(!is_object($current_user) || empty($current_user->ID)) wp_get_current_user();
641
- $admin_message=__("Nothing to do!","wassup");
642
- if(!empty($_POST) && current_user_can('manage_options') && !empty($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'],'page=wassup-options')!==false){
643
- $sitehome=wassupURI::get_sitehome();
644
- //New in v1.9: save multisite network settings
645
- $network_settings=array();
646
- if(is_multisite() && !empty($_POST['_network_settings'])){
647
- $network_settings=get_site_option('wassup_network_settings');
648
- $network_settings['wassup_active']=(!empty($_POST['network_active'])?"1":"0");
649
- if($this->network_activated_plugin()){
650
- $network_settings['wassup_menu']=(!empty($_POST['wassup_menu'])?"1":"0");
651
- }
652
- update_site_option('wassup_network_settings',$network_settings);
653
- }
654
- $this->wassup_active=(!empty($_POST['wassup_active'])?"1":"0");
655
- $this->wassup_spamcheck=(!empty($_POST['wassup_spamcheck'])?"1":"0");
656
- $this->wassup_screen_res=(int)$_POST['wassup_screen_res'];
657
- $this->wassup_userlevel=(int)$_POST['wassup_userlevel'];
658
- $this->wassup_dashboard_chart=(!empty($_POST['wassup_dashboard_chart'])?"1":"0");
659
- $this->wassup_geoip_map=(!empty($_POST['wassup_geoip_map'])?"1":"0");
660
- if(!empty($_POST['wassup_googlemaps_key'])){
661
- $not_required=__("not required","wassup");
662
- if(strpos($_POST['wassup_googlemaps_key'],$not_required)===false)$this->wassup_googlemaps_key=$this->cleanFormText($_POST['wassup_googlemaps_key']);
663
- else $this->wassup_googlemaps_key="";
664
- }else{
665
- $this->wassup_googlemaps_key="";
666
- }
667
- $this->wassup_chart=(!empty($_POST['wassup_chart'])?"1":"0");
668
- if(!empty($_POST['wassup_chart_type'])) $this->wassup_chart_type=(int)$_POST['wassup_chart_type'];
669
- else $this->wassup_chart_type="2";
670
- $this->wassup_time_format=$this->cleanFormText($_POST['wassup_time_format']);
671
- $this->wassup_time_period=$this->cleanFormText($_POST['wassup_time_period']);
672
- if(!empty($_POST['wassup_refresh'])){
673
- if(is_numeric($_POST['wassup_refresh'])&& $_POST['wassup_refresh']>0 && $_POST['wassup_refresh']<=180)
674
- $this->wassup_refresh=(int)$_POST['wassup_refresh'];
675
- }else{
676
- $this->wassup_refresh="0";
677
- }
678
- $this->wassup_default_type=$this->cleanFormText($_POST['wassup_default_type']);
679
- $this->wassup_default_limit=$this->cleanFormText($_POST['wassup_default_limit']);
680
- $top_ten=array(
681
- "toplimit"=>(isset($_POST['toplimit'])?(int)$_POST['toplimit']:"10"),
682
- "topsearch"=>(isset($_POST['topsearch'])?$_POST['topsearch']:"0"),
683
- "topreferrer"=>(!empty($_POST['topreferrer'])?"1":"0"),
684
- "toppostid"=>(!empty($_POST['toppostid'])?"1":"0"),
685
- "toprequest"=>(!empty($_POST['toprequest'])?"1":"0"),
686
- "topbrowser"=>(!empty($_POST['topbrowser'])?"1":"0"),
687
- "topos"=>(!empty($_POST['topos'])?"1":"0"),
688
- "toplocale"=>(!empty($_POST['toplocale'])?"1":"0"),
689
- "topvisitor"=>(!empty($_POST['topvisitor'])?"1":"0"),
690
- "topreferrer_exclude"=>$this->cleanFormURL($_POST['topreferrer_exclude'],'*'),
691
- "top_nofrontpage"=>(!empty($_POST['top_nofrontpage'])?"1":"0"),
692
- "top_nospider"=>(!empty($_POST['top_nospider'])?"1":"0"),
693
- );
694
- $this->wassup_top10=maybe_serialize($top_ten);
695
- $this->wassup_loggedin=(!empty($_POST['wassup_loggedin'])?"1":"0");
696
- $this->wassup_admin=(!empty($_POST['wassup_admin'])?"1":"0");
697
- $this->wassup_spider=(!empty($_POST['wassup_spider'])?"1":"0");
698
- $this->wassup_spam=(!empty($_POST['wassup_spam'])?"1":"0");
699
- $this->wassup_refspam=(!empty($_POST['wassup_refspam'])?"1":"0");
700
- $this->wassup_hack=(!empty($_POST['wassup_hack'])?"1":"0");
701
- $this->wassup_attack=(!empty($_POST['wassup_attack'])?"1":"0");
702
- if($_POST['wassup_exclude'] != $this->wassup_exclude)
703
- $this->wassup_exclude=$this->cleanFormText($_POST['wassup_exclude']);
704
- if ($_POST['wassup_exclude_host'] != $this->wassup_exclude_host)
705
- $this->wassup_exclude_host=$this->cleanFormText($_POST['wassup_exclude_host']);
706
- if ($_POST['wassup_exclude_user'] != $this->wassup_exclude_user)
707
- $this->wassup_exclude_user=$this->cleanFormText($_POST['wassup_exclude_user']);
708
- if ($_POST['wassup_exclude_url'] != $this->wassup_exclude_url){
709
- if(wassupURI::is_root_url($sitehome))
710
- $this->wassup_exclude_url=str_replace($sitehome,'',$this->cleanFormURL($_POST['wassup_exclude_url']));
711
- else
712
- $this->wassup_exclude_url=str_replace(rtrim($sitehome,'/'),'/',$this->cleanFormURL($_POST['wassup_exclude_url']));
713
- }
714
- if(!empty($_POST['wassup_remind_mb'])&& is_numeric($_POST['wassup_remind_mb'])){
715
- $this->wassup_remind_mb=(int)$_POST['wassup_remind_mb'];
716
- }elseif(!isset($_POST['wassup_remind_mb'])){
717
- $this->wassup_remind_mb=100;
718
- }else{
719
- $this->wassup_remind_mb=0;
720
- }
721
- if(!empty($_POST['wassup_remind_flag'])){
722
- $this->wassup_remind_flag=(int)$_POST['wassup_remind_flag'];
723
- if(empty($_POST['wassup_remind_mb']))$this->wassup_remind_mb=100;
724
- }
725
- if(isset($_POST['delete_auto'])){
726
- $this->delete_auto=$this->cleanFormText($_POST['delete_auto']);
727
- if(isset($_POST['delete_filter']))$this->delete_filter=$this->cleanFormText($_POST['delete_filter']);
728
- //schedule daily delete auto
729
- if(!empty($this->delete_auto) && $this->delete_auto!="never"){
730
- $starttime=wp_next_scheduled('wassup_scheduled_purge');
731
- if(empty($starttime)){
732
- //start purge at 2am
733
- $starttime=strtotime("tomorrow 2:00am");
734
- wp_schedule_event($starttime,'daily','wassup_scheduled_purge');
735
- }
736
- }else{
737
- wp_clear_scheduled_hook('wassup_scheduled_purge');
738
- }
739
- }else{
740
- wp_clear_scheduled_hook('wassup_scheduled_purge');
741
- }
742
- //New in v1.9: optimization and delayed_insert options
743
- if(isset($_POST['wassup_optimize_on'])){
744
- if($this->wassup_optimize=="0")
745
- $this->wassup_optimize=$this->defaultSettings('wassup_optimize');
746
- }else{
747
- $this->wassup_optimize="0";
748
- }
749
- $this->delayed_insert=(!empty($_POST['delayed_insert'])?"1":"0");
750
- if (!empty($_POST['wassup_dbengine'])) $this->wassup_dbengine=$this->cleanFormText($_POST['wassup_dbengine']);
751
- if($this->saveSettings()){
752
- $admin_message=__("Wassup options updated successfully","wassup")."." ;
753
- $this->resetUserSettings($current_user->user_login,$current_user);
754
- }
755
- }
756
- return $admin_message;
757
- } //end saveFormChanges
758
-
759
- /**
760
- * get timezone (and offset) directly from the host server.
761
- * @since 1.8
762
- * @param none
763
- * @return array (*string $timezone, *string $offset)
764
- */
765
- function getHostTimezone($getoffset=false) {
766
- $hostTimezone = __("Unknown");
767
- $nix_server="";
768
- //run *nix 'date' command to get offset from host server system
769
- //'date' function for timezone not supported on Windows
770
- if (defined('PHP_OS') && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
771
- $nix_server = PHP_OS;
772
- } else {
773
- if (!empty($_SERVER['SERVER_SOFTWARE'])) {
774
- $php_os = $_SERVER['SERVER_SOFTWARE'];
775
- } elseif (function_exists('apache_get_version')) {
776
- $php_os = apache_get_version();
777
- }
778
- if (preg_match('/(nix|bsd|os\s?x|ux|darwin|sun)/i',$php_os)>0) {
779
- $nix_server = $php_os;
780
- }
781
- }
782
- if (!empty($nix_server) && function_exists('shell_exec')) {
783
- //check that 'shell_exec' is enabled (no safe_mode)
784
- $safe_mode="off";
785
- if (version_compare(PHP_VERSION,'5.4','<')) {
786
- $safe_mode = @ini_get('safe_mode');
787
- if ($safe_mode!= "on" && $safe_mode!= "1")
788
- $safe_mode="off";
789
- }
790
- if ($safe_mode=='off' && !in_array('shell_exec',array_map('trim',explode(',', @ini_get('disable_functions'))))) {
791
- if ($getoffset) {
792
- $hostTZ = @shell_exec('date +"%Z|%z"');
793
- //in case shell_exec is disabled
794
- if (strpos($hostTZ,'|')!==false) {
795
- $hostTimezone = explode('|',$hostTZ);
796
- $hostTimezone[1] = substr($hostTimezone[1],0,3);
797
- }
798
- } else {
799
- $hostTZ = @shell_exec('date +"%Z"');
800
- //in case shell_exec is disabled
801
- if (!empty($hostTZ)) {
802
- $hostTimezone = $hostTZ;
803
- }
804
- }
805
- } //end if safe_mode
806
- }
807
- return $hostTimezone;
808
- } //end getHostTimezone
809
-
810
- /**
811
- * Return true if site uses American English format for dates and numbers
812
- * @since v1.9
813
- * @param string
814
- * @return boolean
815
- */
816
- function is_USAdate($ftype="date"){
817
- $is_usaformat=false;
818
- //check for US|Euro date format in wordpress options
819
- $wp_dateformat=get_option('date_format');
820
- $i=strpos($wp_dateformat,'j');
821
- if($i===false)$i=strpos($wp_dateformat,'d');
822
- if($i>1 && strpos($wp_dateformat,'Y')!==0)$is_usaformat=true;
823
- return $is_usaformat;
824
- }
825
-
826
- /**
827
- * Verify that a user has administrator role.
828
- * - "username" param can be empty, string, or WPUser object
829
- * @since v1.9
830
- * @param string $username
831
- * @return boolean
832
- */
833
- function is_admin_login($username=""){
834
- global $current_user;
835
- $is_admin_login=false;
836
- if($username===false)return false;
837
- if(empty($username))$username=$current_user;
838
- if(is_object($username)){
839
- if($username == $current_user && function_exists('is_super_admin') && is_super_admin()) $is_admin_login=true;
840
- elseif(!empty($username->roles)&& in_array("administrator",$username->roles)) $is_admin_login=true;
841
- elseif(!empty($username->user_level)&& $username->user_level>7)$is_admin_login=true;
842
- }elseif(is_string($username)){
843
- if($current_user->user_login == $username) $udata=$current_user;
844
- else $udata=get_user_by("login",$username);
845
- if($udata == $current_user && function_exists('is_super_admin') && is_super_admin()) $is_admin_login=true;
846
- elseif(!empty($udata->roles)&& in_array("administrator",$udata->roles)) $is_admin_login=true;
847
- elseif(!empty($udata->user_level)&& $udata->user_level>7) $is_admin_login=true;
848
- }
849
- return $is_admin_login;
850
- } //end is_admin_login
851
-
852
- /**
853
- * Verify that wassup is network-activated in Wordpress multisite.
854
- * @since v1.9
855
- * @param none
856
- * @return boolean
857
- */
858
- function network_activated_plugin($plugin_file=""){
859
- global $wpdb;
860
- $is_network_activated=false;
861
- $wassupplugin=plugin_basename(WASSUPDIR."/wassup.php");
862
- if(empty($plugin_file)) $plugin_file=$wassupplugin;
863
- if(is_multisite()){
864
- $plugins=get_site_option('active_sitewide_plugins');
865
- if(isset($plugins[$plugin_file])){
866
- $is_network_activated=true;
867
- }elseif($plugin_file == $wassupplugin){
868
- $network_settings=get_site_option('wassup_network_settings');
869
- if(!empty($network_settings['wassup_table']) && $network_settings['wassup_table']==$wpdb->base_prefix."wassup") $is_network_activated=true;
870
- }
871
- }
872
- return $is_network_activated;
873
- }
874
- /**
875
- * Return the user capabilities string equivalent of a user level number.
876
- * @since v1.9
877
- * @param integer $userlevel
878
- * @return string
879
- */
880
- function get_access_capability($userlevel=""){
881
- if($userlevel=="" || !is_numeric($userlevel)){
882
- $userlevel=$this->wassup_userlevel;
883
- }
884
- $access='read'; //default
885
- if(is_numeric($userlevel)){
886
- if($userlevel >=8) $access='manage_options'; //Admin
887
- elseif($userlevel >=6) $access='publish_pages'; //Editor
888
- elseif($userlevel >=2) $access='publish_posts'; //Author
889
- elseif($userlevel >=1) $access='edit_posts'; //Contributor
890
- else $access='read';
891
- }
892
- return $access;
893
- }
894
-
895
- /** Set hash value for wassup ajax requests and cookies */
896
- function get_wp_hash($hashkey="") {
897
- $wassuphash="";
898
- if (empty($hashkey)) {
899
- //v1.9 bugfix: 'secret_key' obsolete, replaced with 'auth_key'
900
- if(defined('AUTH_KEY'))$hashkey=AUTH_KEY; //in WP 3.X
901
- elseif(defined('SECRET_KEY'))$hashkey=SECRET_KEY; //in WP 2.X
902
- else $hashkey="wassup-".sprintf('%03d',rand(0,999));
903
- //for multisite, append subsite_id to hashkey
904
- if(is_multisite() && !is_network_admin()) $hashkey .= $GLOBALS['current_blog']->blog_id;
905
- }
906
- $wassuphash=wp_hash($hashkey);
907
- return $wassuphash;
908
- }
909
- /**
910
- * Convert associative array to this class object
911
- * @since 1.8
912
- * @param array (assoc)
913
- * @return boolean
914
- */
915
- function _options2class($options_array) {
916
- if(!empty($options_array) && is_array($options_array)){
917
- foreach ($options_array as $o_key => $o_value){
918
- if(isset($this->$o_key)){ //returns false for null values
919
- $this->$o_key = $o_value;
920
- }elseif(function_exists('property_exists')){ //PHP 5.1+ function
921
- if(property_exists($this,$o_key)){
922
- $this->$o_key = $o_value;
923
- }
924
- }elseif(array_key_exists($o_key,$this)){ //valid for objects in PHP 4.0.7 thru 5.2 only
925
- $this->$o_key = $o_value;
926
- }
927
- } //end foreach
928
- }else{
929
- return false;
930
- }
931
- return true;
932
- } //end _options2class
933
-
934
- /** display a system notice or message in admin panel. */
935
- function showMessage($message="") {
936
- global $wp_version,$current_user;
937
- if(empty($message) && (empty($_GET['page'])|| stristr($_GET['page'],'wassup')!==false) && !empty($this->wassup_alert_message)) $message=$this->wassup_alert_message;
938
- //New in v1.9: show user-specific alert messages
939
- if(empty($message)){
940
- if(!is_object($current_user) || empty($current_user->ID)) wp_get_current_user();
941
- $wassup_user_settings = get_user_option('_wassup_settings',$current_user->ID);
942
- if(!empty($wassup_user_settings['ualert_message'])) $message=$wassup_user_settings['ualert_message'];
943
- $wassup_user_settings['ualert_message']="";
944
- update_user_option($current_user->ID,'_wassup_settings',$wassup_user_settings);
945
- }
946
- if(!empty($message)){
947
- $error=__("error","wassup");
948
- $warning=__("warning","wassup");
949
- $updated=__("updated","wassup");
950
- $upgraded=__("upgraded","wassup");
951
- $deleted=__("deleted","wassup");
952
- $mclass="fade updated";
953
- if(stristr($message,$error)!==false){
954
- if(version_compare($wp_version,'4.1','>=')) $mclass="notice error";
955
- else $mclass="fade error";
956
- }elseif(version_compare($wp_version,'4.1','>=')){
957
- if(stristr($message,$warning)!==false) $mclass="notice notice-warning";
958
- elseif(stristr($message,$updated)!==false || stristr($message,$upgraded)!==false || stristr($message,$deleted)!==false) $mclass="notice updated";
959
- else $mclass="notice notice-info";
960
- }
961
- //display message prefaced with version #
962
- echo '<div id="wassup-message" class="'.$mclass.'">WassUp '.WASSUPVERSION.': '.esc_attr($message);
963
- echo '</div>'."\n";
964
- if($message == $this->wassup_alert_message){
965
- $this->clearMessage();
966
- }
967
- }
968
- }
969
- /** displays an alert (error) message. */
970
- function showError($message="") {
971
- $this->showMessage($message);
972
- }
973
- /** remove a notice from wassup_alert_message. @since v1.9 */
974
- function clearMessage($message_text=""){
975
- if(!empty($message_text)){
976
- if($this->wassup_alert_message==$message_text){
977
- $this->wassup_alert_message="";
978
- $this->saveSettings();
979
- }elseif(stristr($this->wassup_alert_message,$message_text)!==false){
980
- $this->wassup_alert_message="";
981
- $this->saveSettings();
982
- }
983
- }else{
984
- $this->wassup_alert_message="";
985
- $this->saveSettings();
986
- }
987
- }
988
- } //end class wassupOptions
989
- } //end if !class_exists
990
-
991
- //New in v1.9: wassupDb static class for WassUp table operations
992
- if(!class_exists('wassupDb')){
993
- /**
994
- * Static class for WassUp table operations and data caching.
995
- *
996
- * @since v1.9
997
- * @author Helene D. <http://helenesit.com>
998
- */
999
- class wassupDb{
1000
- /** Verify that a table exists in wordpress db */
1001
- function table_exists($table){
1002
- global $wpdb;
1003
- $is_table=false;
1004
- if(!empty($table)&& preg_match('/^([a-z0-9\-_\.]+)$/i',$table)>0){
1005
- if(method_exists($wpdb,'esc_like')) $sql=sprintf("SHOW TABLES LIKE '%s'",$wpdb->esc_like($table));
1006
- else $sql=sprintf("SHOW TABLES LIKE '%s'",like_escape($table));
1007
- $result=$wpdb->get_var($sql);
1008
- if(!empty($result) && !is_wp_error($result)){
1009
- if($result == $table) $is_table=true;
1010
- }
1011
- }
1012
- return $is_table;
1013
- } //table_exists
1014
-
1015
- /**
1016
- * Perform a "table status" query and cache the result.
1017
- *
1018
- * - table_status is cached for up to 1 hour to avoid overusing this costly mysql operation
1019
- * @param string
1020
- * @return object
1021
- */
1022
- function table_status($table){
1023
- global $wpdb,$wdebug_mode;
1024
- $table_status=false;
1025
- if(empty($table) || !wassupDb::table_exists($table)){
1026
- $error_msg= __FUNCTION__." failed - missing table name";
1027
- }else{
1028
- $meta_key='_table_status';
1029
- $table_status=wassupDb::get_wassupmeta($table,$meta_key);
1030
- if(empty($table_status)){
1031
- $table_status=$wpdb->get_row(sprintf("SHOW TABLE STATUS LIKE '%s'",wassupDb::esc_like($table)));
1032
- if(is_wp_error($table_status)){
1033
- $error_msg=" table_status error# ".$table_status->get_error_code().": ".$table_status->get_error_message();
1034
- $table_status=false;
1035
- }elseif(!empty($table_status)){
1036
- $expire=time()+3602;
1037
- $cache_id=wassupDb::update_wassupmeta(esc_attr($table),$meta_key,$table_status,$expire);
1038
- }else{
1039
- $table_status=false;
1040
- }
1041
- }
1042
- }
1043
- if(!empty($error_msg)){
1044
- if($wdebug_mode) echo "\n<!-- ".__CLASS__." ERROR: ".$error_msg." -->";
1045
- }
1046
- //always return an object
1047
- if(empty($table_status) || !is_object($table_status)){
1048
- if(empty($table_status['Data_length'])) $tstatus=array('Rows'=>0,'Data_length'=>0,'Index_length'=>0,'Engine'=>"",'Type'=>"");
1049
- else $tstatus=$table_status;
1050
- $table_status=(object)$tstatus;
1051
- }
1052
- return $table_status;
1053
- } //table_status
1054
-
1055
- /**
1056
- * Insert a record into a wassup table.
1057
- *
1058
- * - insert record is an associative array
1059
- * - a record id number is returned on success.
1060
- * @param string $table, array $new_record, boolean $delayed
1061
- * @return string
1062
- */
1063
- function table_insert($table,$new_record,$delayed=false){
1064
- global $wpdb,$wassup_options,$wdebug_mode;
1065
- $rec_id=false;
1066
- $error_msg="";
1067
- if(empty($wassup_options->delayed_insert)) $delayed=false;
1068
- //table and record must be specfied
1069
- if(empty($table)|| empty($new_record)){
1070
- $error_msg=__FUNCTION__." failed - missing table or record parameter";
1071
- }elseif(!is_array($new_record)){
1072
- //record must be array
1073
- $error_msg=__FUNCTION__." failed - insert record NOT an array $new_record";
1074
- }
1075
- if(!empty($error_msg)){
1076
- $error=new WP_Error('1',$error_msg);
1077
- return $error;
1078
- }
1079
- //insert the record
1080
- if(!$delayed && method_exists($wpdb,'insert')){
1081
- //insert with 'wpdb::insert' method
1082
- $rec_id=$wpdb->insert($table,$new_record);
1083
- }else{
1084
- //insert with 'wpdb::query' for delayed insert
1085
- $cols="";
1086
- $vals="";
1087
- $i=0;
1088
- foreach($new_record AS $field=>$val){
1089
- if(is_numeric($val))$value=$val;
1090
- else $value=wassupDb::sanitize($val,true);
1091
- if($i==0){
1092
- $cols="`$field`";
1093
- $vals="$value";
1094
- }else{
1095
- $cols .=", `$field`";
1096
- $vals .=", $value";
1097
- }
1098
- $i++;
1099
- } //end foreach
1100
- //delayed insert option for myISAM and ISAM tables
1101
- if($delayed) $delayed="DELAYED";
1102
- else $delayed="";
1103
- $rec_id=$wpdb->query(sprintf("INSERT $delayed INTO $table (%s) VALUES (%s)",$cols,$vals));
1104
- }
1105
- return $rec_id;
1106
- } //end table_insert
1107
-
1108
- /**
1109
- * perform a delete operation on a table
1110
- * @param string, string
1111
- * @return integer (no. deleted)
1112
- */
1113
- function table_delete($wtable="",$where_condition){
1114
- global $wpdb,$wassup_options,$wdebug_mode;
1115
- $deleted=false;
1116
- if(!empty($where_condition)){
1117
- if(empty($table))$table=$wassup_options->wassup_table;
1118
- if(wassupDb::table_exists($table) && stristr($where_condition,'where')!==false){
1119
- $sql=sprintf("DELETE FROM %s %s",$table,$where_condition);
1120
- $deleted=$wpdb->query($sql);
1121
- if(is_wp_error($deleted)){
1122
- $error_msg=' &nbsp; WP_Error in '.__FUNCTION__.' '.$deleted->get_error_message()." \n<br/>SQL=\$wpdb->query($sql)";
1123
- $deleted=0;
1124
- }
1125
- }else{
1126
- $error_msg=' &nbsp; Error in '.__FUNCTION__.' missing table or bad where condition';
1127
- }
1128
- }else{
1129
- $error_msg=' &nbsp; Error in '.__FUNCTION__.' missing where condition';
1130
- }
1131
- if(!empty($error_msg)){
1132
- if($wdebug_mode) echo "\n<!-- ".__CLASS__." ERROR: ".$error_msg." -->";
1133
- }
1134
- return $deleted;
1135
- }
1136
-
1137
- /**
1138
- * Deletes "cached" records from 'wp_wassup_meta' table.
1139
- * - deletes records matching meta_key==parameter or
1140
- * - deletes all records starting with "_" (underscore) when empty parameter
1141
- * @param string $meta_key
1142
- * @return boolean
1143
- */
1144
- function clear_cache($meta_key=""){
1145
- global $wpdb,$wassup_options,$wdebug_mode;
1146
- $cleared=false;
1147
- $cache_table=$wassup_options->wassup_table ."_meta";
1148
- // deletes all records starting with "_" (underscore)
1149
- if(empty($meta_key)){
1150
- $sql=sprintf("DELETE FROM %s WHERE `meta_key` LIKE '\\_%%' AND `meta_expire`>0",$cache_table); //TODO: verify that escaped '_' requires 2 backslashes, not 1
1151
- $deleted=$wpdb->query($sql);
1152
- if(is_wp_error($deleted)){
1153
- $error_msg=' &nbsp; clear_cache error# '.$deleted->get_error_code()." ".$deleted->get_error_message()." \n<br/>SQL=\$wpdb->query($sql)";
1154
- $deleted=0;
1155
- }
1156
- //delete records matching meta_key==parameter
1157
- }elseif(preg_match('/^([0-9a-z_\-\.]+)$/',$meta_key)>0){
1158
- $deleted=wassupDb::delete_wassupmeta('','*',$meta_key);
1159
- }
1160
- if(!empty($deleted)&& is_numeric($deleted))$cleared=true;
1161
- if(!empty($error_msg)){
1162
- if($wdebug_mode) echo "\n<!-- ".__CLASS__." ERROR: ".$error_msg." -->";
1163
- }
1164
- return $cleared;
1165
- } //end clear_cache
1166
-
1167
- /**
1168
- * verify that a table can be optimized.
1169
- * - table engines: MyISAM, ARCHIVE, or InnoDb with "innodb_file_per_table" option enabled can be optimized.
1170
- * @param string (table_name)
1171
- * @return boolean
1172
- */
1173
- function is_optimizable_table($table_name=""){
1174
- global $wpdb,$wassup_options;
1175
- $is_optimizable=false;
1176
- $tengine="";
1177
- if(empty($table_name))$table_name=$wassup_options->wassup_table;
1178
- if(!empty($table_name)){
1179
- $tstatus = wassupDb::table_status($table_name);
1180
- if(is_object($tstatus) && isset($tstatus->Engine)){
1181
- $tengine=strtolower($tstatus->Engine);
1182
- if(empty($tengine)|| $tengine=="myisam" || $tengine=="archive" || $tengine=="isam"){
1183
- $is_optimizable=true;
1184
- }elseif($tengine=="innodb"){
1185
- $innodb_optimizable=$wpdb->get_var("SELECT @@global.innodb_file_per_table AS innodb_optimizable FROM DUAL");
1186
- if(!empty($innodb_optimizable)&& !is_wp_error($innodb_optimizable) && ($innodb_optimizable=="1" || strtolower($innodb_optimizable)=="on")) $is_optimizable=true;
1187
- }
1188
- }
1189
- }
1190
- return $is_optimizable;
1191
- } //end is_optimizable_table
1192
-
1193
- /**
1194
- * method for PHP5.5 and Mysqli compatibility.
1195
- * @todo - remove all references to old mysql_client_encoding and delete this method
1196
- */
1197
- function mysql_client_encoding(){
1198
- global $wpdb;
1199
- if (empty($wpdb->use_mysqli)) return mysql_client_encoding();
1200
- else return mysqli_character_set_name();
1201
- }
1202
-
1203
- /**
1204
- * Save wassup data to wp_wassup_meta table for caching.
1205
- * - records are cached with a default expiration of 24 hours, if none is given as argument
1206
- * @param mixed(4): string(2) $wassup_key $meta_key, string/array $metavalue, integer $expire (as time)
1207
- * @return string $meta_id
1208
- */
1209
- function save_wassupmeta($wassup_key,$meta_key,$metavalue,$expire=false){
1210
- global $wpdb,$wassup_options,$wdebug_mode;
1211
- $table=$wassup_options->wassup_table.'_meta';
1212
- $meta_id=false;
1213
- //wassup_key or meta_key must be specified
1214
- if(empty($wassup_key)&& empty($meta_key)){
1215
- $error_msg=__FUNCTION__." failed! - missing both 'wassup_key' and 'meta_key' parameters";
1216
- if($wdebug_mode)echo "\n<!-- ".__CLASS__." ERROR: ".$error_msg." -->";
1217
- return false;
1218
- }
1219
- //24-hour expire default... rounded to minute
1220
- if($expire===false || !is_numeric($expire))$expire= (ceil(time()/60))*60+24*3600;
1221
- //serialize $metavalue array
1222
- if(is_array($metavalue)|| is_object($metavalue))$meta_value=maybe_serialize($metavalue);
1223
- else $meta_value=$metavalue;
1224
- $meta_record=array('wassup_key'=>$wassup_key,
1225
- 'meta_key'=>$meta_key,
1226
- 'meta_value'=>"$meta_value",
1227
- 'meta_expire'=>(int)$expire);
1228
- //save to table
1229
- $meta_id=wassupDb::table_insert($table,$meta_record);
1230
- return $meta_id;
1231
- } //end save_wassupmeta
1232
-
1233
- /**
1234
- * Update existing cache data in 'wp_wassup_meta' table.
1235
- * @param mixed(4): string(2) $wassup_key $meta_key, string/array $metavalue, integer $expire (as time)
1236
- * @return string $meta_id
1237
- */
1238
- function update_wassupmeta($wassup_key,$meta_key,$metavalue,$expire=false){
1239
- global $wpdb,$wassup_options,$wdebug_mode;
1240
- $table=$wassup_options->wassup_table.'_meta';
1241
- $meta_id=false;
1242
- $error_msg="";
1243
- //both wassup_key and meta_key must be specified for update
1244
- if(empty($wassup_key)|| empty($meta_key)){
1245
- $error_msg=__FUNCTION__." failed! - missing either 'wassup_key' or 'meta_key' parameter";
1246
- }else{
1247
- //get meta_id of existing record, if any
1248
- $result=$wpdb->get_var(sprintf("SELECT `meta_id` FROM $table WHERE `wassup_key`='%s' AND `meta_key`='%s' LIMIT 1",esc_attr($wassup_key),esc_attr($meta_key)));
1249
- //update the record (or insert new)
1250
- if(!empty($result) && !is_wp_error($result)) $meta_id=$result;
1251
- if(empty($meta_id)){
1252
- $meta_id=wassupDb::save_wassupmeta($wassup_key,$meta_key,$metavalue,$expire);
1253
- }else{
1254
- //24-hour expire default... rounded to minute
1255
- if($expire===false || !is_numeric($expire))$expire=(ceil(time()/60))*60+24*3600;
1256
- //serialize $metavalue array
1257
- if(is_array($metavalue)|| is_object($metavalue))$meta_value=maybe_serialize($metavalue);
1258
- else $meta_value=$metavalue;
1259
- $qry=sprintf("UPDATE `$table` SET `meta_value`='%s', `meta_expire`=%d WHERE `meta_id`=%d",$meta_value,$expire, $meta_id);
1260
- if(!empty($qry)){
1261
- $result=$wpdb->query($qry);
1262
- if(is_wp_error($result)) $error_msg=' &nbsp; update_wassupmeta Error#'.$result->get_error_code().': '.$result->get_error_message()." \n<br/>SQL=\$wpdb->query($qry)";
1263
- }
1264
- }
1265
- }
1266
- if(!empty($error_msg)){
1267
- if($wdebug_mode)echo "\n<!-- ".__CLASS__." ERROR: ".$error_msg." -->";
1268
- }
1269
- return $meta_id;
1270
- } //end update_wassupmeta
1271
-
1272
- /**
1273
- * Retrieve an unexpired 'meta_value' from wassup_meta table or an array of 'meta_value's for multiple matching records.
1274
- * -records with 'meta_expire' timestamp older than the current time are not returned.
1275
- * -optional parameter to use 'SQL_NO_CACHE' to force mySQL to lookup data instead of using internal query cache
1276
- * @param string (2), boolean
1277
- * @return mixed (string or array)
1278
- */
1279
- function get_wassupmeta($wassup_key,$meta_key="",$sql_nocache=false){
1280
- global $wpdb,$wassup_options,$wdebug_mode;
1281
- if(empty($wassup_options))$wassup_options=new wassupOptions;
1282
- $meta_table=$wassup_options->wassup_table.'_meta';
1283
- $meta_value=false;
1284
- $sql_no_cache="";
1285
- $expired=time()-30;
1286
- $sql="";
1287
- $result=false;
1288
- if(!empty($sql_nocache)) $sql_nocache="SQL_NO_CACHE";
1289
- else $sql_nocache="";
1290
- //check that we have a wassup_meta table
1291
- if(!wassupDb::table_exists($meta_table)){
1292
- $error_msg=__FUNCTION__." failed - table $meta_table not found!";
1293
- //check for matching wassup_key
1294
- }elseif(!empty($wassup_key)){
1295
- if(!empty($meta_key)){
1296
- $sql=sprintf("SELECT $sql_nocache `meta_value` FROM `$meta_table` WHERE `wassup_key`='%s' AND `meta_key`='%s' AND (`meta_expire`=0 OR `meta_expire`>%d) ORDER BY `meta_expire` DESC LIMIT 1",$wassup_key,$meta_key,$expired);
1297
- //$result=$wpdb->get_var($sql);
1298
- $result=$wpdb->get_results($sql);
1299
- if(!empty($result) && !is_wp_error($result) && !empty($result[0]->meta_value)) $meta_value=$result[0]->meta_value;
1300
- }else{
1301
- //return an array of all results with same wassup_key
1302
- $sql=sprintf("SELECT $sql_nocache `meta_value` FROM `$meta_table` WHERE `wassup_key`='%s' AND (`meta_expire`=0 OR `meta_expire`>%d)",$wassup_key,$expired);
1303
- $result=$wpdb->get_col($sql);
1304
- if(!empty($result) && !is_wp_error($result)) $meta_value=$result;
1305
- }
1306
- //check for matching meta_key
1307
- }elseif(!empty($meta_key)){
1308
- //return an array of all results with same meta_key
1309
- $sql=sprintf("SELECT $sql_nocache `meta_value` FROM `$meta_table` WHERE `meta_key`='%s' AND (`meta_expire`=0 OR `meta_expire`>%d)",$meta_key,$expired);
1310
- $result=$wpdb->get_col($sql);
1311
- if(!empty($result) && !is_wp_error($result)) $meta_value=$result;
1312
- }
1313
- //unserialize arrays/objects before output
1314
- if(!empty($meta_value) && !is_array($meta_value)&& !is_object($meta_value)){
1315
- $results=maybe_unserialize(html_entity_decode($meta_value));
1316
- if(is_array($results)|| is_object($results))$meta_value=$results;
1317
- }
1318
- if($wdebug_mode){
1319
- if(!empty($result) && is_wp_error($result)){
1320
- $errno=$result->get_error_code();
1321
- if($errno >0) $error_msg=__FUNCTION__.' query failed - MySQL error#'.$errno.' '.$result->get_error_message()." \n<br/>SQL=$sql";
1322
- echo "\n<!-- ".__CLASS__." ERROR: ".$error_msg." -->";
1323
- }
1324
- }
1325
- return $meta_value;
1326
- } //end get_wassupmeta
1327
-
1328
- /**
1329
- * Delete a 'wp_wassup_meta' record.
1330
- * - single or multiple records may be deleted by 'meta_id', or 'wassup_key', or 'meta_key' regardless of expire timestamp
1331
- * - 'wassup_key' and 'meta_key' arguments are both required when 'meta_id'=null
1332
- * - wildcards (*) character can be used for bulk delete by either 'meta_key' or 'wassup_key', but not both.
1333
- * USAGE: meta_id|"", [(wassup_key|*),(meta_key|*))].
1334
- *
1335
- * @param mixed (integer $meta_id, string $wassup_key, string $meta_key)
1336
- * @return integer
1337
- */
1338
- function delete_wassupmeta($meta_id,$wassup_key="",$meta_key=""){
1339
- global $wpdb,$wassup_options,$wdebug_mode;
1340
- $meta_table=$wassup_options->wassup_table.'_meta';
1341
- $rows_affected=0;
1342
- $deleted=0;
1343
- $sql="";
1344
- //prepare the sql delete statement from function parameters
1345
- if(wassupDb::table_exists($meta_table)){
1346
- if(!empty($meta_id)){
1347
- $sql=sprintf("DELETE FROM $meta_table WHERE `meta_id`=%d",$meta_id);
1348
- }elseif(!empty($wassup_key)&& !empty($meta_key)){
1349
- if($wassup_key !="*" && $meta_key !="*"){
1350
- $sql=sprintf("DELETE FROM $meta_table WHERE `meta_key`='%s' AND `wassup_key`='%s'",esc_attr($meta_key),esc_attr($wassup_key));
1351
- }elseif($meta_key !="*"){
1352
- $sql=sprintf("DELETE FROM $meta_table WHERE `meta_key`='%s'",esc_attr($meta_key));
1353
- }elseif($wassup_key !="*"){
1354
- $sql=sprintf("DELETE FROM $meta_table WHERE `wassup_key`='%s'",esc_attr($wassup_key));
1355
- }
1356
- }else{
1357
- $error_msg=__FUNCTION__.' failed - bad or missing arguments!'."&nbsp; (meta_id=".esc_attr($meta_id)." , &nbsp;wassup_key=".esc_attr($wassup_key)." , &nbsp;meta_key=".esc_attr($meta_key).")";
1358
- }
1359
- }else{
1360
- $error_msg=__FUNCTION__.' failed - table '.$meta_table.' does not exist!';
1361
- }
1362
- //do the delete
1363
- if(!empty($sql)){
1364
- $deleted=$wpdb->query($sql);
1365
- $errno=0;
1366
- if(is_wp_error($deleted)){
1367
- $errno=$deleted->get_error_code();
1368
- if($errno >0)$error_msg=' delete_wassupmeta failed with MySQL error#'.$errno.' '.$deleted->get_error_message(). " \n<br/>SQL=$sql";
1369
- }
1370
- $deleted=$wpdb->rows_affected+0;
1371
- }
1372
- if(!empty($error_msg)){
1373
- if($wdebug_mode) echo "\n<!-- ".__CLASS__." ERROR: ".$error_msg." -->";
1374
- }
1375
- return $deleted;
1376
- } //end delete_wassupmeta
1377
-
1378
- /**
1379
- * clean data for insertion into mySQL.
1380
- * - to prevent SQL injection - renamed from wSanitizeData
1381
- * - an alternative to "wpdb::prepare" for older WP versions.
1382
- * @since WassUp 1.7 (as wSanitizeData)
1383
- * @param string $var, boolean $quotes
1384
- * @return string
1385
- */
1386
- function sanitize($var,$quotes=false){
1387
- global $wpdb;
1388
- //clean strings and add quotes
1389
- if(is_string($var)){
1390
- $varstr=stripslashes($var);
1391
- //sanitize urls separately
1392
- if(strpos($varstr,'://')!==false){
1393
- if(function_exists('esc_url_raw'))$varstr=esc_url_raw($varstr);
1394
- else $varstr=esc_url($varstr,null,'db');
1395
- //oops, clean_url chomp
1396
- if(empty($varstr))$varstr=esc_attr(stripslashes($var));
1397
- }else{
1398
- $varstr=esc_sql($varstr);
1399
- }
1400
- if($quotes)$var="'". $varstr ."'";
1401
- else $var=$varstr;
1402
- //convert boolean variables to binary boolean
1403
- }elseif(is_bool($var)&& $quotes){
1404
- $var=($var)?1:0;
1405
- //convert null variables to SQL NULL
1406
- }elseif(is_null($var)&& $quotes){
1407
- $var="NULL";
1408
- }
1409
- //note numeric values do not need to be sanitized
1410
- return "$var";
1411
- } //end sanitize
1412
-
1413
- /**
1414
- * Escape special characters for use in an SQL 'like' query.
1415
- * - uses 'like_escape' or 'wpdb::esc_like' depending on Wordpress version
1416
- * @param string $sqlstring
1417
- * @return string
1418
- */
1419
- function esc_like($sqlstring){
1420
- global $wpdb;
1421
- $escaped_string=$sqlstring;
1422
- if(!empty($sqlstring)){
1423
- if(method_exists($wpdb,'esc_like')) $escaped_string= $wpdb->esc_like($sqlstring);
1424
- else $escaped_string=like_escape($sqlstring);
1425
- }
1426
- return $escaped_string;
1427
- }
1428
-
1429
- /**
1430
- * Return an MySQL system variable value.
1431
- * @todo find cause of mysql timeout error when looking up dbengine for wp_wassup table
1432
- * @since 1.7.2 (as wassupOptions::getMySQLsetting)
1433
- * @param string
1434
- * @return string
1435
- */
1436
- function get_db_setting($mysql_var,$mysql_table="") {
1437
- global $wpdb,$wassup_options,$wdebug_mode;
1438
- $mysql_value=false;
1439
- $error_msg="";
1440
- if(empty($mysql_table)) $mysql_table=$wassup_options->wassup_table;
1441
- //get the table storage engine
1442
- if($mysql_var=="engine" || $mysql_var=="dbengine"){
1443
- if(!empty($mysql_table)){
1444
- //New in v1.9: replaced cpu-intensive "show table status" query with "show create table" for faster table engine lookup
1445
- $sql="SHOW CREATE TABLE $mysql_table";
1446
- $result=$wpdb->get_results($sql,ARRAY_N);
1447
- if(!empty($result)){
1448
- if(!is_wp_error($result)){
1449
- if(!empty($result[0][1]) && preg_match('/\sENGINE\=(\w+)\s/',$result[0][1],$pcs)>0) $mysql_value=$pcs[1];
1450
- }else{
1451
- $errno=$result->get_error_code();
1452
- if($errno >0) $error_msg=' get_db_setting('.$mysql_var.') failed with MySQL error#'.$errno.' '.$myresult->get_error_message()."\n";
1453
- }
1454
- }
1455
- }
1456
- //default to db storage engine when no table
1457
- if(empty($mysql_value)) {
1458
- $result=$wpdb->get_results("SHOW VARIABLES LIKE 'storage_engine'",ARRAY_A);
1459
- if(!empty($result) && !is_wp_error($result) && !empty($result[0]->Value)) $mysql_value=$result[0]->Value;
1460
- }
1461
- //get the timezone
1462
- }elseif ($mysql_var == "timezone") {
1463
- $sql_timezone=false;
1464
- $sql_sys_timezone="";
1465
- $result=$wpdb->get_results("SHOW VARIABLES LIKE '%zone'");
1466
- if(!is_wp_error($result)){
1467
- foreach ($result as $col) {
1468
- if ($col->Variable_name == "system_time_zone") {
1469
- $sql_sys_timezone=$col->Value;
1470
- } elseif ($col->Variable_name == "time_zone") {
1471
- $sql_timezone=$col->Value;
1472
- } elseif ($col->Variable_name == "timezone") {
1473
- $sql_timezone=$col->Value;
1474
- }
1475
- }
1476
- if ($sql_timezone == "SYSTEM" || empty($sql_timezone)) {
1477
- $host_timezone=$wassup_options->getHostTimezone();
1478
- if (!empty($host_timezone)) {
1479
- $sql_timezone=$host_timezone;
1480
- } else {
1481
- $sql_timezone=$sql_sys_timezone;
1482
- }
1483
- }
1484
- }
1485
- if (!empty($sql_timezone)) $mysql_value=$sql_timezone;
1486
- //get timezone offset for today's date.
1487
- } elseif ($mysql_var == "tzoffset") {
1488
- $tzoffset=false;
1489
- $result=$wpdb->get_var("SELECT NOW() AS tnow FROM DUAL");
1490
- //calculate mysql timezone offset by converting MySQL's NOW() to a timestamp and subtracting UTC current time from it.
1491
- // Note: conversion to timestamp is affected by PHP TZ setting, so remove that offset from calculation
1492
- if(!empty($result) && !is_wp_error($result)){
1493
- $now=((int)(time()/1800))*1800; //truncate to 1/2 hour
1494
- if(function_exists('date_timestamp_get')){
1495
- $mysql_dt=new DateTime($result);
1496
- $mysql_time=$mysql_dt->getTimestamp();
1497
- $adjust=$mysql_dt->getOffset();
1498
- }else{
1499
- $mysql_time=strtotime($result);
1500
- $adjust=(int)date('Z');
1501
- }
1502
- $tzoffset=((int)($mysql_time/1800))*1800 - $now;
1503
- if(is_numeric($adjust)) $tzoffset +=$adjust;
1504
- //change offset to MySQL "[+-]hh:mm" format
1505
- $mysql_value=wassupDb::format_tzoffset($tzoffset);
1506
- }
1507
- //get a mysql variable with parameter name
1508
- } elseif(!empty($mysql_var)) {
1509
- $result=$wpdb->get_results(sprintf("SHOW VARIABLES LIKE '%s'",wassupDb::esc_like(esc_attr($mysql_var))));
1510
- if (!is_wp_error($result) && !empty($result)) {
1511
- foreach ($result as $col) {
1512
- if ($col->Variable_name == $mysql_var) {
1513
- $mysql_value=$col->Value;
1514
- break 1;
1515
- }
1516
- }
1517
- }
1518
- }
1519
- if($wdebug_mode){
1520
- if(!empty($result) && is_wp_error($result)){
1521
- $errno=$result->get_error_code();
1522
- if($errno >0) $error_msg .=' get_db_setting('.$mysql_var.') failed with MySQL error#'.$errno.' '.$result->get_error_message();
1523
- }
1524
- if(!empty($error_msg)) echo "\n<!-- ".__CLASS__." ERROR: ".$error_msg." -->";
1525
- }
1526
- return $mysql_value;
1527
- } //end get_db_setting
1528
-
1529
- /**
1530
- * Convert an offset to MySQL "[+-]hh:mm" format.
1531
- * - offset is converted from seconds or hours to MySQL "[+-]hh:mm" format.
1532
- * @since 1.8 (as wassupOptions::formatTimezoneOffset)
1533
- * @param string
1534
- * @return string
1535
- */
1536
- function format_tzoffset($offset=false) {
1537
- $tzoffset=false;
1538
- if(preg_match('/^[\-+]?[0-9\.]+$/',$offset)>0){ //must be a number
1539
- //convert seconds to hours:minutes
1540
- $n=false;
1541
- if($offset > 12 || $offset < -12) $noffset=$offset/3600;
1542
- else $noffset=$offset;
1543
- $n = strpos($noffset,'.');
1544
- if($n !== false){
1545
- $offset_hrs=substr($noffset,0,$n);
1546
- $offset_min=(int)substr($noffset,$n+1)*6;
1547
- }else{
1548
- $offset_hrs=$noffset;
1549
- $offset_min=0;
1550
- }
1551
- if($offset < 0) $tzoffset=sprintf("%d:%02d",$offset_hrs,$offset_min);
1552
- else $tzoffset="+".sprintf("%d:%02d",$offset_hrs,$offset_min);
1553
- }elseif(preg_match('/^([\-+])?(\d{1,2})?\:(\d{2})/',$offset,$match)>0){
1554
- if(empty($match[2])) $match[2]="0";
1555
- if(!empty($match[1]) && $match[1]=="-") $tzoffset="-".sprintf("%d:%02d",$match[2],$match[3]);
1556
- else $tzoffset="+".sprintf("%d:%02d",$match[2], $match[3]);
1557
- }
1558
- return $tzoffset;
1559
- } //end format_tzoffset
1560
-
1561
- /**
1562
- * Perform scheduled/delayed db operations on wassup tables.
1563
- * - for use with 'wp_schedule_event' hook.
1564
- * @param array
1565
- * @return void
1566
- */
1567
- function scheduled_dbtask($args=array()){
1568
- global $wpdb,$wdebug_mode;
1569
- //get dbtasks argument
1570
- $dbtasks=array();
1571
- if(!empty($args)){
1572
- if(!is_array($args)) $args=maybe_unserialize($args);
1573
- if(isset($args['dbtasks'])){
1574
- extract($args);
1575
- }elseif(is_array($args)){
1576
- $dbtasks=$args;
1577
- }else{
1578
- $dbtasks[]=$args;
1579
- }
1580
- }
1581
- if(!empty($dbtasks) && !is_array($dbtasks)){
1582
- $args=maybe_unserialize($dbtasks);
1583
- if(is_array($args)) $dbtasks=$args;
1584
- }
1585
- $wassup_settings=get_option('wassup_settings');
1586
- $table_prefix=$wassup_settings['wassup_table'];
1587
- $affected_recs=0;
1588
- $dbtask_errors=array();
1589
- if(!empty($dbtasks) && is_array($dbtasks)){
1590
- //some db operations can be slow on large tables, so extend script execution time up to 30 minutes
1591
- if(!ini_get('safe_mode')) @set_time_limit(1800);
1592
- //increase mysql session timeout to 15 minutes
1593
- $mtimeout=$wpdb->get_var("SELECT @@session.wait_timeout AS mtimeout FROM DUAL");
1594
- if(!empty($mtimeout) && !is_wp_error($mtimeout) && is_numeric($mtimeout) && $mtimeout< 900){
1595
- $result=$wpdb->query("SET wait_timeout=900");
1596
- }
1597
- foreach($dbtasks as $db_sql){
1598
- $results=false;
1599
- $error_msg="";
1600
- //limit allowed sql to certain tasks and to Wassup tables only
1601
- if(strpos($db_sql,"DELETE FROM `$table_prefix")!==false){
1602
- $results=$wpdb->query($db_sql);
1603
- }elseif(strpos($db_sql,"UPDATE LOW_PRIORITY `$table_prefix")!==false){
1604
- $results=$wpdb->query($db_sql);
1605
- }elseif(strpos($db_sql,"UPDATE `$table_prefix")!==false){
1606
- $results=$wpdb->query($db_sql);
1607
- }elseif(strpos($db_sql,"OPTIMIZE TABLE `$table_prefix")!==false){
1608
- $results=$wpdb->query($db_sql);
1609
- }else{
1610
- //bad dbtask, create an error record
1611
- $error_msg =" ERROR: Unknown task ".esc_attr($db_sql);
1612
- }
1613
- //check for errors in mysql results
1614
- if(!empty($results) && is_wp_error($results)){
1615
- $dbtask_errors[]=" ERROR: wpdb error#".$results->get_error_code().": ".$results->get_error_message()." for sql=$db_sql";
1616
- }elseif(!empty($error_msg)){
1617
- $dbtask_errors[]=$error_msg;
1618
- }else{
1619
- $affected_recs += $wpdb->rows_affected + 0;
1620
- }
1621
- } //end foreach
1622
- } //end if dbtasks
1623
- if(!empty($wdebug_mode)){
1624
- //email error output from cron
1625
- $message="";
1626
- if(!empty($dbtask_errors)){
1627
- $subject=sprintf(__("%s Error!","wassup"),'Wassup wp-cron');
1628
- $message ="scheduled dbtask encountered an error:\n";
1629
- foreach($dbtask_errors AS $error_msg){
1630
- $message .=$error_msg."\n";
1631
- }
1632
- //}else{
1633
- // $message ="scheduled dbtask completed successfully. Records affected=$affected_recs";
1634
- }
1635
- if(!empty($message)){
1636
- $blogurl = wassupURI::get_sitehome();
1637
- $recipient=get_bloginfo('admin_email');
1638
- $sender='From: '.get_bloginfo('name').' <wassup_noreply@'.parse_url($blogurl,PHP_URL_HOST).'>';
1639
- wp_mail($recipient,$subject,$message,$sender);
1640
- }
1641
- }
1642
- //return $affected_recs; //don't return anything
1643
- } //end scheduled_dbtask
1644
-
1645
- /**
1646
- * cleanup wassup temporary records (hourly via wp-cron):
1647
- * - delete inactive records from wassup_tmp
1648
- * - delete expired cache records from wassup_meta
1649
- *
1650
- * Inactive wassup_tmp records vary by visitor type:
1651
- * - logged-in users are inactive after 10 minutes
1652
- * - anonymous users are inactive after 3 minutes
1653
- * - spiders are inactive after 1 minute
1654
- * @since v1.9
1655
- * @return void
1656
- */
1657
- function temp_cleanup(){
1658
- global $wpdb,$wassup_options;
1659
- $wassup_table=$wassup_options->wassup_table;
1660
- $wassup_tmp_table=$wassup_table . "_tmp";
1661
- $wassup_meta_table=$wassup_table . "_meta";
1662
- $timestamp=current_time('timestamp');
1663
- $timenow=(int)time();
1664
- //delete inactive records from wassup_tmp table
1665
- $result=$wpdb->query(sprintf("DELETE FROM `%s` WHERE `timestamp`<'%d' OR (`timestamp`<'%d' AND `username`='') OR (`timestamp`<'%d' AND `spider`!='')",$wassup_tmp_table,(int)$timestamp - 10*60,(int)$timestamp - 3*60,(int)$timestamp - 60));
1666
- //delete expired cache records from wassup_meta
1667
- $result=$wpdb->query(sprintf("DELETE FROM `%s` WHERE `meta_expire`>'0' AND `meta_expire`<'%d'",$wassup_meta_table,$timenow - 3600));
1668
- }
1669
- /**
1670
- * Do automatic purge of old records from wassup table (daily via wp-cron)
1671
- * @since v1.9
1672
- */
1673
- function auto_cleanup(){
1674
- global $wpdb,$wassup_options;
1675
- $deleted=0;
1676
- //do purge of old records
1677
- if(!empty($wassup_options->delete_auto) && $wassup_options->delete_auto!="never"){
1678
- $wassup_table=$wassup_options->wassup_table;
1679
- $wassup_meta_table=$wassup_table . "_meta";
1680
- $timestamp=current_time('timestamp');
1681
- $timenow=(int)time();
1682
- //use visit timestamp not current time for delete
1683
- $delete_from= @strtotime($wassup_options->delete_auto,$timestamp);
1684
- $delete_filter="";
1685
- $rows=0;
1686
- if(is_numeric($delete_from) && $delete_from < $timestamp){
1687
- $delete_condition="`timestamp`<'$delete_from'";
1688
- //check for delete filters
1689
- if(!empty($wassup_options->delete_filter)){
1690
- if($wassup_options->delete_filter!="all"){
1691
- $delete_filter=$wassup_options->getFieldOptions("delete_filter","sql",$wassup_options->delete_filter);
1692
- if(!is_string($delete_filter)) $delete_filter="";
1693
- }else{
1694
- $delete_filter="";
1695
- }
1696
- }
1697
- $multisite_whereis="";
1698
- if($wassup_options->network_activated_plugin() && !empty($GLOBALS['current_blog']->blog_id)){
1699
- $multisite_whereis = sprintf(" AND `subsite_id`=%d",(int)$GLOBALS['current_blog']->blog_id);
1700
- }
1701
- $delete_filter .= $multisite_whereis;
1702
- $result=$wpdb->get_var(sprintf("SELECT COUNT(`id`) FROM `%s` WHERE `timestamp`<'%d' %s",$wassup_table,$delete_from,$delete_filter));
1703
- if(!empty($result) && !is_wp_error($result) && is_numeric($result)) $rows=$result;
1704
-
1705
- } //end if delete_from
1706
- //do delete only when there are 50+ records
1707
- if($rows >50){
1708
- $deleted=$wpdb->query(sprintf("DELETE FROM `%s` WHERE `timestamp`<'%d' %s",$wassup_table,$delete_from,$delete_filter));
1709
- //save delete_auto timestamp to prevent multiple auto deletes in 1 day
1710
- if(!empty($deleted) && !is_wp_error($deleted)){
1711
- $expire=time()+24*3600;
1712
- $cache_id=wassupDb::update_wassupmeta($wassup_table,'_delete_auto',$timestamp,$expire);
1713
- //clear table_status from wassup_meta cache after auto delete
1714
- $result=$wpdb->query(sprintf("DELETE FROM `%s` WHERE `wassup_key`='%s' AND `meta_key`='_table_status'",$wassup_table."_meta",$wassup_table));
1715
- //reschedule optimize to run today when bulk delete larger than 1000 records
1716
- if($deleted >1000 && !empty($wassup_optimize)){
1717
- $wassup_optimize=$timenow - 24*60*60;
1718
- }
1719
- }else{
1720
- $deleted=0;
1721
- }
1722
- }
1723
- } //end if delete_auto
1724
- if(!empty($wdebug_mode)){
1725
- //email delete message from cron
1726
- $message="";
1727
- if($deleted > 0){
1728
- $subject=__("Wassup auto-delete notice","wassup");
1729
- $message =sprintf(__("Auto-delete deleted %d old %s table records today.","wassup"),$deleted,$wassup_options->wassup_table);
1730
- $blogurl = wassupURI::get_sitehome();
1731
- $recipient=get_bloginfo('admin_email');
1732
- $sender='From: '.get_bloginfo('name').' <wassup_noreply@'.parse_url($blogurl,PHP_URL_HOST).'>';
1733
- wp_mail($recipient,$subject,$message,$sender);
1734
- }
1735
- }
1736
- } //end auto_cleanup
1737
-
1738
- /**
1739
- * Retrieve raw data from wassup table in SQL format for export.
1740
- * - taken partially from wp-db-backup plugin by Alain Wolf, Zurich, SW - http://www.ilfilosofo.com/blog/wp-db-backup/
1741
- * - a partial export is returned if script execution timelimit of 15 minutes is exceeded
1742
- * - the record id of last record exported (last_recid) is cached to 'wassup_meta' table.
1743
- *
1744
- * @param string(3) $table, $condition, $segment
1745
- * @return string ($sql)
1746
- */
1747
- function backup_table($table,$condition="",$segment='none'){
1748
- global $wpdb,$current_user,$wassup_options,$wdebug_mode;
1749
- define('ROWS_PER_SEGMENT', 600);
1750
- if(!is_object($current_user) || empty($current_user->ID)){
1751
- $user=wp_get_current_user();
1752
- }
1753
- if(!empty($current_user->ID)){
1754
- $wassup_user_settings=get_user_option('_wassup_settings',$current_user->ID);
1755
- }else{
1756
- $err_msg=__("Export ERROR: login required!","wassup");
1757
- $wassup_options->wassup_alert_message=$err_msg;
1758
- $wassup_options->saveSettings();
1759
- return false;
1760
- }
1761
- if(empty($table))$table=$wassup_options->wassup_table;
1762
- $sql_table_name=$wpdb->get_var(sprintf("SHOW TABLES LIKE '%s'",wassupDb::esc_like(esc_attr($table))));
1763
- if(empty($sql_table_name) || $sql_table_name!=$table || is_wp_error($sql_table_name)){
1764
- $err_msg=sprintf(__('Error with TABLE %s: Not found','wassup'), esc_attr($table));
1765
- $wassup_user_settings['ualert_message']=$err_msg;
1766
- update_user_option($current_user->ID,'_wassup_settings',$wassup_user_settings);
1767
- return FALSE;
1768
- }
1769
- $sql="";
1770
- $err_msg=false;
1771
- $did_export=false;
1772
- $timelimit=15*60;
1773
- $mtimeout=60;
1774
- $stimeout=ini_get('max_execution_time');
1775
- $stimer_start=time();
1776
- $row_count=0;
1777
- $last_recid=0;
1778
- $exclude_id=false;
1779
- if(isset($_REQUEST['omit_recid']))$exclude_id=true;
1780
- if(!empty($_REQUEST['expid'])&& is_numeric($_REQUEST['expid']))$backup_id=(int)$_REQUEST['expid'];
1781
- else $backup_id=date('YmdH',current_time('timestamp'));
1782
- //Add comments to each section of export file
1783
- if($segment=='none' || $segment==0){
1784
- $result=$wpdb->get_results(sprintf("SHOW CREATE TABLE `%s`",esc_attr($table)),ARRAY_N);
1785
- if(empty($result[0][1]) || is_wp_error($result)) {
1786
- $err_msg=sprintf(__('Error with "SHOW CREATE TABLE" for %s.','wassup'), esc_attr($table));
1787
- }else{
1788
- $table_create=$result[0][1];
1789
- $first_recid=$wpdb->get_var(sprintf("SELECT MIN(`id`) FROM %s %s",esc_attr($table),$condition));
1790
- if(!is_numeric($first_recid)) $first_recid=0;
1791
- //add comments for table structure section
1792
- $sql .="\n#\n";
1793
- $sql .="# " . sprintf(__('Table structure of table %s','wassup'),esc_attr($table))."\n#\n";
1794
- //replace "CREATE TABLE" with "CREATE TABLE IF NOT EXISTS" and remove AUTO_INCREMENT=NNN value from $table_create
1795
- $sql .=preg_replace(array('/^CREATE\sTABLE\s(IF\sNOT\sEXISTS\s)?/i', '/AUTO_INCREMENT\=\d+\s/i'),array('CREATE TABLE IF NOT EXISTS ',''),$table_create).' ;';
1796
- $sql .="\n#\n";
1797
- //add comments for data section
1798
- $sql .="# Start time: ".date('r',current_time('timestamp'))." 1st exported ID: $first_recid \n";
1799
- $sql .='# ' . sprintf(__('Data contents of table %s','wassup'),esc_attr($table))."\n#\n";
1800
- }
1801
- }
1802
- //Check for table records
1803
- if(empty($err_msg)){
1804
- $table_structure=$wpdb->get_results(sprintf("SHOW COLUMNS FROM %s",esc_attr($table)));
1805
- if(is_wp_error($table_structure)){
1806
- $errno=$table_structure->get_error_code();
1807
- $err_msg=sprintf(__('Error getting table structure of %s: %s','wassup'), esc_attr($table),$errno.' '.$table_structure->get_error_message());
1808
- $table_structure=false;
1809
- }elseif(false == $table_structure){
1810
- $err_msg=sprintf(__('Error getting table structure of %s','wassup'), esc_attr($table));
1811
- }
1812
- $numrecords=$wpdb->get_var(sprintf("SELECT COUNT(*) FROM %s %s",esc_attr($table), $condition));
1813
- if(empty($numrecords)|| !is_numeric($numrecords)){
1814
- if(is_wp_error($numrecords)){
1815
- $errno=$numrecords->get_error_code();
1816
- $err_msg=sprintf(__('Error with table %s: %s','wassup'), esc_attr($table),$errno.' '.$numrecords->get_error_message());
1817
- }else{
1818
- $err_msg=sprintf(__('Error with table %s: No data','wassup'), esc_attr($table));
1819
- }
1820
- $numrecords=0;
1821
- }
1822
- }
1823
- //ABORT due to table error
1824
- if(!empty($err_msg)){
1825
- $wassup_user_settings['ualert_message']=$err_msg;
1826
- update_user_option($current_user->ID,'_wassup_settings',$wassup_user_settings);
1827
- return FALSE;
1828
- }
1829
- //Extend php script timeout to 10 minutes
1830
- //TODO: 'safe_mode' deprecated
1831
- if(!@ini_get('safe_mode')){if(empty($stimeout)|| $stimeout < (10*60))@set_time_limit(10*60);}
1832
- $stimeout=10*60;
1833
- //set mysql wait timeout to 15 minutes
1834
- $mtimeout=$wpdb->get_var("SELECT @@session.wait_timeout AS mtimeout FROM DUAL");
1835
- if(!empty($mtimeout) && !is_wp_error($mtimeout)){
1836
- if(!is_numeric($mtimeout)|| $mtimeout<$timelimit) $results=$wpdb->query(sprintf("SET wait_timeout = %d",($timelimit+60)));
1837
- elseif($mtimeout >3600)$timelimit=3600; //up to 1 hour
1838
- else $timelimit=$mtimeout;
1839
- }else{
1840
- $results=$wpdb->query(sprintf("SET wait_timeout = %d",($timelimit+60)));
1841
- }
1842
- $defs=array();
1843
- $ints=array();
1844
- $cols="";
1845
- $i=0;
1846
- foreach($table_structure as $col){
1847
- //omit ID field from export
1848
- if($exclude_id && $col->Field=="id" && $col->Extra=="auto_increment")continue;
1849
- //differentiate numeric fields from char fields
1850
- if((0===strpos(strtolower($col->Type),'tinyint'))||
1851
- (0===strpos(strtolower($col->Type),'smallint'))||
1852
- (0===strpos(strtolower($col->Type),'mediumint'))||
1853
- (0===strpos(strtolower($col->Type),'int'))||
1854
- (0===strpos(strtolower($col->Type),'bigint'))||
1855
- (0===strpos(strtolower($col->Type),'timestamp'))){
1856
- $defs[$col->Field]=$col->Default;
1857
- $ints[$col->Field]="1";
1858
- }
1859
- if($i==0)$cols .='`'.$col->Field.'`';
1860
- else $cols .=', `'.$col->Field.'`';
1861
- $i++;
1862
- } //end foreach $table_structure
1863
-
1864
- // Batch by $row_inc
1865
- if($segment=='none'){$row_start=0;$row_inc=ROWS_PER_SEGMENT;}
1866
- else{$row_start=$segment*ROWS_PER_SEGMENT;$row_inc=ROWS_PER_SEGMENT; }
1867
- $i=1;
1868
- $entries="INSERT INTO `".esc_attr($table)."` ($cols) VALUES ";
1869
- $search=array("\x00", "\x0a", "\x0d", "\x1a");
1870
- $replace=array('\0','\n','\r','\Z');
1871
- $last_recid=0;
1872
- $export_count=0;
1873
- $err_msg="";
1874
- do{
1875
- $row_count=0;
1876
- $qry=sprintf("SELECT SQL_BUFFER_RESULT $cols FROM %s %s ORDER BY `id` LIMIT %d, %d",esc_attr($table),$condition,$row_start,$row_inc);
1877
- $table_data=$wpdb->get_results($qry);
1878
- if(is_wp_error($table_data)) {
1879
- $errno=$table_data->get_error_code();
1880
- $err_msg=sprintf(__('Error exporting data from table %s: %s','wassup'), esc_attr($table),$errno.' '.$table_data->get_error_message());
1881
- }elseif(is_array($table_data)){
1882
- $row_count=count($table_data);
1883
- }
1884
- if($row_count>0){
1885
- $j=0;
1886
- foreach($table_data AS $row){
1887
- $values="";$row_sql="";$n=0;
1888
- foreach($row AS $key=>$value){
1889
- //track last id exported
1890
- if($key=='id'){
1891
- $last_recid=$value;
1892
- //omit 'id' from export
1893
- if($exclude_id)continue;
1894
- }
1895
- if(isset($ints[$key])){$val=(''===$value)?"''":$value;}
1896
- elseif(function_exists('esc_sql')){$val="'".str_replace($search,$replace,esc_sql($value))."'";}
1897
- else{$val="'".str_replace($search,$replace,addslashes($value))."'";}
1898
- if($n==0)$values=$val;
1899
- else $values .=','.$val;
1900
- $n++;
1901
- } //end foreach row
1902
- //new "insert" statement every 50 rows
1903
- if($j==0){$row_sql="\n".$entries."\n";}
1904
- elseif($j%50==0){$row_sql .=";\n".$entries."\n";}
1905
- else{$row_sql .=",\n";}
1906
- $row_sql .='('.$values.')';
1907
- $sql .=$row_sql;
1908
- $j++;
1909
- } //end foreach table_data
1910
- if(!empty($sql))$sql .=";\n"; //ending semicolon
1911
- $row_start +=$row_count; //$row_start += $row_inc;
1912
- $export_count=$export_count+$row_count;
1913
- $did_export=true;
1914
- } //end if row_count >0
1915
- $i++;
1916
- //stop export if near script timeout limit
1917
- if((time()-$stimer_start)>$stimeout-10 || !empty($err_msg)){
1918
- $did_export=false;
1919
- break;
1920
- }
1921
- }while($row_count >0 &&($segment=='none'));
1922
- //reset mysql wait timeout to default
1923
- if(empty($mtimeout)|| !is_numeric($mtimeout))$mtimeout=60;
1924
- $wpdb->query("SET wait_timeout=$mtimeout");
1925
- // Create footer/closing comment in SQL-file
1926
- if($segment=='none' || $segment<0){
1927
- $sql .="\n";
1928
- if($did_export){
1929
- $sql .="# ".sprintf(__('End of data contents of table %s','wassup'),$table)."\n";
1930
- }else{
1931
- $sql .="# ".sprintf(__('Interrupted data contents of table %s','wassup'),$table)."\n";
1932
- if(!empty($err_msg)) $sql .="# $errmsg\n";
1933
- }
1934
- $sql .="# --------------------------------------------------------\n";
1935
- if($wdebug_mode){
1936
- $elapsed_time=time()-$stimer_start;
1937
- $sql .="# Timeout length=$timelimit seconds. Elapsed time=$elapsed_time seconds\n";
1938
- $sql .="# --------------------------------------------------------\n";
1939
- }
1940
- $sql .="#\n# ".sprintf(__("End time: %d","wassup"),date('r',current_time('timestamp')))." \n";
1941
- $sql .="# ".sprintf(__("%d out of %d records exported.","wassup"),$export_count,$numrecords)." ".sprintf(__("Last record ID: %d","wassup"),$last_recid)." \n";
1942
- $sql .="\n";
1943
- }
1944
- //save export success message for admin alert notice
1945
- if(!empty($sql)){
1946
- $wassup_user_settings['ualert_message']=sprintf(__("%d out of %d records exported.","wassup"),$export_count,$numrecords)." ".sprintf(__("Last record ID: %d","wassup"),$last_recid);
1947
- update_user_option($current_user->ID,'_wassup_settings',$wassup_user_settings);
1948
- $saved=wassupDb::update_wassupmeta($table,'_export_recid-'.$current_user->ID,$last_recid,0);
1949
- }
1950
- return $sql;
1951
- } // end backup_table
1952
-
1953
- } //end class wassupDb
1954
- } //end if !class_exists
1955
-
1956
- if(!class_exists('wassupURI')){
1957
- /**
1958
- * Static class containing methods to format and clean urls/links for safe output.
1959
- * @since v1.9
1960
- * @author Helene D. <http://helenesit.com>
1961
- */
1962
- class wassupURI {
1963
- /**
1964
- * Return a value of true if url argument is a root url and false when url constains a subdirectory path or query parameters.
1965
- * - renamed from url_rootcheck() function.
1966
- */
1967
- function is_root_url($url){
1968
- $isroot=false;
1969
- if(strpos($url,'.')>0){
1970
- $urlparts=parse_url($url);
1971
- if(!empty($urlparts['host']))$isroot=true;
1972
- if(!empty($urlparts['path'])&& $urlparts['path'] !="/")$isroot=false;
1973
- elseif(!empty($urlparts['query']))$isroot=false;
1974
- }
1975
- return $isroot;
1976
- }
1977
- /**
1978
- * Return a url with "$blogurl" prepended for sites that have wordpress installed in a separate folder.
1979
- * - renamed from wAddSiteurl() function.
1980
- */
1981
- function add_siteurl($inputurl){
1982
- if(preg_match('/^https?\:/',$inputurl)===false){
1983
- if(function_exists('get_site_url')){
1984
- $outputurl=get_site_url($inputurl);
1985
- }else{
1986
- $siteurl=rtrim(wassupURI::get_sitehome(),"/");
1987
- $wpurl=rtrim(wassupURI::get_wphome(),"/");
1988
- if(strcasecmp($siteurl,$wpurl)==0)$outputurl=$inputurl;
1989
- elseif(stristr($inputurl,$siteurl)===FALSE && wassupURI::is_root_url($siteurl))$outputurl=$siteurl."/".ltrim($inputurl,"/");
1990
- else $outputurl=$inputurl;
1991
- $outputurl=rawurldecode(html_entity_decode($outputurl)); //dangerous
1992
- $outputurl=wassupURI::cleanURL($outputurl); //safe
1993
- }
1994
- return $outputurl;
1995
- }else{
1996
- return $inputurl;
1997
- }
1998
- }
1999
- /** Return the url and "path" for wordpress site's "home". */
2000
- function get_sitehome(){
2001
- $sitehome=get_option('siteurl');
2002
- if(is_multisite() && is_network_admin()){
2003
- $sitehome=network_home_url();
2004
- }elseif(empty($sitehome)){
2005
- $sitehome=get_option('home');
2006
- }
2007
- return $sitehome;
2008
- } //end get_homeurl
2009
-
2010
- //** Return the url and "path" for wordpress admin. */
2011
- function get_wphome(){
2012
- $wphome=admin_url();
2013
- if(is_multisite() && is_network_admin()){
2014
- $wphome=network_admin_url();
2015
- }elseif(empty($wphome)){
2016
- $wphome=get_option('wpurl');
2017
- }
2018
- return $wphome;
2019
- } //end get_wphome
2020
-
2021
- /** Return a request url or a text string if url is malware/hack attempt or 404. @since v1.9 */
2022
- function url_link($urlrequested,$chars=0,$spam=0){
2023
- global $wassup_options;
2024
- $urllink=false;
2025
- if(empty($chars)|| !is_numeric($chars))$chars=(int)$wassup_options->wassup_screen_res/10;
2026
- $request=strtolower($urlrequested);
2027
- if(strlen($request)>60)$tooltip=' title="'.wassupURI::disarm_attack($request).'" ';
2028
- else $tooltip="";
2029
- //no link for spam or 404 or wordpress admin
2030
- if(preg_match('/^(\[|\%5B)\d{3}(\]|\%5D)/',$urlrequested)>0 || !empty($spam)) $urllink="<span{$tooltip}>".stringShortener("$urlrequested",round($chars*.9,0))."</span>";
2031
- else $urllink='<a href="'.wassupURI::add_siteurl("$urlrequested").'" target="_BLANK">'.stringShortener("$urlrequested",$chars).'</a>';
2032
- return $urllink;
2033
- }
2034
- /** Return an external referrer link or a text string if link is internal, or is spam or 404. @since v1.9 */
2035
- function referrer_link($referer,$requesturl,$chars=0,$spam=0){
2036
- global $wassup_options;
2037
- $referrerlink=false;
2038
- if(!empty($referer)){
2039
- $wpurl=wassupURI::get_wphome();
2040
- $siteurl=wassupURI::get_sitehome();
2041
- $adminurl=admin_url("");
2042
- if(empty($chars)|| !is_numeric($chars))$chars=(int)($wassup_options->wassup_screen_res/10);
2043
- $tooltip="";
2044
- $ref=strtolower($referer);
2045
- if(strlen($ref)>60)$tooltip=' title="'.wassupURI::disarm_attack($ref).'" ';
2046
- if($spam==0 && stristr($referer,$adminurl)!=$referer && stristr($ref,$siteurl)!=$referer){
2047
- $favicon_img="";
2048
- $rurl=parse_url($referer);
2049
- if(!empty($rurl['host']) && preg_match('/\.[a-z]{2,4}$/',$rurl['host'])>0) $favicon_img='<img src="http://www.google.com/s2/favicons?domain='.$rurl['host'].'" class="favicon"> ';
2050
- //no link for spam
2051
- if(strpos($ref,'http')===false || strpos($ref,'http')>0) $referrerlink=$favicon_img."<span{$tooltip}>".stringShortener($referer,round($chars*.9,0))."</span>";
2052
- else $referrerlink=$favicon_img.'<a href="'.wassupURI::disarm_attack($referer).'" target=_"BLANK"'.$tooltip.'>'.stringShortener($referer,round($chars*.9,0)).'</a>';
2053
- }elseif($spam >0){
2054
- //no link for spam
2055
- $referrerlink="<span{$tooltip}>".stringShortener("$referer",round($chars*.9,0))."</span>";
2056
- }elseif(!empty($requesturl) && $ref == wassupURI::add_siteurl($requesturl)){
2057
- //when request and referrer are same, this is disguised direct hit
2058
- $referrerlink='<span>'.__("direct hit","wassup").'</span>';
2059
- }elseif(strpos($ref,'/wp-includes/')>0 || strpos($ref,'/wp-content/')>0){
2060
- $referrerlink='<a href="'.wassupURI::disarm_attack($referer).'" target=_"BLANK"'.$tooltip.'>'.stringShortener($referer,round($chars*.9,0)).'</a>';
2061
- }else{
2062
- $referrerlink="<span{$tooltip}>".__("from your site","wassup")."</span>";
2063
- }
2064
- }else{
2065
- $referrerlink='<span>'.__("direct hit","wassup").'</span>';
2066
- }
2067
- return $referrerlink;
2068
- } //end referrer_link
2069
-
2070
- /** Return a referrer link for search engines. @since v1.9 */
2071
- function se_link($referer,$chars=0,$spam=0){
2072
- global $wassup_options;
2073
- if(empty($chars)|| !is_numeric($chars))$chars=(int)($wassup_options->wassup_screen_res/10);
2074
- $selink=false;
2075
- if(!empty($referer)){
2076
- $tooltip="";
2077
- $ref=strtolower($referer);
2078
- if(strlen($ref)>60)$tooltip=' title="'.wassupURI::disarm_attack($referer).'" ';
2079
- if(empty($spam))$selink='<a href="'.wassupURI::disarm_attack($referer).'" target=_"BLANK"'.$tooltip.'><span>'.stringShortener($referer,round($chars*.8,0)).'</span></a>';
2080
- else $selink="<span{$tooltip}>".stringShortener($referer,round($chars*.8,0))."</span>";
2081
- }
2082
- return $selink;
2083
- }
2084
-
2085
- /** Remove all ascii codes and replace with '---' in url. Can be used before saving to database */
2086
- function neutralize($url){
2087
- $newurl=wp_kses(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','---',$url),array());
2088
- return $newurl;
2089
- }
2090
- /**
2091
- * Return a url with some chars replaced with safer html-encoded versions and ascii codes removed.
2092
- * - for displaying questionable data in requesturl, referrer and user agent.
2093
- * @since v1.9
2094
- */
2095
- function disarm_attack($url=false){
2096
- if(!empty($url)&& !is_numeric($url)){
2097
- $newurl=str_replace(array(' ','!','$','"','&&','\'','(',')','*',',','.','<','=','>','?','\\','^','`','{','|','~'),array('&#32;','&#33;','&#36;','&#34;','&#38;&#38;','&#39;','&#40;','&#41;','&#42;','&#44;','&#46;','&#60;','&#61;','&#62;','&#63;','&#92;','&#94;','&#96;','&#123;','&#124;','&#126;'),htmlentities(stripslashes(html_entity_decode(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','---',$url)))));
2098
- }else{
2099
- $newurl=$url;
2100
- }
2101
- return $newurl;
2102
- }
2103
- /** Return a url that is sanitized of all potentially dangerous code. */
2104
- function cleanURL($url=""){
2105
- if(!empty($url)&& !is_numeric($url)){
2106
- $loc=wassupURI::disarm_attack($url);
2107
- $allowed=array('http','https','ftp','ftps','mailto','news','irc','gopher','nntp','feed','telnet','mms','rtsp','svn','tel','fax','xmpp','webcal');
2108
- $loc=wp_kses_bad_protocol($loc,$allowed);
2109
- $cleaned_url=preg_replace(array('/([^a-df-wyz])\-/i','/\-([^a-df-wyz])/i','#\:([^/]{2})#','/([^0-9]{2,3})\;/','/([^&])#/'),array('\1&#45;','&#45;\1','&#58;\1','\1&#59;','\1&#35;'),esc_attr($loc));
2110
- }else{
2111
- $cleaned_url=$url;
2112
- }
2113
- return $cleaned_url;
2114
- } //end cleanURL
2115
-
2116
- /**
2117
- * Return the 'page' query parameter or the menu link query parameter 'ml' for a wassup-stats page from the URI
2118
- * @param none
2119
- * @return string
2120
- */
2121
- function get_menu_arg(){
2122
- $menuarg=false;
2123
- if(isset($_GET['page'])) $menuarg=$_GET['page'];
2124
- if(stristr($menuarg,"wassup")!==false){
2125
- $wassupfolder=basename(WASSUPDIR);
2126
- if($menuarg=="wassup-stats"){
2127
- if(!empty($_GET['ml'])) $menuarg=$_GET['ml'];
2128
- else $menuarg="wassup";
2129
- }elseif($menuarg=="wassup-spia"){
2130
- $menuarg="wassup-spy";
2131
- }elseif($menuarg==$wassupfolder){
2132
- $menuarg="wassup";
2133
- }
2134
- }
2135
- return $menuarg;
2136
- }
2137
- /** check for admin uri with valid referrer via _wpnonce */
2138
- function is_valid_admin_referer($action="-1",$wpage=""){
2139
- global $wp_version;
2140
- $is_valid_referer=false;
2141
- if(version_compare($wp_version,'2.8','>=') || $action=="-1"){
2142
- $is_valid_referer=check_admin_referer($action);
2143
- }elseif(is_admin() && !empty($_SERVER['HTTP_REFERER'])){
2144
- if(isset($_REQUEST['_wpnonce']) && wp_verify_nonce($_REQUEST['_wpnonce'],$action)){
2145
- if(isset($_REQUEST['_wp_http_referer'])){
2146
- if(strpos($_SERVER['HTTP_REFERER'],$_REQUEST['_wp_http_referer'])!==false) $is_valid_referer=true;
2147
- }else{
2148
- if(empty($wpage)) $wpage=wassupURI::get_menu_arg();
2149
- if(!empty($wpage) && strpos($_SERVER['HTTP_REFERER'],"page=$wpage")!==false) $is_valid_referer=true;
2150
- }
2151
- }
2152
- }
2153
- return $is_valid_referer;
2154
- }
2155
- } //end Class wassupURI
2156
- } //end if !class_exists
2157
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/compat_functions.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
- /**
3
- * @package WassUP
4
- * @subpackage compat_functions.php module
5
- */
6
- /**
7
- * compat_functions.php
8
- * Description: Emulate some functions from PHP 5.2+ and Wordpress 2.6+ for
9
- * backwards compatibility with PHP 4.3+ and Wordpress 2.2+, respectively
10
- * @author: Helene D. <http://techfromhel.com>
11
- * @version: 0.3 - 2010-09-13
12
- * @since Wassup 1.8
13
- */
14
-
15
- /**
16
- * Convert simple JSON data into a PHP object (default) or associative
17
- * array. Emulates 'json_decode' function from PHP 5.2+
18
- * @author: Helene Duncker <http://techfromhel.com>
19
- * @param string,boolean
20
- * @return (array or object)
21
- */
22
- if (!function_exists('json_decode')) {
23
- function json_decode($json,$to_array=false) {
24
- $x=false;
25
- if (!empty($json) && strpos($json,'{"')!==false) {
26
- $out = '$x='.str_replace(array('{','":','}'),array('array(','"=>',')'),$json);
27
- eval($out.';');
28
- if (!$to_array) $x = (object) $x;
29
- }
30
- return $x;
31
- } //end function json_decode
32
- }
33
-
34
- //'microtime_float' replicates microtime(true) from PHP5
35
- if (!function_exists('microtime_float')) {
36
- function microtime_float() {
37
- list($usec, $sec) = explode(" ", microtime());
38
- return ((float)$usec + (float)$sec);
39
- }
40
- }
41
-
42
- if (!function_exists('admin_url')) {
43
- function admin_url($admin_file="") {
44
- $adminurl = get_bloginfo('wpurl')."/wp-admin/".$admin_file;
45
- return $adminurl;
46
- } //end function admin_url
47
- }
48
-
49
- /**
50
- * Output the URL of a Wordpress plugin directory. Emulates 'plugins_url'
51
- * function from Wordpress 2.6+
52
- * @param string
53
- * @return string
54
- */
55
- if (!function_exists('plugins_url')) {
56
- function plugins_url($plugin_file="") {
57
- if (defined('WP_CONTENT_URL') && defined('WP_CONTENT_DIR') && strpos(WP_CONTENT_DIR,ABSPATH)===FALSE) {
58
- $pluginurl = rtrim(WP_CONTENT_URL,"/")."/plugins/".$plugin_file;
59
- } else {
60
- $pluginurl = get_bloginfo('wpurl')."/wp-content/plugins/".$plugin_file;
61
- }
62
- return $pluginurl;
63
- } //end function
64
- }
65
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/compatibility.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checks Wordpress and PHP compatibility and loads compatibility functions as needed.
4
+ *
5
+ * IMPORTANT NOTE: this module is loaded by 'wassup_init' function before the WASSUPURL constant is set and before the 'wassup_options' global is set.
6
+ * Don't use WASSUPURL constant or the $wassup_options global variable here and don't call 'wassup_init' to set them!
7
+ *
8
+ * @package WassUp Real-time Analytics
9
+ * @subpackage compatibility.php module
10
+ * @since: v1.9.1
11
+ * @author: helened <http://helenesit.com>
12
+ */
13
+ //-------------------------------------------------
14
+ //# No direct requests for this plugin module
15
+ $wfile=preg_replace('/\\\\/','/',__FILE__); //for windows
16
+ //abort if this is direct uri request for file
17
+ if((!empty($_SERVER['PHP_SELF']) && preg_match('#'.preg_quote($_SERVER['PHP_SELF']).'$#',$wfile)>0) ||
18
+ (!empty($_SERVER['SCRIPT_FILENAME']) && realpath($_SERVER['SCRIPT_FILENAME'])===realpath($wfile))){
19
+ //try track this uri request
20
+ if(!headers_sent()){
21
+ //triggers redirect to 404 error page so Wassup can track this attempt to access itself (original request_uri is lost)
22
+ header('Location: /?p=404page&err=wassup403'.'&wf='.basename($wfile));
23
+ exit;
24
+ }else{
25
+ //'wp_die' may be undefined here
26
+ die('<strong>Sorry. Unable to display requested page.</strong>');
27
+ }
28
+ exit;
29
+ //abort if no WordPress
30
+ }elseif(!defined('ABSPATH') || empty($GLOBALS['wp_version'])){
31
+ //'wp_die' is undefined here
32
+ die("Bad Request: ".htmlspecialchars(preg_replace('/(&#0*37;|&amp;#0*37;|&#0*38;#0*37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));
33
+ }
34
+ //-------------------------------------------------
35
+ /**
36
+ * Load Wassup compatibility modules if needed and return true if this Wordpress version is compatible with this copy of Wassup
37
+ * @since v1.9.1
38
+ */
39
+ function wassup_load_compat_modules(){
40
+ global $wp_version;
41
+ $is_compatible=true;
42
+ if(version_compare($wp_version,'2.2','<')){
43
+ $is_compatible=false;
44
+ }else{
45
+ $wassup_compatlib=WASSUPDIR.'/lib/compat-lib';
46
+ if(version_compare($wp_version,'3.1','<')){
47
+ if(file_exists($wassup_compatlib.'/compat_wp.php')){
48
+ require_once($wassup_compatlib.'/compat_wp.php');
49
+ include_once($wassup_compatlib.'/compat_functions.php');
50
+ }else{
51
+ $is_compatible=false;
52
+ //wp_die("Missing file $wassup_compatlib/compat_wp.php"); //debug
53
+ }
54
+ }elseif(version_compare($wp_version,'4.5','<')){
55
+ if(file_exists($wassup_compatlib.'/compat_functions.php')){
56
+ include_once($wassup_compatlib.'/compat_functions.php');
57
+ }
58
+ }
59
+ $php_vers=phpversion();
60
+ if(version_compare($php_vers,'5.2','<')){
61
+ if(file_exists($wassup_compatlib.'/compat_php.php')){
62
+ require_once($wassup_compatlib.'/compat_php.php');
63
+ }else{
64
+ $is_compatible=false;
65
+ //wp_die("Missing file $wassup_compatlib/compat_php.php"); //debug
66
+ }
67
+ }
68
+ }
69
+ return $is_compatible;
70
+ }
71
+ /**
72
+ * Show a message if this Wordpress version is incompatible with this copy of Wassup
73
+ * @since v1.9.1
74
+ */
75
+ function wassup_show_compat_message(){
76
+ global $wp_version;
77
+ $msg="";
78
+ if(version_compare($wp_version,'2.2','<')){
79
+ $msg= __("Sorry, WassUp requires WordPress 2.2 or higher to work","wassup");
80
+ }else{
81
+ $php_vers=phpversion();
82
+ $wassup_compatlib=WASSUPDIR.'/lib/compat-lib';
83
+ $download_link='<a href="https://github.com/michelem09/wassup/releases/tag/v'.WASSUPVERSION.'">GitHub</a>';
84
+ if(version_compare($wp_version,'3.1','<') && !file_exists($wassup_compatlib.'/compat_wp.php')){
85
+ $msg= __("WARNING! WassUp's backward compatibility modules are missing.","wassup");
86
+ $msg .= ' '.sprintf(__('Download and install the full version of Wassup with compatibility library included directly from %s.','wassup'),$download_link);
87
+ }elseif(version_compare($php_vers,'5.2','<') && !file_exists($wassup_compatlib.'/compat_php.php')){
88
+ $msg= __("WARNING! WassUp's PHP compatibility module is missing.","wassup");
89
+ $msg .= ' '.sprintf(__('Download and install the full version of Wassup with compatibility library included directly from %s.','wassup'),$download_link);
90
+ }
91
+ }
92
+ if(!empty($msg)){
93
+ if(version_compare($wp_version,'4.1','>=')) $mstyle='class="notice notice-warning is-dismissible"';
94
+ else $mstyle='class="fade error" style="padding:1em;"';
95
+ echo '<div '.$mstyle.'>'.$msg.'</div>';
96
+ }
97
+ }
98
+ unset($wfile); //to free memory
lib/index.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
- header('Status: 403 Forbidden');
3
- header('HTTP/1.1 403 Forbidden');
4
  ?>
1
+ <?php
2
+ header('Status: 403 Forbidden');
3
+ header('HTTP/1.1 403 Forbidden');
4
  ?>
lib/main.php CHANGED
@@ -5,15 +5,34 @@
5
  * @package WassUp Real-time Analytics
6
  * @subpackage main.php module
7
  */
8
- //no direct request for this plugin module
9
- if(!defined('ABSPATH')|| empty($GLOBALS['wp_version'])|| (!empty($_SERVER['SCRIPT_FILENAME'])&& realpath(preg_replace('/\\\\/','/',__FILE__))===realpath($_SERVER['SCRIPT_FILENAME']))){
10
- if(!headers_sent()){header('Location: /?p=404page&err=wassup403');exit;
11
- }elseif(function_exists('wp_die')){wp_die("Bad Request: ".esc_attr(wp_kses(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI']),array())));exit;
12
- }else{die("Bad Request: ".htmlspecialchars(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));exit;}
 
 
 
 
 
 
 
 
 
 
13
  exit;
 
 
 
 
14
  }
 
 
 
15
  if(!class_exists('wassup_pagination')){
16
- //Digg Style Paginator Class based on the work of Victor De La Rocha - http://www.mis-algoritmos.com
 
 
17
  class wassup_pagination{
18
  var $total_pages;
19
  var $limit;
@@ -30,8 +49,8 @@ class wassup_pagination{
30
  var $urlF;
31
  var $calculate;
32
  var $pagination;
33
- //constructor
34
- function wassup_pagination(){ //moved here for readability
35
  $this->total_pages=null;
36
  $this->limit=null;
37
  $this->target="";
@@ -39,16 +58,13 @@ class wassup_pagination{
39
  $this->adjacents=2;
40
  $this->showCounter=false;
41
  $this->className="pagination";
42
- //New in v1.9: renamed parameter to "pp" because a similar "page" parameter is already used in Wordpress admin
43
- $this->parameterName="pp";
44
-
45
- /*Buttons next and previous*/
46
  $this->nextT=__("Next","wassup");
47
- $this->nextI="&#187;"; //&#9658;
48
  $this->prevT=__("Previous","wassup");
49
- $this->prevI="&#171;"; //&#9668;
50
-
51
- $this->urlF=false;//urlFriendly
52
  $this->calculate=false;
53
  $this->pagination="";
54
  }
@@ -58,17 +74,16 @@ class wassup_pagination{
58
  function currentPage($value){$this->page=intval($value);}
59
  function adjacents($value){$this->adjacents=intval($value);}
60
  function showCounter($value=""){$this->showCounter=($value===true)?true:false;}
61
- //to change the class name of the pagination div
62
  function changeClass($value=""){$this->className=$value;}
63
  function nextLabel($value){$this->nextT = $value;}
64
  function nextIcon($value){$this->nextI = $value;}
65
  function prevLabel($value){$this->prevT = $value;}
66
  function prevIcon($value){$this->prevI = $value;}
67
- //to change the class name of the pagination div
68
  function parameterName($value=""){$this->parameterName=$value;}
69
  //to change urlFriendly
70
  function urlFriendly($value="%"){
71
- //New in v1.9: PHP4 'eregi' deprecated, replaced with preg_match
72
  if(preg_match('/^ *$/i',$value)>0){
73
  $this->urlF=false;
74
  return false;
@@ -92,7 +107,6 @@ class wassup_pagination{
92
  }
93
  function calculate(){
94
  $this->pagination="";
95
- //$this->calculate == true; //v1.9 bugfix
96
  $error=false;
97
  if($this->urlF && $this->urlF !='%' && strpos($this->target,$this->urlF)===false){
98
  echo 'Especificaste un wildcard para sustituir, pero no existe en el target<br />';
@@ -165,9 +179,9 @@ class wassup_pagination{
165
 
166
  if(!class_exists('wDetector')){
167
  /**
168
- * Tracking class for simple user agent detection
169
- * -loosely based on Detector class by Mohammad Hafiz bin Ismail (info@mypapit.net)
170
- * -New in v1.9: renamed to 'wDetector' for compatibility with other plugins, removed unused/unneeded methods, and updated detection to include newer versions of windows and IE.
171
  */
172
  class wDetector{
173
  var $browser;
@@ -183,23 +197,27 @@ class wDetector{
183
  function check_os($useragent){
184
  $os="";
185
  $version="";
186
- if(preg_match("/Windows NT 10\.0/",$useragent,$match)){$os="Win10";$version="";}
187
- elseif(preg_match("/Windows NT 6\.3/",$useragent,$match)){$os="Win8";$version="";}
188
- elseif(preg_match("/Windows NT 6\.2/",$useragent,$match)){$os="Win8";$version="";}
189
- elseif(preg_match("/Windows NT 6\.1/",$useragent,$match)){$os="Win7";$version="";}
190
- elseif(preg_match("/Windows NT 6\.0/",$useragent,$match)){$os="WinVista";$version="";}
191
- elseif(preg_match("/Windows NT 5\.2/",$useragent,$match)){$os="Win2003";$version="";}
192
- elseif(preg_match("/Windows NT 5\.1/",$useragent,$match)){$os="WinXP";$version="";}
193
- elseif(preg_match("/(?:Windows NT 5\.0|Windows 2000)/",$useragent,$match)){$os="Win2000";$version="";}
 
194
  elseif(preg_match("/(?:WinNT|Windows\s?NT)\s?([0-4\.]+)?/",$useragent,$match)){$os="WinNT";$version=$match[1];}
195
- elseif(preg_match("/Windows ME/",$useragent,$match)){$os="WinME";$version="";}
196
- elseif(preg_match("/Mac OS X/",$useragent,$match)){$os="MacOSX";$version="";}
197
- elseif(preg_match("/(Mac_PowerPC|Macintosh)/",$useragent,$match)){$os="MacPPC";$version="";}
198
- elseif(preg_match("/(?:Windows95|Windows 95|Win95|Win 95)/",$useragent,$match)){$os="Win95";$version="";}
199
- elseif(preg_match("/(?:Windows98|Windows 98|Win98|Win 98|Win 9x)/",$useragent,$match)){$os="Win98";$version="";}
200
- elseif(preg_match("/(?:WindowsCE|Windows CE|WinCE|Win CE)/",$useragent,$match)){$os="WinCE";$version="";}
 
 
201
  elseif(preg_match("/PalmOS/",$useragent,$match)){$os="PalmOS";}
202
  elseif(preg_match("/\(PDA(?:.*)\)(.*)Zaurus/",$useragent,$match)){$os="Sharp Zaurus";}
 
203
  elseif(preg_match("/Linux\s*((?:i[0-9]{3})?\s*(?:[0-9]\.[0-9]{1,2}\.[0-9]{1,2})?\s*(?:i[0-9]{3})?)?/",$useragent,$match)){$os="Linux";$version=$match[1];}
204
  elseif(preg_match("/NetBSD\s*((?:i[0-9]{3})?\s*(?:[0-9]\.[0-9]{1,2}\.[0-9]{1,2})?\s*(?:i[0-9]{3})?)?/",$useragent,$match)){$os="NetBSD";$version=$match[1];}
205
  elseif(preg_match("/OpenBSD\s*([0-9\.]+)?/",$useragent,$match)){$os="OpenBSD";$version=$match[1];}
@@ -216,10 +234,12 @@ class wDetector{
216
  function check_browser($useragent) {
217
  $browser="";
218
  $version="";
219
- if(strstr($useragent,' Edge/12.0')!==false){
220
- $browser="IE";$version="11";
221
- }elseif(strstr($useragent,' Gecko/')==false && preg_match("#^Mozilla\/\d\.\d\s\(Windows\sNT\s\d\.\d;(?:\s[0-9A-Za-z./]+;)+\srv\:([0-9\.]+)\)#",$useragent,$match)){
222
  $browser="IE";
 
 
 
223
  }elseif(preg_match("/^Mozilla(?:.*)compatible;\sMSIE\s(?:.*)Opera\s([0-9\.]+)/",$useragent,$match)){
224
  $browser = "Opera";
225
  }elseif(preg_match("/^Opera\/([0-9\.]+)/",$useragent,$match)){
@@ -297,7 +317,7 @@ class wDetector{
297
  }elseif(preg_match("/^SonyEricsson([0-9a-zA-Z\-.]+)\/([a-zA-Z0-9\.]+)/i",$useragent,$match)){
298
  $browser="SonyEricsson";
299
  }
300
- if(empty($version) && preg_match("/^\d+(\.\d+)?/",$match[1],$pcs)>0){
301
  $version=$pcs[0];
302
  }
303
  $this->browser=$browser;
@@ -306,8 +326,8 @@ class wDetector{
306
  } //end class wDetector
307
 
308
  /**
309
- * Tracking class to check for previous comment spam activity
310
- * -checks for previous spammer comment from IP or referrer url
311
  */
312
  class wassup_checkComment{
313
  /** check for previous comment spam */
@@ -334,15 +354,13 @@ class wassup_checkComment{
334
  } //end Class
335
  } //end if !class_exists('wDetector')
336
 
337
- //Truncate $input string to a length of $max
338
  function stringShortener($input, $max=0, $separator="(...)", $exceedFromEnd=0){
339
- if(!$input || !is_string($input)){return false;};
340
-
341
- //Replace all %-hex chars with literals and trim the input string
342
- // of whitespaces ...because it's shorter and more legible.
343
- // -Helene D. 11/18/07
344
- $instring = trim(stripslashes(rawurldecode(html_entity_decode(wassupURI::disarm_attack($input))))," +\t");
345
-
346
  $inputlen=strlen($instring);
347
  $max=(is_numeric($max))?(integer)$max:$inputlen;
348
  if($max <$inputlen){
@@ -350,28 +368,30 @@ function stringShortener($input, $max=0, $separator="(...)", $exceedFromEnd=0){
350
  $modulus=(($max%2));
351
  $halfMax=floor($max/2);
352
  $begin="";
353
- if(!$modulus){$begin=substr($instring, 0, $halfMax);}
354
- else{$begin=(!$exceedFromEnd)? substr($instring, 0, $halfMax+1) : substr($instring, 0, $halfMax);}
 
 
 
355
  $end="";
356
- if(!$modulus){$end=substr($instring,$inputlen-$halfMax);}
357
- else{$end=($exceedFromEnd)? substr($instring,$inputlen-$halfMax-1) :substr($instring,$inputlen-$halfMax);}
 
 
 
358
  $extracted=substr($instring, strpos($instring,$begin)+strlen($begin), $inputlen-$max );
359
- $outstring = $begin.$separator.$end;
360
- if (strlen($outstring) >= $inputlen) { //Because "Fir(...)fox" is longer than "Firefox"
361
- $outstring = $instring;
362
  }
363
- // use 'esc_attr' and 'esc_html' to make malicious
364
- // code harmless when echoed to the screen
365
  $outstring=esc_attr(esc_html($outstring,ENT_QUOTES));
366
  } else {
367
- $outstring = esc_attr(esc_html($instring,ENT_QUOTES));
368
  }
369
  return $outstring;
370
  } //end function stringShortener
371
 
372
- //functions 'url_rootcheck','wAddSiteurl' and 'wCleanUrl' moved and renamed as wassupURI methods, 'wassupURI::is_root_url', 'wassupURI::add_siteurl' and 'wassupURI::cleanURL' in 'wassup.class.php' module.
373
-
374
-
375
  /**
376
  * Display a single wassup record as a "raw" list of fields
377
  * @since v1.9
@@ -432,7 +452,7 @@ function wassup_rawdataView($args=array()){
432
  $result=$wpdb->get_var(sprintf("SELECT `post_title` from {$wpdb->prefix}posts WHERE `ID`=%d",(int)$rk->url_wpid));
433
  if(empty($result) || is_wp_error($result)) $p_title=" ** ". __("none or deleted post","wassup")." ** ";
434
  else $p_title=$result;
435
- if(!empty($p_title)) echo '</span><nobr> &nbsp; &nbsp; '.__("Post/page Title","wassup").': </nobr><span class="raw">'.esc_attr($p_title);
436
  }?></span></li>
437
  <li><span class="field"><?php echo __("Referrer","wassup");?>:</span><span class="raw"><?php echo wassupURI::cleanURL($rk->referrer);?></span></li><?php
438
  if(!empty($rk->search) || !empty($rk->searchengine) || !empty($rk->searchpage)){
@@ -448,7 +468,7 @@ function wassup_rawdataView($args=array()){
448
  }?>
449
  <li><span class="field"><?php echo __("OS","wassup");?>:</span><span class="raw"><?php echo esc_attr($rk->os);?></span></li>
450
  <li><span class="field"><?php echo __("Locale/Language","wassup")?>:</span><span class="raw"><?php echo esc_attr($rk->language);?></span></li>
451
- <li><span class="field"><?php echo __("Screen Resolution","wassup");?>:</span><span class="raw"><?php echo esc_attr($rk->screen_res);?></span></li><?php
452
  if(trim($rk->login_name,', ')!=""){
453
  echo "\n";?>
454
  <li><span class="field"><?php echo __("Username","wassup");?>:</span><span class="raw"><?php echo esc_attr(trim($rk->login_name,', '));?></span></li><?php
@@ -496,10 +516,16 @@ function wassup_rawdataView($args=array()){
496
  } //end if rk
497
  } //end wassup_rawdataView
498
 
499
- //Output wassup records in the old Digg spy style...
 
 
 
 
500
  function wassup_spiaView ($from_date="",$rows=0,$spytype="",$spy_datasource="") {
501
  global $wpdb,$wp_version,$current_user,$wassup_options,$wdebug_mode;
502
- if(!class_exists('wassupOptions')) wassup_init();
 
 
503
  if(empty($wassup_options)) $wassup_options=new wassupOptions;
504
  $wassup_table=$wassup_options->wassup_table;
505
  if(!is_object($current_user) || empty($current_user->ID)) $user=wp_get_current_user();
@@ -536,8 +562,7 @@ function wassup_spiaView ($from_date="",$rows=0,$spytype="",$spy_datasource="")
536
  $geo_markers=0;
537
  if($spy_datasource == $wassup_table) $qryC = $wpdb->get_results(sprintf("SELECT `id`, `wassup_id`, `timestamp`, `ip`, `hostname`, `searchengine`, `urlrequested`, `agent`, `referrer`, `spider`, `feed`, `username`, `comment_author`, `language`, `spam` FROM %s WHERE `timestamp` >'%d' %s ORDER BY `timestamp` DESC LIMIT %d",$spy_datasource,$from_date,$whereis,$rows));
538
  else $qryC = $wpdb->get_results(sprintf("SELECT `id`, `wassup_id`, `timestamp`, `ip`, `hostname`, `searchengine`, `urlrequested`, `agent`, `referrer`, `spider`, `feed`, `username`, `comment_author`, `language`, `spam` FROM %s WHERE `timestamp` >'%d' %s ORDER BY `timestamp` LIMIT %d",$spy_datasource,$from_date,$whereis,$rows));
539
- if(!is_wp_error($qryC)){
540
- if(!empty($qryC)){
541
  $qrows=count($qryC);
542
  $row_count=0;
543
  $char_len=$max_char_len*.9;
@@ -560,7 +585,7 @@ function wassup_spiaView ($from_date="",$rows=0,$spytype="",$spy_datasource="")
560
  $requesturl=wassupURI::url_link($cv->urlrequested,$char_len,$cv->spam);
561
  if($cv->hostname !="" && $cv->hostname !="unknown") $hostname=$cv->hostname;
562
  else $hostname=__("unknown");
563
- if(!empty($cv->spam)){ //v1.9 bugfix (was rk)
564
  $unclass="sum-box-spam";
565
  $ulclass="spider";
566
  $map_icon="pinbot";
@@ -616,7 +641,7 @@ function wassup_spiaView ($from_date="",$rows=0,$spytype="",$spy_datasource="")
616
  $flag='<img src="'.WASSUPURL.'/img/flags/'.$locale.'.png" title="'.$flag_title.'" />';
617
  //update language/locale code when different from geoip country code (not us)
618
  if(empty($cv->language) || ($cv->language =="us" && $locale!="us")){
619
- $wassup_dbtask[]=sprintf("UPDATE LOW_PRIORITY `$wassup_table` SET `language`='%s' WHERE `wassup_id`='%s' AND `language`='%s'",$locale,$cv->wassup_id,$cv->language);
620
  }
621
  }
622
  }
@@ -636,7 +661,7 @@ function wassup_spiaView ($from_date="",$rows=0,$spytype="",$spy_datasource="")
636
  }
637
  $markerHtml='<div><div class="bubble">'.$visitor.'<br />IP: '.$ip."<br />".__("Country:","wassup").' '.$flag.' '.$location."<br />".__("URL Request:","wassup")." $timef - $requesturl".'<br /></div></div>';
638
  $markerjs=wAdd_GeoMarker('spiamap',$cv->id,$lat,$lon,$markerHtml,$map_icon,true);
639
- //New in v1.9: clickable ip repositions and zooms map at ip marker
640
  $ipclick='<a href="#spia_map" onclick="showMarkerinfo(spiamap,'.$lat.','.$lon.',marker'.(int)$cv->id.',minfo'.(int)$cv->id.');return false;"><span class="sum-box-ip '.$unclass.'">'.$ip.'</span></a>';
641
  } //end if spy_map
642
  echo "\n";?>
@@ -665,39 +690,39 @@ function wassup_spiaView ($from_date="",$rows=0,$spytype="",$spy_datasource="")
665
  wp_schedule_single_event(time()+30,'wassup_scheduled_dbtasks',$args);
666
  }
667
  }
668
- }elseif(!empty($wdebug_mode) && $to_date - $from_date >90 && $to_date%23 == 0){
669
- //display a "no activity" message occasionally in wdebug_mode as visual indicator that spia.js javascript is running
670
- echo "\n"; ?>
 
671
  <div class="sum-spy">
672
  <div class="sum-rec sum-nav-spy" style="width:auto;padding:3px;">
673
  <span class="det3"><?php
674
- if ($wassup_options->wassup_time_format == "12") {
675
- echo gmdate('h:i:s A', $to_date);
676
- } else {
677
- echo gmdate('H:i:s', $to_date);
678
- }
679
- echo ' - '.__("No visitor activity","wassup");?> &nbsp; &nbsp; :-( &nbsp; </span>
680
  </div>
681
  </div><?php
 
682
  echo "\n";
683
  } //end if !empty($qryC)
684
- } //end if is_wp_error
685
  } //end function wassup_spiaView
686
 
687
- /**
688
- * return javascript to add a marker to a google map
689
- * @since v1.8
690
- */
691
  function wAdd_GeoMarker($map,$item_id,$lat,$lon,$markerHtml,$map_icon,$pan=true) {
692
  $markerjs='<script type="text/javascript">var pos=new google.maps.LatLng('.$lat.','.$lon.');var marker'.$item_id.'=new google.maps.Marker({map:'.$map.',position:pos,icon:'.$map_icon.',animation:google.maps.Animation.DROP});var mcontent=\''.str_replace('\'','"',$markerHtml).'\';var minfo'.$item_id.'=new google.maps.InfoWindow({content:mcontent});';
693
  $markerjs .='google.maps.event.addListener(marker'.$item_id.',"click",function(){minfo'.$item_id.'.open('.$map.',marker'.$item_id.')});'.$map.'.setZoom(3);';
694
  if($pan)$markerjs .=$map.'.panTo(pos);';
695
  $markerjs .='</script>';
696
  return $markerjs;
697
- } //end wAdd_GeoMarker
698
 
699
- //return a location name formatted for wassup_spiaView from array argument
700
- //@since v1.8
 
 
701
  function wGetLocationname($geoip_rec=array()) {
702
  $country_code="";
703
  if(!empty($geoip_rec['country_code']))$country_code=strtoupper($geoip_rec['country_code']);
@@ -730,7 +755,7 @@ function wGetLocationname($geoip_rec=array()) {
730
  }
731
 
732
  /**
733
- * get geographic location and coordinates for an IP address and cache the data in 'wassup_meta' table.
734
  * Since version 1.8
735
  * @param array (ip address or hostname)
736
  * @return array (ip, location, latitude, longitude, country)
@@ -800,13 +825,16 @@ function wGeolocateIP($ip) {
800
  function wGetStats($stat_type, $stat_limit=10, $stat_condition="",$return_sql=false) {
801
  global $wpdb, $wassup_options, $wdebug_mode;
802
  if(!class_exists('wassupOptions')){
803
- wassup_init();
804
  $wassup_options=new wassupOptions;
805
  }elseif(empty($wassup_options)){
806
  $wassup_options=new wassupOptions;
807
  }
808
- if (!is_array($wassup_options->wassup_top10)) $top_ten = unserialize(html_entity_decode($wassup_options->wassup_top10));
809
- else $top_ten=$wassup_options->wassup_top10;
 
 
 
810
  $wpurl= strtolower(wassupURI::get_wphome());
811
  $blogurl= strtolower(wassupURI::get_sitehome());
812
  $wassup_table=$wassup_options->wassup_table;
@@ -819,8 +847,8 @@ function wGetStats($stat_type, $stat_limit=10, $stat_condition="",$return_sql=fa
819
  }
820
  $sql="";
821
  //top search phrases...
822
- if ($stat_type == "searches" || $stat_type=="search") {
823
- $sql=sprintf("SELECT count(*) AS top_count, `search` AS top_item, max(`timestamp`) AS visit_timestamp, `referrer` AS top_link FROM $wassup_table WHERE %s AND `search`!='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition,$stat_limit);
824
 
825
  //Top external referrers...
826
  }elseif($stat_type=="referrers" || $stat_type=="referrer"){
@@ -847,7 +875,7 @@ function wGetStats($stat_type, $stat_limit=10, $stat_condition="",$return_sql=fa
847
  if(!empty($pcs[1]))$www=str_replace('.','\\.',$pcs[1]);
848
  $exclude_domain=$pcs[2];
849
  }
850
- //New in v1.9: wildcard(*) allowed in domain
851
  if(empty($regex_domains)) $regex_domains=str_replace(array('.','*'),array('\\.','.*'),rtrim(trim($exclude_domain),'*,'));
852
  else $regex_domains.="|".str_replace(array('.','*'),array('\\.','.*'),rtrim(trim($exclude_domain),'*,'));
853
  } //end foreach
@@ -856,28 +884,28 @@ function wGetStats($stat_type, $stat_limit=10, $stat_condition="",$return_sql=fa
856
  }
857
  //exclude the major search engines from referrers
858
  $exclude_referrers .=" AND TRIM(LEADING 'http://' FROM TRIM(LEADING 'https://' FROM `referrer`)) NOT RLIKE '^(".$www.")?".'([0-9]|[a-z]|\\-|\\.|_)*\\.?(google'.'\\.'."com|yahoo".'\\.'."com|bing".'\\.'."com)'";
859
- $sql=sprintf("SELECT count(*) AS top_count, TRIM(LEADING '//' FROM TRIM(LEADING 'http:' FROM TRIM(LEADING 'https:' FROM `referrer`))) AS top_item, max(`timestamp`) AS visit_timestamp, `referrer` AS top_link FROM $wassup_table WHERE %s AND `referrer`!='' AND `search`='' AND `spam`='0' %s GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d", $stat_condition, $exclude_referrers, $stat_limit);
860
 
861
  //top url requests...
862
- } elseif ($stat_type == "urlrequested" || $stat_type=="requests"){
863
- //New in v1.9: removed labels ('#xxxx') and query parameters except for '[?&]p=xx' from url for better url matching in MySQL
864
  $stat_condition1=$stat_condition." AND `urlrequested` NOT LIKE '%?p=%' AND `urlrequested` NOT LIKE '%&p=%'";
865
  $stat_condition2=$stat_condition." AND `urlrequested` LIKE '%?p=%' OR `urlrequested` LIKE '%&p=%'";
866
- $sql=sprintf("SELECT count(*) AS top_count, LOWER(TRIM(TRAILING '/' FROM SUBSTRING_INDEX(SUBSTRING_INDEX(`urlrequested`, '/index.php', 1), '#', 1))) AS top_group, max(`timestamp`) AS visit_timestamp, LOWER(urlrequested) AS top_item, SUBSTRING_INDEX(`urlrequested`, '#', 1) AS top_link FROM $wassup_table WHERE %s AND `spam`='0' GROUP BY 2 UNION SELECT count(*) AS top_count, LOWER(TRIM(TRAILING '&' FROM SUBSTRING_INDEX(`urlrequested`, '#', 1))) AS top_group, max(`timestamp`) AS visit_timestamp, LOWER(urlrequested) AS top_item, SUBSTRING_INDEX(`urlrequested`, '#', 1) AS top_link FROM $wassup_table WHERE %s AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition1, $stat_condition2, $stat_limit);
 
867
  //top browser...
868
- } elseif ($stat_type == "browser" || $stat_type=="browsers"){
869
- $sql=sprintf("SELECT count(DISTINCT `wassup_id`) AS top_count, SUBSTRING_INDEX(SUBSTRING_INDEX(`browser`, ' 0.', 1), '.', 1) AS top_item, max(`timestamp`) AS visit_timestamp FROM $wassup_table WHERE %s AND `browser`!='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition, $stat_limit);
870
  //top os...
871
- } elseif ($stat_type == "os") {
872
- $sql=sprintf("SELECT count(DISTINCT `wassup_id`) as top_count, `os` AS top_item, max(`timestamp`) AS visit_timestamp FROM $wassup_table WHERE %s AND `os`!='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition,$stat_limit);
873
  //top language/locale..
874
- } elseif ($stat_type == "language" || $stat_type=="locale"){
875
- $sql=sprintf("SELECT count(DISTINCT `wassup_id`) as top_count, LOWER(`language`) as top_item, max(`timestamp`) AS visit_timestamp FROM $wassup_table WHERE %s AND language!='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition, $stat_limit);
876
  //top visitors...
877
  } elseif ($stat_type == "visitor" || $stat_type=="visitors"){
878
- $sql=sprintf("SELECT count(DISTINCT `wassup_id`) as top_count, `username` as top_item, '1loggedin_user' as visitor_type, max(`timestamp`) as visit_timestamp FROM $wassup_table WHERE %s AND `username`!='' AND `spam`='0' GROUP BY 2 UNION SELECT count(DISTINCT `wassup_id`) as top_count, comment_author as top_item, '2comment_author' as visitor_type, max(`timestamp`) as visit_timestamp FROM $wassup_table WHERE %s AND `username`='' AND comment_author!='' AND `spam`='0' GROUP BY 2 UNION SELECT count(DISTINCT `wassup_id`) as top_count, `hostname` as top_item, '3hostname' as visitor_type, max(`timestamp`) as visit_timestamp FROM $wassup_table WHERE %s AND `username`='' AND comment_author='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3, 2 LIMIT %d",$stat_condition,$stat_condition,$stat_condition,$stat_limit);
879
  //top postid (post|page)
880
- } elseif ($stat_type == "postid" || $stat_type == "article" || $stat_type=="articles" || $stat_type=="url_wpid") {
881
  $exclude_frontpage="";
882
  if(!empty($top_ten['top_nofrontpage'])){
883
  $front_pageid=0;
@@ -885,12 +913,12 @@ function wGetStats($stat_type, $stat_limit=10, $stat_condition="",$return_sql=fa
885
  if($show_on_front=="page") $front_pageid=get_option('page_on_front');
886
  if(!empty($front_pageid) && is_numeric($front_pageid)) $exclude_frontpage=sprintf("AND `url_wpid`!='%d'",$front_pageid);
887
  }
888
- $sql=sprintf("SELECT count(*) AS top_count, `url_wpid` AS top_group, max(`timestamp`) as visit_timestamp, `post_title` AS top_item, SUBSTRING_INDEX(`urlrequested`, '#', 1) AS top_link FROM $wassup_table, {$wpdb->prefix}posts WHERE %s AND `spam`='0' AND `url_wpid`!='' AND `url_wpid`>'0' %s AND `url_wpid`={$wpdb->prefix}posts.ID GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition,$exclude_frontpage,$stat_limit);
889
- //New in v1.9: stats on any column that exists in wassup table
890
  }elseif(!empty($stat_type)){
891
  $col=$wpdb->get_row(sprintf("SHOW COLUMNS FROM %s LIKE '%s'",$wtable_name,wassupDb::esc_like(esc_attr($stat_type))));
892
  if(!is_wp_error($col) && !empty($col)){
893
- $sql=sprintf("SELECT count(DISTINCT `wassup_id`) AS top_count, `$stat_type` AS top_item, max(`timestamp`) as visit_timestamp FROM $wassup_table WHERE %s AND `$stat_type`!='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition,$stat_limit);
894
  }else{
895
  $error_msg=" column does not exist in table ".$stat_type;
896
  }
@@ -923,14 +951,13 @@ function wGetStats($stat_type, $stat_limit=10, $stat_condition="",$return_sql=fa
923
 
924
  /**
925
  * Display the top 10 stats in table columns
926
- * @access public
927
  * @param string(4)
928
  * @return none
929
  */
930
  function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title=false) {
931
  global $wpdb,$wp_version,$wassup_options,$wdebug_mode;
932
  if(!class_exists('wassupOptions')){
933
- wassup_init();
934
  $wassup_options=new wassupOptions;
935
  }elseif(empty($wassup_options)){
936
  $wassup_options=new wassupOptions;
@@ -938,25 +965,31 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
938
  $wassup_options->loadSettings();
939
  }
940
  $wassup_table=$wassup_options->wassup_table;
941
- if(!is_array($wassup_options->wassup_top10)) $top_ten=maybe_unserialize(html_entity_decode($wassup_options->wassup_top10));
942
- else $top_ten=$wassup_options->wassup_top10;
943
- if(empty($top_ten) || !is_array($top_ten))$top_ten=$wassup_options->defaultSettings("top10");
 
 
 
 
 
944
  $wassup_table=$wassup_options->wassup_table;
945
- $blogurl = wassupURI::get_sitehome();
946
- $url = parse_url($blogurl);
947
- $sitedomain = preg_replace('/^www\./i','',$url['host']);
948
 
949
  //extend php script timeout length for large tables
950
- if (!ini_get('safe_mode')) {
951
- $php_timeout = @ini_get("max_execution_time");
952
- if (is_numeric($php_timeout) && (int)$php_timeout < 120) {
953
- @set_time_limit(2*60); // ...to 2 minutes
 
954
  }
955
  }
956
  $col_count=array_sum($top_ten);
957
  //extend page width to make room for more than 5 columns
958
- if(empty($res))$res=$wassup_options->wassup_screen_res;
959
- if($res < 640 && $col_count >3)$res=640;
960
  $char_len=(int)($res/$col_count);
961
  $min_width=(($char_len < 90)?90:$char_len);
962
  //Since v1.8.3: top_limit in top10 array
@@ -968,23 +1001,28 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
968
  $multisite_condition="";
969
  //for multisite/network activation
970
  if($wassup_options->network_activated_plugin()){
971
- if(!is_network_admin() && !empty($GLOBALS['current_blog']->blog_id)) $multisite_condition = sprintf(" AND `subsite_id`=%d",(int)$GLOBALS['current_blog']->blog_id);
 
 
972
  }
973
- if(empty($from_date))$from_date=$wpdb->get_var(sprintf("SELECT MIN(`timestamp`) FROM %s WHERE `timestamp`>0 %s",$wassup_table,$multisite_condition));
974
- if(empty($to_date))$to_date=current_time("timestamp");
975
  $top_condition = "`timestamp` BETWEEN '".$from_date."' AND '".$to_date."'";
976
- if (!empty($top_ten['top_nospider'])) $top_condition .= " AND spider=''";
977
  $top_condition .= $multisite_condition;
978
  //top stats header
979
  $table_class="";
980
  if(!empty($_GET['popup'])){
981
  $table_class=' class="popup"';
982
  $wdformat=get_option("date_format");
983
- if(($to_date-$from_date)>24*60*60)$stats_range=gmdate("$wdformat",$from_date)." - ".gmdate("$wdformat",$to_date);
984
- else $stats_range=gmdate("$wdformat H:00",$from_date)." - ".gmdate("$wdformat H:00",$to_date);
 
 
 
985
  $statsheader='<span class="stats-print-btn"><a href="#" class="button" onclick="printstat();return false;">'.__("Print","wassup").'</a></span>'."\n";
986
- $statsheader.='<h4>'.get_option("blogname").'</h4>'."\n";
987
- $statsheader.='<span>'.sprintf(__('Top Stats for Period: %s','wassup'),$stats_range).'</span>';
988
  }
989
  echo "\n"; ?>
990
  <div id="wassup-topstats">
@@ -1012,9 +1050,14 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1012
  if ($top_ten['topsearch'] == 1) {
1013
  $top_results = wGetStats("searches",$top_limit,$top_condition);
1014
  ?>
1015
- <td<?php if($cols==0)echo ' class="firstcol"'; if(!empty($top_results) && count($top_results) >0){$cwidth=2*$min_width; echo ' style="min-width:'.$cwidth.'px"';}?>>
 
 
 
 
 
1016
  <ul class="charts">
1017
- <li class="chartsT"><?php echo _e("TOP QUERY", "wassup");?></li> <?php
1018
  $i=0;
1019
  $ndigits=1;
1020
  if (!empty($top_results) && count($top_results) >0) {
@@ -1022,9 +1065,9 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1022
  foreach ($top_results as $top10) {
1023
  echo "\n"; ?>
1024
  <li class="wassup-nowrap"><nobr><?php
1025
- if ($top10->top_item=="_notprovided_")$top_string='('.__("not provided","wassup").')';
1026
  else $top_string=stringShortener(preg_replace('/'.preg_quote($blogurl,'/').'/i','',$top10->top_item),$char_len);
1027
- echo wPadNum($top10->top_count,$ndigits).' <a href="'.$top10->top_link.'" target="_BLANK" title="'.substr($top10->top_item,0,$wassup_options->wassup_screen_res-100).'">'.$top_string.'</a>';?></nobr></li><?php
1028
  $i++;
1029
  }
1030
  }
@@ -1043,7 +1086,12 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1043
  echo "\n<!--heartbeat-->";
1044
  $top_results = wGetStats("referrers",$top_limit,$top_condition);
1045
  ?>
1046
- <td<?php if($cols==0)echo ' class="firstcol"'; if(!empty($top_results) && count($top_results) >0){$cwidth=(int)(2.5*$min_width); echo ' style="min-width:'.$cwidth.'px"';}?>>
 
 
 
 
 
1047
  <ul class="charts">
1048
  <li class="chartsT"><?php _e("TOP REFERRER", "wassup"); ?></li><?php
1049
  $i=0;
@@ -1053,9 +1101,14 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1053
  foreach ($top_results as $top10) {
1054
  echo "\n"; ?>
1055
  <li class="wassup-nowrap"><?php echo wPadNum($top10->top_count,$ndigits);
1056
- echo ' <a href="'.wassupURI::cleanURL($top10->top_link).'" title="'.wassupURI::cleanURL($top10->top_link).'" target="_BLANK">';
1057
- echo preg_replace('#^https?\://(?:www\d?\.)?#i','',wassupURI::cleanURL($top10->top_item));
1058
- echo '</a>';?></li><?php
 
 
 
 
 
1059
  $i++;
1060
  }
1061
  }
@@ -1072,7 +1125,12 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1072
  echo "\n<!--heartbeat-->\n";
1073
  $top_results=wGetStats("urlrequested",$top_limit,$top_condition);
1074
  ?>
1075
- <td<?php if($cols==0)echo ' class="firstcol"'; if(!empty($top_results) && count($top_results) >0){$cwidth=(int)(2.5*$min_width); echo ' style="min-width:'.$cwidth.'px"';}?>>
 
 
 
 
 
1076
  <ul class="charts">
1077
  <li class="chartsT"><?php _e("TOP REQUEST", "wassup"); ?></li><?php
1078
  $i=0;
@@ -1082,10 +1140,12 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1082
  foreach ($top_results as $top10) {
1083
  echo "\n"; ?>
1084
  <li class="wassup-nowrap"><nobr><?php echo wPadNum($top10->top_count,$ndigits);
1085
- if (strstr($top10->top_item,'[')) { //no link for 404 pages
1086
- echo ' <span class="top10" title="'.substr($top10->top_item,0,$wassup_options->wassup_screen_res-100).'">'.preg_replace('/'.preg_quote($blogurl,'/').'/i', '', $top10->top_item).'</span>';
1087
- } else {
1088
- echo ' <a href="'.wassupURI::add_siteurl($top10->top_link).'" target="_BLANK" title="'.substr($top10->top_item,0,$wassup_options->wassup_screen_res-100).'">'.preg_replace('/'.preg_quote($blogurl,'/').'/i', '', $top10->top_item).'</a>';
 
 
1089
  } ?></nobr></li><?php
1090
  $i++;
1091
  }
@@ -1103,7 +1163,13 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1103
  echo "\n<!--heartbeat-->\n";
1104
  $top_results=wGetStats("browser",$top_limit,$top_condition);
1105
  ?>
1106
- <td<?php if($cols==0)echo ' class="firstcol"';elseif($cols==$col_count-1) echo 'class="lastcol"';if(!empty($top_results) && count($top_results) >0){$cwidth=$min_width+5; echo ' style="min-width:'.$cwidth.'px"';}?>>
 
 
 
 
 
 
1107
  <ul class="charts">
1108
  <li class="chartsT"><?php _e("TOP BROWSER", "wassup") ?></li><?php
1109
  $i=0;
@@ -1113,7 +1179,7 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1113
  foreach ($top_results as $top10) {
1114
  echo "\n"; ?>
1115
  <li class="wassup-nowrap"><nobr><?php echo wPadNum($top10->top_count,$ndigits);
1116
- echo ' <span class="top10" title="'.$top10->top_item.'">'.stringShortener($top10->top_item, $char_len).'</span>'; ?></nobr></li><?php
1117
  $i++;
1118
  }
1119
  }
@@ -1130,7 +1196,13 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1130
  echo "\n<!--heartbeat-->\n";
1131
  $top_results=wGetStats("os",$top_limit,$top_condition);
1132
  ?>
1133
- <td<?php if($cols==0)echo ' class="firstcol"';elseif($cols==$col_count-1) echo 'class="lastcol"';if(!empty($top_results) && count($top_results) >0){$cwidth=$min_width+5; echo ' style="min-width:'.$cwidth.'px"';}?>>
 
 
 
 
 
 
1134
  <ul class="charts">
1135
  <li class="chartsT"><?php _e("TOP OS", "wassup") ?></li><?php
1136
  $i=0;
@@ -1139,7 +1211,7 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1139
  $ndigits = strlen("{$top_results[0]->top_count}");
1140
  foreach ($top_results as $top10) {
1141
  echo "\n"; ?>
1142
- <li class="wassup-nowrap"><nobr><?php echo wPadNum($top10->top_count,$ndigits); ?> <span class="top10" title="<?php echo $top10->top_item; ?>"><?php echo stringShortener($top10->top_item, $char_len); ?></span></nobr></li><?php
1143
  $i++;
1144
  }
1145
  }
@@ -1156,7 +1228,13 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1156
  echo "\n<!--heartbeat-->\n";
1157
  $top_results=wGetStats("language",$top_limit,$top_condition);
1158
  ?>
1159
- <td<?php if($cols==0)echo ' class="firstcol"';elseif($cols==$col_count-1) echo 'class="lastcol"';if(!empty($top_results) && count($top_results) >0){$cwidth=$min_width+5; echo ' style="min-width:'.$cwidth.'px"';}?>>
 
 
 
 
 
 
1160
  <ul class="charts">
1161
  <li class="chartsT"><?php _e("TOP LOCALE", "wassup"); ?></li><?php
1162
  $i=0;
@@ -1166,8 +1244,8 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1166
  foreach($top_results as $top10){
1167
  echo "\n";?>
1168
  <li class="wassup-nowrap"><nobr><?php echo wPadNum($top10->top_count,$ndigits);
1169
- echo ' <img src="'.WASSUPURL.'/img/flags/'.strtolower($top10->top_item).'.png" alt="" />';?>
1170
- <span class="top10" title="<?php echo $top10->top_item;?>"><?php echo $top10->top_item;?></span></nobr></li><?php
1171
  $i++;
1172
  }
1173
  }
@@ -1184,7 +1262,13 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1184
  echo "\n<!--heartbeat-->\n";
1185
  $top_results=wGetStats("visitor",$top_limit,$top_condition);
1186
  ?>
1187
- <td<?php if($cols==0)echo ' class="firstcol"';elseif($cols==$col_count-1) echo 'class="lastcol"';if(!empty($top_results) && count($top_results) >0){ $cwidth= (int)(1.5*$min_width); echo ' style="min-width:'.$cwidth.'px"';}?>>
 
 
 
 
 
 
1188
  <ul class="charts">
1189
  <li class="chartsT"><?php _e("TOP VISITOR", "wassup"); ?></li><?php
1190
  $i=0;
@@ -1199,7 +1283,7 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1199
  else
1200
  $uclass="";
1201
  echo "\n"; ?>
1202
- <li class="wassup-nowrap"><nobr><?php echo wPadNum($top10->top_count,$ndigits).' <span class="top10'.$uclass.'" title="'.$top10->top_item.'">'.stringShortener($top10->top_item, $char_len).'</span>'; ?></nobr></li><?php
1203
  $i++;
1204
  } //end loop
1205
  }
@@ -1216,7 +1300,13 @@ function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title
1216
  echo "\n<!--heartbeat-->\n";
1217
  $top_results=wGetStats("postid",$top_limit,$top_condition);
1218
  ?>
1219
- <td<?php if($cols==0)echo ' class="firstcol"';elseif($cols==$col_count-1) echo 'class="lastcol"';if(!empty($top_results) && count($top_results) >0){ $cwidth=2*$min_width; echo ' style="min-width:'.$cwidth.'px"';}?>>
 
 
 
 
 
 
1220
  <ul class="charts">
1221
  <li class="chartsT"><?php _e("TOP ARTICLE", "wassup"); ?></li><?php
1222
  $i=0;
@@ -1298,7 +1388,7 @@ function wPadNum($li_number, $li_width=1) {
1298
  return ($padhtml);
1299
  }
1300
 
1301
- //Round the integer to the next near 10
1302
  function roundup($value) {
1303
  //$dg = digit_count($value);
1304
  $numstr = (int)$value;
@@ -1311,11 +1401,13 @@ function roundup($value) {
1311
  return (ceil(intval($value)/pow(10, $dg))*pow(10, $dg)+pow(10, $dg));
1312
  }
1313
 
 
 
 
 
1314
  function Gchart_data($Wvisits, $pages=null, $atime=null, $type, $charttype=null, $axes=null, $chart_loc=null) {
1315
  global $wdebug_mode;
1316
  $chartAPIdata = false;
1317
- // Port of JavaScript from http://code.google.com/apis/chart/
1318
- // http://james.cridland.net/code
1319
  // First, find the maximum value from the values given
1320
  if ($axes == 1) {
1321
  $maxValue = roundup(max(array_merge($Wvisits, $pages)));
@@ -1385,7 +1477,10 @@ function Gchart_data($Wvisits, $pages=null, $atime=null, $type, $charttype=null,
1385
  return $chartAPIdata;
1386
  } //end Gchart_data
1387
 
1388
- // Used to show main visitors details query, to count items and to extract data for main chart
 
 
 
1389
  class WassupItems {
1390
  var $tableName;
1391
  var $from_date;
@@ -1439,7 +1534,7 @@ class WassupItems {
1439
  }else{
1440
  $this->Limit=esc_attr($limit);
1441
  }
1442
- //New in v1.9: this->_whereis replaces to_date/from_date in where condition to add multisite blog id in query
1443
  if (!empty($whereis)){
1444
  if (preg_match('/^\s*(AND|OR)/i',$whereis)>0){
1445
  if(!empty($from_date)){
@@ -1495,37 +1590,45 @@ class WassupItems {
1495
  $this->ItemsType=$Type;
1496
  $this->searchString=$Search;
1497
  $ss="";
1498
- if(!empty($Search)|| !empty($specific_where_clause))$ss=$this->buildSearch($Search,$specific_where_clause);
1499
- if(!empty($ss) && stristr($this->_whereis, ' OR ')!==false) $whereis= '('.$this->_whereis.')'.$ss;
1500
- else $whereis= $this->_whereis . $ss;
 
 
 
 
 
1501
  $buffered="";
1502
  //abort if there is nothing in totrecords var
1503
  if(empty($this->totrecords) || !is_numeric($this->totrecords)){
1504
  return;
1505
  }
1506
  //use "sql_buffer_result" to help speed up retrieval of large datasets
1507
- if($this->totrecords >5000)$buffered="SQL_BUFFER_RESULT";
1508
  // Switch by every (global) items type (visits, pageviews, spams, etc...)
1509
  switch ($Type) {
1510
  // This is the MAIN query to show the chronology
1511
  case "main":
1512
- //## Extend mysql wait timeout to 2.5 minutes and extend php script timeout to 3 minutes to prevent script hangs
1513
- if(!ini_get('safe_mode')){
1514
- $stimeout=ini_get("max_execution_time");
1515
- if(!is_numeric($stimeout)||(int)$stimeout <180) set_time_limit(180);
 
 
 
1516
  }
1517
  $mtimeout=$wpdb->get_var("SELECT @@session.wait_timeout AS mtimeout FROM dual");
1518
  if(is_numeric($mtimeout) && $mtimeout<160) $result=$wpdb->query("SET wait_timeout=160");
1519
  //main query
1520
  // "sql_buffer_result" select option helps in cases where it takes a long time to retrieve results.
1521
- $qry = sprintf("SELECT $buffered `id`, `wassup_id`, max(`timestamp`) as max_timestamp, min(`timestamp`) as min_timestamp, count(`wassup_id`) as page_hits, `ip`, `hostname`, `urlrequested`, `referrer`, GROUP_CONCAT(DISTINCT `username` ORDER BY `username` SEPARATOR ', ') AS login_name, `comment_author`, `agent`, `browser`, `os`, `spider`, `feed`, max(`spam`) AS malware_type, `screen_res`, `language`, `search`, `searchengine`, `searchpage`, `url_wpid` FROM %s WHERE %s GROUP BY `wassup_id` ORDER BY max_timestamp DESC %s",
1522
  $this->tableName,
1523
  $whereis,
1524
  $this->Limit);
1525
  $results = $wpdb->get_results($qry);
1526
  //try without buffer
1527
  if ((is_wp_error($results) || empty($results) || !is_array($results)) && !empty($this->totrecords) && !empty($buffered)) {
1528
- $qry = sprintf("SELECT `id`, `wassup_id`, max(`timestamp`) as max_timestamp, min(`timestamp`) as min_timestamp, count(`wassup_id`) as page_hits, `ip`, `hostname`, `urlrequested`, `referrer`, GROUP_CONCAT(DISTINCT `username` ORDER BY `username` SEPARATOR ', ') AS login_name, `comment_author`, `agent`, `browser`, `os`, `spider`, `feed`, max(`spam`) AS malware_type, `screen_res`, `language`, `search`, `searchengine`, `searchpage`, `url_wpid` FROM %s WHERE %s GROUP BY `wassup_id` ORDER BY max_timestamp DESC %s",
1529
  $this->tableName,
1530
  $whereis,
1531
  $this->Limit);
@@ -1535,7 +1638,7 @@ class WassupItems {
1535
  case "count":
1536
  // These are the queries to count the items hits/pages/spam
1537
  $distinct="";
1538
- if($distinct_type=="DISTINCT")$distinct="DISTINCT ";
1539
  $qry=sprintf("SELECT COUNT(%s`wassup_id`) AS itemstot FROM %s WHERE %s", $distinct, $this->tableName, $whereis);
1540
  $results = $wpdb->get_var($qry);
1541
  break;
@@ -1550,7 +1653,7 @@ class WassupItems {
1550
  case "count-ip": //TODO
1551
  // These are the queries to count the hits/pages/spam by ip
1552
  $distinct="";
1553
- if($distinct_type=="DISTINCT")$distinct="DISTINCT ";
1554
  $qry = sprintf("SELECT COUNT(%s`ip`) AS itemstot FROM %s WHERE %s", $distinct, $this->tableName, $whereis);
1555
  $results = $wpdb->get_var($qry);
1556
  break;
@@ -1617,7 +1720,7 @@ class WassupItems {
1617
  $chart_url="";
1618
  //First check for cached chart
1619
  $chart_key="$chart_loc{$Res}{$axes_type}{$chart_group}{$Ctype}_".intval(date('i')/15).date('HdmY');
1620
- if(!empty($Search))$chart_key .="_s".esc_attr($Search);
1621
  $chart_url=wassupDb::get_wassupmeta($chart_key,'_chart');
1622
  if (!empty($chart_url)) {
1623
  if ($wdebug_mode)
@@ -1635,6 +1738,7 @@ class WassupItems {
1635
  //`timestamp` is localized before insert into table, so datetime translation from MySQL with 'FROM_UNIXTIME' must be converted to UTC/GMT afterwards to get an accurate datetime value for Wordpress.
1636
  $UTCoffset = wassupDb::get_db_setting("tzoffset");
1637
  if (empty($UTCoffset)) $UTCoffset = "+0:00"; //GMT
 
1638
  //set x-axis date format to Wordpress date format
1639
  $USAdate = $wassup_options->is_USAdate();
1640
  $hour_fromdate = $this->from_date;
@@ -1819,17 +1923,13 @@ class WassupItems {
1819
  }
1820
  }
1821
  if ($x_divisor > 1) {
1822
- $qry = sprintf("SELECT COUNT( DISTINCT `wassup_id` ) AS items, COUNT(`wassup_id`) AS pages, CAST(`timestamp`/$x_divisor AS UNSIGNED)*$x_divisor AS xgroup, DATE_FORMAT(CONVERT_TZ( FROM_UNIXTIME(CAST((`timestamp`+0)/$x_divisor AS UNSIGNED)*$x_divisor), '%s', '+0:00'), '%s') as thedate FROM %s WHERE %s GROUP BY 3 ORDER BY `timestamp`",
1823
- $UTCoffset,
1824
  $x_axes_label,
1825
  $this->tableName,
1826
  $whereis);
1827
  } else {
1828
- //SELECT COUNT(DISTINCT `wassup_id` ) AS items, COUNT(`wassup_id`) AS pages, DATE_FORMAT(DATE_ADD('1970-01-01 00:00:00', INTERVAL CAST(`timestamp` AS UNSIGNED) SECOND), '%s') AS xgroup, DATE_FORMAT(DATE_ADD('1970-01-01 00:00:00', INTERVAL CAST(`timestamp` AS UNSIGNED) SECOND)), '%s') as thedate FROM wp_wassup WHERE %s GROUP BY 3 ORDER BY `timestamp`
1829
- $qry = sprintf("SELECT COUNT( DISTINCT `wassup_id` ) AS items, COUNT(`wassup_id`) AS pages, DATE_FORMAT(CONVERT_TZ(FROM_UNIXTIME(CAST(`timestamp` AS UNSIGNED)), '%s', '+0:00'), '%s') AS xgroup, DATE_FORMAT(CONVERT_TZ( FROM_UNIXTIME(CAST(`timestamp` AS UNSIGNED)), '%s', '+0:00'), '%s') as thedate FROM %s WHERE %s GROUP BY 3 ORDER BY `timestamp`",
1830
- $UTCoffset,
1831
  $x_groupformat,
1832
- $UTCoffset,
1833
  $x_axes_label,
1834
  $this->tableName,
1835
  $whereis);
@@ -1897,12 +1997,12 @@ class WassupItems {
1897
  } elseif ($lablcount == 31) {
1898
  $x_grid=6.45;
1899
  }
1900
- //TODO: Google image chart api deprecated as of 4/20/2012 - replace with Google interactive charts api after 4/15/2015 - see: https://google-developers.appspot.com/chart/interactive/docs/gallery/linechart
1901
  // generate url for google chart image
1902
  $chart_url ="https://chart.googleapis.com/chart?cht=lc&chf=".$chart_bg."&chtt=".urlencode($cTitle)."&chls=4,1,0|2,6,2&chco=1111dd,FF6D06&chm=B,1111dd30,0,0,0&chg={$x_grid},25,1,5&chs={$Res}x{$chart_height}&chd=".Gchart_data($y_hits, $y_pages, $x_label, $x_groupformat, "main", $axes_type, $chart_loc);
1903
  //cache chart url in wassup_meta table for up to 5 minutes
1904
  $chart_key="$chart_loc{$Res}{$axes_type}{$chart_group}{$Ctype}_".intval(date('i')/15).date('HdmY');
1905
- if(!empty($Search))$chart_key .="_s".esc_attr($Search);
1906
  $expire=(int)(time()+$cache_time);
1907
  $cache_id=wassupDb::save_wassupmeta($chart_key,'_chart',"$chart_url",$expire);
1908
  } //end if chart_points>0
@@ -1930,7 +2030,7 @@ class wcURL {
1930
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
1931
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
1932
  curl_setopt($ch, CURLOPT_LOW_SPEED_TIME, 10);
1933
- curl_setopt($ch, CURLOPT_TIMEOUT, 20);
1934
  if (ini_get('open_basedir')=="") { //causes error
1935
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
1936
  }
@@ -1968,23 +2068,16 @@ class wcURL {
1968
  */
1969
  function wFetchAPIData($api_url) {
1970
  global $wdebug_mode;
1971
-
1972
  $wassup_agent=apply_filters('http_headers_useragent',"WassUp/".WASSUPVERSION." - www.wpwp.org");
1973
  $apidata=array();
1974
- //lets not wait for slow server responses
1975
- $stimeout=0;
1976
- if(!ini_get('safe_mode')){
1977
- $stimeout=ini_get("max_execution_time");
1978
- //decrease script timeout to 7 seconds to avoid slowdowns due to slow server response
1979
- if((int)$stimeout>7)set_time_limit(7);
1980
- }
1981
  //try Wordpress 'wp_remote_get' for api results
1982
  if(function_exists('wp_remote_get')){
1983
- $opts=array('user-agent'=>"$wassup_agent");
1984
  $api_remote=@wp_remote_get($api_url,$opts);
1985
- if(!is_wp_error($api_remote) && is_array($api_remote)){
1986
- if(!empty($api_remote['body']))$apidata=$api_remote['body'];
1987
- elseif(!empty($api_remote['response']))$apidata="no data";
1988
  }
1989
  $api_method='wp_remote_get'; //debug
1990
  }
@@ -1997,12 +2090,15 @@ function wFetchAPIData($api_url) {
1997
  $api_method='wcURL'; //debug
1998
  }
1999
  // try 'file_get_contents' to get api results
2000
- if (empty($apidata) && ini_get('allow_url_fopen')== true) {
2001
  // context stream compatible with PHP 5.0.0+
2002
  if (version_compare(PHP_VERSION,"5.0.0",">=")) {
2003
- $opts = array( 'http'=>array(
2004
- 'method'=>"GET",
2005
- 'header'=>"User-agent: ".$wassup_agent."\r\n"));
 
 
 
2006
  $context = stream_context_create($opts);
2007
  // Open file using HTTP headers set above
2008
  $apidata = @file_get_contents($api_url, false, $context);
@@ -2016,7 +2112,7 @@ function wFetchAPIData($api_url) {
2016
  print_r($apidata);
2017
  echo "-->\n";
2018
  }
2019
- if(!empty($stimeout))set_time_limit($stimeout);
2020
  return $apidata;
2021
  } //end wFetchAPIData
2022
  ?>
5
  * @package WassUp Real-time Analytics
6
  * @subpackage main.php module
7
  */
8
+ //-------------------------------------------------
9
+ //# No direct requests for this plugin module
10
+ $wfile=preg_replace('/\\\\/','/',__FILE__); //for windows
11
+ //abort if this is direct uri request for file
12
+ if((!empty($_SERVER['PHP_SELF']) && preg_match('#'.preg_quote($_SERVER['PHP_SELF']).'$#',$wfile)>0) ||
13
+ (!empty($_SERVER['SCRIPT_FILENAME']) && realpath($_SERVER['SCRIPT_FILENAME'])===realpath($wfile))){
14
+ //try track this uri request
15
+ if(!headers_sent()){
16
+ //triggers redirect to 404 error page so Wassup can track this attempt to access itself (original request_uri is lost)
17
+ header('Location: /?p=404page&err=wassup403'.'&wf='.basename($wfile));
18
+ exit;
19
+ }else{
20
+ //'wp_die' may be undefined here
21
+ die('<strong>Sorry. Unable to display requested page.</strong>');
22
+ }
23
  exit;
24
+ //abort if no WordPress
25
+ }elseif(!defined('ABSPATH') || empty($GLOBALS['wp_version'])){
26
+ //show escaped bad request on exit
27
+ die("Bad Request: ".htmlspecialchars(preg_replace('/(&#0*37;|&amp;#0*37;|&#0*38;#0*37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));
28
  }
29
+ unset($wfile); //to free memory
30
+
31
+ //-------------------------------------------------
32
  if(!class_exists('wassup_pagination')){
33
+ /**
34
+ * Digg style paginator class based on the work of Victor De La Rocha - http://www.mis-algoritmos.com.
35
+ */
36
  class wassup_pagination{
37
  var $total_pages;
38
  var $limit;
49
  var $urlF;
50
  var $calculate;
51
  var $pagination;
52
+ //PHP4 constructor
53
+ function wassup_pagination(){
54
  $this->total_pages=null;
55
  $this->limit=null;
56
  $this->target="";
58
  $this->adjacents=2;
59
  $this->showCounter=false;
60
  $this->className="pagination";
61
+ $this->parameterName="pp"; //formerly pages
62
+ //Buttons next and previous
 
 
63
  $this->nextT=__("Next","wassup");
64
+ $this->nextI="&#187;"; //&#9658;
65
  $this->prevT=__("Previous","wassup");
66
+ $this->prevI="&#171;"; //&#9668;
67
+ $this->urlF=false; //urlFriendly
 
68
  $this->calculate=false;
69
  $this->pagination="";
70
  }
74
  function currentPage($value){$this->page=intval($value);}
75
  function adjacents($value){$this->adjacents=intval($value);}
76
  function showCounter($value=""){$this->showCounter=($value===true)?true:false;}
77
+ //to change the pagination '<div>' css class
78
  function changeClass($value=""){$this->className=$value;}
79
  function nextLabel($value){$this->nextT = $value;}
80
  function nextIcon($value){$this->nextI = $value;}
81
  function prevLabel($value){$this->prevT = $value;}
82
  function prevIcon($value){$this->prevI = $value;}
 
83
  function parameterName($value=""){$this->parameterName=$value;}
84
  //to change urlFriendly
85
  function urlFriendly($value="%"){
86
+ //"preg_match" replaces deprecated "eregi" function @since v1.9
87
  if(preg_match('/^ *$/i',$value)>0){
88
  $this->urlF=false;
89
  return false;
107
  }
108
  function calculate(){
109
  $this->pagination="";
 
110
  $error=false;
111
  if($this->urlF && $this->urlF !='%' && strpos($this->target,$this->urlF)===false){
112
  echo 'Especificaste un wildcard para sustituir, pero no existe en el target<br />';
179
 
180
  if(!class_exists('wDetector')){
181
  /**
182
+ * Class for lightweight user agent detection
183
+ * - Loosely based on Detector class by Mohammad Hafiz bin Ismail (info@mypapit.net)
184
+ * - Renamed to 'wDetector' (from 'Detector') for better compatibility with other plugins @since v1.9
185
  */
186
  class wDetector{
187
  var $browser;
197
  function check_os($useragent){
198
  $os="";
199
  $version="";
200
+ if(preg_match("/Xbox; Xbox/",$useragent,$match)){$os="Xbox";}
201
+ elseif(preg_match("/Windows NT 10\.0/",$useragent,$match)){$os="Win10";}
202
+ elseif(preg_match("/Windows NT 6\.3/",$useragent,$match)){$os="Win8";}
203
+ elseif(preg_match("/Windows NT 6\.2/",$useragent,$match)){$os="Win8";}
204
+ elseif(preg_match("/Windows NT 6\.1/",$useragent,$match)){$os="Win7";}
205
+ elseif(preg_match("/Windows NT 6\.0/",$useragent,$match)){$os="WinVista";}
206
+ elseif(preg_match("/Windows NT 5\.2/",$useragent,$match)){$os="Win2003";}
207
+ elseif(preg_match("/Windows NT 5\.1/",$useragent,$match)){$os="WinXP";}
208
+ elseif(preg_match("/(?:Windows NT 5\.0|Windows 2000)/",$useragent,$match)){$os="Win2000";}
209
  elseif(preg_match("/(?:WinNT|Windows\s?NT)\s?([0-4\.]+)?/",$useragent,$match)){$os="WinNT";$version=$match[1];}
210
+ elseif(preg_match("/Windows\sPhone\s(8|10)\./",$useragent,$match)){$os="Win".$match[1].' Mobile';}
211
+ elseif(preg_match("/Mac OS X/",$useragent,$match)){$os="MacOSX";}
212
+ elseif(preg_match("/(Mac_PowerPC|Macintosh)/",$useragent,$match)){$os="MacPPC";}
213
+ elseif(preg_match("/Windows ME/",$useragent,$match)){$os="WinME";}
214
+ elseif(preg_match("/(?:Windows95|Windows 95|Win95|Win 95)/",$useragent,$match)){$os="Win95";}
215
+ elseif(preg_match("/(?:Windows98|Windows 98|Win98|Win 98|Win 9x)/",$useragent,$match)){$os="Win98";}
216
+ elseif(preg_match("/(?:WindowsCE|Windows CE|WinCE|Win CE)/",$useragent,$match)){$os="WinCE";}
217
+ elseif(preg_match("/Windows\sPhone\sOS\s\d+/",$useragent,$match)){$os="WinCE";}
218
  elseif(preg_match("/PalmOS/",$useragent,$match)){$os="PalmOS";}
219
  elseif(preg_match("/\(PDA(?:.*)\)(.*)Zaurus/",$useragent,$match)){$os="Sharp Zaurus";}
220
+ elseif(preg_match("/Android\s*([0-9\.]+)/",$useragent,$match)){$os="Android";$version=$match[1];}
221
  elseif(preg_match("/Linux\s*((?:i[0-9]{3})?\s*(?:[0-9]\.[0-9]{1,2}\.[0-9]{1,2})?\s*(?:i[0-9]{3})?)?/",$useragent,$match)){$os="Linux";$version=$match[1];}
222
  elseif(preg_match("/NetBSD\s*((?:i[0-9]{3})?\s*(?:[0-9]\.[0-9]{1,2}\.[0-9]{1,2})?\s*(?:i[0-9]{3})?)?/",$useragent,$match)){$os="NetBSD";$version=$match[1];}
223
  elseif(preg_match("/OpenBSD\s*([0-9\.]+)?/",$useragent,$match)){$os="OpenBSD";$version=$match[1];}
234
  function check_browser($useragent) {
235
  $browser="";
236
  $version="";
237
+ $match=array();
238
+ if(strstr($useragent,' Gecko/')==false && preg_match("#^Mozilla\/\d\.\d\s\(Windows\sNT\s\d+(?:\.\d+)?;(?:\s[0-9A-Za-z./]+;)+\srv\:([0-9\.]+)\)#",$useragent,$match)){
 
239
  $browser="IE";
240
+ }elseif(preg_match("#^Mozilla\/[0-9.\s]+\(Windows\s(?:NT|Phone)\s[0-9.]+.+\).+(?:\sChrome|Safari)\/[0-9.]+.+\sEdge\/([0-9\.]+)#",$useragent,$match)){
241
+ $browser="Edge";
242
+ $version=$match[1];
243
  }elseif(preg_match("/^Mozilla(?:.*)compatible;\sMSIE\s(?:.*)Opera\s([0-9\.]+)/",$useragent,$match)){
244
  $browser = "Opera";
245
  }elseif(preg_match("/^Opera\/([0-9\.]+)/",$useragent,$match)){
317
  }elseif(preg_match("/^SonyEricsson([0-9a-zA-Z\-.]+)\/([a-zA-Z0-9\.]+)/i",$useragent,$match)){
318
  $browser="SonyEricsson";
319
  }
320
+ if(empty($version) && !empty($match[1]) && preg_match("/^\d+(\.\d+)?/",$match[1],$pcs)>0){ //v1.9.1 bugfix
321
  $version=$pcs[0];
322
  }
323
  $this->browser=$browser;
326
  } //end class wDetector
327
 
328
  /**
329
+ * Class to check for previous comment spam activity
330
+ * - Looks for previous spammer comment from IP or referrer url
331
  */
332
  class wassup_checkComment{
333
  /** check for previous comment spam */
354
  } //end Class
355
  } //end if !class_exists('wDetector')
356
 
357
+ /** Truncate $input string to a length of $max */
358
  function stringShortener($input, $max=0, $separator="(...)", $exceedFromEnd=0){
359
+ if(!$input || !is_string($input)){
360
+ return false;
361
+ }
362
+ //temporarily replace all %-hex chars with literals and trim the input string of whitespaces...re-encoded after truncation
363
+ $instring=trim(stripslashes(rawurldecode(html_entity_decode(wassupURI::disarm_attack($input))))," +\t");
 
 
364
  $inputlen=strlen($instring);
365
  $max=(is_numeric($max))?(integer)$max:$inputlen;
366
  if($max <$inputlen){
368
  $modulus=(($max%2));
369
  $halfMax=floor($max/2);
370
  $begin="";
371
+ if(!$modulus){
372
+ $begin=substr($instring, 0, $halfMax);
373
+ }else{
374
+ $begin=(!$exceedFromEnd)? substr($instring, 0, $halfMax+1) : substr($instring, 0, $halfMax);
375
+ }
376
  $end="";
377
+ if(!$modulus){
378
+ $end=substr($instring,$inputlen-$halfMax);
379
+ }else{
380
+ $end=($exceedFromEnd)? substr($instring,$inputlen-$halfMax-1) :substr($instring,$inputlen-$halfMax);
381
+ }
382
  $extracted=substr($instring, strpos($instring,$begin)+strlen($begin), $inputlen-$max );
383
+ $outstring=$begin.$separator.$end;
384
+ if(strlen($outstring) >= $inputlen){ //Because "Fir(...)fox" is longer than "Firefox"
385
+ $outstring=$instring;
386
  }
387
+ // uses 'esc_attr' and 'esc_html' to make malicious code harmless when echoed to the screen
 
388
  $outstring=esc_attr(esc_html($outstring,ENT_QUOTES));
389
  } else {
390
+ $outstring=esc_attr(esc_html($instring,ENT_QUOTES));
391
  }
392
  return $outstring;
393
  } //end function stringShortener
394
 
 
 
 
395
  /**
396
  * Display a single wassup record as a "raw" list of fields
397
  * @since v1.9
452
  $result=$wpdb->get_var(sprintf("SELECT `post_title` from {$wpdb->prefix}posts WHERE `ID`=%d",(int)$rk->url_wpid));
453
  if(empty($result) || is_wp_error($result)) $p_title=" ** ". __("none or deleted post","wassup")." ** ";
454
  else $p_title=$result;
455
+ if(!empty($p_title)) echo '</span><nobr> &nbsp; &nbsp; '.__("Title","wassup").': </nobr><span class="raw">'.esc_attr($p_title);
456
  }?></span></li>
457
  <li><span class="field"><?php echo __("Referrer","wassup");?>:</span><span class="raw"><?php echo wassupURI::cleanURL($rk->referrer);?></span></li><?php
458
  if(!empty($rk->search) || !empty($rk->searchengine) || !empty($rk->searchpage)){
468
  }?>
469
  <li><span class="field"><?php echo __("OS","wassup");?>:</span><span class="raw"><?php echo esc_attr($rk->os);?></span></li>
470
  <li><span class="field"><?php echo __("Locale/Language","wassup")?>:</span><span class="raw"><?php echo esc_attr($rk->language);?></span></li>
471
+ <li><span class="field"><?php echo __("Screen Resolution","wassup");?>:</span><span class="raw"><?php if(!empty($rk->resolution)) echo esc_attr($rk->resolution);elseif(!empty($rk->screen_res)) echo $rk->screen_res;?></span></li><?php
472
  if(trim($rk->login_name,', ')!=""){
473
  echo "\n";?>
474
  <li><span class="field"><?php echo __("Username","wassup");?>:</span><span class="raw"><?php echo esc_attr(trim($rk->login_name,', '));?></span></li><?php
516
  } //end if rk
517
  } //end wassup_rawdataView
518
 
519
+ /**
520
+ * Retrieve newest data, geolocate visitors, format and display as html.
521
+ * - For 'spia.js', an ajax/jQuery plugin that shows live activity
522
+ * - Output html is displayed/streamed in the old Digg Spy style (2008)
523
+ */
524
  function wassup_spiaView ($from_date="",$rows=0,$spytype="",$spy_datasource="") {
525
  global $wpdb,$wp_version,$current_user,$wassup_options,$wdebug_mode;
526
+ if(!class_exists('wassupOptions')){
527
+ if(!wassup_init()) return; //nothing to do
528
+ }
529
  if(empty($wassup_options)) $wassup_options=new wassupOptions;
530
  $wassup_table=$wassup_options->wassup_table;
531
  if(!is_object($current_user) || empty($current_user->ID)) $user=wp_get_current_user();
562
  $geo_markers=0;
563
  if($spy_datasource == $wassup_table) $qryC = $wpdb->get_results(sprintf("SELECT `id`, `wassup_id`, `timestamp`, `ip`, `hostname`, `searchengine`, `urlrequested`, `agent`, `referrer`, `spider`, `feed`, `username`, `comment_author`, `language`, `spam` FROM %s WHERE `timestamp` >'%d' %s ORDER BY `timestamp` DESC LIMIT %d",$spy_datasource,$from_date,$whereis,$rows));
564
  else $qryC = $wpdb->get_results(sprintf("SELECT `id`, `wassup_id`, `timestamp`, `ip`, `hostname`, `searchengine`, `urlrequested`, `agent`, `referrer`, `spider`, `feed`, `username`, `comment_author`, `language`, `spam` FROM %s WHERE `timestamp` >'%d' %s ORDER BY `timestamp` LIMIT %d",$spy_datasource,$from_date,$whereis,$rows));
565
+ if(!empty($qryC) && !is_wp_error($qryC)){
 
566
  $qrows=count($qryC);
567
  $row_count=0;
568
  $char_len=$max_char_len*.9;
585
  $requesturl=wassupURI::url_link($cv->urlrequested,$char_len,$cv->spam);
586
  if($cv->hostname !="" && $cv->hostname !="unknown") $hostname=$cv->hostname;
587
  else $hostname=__("unknown");
588
+ if(!empty($cv->spam)){
589
  $unclass="sum-box-spam";
590
  $ulclass="spider";
591
  $map_icon="pinbot";
641
  $flag='<img src="'.WASSUPURL.'/img/flags/'.$locale.'.png" title="'.$flag_title.'" />';
642
  //update language/locale code when different from geoip country code (not us)
643
  if(empty($cv->language) || ($cv->language =="us" && $locale!="us")){
644
+ $wassup_dbtask[]=sprintf("UPDATE `$wassup_table` SET `language`='%s' WHERE `wassup_id`='%s' AND `language`='%s'",$locale,$cv->wassup_id,$cv->language); //v1.9.1 bugfix
645
  }
646
  }
647
  }
661
  }
662
  $markerHtml='<div><div class="bubble">'.$visitor.'<br />IP: '.$ip."<br />".__("Country:","wassup").' '.$flag.' '.$location."<br />".__("URL Request:","wassup")." $timef - $requesturl".'<br /></div></div>';
663
  $markerjs=wAdd_GeoMarker('spiamap',$cv->id,$lat,$lon,$markerHtml,$map_icon,true);
664
+ //clickable ip repositions and zooms map at ip marker @since v1.9
665
  $ipclick='<a href="#spia_map" onclick="showMarkerinfo(spiamap,'.$lat.','.$lon.',marker'.(int)$cv->id.',minfo'.(int)$cv->id.');return false;"><span class="sum-box-ip '.$unclass.'">'.$ip.'</span></a>';
666
  } //end if spy_map
667
  echo "\n";?>
690
  wp_schedule_single_event(time()+30,'wassup_scheduled_dbtasks',$args);
691
  }
692
  }
693
+ }else{
694
+ if(!is_wp_error($qryC) && !empty($wdebug_mode) && $to_date - $from_date >90 && $to_date%23 == 0){
695
+ //display a "no activity" message occasionally in wdebug_mode as visual indicator that spia.js javascript is running
696
+ echo "\n";?>
697
  <div class="sum-spy">
698
  <div class="sum-rec sum-nav-spy" style="width:auto;padding:3px;">
699
  <span class="det3"><?php
700
+ if($wassup_options->wassup_time_format == "12"){
701
+ echo gmdate('h:i:s A',$to_date);
702
+ }else{
703
+ echo gmdate('H:i:s',$to_date);
704
+ }
705
+ echo ' - '.__("No visitor activity","wassup");?> &nbsp; &nbsp; :-( &nbsp; </span>
706
  </div>
707
  </div><?php
708
+ }
709
  echo "\n";
710
  } //end if !empty($qryC)
 
711
  } //end function wassup_spiaView
712
 
713
+ /** Return javascript to add a marker to a google map. @since v1.8 */
 
 
 
714
  function wAdd_GeoMarker($map,$item_id,$lat,$lon,$markerHtml,$map_icon,$pan=true) {
715
  $markerjs='<script type="text/javascript">var pos=new google.maps.LatLng('.$lat.','.$lon.');var marker'.$item_id.'=new google.maps.Marker({map:'.$map.',position:pos,icon:'.$map_icon.',animation:google.maps.Animation.DROP});var mcontent=\''.str_replace('\'','"',$markerHtml).'\';var minfo'.$item_id.'=new google.maps.InfoWindow({content:mcontent});';
716
  $markerjs .='google.maps.event.addListener(marker'.$item_id.',"click",function(){minfo'.$item_id.'.open('.$map.',marker'.$item_id.')});'.$map.'.setZoom(3);';
717
  if($pan)$markerjs .=$map.'.panTo(pos);';
718
  $markerjs .='</script>';
719
  return $markerjs;
720
+ }
721
 
722
+ /**
723
+ * return a location name formatted for wassup_spiaView from array argument
724
+ * @since v1.8
725
+ */
726
  function wGetLocationname($geoip_rec=array()) {
727
  $country_code="";
728
  if(!empty($geoip_rec['country_code']))$country_code=strtoupper($geoip_rec['country_code']);
755
  }
756
 
757
  /**
758
+ * Return geographic location and coordinates for an IP address and cache the data in 'wassup_meta' table.
759
  * Since version 1.8
760
  * @param array (ip address or hostname)
761
  * @return array (ip, location, latitude, longitude, country)
825
  function wGetStats($stat_type, $stat_limit=10, $stat_condition="",$return_sql=false) {
826
  global $wpdb, $wassup_options, $wdebug_mode;
827
  if(!class_exists('wassupOptions')){
828
+ if(!wassup_init()) return; //nothing to do
829
  $wassup_options=new wassupOptions;
830
  }elseif(empty($wassup_options)){
831
  $wassup_options=new wassupOptions;
832
  }
833
+ if(!is_array($wassup_options->wassup_top10)){
834
+ $top_ten = unserialize(html_entity_decode($wassup_options->wassup_top10));
835
+ }else{
836
+ $top_ten=$wassup_options->wassup_top10;
837
+ }
838
  $wpurl= strtolower(wassupURI::get_wphome());
839
  $blogurl= strtolower(wassupURI::get_sitehome());
840
  $wassup_table=$wassup_options->wassup_table;
847
  }
848
  $sql="";
849
  //top search phrases...
850
+ if($stat_type == "searches" || $stat_type=="search"){
851
+ $sql=sprintf("SELECT count(*) AS top_count, `search` AS top_item, max(`timestamp`) AS visit_timestamp, `referrer` AS top_link FROM `$wassup_table` WHERE %s AND `search`!='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition,$stat_limit);
852
 
853
  //Top external referrers...
854
  }elseif($stat_type=="referrers" || $stat_type=="referrer"){
875
  if(!empty($pcs[1]))$www=str_replace('.','\\.',$pcs[1]);
876
  $exclude_domain=$pcs[2];
877
  }
878
+ //wildcard(*) allowed in domain @since v1.9
879
  if(empty($regex_domains)) $regex_domains=str_replace(array('.','*'),array('\\.','.*'),rtrim(trim($exclude_domain),'*,'));
880
  else $regex_domains.="|".str_replace(array('.','*'),array('\\.','.*'),rtrim(trim($exclude_domain),'*,'));
881
  } //end foreach
884
  }
885
  //exclude the major search engines from referrers
886
  $exclude_referrers .=" AND TRIM(LEADING 'http://' FROM TRIM(LEADING 'https://' FROM `referrer`)) NOT RLIKE '^(".$www.")?".'([0-9]|[a-z]|\\-|\\.|_)*\\.?(google'.'\\.'."com|yahoo".'\\.'."com|bing".'\\.'."com)'";
887
+ $sql=sprintf("SELECT count(*) AS top_count, TRIM(LEADING '//' FROM TRIM(LEADING 'http:' FROM TRIM(LEADING 'https:' FROM `referrer`))) AS top_item, max(`timestamp`) AS visit_timestamp, `referrer` AS top_link FROM `$wassup_table` WHERE %s AND `referrer`!='' AND `search`='' AND `spam`='0' %s GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d", $stat_condition, $exclude_referrers, $stat_limit);
888
 
889
  //top url requests...
890
+ }elseif($stat_type == "urlrequested" || $stat_type=="requests"){
 
891
  $stat_condition1=$stat_condition." AND `urlrequested` NOT LIKE '%?p=%' AND `urlrequested` NOT LIKE '%&p=%'";
892
  $stat_condition2=$stat_condition." AND `urlrequested` LIKE '%?p=%' OR `urlrequested` LIKE '%&p=%'";
893
+ //exclude labels ('#xxxx') and query parameters from url except for '[?&]p=xx' to better match urls in MySQL @since v1.9
894
+ $sql=sprintf("SELECT count(*) AS top_count, LOWER(TRIM(TRAILING '/' FROM SUBSTRING_INDEX(SUBSTRING_INDEX(`urlrequested`, '/index.php', 1), '#', 1))) AS top_group, max(`timestamp`) AS visit_timestamp, LOWER(`urlrequested`) AS top_item, SUBSTRING_INDEX(`urlrequested`, '#', 1) AS top_link FROM `$wassup_table` WHERE %s AND `spam`='0' GROUP BY 2 UNION SELECT count(*) AS top_count, LOWER(TRIM(TRAILING '&' FROM SUBSTRING_INDEX(`urlrequested`, '#', 1))) AS top_group, max(`timestamp`) AS visit_timestamp, LOWER(`urlrequested`) AS top_item, SUBSTRING_INDEX(`urlrequested`, '#', 1) AS top_link FROM `$wassup_table` WHERE %s AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition1, $stat_condition2, $stat_limit);
895
  //top browser...
896
+ }elseif($stat_type == "browser" || $stat_type=="browsers"){
897
+ $sql=sprintf("SELECT count(DISTINCT `wassup_id`) AS top_count, SUBSTRING_INDEX(SUBSTRING_INDEX(`browser`, ' 0.', 1), '.', 1) AS top_item, max(`timestamp`) AS visit_timestamp FROM `$wassup_table` WHERE %s AND `browser`!='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition, $stat_limit);
898
  //top os...
899
+ }elseif($stat_type == "os"){
900
+ $sql=sprintf("SELECT count(DISTINCT `wassup_id`) as top_count, `os` AS top_item, max(`timestamp`) AS visit_timestamp FROM `$wassup_table` WHERE %s AND `os`!='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition,$stat_limit);
901
  //top language/locale..
902
+ }elseif($stat_type == "language" || $stat_type=="locale"){
903
+ $sql=sprintf("SELECT count(DISTINCT `wassup_id`) as top_count, LOWER(`language`) as top_item, max(`timestamp`) AS visit_timestamp FROM `$wassup_table` WHERE %s AND `language`!='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition, $stat_limit);
904
  //top visitors...
905
  } elseif ($stat_type == "visitor" || $stat_type=="visitors"){
906
+ $sql=sprintf("SELECT count(DISTINCT `wassup_id`) as top_count, `username` as top_item, '1loggedin_user' as visitor_type, max(`timestamp`) as visit_timestamp FROM `$wassup_table` WHERE %s AND `username`!='' AND `spam`='0' GROUP BY 2 UNION SELECT count(DISTINCT `wassup_id`) as top_count, `comment_author` as top_item, '2comment_author' as visitor_type, max(`timestamp`) as visit_timestamp FROM `$wassup_table` WHERE %s AND `username`='' AND `comment_author`!='' AND `spam`='0' GROUP BY 2 UNION SELECT count(DISTINCT `wassup_id`) as top_count, `hostname` as top_item, '3hostname' as visitor_type, max(`timestamp`) as visit_timestamp FROM `$wassup_table` WHERE %s AND `username`='' AND `comment_author`='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3, 2 LIMIT %d",$stat_condition,$stat_condition,$stat_condition,$stat_limit);
907
  //top postid (post|page)
908
+ }elseif($stat_type == "postid" || $stat_type == "article" || $stat_type=="articles" || $stat_type=="url_wpid"){
909
  $exclude_frontpage="";
910
  if(!empty($top_ten['top_nofrontpage'])){
911
  $front_pageid=0;
913
  if($show_on_front=="page") $front_pageid=get_option('page_on_front');
914
  if(!empty($front_pageid) && is_numeric($front_pageid)) $exclude_frontpage=sprintf("AND `url_wpid`!='%d'",$front_pageid);
915
  }
916
+ $sql=sprintf("SELECT count(*) AS top_count, `url_wpid` AS top_group, max(`timestamp`) as visit_timestamp, `post_title` AS top_item, SUBSTRING_INDEX(`urlrequested`, '#', 1) AS top_link FROM `$wassup_table`, {$wpdb->prefix}posts WHERE %s AND `spam`='0' AND `url_wpid`!='' AND `url_wpid`>'0' %s AND `url_wpid`={$wpdb->prefix}posts.ID GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition,$exclude_frontpage,$stat_limit);
917
+ //do stats on any column in wp_wassup table @since v1.9
918
  }elseif(!empty($stat_type)){
919
  $col=$wpdb->get_row(sprintf("SHOW COLUMNS FROM %s LIKE '%s'",$wtable_name,wassupDb::esc_like(esc_attr($stat_type))));
920
  if(!is_wp_error($col) && !empty($col)){
921
+ $sql=sprintf("SELECT count(DISTINCT `wassup_id`) AS top_count, `$stat_type` AS top_item, max(`timestamp`) as visit_timestamp FROM `$wassup_table` WHERE %s AND `$stat_type`!='' AND `spam`='0' GROUP BY 2 ORDER BY 1 DESC, 3 DESC LIMIT %d",$stat_condition,$stat_limit);
922
  }else{
923
  $error_msg=" column does not exist in table ".$stat_type;
924
  }
951
 
952
  /**
953
  * Display the top 10 stats in table columns
 
954
  * @param string(4)
955
  * @return none
956
  */
957
  function wassup_top10view ($from_date="",$to_date="",$res="",$top_limit=0,$title=false) {
958
  global $wpdb,$wp_version,$wassup_options,$wdebug_mode;
959
  if(!class_exists('wassupOptions')){
960
+ if(!wassup_init()) return; //nothing to do
961
  $wassup_options=new wassupOptions;
962
  }elseif(empty($wassup_options)){
963
  $wassup_options=new wassupOptions;
965
  $wassup_options->loadSettings();
966
  }
967
  $wassup_table=$wassup_options->wassup_table;
968
+ if(!is_array($wassup_options->wassup_top10)){
969
+ $top_ten=maybe_unserialize(html_entity_decode($wassup_options->wassup_top10));
970
+ }else{
971
+ $top_ten=$wassup_options->wassup_top10;
972
+ }
973
+ if(empty($top_ten) || !is_array($top_ten)){
974
+ $top_ten=$wassup_options->defaultSettings("top10");
975
+ }
976
  $wassup_table=$wassup_options->wassup_table;
977
+ $blogurl=wassupURI::get_sitehome();
978
+ $url=parse_url($blogurl);
979
+ $sitedomain=preg_replace('/^www\./i','',$url['host']);
980
 
981
  //extend php script timeout length for large tables
982
+ $stimeout=ini_get("max_execution_time");
983
+ if(is_numeric($stimeout) && $stimeout >0 && $stimeout <180){
984
+ $disabled_funcs=ini_get('disable_functions');
985
+ if((empty($disabled_funcs) || strpos($disabled_funcs,'set_time_limit')===false) && !ini_get('safe_mode')){
986
+ @set_time_limit(3*60); //3 minutes timeout
987
  }
988
  }
989
  $col_count=array_sum($top_ten);
990
  //extend page width to make room for more than 5 columns
991
+ if(empty($res)) $res=$wassup_options->wassup_screen_res;
992
+ if($res < 640 && $col_count >3) $res=640;
993
  $char_len=(int)($res/$col_count);
994
  $min_width=(($char_len < 90)?90:$char_len);
995
  //Since v1.8.3: top_limit in top10 array
1001
  $multisite_condition="";
1002
  //for multisite/network activation
1003
  if($wassup_options->network_activated_plugin()){
1004
+ if(!is_network_admin() && !empty($GLOBALS['current_blog']->blog_id)){
1005
+ $multisite_condition = sprintf(" AND `subsite_id`=%d",(int)$GLOBALS['current_blog']->blog_id);
1006
+ }
1007
  }
1008
+ if(empty($from_date)) $from_date=$wpdb->get_var(sprintf("SELECT MIN(`timestamp`) FROM %s WHERE `timestamp`>0 %s",$wassup_table,$multisite_condition));
1009
+ if(empty($to_date)) $to_date=current_time("timestamp");
1010
  $top_condition = "`timestamp` BETWEEN '".$from_date."' AND '".$to_date."'";
1011
+ if(!empty($top_ten['top_nospider'])) $top_condition .= " AND spider=''";
1012
  $top_condition .= $multisite_condition;
1013
  //top stats header
1014
  $table_class="";
1015
  if(!empty($_GET['popup'])){
1016
  $table_class=' class="popup"';
1017
  $wdformat=get_option("date_format");
1018
+ if(($to_date-$from_date)>24*60*60){
1019
+ $stats_range=gmdate("$wdformat",$from_date)." - ".gmdate("$wdformat",$to_date);
1020
+ }else{
1021
+ $stats_range=gmdate("$wdformat H:00",$from_date)." - ".gmdate("$wdformat H:00",$to_date);
1022
+ }
1023
  $statsheader='<span class="stats-print-btn"><a href="#" class="button" onclick="printstat();return false;">'.__("Print","wassup").'</a></span>'."\n";
1024
+ $statsheader .='<h4>'.get_option("blogname").'</h4>'."\n";
1025
+ $statsheader .='<span>'.sprintf(__('Top Stats for Period: %s','wassup'),$stats_range).'</span>';
1026
  }
1027
  echo "\n"; ?>
1028
  <div id="wassup-topstats">
1050
  if ($top_ten['topsearch'] == 1) {
1051
  $top_results = wGetStats("searches",$top_limit,$top_condition);
1052
  ?>
1053
+ <td<?php
1054
+ if($cols==0) echo ' class="firstcol"';
1055
+ if(!empty($top_results) && count($top_results) >0){
1056
+ $cwidth=2*$min_width;
1057
+ echo ' style="min-width:'.$cwidth.'px"';
1058
+ }?>>
1059
  <ul class="charts">
1060
+ <li class="chartsT"><?php _e("TOP QUERY", "wassup");?></li> <?php
1061
  $i=0;
1062
  $ndigits=1;
1063
  if (!empty($top_results) && count($top_results) >0) {
1065
  foreach ($top_results as $top10) {
1066
  echo "\n"; ?>
1067
  <li class="wassup-nowrap"><nobr><?php
1068
+ if ($top10->top_item=="_notprovided_") $top_string='('.__("not provided","wassup").')';
1069
  else $top_string=stringShortener(preg_replace('/'.preg_quote($blogurl,'/').'/i','',$top10->top_item),$char_len);
1070
+ echo wPadNum($top10->top_count,$ndigits).' <a href="'.wassupURI::cleanURL($top10->top_link).'" target="_BLANK" title="'.substr($top10->top_item,0,$wassup_options->wassup_screen_res-100).'">'.$top_string.'</a>';?></nobr></li><?php
1071
  $i++;
1072
  }
1073
  }
1086
  echo "\n<!--heartbeat-->";
1087
  $top_results = wGetStats("referrers",$top_limit,$top_condition);
1088
  ?>
1089
+ <td<?php
1090
+ if($cols==0) echo ' class="firstcol"';
1091
+ if(!empty($top_results) && count($top_results) >0){
1092
+ $cwidth=(int)(2.5*$min_width);
1093
+ echo ' style="min-width:'.$cwidth.'px"';
1094
+ }?>>
1095
  <ul class="charts">
1096
  <li class="chartsT"><?php _e("TOP REFERRER", "wassup"); ?></li><?php
1097
  $i=0;
1101
  foreach ($top_results as $top10) {
1102
  echo "\n"; ?>
1103
  <li class="wassup-nowrap"><?php echo wPadNum($top10->top_count,$ndigits);
1104
+ //no link for possible spam/malware
1105
+ if(preg_match('/\/wp\-(?:admin|content|includes)\/|\/wp\-login\.php|["\'\<\>\{\}\(\)\*\\\\`]|&[lgr]t;|&#0?3[49];|&#0?4[01];|&#0?6[02];|&#0?9[26];|&#8217;|&#8221;|&quot;/i',$top10->top_item)>0 || wassupURI::is_xss($top10->top_item)){
1106
+ echo ' <span class="top10" title="'.wassupURI::cleanURL(substr($top10->top_item,0,$wassup_options->wassup_screen_res-100)).'">';
1107
+ echo preg_replace('#^https?\://(?:www\d?\.)?#i','',wassupURI::cleanURL($top10->top_item)).'</span>';
1108
+ }else{
1109
+ echo ' <a href="'.wassupURI::cleanURL($top10->top_link).'" title="'.wassupURI::cleanURL($top10->top_link).'" target="_BLANK">';
1110
+ echo preg_replace('#^https?\://(?:www\d?\.)?#i','',wassupURI::cleanURL($top10->top_item)).'</a>';
1111
+ }?></li><?php
1112
  $i++;
1113
  }
1114
  }
1125
  echo "\n<!--heartbeat-->\n";
1126
  $top_results=wGetStats("urlrequested",$top_limit,$top_condition);
1127
  ?>
1128
+ <td<?php
1129
+ if($cols==0) echo ' class="firstcol"';
1130
+ if(!empty($top_results) && count($top_results) >0){
1131
+ $cwidth=(int)(2.5*$min_width);
1132
+ echo ' style="min-width:'.$cwidth.'px"';
1133
+ }?>>
1134
  <ul class="charts">
1135
  <li class="chartsT"><?php _e("TOP REQUEST", "wassup"); ?></li><?php
1136
  $i=0;
1140
  foreach ($top_results as $top10) {
1141
  echo "\n"; ?>
1142
  <li class="wassup-nowrap"><nobr><?php echo wPadNum($top10->top_count,$ndigits);
1143
+ //no link for 404 and possible spam/malware
1144
+ if(strpos($top10->top_item,'[')===0 || preg_match('/\/wp\-(?:admin|content|includes)\/|\/wp\-login\.php|["\'\<\>\{\}\(\)\*\\\\`]|&[lgr]t;|&#0?3[49];|&#0?4[01];|&#0?6[02];|&#0?9[26];|&#8217;|&#8221;|&quot;/i',$top10->top_item)>0 || wassupURI::is_xss($top10->top_item)){
1145
+ echo ' <span class="top10" title="'.wassupURI::cleanURL(substr($top10->top_item,0,$wassup_options->wassup_screen_res-100)).'">'.preg_replace('/'.preg_quote($blogurl,'/').'/i','',wassupURI::cleanURL($top10->top_item)).'</span>';
1146
+ }else{
1147
+ //echo wassupURI::url_link($top10->top_link,false);
1148
+ echo ' <a href="'.wassupURI::add_siteurl($top10->top_link).'" target="_BLANK" title="'.wassupURI::cleanURL(substr($top10->top_item,0,$wassup_options->wassup_screen_res-100)).'">'.preg_replace('/'.preg_quote($blogurl,'/').'/i', '', wassupURI::cleanURL($top10->top_item)).'</a>';
1149
  } ?></nobr></li><?php
1150
  $i++;
1151
  }
1163
  echo "\n<!--heartbeat-->\n";
1164
  $top_results=wGetStats("browser",$top_limit,$top_condition);
1165
  ?>
1166
+ <td<?php
1167
+ if($cols==0) echo ' class="firstcol"';
1168
+ elseif($cols==$col_count-1) echo 'class="lastcol"';
1169
+ if(!empty($top_results) && count($top_results) >0){
1170
+ $cwidth=$min_width+5;
1171
+ echo ' style="min-width:'.$cwidth.'px"';
1172
+ }?>>
1173
  <ul class="charts">
1174
  <li class="chartsT"><?php _e("TOP BROWSER", "wassup") ?></li><?php
1175
  $i=0;
1179
  foreach ($top_results as $top10) {
1180
  echo "\n"; ?>
1181
  <li class="wassup-nowrap"><nobr><?php echo wPadNum($top10->top_count,$ndigits);
1182
+ echo ' <span class="top10" title="'.esc_attr($top10->top_item).'">'.stringShortener($top10->top_item, $char_len).'</span>'; ?></nobr></li><?php
1183
  $i++;
1184
  }
1185
  }
1196
  echo "\n<!--heartbeat-->\n";
1197
  $top_results=wGetStats("os",$top_limit,$top_condition);
1198
  ?>
1199
+ <td<?php
1200
+ if($cols==0) echo ' class="firstcol"';
1201
+ elseif($cols==$col_count-1) echo 'class="lastcol"';
1202
+ if(!empty($top_results) && count($top_results) >0){
1203
+ $cwidth=$min_width+5;
1204
+ echo ' style="min-width:'.$cwidth.'px"';
1205
+ }?>>
1206
  <ul class="charts">
1207
  <li class="chartsT"><?php _e("TOP OS", "wassup") ?></li><?php
1208
  $i=0;
1211
  $ndigits = strlen("{$top_results[0]->top_count}");
1212
  foreach ($top_results as $top10) {
1213
  echo "\n"; ?>
1214
+ <li class="wassup-nowrap"><nobr><?php echo wPadNum($top10->top_count,$ndigits); ?> <span class="top10" title="<?php echo esc_attr($top10->top_item);?>"><?php echo stringShortener($top10->top_item, $char_len); ?></span></nobr></li><?php
1215
  $i++;
1216
  }
1217
  }
1228
  echo "\n<!--heartbeat-->\n";
1229
  $top_results=wGetStats("language",$top_limit,$top_condition);
1230
  ?>
1231
+ <td<?php
1232
+ if($cols==0) echo ' class="firstcol"';
1233
+ elseif($cols==$col_count-1) echo 'class="lastcol"';
1234
+ if(!empty($top_results) && count($top_results) >0){
1235
+ $cwidth=$min_width+5;
1236
+ echo ' style="min-width:'.$cwidth.'px"';
1237
+ }?>>
1238
  <ul class="charts">
1239
  <li class="chartsT"><?php _e("TOP LOCALE", "wassup"); ?></li><?php
1240
  $i=0;
1244
  foreach($top_results as $top10){
1245
  echo "\n";?>
1246
  <li class="wassup-nowrap"><nobr><?php echo wPadNum($top10->top_count,$ndigits);
1247
+ echo ' <img src="'.WASSUPURL.'/img/flags/'.strtolower(esc_attr($top10->top_item)).'.png" alt="" />';?>
1248
+ <span class="top10" title="<?php echo $top10->top_item;?>"><?php echo esc_attr($top10->top_item);?></span></nobr></li><?php
1249
  $i++;
1250
  }
1251
  }
1262
  echo "\n<!--heartbeat-->\n";
1263
  $top_results=wGetStats("visitor",$top_limit,$top_condition);
1264
  ?>
1265
+ <td<?php
1266
+ if($cols==0) echo ' class="firstcol"';
1267
+ elseif($cols==$col_count-1) echo 'class="lastcol"';
1268
+ if(!empty($top_results) && count($top_results) >0){
1269
+ $cwidth= (int)(1.5*$min_width);
1270
+ echo ' style="min-width:'.$cwidth.'px"';
1271
+ }?>>
1272
  <ul class="charts">
1273
  <li class="chartsT"><?php _e("TOP VISITOR", "wassup"); ?></li><?php
1274
  $i=0;
1283
  else
1284
  $uclass="";
1285
  echo "\n"; ?>
1286
+ <li class="wassup-nowrap"><nobr><?php echo wPadNum($top10->top_count,$ndigits).' <span class="top10'.$uclass.'" title="'.esc_attr($top10->top_item).'">'.stringShortener($top10->top_item, $char_len).'</span>'; ?></nobr></li><?php
1287
  $i++;
1288
  } //end loop
1289
  }
1300
  echo "\n<!--heartbeat-->\n";
1301
  $top_results=wGetStats("postid",$top_limit,$top_condition);
1302
  ?>
1303
+ <td<?php
1304
+ if($cols==0) echo ' class="firstcol"';
1305
+ elseif($cols==$col_count-1) echo 'class="lastcol"';
1306
+ if(!empty($top_results) && count($top_results) >0){
1307
+ $cwidth=2*$min_width;
1308
+ echo ' style="min-width:'.$cwidth.'px"';
1309
+ }?>>
1310
  <ul class="charts">
1311
  <li class="chartsT"><?php _e("TOP ARTICLE", "wassup"); ?></li><?php
1312
  $i=0;
1388
  return ($padhtml);
1389
  }
1390
 
1391
+ /** round the integer to the next near 10 */
1392
  function roundup($value) {
1393
  //$dg = digit_count($value);
1394
  $numstr = (int)$value;
1401
  return (ceil(intval($value)/pow(10, $dg))*pow(10, $dg)+pow(10, $dg));
1402
  }
1403
 
1404
+ /**
1405
+ * Google line chart setup script
1406
+ * - Port of JavaScript from http://code.google.com/apis/chart/ - http://james.cridland.net/code
1407
+ */
1408
  function Gchart_data($Wvisits, $pages=null, $atime=null, $type, $charttype=null, $axes=null, $chart_loc=null) {
1409
  global $wdebug_mode;
1410
  $chartAPIdata = false;
 
 
1411
  // First, find the maximum value from the values given
1412
  if ($axes == 1) {
1413
  $maxValue = roundup(max(array_merge($Wvisits, $pages)));
1477
  return $chartAPIdata;
1478
  } //end Gchart_data
1479
 
1480
+ /**
1481
+ * Class for main visitors details queries.
1482
+ * - Calculates views/visitors, extracts data for display, and outputs chart
1483
+ */
1484
  class WassupItems {
1485
  var $tableName;
1486
  var $from_date;
1534
  }else{
1535
  $this->Limit=esc_attr($limit);
1536
  }
1537
+ //this->_whereis replaces to_date/from_date in where condition so multisite blog_id can be added to where condition @since v1.9
1538
  if (!empty($whereis)){
1539
  if (preg_match('/^\s*(AND|OR)/i',$whereis)>0){
1540
  if(!empty($from_date)){
1590
  $this->ItemsType=$Type;
1591
  $this->searchString=$Search;
1592
  $ss="";
1593
+ if(!empty($Search)|| !empty($specific_where_clause)){
1594
+ $ss=$this->buildSearch($Search,$specific_where_clause);
1595
+ }
1596
+ if(!empty($ss) && stristr($this->_whereis, ' OR ')!==false){
1597
+ $whereis= '('.$this->_whereis.')'.$ss;
1598
+ }else{
1599
+ $whereis= $this->_whereis . $ss;
1600
+ }
1601
  $buffered="";
1602
  //abort if there is nothing in totrecords var
1603
  if(empty($this->totrecords) || !is_numeric($this->totrecords)){
1604
  return;
1605
  }
1606
  //use "sql_buffer_result" to help speed up retrieval of large datasets
1607
+ if($this->totrecords >5000) $buffered="SQL_BUFFER_RESULT";
1608
  // Switch by every (global) items type (visits, pageviews, spams, etc...)
1609
  switch ($Type) {
1610
  // This is the MAIN query to show the chronology
1611
  case "main":
1612
+ //extend PHP and MySql timeouts to prevent script hangs
1613
+ $stimeout=ini_get("max_execution_time");
1614
+ if(is_numeric($stimeout) && $stimeout >0 && $stimeout <180){
1615
+ $disabled_funcs=ini_get('disable_functions');
1616
+ if((empty($disabled_funcs) || strpos($disabled_funcs,'set_time_limit')===false) && !ini_get('safe_mode')){
1617
+ @set_time_limit(3*60);
1618
+ }
1619
  }
1620
  $mtimeout=$wpdb->get_var("SELECT @@session.wait_timeout AS mtimeout FROM dual");
1621
  if(is_numeric($mtimeout) && $mtimeout<160) $result=$wpdb->query("SET wait_timeout=160");
1622
  //main query
1623
  // "sql_buffer_result" select option helps in cases where it takes a long time to retrieve results.
1624
+ $qry = sprintf("SELECT $buffered `id`, `wassup_id`, max(`timestamp`) as max_timestamp, min(`timestamp`) as min_timestamp, count(`wassup_id`) as page_hits, `ip`, `hostname`, `urlrequested`, `referrer`, GROUP_CONCAT(DISTINCT `username` ORDER BY `username` SEPARATOR ', ') AS login_name, `comment_author`, `agent`, `browser`, `os`, `spider`, `feed`, max(`spam`) AS malware_type, max(`screen_res`) as resolution, `language`, `search`, `searchengine`, `searchpage`, `url_wpid` FROM `%s` WHERE %s GROUP BY `wassup_id` ORDER BY max_timestamp DESC %s",
1625
  $this->tableName,
1626
  $whereis,
1627
  $this->Limit);
1628
  $results = $wpdb->get_results($qry);
1629
  //try without buffer
1630
  if ((is_wp_error($results) || empty($results) || !is_array($results)) && !empty($this->totrecords) && !empty($buffered)) {
1631
+ $qry = sprintf("SELECT `id`, `wassup_id`, max(`timestamp`) as max_timestamp, min(`timestamp`) as min_timestamp, count(`wassup_id`) as page_hits, `ip`, `hostname`, `urlrequested`, `referrer`, GROUP_CONCAT(DISTINCT `username` ORDER BY `username` SEPARATOR ', ') AS login_name, `comment_author`, `agent`, `browser`, `os`, `spider`, `feed`, max(`spam`) AS malware_type, max(`screen_res`) as resolution, `language`, `search`, `searchengine`, `searchpage`, `url_wpid` FROM `%s` WHERE %s GROUP BY `wassup_id` ORDER BY max_timestamp DESC %s",
1632
  $this->tableName,
1633
  $whereis,
1634
  $this->Limit);
1638
  case "count":
1639
  // These are the queries to count the items hits/pages/spam
1640
  $distinct="";
1641
+ if($distinct_type=="DISTINCT") $distinct="DISTINCT ";
1642
  $qry=sprintf("SELECT COUNT(%s`wassup_id`) AS itemstot FROM %s WHERE %s", $distinct, $this->tableName, $whereis);
1643
  $results = $wpdb->get_var($qry);
1644
  break;
1653
  case "count-ip": //TODO
1654
  // These are the queries to count the hits/pages/spam by ip
1655
  $distinct="";
1656
+ if($distinct_type=="DISTINCT") $distinct="DISTINCT ";
1657
  $qry = sprintf("SELECT COUNT(%s`ip`) AS itemstot FROM %s WHERE %s", $distinct, $this->tableName, $whereis);
1658
  $results = $wpdb->get_var($qry);
1659
  break;
1720
  $chart_url="";
1721
  //First check for cached chart
1722
  $chart_key="$chart_loc{$Res}{$axes_type}{$chart_group}{$Ctype}_".intval(date('i')/15).date('HdmY');
1723
+ if(!empty($Search)) $chart_key .="_s".esc_attr($Search);
1724
  $chart_url=wassupDb::get_wassupmeta($chart_key,'_chart');
1725
  if (!empty($chart_url)) {
1726
  if ($wdebug_mode)
1738
  //`timestamp` is localized before insert into table, so datetime translation from MySQL with 'FROM_UNIXTIME' must be converted to UTC/GMT afterwards to get an accurate datetime value for Wordpress.
1739
  $UTCoffset = wassupDb::get_db_setting("tzoffset");
1740
  if (empty($UTCoffset)) $UTCoffset = "+0:00"; //GMT
1741
+ else $UTCoffset=wassupDb::format_tzoffset($UTCoffset);
1742
  //set x-axis date format to Wordpress date format
1743
  $USAdate = $wassup_options->is_USAdate();
1744
  $hour_fromdate = $this->from_date;
1923
  }
1924
  }
1925
  if ($x_divisor > 1) {
1926
+ $qry = sprintf("SELECT COUNT( DISTINCT `wassup_id` ) AS items, COUNT(`wassup_id`) AS pages, CAST(`timestamp`/$x_divisor AS UNSIGNED)*$x_divisor AS xgroup, DATE_FORMAT(DATE_ADD('1970-01-01 00:00:00', INTERVAL CAST(`timestamp` AS UNSIGNED) SECOND), '%s') as thedate FROM %s WHERE %s GROUP BY 3 ORDER BY `timestamp`",
 
1927
  $x_axes_label,
1928
  $this->tableName,
1929
  $whereis);
1930
  } else {
1931
+ $qry = sprintf("SELECT COUNT( DISTINCT `wassup_id` ) AS items, COUNT(`wassup_id`) AS pages, DATE_FORMAT(DATE_ADD('1970-01-01 00:00:00', INTERVAL CAST(`timestamp` AS UNSIGNED) SECOND), '%s') AS xgroup, DATE_FORMAT(DATE_ADD('1970-01-01 00:00:00', INTERVAL CAST(`timestamp` AS UNSIGNED) SECOND), '%s') as thedate FROM %s WHERE %s GROUP BY 3 ORDER BY `timestamp`",
 
 
1932
  $x_groupformat,
 
1933
  $x_axes_label,
1934
  $this->tableName,
1935
  $whereis);
1997
  } elseif ($lablcount == 31) {
1998
  $x_grid=6.45;
1999
  }
2000
+ //TODO: Google image chart api deprecated as of 4/20/2012 - replace with Google interactive charts api
2001
  // generate url for google chart image
2002
  $chart_url ="https://chart.googleapis.com/chart?cht=lc&chf=".$chart_bg."&chtt=".urlencode($cTitle)."&chls=4,1,0|2,6,2&chco=1111dd,FF6D06&chm=B,1111dd30,0,0,0&chg={$x_grid},25,1,5&chs={$Res}x{$chart_height}&chd=".Gchart_data($y_hits, $y_pages, $x_label, $x_groupformat, "main", $axes_type, $chart_loc);
2003
  //cache chart url in wassup_meta table for up to 5 minutes
2004
  $chart_key="$chart_loc{$Res}{$axes_type}{$chart_group}{$Ctype}_".intval(date('i')/15).date('HdmY');
2005
+ if(!empty($Search)) $chart_key .="_s".esc_attr($Search);
2006
  $expire=(int)(time()+$cache_time);
2007
  $cache_id=wassupDb::save_wassupmeta($chart_key,'_chart',"$chart_url",$expire);
2008
  } //end if chart_points>0
2030
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
2031
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
2032
  curl_setopt($ch, CURLOPT_LOW_SPEED_TIME, 10);
2033
+ curl_setopt($ch, CURLOPT_TIMEOUT, 7); //don't wait for slow responses
2034
  if (ini_get('open_basedir')=="") { //causes error
2035
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
2036
  }
2068
  */
2069
  function wFetchAPIData($api_url) {
2070
  global $wdebug_mode;
 
2071
  $wassup_agent=apply_filters('http_headers_useragent',"WassUp/".WASSUPVERSION." - www.wpwp.org");
2072
  $apidata=array();
2073
+ //v1.9.1 bugfix: timeout now set in http/curl settings, not via 'set_time_limit' which does not apply to remote requests
 
 
 
 
 
 
2074
  //try Wordpress 'wp_remote_get' for api results
2075
  if(function_exists('wp_remote_get')){
2076
+ $opts=array('user-agent'=>"$wassup_agent",'timeout'=>5);
2077
  $api_remote=@wp_remote_get($api_url,$opts);
2078
+ if(!empty($api_remote) && is_array($api_remote)){
2079
+ if(!empty($api_remote['body'])) $apidata=$api_remote['body'];
2080
+ elseif(!empty($api_remote['response'])) $apidata="no data";
2081
  }
2082
  $api_method='wp_remote_get'; //debug
2083
  }
2090
  $api_method='wcURL'; //debug
2091
  }
2092
  // try 'file_get_contents' to get api results
2093
+ if(empty($apidata) && ini_get('allow_url_fopen')){
2094
  // context stream compatible with PHP 5.0.0+
2095
  if (version_compare(PHP_VERSION,"5.0.0",">=")) {
2096
+ $opts=array('http'=>array(
2097
+ 'method'=>"GET",
2098
+ 'user_agent'=>"$wassup_agent",
2099
+ 'max_redirects'=>"0",
2100
+ 'timeout'=>"5.0",
2101
+ ));
2102
  $context = stream_context_create($opts);
2103
  // Open file using HTTP headers set above
2104
  $apidata = @file_get_contents($api_url, false, $context);
2112
  print_r($apidata);
2113
  echo "-->\n";
2114
  }
2115
+ //if(!empty($stimeout)) @set_time_limit($stimeout); //no need to reset this
2116
  return $apidata;
2117
  } //end wFetchAPIData
2118
  ?>
lib/settings.php CHANGED
@@ -1,21 +1,41 @@
1
  <?php
2
  /**
3
- * Displays Options form for editing WassUp's settings and FAQ
4
  *
5
  * @package WassUp Real-time Analytics
6
  * @subpackage settings.php
7
- * @author Helene Duncker (http://helenesit.com)
8
- *
9
  */
10
- //no direct request for this plugin module
11
- if(!defined('ABSPATH')|| empty($GLOBALS['wp_version'])|| !empty($_SERVER['SCRIPT_FILENAME'])&& realpath(preg_replace('/\\\\/','/',__FILE__))===realpath($_SERVER['SCRIPT_FILENAME'])){
12
- if(!headers_sent()){header('Location: /?p=404page&err=wassup403');exit;
13
- }elseif(function_exists('wp_die')){wp_die("Bad Request: ".esc_attr(wp_kses(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI']),array())));exit;
14
- }else{die("Bad Request: ".htmlspecialchars(preg_replace('/(&#37;|&amp;#37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));exit;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
 
 
16
  /**
17
- * wassup_optionsView
18
- * - form to view and change Wassup's wp_option settings
 
 
 
 
19
  * @param integer
20
  * @return void
21
  */
@@ -24,10 +44,35 @@ function wassup_optionsView($tab=0) {
24
 
25
  $GMapsAPI_signup="https://developers.google.com/maps/documentation/javascript/get-api-key#key"; //v3 key signup
26
  $adminemail = get_bloginfo('admin_email');
27
- $alert_msg = "";
28
- $alertstyle = 'color:red; background-color:#ffd;';
29
  $wassup_table=$wassup_options->wassup_table;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  $wassup_meta_table = $wassup_table . "_meta";
 
31
  $table_engine = "";
32
  $table_collation = "";
33
  //$wp_min_memory=40; //since WordPress 3.5+
@@ -35,8 +80,7 @@ function wassup_optionsView($tab=0) {
35
  if(!is_object($current_user) || empty($current_user->ID)){
36
  $user=wp_get_current_user();
37
  }
38
- $goodstyle = 'color:green;';
39
- $disabledstyle = 'color:#999;';
40
  $disabled='disabled="DISABLED"';
41
  $checked='checked="CHECKED"';
42
 
@@ -51,7 +95,7 @@ function wassup_optionsView($tab=0) {
51
  if (wassupDb::table_exists($wassup_table)) {
52
  $fstatus = wassupDb::table_status($wassup_table);
53
  if (!empty($fstatus) && is_object($fstatus)) {
54
- //New in v1.9: db size includes index size
55
  $data_lenght=$fstatus->Data_length+$fstatus->Index_length;
56
  $data_rows = (int) $fstatus->Rows;
57
  if (isset($fstatus->Engine)) {
@@ -62,7 +106,7 @@ function wassup_optionsView($tab=0) {
62
  $table_collation = (isset($fstatus->Collation)? $fstatus->Collation: '');
63
  }
64
  } else { ?>
65
- <span style="<?php echo $alertstyle; ?>"><br /><strong><?php echo __('IMPORTANT').': WassUp '.__("table empty or does not exist!","wassup"); ?></strong></span>
66
  <?php }
67
  $wwidgets= __('Visitors Online or Top Stats','wassup');
68
  $wwidgets_link='<a href="'.admin_url("widgets.php").'">'.__('Widgets menu','wassup').'</a>';
@@ -94,14 +138,13 @@ function wassup_optionsView($tab=0) {
94
  }
95
  echo "-->\n";
96
  }
97
- //New in v1.9: show uninstall tab for multisite/subdomain sites and for Wordpress 2.x
98
  $has_uninstall_tab=false;
99
- $wassup_network_settings=array();
100
- if(version_compare($wp_version,"3.0","<") || (is_multisite() && is_subdomain_install() && !is_main_site())) $has_uninstall_tab=true;
101
  echo "\n"; ?>
102
  <form name="wassupsettings" id="wassupsettings" action="" method="post">
103
  <?php
104
- //New in v1.9: wp_nonce field added to settings for referer validation and security
105
  wp_nonce_field('wassupsettings-'.$current_user->ID);
106
  echo "\n";?>
107
  <div class="ui-tabs" id="tabcontainer">
@@ -113,17 +156,15 @@ function wassup_optionsView($tab=0) {
113
  echo "\n";?>
114
  <li id="opt-tab4" class="optionstab <?php if($tab=="4")echo ' ui-tabs-active';?>"><a href="#wassup_opt_frag-4"><span><?php _e("Uninstall","wassup");?></span></a></li><?php
115
  }
116
- //New in v1.9: new "donate" and "faq" tabs
117
  echo "\n";?>
118
  <li id="opt-tab-faq" class="optionstab faqtab<?php if($tab=="faq" || $tab=="5")echo ' ui-tabs-active';?>"><a href="#wassup_opt_frag-5"><span>F.A.Q.&nbsp;</span></a></li>
119
  <li id="opt-tab-donate" class="optionstab donatetab<?php if($tab=="donate" || $tab=="6")echo ' ui-tabs-active';?>"><a href="#wassup_opt_frag-6"><span><?php _e("Donate","wassup");?></span></a></li>
120
  </ul>
121
 
122
  <div id="wassup_opt_frag-1" class="optionspanel<?php if ($tab == "1") echo ' tabselected'; ?>"><br/><?php
123
- //New in v1.9: multisite options
124
- $wassup_network_settings=array();
125
  if(is_multisite() && (is_network_admin() || (is_main_site() && is_super_admin()))){
126
- $wassup_network_settings=get_site_option('wassup_network_settings');
127
  echo "\n";?>
128
  <h2><?php _e('Networkwide Settings','wassup');?></h2>
129
  <p class="noindent-opt"><?php echo __("Multisite settings that applies to all subsites in the network.","wassup");?></p>
@@ -134,33 +175,39 @@ function wassup_optionsView($tab=0) {
134
  <span class="opt-note"><?php echo " ".__("Can be overridden on individual subsites to disable statistics recording.","wassup");?></span><?php
135
  if(!empty($wassup_network_settings['wassup_table'])){?><br/>
136
  <h3><?php _e("Network Subsites Options","wassup");?></h3>
137
- <p><input type="checkbox" name="wassup_menu" value="1" <?php if(!empty($wassup_network_settings['wassup_menu'])) echo $checked;?> /> <strong><?php _e("Show Wassup's main admin menu to subsite administrators.","wassup");?></strong><br/>
138
- <span class="opt-note"><?php echo " ".__("Uncheck to disable Wassup main menu and Wassup-options submenu for all users except Network administrator (super-admin). Dashboard submenu \"Wassup-stats\" and dashboard widget display are unaffected.","wassup");?></span></p><?php
139
  }?><br/>
140
  <hr/>
141
  <h2><?php _e('Site Settings','wassup');?></h2>
142
- <p class="noindent-opt"><?php echo __("Main site settings/default settings for network subsites.","wassup");?></p><?php
143
  } //end if multisite
144
  ?>
145
  <h3><?php _e('Statistics Recording','wassup');?></h3>
146
- <p class="description"><?php echo __("By default, Wassup collects, analyzes, and stores new visitor hits and checks each record for spam and malware activity.","wassup");?></p>
147
  <p><input type="checkbox" name="wassup_active" value="1" <?php if($wassup_options->wassup_active == 1) echo $checked;?> /> <strong><?php _e('Enable statistics recording','wassup');?></strong><br/>
148
  <span class="opt-note"><?php
149
  if (!is_multisite()) echo " ".__("Do NOT disable unless upgrading or troubleshooting plugin problems.","wassup");
150
  else echo " ".__("Do NOT disable unless troubleshooting plugin problems.","wassup");
151
  ?></span>
152
  </p>
153
- <p class="checkbox-indent"><input type="checkbox" name="wassup_spamcheck" value="1" <?php if($wassup_options->wassup_spamcheck == 1) echo $checked;?> /> <strong><?php _e('Enable spam and malware detection on records','wassup');?></strong><br/>
154
- <span class="opt-note"><?php echo " ".__("For identification only. Does NOT stop attacks nor protect your site.","wassup");?></span>
155
  </p><br/>
 
 
156
  <h3><?php _e('User Permissions'); ?></h3>
157
- <p class="description"><?php echo __("Grants readonly access to Wassup-stats dashboard submenu and to the dashboard widget for users with the selected role or higher. Only administrators have access to Wassup main menu and Wassup Options panel to edit settings and delete data.","wassup");?></p>
 
158
  <p><strong><?php _e('Set minimum user level that can view WassUp stats','wassup'); ?></strong>:
159
  <select name="wassup_userlevel">
160
  <?php $wassup_options->showFieldOptions("wassup_userlevel"); ?>
161
  </select>
162
  <?php echo "<nobr>(".__('default administrator','wassup').")</nobr>";?>
163
- </p><br/>
 
 
 
164
  <h3><?php _e('Screen resolution','wassup');?></h3>
165
  <p class="description"><?php echo __("Adjusts chart size and resets the max-width/truncation point of long texts.","wassup");?></span>
166
  <p class="indent-opt"><strong><?php _e('Your default screen resolution (in pixels)','wassup');?></strong>:
@@ -171,30 +218,29 @@ function wassup_optionsView($tab=0) {
171
  <h3><?php _e('Dashboard Widget','wassup'); ?></h3>
172
  <p><input type="checkbox" name="wassup_dashboard_chart" value="1" <?php if($wassup_options->wassup_dashboard_chart==1) echo $checked; ?> /> <strong><?php _e('Enable widget/small chart in admin dashboard','wassup'); ?></strong>
173
  </p><br/>
174
- <h3><?php _e('Spy Visitors Settings','wassup'); ?></h3><?php
 
 
 
 
 
 
 
175
  $disabled="";
176
- $checked="";
177
- $not_required=" ".__("not required","wassup");
178
- if ($wassup_options->wassup_geoip_map == 1) {
179
- //New in v1.9: Api key not required for Google!Maps v3
180
- $checked= 'checked="CHECKED"';
181
- if (!empty($wassup_options->wassup_googlemaps_key))$api_key=esc_attr(strip_tags(html_entity_decode($wassup_options->wassup_googlemaps_key)));
182
- else $api_key = $not_required;
183
- } else {
184
- $checked = 'onclick=\'jQuery("#wassup_googlemaps_key").removeAttr("disabled");\'';
185
- $api_key = $not_required;
186
- $disabled =' disabled="DISABLED" style="color:#99a;"';
187
- }
188
- echo "\n";?>
189
  <p class="indent-opt"> <input type="checkbox" name="wassup_geoip_map" value="1" <?php echo $checked; ?> />
190
- <strong><?php _e('Display a GEO IP Map in the spy visitors view','wassup'); ?></strong></p><?php
191
- echo "\n"; ?>
192
- <p class="checkbox-indent"><strong>Google Maps API <?php _e("key","wassup"); ?>:</strong> <input type="text" name="wassup_googlemaps_key" id="wassup_googlemaps_key" size="40" value=<?php echo '"'.esc_attr($api_key).'"'.$disabled.' onfocus="this.value=(this.value==\''.$not_required.'\') ? \'\' : this.value;" onblur="this.value=(this.value==\'\') ? \''.$not_required.'\' : this.value;"'; ?> /> - <a href="<?php echo $GMapsAPI_signup; ?>" target="_blank"><?php _e("signup for your key","wassup"); ?></a>
193
- <br/>&nbsp; <?php echo __('For usage exceeding 25000 daily map views per domain.','wassup');
194
- $checked='checked="CHECKED"';
195
- $disabled='disabled="DISABLED"'; ?>
196
  </p><br/>
197
-
 
 
 
198
  <h3><?php _e('Visitor Detail Settings','wassup'); ?></h3>
199
  <p> <strong><?php _e('Show visitor details from the last','wassup'); ?></strong>:
200
  <select name='wassup_time_period'>
@@ -229,7 +275,7 @@ function wassup_optionsView($tab=0) {
229
  $top_ten = $wassup_options->defaultSettings("top10");
230
  }
231
  $show_on_front=get_option('show_on_front');?></p>
232
- <p><strong> <?php _e("Length size limit of top lists", "wassup");?></strong>: <input type="text" name="toplimit" size="2" value="<?php
233
  if (empty($top_ten["toplimit"])) echo "10";
234
  else echo (int)$top_ten['toplimit']; ?>" /> (<?php _e("default 10","wassup"); ?>)
235
  </p>
@@ -271,7 +317,7 @@ function wassup_optionsView($tab=0) {
271
  </p>
272
  <br /><br />
273
  <p class="submit"><input type="submit" name="submit-options" id="submit-options" class="submit-opt button button-left button-primary" value="<?php _e('Save Settings','wassup');?>" onclick="jQuery('#submit-options').val('Saving...');" />&nbsp;<input type="reset" name="reset" class="reset-opt button button-secondary" value="<?php _e('Reset','wassup');?>" /> - <input type="submit" name="reset-to-default" class="default-opt button button-caution wassup-button" value="<?php _e("Reset to Default", "wassup");?>" /></p>
274
- <p class="opt-prev-next"><a href="<?php echo admin_url('admin.php?page=wassup-options&tab=2');?>"><?php echo __("Next","wassup").'&rarr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p></p><br />
275
  </div>
276
 
277
  <div id="wassup_opt_frag-2" class="optionspanel<?php if ($tab == "2") echo ' tabselected'; ?>">
@@ -281,7 +327,7 @@ function wassup_optionsView($tab=0) {
281
  <h3><?php echo __("Visitor Type Filters:","wassup"); ?></h3>
282
  <p style="padding-top:0;"><strong> &nbsp; <?php echo __("Checkbox to enable recording by type of \"visitor\"", "wassup");?></strong><br/>
283
  <span style="padding-left:25px;padding-top:0;margin-top:0;display:block;clear:left;">
284
- <input type="checkbox" name="wassup_anonymous" value="1" <?php echo $checked." ".$disabled.' style="'.$disabledstyle.'"';?> /> <?php _e("Record regular visitors","wassup");?><br/>
285
  <input type="checkbox" name="wassup_loggedin" value="1" <?php if($wassup_options->wassup_loggedin == 1) echo $checked;?> /> <?php _e("Record logged in users", "wassup");?><br />
286
  <input type="checkbox" name="wassup_admin" value="1" <?php if($wassup_options->wassup_admin == 1) echo $checked;?> /> <?php _e("Record logged in administrators", "wassup");?><br />
287
  <input type="checkbox" name="wassup_spider" value="1" <?php if($wassup_options->wassup_spider == 1) echo $checked;?> /> <?php _e("Record spiders and bots", "wassup");?><br />
@@ -290,7 +336,7 @@ function wassup_optionsView($tab=0) {
290
  <h3><?php echo __("Spam and Malware Filters:","wassup"); ?></h3>
291
  <p style="padding-top:0;"><strong> &nbsp; <?php echo __('Checkbox to enable recording of each type of "spam"','wassup'); ?></strong><br />
292
  <span style="padding-left:25px;padding-top:0;margin-top:0;display:block;clear:left;">
293
- <input type="checkbox" name="wassup_spam" value="1" <?php if($wassup_options->wassup_spam == 1) echo $checked; ?> /> <?php _e('Record Akismet comment spam attempts','wassup'); ?> (<?php _e('check if an IP has previous comments as spam','wassup'); ?>)<br />
294
  <input type="checkbox" name="wassup_refspam" value="1" <?php if($wassup_options->wassup_refspam == 1) echo $checked; ?> /> <?php _e('Record referrer spam attempts','wassup'); ?><br />
295
  <input type="checkbox" name="wassup_hack" value="1" <?php if($wassup_options->wassup_hack == 1) echo $checked; ?> /> <?php _e("Record admin break-in/hacker attempts", "wassup") ?><br />
296
  <input type="checkbox" name="wassup_attack" value="1" <?php if($wassup_options->wassup_attack == 1) echo $checked; ?> /> <?php _e("Record attack/exploit attempts (libwww-perl agent)", "wassup") ?><br />
@@ -304,7 +350,7 @@ function wassup_optionsView($tab=0) {
304
  <p style="padding-top:0;padding-bottom:0;"><strong><?php echo __('Enter source IPs to omit from recording','wassup');?></strong>:
305
  <br /><span style="padding-left:10px;display:block;clear:left;">
306
  <textarea name="wassup_exclude" rows="2" style="width:60%;"><?php echo esc_url($wassup_options->wassup_exclude);?></textarea></span>
307
- <span class="opt-note"><?php echo __("comma separated value (ex: 127.0.0.1, 10.0.0.1, etc...).","wassup")." ".__("A single wildcard (*) can be placed after the last '.' or '::' position for range exclusions (ex: 10.10.100.*, 192.168.*).","wassup");?></span>
308
  </p><br/>
309
  <h3 class="indent-opt"><?php echo __("Exclude by Hostname","wassup");?></h3>
310
  <p style="padding-top:0;padding-bottom:0;"><strong><?php echo __('Enter source hostnames to omit from recording','wassup');?></strong>:
@@ -325,12 +371,12 @@ function wassup_optionsView($tab=0) {
325
  <span class="opt-note"><?php _e("comma separated value, don't enter entire url, only the last path or some word to exclude (ex: /category/wordpress, 2007, etc...)", "wassup");?></span>
326
  </p><br />
327
  <p class="submit"><input type="submit" name="submit-options2" id="submit-options2" class="submit-opt button button-left button-primary" value="<?php _e('Save Settings','wassup');?>" onclick="jQuery('#submit-options2').val('Saving...');" />&nbsp;<input type="reset" name="reset" class="reset-opt button button-secondary" value="<?php _e('Reset','wassup');?>" /> - <input type="submit" name="reset-to-default" class="default-opt button button-caution wassup-button" value="<?php _e("Reset to Default", "wassup");?>" /></p>
328
- <p class="opt-prev-next"><a href="<?php echo admin_url('admin.php?page=wassup-options&tab=1');?>"><?php echo '&larr;'.__("Prev","wassup");?></a> &nbsp; &nbsp; <a href="<?php echo admin_url('admin.php?page=wassup-options&tab=3');?>"><?php echo __("Next","wassup").'&rarr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br />
329
  </div>
330
 
331
  <div id="wassup_opt_frag-3" class="optionspanel<?php if ($tab == "3") echo ' tabselected'; ?>">
332
  <h3><?php _e("Table Management Options","wassup");?></h3>
333
- <?php //New in v1.9: include index size in table size
334
  $tusage=($data_lenght/1024/1024);
335
  if ($wassup_options->is_USAdate())$tusagef=number_format($tusage, 1);
336
  else $tusagef=number_format($tusage,2,","," ");
@@ -341,16 +387,15 @@ function wassup_optionsView($tab=0) {
341
  echo " ".__('You can delete all Wassup records now (Empty Table), you can set an automatic delete option to delete selected old records daily, and you can manually delete selected old records once (Delete NOW).','wassup');
342
  echo " ".__("If you haven't database space problems, you can leave the table as is.","wassup"); ?></p>
343
  <p class="indent-opt"><?php echo __('Current WassUp table usage is','wassup').': <strong>';
344
- if((int)$tusage >= $alertmb)echo '<span style="'.$alertstyle.'">'.$tusagef.'</span>';
345
  else echo $tusagef;
346
  echo '</strong> Mb ('.$data_rows.' '.__('records','wassup').')';?></p>
347
  <?php print $alert_msg; ?>
348
  <p class="indent-opt"><input type="checkbox" name="wassup_remind_flag" value="1" <?php if($wassup_options->wassup_remind_flag==1) echo $checked;?>>
349
- <strong><?php _e('Alert me','wassup'); ?></strong> (<?php _e('email to','wassup'); ?>: <strong><?php print $adminemail; ?></strong>) <?php _e('when table reaches','wassup'); ?> <input type="text" name="wassup_remind_mb" size="3" value="<?php echo (int)$wassup_options->wassup_remind_mb; ?>"> Mb</p><?php
350
- //New in v1.9: more delete filters for auto delete
351
- ?>
352
  <h3 class="indent-opt"><?php _e("Delete old records","wassup");?>:</h3><?php
353
- $exporturl=wp_nonce_url(admin_url('admin.php?page=wassup-options&tab=3&export=1'),'wassupexport-'.$current_user->ID);?>
 
354
  <p class="indent-opt description"><?php
355
  echo sprintf(__("Before deleting, you can save Wassup data in SQL 'export' format onto your local computer by clicking %s below.","wassup"), '<a class="export-wassup" href="'.$exporturl.'">'.__('export table','wassup').'</a>');
356
  echo " ".__("Reload this screen after export to view export messages.", "wassup");?></p>
@@ -364,7 +409,7 @@ function wassup_optionsView($tab=0) {
364
  <nobr><?php _e("records older than", "wassup"); ?>
365
  <select name="delete_manual"><?php $wassup_options->showFieldOptions("delete_auto","never");?></select>&nbsp; <?php _e("once","wassup");?></nobr>
366
  </p><?php
367
- //New in v1.9: Delete by record ID# - for use with export
368
  $last_export_id=wassupDb::get_wassupmeta($wassup_table,'_export_recid-'.$current_user->ID);
369
  if (empty($last_export_id) || !is_numeric($last_export_id))
370
  $last_export_id=0;?>
@@ -378,26 +423,44 @@ function wassup_optionsView($tab=0) {
378
  <input type="button" name="delete_now" class="submit-opt button button-danger wassup-hot-button" value="<?php _e('Delete NOW','wassup'); ?>" onclick="submit();"/><br/><span>&nbsp;<nobr><?php _e("Action is NOT undoable!", "wassup");?></nobr></span>
379
  </p>
380
  <br/>
 
 
 
 
 
 
 
 
 
381
  <h3><?php _e("Table Optimization","wassup");?>:</h3>
382
  <input type="hidden" name="wassup_dbengine" value="<?php echo $table_engine;?>"/>
383
  <p class="indent-opt description"><?php
384
- //New in v1.9: checkbox to turn off automatic optimization plus date content is now used for optimization schedule
385
  $msg="";?><span id="info-optimize" class="opt-info"><?php
386
  echo __("By default, WassUp tables are automatically optimized weekly and after each bulk deletion. This helps keep WassUp running fast, but it can sometimes cause slowdowns especially when there is a corrupt record in the table.","wassup")." ";
387
- echo __("You can cancel automatic optimization by unchecking the box below.","wassup");?></span> <?php
388
  //check if table is optimizable...some innodb is not
389
  $is_optimizable_table=true;
390
  $tengine=strtolower($table_engine);
391
  if($tengine !="myisam" && $tengine !="archive"){
392
  $is_optimizable_table=wassupDb::is_optimizable_table($wassup_table);
393
  }
 
 
 
 
 
 
 
394
  if(empty($wassup_options->wassup_optimize) && !$is_optimizable_table) echo '<em>'.__("Your table engine does NOT support the \"optimize\" command.","wassup").'</em>'."\n";?>
395
  </p>
396
  <p><label for="wassup_optimize_on">&nbsp; <input type="checkbox" name="wassup_optimize_on" value="1" <?php
397
  if(!empty($wassup_options->wassup_optimize)){
398
  echo $checked;
 
399
  }elseif(!$is_optimizable_table){
400
  echo " $disabled";
 
 
401
  }?>/> <strong><?php _e("Enable automatic table optimization","wassup");?></strong></label><br/><?php
402
  $optimize_schedule="";
403
  if (empty($wassup_options->wassup_optimize)){
@@ -425,31 +488,21 @@ function wassup_optionsView($tab=0) {
425
  </p>
426
  <br/>
427
  <h3><?php _e('Data Storage Methods','wassup');?></h3><?php
428
- /* cache table is no longer optional (required)
429
- <h3>Cache storage option</h3>
430
- <p><input type="checkbox" name="wassup_cache" value="1" <?php
431
- if ($wassup_options->wassup_cache == 1 ) {
432
- echo $checked;
433
- }elseif ($sql_meta_table_name!=$wassup_meta_table) {
434
- echo $disabled;
435
- }?>/>
436
- <strong><?php echo __('Enable cache for storing some remote API data locally in WassUp table','wassup'); ?></strong><br/>
437
- <span class="opt-note"><?php _e('Reduces the number of requests to remote API servers and improves WassUp page load speed.','wassup'); ?></span>
438
- </p><br/>
439
- */
440
  $msg="";
441
  echo "\n";?>
442
  <h3 class="indent-opt">MySQL <?php echo __("Delayed Insert","wassup");?>:</h3>
443
  <p class="description"><span id="info-delayedinsert" class="opt-info"><?php
444
  echo __("When possible, WassUp uses the \"Delayed insert\" method of saving records in MySQL to store new visitor records. This method helps keep Wassup running fast on high-volume sites and during volume spikes on all sites. However, it can be inefficient on low-volume sites and sometimes host administrators disable it on shared servers.","wassup")." ";
445
- echo __("You can turn off \"delayed insert\" by unchecking the box below.","wassup");?></span> <?php
446
  $delayed_style="";
447
  if(strstr($tengine,"isam")===false && strstr($tengine,"archive")===false){
448
  if(empty($wassup_options->delayed_insert)){
449
  echo '<em>'.__("This method is unavailable for your storage engine type.","wassup").'</em>';
450
- $delayed_style= ' '.$disabled.' style="background-color:#ddd;'.$disabledstyle.'"';
 
 
451
  }else{
452
- $delayed_style=' style="'.$alertstyle.'"';
453
  }
454
  }else{
455
  $delayed_queue_size=wassupDb::get_db_setting("delayed_queue_size");
@@ -457,9 +510,11 @@ function wassup_optionsView($tab=0) {
457
  if(!is_numeric($delayed_queue_size) || (int)$delayed_queue_size==0 || (int)$max_delayed_threads==0){
458
  if(empty($wassup_options->delayed_insert)){
459
  echo '<em>'.__("This method is disabled on your host server.","wassup").'</em>';
460
- $delayed_style= ' '.$disabled.' style="background-color:#ddd;'.$disabledstyle.'"';
 
 
461
  }else{
462
- $delayed_style=' style="'.$alertstyle.'"';
463
  }
464
  }
465
  }?></p>
@@ -485,11 +540,11 @@ function wassup_optionsView($tab=0) {
485
  </ul>
486
  <p class="sys-settings"><strong>WordPress <?php _e('Version','wassup'); ?></strong>: <?php echo $wp_version; ?></p>
487
  <ul class="varlist"><?php
488
- //New in v1.9: Show when multisite network is enabled
489
  $is_multisite=false;
490
  if (function_exists('is_multisite')) {
491
  echo "\n"; ?>
492
- <li><strong>WordPress <?php _e('Multisite network','wassup');?></strong>:<?php
493
  if (is_multisite()) {
494
  $is_multisite=true;
495
  echo ' '.__("on","wassup");
@@ -504,21 +559,20 @@ function wassup_optionsView($tab=0) {
504
  if (!defined('WP_CACHE') || WP_CACHE===false || trim(WP_CACHE)==="") {
505
  echo __("not set","wassup");
506
  } else {
507
- echo ' <span style="'.$alertstyle.'">';
508
  if (WP_CACHE === true) echo __("on","wassup");
509
  else echo "WP_CACHE";
510
  echo '</span>';
511
  }
512
  ?></li>
513
  <li><strong>WordPress <?php _e('Memory Allocation','wassup');?></strong>: <?php
514
- //New in v1.9: display wordpress memory size
515
- $memory_limit=ini_get('memory_limit');
516
- if (defined('WP_MEMORY_LIMIT'))
517
- $wp_memory=WP_MEMORY_LIMIT;
518
- else
519
- $wp_memory=$memory_limit;
520
  $mem=0;
521
- if (preg_match('/^(\d+)(\s?\w)?/',$wp_memory,$match)>0) {
522
  $mem = (int)$match[1];
523
  if (!empty($match[2]) && strtolower($match[2])=='g')
524
  $mem = (int)$match[1]*1024;
@@ -526,16 +580,18 @@ function wassup_optionsView($tab=0) {
526
  echo $mem . 'M';
527
  }elseif($mem < 40){
528
  if(version_compare($wp_version,"3.5",">=")|| $mem < 32)
529
- echo '<span style="'.$alertstyle.'">'.$mem.'M</span>';
530
  else echo $mem . 'M';
531
  }elseif ($mem < 64 && (version_compare($wp_version,"3.8",">=")|| $is_multisite)){
532
- echo '<span style="'.$alertstyle.'">'.$mem.'M</span>';
533
  }else{
534
  echo $mem . 'M';
535
  }
536
- } else {
537
  echo $wp_memory;
538
- } ; ?></li>
 
 
539
  <li><strong>WordPress <?php
540
  $WPtimezone = get_option('timezone_string');
541
  if (!empty($WPtimezone))echo __('Timezone');
@@ -546,20 +602,17 @@ function wassup_optionsView($tab=0) {
546
  }else{
547
  $wpoffset = get_option("gmt_offset");
548
  }
549
- if ($wpoffset !== false && $wpoffset != "") {
550
  echo ' UTC ';
551
- if ((int)$wpoffset >= 0) { echo '+'.$wpoffset; }
552
- else { echo $wpoffset; }
553
  }
554
  echo ' '.__('hours').' ('.gmdate(get_option('time_format'),(time()+($wpoffset*3600))).')'; ?></li>
555
  <li><strong>WordPress <?php _e("Host Timezone","wassup");?></strong>: <?php
556
  $host_timezone = $wassup_options->getHostTimezone(true);
557
- if (!empty($host_timezone)) {
558
- if (is_array($host_timezone)) {
559
- echo $host_timezone[0]. " (UTC $host_timezone[1])";
560
- } else {
561
- echo $host_timezone;
562
- }
563
  }else{
564
  echo __("unknown");
565
  }?></li>
@@ -595,14 +648,18 @@ function wassup_optionsView($tab=0) {
595
  </ul>
596
  <p class="sys-settings"><strong>PHP <?php _e('Version'); ?></strong>: <?php echo PHP_VERSION; ?></p>
597
  <ul class="varlist"><?php
598
- //New in v1.9: 'safe_mode' deprecated in PHP 5.3 and removed in 5.4
599
- $safe_mode="off";
600
- if (version_compare(PHP_VERSION, '5.3', '<')) {
601
  echo "\n"; ?>
602
  <li><strong>PHP <?php _e("Safe Mode", "wassup"); ?></strong>: <?php
603
- $safe_mode= strtolower(ini_get("safe_mode"));
604
- if ($safe_mode == "on") echo __("on","wassup");
605
- else echo __("off","wassup");
 
 
 
 
606
  ?></li><?php
607
  } ?>
608
  <li><strong>PHP <?php _e("File Open Restrictions", "wassup"); ?></strong> (open_basedir): <?php
@@ -618,19 +675,16 @@ function wassup_optionsView($tab=0) {
618
  else _e("off","wassup");
619
  ?></li>
620
  <li><strong>PHP <?php _e("Disabled functions", "wassup");?></strong>: <?php
621
- //New in v1.9: list of disabled PHP functions
622
- if ($safe_mode != "on") {
623
- $disabled_funcs=ini_get('disable_functions');
624
- if (!empty($disabled_funcs)) {
625
- $darray=explode(',',$disabled_funcs);
626
- array_walk($darray,'trim');
627
- sort($darray);
628
- if ($darray[0]=='') array_shift($darray);
629
- $disabled_funcs=preg_replace('/(^|[ ,])(error_reporting|ini_get|ini_set|set_time_limit|shell_exec)([ ,]|$)/','\1<span style="'.$alertstyle.'">\2</span>\3',implode(', ', $darray));
630
- echo '<br/><span style="display:block; padding-left:20px;">'.$disabled_funcs.'</span>';
631
- }
632
- else _e("none","wassup");?></li><?php
633
- }
634
  echo "\n"; ?>
635
  <li><strong>PHP <?php _e("Memory Allocation","wassup"); ?></strong>: <?php
636
  $mem=0;
@@ -639,25 +693,44 @@ function wassup_optionsView($tab=0) {
639
  $memory_use=round(memory_get_usage()/1024/1024,2);
640
  }
641
  //$memory_limit = ini_get('memory_limit'); //set for WP memory alloc above
642
- if (preg_match('/^(\d+){1,4}(\w?)/',$memory_limit,$matches) > 0) {
643
- $mem=(int)$matches[1];
644
- if ( $mem < 128 && $matches[2] == "M") echo '<span style="'.$alertstyle.'">'.$memory_limit."</span>";
645
- else echo $memory_limit;
646
- } else {
647
- $memory_limit=0; _e("unknown","wassup");
 
 
 
 
648
  }
649
  ?></li>
650
  <li><strong>PHP <?php _e("Memory Usage","wassup"); ?></strong>: <?php
651
  if (!empty($mem) && ($mem-$memory_use) < 2)
652
- echo '<span style="'.$alertstyle.'">'.$memory_use."M</span>";
653
  elseif ($memory_use >0)
654
  echo $memory_use."M";
655
  else _e("unknown","wassup");
656
  ?></li>
657
- <li><strong>PHP <?php _e("Script Timeout Limit","wassup"); ?></strong>: <?php
658
  $max_execute = ini_get("max_execution_time");
659
- if (!empty($max_execute)) { echo $max_execute." ".__("seconds","wassup"); }
660
- else { _e("unknown","wassup"); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
661
  ?></li>
662
  <li><strong>PHP <?php _e("Browser Capabilities File","wassup"); ?></strong> (browscap): <?php
663
  $browscap=ini_get("browscap");
@@ -694,7 +767,7 @@ function wassup_optionsView($tab=0) {
694
  //###MySQL server settings
695
  $sql_version = $wpdb->get_var("SELECT version() as version");
696
  if (!empty($sql_version) && version_compare($sql_version, '4.1', '>=')) {
697
- $sql_conf = @$wpdb->get_results("SELECT @@max_user_connections AS max_connections, @@global.time_zone AS tzglobal, @@session.time_zone AS tzsession, @@session.collation_connection AS char_collation, @@session.wait_timeout AS wait_timeout, @@global.connect_timeout AS connect_timeout, @@global.key_buffer_size as index_buffer, @@global.innodb_buffer_pool_size AS innodb_buffer_size, @@session.read_buffer_size AS read_buffer, @@have_query_cache AS have_query_cache, @@global.query_cache_size AS query_cache_size, @@global.query_cache_type AS query_cache_type, @@global.query_cache_limit AS query_cache_limit, @@global.delayed_queue_size AS delayed_queue_size, @@global.delayed_insert_timeout AS delayed_insert_timeout, @@global.max_delayed_threads AS max_delayed_threads, @@session.storage_engine AS storage_engine");
698
  }
699
  if (!empty($sql_conf) && is_array($sql_conf)) {
700
  $sql_max_connections= isset($sql_conf[0]->max_connections)? (int)$sql_conf[0]->max_connections : 0;
@@ -714,6 +787,7 @@ function wassup_optionsView($tab=0) {
714
  $sql_delayed_timeout = isset($sql_conf[0]->delayed_insert_timeout)? $sql_conf[0]->delayed_insert_timeout : "";
715
  $sql_delayed_threads = isset($sql_conf[0]->max_delayed_threads)? $sql_conf[0]->max_delayed_threads : "";
716
  $sql_engine = isset($sql_conf[0]->storage_engine)? $sql_conf[0]->storage_engine : "";
 
717
  if ($wdebug_mode) {
718
  echo "\n<!-- MySQL variables \$sql_conf:";
719
  print_r($sql_conf);
@@ -757,6 +831,8 @@ function wassup_optionsView($tab=0) {
757
  $sql_engine = $var->Value;
758
  } elseif (empty($sql_engine) && $var->Variable_name == "table_type") {
759
  $sql_engine = $var->Value;
 
 
760
  }
761
  }
762
  if ($wdebug_mode) {
@@ -788,22 +864,26 @@ function wassup_optionsView($tab=0) {
788
  <li><strong>MySQL <?php _e('Max User Connections','wassup'); ?></strong>: <?php
789
  if(isset($sql_max_connections) && is_numeric($sql_max_connections)){
790
  if($sql_max_connections >0){
791
- if($sql_max_connections < 48)
792
- echo '<span style="'.$alertstyle.'">'.$sql_max_connections.'</span> ('.__("possibly too small","wassup").')';
793
- else echo (int)$sql_max_connections;
 
 
 
 
794
  }else{
795
  echo __("unlimited/up to server maximum","wassup");
796
  }
797
  } else {
798
  _e("unknown","wassup");
799
  }?></li>
800
- <li><strong>MySQL <?php _e('Query Cache Allocation','wassup'); ?></strong>: <?php
801
  if (preg_match('/^(on|yes|1|true)$/i',$sql_query_cache_enabled)>0) {
802
  if (is_numeric($sql_query_cache) && (int)$sql_query_cache >0) {
803
  $cache_size = round((int)$sql_query_cache/1024/1024);
804
  if ($cache_size >256) {
805
  if ($sql_cache_type != "2" && stristr($sql_cache_type,'demand')===false)
806
- echo '<span style="'.$alertstyle.'">'.$cache_size.'M </span> ('.__("possibly too big, reduces available RAM.","wassup").')';
807
  else
808
  echo $cache_size.'M';
809
  } else {
@@ -820,13 +900,13 @@ function wassup_optionsView($tab=0) {
820
  } else {
821
  _e("disabled","wassup");
822
  } ?></li>
823
- <li><strong>MySQL <?php _e('Index Buffer','wassup'); ?></strong>: <?php
824
  if (empty($table_engine) || stristr($table_engine,"myisam")!==false) {
825
  //key_buffer is MyISAM parameter only
826
 
827
  if (is_numeric($sql_indexbuffer)) {
828
  if ((int)$sql_indexbuffer >0)
829
- echo (round((int)$sql_indexbuffer/1024/1024)) . "M (key buffer)";
830
  else
831
  echo $sql_indexbuffer." (".__("disabled","wassup").")";
832
  } else {
@@ -836,7 +916,7 @@ function wassup_optionsView($tab=0) {
836
  //InnoDB uses "innodb_buffer_pool_size"
837
  if (is_numeric($sql_buffersize)) {
838
  if ((int)$sql_buffersize >0)
839
- echo (round((int)$sql_buffersize/1024/1024)) . "M (buffer pool size)";
840
  else
841
  echo $sql_buffersize." (".__("disabled","wassup").")";
842
  } else {
@@ -850,7 +930,7 @@ function wassup_optionsView($tab=0) {
850
  } else {
851
  _e("unknown","wassup");
852
  } ?></li>
853
- <li><strong>MySQL <?php _e('Read Buffer','wassup'); ?></strong>: <?php
854
  if (is_numeric($sql_readbuffer)) {
855
  if ((int)$sql_readbuffer >0) {
856
  echo (round((int)$sql_readbuffer/1024/1024)) . "M";
@@ -860,56 +940,64 @@ function wassup_optionsView($tab=0) {
860
  } else {
861
  _e("unknown","wassup");
862
  } ?></li>
863
- <li><strong>MySQL <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
864
  if (empty($table_engine) || stristr($table_engine,"isam")!==false) {
865
  if (!is_numeric($sql_delayed_queue) || (int)$sql_delayed_queue == 0 || (int)$sql_delayed_threads == 0) {
866
- echo __("Delayed Insert","wassup").'</strong>: '.__("disabled","wassup");
867
- } elseif (is_numeric($sql_delayed_threads) && (int)$sql_delayed_threads >0) {
868
- echo __("Delayed Insert Queue","wassup"); ?></strong>: <?php
869
  echo (int)$sql_delayed_queue ." ".__("rows","wassup");
870
  if (isset($sql_delayed_timeout)) {
871
- echo "</li>\n\t\t<li><strong>MySQL ".__("Delayed Handler Timeout","wassup")."</strong>: ";
872
  if ((int)$sql_delayed_timeout >60)
873
  echo ($sql_delayed_timeout/60)." ".__("minutes");
874
  elseif ((int)$sql_delayed_timeout >25)
875
  echo $sql_delayed_timeout." ".__("seconds");
876
  else
877
- echo '<span style="'.$alertstyle.'">'.$sql_delayed_timeout.'</span> '.("seconds");
878
  }
879
  } else {
880
- echo __("Delayed Insert Queue","wassup").'</strong>: '.__("unknown","wassup");
881
  }
882
  } else {
883
- if (stristr($table_engine,"innodb")!==false)
884
- echo __("Delayed Insert","wassup").'</strong>: '.__("not supported","wassup");
885
- elseif (!is_numeric($sql_delayed_queue) || (int)$sql_delayed_queue == 0)
886
- echo __("Delayed Insert","wassup").'</strong>: '.__("disabled","wassup");
887
- else
888
- echo __("Delayed Insert Queue","wassup").'</strong>: '.__("unknown","wassup");
889
  } ?></li>
890
- <li><strong>MySQL <?php _e("Wait Timeout","wassup"); ?></strong>: <?php
891
- if (is_numeric($sql_wait_timeout)) {
892
- echo $sql_wait_timeout." ".__("seconds","wassup");
893
- } else {
894
- _e("unknown","wassup");
895
- }
896
- ?></li>
897
  <li><strong>MySQL <?php _e('Timezone'); ?></strong>: <?php
898
- if (empty($sql_timezone)) $sql_timezone="SYSTEM";
899
- if ($sql_timezone == "SYSTEM" && !empty($host_timezone)) {
 
900
  if (is_array($host_timezone)) {
901
- $mysql_tz = $host_timezone[0];
 
902
  } else {
903
  $mysql_tz = $host_timezone;
904
  }
905
  } else {
906
  $mysql_tz = wassupDb::get_db_setting('timezone');
907
  }
908
- $mysqloffset = wassupDb::get_db_setting('tzoffset');
909
- if ($sql_timezone != $mysql_tz) {
910
- echo $sql_timezone.' ('.$mysql_tz.' UTC '.(int)($mysqloffset/3600).')';
911
- } else {
912
- echo $sql_timezone.' (UTC '.(int)($mysqloffset/3600).')';
 
 
 
913
  }
914
  if (version_compare($wp_version,'2.8.3','>='))
915
  echo ' <small> ('.__("may be different from PHP offset","wassup").')</small>';
@@ -917,8 +1005,7 @@ function wassup_optionsView($tab=0) {
917
  </ul>
918
  <br />
919
  </div><!-- /sysinfo -->
920
- <p class="opt-prev-next"><a href="<?php echo admin_url('admin.php?page=wassup-options&tab=2');?>"><?php echo '&larr;'.__("Prev","wassup");?></a> &nbsp; &nbsp; <a href="<?php if($has_uninstall_tab)echo admin_url('admin.php?page=wassup-options&tab=4');else echo admin_url('admin.php?page=wassup-options&tab=sys');?>"><?php echo __("Next","wassup").'&rarr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br />
921
- <!-- <p class="opt-prev-next"><a href="<?php if($has_uninstall_tab)echo admin_url('admin.php?page=wassup-options&tab=4');else echo admin_url('admin.php?page=wassup-options&tab=3');?>"><?php echo '&larr;'.__("Prev","wassup");?></a> &nbsp; &nbsp; <a href="<?php echo admin_url('admin.php?page=wassup-options&tab=faq');?>"><?php echo __("Next","wassup").'&rarr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br /> -->
922
  </div>
923
  <?php
924
  if($has_uninstall_tab){?>
@@ -927,14 +1014,14 @@ function wassup_optionsView($tab=0) {
927
  <p><?php _e('No problem. Before you deactivate this plugin, check the box below to cleanup any data that was collected by WassUp that could be left behind.', 'wassup') ;?></p><br />
928
  <p><input type="checkbox" name="wassup_uninstall" value="1" <?php if ($wassup_options->wassup_uninstall == 1 ) echo 'checked="CHECKED"'; ?> /> <strong><?php _e('Permanently remove WassUp data and settings.','wassup'); ?></strong></p>
929
  <?php if ($wassup_options->wassup_uninstall == 1) { ?>
930
- <span style="font-size:95%;font-weight:bold; margin-left:20px;<?php echo $alertstyle; ?>"><span style="text-decoration:blink;padding-left:5px;"><?php _e("WARNING","wassup"); ?>! </span><?php _e("All WassUp data and settings will be DELETED upon deactivation of this plugin.","wassup"); ?></span><br />
931
  <?php } ?>
932
  <p><?php echo sprintf(__("This action cannot be undone. Before uninstalling WassUp, you should backup your Wordpress database first. WassUp data is stored in the table %s.", "wassup"),'<strong>'.$wassup_options->wassup_table.'</strong>');?></p>
933
 
934
  <br /><p><?php echo sprintf(__("To help improve this plugin, we would appreciate your feedback at %s.","wassup"),'<a href="http://www.wpwp.org">www.wpwp.org</a>');?></p>
935
  <br /><br />
936
  <p class="submit"><input type="submit" name="submit-options4" id="submit-options4" class="submit-opt button button-left button-primary" value="<?php _e('Save Settings','wassup');?>" onclick="jQuery('#submit-options4').val('Saving...');"/>&nbsp;<input type="reset" name="reset" value="<?php _e('Reset','wassup');?>" class="reset-opt button button-secondary" /> - <input type="submit" name="reset-to-default" class="default-opt button button-caution wassup-button" value="<?php _e("Reset to Default", "wassup");?>" /></p>
937
- <p class="opt-prev-next"><a href="<?php echo admin_url('admin.php?page=wassup-options&tab=3');?>"><?php echo '&larr;'.__("Prev","wassup");?></a> &nbsp; &nbsp; <a href="<?php echo admin_url('admin.php?page=wassup-options&tab=faq');?>"><?php echo __("Next","wassup").'&larr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br />
938
  </div><?php
939
  } //if has_uninstall_tab
940
  ?>
@@ -949,8 +1036,9 @@ function wassup_optionsView($tab=0) {
949
  <strong>A:</strong> <span class="faq-answer"><?php echo __("Yes. Insert the template tag \"wassup_sidebar()\" into your theme's \"sidebar.php\" file to display Wassup widgets as a single combined widget on your site.","wassup");?></span></li>
950
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("How do I view the real-time visitor geolocation map in WassUp?","wassup");?></span><br/>
951
  <strong>A:</strong> <span class="faq-answer"><?php echo sprintf(__("Check the box for \"Display a GEO IP Map in spy visitors view\" in %s tab and save, then navigate to %s panel to see the map.","wassup"),'<span class="code">WassUp >> '.__("Options","wassup").' >><nobr>['.__("General Setup","wassup").']</nobr></span>','<span class="code">WassUp >><nobr>'.__("SPY Visitors","wassup").'</nobr></span>');?></span></li>
952
- <li><strong>Q:</strong> <span class="faq-question"><?php echo __("The map has vanished and I get the message: \"Google has disabled use of the Maps API for this application\". How do I fix this?","wassup");?></span><br/>
953
- <strong>A:</strong> <span class="faq-answer"><?php echo sprintf(__("Erase the contents of \"Google Maps API Key\" field under %s tab. Since WassUp 1.8.4, an API key is not required for viewing Google!Maps API v3 maps in WassUp.","wassup"),'<span class="code">WassUp >>'.__("Options","wassup").' >><nobr>['.__("General Setup","wassup").']</nobr></span>');?></span></li>
 
954
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("How do I exclude a visitor from being recorded?","wassup");?></span><br/>
955
  <strong>A:</strong> <span class="faq-answer"><?php echo sprintf(__("Navigate to %s tab and enter a visitor's username, IP address, or hostname into the appropriate text area for that \"Recording Exclusion\" type.","wassup"),'<span class="code">WassUp >>'.__("Options","wassup").' >><nobr>['.__("Filters & Exclusions","wassup").']</nobr></span>');?></span></li>
956
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("How do I stop (temporarily) WassUp from recording new visits on my site?","wassup");?></span><br/>
@@ -973,13 +1061,13 @@ function wassup_optionsView($tab=0) {
973
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("Is there any caching plugin that works with WassUp?","wassup");?></span><br/>
974
  <strong>A:</strong> <span class="faq-answer"><?php echo sprintf(__("%s is the only caching plugin verified to work with WassUp.","wassup"),'<a href="http://wordpress.org/extend/plugins/wp-widget-cache/">WP Widget Cache</a>');?></span></li>
975
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("How can I make Wassup run faster?","wassup");?></span><br/>
976
- <strong>A #1:</strong> <span class="faq-answer"><?php echo sprintf(__("Keep Wassup table size small with automatic deletions or periodic manual delete of old records under %s tab.","wassup"),'<span class="code">WassUp >>'.__("Options","wassup").' >><nobr>['.__("Manage File & Data","wassup").']</nobr></span>');?></span><br/>
977
  <strong>A #2:</strong> <span class="faq-answer"><?php echo __("If using the \"Top Stats\" widget on your site, set refresh frequency to 15 minutes or higher.","wassup");?></span><br/>
978
  <strong>A #3:</strong> <span class="faq-answer"><?php echo sprintf(__("Reduce the number of recording exclusions (by ip/hostname/username/url) under %s tab.","wassup"),'<span class="code">WassUp >>'.__("Options","wassup").' >><nobr>['.__("Filters & Exclusions","wassup").']</nobr></span>');?></span><br/>
979
  <strong>A #4:</strong> <span class="faq-answer"><?php
980
- $files='<span class="code">badhosts.txt, badhosts-intl.txt,'.__("and","wassup").' lib/akismet.class.php</span>';
981
- echo sprintf(__("Delete the files %s from Wassup plugin folder to force reduce I/O usage in spam/malware detection.","wassup"),$files);?></span><br/>
982
- <strong>A #5:</strong> <span class="faq-answer"><?php echo sprintf(__("Stop all spam/malware detection by unchecking \"Enable Spam and malware detection on records\" under %s tab.","wassup"),'<span class="code">WassUp >>'.__("Options","wassup").' >><nobr>['.__("General Setup","wassup").']</nobr></span>');?></span></li>
983
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("Why does WassUp stats sometimes show more page views than actual pages clicked by a person?","wassup");?></span><br/>
984
  <strong>A:</strong> <span class="faq-answer"><?php echo __("\"Phantom\" page views can occur when a user's browser does automatic feed retrieval, link pre-fetching, a page refresh, or automatically adds your website to it's \"Top sites\" window (Safari). WassUp tracks these because they are valid requests from the browser and are sometimes indistinguishable from user link clicks.","wassup");?></span></li>
985
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("How do I upgrade WassUp safely when my site has frequent visitors?","wassup");?></span><br/>
@@ -994,7 +1082,7 @@ function wassup_optionsView($tab=0) {
994
  </ol>
995
  <p class="legend"><?php echo sprintf(__("Visit the %s to find more answers to your WassUp questions.","wassup"),'<a href="http://wordpress.org/support/plugin/wassup">'.__("Plugin Forum","wassup").'</a>');?></p>
996
  <br />
997
- <p class="opt-prev-next"><a href="<?php if($has_uninstall_tab)echo admin_url('admin.php?page=wassup-options&tab=4');else echo admin_url('admin.php?page=wassup-options&tab=3');?>"><?php echo '&larr;'.__("Prev","wassup");?></a> &nbsp; &nbsp; <a href="<?php echo admin_url('admin.php?page=wassup-options&tab=donate');?>"><?php echo __("Next","wassup").'&rarr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br />
998
  </div>
999
  <div id="wassup_opt_frag-6" class="optionspanel donatepanel<?php if($tab=="donate" || $tab=="6") echo ' tabselected';?>">
1000
  <h3><?php _e("How you can donate","wassup"); ?></h3>
@@ -1014,7 +1102,7 @@ function wassup_optionsView($tab=0) {
1014
  if (file_exists(WASSUPDIR."/lib/donate.php")) include_once(WASSUPDIR."/lib/donate.php");?>
1015
  </div>
1016
  <br />
1017
- <p class="opt-prev-next"><a href="<?php echo admin_url('admin.php?page=wassup-options&tab=faq');?>"><?php echo '&larr;'.__("Prev","wassup");?></a> &nbsp; &nbsp; <a href="<?php echo admin_url('admin.php?page=wassup-options&tab=1');?>"><?php echo __("Next","wassup").'&rarr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br />
1018
  </div>
1019
  </div><!-- /#tabcontainer -->
1020
  </form>
1
  <?php
2
  /**
3
+ * Displays settings form, Wassup wp_options values, and Wassup FAQ
4
  *
5
  * @package WassUp Real-time Analytics
6
  * @subpackage settings.php
7
+ * @author helened (http://helenesit.com)
 
8
  */
9
+ //-------------------------------------------------
10
+ //# No direct requests for this plugin module
11
+ $wfile=preg_replace('/\\\\/','/',__FILE__); //for windows
12
+ //abort if this is direct uri request for file
13
+ if((!empty($_SERVER['PHP_SELF']) && preg_match('#'.preg_quote($_SERVER['PHP_SELF']).'$#',$wfile)>0) ||
14
+ (!empty($_SERVER['SCRIPT_FILENAME']) && realpath($_SERVER['SCRIPT_FILENAME'])===realpath($wfile))){
15
+ //try track this uri request
16
+ if(!headers_sent()){
17
+ //triggers redirect to 404 error page so Wassup can track this attempt to access itself (original request_uri is lost)
18
+ header('Location: /?p=404page&err=wassup403'.'&wf='.basename($wfile));
19
+ exit;
20
+ }else{
21
+ //'wp_die' may be undefined here
22
+ die('<strong>Sorry. Unable to display requested page.</strong>');
23
+ }
24
+ exit;
25
+ //abort if no WordPress
26
+ }elseif(!defined('ABSPATH') || empty($GLOBALS['wp_version'])){
27
+ //show escaped bad request on exit
28
+ die("Bad Request: ".htmlspecialchars(preg_replace('/(&#0*37;|&amp;#0*37;|&#0*38;#0*37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));
29
  }
30
+ unset($wfile); //to free memory
31
+ //-------------------------------------------------
32
  /**
33
+ * Form to change Wassup's wp_option settings and to show plugin info.
34
+ * - Shows both single site and network settings where applicable
35
+ * - Shows server settings that may affect plugin performance
36
+ * - Shows plugin support FAQ
37
+ * - Shows ways to donate $ towards continued plugin development
38
+ *
39
  * @param integer
40
  * @return void
41
  */
44
 
45
  $GMapsAPI_signup="https://developers.google.com/maps/documentation/javascript/get-api-key#key"; //v3 key signup
46
  $adminemail = get_bloginfo('admin_email');
 
 
47
  $wassup_table=$wassup_options->wassup_table;
48
+ $wassup_network_settings=array();
49
+ //bugfix in v1.9.1: fix wassup-options links for multisite network admin screens
50
+ $multisite_whereis="";
51
+ $is_shared_table=false;
52
+ if(is_multisite()){
53
+ $wassup_network_settings=get_site_option('wassup_network_settings');
54
+ if(!empty($wassup_network_settings['wassup_table'])){
55
+ $wassup_table=$wassup_network_settings['wassup_table'];
56
+ $adminemail=get_site_option('admin_email');
57
+ if(!is_network_admin()){
58
+ $multisite_whereis=" AND `subsite_id`=".$GLOBALS['current_blog']->blog_id;
59
+ $is_shared_table=true;
60
+ }
61
+ //show main site settings for table management
62
+ $site_settings=get_blog_option($GLOBALS['current_site']->blog_id,'wassup_settings');
63
+ $wassup_options->wassup_optimize=$site_settings['wassup_optimize'];
64
+ $wassup_options->delayed_insert=$site_settings['delayed_insert'];
65
+ $wassup_options->wassup_remind_mb=$site_settings['wassup_remind_mb'];
66
+ $wassup_options->wassup_remind_flag=$site_settings['wassup_remind_flag'];
67
+
68
+ }
69
+ if(is_network_admin()) $options_link=network_admin_url('admin.php?page=wassup-options');
70
+ else $options_link=admin_url('admin.php?page=wassup-options');
71
+ }else{
72
+ $options_link=admin_url('admin.php?page=wassup-options');
73
+ }
74
  $wassup_meta_table = $wassup_table . "_meta";
75
+ $wassup_tmp_table = $wassup_table . "_tmp";
76
  $table_engine = "";
77
  $table_collation = "";
78
  //$wp_min_memory=40; //since WordPress 3.5+
80
  if(!is_object($current_user) || empty($current_user->ID)){
81
  $user=wp_get_current_user();
82
  }
83
+ $alert_msg="";
 
84
  $disabled='disabled="DISABLED"';
85
  $checked='checked="CHECKED"';
86
 
95
  if (wassupDb::table_exists($wassup_table)) {
96
  $fstatus = wassupDb::table_status($wassup_table);
97
  if (!empty($fstatus) && is_object($fstatus)) {
98
+ //DB size includes index size @since v1.9
99
  $data_lenght=$fstatus->Data_length+$fstatus->Index_length;
100
  $data_rows = (int) $fstatus->Rows;
101
  if (isset($fstatus->Engine)) {
106
  $table_collation = (isset($fstatus->Collation)? $fstatus->Collation: '');
107
  }
108
  } else { ?>
109
+ <span class="alertstyle"><br /><strong><?php echo __('IMPORTANT').': WassUp '.__("table empty or does not exist!","wassup"); ?></strong></span>
110
  <?php }
111
  $wwidgets= __('Visitors Online or Top Stats','wassup');
112
  $wwidgets_link='<a href="'.admin_url("widgets.php").'">'.__('Widgets menu','wassup').'</a>';
138
  }
139
  echo "-->\n";
140
  }
141
+ //show uninstall tab for multisite/subdomain sites and for Wordpress 2.x @since v1.9
142
  $has_uninstall_tab=false;
143
+ if(version_compare($wp_version,"3.0","<") || (is_multisite() && empty($wassup_network_settings['wassup_table']) && !is_main_site())) $has_uninstall_tab=true;
 
144
  echo "\n"; ?>
145
  <form name="wassupsettings" id="wassupsettings" action="" method="post">
146
  <?php
147
+ //wp_nonce field for referer validation/security @since v1.9
148
  wp_nonce_field('wassupsettings-'.$current_user->ID);
149
  echo "\n";?>
150
  <div class="ui-tabs" id="tabcontainer">
156
  echo "\n";?>
157
  <li id="opt-tab4" class="optionstab <?php if($tab=="4")echo ' ui-tabs-active';?>"><a href="#wassup_opt_frag-4"><span><?php _e("Uninstall","wassup");?></span></a></li><?php
158
  }
159
+ //"donate" and "faq" tabs @since v1.9
160
  echo "\n";?>
161
  <li id="opt-tab-faq" class="optionstab faqtab<?php if($tab=="faq" || $tab=="5")echo ' ui-tabs-active';?>"><a href="#wassup_opt_frag-5"><span>F.A.Q.&nbsp;</span></a></li>
162
  <li id="opt-tab-donate" class="optionstab donatetab<?php if($tab=="donate" || $tab=="6")echo ' ui-tabs-active';?>"><a href="#wassup_opt_frag-6"><span><?php _e("Donate","wassup");?></span></a></li>
163
  </ul>
164
 
165
  <div id="wassup_opt_frag-1" class="optionspanel<?php if ($tab == "1") echo ' tabselected'; ?>"><br/><?php
166
+ //multisite options @since v1.9
 
167
  if(is_multisite() && (is_network_admin() || (is_main_site() && is_super_admin()))){
 
168
  echo "\n";?>
169
  <h2><?php _e('Networkwide Settings','wassup');?></h2>
170
  <p class="noindent-opt"><?php echo __("Multisite settings that applies to all subsites in the network.","wassup");?></p>
175
  <span class="opt-note"><?php echo " ".__("Can be overridden on individual subsites to disable statistics recording.","wassup");?></span><?php
176
  if(!empty($wassup_network_settings['wassup_table'])){?><br/>
177
  <h3><?php _e("Network Subsites Options","wassup");?></h3>
178
+ <p><input type="checkbox" name="wassup_menu" value="1" <?php if(!empty($wassup_network_settings['wassup_menu'])) echo $checked;?> /> <strong><?php _e("Show Wassup's Main menu and options panel to subsite administrators.","wassup");?></strong><br/>
179
+ <span class="opt-note"><?php echo " ".__("Uncheck to hide Wassup Main menu and options panel from all users except Network administrator (super-admin). Dashboard submenu \"Wassup-stats\" and dashboard widget display are unaffected.","wassup");?></span></p><?php
180
  }?><br/>
181
  <hr/>
182
  <h2><?php _e('Site Settings','wassup');?></h2>
183
+ <p class="noindent-opt"><?php echo __("Main site settings / Default settings for new network subsites.","wassup");?></p><?php
184
  } //end if multisite
185
  ?>
186
  <h3><?php _e('Statistics Recording','wassup');?></h3>
187
+ <p class="description"><?php echo __("By default, Wassup collects and stores incoming visitor hits and checks each new record for spam and malware activity.","wassup");?></p>
188
  <p><input type="checkbox" name="wassup_active" value="1" <?php if($wassup_options->wassup_active == 1) echo $checked;?> /> <strong><?php _e('Enable statistics recording','wassup');?></strong><br/>
189
  <span class="opt-note"><?php
190
  if (!is_multisite()) echo " ".__("Do NOT disable unless upgrading or troubleshooting plugin problems.","wassup");
191
  else echo " ".__("Do NOT disable unless troubleshooting plugin problems.","wassup");
192
  ?></span>
193
  </p>
194
+ <p class="checkbox-indent"><input type="checkbox" name="wassup_spamcheck" value="1" <?php if($wassup_options->wassup_spamcheck == 1) echo $checked;?> /> <strong><?php _e('Enable spam and malware detection on new records','wassup');?></strong><br/>
195
+ <span class="opt-note"><?php echo " ".__("For identification of incoming spam/malware hits only. Does NOT stop attacks nor protect your site.","wassup");?></span>
196
  </p><br/>
197
+ <?php
198
+ if(version_compare($wp_version,'2.7','>=')){ ?>
199
  <h3><?php _e('User Permissions'); ?></h3>
200
+ <p class="description"><?php echo __("Gives selected users read-only access to Wassup-stats dashboard submenu panels and the ability to view the dashboard widget.","wassup")." ";
201
+ echo __("Only administrators have full access to Wassup main admin menu and Wassup-options panels to delete data and edit plugin settings.","wassup");?></p>
202
  <p><strong><?php _e('Set minimum user level that can view WassUp stats','wassup'); ?></strong>:
203
  <select name="wassup_userlevel">
204
  <?php $wassup_options->showFieldOptions("wassup_userlevel"); ?>
205
  </select>
206
  <?php echo "<nobr>(".__('default administrator','wassup').")</nobr>";?>
207
+ </p><br/><?php
208
+ echo "\n";
209
+ } //end if wp_version >=2.7
210
+ ?>
211
  <h3><?php _e('Screen resolution','wassup');?></h3>
212
  <p class="description"><?php echo __("Adjusts chart size and resets the max-width/truncation point of long texts.","wassup");?></span>
213
  <p class="indent-opt"><strong><?php _e('Your default screen resolution (in pixels)','wassup');?></strong>:
218
  <h3><?php _e('Dashboard Widget','wassup'); ?></h3>
219
  <p><input type="checkbox" name="wassup_dashboard_chart" value="1" <?php if($wassup_options->wassup_dashboard_chart==1) echo $checked; ?> /> <strong><?php _e('Enable widget/small chart in admin dashboard','wassup'); ?></strong>
220
  </p><br/>
221
+ <h3><?php _e('Spy Visitors Settings','wassup'); ?></h3>
222
+ <?php
223
+ $checked='checked="CHECKED"';
224
+ $disabled=' disabled="DISABLED" style="color:#99a;"';
225
+ $api_key="";
226
+ if ($wassup_options->wassup_geoip_map == 1) {
227
+ //New in v1.9.1: Api key IS required for accessing Google!Maps v3
228
+ if(!empty($wassup_options->wassup_googlemaps_key)) $api_key=esc_attr(strip_tags(html_entity_decode($wassup_options->wassup_googlemaps_key)));
229
  $disabled="";
230
+ } else {
231
+ $checked = 'onclick=\'jQuery("#wassup_googlemaps_key").removeAttr("disabled");\'';
232
+ }
233
+ echo "\n";
234
+ ?>
 
 
 
 
 
 
 
 
235
  <p class="indent-opt"> <input type="checkbox" name="wassup_geoip_map" value="1" <?php echo $checked; ?> />
236
+ <strong><?php _e('Display a GEO IP Map in the spy visitors view','wassup'); ?></strong></p>
237
+ <p class="checkbox-indent"><strong>Google Maps API <?php _e("key","wassup");?>:</strong> <input type="text" name="wassup_googlemaps_key" id="wassup_googlemaps_key" size="40" value=<?php echo '"'.esc_attr($api_key).'"'.$disabled;?> /> - <a href="<?php echo $GMapsAPI_signup;?>" target="_blank"><?php _e("signup for your key","wassup");?></a>
238
+ <br/><?php echo __('Use your own key to avoid map denial when Wassup API total usage exceeds Google!Maps limits.','wassup');?>
 
 
 
239
  </p><br/>
240
+ <?php
241
+ $checked='checked="CHECKED"';
242
+ $disabled='disabled="DISABLED"';
243
+ ?>
244
  <h3><?php _e('Visitor Detail Settings','wassup'); ?></h3>
245
  <p> <strong><?php _e('Show visitor details from the last','wassup'); ?></strong>:
246
  <select name='wassup_time_period'>
275
  $top_ten = $wassup_options->defaultSettings("top10");
276
  }
277
  $show_on_front=get_option('show_on_front');?></p>
278
+ <p><strong> <?php _e("List limit of top items", "wassup");?></strong>: <input type="text" name="toplimit" size="2" value="<?php
279
  if (empty($top_ten["toplimit"])) echo "10";
280
  else echo (int)$top_ten['toplimit']; ?>" /> (<?php _e("default 10","wassup"); ?>)
281
  </p>
317
  </p>
318
  <br /><br />
319
  <p class="submit"><input type="submit" name="submit-options" id="submit-options" class="submit-opt button button-left button-primary" value="<?php _e('Save Settings','wassup');?>" onclick="jQuery('#submit-options').val('Saving...');" />&nbsp;<input type="reset" name="reset" class="reset-opt button button-secondary" value="<?php _e('Reset','wassup');?>" /> - <input type="submit" name="reset-to-default" class="default-opt button button-caution wassup-button" value="<?php _e("Reset to Default", "wassup");?>" /></p>
320
+ <p class="opt-prev-next"><a href="<?php echo $options_link.'&tab=2';?>"><?php echo __("Next","wassup").'&rarr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br />
321
  </div>
322
 
323
  <div id="wassup_opt_frag-2" class="optionspanel<?php if ($tab == "2") echo ' tabselected'; ?>">
327
  <h3><?php echo __("Visitor Type Filters:","wassup"); ?></h3>
328
  <p style="padding-top:0;"><strong> &nbsp; <?php echo __("Checkbox to enable recording by type of \"visitor\"", "wassup");?></strong><br/>
329
  <span style="padding-left:25px;padding-top:0;margin-top:0;display:block;clear:left;">
330
+ <input type="checkbox" name="wassup_anonymous" value="1" checked="CHECKED" disabled="DISABLED" class="disabledstyle" /> <?php _e("Record regular visitors","wassup");?><br/>
331
  <input type="checkbox" name="wassup_loggedin" value="1" <?php if($wassup_options->wassup_loggedin == 1) echo $checked;?> /> <?php _e("Record logged in users", "wassup");?><br />
332
  <input type="checkbox" name="wassup_admin" value="1" <?php if($wassup_options->wassup_admin == 1) echo $checked;?> /> <?php _e("Record logged in administrators", "wassup");?><br />
333
  <input type="checkbox" name="wassup_spider" value="1" <?php if($wassup_options->wassup_spider == 1) echo $checked;?> /> <?php _e("Record spiders and bots", "wassup");?><br />
336
  <h3><?php echo __("Spam and Malware Filters:","wassup"); ?></h3>
337
  <p style="padding-top:0;"><strong> &nbsp; <?php echo __('Checkbox to enable recording of each type of "spam"','wassup'); ?></strong><br />
338
  <span style="padding-left:25px;padding-top:0;margin-top:0;display:block;clear:left;">
339
+ <input type="checkbox" name="wassup_spam" value="1" <?php if($wassup_options->wassup_spam == 1) echo $checked; ?> /> <?php _e('Record Akismet comment spam attempts','wassup');?> (<?php _e('checks IP for previous spam comments','wassup');?>)<br />
340
  <input type="checkbox" name="wassup_refspam" value="1" <?php if($wassup_options->wassup_refspam == 1) echo $checked; ?> /> <?php _e('Record referrer spam attempts','wassup'); ?><br />
341
  <input type="checkbox" name="wassup_hack" value="1" <?php if($wassup_options->wassup_hack == 1) echo $checked; ?> /> <?php _e("Record admin break-in/hacker attempts", "wassup") ?><br />
342
  <input type="checkbox" name="wassup_attack" value="1" <?php if($wassup_options->wassup_attack == 1) echo $checked; ?> /> <?php _e("Record attack/exploit attempts (libwww-perl agent)", "wassup") ?><br />
350
  <p style="padding-top:0;padding-bottom:0;"><strong><?php echo __('Enter source IPs to omit from recording','wassup');?></strong>:
351
  <br /><span style="padding-left:10px;display:block;clear:left;">
352
  <textarea name="wassup_exclude" rows="2" style="width:60%;"><?php echo esc_url($wassup_options->wassup_exclude);?></textarea></span>
353
+ <span class="opt-note"><?php echo __("comma separated value (ex: 127.0.0.1, 10.0.0.1, etc...).","wassup")." ".__("A single wildcard (*) can be placed after the last '.' in the IP ('::' in IPv6) for range exclusions (ex: 10.10.100.*, 192.168.*).","wassup");?></span>
354
  </p><br/>
355
  <h3 class="indent-opt"><?php echo __("Exclude by Hostname","wassup");?></h3>
356
  <p style="padding-top:0;padding-bottom:0;"><strong><?php echo __('Enter source hostnames to omit from recording','wassup');?></strong>:
371
  <span class="opt-note"><?php _e("comma separated value, don't enter entire url, only the last path or some word to exclude (ex: /category/wordpress, 2007, etc...)", "wassup");?></span>
372
  </p><br />
373
  <p class="submit"><input type="submit" name="submit-options2" id="submit-options2" class="submit-opt button button-left button-primary" value="<?php _e('Save Settings','wassup');?>" onclick="jQuery('#submit-options2').val('Saving...');" />&nbsp;<input type="reset" name="reset" class="reset-opt button button-secondary" value="<?php _e('Reset','wassup');?>" /> - <input type="submit" name="reset-to-default" class="default-opt button button-caution wassup-button" value="<?php _e("Reset to Default", "wassup");?>" /></p>
374
+ <p class="opt-prev-next"><a href="<?php echo $options_link.'&tab=1';?>"><?php echo '&larr;'.__("Prev","wassup");?></a> &nbsp; &nbsp; <a href="<?php echo $options_link.'&tab=3';?>"><?php echo __("Next","wassup").'&rarr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br />
375
  </div>
376
 
377
  <div id="wassup_opt_frag-3" class="optionspanel<?php if ($tab == "3") echo ' tabselected'; ?>">
378
  <h3><?php _e("Table Management Options","wassup");?></h3>
379
+ <?php //index size in total table size @since v1.9
380
  $tusage=($data_lenght/1024/1024);
381
  if ($wassup_options->is_USAdate())$tusagef=number_format($tusage, 1);
382
  else $tusagef=number_format($tusage,2,","," ");
387
  echo " ".__('You can delete all Wassup records now (Empty Table), you can set an automatic delete option to delete selected old records daily, and you can manually delete selected old records once (Delete NOW).','wassup');
388
  echo " ".__("If you haven't database space problems, you can leave the table as is.","wassup"); ?></p>
389
  <p class="indent-opt"><?php echo __('Current WassUp table usage is','wassup').': <strong>';
390
+ if((int)$tusage >= $alertmb)echo '<span class="alertstyle">'.$tusagef.'</span>';
391
  else echo $tusagef;
392
  echo '</strong> Mb ('.$data_rows.' '.__('records','wassup').')';?></p>
393
  <?php print $alert_msg; ?>
394
  <p class="indent-opt"><input type="checkbox" name="wassup_remind_flag" value="1" <?php if($wassup_options->wassup_remind_flag==1) echo $checked;?>>
395
+ <strong><?php _e('Alert me','wassup'); ?></strong> (<?php _e('email to','wassup'); ?>: <strong><?php print $adminemail; ?></strong>) <?php _e('when table reaches','wassup'); ?> <input type="text" name="wassup_remind_mb" size="3" value="<?php echo (int)$wassup_options->wassup_remind_mb; ?>"> Mb</p>
 
 
396
  <h3 class="indent-opt"><?php _e("Delete old records","wassup");?>:</h3><?php
397
+ $exporturl=wp_nonce_url($options_link.'&tab=3&export=1','wassupexport-'.$current_user->ID);
398
+ echo "\n";?>
399
  <p class="indent-opt description"><?php
400
  echo sprintf(__("Before deleting, you can save Wassup data in SQL 'export' format onto your local computer by clicking %s below.","wassup"), '<a class="export-wassup" href="'.$exporturl.'">'.__('export table','wassup').'</a>');
401
  echo " ".__("Reload this screen after export to view export messages.", "wassup");?></p>
409
  <nobr><?php _e("records older than", "wassup"); ?>
410
  <select name="delete_manual"><?php $wassup_options->showFieldOptions("delete_auto","never");?></select>&nbsp; <?php _e("once","wassup");?></nobr>
411
  </p><?php
412
+ //Delete by record ID# - for use with export @since v1.9
413
  $last_export_id=wassupDb::get_wassupmeta($wassup_table,'_export_recid-'.$current_user->ID);
414
  if (empty($last_export_id) || !is_numeric($last_export_id))
415
  $last_export_id=0;?>
423
  <input type="button" name="delete_now" class="submit-opt button button-danger wassup-hot-button" value="<?php _e('Delete NOW','wassup'); ?>" onclick="submit();"/><br/><span>&nbsp;<nobr><?php _e("Action is NOT undoable!", "wassup");?></nobr></span>
424
  </p>
425
  <br/>
426
+ <h3><?php _e("Table Export Options","wassup");?>:</h3>
427
+ <p class="indent-opt description"><?php
428
+ echo __("By default, known spam/malware records are omitted from Wassup's export data to reduce the risk of malware code becoming active and causing damage when records are imported into other applications.","wassup");?></p>
429
+ <p class="indent-opt"><label for="export_spam"> <input type="checkbox" name="export_spam" value="1" <?php if(!empty($wassup_options->export_spam)) echo $checked;?>/> <strong><?php echo __("Include spam records in exported data","wassup");?></strong></label><br>
430
+ <span class="opt-note"><?php if(empty($wassup_options->wassup_spamcheck)) echo __("Security NOTICE: Wassup is not configured to identify spam/malware, so all records are exported, including spam.","wassup");
431
+ else echo __("Security NOTICE: Enabling this could expose your computer or website to malware when spam records are imported.","wassup");?></span></p><br/>
432
+ <p class="indent-opt"><label for="export_omit_recid"> <input type="checkbox" name="export_omit_recid" value="1" <?php if(!empty($wassup_options->export_omit_recid)) echo $checked;?>/> <strong><?php echo __("Omit record ID from exported fields","wassup");?></strong></label><br/>
433
+ <span class="opt-note"><?php echo __("Check this box when importing data into another Wassup table that already has records (appending data).","wassup");?></span></p>
434
+ <br/>
435
  <h3><?php _e("Table Optimization","wassup");?>:</h3>
436
  <input type="hidden" name="wassup_dbengine" value="<?php echo $table_engine;?>"/>
437
  <p class="indent-opt description"><?php
438
+ //checkbox to turn off automatic optimization @since v1.9
439
  $msg="";?><span id="info-optimize" class="opt-info"><?php
440
  echo __("By default, WassUp tables are automatically optimized weekly and after each bulk deletion. This helps keep WassUp running fast, but it can sometimes cause slowdowns especially when there is a corrupt record in the table.","wassup")." ";
 
441
  //check if table is optimizable...some innodb is not
442
  $is_optimizable_table=true;
443
  $tengine=strtolower($table_engine);
444
  if($tengine !="myisam" && $tengine !="archive"){
445
  $is_optimizable_table=wassupDb::is_optimizable_table($wassup_table);
446
  }
447
+ //New in v1.9.1: table optimization and delayed insert options for multisite subsites that are NOT network activated only
448
+ if(!$is_shared_table){
449
+ echo __("You can cancel automatic optimization by unchecking the box below.","wassup");
450
+ }elseif($is_optimizable_table){
451
+ if(!empty($wassup_options->wassup_optimize)) echo __("Login as network admin to cancel automatic optimization below.","wassup");
452
+ else echo __("Login as network admin to enable automatic optimization below.","wassup");
453
+ }?></span><?php
454
  if(empty($wassup_options->wassup_optimize) && !$is_optimizable_table) echo '<em>'.__("Your table engine does NOT support the \"optimize\" command.","wassup").'</em>'."\n";?>
455
  </p>
456
  <p><label for="wassup_optimize_on">&nbsp; <input type="checkbox" name="wassup_optimize_on" value="1" <?php
457
  if(!empty($wassup_options->wassup_optimize)){
458
  echo $checked;
459
+ if($is_shared_table) echo " $disabled";
460
  }elseif(!$is_optimizable_table){
461
  echo " $disabled";
462
+ }elseif($is_shared_table){
463
+ echo $disabled;
464
  }?>/> <strong><?php _e("Enable automatic table optimization","wassup");?></strong></label><br/><?php
465
  $optimize_schedule="";
466
  if (empty($wassup_options->wassup_optimize)){
488
  </p>
489
  <br/>
490
  <h3><?php _e('Data Storage Methods','wassup');?></h3><?php
 
 
 
 
 
 
 
 
 
 
 
 
491
  $msg="";
492
  echo "\n";?>
493
  <h3 class="indent-opt">MySQL <?php echo __("Delayed Insert","wassup");?>:</h3>
494
  <p class="description"><span id="info-delayedinsert" class="opt-info"><?php
495
  echo __("When possible, WassUp uses the \"Delayed insert\" method of saving records in MySQL to store new visitor records. This method helps keep Wassup running fast on high-volume sites and during volume spikes on all sites. However, it can be inefficient on low-volume sites and sometimes host administrators disable it on shared servers.","wassup")." ";
496
+ if(!$is_shared_table) echo __("You can turn off \"delayed insert\" by unchecking the box below.","wassup");?></span> <?php
497
  $delayed_style="";
498
  if(strstr($tengine,"isam")===false && strstr($tengine,"archive")===false){
499
  if(empty($wassup_options->delayed_insert)){
500
  echo '<em>'.__("This method is unavailable for your storage engine type.","wassup").'</em>';
501
+ $delayed_style= ' '.$disabled.' class="disabledstyle"';
502
+ }elseif($is_shared_table){
503
+ $delayed_style= ' '.$disabled.' class="disabledstyle"';
504
  }else{
505
+ $delayed_style=' class="alertstyle"';
506
  }
507
  }else{
508
  $delayed_queue_size=wassupDb::get_db_setting("delayed_queue_size");
510
  if(!is_numeric($delayed_queue_size) || (int)$delayed_queue_size==0 || (int)$max_delayed_threads==0){
511
  if(empty($wassup_options->delayed_insert)){
512
  echo '<em>'.__("This method is disabled on your host server.","wassup").'</em>';
513
+ $delayed_style= ' '.$disabled.' class="disabledstyle"';
514
+ }elseif($is_shared_table){
515
+ $delayed_style= ' '.$disabled.' class="disabledstyle"';
516
  }else{
517
+ $delayed_style=' class="alertstyle"';
518
  }
519
  }
520
  }?></p>
540
  </ul>
541
  <p class="sys-settings"><strong>WordPress <?php _e('Version','wassup'); ?></strong>: <?php echo $wp_version; ?></p>
542
  <ul class="varlist"><?php
543
+ //to show when multisite network is enabled @since v1.9
544
  $is_multisite=false;
545
  if (function_exists('is_multisite')) {
546
  echo "\n"; ?>
547
+ <li><strong>WordPress Multisite <?php _e('network','wassup');?></strong>:<?php
548
  if (is_multisite()) {
549
  $is_multisite=true;
550
  echo ' '.__("on","wassup");
559
  if (!defined('WP_CACHE') || WP_CACHE===false || trim(WP_CACHE)==="") {
560
  echo __("not set","wassup");
561
  } else {
562
+ echo ' <span class="alertstyle">';
563
  if (WP_CACHE === true) echo __("on","wassup");
564
  else echo "WP_CACHE";
565
  echo '</span>';
566
  }
567
  ?></li>
568
  <li><strong>WordPress <?php _e('Memory Allocation','wassup');?></strong>: <?php
569
+ //display wordpress memory size @since v1.9
570
+ $memory_limit=@ini_get('memory_limit');
571
+ if(defined('WP_MEMORY_LIMIT')) $wp_memory=WP_MEMORY_LIMIT;
572
+ elseif($memory_limit >0) $wp_memory=$memory_limit;
573
+ else $wp_memory=0;
 
574
  $mem=0;
575
+ if(preg_match('/^(\d+)(\s?\w)?/',$wp_memory,$match)>0){
576
  $mem = (int)$match[1];
577
  if (!empty($match[2]) && strtolower($match[2])=='g')
578
  $mem = (int)$match[1]*1024;
580
  echo $mem . 'M';
581
  }elseif($mem < 40){
582
  if(version_compare($wp_version,"3.5",">=")|| $mem < 32)
583
+ echo '<span class="alertstyle">'.$mem.'M</span>';
584
  else echo $mem . 'M';
585
  }elseif ($mem < 64 && (version_compare($wp_version,"3.8",">=")|| $is_multisite)){
586
+ echo '<span class="alertstyle">'.$mem.'M</span>';
587
  }else{
588
  echo $mem . 'M';
589
  }
590
+ }elseif(!is_numeric($wp_memory)){
591
  echo $wp_memory;
592
+ }else{
593
+ echo __("no limit/unknown","wassup");
594
+ }?></li>
595
  <li><strong>WordPress <?php
596
  $WPtimezone = get_option('timezone_string');
597
  if (!empty($WPtimezone))echo __('Timezone');
602
  }else{
603
  $wpoffset = get_option("gmt_offset");
604
  }
605
+ if(is_numeric($wpoffset)){
606
  echo ' UTC ';
607
+ if ((int)$wpoffset >= 0) echo '+'.$wpoffset;
608
+ else echo $wpoffset;
609
  }
610
  echo ' '.__('hours').' ('.gmdate(get_option('time_format'),(time()+($wpoffset*3600))).')'; ?></li>
611
  <li><strong>WordPress <?php _e("Host Timezone","wassup");?></strong>: <?php
612
  $host_timezone = $wassup_options->getHostTimezone(true);
613
+ if(!empty($host_timezone) && is_array($host_timezone)){
614
+ if(count($host_timezone)>1) echo $host_timezone[0].' (UTC '.($host_timezone[1]*1).')';
615
+ else echo $host_timezone[0];
 
 
 
616
  }else{
617
  echo __("unknown");
618
  }?></li>
648
  </ul>
649
  <p class="sys-settings"><strong>PHP <?php _e('Version'); ?></strong>: <?php echo PHP_VERSION; ?></p>
650
  <ul class="varlist"><?php
651
+ //'safe_mode' deprecated in PHP 5.3 and removed in 5.4
652
+ $safe_mode=false;
653
+ if (version_compare(PHP_VERSION, '5.4', '<')) {
654
  echo "\n"; ?>
655
  <li><strong>PHP <?php _e("Safe Mode", "wassup"); ?></strong>: <?php
656
+ $safe_mode= strtolower(@ini_get("safe_mode"));
657
+ if($safe_mode== "on" || $safe_mode=="1"){
658
+ $safe_mode="on";
659
+ echo '<span class="alertstyle">'.__("on","wassup").'</span>';
660
+ }else{
661
+ echo __("off","wassup");
662
+ }
663
  ?></li><?php
664
  } ?>
665
  <li><strong>PHP <?php _e("File Open Restrictions", "wassup"); ?></strong> (open_basedir): <?php
675
  else _e("off","wassup");
676
  ?></li>
677
  <li><strong>PHP <?php _e("Disabled functions", "wassup");?></strong>: <?php
678
+ //list of disabled PHP functions @since v1.9
679
+ $disabled_funcs=ini_get('disable_functions');
680
+ if(!empty($disabled_funcs)){
681
+ $disabled_list=preg_replace('/(^|[ ,])(error_reporting|ini_set|set_time_limit|shell_exec|exec)(,|$)/','\1<span class="alertstyle">\2</span>\3 ',$disabled_funcs);
682
+ echo '<br/><span style="display:block;padding-left:20px;">'.$disabled_list.'</span>';
683
+ }elseif(empty($safe_mode)){
684
+ _e("none","wassup");
685
+ }else{
686
+ echo __("not applicable/safe mode set","wassup");
687
+ }?></li><?php
 
 
 
688
  echo "\n"; ?>
689
  <li><strong>PHP <?php _e("Memory Allocation","wassup"); ?></strong>: <?php
690
  $mem=0;
693
  $memory_use=round(memory_get_usage()/1024/1024,2);
694
  }
695
  //$memory_limit = ini_get('memory_limit'); //set for WP memory alloc above
696
+ if(preg_match('/^(\-?\d+){1,4}(\w?)/',$memory_limit,$matches) >0){
697
+ $mem=$matches[1];
698
+ if($mem >0 && $mem < 128 && $matches[2] == "M") echo '<span class="alertstyle">'.$memory_limit."</span>";
699
+ elseif($mem >0) echo $memory_limit;
700
+ else _e("unlimited/up to server maximum","wassup");
701
+ }elseif(empty($memory_limit)){
702
+ $memory_limit=0;
703
+ _e("unknown","wassup");
704
+ }else{
705
+ echo esc_attr($memory_limit);
706
  }
707
  ?></li>
708
  <li><strong>PHP <?php _e("Memory Usage","wassup"); ?></strong>: <?php
709
  if (!empty($mem) && ($mem-$memory_use) < 2)
710
+ echo '<span class="alertstyle">'.$memory_use."M</span>";
711
  elseif ($memory_use >0)
712
  echo $memory_use."M";
713
  else _e("unknown","wassup");
714
  ?></li>
715
+ <li><strong>PHP <?php _e("Script Timeout Limit","wassup"); ?></strong>: <?php
716
  $max_execute = ini_get("max_execution_time");
717
+ if(is_numeric($max_execute)){
718
+ if($max_execute>0){
719
+ if(strpos($disabled_funcs,'set_time_limit')!==false){
720
+ if($max_execute < 90) echo '<span class="alertstyle">'.(int)$max_execute."</span> ".__("seconds","wassup");
721
+ elseif($max_execute < 300) echo '<span class="noticestyle">'.(int)$max_execute."</span> ".__("seconds","wassup");
722
+ else echo (int)$max_execute." ".__("seconds","wassup");
723
+ }else{
724
+ echo (int)$max_execute." ".__("seconds","wassup");
725
+ }
726
+ }elseif($max_execute==0){
727
+ echo $max_execute." (".__("unlimited","wassup").")";
728
+ }else{
729
+ _e("unknown","wassup");
730
+ }
731
+ }else{
732
+ _e("unknown","wassup");
733
+ }
734
  ?></li>
735
  <li><strong>PHP <?php _e("Browser Capabilities File","wassup"); ?></strong> (browscap): <?php
736
  $browscap=ini_get("browscap");
767
  //###MySQL server settings
768
  $sql_version = $wpdb->get_var("SELECT version() as version");
769
  if (!empty($sql_version) && version_compare($sql_version, '4.1', '>=')) {
770
+ $sql_conf = @$wpdb->get_results("SELECT @@max_user_connections AS max_connections, @@global.time_zone AS tzglobal, @@session.time_zone AS tzsession, @@session.collation_connection AS char_collation, @@session.wait_timeout AS wait_timeout, @@global.connect_timeout AS connect_timeout, @@global.key_buffer_size as index_buffer, @@global.innodb_buffer_pool_size AS innodb_buffer_size, @@session.read_buffer_size AS read_buffer, @@have_query_cache AS have_query_cache, @@global.query_cache_size AS query_cache_size, @@global.query_cache_type AS query_cache_type, @@global.query_cache_limit AS query_cache_limit, @@global.delayed_queue_size AS delayed_queue_size, @@global.delayed_insert_timeout AS delayed_insert_timeout, @@global.max_delayed_threads AS max_delayed_threads, @@session.storage_engine AS storage_engine, @@concurrent_insert AS concurrent_insert");
771
  }
772
  if (!empty($sql_conf) && is_array($sql_conf)) {
773
  $sql_max_connections= isset($sql_conf[0]->max_connections)? (int)$sql_conf[0]->max_connections : 0;
787
  $sql_delayed_timeout = isset($sql_conf[0]->delayed_insert_timeout)? $sql_conf[0]->delayed_insert_timeout : "";
788
  $sql_delayed_threads = isset($sql_conf[0]->max_delayed_threads)? $sql_conf[0]->max_delayed_threads : "";
789
  $sql_engine = isset($sql_conf[0]->storage_engine)? $sql_conf[0]->storage_engine : "";
790
+ $sql_concurrent_insert=(isset($sql_conf[0]->concurrent_insert)? $sql_conf[0]->concurrent_insert:"");
791
  if ($wdebug_mode) {
792
  echo "\n<!-- MySQL variables \$sql_conf:";
793
  print_r($sql_conf);
831
  $sql_engine = $var->Value;
832
  } elseif (empty($sql_engine) && $var->Variable_name == "table_type") {
833
  $sql_engine = $var->Value;
834
+ }elseif(empty($sql_concurrent_insert) && $var->Variable_name=="concurrent_insert"){
835
+ $sql_concurrent_insert=$var->Value;
836
  }
837
  }
838
  if ($wdebug_mode) {
864
  <li><strong>MySQL <?php _e('Max User Connections','wassup'); ?></strong>: <?php
865
  if(isset($sql_max_connections) && is_numeric($sql_max_connections)){
866
  if($sql_max_connections >0){
867
+ if($sql_max_connections < 32){
868
+ if($sql_max_connections < 16) echo '<span class="alertstyle">'.$sql_max_connections.'</span>';
869
+ else echo '<span class="noticestyle">'.$sql_max_connections.'</span>';
870
+ echo ' ('.__("possibly too small","wassup").')';
871
+ }else{
872
+ echo (int)$sql_max_connections;
873
+ }
874
  }else{
875
  echo __("unlimited/up to server maximum","wassup");
876
  }
877
  } else {
878
  _e("unknown","wassup");
879
  }?></li>
880
+ <li><strong>MySQL Query Cache <?php _e('Allocation','wassup'); ?></strong>: <?php
881
  if (preg_match('/^(on|yes|1|true)$/i',$sql_query_cache_enabled)>0) {
882
  if (is_numeric($sql_query_cache) && (int)$sql_query_cache >0) {
883
  $cache_size = round((int)$sql_query_cache/1024/1024);
884
  if ($cache_size >256) {
885
  if ($sql_cache_type != "2" && stristr($sql_cache_type,'demand')===false)
886
+ echo '<span class="noticestyle">'.$cache_size.'M </span> ('.__("possibly too big, reduces available RAM.","wassup").')';
887
  else
888
  echo $cache_size.'M';
889
  } else {
900
  } else {
901
  _e("disabled","wassup");
902
  } ?></li>
903
+ <li><strong>MySQL Index Buffer</strong>: <?php
904
  if (empty($table_engine) || stristr($table_engine,"myisam")!==false) {
905
  //key_buffer is MyISAM parameter only
906
 
907
  if (is_numeric($sql_indexbuffer)) {
908
  if ((int)$sql_indexbuffer >0)
909
+ echo (round((int)$sql_indexbuffer/1024/1024)) . "M (key_buffer)";
910
  else
911
  echo $sql_indexbuffer." (".__("disabled","wassup").")";
912
  } else {
916
  //InnoDB uses "innodb_buffer_pool_size"
917
  if (is_numeric($sql_buffersize)) {
918
  if ((int)$sql_buffersize >0)
919
+ echo (round((int)$sql_buffersize/1024/1024)) . "M (innodb_buffer_pool_size)";
920
  else
921
  echo $sql_buffersize." (".__("disabled","wassup").")";
922
  } else {
930
  } else {
931
  _e("unknown","wassup");
932
  } ?></li>
933
+ <li><strong>MySQL Read Buffer</strong>: <?php
934
  if (is_numeric($sql_readbuffer)) {
935
  if ((int)$sql_readbuffer >0) {
936
  echo (round((int)$sql_readbuffer/1024/1024)) . "M";
940
  } else {
941
  _e("unknown","wassup");
942
  } ?></li>
943
+ <li><strong>MySQL <?php _e("Wait Timeout","wassup"); ?></strong>: <?php
944
+ if (is_numeric($sql_wait_timeout)) {
945
+ echo $sql_wait_timeout." ".__("seconds","wassup");
946
+ } else {
947
+ _e("unknown","wassup");
948
+ }
949
+ ?></li>
950
+ <li><strong>MySQL Concurrent Insert</strong>: <?php
951
+ if(empty($sql_concurrent_insert) || $sql_concurrent_insert=="NEVER"){
952
+ echo __("off","wassup");
953
+ }else{
954
+ echo __("on","wassup");
955
+ }?></li>
956
+ <li><strong>MySQL Delayed Insert</strong><?php
957
  if (empty($table_engine) || stristr($table_engine,"isam")!==false) {
958
  if (!is_numeric($sql_delayed_queue) || (int)$sql_delayed_queue == 0 || (int)$sql_delayed_threads == 0) {
959
+ echo ': '.__("disabled","wassup");
960
+ }elseif(is_numeric($sql_delayed_threads) && (int)$sql_delayed_threads >0){
961
+ echo ' <strong>Queue</strong>: ';
962
  echo (int)$sql_delayed_queue ." ".__("rows","wassup");
963
  if (isset($sql_delayed_timeout)) {
964
+ echo "</li>\n\t\t<li><strong>MySQL Delayed Handler Timeout</strong>: ";
965
  if ((int)$sql_delayed_timeout >60)
966
  echo ($sql_delayed_timeout/60)." ".__("minutes");
967
  elseif ((int)$sql_delayed_timeout >25)
968
  echo $sql_delayed_timeout." ".__("seconds");
969
  else
970
+ echo '<span class="alertstyle">'.$sql_delayed_timeout.'</span> '.("seconds");
971
  }
972
  } else {
973
+ echo ' <strong>Queue</strong>: '.__("unknown","wassup");
974
  }
975
  } else {
976
+ if(stristr($table_engine,"innodb")!==false) echo ': '.__("not available","wassup");
977
+ elseif(!is_numeric($sql_delayed_queue) || (int)$sql_delayed_queue == 0) echo ': '.__("disabled","wassup");
978
+ else echo ' <strong>Queue</strong>: '.__("unknown","wassup");
 
 
 
979
  } ?></li>
 
 
 
 
 
 
 
980
  <li><strong>MySQL <?php _e('Timezone'); ?></strong>: <?php
981
+ if(empty($sql_timezone)) $sql_timezone="SYSTEM";
982
+ $mysqloffset=false;
983
+ if($sql_timezone == "SYSTEM" && !empty($host_timezone)){
984
  if (is_array($host_timezone)) {
985
+ $mysql_tz=$host_timezone[0];
986
+ if(isset($host_timezone[1])) $mysqloffset=($host_timezone[1])/3600;
987
  } else {
988
  $mysql_tz = $host_timezone;
989
  }
990
  } else {
991
  $mysql_tz = wassupDb::get_db_setting('timezone');
992
  }
993
+ if($mysqloffset===false){
994
+ $mysqloffset = wassupDb::get_db_setting('tzoffset');
995
+ }
996
+ if($mysqloffset !== false){
997
+ if($sql_timezone != $mysql_tz) echo $sql_timezone.' ('.$mysql_tz.' UTC '.wassupDb::format_tzoffset($mysqloffset).')';
998
+ else echo $sql_timezone.' (UTC '.wassupDb::format_tzoffset($mysqloffset).')';
999
+ }else{
1000
+ echo $sql_timezone;
1001
  }
1002
  if (version_compare($wp_version,'2.8.3','>='))
1003
  echo ' <small> ('.__("may be different from PHP offset","wassup").')</small>';
1005
  </ul>
1006
  <br />
1007
  </div><!-- /sysinfo -->
1008
+ <p class="opt-prev-next"><a href="<?php echo $options_link.'&tab=2';?>"><?php echo '&larr;'.__("Prev","wassup");?></a> &nbsp; &nbsp; <a href="<?php if($has_uninstall_tab) echo $options_link.'&tab=4';else echo $options_link.'&tab=faq';?>"><?php echo __("Next","wassup").'&rarr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br />
 
1009
  </div>
1010
  <?php
1011
  if($has_uninstall_tab){?>
1014
  <p><?php _e('No problem. Before you deactivate this plugin, check the box below to cleanup any data that was collected by WassUp that could be left behind.', 'wassup') ;?></p><br />
1015
  <p><input type="checkbox" name="wassup_uninstall" value="1" <?php if ($wassup_options->wassup_uninstall == 1 ) echo 'checked="CHECKED"'; ?> /> <strong><?php _e('Permanently remove WassUp data and settings.','wassup'); ?></strong></p>
1016
  <?php if ($wassup_options->wassup_uninstall == 1) { ?>
1017
+ <span class="alertstyle" style="font-size:95%;font-weight:bold;margin-left:20px;"><span style="text-decoration:blink;padding-left:5px;"><?php _e("WARNING","wassup");?>! </span><?php _e("All WassUp data and settings will be DELETED upon deactivation of this plugin.","wassup");?></span><br />
1018
  <?php } ?>
1019
  <p><?php echo sprintf(__("This action cannot be undone. Before uninstalling WassUp, you should backup your Wordpress database first. WassUp data is stored in the table %s.", "wassup"),'<strong>'.$wassup_options->wassup_table.'</strong>');?></p>
1020
 
1021
  <br /><p><?php echo sprintf(__("To help improve this plugin, we would appreciate your feedback at %s.","wassup"),'<a href="http://www.wpwp.org">www.wpwp.org</a>');?></p>
1022
  <br /><br />
1023
  <p class="submit"><input type="submit" name="submit-options4" id="submit-options4" class="submit-opt button button-left button-primary" value="<?php _e('Save Settings','wassup');?>" onclick="jQuery('#submit-options4').val('Saving...');"/>&nbsp;<input type="reset" name="reset" value="<?php _e('Reset','wassup');?>" class="reset-opt button button-secondary" /> - <input type="submit" name="reset-to-default" class="default-opt button button-caution wassup-button" value="<?php _e("Reset to Default", "wassup");?>" /></p>
1024
+ <p class="opt-prev-next"><a href="<?php echo $options_link.'&tab=3';?>"><?php echo '&larr;'.__("Prev","wassup");?></a> &nbsp; &nbsp; <a href="<?php echo $options_link.'&tab=faq';?>"><?php echo __("Next","wassup").'&larr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br />
1025
  </div><?php
1026
  } //if has_uninstall_tab
1027
  ?>
1036
  <strong>A:</strong> <span class="faq-answer"><?php echo __("Yes. Insert the template tag \"wassup_sidebar()\" into your theme's \"sidebar.php\" file to display Wassup widgets as a single combined widget on your site.","wassup");?></span></li>
1037
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("How do I view the real-time visitor geolocation map in WassUp?","wassup");?></span><br/>
1038
  <strong>A:</strong> <span class="faq-answer"><?php echo sprintf(__("Check the box for \"Display a GEO IP Map in spy visitors view\" in %s tab and save, then navigate to %s panel to see the map.","wassup"),'<span class="code">WassUp >> '.__("Options","wassup").' >><nobr>['.__("General Setup","wassup").']</nobr></span>','<span class="code">WassUp >><nobr>'.__("SPY Visitors","wassup").'</nobr></span>');?></span></li>
1039
+ <li><strong>Q:</strong> <span class="faq-question"><?php echo __("The map has vanished and I get a message like: \"Google has disabled use of the Maps API for this application\". How do I fix this?","wassup");?></span><br/>
1040
+ <strong>A:</strong> <span class="faq-answer"><?php echo __("Wassup-spy total daily map views has likely exceeded the Google!maps usage limit for Wassup plugin.","wassup").' ';
1041
+ echo sprintf(__("To fix, sign up for a free %s for your site's sole usage and enter the key under \"Spy Visitors settings\" in %s tab.","wassup"),'<a href="'.$GMapsAPI_signup.'">Google!Maps API '.__("Key","wassup").'</a>','<span class="code">WassUp >>'.__("Options","wassup").' >><nobr>['.__("General Setup","wassup").']</nobr></span>');?></span></li>
1042
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("How do I exclude a visitor from being recorded?","wassup");?></span><br/>
1043
  <strong>A:</strong> <span class="faq-answer"><?php echo sprintf(__("Navigate to %s tab and enter a visitor's username, IP address, or hostname into the appropriate text area for that \"Recording Exclusion\" type.","wassup"),'<span class="code">WassUp >>'.__("Options","wassup").' >><nobr>['.__("Filters & Exclusions","wassup").']</nobr></span>');?></span></li>
1044
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("How do I stop (temporarily) WassUp from recording new visits on my site?","wassup");?></span><br/>
1061
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("Is there any caching plugin that works with WassUp?","wassup");?></span><br/>
1062
  <strong>A:</strong> <span class="faq-answer"><?php echo sprintf(__("%s is the only caching plugin verified to work with WassUp.","wassup"),'<a href="http://wordpress.org/extend/plugins/wp-widget-cache/">WP Widget Cache</a>');?></span></li>
1063
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("How can I make Wassup run faster?","wassup");?></span><br/>
1064
+ <strong>A #1:</strong> <span class="faq-answer"><?php echo sprintf(__("Keep Wassup table size small by setting automatic delete of old records or do manual delete periodically under %s tab.","wassup"),'<span class="code">WassUp >>'.__("Options","wassup").' >><nobr>['.__("Manage File & Data","wassup").']</nobr></span>');?></span><br/>
1065
  <strong>A #2:</strong> <span class="faq-answer"><?php echo __("If using the \"Top Stats\" widget on your site, set refresh frequency to 15 minutes or higher.","wassup");?></span><br/>
1066
  <strong>A #3:</strong> <span class="faq-answer"><?php echo sprintf(__("Reduce the number of recording exclusions (by ip/hostname/username/url) under %s tab.","wassup"),'<span class="code">WassUp >>'.__("Options","wassup").' >><nobr>['.__("Filters & Exclusions","wassup").']</nobr></span>');?></span><br/>
1067
  <strong>A #4:</strong> <span class="faq-answer"><?php
1068
+ $files='<span class="code"> akismet.class.php</span>';
1069
+ echo sprintf(__("Delete the file(s) %s from the plugin subfolder 'lib' to stop Wassup from doing remote server queries for spam identification.","wassup"),$files);?></span><br/>
1070
+ <strong>A #5:</strong> <span class="faq-answer"><?php echo sprintf(__("As a last resort, stop all spam/malware detection on new hits by unchecking \"Enable Spam and malware detection on records\" under %s tab.","wassup"),'<span class="code">WassUp >>'.__("Options","wassup").' >><nobr>['.__("General Setup","wassup").']</nobr></span>');?></span></li>
1071
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("Why does WassUp stats sometimes show more page views than actual pages clicked by a person?","wassup");?></span><br/>
1072
  <strong>A:</strong> <span class="faq-answer"><?php echo __("\"Phantom\" page views can occur when a user's browser does automatic feed retrieval, link pre-fetching, a page refresh, or automatically adds your website to it's \"Top sites\" window (Safari). WassUp tracks these because they are valid requests from the browser and are sometimes indistinguishable from user link clicks.","wassup");?></span></li>
1073
  <li><strong>Q:</strong> <span class="faq-question"><?php echo __("How do I upgrade WassUp safely when my site has frequent visitors?","wassup");?></span><br/>
1082
  </ol>
1083
  <p class="legend"><?php echo sprintf(__("Visit the %s to find more answers to your WassUp questions.","wassup"),'<a href="http://wordpress.org/support/plugin/wassup">'.__("Plugin Forum","wassup").'</a>');?></p>
1084
  <br />
1085
+ <p class="opt-prev-next"><a href="<?php if($has_uninstall_tab) echo $options_link.'&tab=4';else echo $options_link.'&tab=3';?>"><?php echo '&larr;'.__("Prev","wassup");?></a> &nbsp; &nbsp; <a href="<?php echo $options_link.'&tab=donate';?>"><?php echo __("Next","wassup").'&rarr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br />
1086
  </div>
1087
  <div id="wassup_opt_frag-6" class="optionspanel donatepanel<?php if($tab=="donate" || $tab=="6") echo ' tabselected';?>">
1088
  <h3><?php _e("How you can donate","wassup"); ?></h3>
1102
  if (file_exists(WASSUPDIR."/lib/donate.php")) include_once(WASSUPDIR."/lib/donate.php");?>
1103
  </div>
1104
  <br />
1105
+ <p class="opt-prev-next"><a href="<?php echo $options_link.'&tab=faq';?>"><?php echo '&larr;'.__("Prev","wassup");?></a> &nbsp; &nbsp; <a href="<?php echo $options_link.'&tab=1';?>"><?php echo __("Next","wassup").'&rarr;';?></a> &nbsp; &nbsp; <a href="#wassupsettings" onclick="wScrollTop();return false;"><?php echo __("Top","wassup").'&uarr;';?></a></p><br />
1106
  </div>
1107
  </div><!-- /#tabcontainer -->
1108
  </form>
lib/uadetector.class.php CHANGED
@@ -1,152 +1,1451 @@
1
  <?php
2
  /**
3
- * A PHP4 class for browser and spider identification
4
- *
5
- * @package WassUp Real-time Analytics
6
- * @subpackage wassup.class.php module
7
- * @version 0.9b10
8
- * @author Helene Duncker
9
  * Author URI: http://helenesit.com
10
- * Updated: 2015-08-22
11
  *
12
- * @copyright Copyright (c) 2009-2015 Helene Duncker
13
- * @license http://www.gnu.org/licenses/gpl-2.0.html
14
- * Released under the GNU General Public License GPLv2 or later
15
- * Disclaimer:
16
  * This program is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
  * See the GNU General Public License for more details.
20
- */
21
- /* ------------------------------------------------
22
  * USAGE: include_once(uadetector.class.php);
23
  * $useragent = new UADetector(); //returns object(16)
24
  *
25
- * Note: UADetector attempts to find the actual browser in use. This may cause the "name" field to differ from "emulation" field when user-agent "spoofing" is detected. Use the appropriate field for your application type:
26
- * a) "Name" field is best for information and statistics only.
27
- * b) "Emulation" field is best for UI and customizations by browser type.
28
- * ------------------------------------------------
29
- */
30
- if(!defined('ABSPATH')||empty($GLOBALS['wp_version'])){header("Location: /");exit;}
31
- $uafile=preg_replace('/\\\\/','/',__FILE__);
32
- if(preg_match('#'.preg_quote(basename($uafile)).'#',$_SERVER['PHP_SELF'])){header("Location: /");exit;}elseif(!empty($_SERVER['SCRIPT_FILENAME'])&& realpath($uafile)===realpath($_SERVER['SCRIPT_FILENAME'])){header("Location: /");exit;}
33
- unset($uafile);
34
- class UADetector{var $name='';var $version='';var $os='';var $platform='';var $emulation='';var $language='';var $device='';var $model='';var $resolution='';var $subscribers='';var $is_mobile=false;var $is_browser=false;var $is_robot=false;var $is_spammer=false;var $agent='';var $agenttype='';
35
- function uadetector($ua=""){$this->is_browser=false;$this->is_mobile=false;$this->is_robot=false;$this->is_spammer=false;$this->_done_browsers=false;$this->_done_spiders=false;$this->is_active_agent=false;if(empty($ua)){$this->setDeviceUA();$ua=$this->agent;$this->is_active_agent=true;}else{$ua=trim($ua);$this->agent=$ua;}if(!$this->isValidAgent($ua)&& empty($this->name)){$this->isUnknownAgent($ua);}else{if($this->isTopAgent()===false){if($this->isBrowserAgent()===false){if($this->isSpiderAgent()===false){$this->isWTF();}}}}if($this->agenttype=="B")$this->is_browser=true;elseif($this->agenttype=="R")$this->is_robot=true;elseif($this->agenttype=="S")$this->is_spammer=true;if(empty($this->is_mobile)&& $this->platform=="WAP")$this->is_mobile=true;if(empty($this->emulation))$this->setEmulation();unset($this->_done_browsers,$this->_done_spiders,$this->is_active_agent);return;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  function isTopAgent($agent=""){
37
- $ua="";$is_current_ua=false;if(empty($agent))list($ua,$is_current_ua)=$this->isCurrentAgent();else $ua=$agent;if(empty($ua))return false;$os="";$top_ua=array('name'=>"",'version'=>"",'os'=>"",'platform'=>"",'language'=>"",'agenttype'=>"",'resolution'=>"");
38
- if(preg_match("#^Mozilla/\d\.\d\s\(compatible;\sGooglebot/(\d\.\d);[\s\+]+http\://www\.google\.com/bot\.html\)$#i",$ua,$match)>0){$top_ua['name']="Googlebot";$top_ua['version']=$match[1];$top_ua['agenttype']="R";
39
- }elseif(preg_match('#^Mozilla/\d\.\d\s\((Windows\sNT\s\d+\.\d(?:;\sW[inOW]{2}64)?)\)\sAppleWebKit\/\d+\.\d+\s\(KHTML,\slike\sGecko\)\sChrome\/[0-9\.]+\sSafari\/[0-9\.]+\sEdge\/([0-9\.]+)$#',$ua,$match)>0){$top_ua['name']='IE';if($match[2]=="12.0")$top_ua['version']=11;$top_ua['platform']='Windows';$os=$match[1];$top_ua['os']=$this->winOSversion($os);$top_ua['agenttype']='B';
40
- }elseif(preg_match('#^Mozilla/\d\.\d\s\((Windows\sNT\s\d\.\d(?:;\sARM|;\sW[inOW]{2}64)?)(?:;\sx64)?;?\sTrident/[0-9\.]+;(?:\s[0-9A-Za-z\.;]+;){0,}\srv\:([0-9\.]+)\)\slike\sGecko(?:,gzip\(gfe\))?$#',$ua,$match)>0){$top_ua['name']='IE';$top_ua['version']=$match[2];$top_ua['platform']='Windows';$os=$match[1];$top_ua['os']=$this->winOSversion($os);$top_ua['agenttype']='B';
41
- }elseif(preg_match('#^Mozilla/\d\.\d\s\(compatible;\sMSIE\s(\d+)(?:\.\d+)+;\s(Windows\sNT\s\d\.\d(?:;\sW[inOW]{2}64)?)(?:;\sx64)?;?(?:\sSLCC1;?|\sSV1;?|\sGTB\d;|\sTrident/\d\.\d;|\sFunWebProducts;?|\s\.NET\sCLR\s[0-9\.]+;?|\s(Media\sCenter\sPC|Tablet\sPC)\s\d\.\d;?|\sInfoPath\.\d;?)*\)$#',$ua,$match)>0){$top_ua['name']='IE';$top_ua['version']=$match[1];$top_ua['platform']='Windows';$os=$match[2];$top_ua['os']=$this->winOSversion($os);$top_ua['agenttype']='B';if(!empty($match[3]))$top_ua['device']=$match[3];
42
- }elseif(preg_match('#^Mozilla/\d\.\d\s\((Windows\sNT\s\d\.\d;(?:\sW[inOW]{2}64;)?)\srv\:[0-9\.]+\)\sGecko/[0-9a-z]+\s([A-Za-z\-0-9]+)/(\d+(?:\.\d+)+)(?:\s\(.*\))?$#',$ua,$match)>0){$top_ua['name']=$match[2];$top_ua['version']=$match[3];$top_ua['platform']="Windows";$os=$match[1];$top_ua['os']=$this->winOSversion($os);$top_ua['agenttype']='B';
43
- }elseif(preg_match('#^Mozilla/\d\.\d\s\(Windows;\sU;\s(.+);\s([a-z]{2}(?:\-[A-Za-z]{2})?);\srv\:\d(?:\.\d+)+\)\sGecko/\d+\s([A-Za-z\-0-9]+)/(\d+(?:\.\d+)+)(?:\s\(.*\))?$#',$ua,$match)>0){$top_ua['name']=$match[3];$top_ua['version']=$match[4];$top_ua['language']=$match[2];$top_ua['platform']="Windows";$os=$match[1];$top_ua['os']=$this->winOSversion($os);$top_ua['agenttype']='B';
44
- }elseif(preg_match('#^Mozilla/\d\.\d\s\(compatible;\s(Yahoo\!\s([A-Z]{2})?\s?Slurp)/?(\d\.\d)?;\shttp\://help\.yahoo\.com/.*\)$#i',$ua,$match)>0){$top_ua['name']=$match[1];if(!empty($match[3]))$top_ua['version']=$match[3];if(!empty($match[2]))$top_ua['language']=$match[2];$top_ua['agenttype']='R';
45
- }elseif(preg_match('#^Mozilla/\d\.\d\s\(compatible;\sbingbot/(\d\.\d)[^a-z0-9]+http\://www\.bing\.com/bingbot\.htm.$#',$ua,$match)>0){$top_ua['name']='BingBot';if(!empty($match[1]))$top_ua['name'].=$match[1];if(!empty($match[2]))$top_ua['version']=$match[2];$top_ua['agenttype']='R';
46
- }elseif(preg_match('#^FeedBurner/(\d\.\d)\s\(http\://www\.FeedBurner\.com\)$#',$ua,$match)>0){$top_ua['name']='FeedBurner';$top_ua['version']=$match[1];$top_ua['agenttype']='F';
47
- }elseif(preg_match('#^WordPress/(?:wordpress(\-mu)\-)?(\d\.\d+)(?:\.\d+)*(?:\-[a-z]+)?(?:\;\shttp\://[a-z0-9_\.\:\/]+)?$#',$ua,$match)>0){$top_ua['name']='Wordpress';if(!empty($match[1]))$top_ua['name']=$top_ua['name'].$match[1];$top_ua['version']=$match[2];$top_ua['agenttype']='U';
48
- }elseif(preg_match('#^Mozilla/\d\.\d\s\((Macintosh|X11|OS/2);\sU;\s(.+);\s([a-z]{2}(?:\-[A-Za-z]{2})?)(?:-mac)?;\srv\:\d(?:.\d+)+\)\sGecko/\d+\s([A-Za-z\-0-9]+)/(\d+(?:\.[0-9a-z\-\.]+))+(?:(\s\(.*\))(?:\s([A-Za-z\-0-9]+)/(\d+(?:\.\d+)+)))?$#',$ua,$match)>0){$top_ua['name']=$match[4];$top_ua['version']=$match[5];$top_ua['language']=$match[3];$top_ua['platform']=$match[1];$os=$match[2];if(!empty($match[7])){$top_ua['name']=$match[7];$top_ua['version']=$match[8];$os=$os." ".$match[4]." ".$match[5];}elseif(!empty($match[6])){$os=$os.$match[6];}list($top_ua['os'])=$this->OSversion($os,$top_ua['platform'],$ua);$top_ua['agenttype']='B';
49
- }elseif(preg_match('#^Mozilla/\d\.\d\s\(([A-Za-z0-9/\.]+);(?:\sU;)?\s([A-Za-z0-9_\s]+);?\s?([a-z]{2}(?:\-[A-Za-z]{2})?)?\)\sAppleWebKit/[0-9\.]+\+?\s\((?:KHTML,\s)?like\sGecko\)(?:\s([a-zA-Z0-9\./]+(?:\sMobile)?)/?[A-Z0-9]*)?\sSafari/([0-9\.]+)$#',$ua,$match)>0){$top_ua['name']='Safari';if(!empty($match[4]))$vers=$match[4];else $vers=$match[5];$browser=$this->webkitVersion($vers,$ua);if(!empty($browser)&& is_array($browser)){$top_ua['name']=$browser['name'];$top_ua['version']=$browser['version'];}if(empty($match[2])){$os=$match[1];}else{$top_ua['platform']=$match[1];$os=$match[2];}if($top_ua['platform']=='Windows')$top_ua['os']=$this->winOSversion($os);else list($top_ua['os'])=$this->OSversion($os,$top_ua['platform'],$ua);$top_ua['language']=$match[3];$top_ua['agenttype']='B';
50
- }elseif(preg_match('#^Mozilla/\d+\.\d+\s(?:[A-Za-z0-9\./]+\s)?\((?:([A-Za-z0-9/\.]+);(?:\sU;)?\s?)?([^;]*)(?:;\s[A-Za-z]{3}64)?;?\s?([a-z]{2}(?:\-[A-Za-z]{2})?)?\)\sAppleWebKit/[0-9\.]+\+?\s\((?:KHTML,\s)?like\sGecko\)(?:\s([A-Za-z0-9_\-]+[^i])/([A-Za-z0-9\.]+)){1,3}(?:\sSafari/[0-9\.]+)?$#',$ua,$match)>0){$top_ua['name']=$match[4];$top_ua['version']=$match[5];if(empty($match[2])){$os=$match[1];}else{$top_ua['platform']=$match[1];$os=$match[2];}if($top_ua['platform']=='Windows')$top_ua['os']=$this->winOSversion($os);else list($top_ua['os'])=$this->OSversion($os,$top_ua['platform'],$ua);if(!empty($match[3]))$top_ua['language']=$match[3];$top_ua['agenttype']='B';}
51
- if($is_current_ua){list($name,$os,$platform,$resolution,$uatype)=$this->getHeaderData();if(!empty($name)){$top_ua['name']=$name;if(!empty($uatype))$top_ua['agenttype']=$uatype;}if(!empty($os))$top_ua['os']=$os;if(!empty($resolution))$top_ua['resolution']=$resolution;}
52
- if(!empty($top_ua['name'])){if(empty($agent))$this->setClassVars($top_ua);}else{$top_ua=false;}return $top_ua;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  function isBrowserAgent($agent=""){
54
- $ua="";$is_current_ua=false;if(empty($agent))list($ua,$is_current_ua)=$this->isCurrentAgent();else $ua=$agent;if(empty($ua))return false;$browser=array('name'=>"",'version'=>"",'os'=>"",'platform'=>"",'language'=>"",'agenttype'=>"B",'resolution'=>"",'device'=>"",'model'=>"",'emulation'=>"");
55
- if(isset($this->_done_spiders)&& !$this->_done_spiders && preg_match('#(robot|bot[\s\-_\/\)]|bot$|blog|checker|crawl|feed|fetcher|libwww|[^\.e]link\s?|parser|reader|spider|verifier|href|https?\://|.+(?:\@|\s?at\s?)[a-z0-9_\-]+(?:\.|\s?dot\s?)|www[0-9]?\.[a-z0-9_\-]+\..+|\/.+\.(s?html?|aspx?|php5?|cgi))#i',$ua)>0){if(preg_match('#(embedded\s?(WB|Web\sbrowser)|dynaweb|bsalsa\.com|muuk\.co|translat[eo]r?)#i',$ua)==0)return false;}
56
- $ismobile=false;$wap=$this->isMobileAgent($ua);if(!empty($wap)&& is_array($wap)){$ismobile=true;$browser['name']=$wap['name'];$browser['version']=$wap['version'];$browser['device']=$wap['device'];$browser['model']=$wap['model'];$browser['os']=$wap['os'];$browser['platform']="WAP";if(!empty($wap['language']))$browser['language']=$wap['language'];}
57
- if(!$ismobile || empty($browser['name'])){$iestring="";if(strstr($ua,' Gecko/')==false && preg_match('#^Mozilla\/\d\.\d\s\((Windows\sNT\s\d\.\d;(?:\s[0-9A-Za-z./]+;)+)\srv\:([0-9\.]+)\)\s?(.*)#',$ua,$pcs)>0){$browser['name']='IE';$browser['version']=$pcs[2];$browser['emulation']=rtrim('IE'." ".$this->majorVersion($pcs[1]));$browser['os']=$this->winOSversion($pcs[1]);$iestring=$pcs[3];}elseif(preg_match('/compatible(?:\;|\,|\s)+MSIE\s(\d+)(\.\d+)+(.*)/',$ua,$pcs)>0){$browser['name']='IE';$browser['version']=$pcs[1];$browser['emulation']=rtrim('IE'." ".$this->majorVersion($pcs[1]));$iestring=$pcs[3];}if(!empty($iestring)){if(preg_match('/\s(AOL|America\sOnline\sBrowser)\s(\d+(\.\d+)*)/',$iestring,$pcs)>0){$browser['name']='AOL';$browser['version']=$pcs[2];}elseif(preg_match('#\s(Opera|Netscape|Crazy\sBrowser)/?\s?(\d+(?:\.\d+)*)#',$iestring,$pcs)>0){$browser['name']=$pcs[1];$browser['version']=$pcs[2];}elseif(preg_match('/\s(Avant|Orca)\sBrowser;/',$iestring,$pcs)>0){$browser['name']=$pcs[1];$browser['version']="";}elseif(preg_match('/Windows\sCE;\s?IEMobile\s(\d+)(\.\d+)*\)/i',$iestring,$pcs)>0){$browser['name']='IEMobile';$browser['version']=$pcs[1];$browser['os']='WinCE';$browser['platform']='WAP';$ismobile=true;}elseif(preg_match('#\s(\d+x\d+)?\;?\s?(?:WebTV|MSNTV)(?:/|\s)([0-9\.]+)*#i',$iestring,$pcs)>0){$browser['name']="MSNTV";$browser['version']=$pcs[2];$browser['platform']='Embedded';$browser['device']='TV';if(!empty($pcs[1]))$browser['resolution']=$pcs[1];}}}
58
- if(empty($browser['name'])||(!$ismobile && $browser['name']!="IE")){if(preg_match('#Opera[/ ]([0-9\.]+)#',$ua,$pcs)>0){$browser['name']='Opera';$browser['version']=$pcs[1];}elseif(preg_match('#[^a-z](Camino|Flock|Galeon|Orca)/(\d+[\.0-9a-z]*)#',$ua,$pcs)>0){$browser['name']=$pcs[1];$browser['version']=$pcs[2];}elseif(preg_match('#Gecko/\d+\s([a-z0-9_\- ]+)/(\d+[\.0-9a-z]*)(?:$|[^a-z0-9_\-]+([a-z0-9_\- ]+)/(\d+[\.0-9a-z]*)|[^a-z0-9_\-]*\(.*\))#i',$ua,$pcs)>0){$browser['name']=$pcs[1];$browser['version']=$pcs[2];if(!empty($pcs[3])&& stristr($pcs[3],"Firefox")!==false){$browser['name']='Firefox';$browser['version']=$pcs[4];}}elseif(preg_match('#[^a-z](Fire(?:fox|bird))/?(\d+[\.0-9a-z]*)?#',$ua,$pcs)>0){$browser['name']=$pcs[1];if(!empty($pcs[2]))$browser['version']=$pcs[2];}elseif(preg_match('/^Mozilla\/\d\.\d.+\srv\:(\d[\.0-9a-z]+)[^a-z0-9]+(?:Gecko\/\d+)?$/i',$ua,$pcs)>0){$browser['name']='Mozilla';if(!empty($pcs[1]))$browser['version']=$pcs[1];}elseif(preg_match('#^Mozilla/\d\.\d\s\((?:([a-z]{3,}.*\s)?([a-z]{2}(?:\-[A-Za-z]{2})?)?)\)\sAppleWebKit/[0-9\.]+\+?\s\([a-z, ]*like\sGecko[a-z\; ]*\)\s([a-zA-Z0-9\./]+(?:\sMobile)?/?[A-Z0-9]*)?(\sSafari/([0-9\.]+))?$#',$ua,$pcs)>0){if(!empty($pcs[3]))$vers=$pcs[3];else $vers=$pcs[5];$webkit=$this->webkitVersion($vers,$ua);if(!empty($webkit['name'])){$browser['name']=$webkit['name'];$browser['version']=$webkit['version'];}if(!empty($pcs[2]))$browser['language']=$pcs[2];}elseif(preg_match("#^(E?Links|Lynx|(?:Emacs\-)?w3m)[^a-z0-9]+([0-9\.]+)?#i",$ua,$pcs)){$browser['name']=$pcs[1];if(!empty($pcs[2]))$browser['version']=$pcs[2];}elseif(preg_match("#(?:^|[^a-z0-9])(ActiveWorlds|Dillo|OffByOne)[/\sv\.]*([0-9\.]+)?#i",$ua,$pcs)){$browser['name']=$pcs[1];if(!empty($pcs[2]))$browser['version']=$pcs[2];else $browser['version']="";}if(empty($browser['name'])){if(preg_match("#([a-z0-9]+)[\- _\.]Browser[/ v\.]*([0-9\.]+)?#i",$ua,$pcs)){$browser['name']=$pcs[1];if(!empty($pcs[2]))$browser['version']=$pcs[2];else $browser['version']="";}elseif(preg_match("#^([a-z]+[\s_]?[a-z]*)[\-/]?([0-9\.]+)*$#",$ua,$pcs)>0){$browser['name']=trim($pcs[1]);if(!empty($pcs[2]))$browser['version']=$pcs[2];if(empty($browser['os'])&& $browser['platform']!="WAP" && stristr($pcs[1],'mozilla')===false)$browser['agenttype']="R";}}}
59
- if(empty($browser['os'])&& !empty($browser['name'])&& $browser['agenttype']=="B"){list($browser['os'],$platform)=$this->OSversion('',$browser['platform'],$ua);if(!empty($platform)&& empty($browser['platform']))$browser['platform']=$platform;}
60
- if($is_current_ua){list($name,$os,$platform,$resolution,$uatype)=$this->getHeaderData();if(!empty($name)){$browser['name']=$name;if(!empty($uatype))$browser['agenttype']=$uatype;}if(!empty($os))$browser['os']=$os;if(!empty($resolution))$browser['resolution']=$resolution;}
61
- if($browser['agenttype']=="B" && empty($browser['language'])){$browser['language']=$this->detectLanguage($ua);if(!empty($browser['resolution'])){if(!empty($wap)|| $browser['platform']=='WAP')$browser['resolution']=$this->detectResolution($ua,'WAP');else $browser['resolution']=$this->detectResolution($ua);}}
62
- if($this->isSpammer($ua)!==false){if(function_exists('__'))$browser['name']=__("Script Injection Bot");else $browser['name']="Script Injection Bot";$browser['agenttype']="S";}
63
- if(!empty($browser['name'])){$browser['name']=rtrim($browser['name'],'_- ');if(empty($agent)){$this->setClassVars($browser);if($ismobile || $browser['platform']=='WAP' || strstr($browser['name'],' Mobile')!==false || strstr($browser['name'],' Mini')!==false){$this->is_mobile=true;}}}else{$browser=false;}
64
- $this->_done_browsers=true;return $browser;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  function isMobileAgent($agent=""){
66
- $ua="";$is_current_ua=false;if(empty($agent))list($ua,$is_current_ua)=$this->isCurrentAgent($agent);else $ua=$agent;if(empty($ua))return false;$ismobile=false;$wap=array('name'=>"",'version'=>"",'device'=>"",'model'=>"",'os'=>"",'platform'=>"WAP");
67
- if(preg_match("#^(?:([a-z0-9\-\s_]{3,})\s)?Mozilla/\d\.\d\s\([a-z\;\s]+Android\s([0-9\.]+)(?:\;\s([a-z]{2}(?:\-[A-Za-z]{2})?)\;)?.*Gecko\)\s([a-zA-Z0-9\./]+(?:\sMobile)?/?[A-Z0-9]*)?(\sSafari/([0-9\.]+))?#i",$ua,$pcs)){if(!empty($pcs[4]))$vers=$pcs[4];else $vers=$pcs[6];$webkit=$this->webkitVersion($vers,$ua);if(!empty($webkit['name'])){$wap['name']=$webkit['name'];$wap['version']=$webkit['version'];}$wap['os']="Android";if(!empty($pcs[2]))$wap['os'] .=" ".$this->majorVersion($pcs[2]);if(!empty($pcs[3]))$wap['language']=$pcs[3];if(!empty($pcs[1]))$wap['device']=$pcs[1];}elseif(preg_match('#Windows\sCE;\s?IEMobile\s(\d+)(\.\d+)*\)#i',$ua,$pcs)>0){$wap['name']='IEMobile';$wap['version']=$pcs[1];$wap['os']='WinCE';}elseif(preg_match('#(Opera\s(?:Mini|Mobile))[/ ]([0-9\.]+)#',$ua,$pcs)>0){$wap['name']=$pcs[1];$wap['version']=$pcs[2];}elseif(preg_match("#(NetFront|NF\-Browser)/([0-9\.]+)#i",$ua,$pcs)){$wap['name']="NetFront";$wap['version']=$pcs[2];}elseif(preg_match("#[^a-z0-9](Bolt|Iris|Jasmine|Minimo|Novarra\-Vision|Polaris)/([0-9\.]+)#i",$ua,$pcs)){$wap['name']=$pcs[1];$wap['version']=$pcs[2];}elseif(preg_match("#(UP\.browser|SMIT\-Browser)/([0-9\.]+)#i",$ua,$pcs)){$wap['name']=$pcs[1];$wap['version']=$pcs[2];}elseif(preg_match("#\((jig\sbrowser).*\s([0-9\.]+)[^a-z0-9]#i",$ua,$pcs)){$wap['name']=$pcs[1];$wap['version']=$pcs[2];}elseif(preg_match("#[^a-z]Obigo#i",$ua,$pcs)){$wap['name']='Obigo';}elseif(preg_match("#openwave(\suntrusted)?/([0-9\.]+)#i",$ua,$pcs)){$wap['name']='OpenWave';$wap['version']=$pcs[2];}if(!empty($wap['name'])){$ismobile=true;}
68
- if(preg_match('#(alcatel|amoi|blackberry|docomo\s|htc|ipaq|kindle|kwc|lge|lg\-|mobilephone|motorola|nexus\sone|nokia|PDA|Palm|Samsung|sanyo|smartphone|SonyEricsson|\st\-mobile|vodafone|zte)[/\-_\s]?((?:\d|[a-z])+\d+[a-z]*)*#i',$ua,$pcs)>0){$ismobile=true;$wap['device']=trim($pcs[1],'-_ /');if(!empty($pcs[2]))$wap['model']=$pcs[2];if($pcs[1]=="KWC"){$wap['device']=="Kyocera phone";$wap['model']==$pcs[0];}if(empty($wap['name']))$wap['name']=$pcs[1];}
69
- if(!$ismobile){if(preg_match('#(J2ME/MIDP|Profile/MIDP|Danger\sHiptop|\sOpenWeb\s\d)#i',$ua)>0){$ismobile=true;}elseif($is_current_ua){$header_profile =array('X_WAP_PROFILE','PROFILE','13_PROFILE','56_PROFILE');foreach($header_profile AS $wap_profile){if(!empty($_SERVER["HTTP_{$wap_profile}"])){$ismobile=true;break 1;}}if(!$ismobile && !empty($_SERVER["HTTP_VIA"])&& preg_match('/([^a-z0-9]WAP|mobile)/i',$_SERVER["HTTP_VIA"])>0){$ismobile=true;}}if(!$ismobile && preg_match('#wireless\stranscoder#i',$ua)>0)$ismobile=true;}if($ismobile){if(!empty($wap['device'])){if(empty($wap['name']))$wap['name']=$wap['device'];elseif(empty($wap['os']))$wap['os']=$wap['device'];}}if($ismobile){if(empty($wap['os']))$wap['os']="WAP";return $wap;}else{return false;}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  function isSpiderAgent($agent=""){
71
- $ua="";$is_current_ua=false;list($ua,$is_current_ua)=$this->isCurrentAgent($agent);if(empty($ua))return false;$unknown_spider=(function_exists("__"))?__("Unknown Spider"):"Unknown Spider";$unknown_feedreader=(function_exists("__"))?__("Unknown Feedreader"):"Unknown Feedreader";$spider=array('name'=>"",'version'=>"",'os'=>"",'platform'=>"",'language'=>"",'agenttype'=>"R",'subscribers'=>"");
72
- if(preg_match('#^Mozilla/\d\.\d\s\(compatible;\sFriendFeedBot/([0-9\.]+);\s\+Http\://friendfeed\.com/about/bot\)$#',$ua,$match)>0){$spider['name']='FriendFeedBot';$spider['version']=$match[1];$spider['agenttype']='F';
73
- }elseif(preg_match('#^Mozilla/\d\.\d\s\(Twiceler\-(\d\.\d)\shttp://www\.cuill?\.com/twiceler/robot\.html\)$#',$ua,$match)>0){$spider['name']='Twiceler';$spider['version']=$match[1];$spider['agenttype']='R';
74
- }elseif(preg_match('#^Feedfetcher\-Google[;\s\(\+]+http\://www\.google\.com/feedfetcher\.html[;\)\s]+(?:(\d)\ssubscriber)?#',$ua,$match)>0){$spider['name']='FeedFetcher-Google';if(!empty($match[1]))$spider['subscribers']=$match[1];$spider['agenttype']='F';
75
- }elseif(preg_match('/[^a-z]twitterfeed/i',$ua,$match)>0){$spider['name']='Twitterfeed';$spider['agenttype']='F';
76
- }elseif(preg_match('#^([a-z]+)?/?nutch\-([0-9\.]+)#i',$ua,$match)>0){if(!empty($match[1]))$spider['name']=$match[1];else $spider['name']='Nutch';$spider['version']=$match[2];$spider['platform']="Nutch";
77
- }elseif(preg_match('#^larbin[\-_\s\/]?(v?[0-9\.]+)?#i',$ua,$match)>0){$spider['name']='Larbin';$spider['platform']="larbin";if(!empty($match[1]))$spider['version']=$match[1];
78
- }elseif(preg_match('#^([a-z_]+)[\-\s\/]?(v?[0-9\.]+)?[^a-z]+larbin([0-9\.]+)\@#i',$ua,$match)>0){$spider['name']=$match[1];$spider['platform']="larbin";if(!empty($match[2]))$spider['version']=$match[2];
79
- }elseif(preg_match('#^Mozilla/\d\.\d[^a-z0-9_\-]+(Yahoo[\-\!\s_]+[a-z]+)/?([0-9\.]+)?[^a-z0-9_\-]+.+yahoo.*\.com#i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];
80
- }elseif(preg_match('#WinHTTP#i',$ua,$match)>0){$spider['name']="WinHTTP";
81
- }elseif(preg_match('#^((?:[a-z]|\%20)+)\/?([0-9\.]+).*[^a-z0-9]CFNetwork\/?([0-9\.]+)#',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];
82
- }elseif(preg_match('/^Mozilla\/\d\.\d\s\(compatible\;\s(HTTrack|ICS)(?:\s(\d\.[a-z0-9]+))?[^a-z0-9\s]/',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];if(strlen($match[1])< 5)$spider['name']=$match[1]. " Spider";
83
- }elseif(preg_match('/^(?:Mozilla\/.*compatible[^a-z]*)?(([a-z]{3,})[\-\s_]?(?:bot|crawl|robot|spider|parser|reader)?[a-z]*)[^a-z^0-9]+v?\s?([0-9\.]+)?.*[^a-z]+(?:http|www).*[^a-z]+(?:\2|\3)\/?(?:\.?[a-z]+)?\.(?:com|net|org|html?|aspx?|[a-z]{2})/i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[3]))$spider['version']=$match[3];
84
- }elseif(preg_match('#^Mozilla\/\d\.\d\s\(compatible;\s([a-z_ ]+)(?:[-/](\d+\.\d+))?;\s.?http://(?:www\.)?[a-z]+(?:[a-z\.]+)\.(?:[a-z]{2,4})/?[a-z/]*(?:\.s?html?|\.php|\.aspx?)?\)$#i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];
85
- }elseif(preg_match('/([a-z\_\s\.]+)[\s\/\-_]?(v?[0-9\.]+)?.*(?:http\:\/\/|www\.)(\1)\.[a-z0-9_\-]+/i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];
86
- }elseif(preg_match('/^([a-z\_\.]+)[\s\/\-_]?(v?[0-9\.]+)?[\s\(\+]*(?:http\:\/\/|www\.)[a-z0-9_\-]+\.[a-z0-9_\-\.]+\)?/i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];
87
- }elseif(preg_match('/([a-z]+[a-z0-9]{2,})[\s\/\-]?([0-9\.]+)?[^a-z]+[^0-9]*http\:.*\/(\1)[^a-z]/i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];
88
- }elseif(preg_match('/([a-z]+[a-z0-9]{2,})[\s\/\-]?([0-9\.]+)?.*[^a-z0-9](\1)@[a-z0-9\-_]{2,}\.[a-z0-9\-_]{2,}/i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];
89
- }elseif(preg_match('#^Mozilla\/\d\.\d\s\(compatible;\s([a-z_ ]+)(?:[-/](\d+\.\d+))?;\s[^a-z0-9]?([a-z0-9\.]+@[a-z0-9]+\.[a-z]{2,4})\)$#i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];
90
- }elseif(preg_match('/^(([a-z]+)\s?(bot|crawler|robot|spider|\s[a-z]+)?)[\/\-\s_](v?[0-9\.]+)?.*[^a-z]+(?:\1|\2|\3)(?:\@|\s?at\s?)[a-z\-_]{2,}(?:\.|\s?dot\s)[a-z]{2,4}/i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[4]))$spider['version']=$match[4];
91
- }elseif(preg_match('/^(([a-z]+)\s?(bot|crawler|robot|spider|\s[a-z]+)?)[\/\-\s_](v?[0-9\.]+)?.*[^a-z]+[a-z\-_]+(?:\@|\s?at\s?)(?:\1|\2|\3)(?:\.|\s?dot\s)[a-z]{2,4}/i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[4]))$spider['version']=$match[4];
92
- }elseif(preg_match('/^([a-z]+)[\/\-\s_](v?[0-9\.]+)?.*[a-z0-9_\.]+(?:\@|\sat\s)[a-z0-9\-_]+(?:\.|\s?dot\s)[a-z]{2,4}[^a-z]/i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];
93
- }elseif(preg_match('/(?:http|www[a-z0-9]?)[^a-z].*[^a-z]([a-z0-9\-_]{4,}).*\.(?:com|net|org|biz|info|html?|aspx?|[a-z]{2})[^a-z0-9]+(\1[a-z_\-]+)[\/|\s|v]+([\d\.]+)/i',$ua,$match)>0){$spider['name']=$match[2];$spider['version']=$match[3];
94
- }elseif(preg_match('/^([a-z\_\.]+)[\s\/\-_]?(v?[0-9\.]+)?$/i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];
95
- }elseif(preg_match('/(?:http|www[a-z0-9]?)[^a-z].*[^a-z]([a-z0-9\-_]{4,}).*\.(?:com|net|org|biz|info|html?|aspx?|[a-z]{2})[^a-z0-9]+(\1[a-z_\-]+)[\/|\s|v]+([\d\.]+)/i',$ua,$match)>0){$spider['name']=$match[2];$spider['version']=$match[3];
96
- }elseif(preg_match('/^([a-z\_\.]+)[\s\/\-_]?(v?[0-9\.]+)?$/i',$ua,$match)>0){$spider['name']=$match[1];if(!empty($match[2]))$spider['version']=$match[2];
97
- }elseif(preg_match('#(\w+[\s\-_]?(?:bot|crawler|checker|feed|parser|reader|spider|verifier))(?:[\/\s\-\:_])?v?([0-9\.]+)#i',$ua,$match)>0){$spider['name']=$match[1];$spider['version']=$match[2];
98
- }elseif(preg_match('#([a-z\s]*(?:blog|feed|site)?[a-z\s\-_]*(?:bot|checker|crawler|reader|parser|spider|verifier))(?:$|^[a-z])#i',$ua,$match)>0){$spider['name']=$match[1];$spider['version']="";
99
- }elseif(preg_match('#(\spowermarks)\/([0-9\.]+)#i',$ua,$match)>0){$spider['name']=$match[1];$spider['version']=$match[2];
100
- }else{if(preg_match("#(robot|bot[\s\-_\/]|bot$|crawl|spider|feed[\s\-_\/]|feed$|fetcher|parser|reader|href|[^\.e]link[\s\-_\/]|linkcheck|checker|http\:\/\/|[^a-z]www[0-9]?\.[a-z0-9_\-]+\.[a-z]{2,3}[^a-z])#i",$ua)>0){$spider['name']=$unknown_spider;$spider['agenttype']="R";}elseif(preg_match("#([a-z0-9_]+(?:\@|\sat\s)[a-z0-9_\-]+(?:\.|\sdot\s)|\/.+\.(?:html?|aspx?|php5?|cgi))#i",$ua)>0){$spider['name']=$unknown_spider;$spider['agenttype']="R";}}
101
- if(!empty($spider['name'])){if($spider['agenttype']!="F" && preg_match("/(feed|rss|atom|xml)/i",$ua)>0){$spider['agenttype']="F";if(strstr($spider['name'],$unknown_spider)!==false)$spider['name']=$unknown_feedreader;}if(empty($spider['subscribers'])&& preg_match("/([0-9]{1,10})\s?subscriber/i",$ua,$subscriber)> 0){$spider['subscribers']=$subscriber[1];$spider['agenttype']="F";}if(empty($spider['os'])){if(!$is_current_ua)list($spider['os'],$platform)=$this->OSversion($ua);else list($spider['os'],$platform)=$this->OSversion();if(!empty($platform)&& empty($spider['platform']))$spider['platform']=$platform;}$spider['name']=rtrim($spider['name'],'_- ');}if($this->isSpammer($ua)!==false){$spider['name']=_e("Script Injection Bot");$spider['agenttype']="S";}if(empty($spider['name']))$spider=false;else $this->setClassVars($spider);$this->_done_spiders=true;return $spider;}
102
- function isFeed($feed_name,$ua=""){if(empty($ua)){if(!empty($feed_name)){$ua=$feed_name;$feed_name="";}else{$ua=$this->agent;}}if(preg_match("/([0-9]+)\s?subscriber/i",$ua,$subscriber)>0){$feed['subscribers']=$subscriber[1];$feed['agenttype']="F";}elseif(preg_match("/(feed|rss)/i",$ua)>0){$feed['agenttype']="F";}if(!empty($feed['agenttype'])){if(!empty($feed_name))$feed['name']=$feed_name;return $feed;}else{return false;}}
103
- function isSpammer($agent=""){if(empty($agent))$ua=$this->agent;else $ua=$agent;$spambot=false;if(stristr($ua,'location.href')!==FALSE)$spambot=true;elseif(preg_match('/(<|&lt;|&#60;|%3C)script/i',$ua)>0)$spambot=true;elseif(preg_match('/(<|&lt;|&#60;|%3C)a(\s|%20|&#32;|\+)+href/i',$ua)>0)$spambot=true;elseif(preg_match('/(select|update).*( |%20|%#32;|\+)from( |%20|%#32;|\+)/i',$ua)>0)$spambot=true;elseif(preg_match('/(drop|alter)(?:\s|%20|%#32;|\+)table/i',$ua)>0)$spambot=true;return $spambot;}
104
- function isWTF($ua=""){if(isset($this->_done_browsers)&& !$this->_done_browsers){return $this->isBrowserAgent($ua);}else{$unknown_agent=$this->getBrowscap($ua);if(!empty($unknown_agent['name']))$this->setClassVars($unknown_agent);}}
105
- function OSversion(
106
- $os="",$platform="",$ua=""){$is_current_ua=false;if(empty($os)){if(empty($ua))list($ua,$is_current_ua)=$this->isCurrentAgent();$os=$ua;}if($is_current_ua){if(!empty($_SERVER['HTTP_UA_OS']))$os=$_SERVER['HTTP_UA_OS'];}$os_type="";$device="";if(!empty($os)){
107
- if(preg_match('/(Windows|Win|NT)[0-9;\s\)\/]/',$os)>0){$os_type=$this->winOSversion($os);if(!$os_type)$os_type="Windows";$platform="Windows";
108
- }elseif(strpos($os,'Intel Mac OS X')!==FALSE || strpos($os,'PPC Mac OS X')!==FALSE){$platform='Macintosh';$os_type='MacOSX';$device='PC';
109
- }elseif(preg_match('/\siPhone\sOS\s(\d+)?(?:_\d)*/i',$os,$match)>0){$version="";if(!empty($match[1]))$version=$match[1];if(strpos($os,'iPod')!==FALSE){$os_type='iPhone OS';$platform="WAP";$device='iPod Touch';}else{$os_type='iPhone OS';$platform="WAP";$device='iPhone'." $version";}
110
- }elseif(stristr($os,'iPhone')!==FALSE){$os_type='iPhone';$platform="WAP";
111
- }elseif(strpos($os,'Mac OS X')!==FALSE){if(!empty($platform)){$os_type="{$platform}";}else{$os_type='MacOSX';$platform='Macintosh';
112
- }
113
- }elseif(preg_match('/Android\s?([0-9\.]+)?/',$os)>0){$os_type='Android';if(!empty($match[1]))$version=$match[1];$platform='WAP';
114
- }elseif(preg_match('/[^a-z0-9](BeOS|BePC|Zeta)[^a-z0-9]/',$os)>0){$os_type='BeOS';
115
- }elseif(preg_match('/[^a-z0-9](Commodore\s?64)[^a-z0-9]/i',$os)>0){$os_type='Commodore64';
116
- }elseif(preg_match('/[^a-z0-9]Darwin\/?([0-9\.]+)/i',$os,$match)>0){$os_type="Darwin";$version=$match[1];if(preg_match('/(MacBook|iMac|Macintosh|powerpc-apple)/i',$os)>0){$platform='Macintosh';$device=$match[1];}else{$platform='Unix';}
117
- }elseif(preg_match('/[^a-z0-9]Darwin[^a-z0-9]/i',$os,$match)>0){$os_type="Darwin";$platform="Unix";
118
- }elseif(preg_match('/((?:Free|Open|Net)BSD)\s?(?:[ix]?[386]+)?\s?([0-9\.]+)?/',$os,$match)>0){$os_type=$match[1];if(!empty($match[2]))$version=$match[2];$platform="Unix";
119
- }elseif(preg_match('/(?:(i[0-9]{3})\s)?Linux\s*((?:i[0-9]{3})?\s*(?:[0-9]\.[0-9]{1,2}\.[0-9]{1,2})?\s*(?:[ix][0-9_]{3,})?)?(?:.+[\s\(](Android|CentOS|Debian|Fedora|Gentoo|Mandriva|PCLinuxOS|SuSE|[KX]?ubuntu)[\s\/\-\)]+(\d+[a-z0-9\.]*)?)?/i',$os,$match)>0){$os_type='Linux';if(!empty($match[3])){$os_type=$match[3];if(!empty($match[4])&& stristr($linuxos,'ubuntu')!==false)$version=$match[4];}elseif(!empty($match[2])){$version=$match[2];}elseif(!empty($match[1])){$version=$match[1];}$platform='Linux';
120
- }elseif(preg_match('/Linux/i',$os,$match)>0){$os_type=$this->linuxOSversion($os);$platform="Linux";
121
- }elseif(preg_match('/(Mac_PowerPC|Macintosh)/',$os)>0){$os_type='MacPPC';$platform='Macintosh';
122
- }elseif(preg_match('/Nintendo\s(Wii|DSi?)?/i',$os,$match)>0){$os_type='Nintendo';$device='Nintendo';if(!empty($match[1]))$device .=" ".$match[1];
123
- }elseif(preg_match('/[^a-z0-9_\-]MS\-?DOS[^a-z]([0-9\.]+)?/i',$os,$match)>0){$os_type='MS-DOS';if(!empty($match[1])){$version=$match[1];}
124
- }elseif(preg_match('/[^a-z0-9_\-]OS\/2[^a-z0-9_\-].+Warp\s([0-9\.]+)?/i',$os,$match)>0){$os_type='OS/2 Warp';if(!empty($match[1])){$version=$match[1];}
125
- }elseif(stristr($os,'PalmOS')!==FALSE){$os_type='PalmOS';$platform='WAP';
126
- }elseif(preg_match('/PLAYSTATION\s(\d+)/i',$os,$match)>0){$os_type='Playstation';$version=$match[1];$device='Playstation';
127
- }elseif(preg_match('/IRIX\s*([0-9\.]+)?/i',$os,$match)>0){$os_type='SGI Irix';if(!empty($match[1]))$version=$match[1];$platform="Unix";
128
- }elseif(preg_match('/SCO_SV\s([0-9\.]+)?/i',$os,$match)>0){$os_type='SCO Unix';if(!empty($match[1]))$version=$match[1];$platform="Unix";
129
- }elseif(preg_match('/Solaris\s?([0-9\.]+)?/i',$os,$match)>0){$os_type='Solaris';if(!empty($match[1]))$version=$match[1];$platform="Unix";
130
- }elseif(preg_match('/SunOS\s?(i?[0-9\.]+)?/i',$os,$match)>0){$os_type='SunOS';if(!empty($match[1]))$version=$match[1];
131
- }elseif(preg_match('/SymbianOS\/([0-9\.]+)/i',$os,$match)>0){$os_type='SymbianOS';$version=$match[1];$platform="WAP";
132
- }elseif(preg_match('/[^a-z]Unixware\s(\d+(?:\.\d+)?)?/i',$ua)){$os_type='Unixware';if(!empty($match[1]))$version=$match[1];$platform="Unix";
133
- }elseif(preg_match('/\(PDA(?:.*)\)(.*)Zaurus/i',$os)>0){$os_type='Zaurus';$platform="WAP";
134
- }elseif(preg_match('/[^a-z]Unix/i',$ua)){$os_type='Unix';$platform="Unix";
135
- }elseif(preg_match('#^Mozilla/\d\.\d\s\(([a-z0-9]+);\sU;\s(([a-z0-9]+)(?:\s([a-z0-9\.\s]+))?);#i',$os,$match)>0){$platform=$match[1];$os_type=$match[3];if(!empty($match[4]))$version=$match[4];
136
- }else{$os_type=$this->linuxOSversion($os);if($os_type)$platform='Linux';elseif(preg_match('/[^a-z0-9_\-]OS\/2[^a-z0-9_\-]/i',$os,$match)>0)$os_type="OS/2";else $os_type="";}}if(empty($os_type)&& !empty($platform))$os_type=$platform;return array($os_type,$platform,$device);}
137
- function winOSversion($os){if(empty($os))return false;$winos="";if(strstr($os,'Windows NT 10.0')){$winos='Win10';}elseif(strstr($os,'Windows NT 6.3')){$winos='Win8';if(strstr($os,'; ARM'))$winos="WinRT";}elseif(strstr($os,'Windows NT 6.2')){$winos='Win8';if(strstr($os,'; ARM'))$winos="WinRT";}elseif(strstr($os,'Windows NT 6.1')){$winos='Win7';}elseif(strstr($os,'Windows NT 6.0')){$winos='WinVista';}elseif(strstr($os,'Windows NT 5.2')){$winos='Win2003';}elseif(strstr($os,'Windows NT 5.1')){$winos='WinXP';}elseif(strstr($os,'Windows NT 5.0')|| strstr($os,'Windows 2000')){$winos='Win2000';}elseif(strstr($os,'Windows ME')){$winos='WinME';}elseif(preg_match('/Win(?:dows\s)?NT\s?([0-9\.]+)?/',$os,$match)>0){$winos='WinNT';if(!empty($match[1]))$winos .=" ".$match[1];}elseif(preg_match('/(?:Windows95|Windows 95|Win95|Win 95)/',$os)>0){$winos='Win95';}elseif(preg_match('/(?:Windows98|Windows 98|Win98|Win 98|Win 9x)/',$os)>0){$winos='Win98';}elseif(preg_match('/(?:WindowsCE|Windows CE|WinCE|Win CE)[^a-z0-9]+(?:.*Version\s([0-9\.]+))?/i',$os)>0){$winos='WinCE';if(!empty($match[1]))$winos.=" ".$match[1];}elseif(preg_match('/(Windows|Win)\s?3\.\d[; )\/]/',$os)>0){$winos='Win3.x';}elseif(preg_match('/(Windows|Win)[0-9; )\/]/',$os)>0){$winos='Windows';}if(strstr($os,'WOW64')|| strstr($os,'Win64')|| strstr($os,'x64')){$winos=$winos.' x64';}return $winos;}
138
- function linuxOSversion($os=""){if(empty($os)){if(!empty($this))$os=$this->agent;else $os=$_SERVER['HTTP_USER_AGENT'];}if(empty($os))return false;$linuxos="";$platform="";$version="";if(preg_match('/[^a-z0-9](Android|CentOS|Debian|Fedora|Gentoo|Mandriva|PCLinuxOS|SuSE)[^a-z]/',$os,$match)>0){$linuxos=$match[1];}elseif(preg_match('/[^a-z0-9]CentOS[^a-z]/i',$os)){$linuxos="CentOS";}elseif(preg_match('/[^a-z0-9]Debian/i',$os)){$linuxos="Debian";}elseif(stristr($os,'Gentoo')!==false){$linuxos="Gentoo";}elseif(stristr($os,'Kanotix')!==false){$linuxos="Kanotix";}elseif(stristr($os,'Knoppix')!==false){$linuxos="Knoppix";}elseif(preg_match('#[^a-z0-9]Mandrake[^a-z0-9]#i',$os)){$linuxos="Mandrake";}elseif(stristr($os,'MEPIS')!==false){$linuxos="MEPIS Linux";}elseif(preg_match('/[^a-z]pclos([0-9\.]+)?/i',$os,$match)>0){$linuxos="PCLinuxOS";if(!empty($match[1]))$version=$match[1];}elseif(preg_match('/[^a-z]LinuxOS[^a-z]/i',$os)){$linuxos="LinuxOS";}elseif(preg_match('/Red\s?Hat^[a-z]/i',$os)){$linuxos="RedHat";}elseif(stristr($os,'Slackware')!==false){$linuxos="Slackware";}elseif(preg_match('/[^a-z0-9]SuSE/i',$os)){$linuxos="SuSE";}elseif(preg_match('#([kx]?Ubuntu)[^a-z]?(\d+[\.0-9a-z]*)?#i',$os,$match)>0){$linuxos=$match[1];if(!empty($match[2]))$version=$match[2];}elseif(stristr($os,'Xandros')!==false){$linuxos="Xandros";}if(empty($linuxos)){return false;}else{return $linuxos;}}
139
- function webkitVersion($webkit="",$ua=""){$browser="Safari";$vers="";if(empty($webkit)){return false;}elseif(preg_match("#^([a-zA-Z]+)/([0-9]+(?:[A-Za-z\.0-9]+))(\sMobile)?#",$webkit,$match)>0){if($match[1]!="Version" && $match[1]!="Mobile"){$browser=$match[1];}$vers=$match[2];if($vers=="0")$vers="";if(!empty($match[3]))$vers .=$match[3];}elseif(preg_match("#^(?:([0-9]+)\.){1,3}$#",$webkit,$match)>0){$webkit_num=(int)$match[1];if($webkit_num>536)$vers="6";elseif($webkit_num>533)$vers="5";elseif($webkit_num>525)$vers="4";elseif($webkit_num>419)$vers="3";elseif($webkit_num>312)$vers="2";elseif($webkit_num>85)$vers="1";else $vers="";}return array('name'=>$browser,'version'=>$vers);}
140
- function getHeaderData(){$name="";$os="";$platform="";$resolution="";$uatype="";if(!empty($_SERVER['HTTP_UA_OS']))$os=$this->OSversion($_SERVER['HTTP_UA_OS']);if(!empty($_SERVER['HTTP_UA_PIXELS']))$resolution=str_replace('X','x',$_SERVER['HTTP_UA_PIXELS']);elseif(!empty($_SERVER['HTTP_X_UP_DEVCAP_SCREENPIXELS']))$resolution=str_replace(',','x',$_SERVER['HTTP_X_UP_DEVCAP_SCREENPIXELS']);if(!empty($_SERVER['HTTP_X_SKYFIRE_VERSION'])){$name='Skyfire';$platform='WAP';if(!empty($_SERVER['HTTP_X_SKYFIRE_SCREEN']))$resolution=preg_replace(',','x',$_SERVER['HTTP_X_SKYFIRE_SCREEN']);$uatype="B";}return array($name,$os,$platform,$resolution,$uatype);}
141
- function setDeviceUA(){$ua=(!empty($_SERVER['HTTP_USER_AGENT'])?trim($_SERVER['HTTP_USER_AGENT']):"");$wap=false;$browser='';if(!empty($_SERVER['HTTP_X_DEVICE_USER_AGENT'])){$real_ua=trim($_SERVER['HTTP_X_DEVICE_USER_AGENT']);}elseif(!empty($_SERVER['HTTP_X_ORIGINAL_USER_AGENT'])){$real_ua=trim($_SERVER['HTTP_X_ORIGINAL_USER_AGENT']);}elseif(!empty($_SERVER['HTTP_X_MOBILE_UA'])){$real_ua=trim($_SERVER['HTTP_X_MOBILE_UA']);$wap=true;}elseif(!empty($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])){$real_ua=trim($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']);$wap=true;$browser='Opera Mini';}if(!empty($real_ua)&&(strlen($real_ua)>=5 || empty($ua)))$ua=$real_ua;$this->agent=$ua;if($wap)$this->platform='WAP';if(!empty($browser)&& empty($this->name)){$this->name=$browser;$this->agenttype='B';}}
142
- function getBrowscap($ua=""){if(empty($ua))$ua=$this->agent;$browsercap=false;$browser=array('name'=>"",'version'=>"",'os'=>"",'platform'=>"",'agenttype'=>"B");if(empty($ua))return false;if(ini_get("browscap")!="")$browsercap=get_browser($ua,true);if(is_array($browsercap)){if(empty($browsercap['browser'])|| $browsercap['browser']=='Default Browser'){if(!empty($browsercap['parent']))$browser['name']=$browsercap['parent'];}else{$browser['name']=$browsercap['browser'];}if(!empty($browser['name'])){if(!empty($browsercap['platform'])&& stristr($browsercap['platform'],'unknown')===false){$browser['os']=$browsercap['platform'];if(!empty($browsercap['spider']))$browser['agenttype']="R";}elseif(!empty($browser['name'])){$browser['agenttype']="R";}if(!empty($browsercap['version'])&& $browsercap['spider']==FALSE)$browser['version']=$browsercap['version'];}}return $browser;}
143
- function setEmulation(){if($this->is_browser || $this->agenttype=='B'){$this->emulation=$this->name." ".$this->majorVersion($this->version);}$ua=(!empty($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:"");if($this->is_active_agent && $this->agent!=rtrim($ua)){$this->is_active_agent=false;$emulation=$this->isTopAgent($ua);if(empty($emulation)){$this->_done_browsers=false;$this->_done_spiders=true;$emulation=$this->isBrowserAgent($ua);}if(!empty($emulation['name'])&& $emulation['agenttype']=='B')$this->emulation=rtrim($emulation['name'].' '.$this->majorVersion($emulation['version']));$this->is_active_agent=true;}elseif(preg_match('/(Firefox|MSIE|Safari)[\/\s]*([0-9\.]+)?/i',$this->agent,$match)>0){if(stristr($match[1],'MSIE')!==false)$match[1]='IE';if($this->name!=$match[1]){$this->emulation=$match[1];if(!empty($match[2])){if(stristr($match[1],'Safari')!==false){$emulation=$this->webkitVersion($match[2]);if(!empty($emulation['version']))$this->emulation .=" ".$emulation['version'];}else{$this->emulation .=" ".$this->majorVersion($match[2]);}}}}return $this->emulation;}
144
- function detectLanguage($agent=""){$language="";$ua="";$is_current_ua=false;if(empty($agent))list($ua,$is_current_ua)=$this->isCurrentAgent();else $ua=$agent;if(preg_match("/(?:\s|;|\[)(([a-z]{2})(?:\-([a-zA-Z]{2}))?)(?:;|\]|\))/",$ua,$match)>0){$language=$match[1];}elseif($is_current_ua){$language="";}return $language;}
145
- function detectResolution($ua,$wap=false){$is_current_ua=false;if(empty($ua)){$ua=$this->agent;$is_current_ua=$this->is_active_agent;}$resolution="";if(preg_match("#screen(?:res)?[ -/](\d{3,4}[x\*]\d{3,4})#",$ua,$pcs)>0)$resolution=str_replace('*','x',$pcs[1]);elseif(!empty($wap)&& preg_match("#[ ;](\d{3,4}x\d{3,4})([;)x ]|$)#",$ua,$pcs)>0)$resolution=$pcs[1];return $resolution;}
146
- function setClassVars($assoc){if(empty($assoc['emulation'])&& empty($this->emulation)){if(!empty($this->name)&& $this->name!=$assoc['name']){if($assoc['agenttype']=="B"){$this->emulation=rtrim($assoc['name']." ".$this->majorVersion($assoc['version']));$assoc['name']=$this->name;$assoc['version']=$this->version;$assoc['agenttype']=$this->agenttype;}}}foreach($assoc as $key=>$value){if(empty($this->$key))$this->$key=$value;}}
147
- function majorVersion($versionstring=""){if(empty($versionstring))$versionstring=$this->version;$version=0;if(!empty($versionstring)){$n=strpos($versionstring,'.');if($n >0){$version=(int)substr($versionstring,0,$n);if($version==0)$version='0.'.substr($versionstring,$n+1,1);}if($n==0){$p=strpos($versionstring,'.',$n+1);if($p>0)$version='0.'.substr($versionstring,0,$p);elseif(is_numeric($versionstring))$version=$versionstring;}}if($version >0)return $version;else return $versionstring;}
148
- function isCurrentAgent($agent=""){$ua="";$is_current_ua=false;if(empty($agent)){if(!empty($this->agent)){$ua=$this->agent;$is_current_ua=$this->is_active_agent;}else{$ua=(!empty($_SERVER['HTTP_USER_AGENT'])?rtrim($_SERVER['HTTP_USER_AGENT']):"");$is_current_ua=true;}}return array($ua,$is_current_ua);}
149
- function isValidAgent($ua){$is_valid=true;if(empty($ua))$is_valid=false;elseif(strlen($ua)<5)$is_valid=false;return $is_valid;}
150
- function isSpoofedAgent($ua){$is_spoofed=false;if(stristr('user agent',$ua)!==false)$is_spoofed=true;return $is_spoofed;}
151
- function isUnknownAgent($ua){$unknown_spider=(function_exists("__"))?__("Unknown Spider"):"Unknown Spider";$unknown=array('name'=>$unknown_spider,'agenttype'=>"R");$agent=trim($ua,'./\;-&":;? ><,#@~`%$+=');if(!empty($agent)){if(strlen($agent)<5)$unknown['name']=$agent;}$this->setClassVars($unknown);return $unknown;}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  /**
3
+ * Class for in-depth user agent detection.
4
+ * Updated: 2016-09-04
5
+ * @version 0.9.2
6
+ * @author helened
 
 
7
  * Author URI: http://helenesit.com
 
8
  *
9
+ * @copyright Copyright (c) 2009-2016 Helene Duncker
10
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License
11
+ *
 
12
  * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
  * See the GNU General Public License for more details.
16
+ *
 
17
  * USAGE: include_once(uadetector.class.php);
18
  * $useragent = new UADetector(); //returns object(16)
19
  *
20
+ * Notes:
21
+ * 1) UADetector attempts to find the actual browser in use.
22
+ * This may cause the "name" field to differ from "emulation" field
23
+ * when user-agent spoofing is detected. You should use the most
24
+ * appropriate field for your application type:
25
+ * a) "Name" field is best for statistics collection
26
+ * b) "Emulation" field is best for UI customizations.
27
+ */
28
+ //-------------------------------------------------
29
+ //# No direct requests for this plugin module
30
+ $wfile=preg_replace('/\\\\/','/',__FILE__); //for windows
31
+ //abort if this is direct uri request for file
32
+ if((!empty($_SERVER['PHP_SELF']) && preg_match('#'.preg_quote($_SERVER['PHP_SELF']).'$#',$wfile)>0) ||
33
+ (!empty($_SERVER['SCRIPT_FILENAME']) && realpath($_SERVER['SCRIPT_FILENAME'])===realpath($wfile))){
34
+ //try track this uri request
35
+ if(!headers_sent()){
36
+ //triggers redirect to 404 error page so Wassup can track this attempt to access itself (original request_uri is lost)
37
+ header('Location: /?p=404page&err=wassup403'.'&wf='.basename($wfile));
38
+ exit;
39
+ }else{
40
+ //'wp_die' may be undefined here
41
+ die('<strong>Sorry. Unable to display requested page.</strong>');
42
+ }
43
+ exit;
44
+ //abort if no WordPress
45
+ }elseif(!defined('ABSPATH') || empty($GLOBALS['wp_version'])){
46
+ //show escaped bad request on exit
47
+ die("Bad Request: ".htmlspecialchars(preg_replace('/(&#0*37;|&amp;#0*37;|&#0*38;#0*37;|%)(?:[01][0-9A-F]|7F)/i','',$_SERVER['REQUEST_URI'])));
48
+ }
49
+ unset($wfile); //to free memory
50
+
51
+ //-------------------------------------------------
52
+ class UADetector {
53
+ var $name=''; //browser or spider name, not null
54
+ var $version=''; //browser or spider version
55
+ var $os=''; //operating system+version
56
+ var $platform=''; //operating system or device platform
57
+ var $emulation=''; //emulated browser plus major version#
58
+ var $language=''; //language code (not locale)
59
+ var $device=''; //PC, PDA, Phone, TV
60
+ var $model=''; //Device manufacturer model
61
+ var $resolution=''; //screen size (MMMxNNN), if in user-agent
62
+ var $subscribers=''; //feed subscriber count, if in user-agent
63
+ var $is_mobile=false;
64
+ var $is_browser=false;
65
+ var $is_robot=false;
66
+ var $is_spammer=false; //spam script injection code present
67
+ var $agent=''; //user-agent (unspoofed, if possible)
68
+ var $agenttype=''; //browser or spider type, not null:
69
+ // B=Browser,
70
+ // F=feedreader (could also have type=R)
71
+ // R=robot (spider|archiver|validator),
72
+ // S=Spammer/Script injector
73
+ //var $_done_browsers=false; //private
74
+ //var $_done_spiders=false; //private
75
+ //var $is_active_agent=false; //private
76
+
77
+ /**
78
+ * PHP4 compatible constructor
79
+ * @param string $ua (optional)
80
+ * @return object(16)
81
+ */
82
+ function uadetector($ua=""){
83
+ $this->is_browser=false;
84
+ $this->is_mobile=false;
85
+ $this->is_robot=false;
86
+ $this->is_spammer=false;
87
+
88
+ //initialize private booleans
89
+ $this->_done_browsers=false; //true after isBrowserAgent() is parsed
90
+ $this->_done_spiders=false; //true after isSpiderAgent() is parsed
91
+ $this->is_active_agent=false; //true when agent is in http header
92
+ //set agent, if not parameter
93
+ if(empty($ua)){
94
+ $this->setDeviceUA();
95
+ $ua=$this->agent;
96
+ $this->is_active_agent=true; //ok to read http headers
97
+ }else{
98
+ $ua=trim($ua);
99
+ $this->agent=$ua;
100
+ }
101
+ //Detect the brower/spider...
102
+ //exclude invalid agents from full check
103
+ if(!$this->isValidAgent($ua)&& empty($this->name)){
104
+ $this->isUnknownAgent($ua);
105
+ }else{
106
+ //check user-agent data and set all variables...
107
+ if($this->isTopAgent()===false){
108
+ if($this->isBrowserAgent()===false){
109
+ if($this->isSpiderAgent()===false){
110
+ $this->isWTF();
111
+ }}}
112
+ }
113
+ //set booleans
114
+ if($this->agenttype=="B") $this->is_browser=true;
115
+ elseif($this->agenttype=="R") $this->is_robot=true;
116
+ elseif($this->agenttype=="S") $this->is_spammer=true;
117
+ if(empty($this->is_mobile)&& $this->platform=="WAP") $this->is_mobile=true;
118
+ //TODO: assume mobile if screen width <400 & >132 ??
119
+
120
+ //set browser emulation field
121
+ if(empty($this->emulation)) $this->setEmulation();
122
+ //lastly, unset temporary private booleans...
123
+ unset($this->_done_browsers,$this->_done_spiders,$this->is_active_agent);
124
+ return;
125
+ } //end function __construct
126
+
127
+ /**
128
+ * Check user agent against a known list of top user agents
129
+ * @return associative array containing agent details
130
+ */
131
  function isTopAgent($agent=""){
132
+ //NOTE: Top agents are based on log data from "WassUp", a web statistics plugin for WordPress available at http://www.wpwp.org
133
+ // User agent parameter or class variable is required.
134
+ $ua="";
135
+ $is_current_ua=false;
136
+ if(empty($agent)) list($ua,$is_current_ua)=$this->isCurrentAgent();
137
+ else $ua=$agent;
138
+ if(empty($ua)) return false; //nothing to check
139
+ $os="";
140
+ $top_ua=array('name'=>"",'version'=>"",'os'=>"",'platform'=>"",'language'=>"",'agenttype'=>"",'resolution'=>"");
141
+
142
+ // #1 Googlebot
143
+ if(preg_match("#^Mozilla/\d\.\d\s\(compatible;\sGooglebot/(\d\.\d);[\s\+]+http\://www\.google\.com/bot\.html\)$#i",$ua,$match)>0){
144
+ $top_ua['name']="Googlebot";
145
+ $top_ua['version']=$match[1];
146
+ $top_ua['agenttype']="R";
147
+ // #2.1 Microsoft Edge on Windows 10
148
+ }elseif(preg_match('#^Mozilla\/[0-9.\s]+\((Windows\sNT\s[0-9.]+;.+)\)\sAppleWebKit\/[0-9.]+\s\(.+\)(?:\s(?:Chrome|Safari)\/[0-9.]+){2,}\sEdge\/([0-9\.]+)$#',$ua,$match)>0){
149
+ $top_ua['name']='Edge';
150
+ $top_ua['version']=$match[2];
151
+ $top_ua['platform']='Windows';
152
+ $os=$match[1];
153
+ $top_ua['os']=$this->winOSversion($os);
154
+ $top_ua['agenttype']='B';
155
+ // #2.2 IE 11 on Windows
156
+ }elseif(preg_match('#^Mozilla/\d\.\d\s\((Windows\sNT\s[0-9.]+\d(?:;\sARM|;\sW[inOW]{2}64)?)(?:;\sx64)?;?\sTrident/[0-9\.]+;(?:\s[0-9A-Za-z\.;]+;){0,}\srv\:([0-9\.]+)\)\slike\sGecko(?:,gzip\(gfe\))?$#',$ua,$match)>0){
157
+ $top_ua['name']='IE';
158
+ $top_ua['version']=$match[2];
159
+ $top_ua['platform']='Windows';
160
+ $os=$match[1];
161
+ $top_ua['os']=$this->winOSversion($os);
162
+ $top_ua['agenttype']='B';
163
+ // #2.3 IE 10|9|8|7|6 on Win8|Win7|Vista|Win2K8|Win2K3|XP
164
+ }elseif(preg_match('#^Mozilla/\d\.\d\s\(compatible;\sMSIE\s(\d+)(?:\.\d+)+;\s(Windows\sNT\s[0-9.]+(?:;\sW[inOW]{2}64)?)(?:;\sx64)?;?(?:\sSLCC1;?|\sSV1;?|\sGTB\d;|\sTrident/\d\.\d;|\sFunWebProducts;?|\s\.NET\sCLR\s[0-9\.]+;?|\s(Media\sCenter\sPC|Tablet\sPC)\s\d\.\d;?|\sInfoPath\.\d;?)*\)$#',$ua,$match)>0){
165
+ $top_ua['name']='IE';
166
+ $top_ua['version']=$match[1];
167
+ $top_ua['platform']='Windows';
168
+ $os=$match[2];
169
+ $top_ua['os']=$this->winOSversion($os);
170
+ $top_ua['agenttype']='B';
171
+ if(!empty($match[3]))$top_ua['device']=$match[3];
172
+ // #3.1 Firefox and Gecko browsers on Windows 8.1+
173
+ }elseif(preg_match('#^Mozilla/\d\.\d\s\((Windows\sNT\s\d\.\d;(?:\sW[inOW]{2}64;)?)\srv\:[0-9\.]+\)\sGecko/[0-9a-z]+\s([A-Za-z\-0-9]+)/(\d+(?:\.\d+)+)(?:\s\(.*\))?$#',$ua,$match)>0){
174
+ $top_ua['name']=$match[2];
175
+ $top_ua['version']=$match[3];
176
+ $top_ua['platform']="Windows";
177
+ $os=$match[1];
178
+ $top_ua['os']=$this->winOSversion($os);
179
+ $top_ua['agenttype']='B';
180
+ // #3.2 Firefox and other Mozilla browsers on Windows
181
+ }elseif(preg_match('#^Mozilla/\d\.\d\s\(Windows;\sU;\s(.+);\s([a-z]{2}(?:\-[A-Za-z]{2})?);\srv\:\d(?:\.\d+)+\)\sGecko/\d+\s([A-Za-z\-0-9]+)/(\d+(?:\.\d+)+)(?:\s\(.*\))?$#',$ua,$match)>0){
182
+ $top_ua['name']=$match[3];
183
+ $top_ua['version']=$match[4];
184
+ $top_ua['language']=$match[2];
185
+ $top_ua['platform']="Windows";
186
+ $os=$match[1];
187
+ $top_ua['os']=$this->winOSversion($os);
188
+ $top_ua['agenttype']='B';
189
+ // #4 Yahoo!Slurp
190
+ }elseif(preg_match('#^Mozilla/\d\.\d\s\(compatible;\s(Yahoo\!\s([A-Z]{2})?\s?Slurp)/?(\d\.\d)?;\shttp\://help\.yahoo\.com/.*\)$#i',$ua,$match)>0){
191
+ $top_ua['name']=$match[1];
192
+ if(!empty($match[3]))$top_ua['version']=$match[3];
193
+ if(!empty($match[2]))$top_ua['language']=$match[2];
194
+ $top_ua['agenttype']='R';
195
+ // #5 BingBot
196
+ }elseif(preg_match('#^Mozilla/\d\.\d\s\(compatible;\sbingbot/(\d\.\d)[^a-z0-9]+http\://www\.bing\.com/bingbot\.htm.$#',$ua,$match)>0){
197
+ $top_ua['name']='BingBot';
198
+ if(!empty($match[1]))$top_ua['name'].=$match[1];
199
+ if(!empty($match[2]))$top_ua['version']=$match[2];
200
+ $top_ua['agenttype']='R';
201
+ // #6 FeedBurner
202
+ }elseif(preg_match('#^FeedBurner/(\d\.\d)\s\(http\://www\.FeedBurner\.com\)$#',$ua,$match)>0){
203
+ $top_ua['name']='FeedBurner';
204
+ $top_ua['version']=$match[1];
205
+ $top_ua['agenttype']='F';
206
+ // #7 Wordpress
207
+ }elseif(preg_match('#^WordPress/(?:wordpress(\-mu)\-)?(\d\.\d+)(?:\.\d+)*(?:\-[a-z]+)?(?:\;\shttp\://[a-z0-9_\.\:\/]+)?$#',$ua,$match)>0){
208
+ $top_ua['name']='Wordpress';
209
+ if(!empty($match[1]))$top_ua['name']=$top_ua['name'].$match[1];
210
+ $top_ua['version']=$match[2];
211
+ $top_ua['agenttype']='U';
212
+ // #8 Firefox and Gecko browsers on Mac|*nix|OS/2 etc...
213
+ }elseif(preg_match('#^Mozilla/\d\.\d\s\((Macintosh|X11|OS/2);\sU;\s(.+);\s([a-z]{2}(?:\-[A-Za-z]{2})?)(?:-mac)?;\srv\:\d(?:.\d+)+\)\sGecko/\d+\s([A-Za-z\-0-9]+)/(\d+(?:\.[0-9a-z\-\.]+))+(?:(\s\(.*\))(?:\s([A-Za-z\-0-9]+)/(\d+(?:\.\d+)+)))?$#',$ua,$match)>0){
214
+ $top_ua['name']=$match[4];
215
+ $top_ua['version']=$match[5];
216
+ $top_ua['language']=$match[3];
217
+ $top_ua['platform']=$match[1];
218
+ $os=$match[2];
219
+ if(!empty($match[7])){
220
+ $top_ua['name']=$match[7];
221
+ $top_ua['version']=$match[8];
222
+ $os=$os." ".$match[4]." ".$match[5];
223
+ }elseif(!empty($match[6])){
224
+ $os=$os.$match[6];
225
+ }
226
+ list($top_ua['os'])=$this->OSversion($os,$top_ua['platform'],$ua);
227
+ $top_ua['agenttype']='B';
228
+
229
+ // #9 Safari and Webkit-based browsers on all platforms
230
+ //}elseif(preg_match('#^Mozilla/\d\.\d\s\(([A-Za-z0-9/\.]+);\sU;?\s?(.*);\s?([a-z]{2}(?:\-[A-Za-z]{2})?)?\)\sAppleWebKit/[0-9\.]+\+?\s\((?:KHTML,\s)?like\sGecko\)(?:\s([a-zA-Z0-9\./]+(?:\sMobile)?)/?[A-Z0-9]*)?\sSafari/([0-9\.]+)$#',$ua,$match)>0){
231
+ }elseif(preg_match('#^Mozilla/\d\.\d\s\(([A-Za-z0-9/\.]+);(?:\sU;)?\s([A-Za-z0-9_\s]+);?\s?([a-z]{2}(?:\-[A-Za-z]{2})?)?\)\sAppleWebKit/[0-9\.]+\+?\s\((?:KHTML,\s)?like\sGecko\)(?:\s([a-zA-Z0-9\./]+(?:\sMobile)?)/?[A-Z0-9]*)?\sSafari/([0-9\.]+)$#',$ua,$match)>0){
232
+ $top_ua['name']='Safari';
233
+ if(!empty($match[4]))$vers=$match[4];
234
+ else $vers=$match[5];
235
+ $browser=$this->webkitVersion($vers,$ua);
236
+ if(!empty($browser)&& is_array($browser)){
237
+ $top_ua['name']=$browser['name'];
238
+ $top_ua['version']=$browser['version'];
239
+ }
240
+ if(empty($match[2])){
241
+ $os=$match[1];
242
+ }else{
243
+ $top_ua['platform']=$match[1];
244
+ $os=$match[2];
245
+ }
246
+ if($top_ua['platform']=='Windows')$top_ua['os']=$this->winOSversion($os);
247
+ else list($top_ua['os'])=$this->OSversion($os,$top_ua['platform'],$ua);
248
+ $top_ua['language']=$match[3];
249
+ $top_ua['agenttype']='B';
250
+ // #10 Google Chrome browser on all platforms with or without language string
251
+ }elseif(preg_match('#^Mozilla/\d+\.\d+\s(?:[A-Za-z0-9\./]+\s)?\((?:([A-Za-z0-9/\.]+);(?:\sU;)?\s?)?([^;]*)(?:;\s[A-Za-z]{3}64)?;?\s?([a-z]{2}(?:\-[A-Za-z]{2})?)?\)\sAppleWebKit/[0-9\.]+\+?\s\((?:KHTML,\s)?like\sGecko\)(?:\s([A-Za-z0-9_\-]+[^i])/([A-Za-z0-9\.]+)){1,3}(?:\sSafari/[0-9\.]+)?$#',$ua,$match)>0){
252
+ $top_ua['name']=$match[4];
253
+ $top_ua['version']=$match[5];
254
+ if(empty($match[2])){
255
+ $os=$match[1];
256
+ }else{
257
+ $top_ua['platform']=$match[1];
258
+ $os=$match[2];
259
+ }
260
+ if($top_ua['platform']=='Windows')$top_ua['os']=$this->winOSversion($os);
261
+ else list($top_ua['os'])=$this->OSversion($os,$top_ua['platform'],$ua);
262
+ if(!empty($match[3]))$top_ua['language']=$match[3];
263
+ $top_ua['agenttype']='B';
264
+ }
265
+ //check http header for user agent spoofing and for os and screen resolution
266
+ if($is_current_ua){
267
+ list($name,$os,$platform,$resolution,$uatype)=$this->getHeaderData();
268
+ if(!empty($name)){
269
+ $top_ua['name']=$name;
270
+ if(!empty($uatype)) $top_ua['agenttype']=$uatype;
271
+ }
272
+ if(!empty($os)) $top_ua['os']=$os;
273
+ if(!empty($resolution)) $top_ua['resolution']=$resolution;
274
+ }
275
+ //set class vars and return array
276
+ if(!empty($top_ua['name'])){
277
+ if(empty($agent))$this->setClassVars($top_ua);
278
+ }else{
279
+ $top_ua=false;
280
+ }
281
+ return $top_ua;
282
+ } //end function isTopAgent
283
+
284
+ /**
285
+ * detect browsers
286
+ * @access public
287
+ * @param string (optional)
288
+ * @return array (associative)
289
+ */
290
  function isBrowserAgent($agent=""){
291
+ $ua="";
292
+ $is_current_ua=false;
293
+ if(empty($agent)) list($ua,$is_current_ua)=$this->isCurrentAgent();
294
+ else $ua=$agent;
295
+ if(empty($ua)) return false; //nothing to check
296
+ //##detect browsers
297
+ $browser=array('name'=>"",'version'=>"",'os'=>"",'platform'=>"",'language'=>"",'agenttype'=>"B",'resolution'=>"",'device'=>"",'model'=>"",'emulation'=>"");
298
+
299
+ //spiders are not detected here, so exclude user agents that are likely spiders (ie. contains an email or URL, or spider-like keywords)
300
+ if(isset($this->_done_spiders)&& !$this->_done_spiders && preg_match('#(robot|bot[\s\-_\/\)]|bot$|blog|checker|crawl|feed|fetcher|libwww|[^\.e]link\s?|parser|reader|spider|verifier|href|https?\://|.+(?:\@|\s?at\s?)[a-z0-9_\-]+(?:\.|\s?dot\s?)|www[0-9]?\.[a-z0-9_\-]+\..+|\/.+\.(s?html?|aspx?|php5?|cgi))#i',$ua)>0){
301
+ //not spider if embedded browser or is a browser add-on such as spyware or translator
302
+ if(preg_match('#(embedded\s?(WB|Web\sbrowser)|dynaweb|bsalsa\.com|muuk\.co|translat[eo]r?)#i',$ua)==0)return false;
303
+ }
304
+ //### Step 1: check for mobile or embedded browsers
305
+ $ismobile=false;
306
+ $wap=$this->isMobileAgent($ua);
307
+ if(!empty($wap) && is_array($wap)){
308
+ $ismobile=true;
309
+ $browser['name']=$wap['name'];
310
+ $browser['version']=$wap['version'];
311
+ $browser['device']=$wap['device'];
312
+ $browser['model']=$wap['model'];
313
+ $browser['os']=$wap['os'];
314
+ $browser['platform']="WAP";
315
+ if(!empty($wap['language']))$browser['language']=$wap['language'];
316
+ }
317
+ //### Step 2: Check for old MSIE-based browsers
318
+ if(!$ismobile || empty($browser['name'])){
319
+ $iestring="";
320
+ if(strstr($ua,' Gecko/')==false && preg_match('#^Mozilla\/\d\.\d\s\((Windows\sNT\s\d\.\d;(?:\s[0-9A-Za-z./]+;)+)\srv\:([0-9\.]+)\)\s?(.*)#',$ua,$pcs)>0){
321
+ $browser['name']='IE';
322
+ $browser['version']=$pcs[2];
323
+ $browser['emulation']=rtrim('IE'." ".$this->majorVersion($pcs[1]));
324
+ $browser['os']=$this->winOSversion($pcs[1]);
325
+ $iestring=$pcs[3];
326
+ }elseif(preg_match('/compatible(?:\;|\,|\s)+MSIE\s(\d+)(\.\d+)+(.*)/',$ua,$pcs)>0){
327
+ $browser['name']='IE';
328
+ $browser['version']=$pcs[1];
329
+ $browser['emulation']=rtrim('IE'." ".$this->majorVersion($pcs[1]));
330
+ $iestring=$pcs[3];
331
+ }
332
+ //differentiate IE from IE-based and IE-masked browsers or spiders
333
+ if(!empty($iestring)){
334
+ if(preg_match('/\s(AOL|America\sOnline\sBrowser)\s(\d+(\.\d+)*)/',$iestring,$pcs)>0){
335
+ $browser['name']='AOL';
336
+ $browser['version']=$pcs[2];
337
+
338
+ }elseif(preg_match('#\s(Opera|Netscape|Crazy\sBrowser)/?\s?(\d+(?:\.\d+)*)#',$iestring,$pcs)>0){
339
+ $browser['name']=$pcs[1];
340
+ $browser['version']=$pcs[2];
341
+
342
+ }elseif(preg_match('/\s(Avant|Orca)\sBrowser;/',$iestring,$pcs)>0){
343
+ $browser['name']=$pcs[1];
344
+ $browser['version']="";
345
+
346
+ }elseif(preg_match('/Windows\sCE;\s?IEMobile\s(\d+)(\.\d+)*\)/i',$iestring,$pcs)>0){
347
+ $browser['name']='IEMobile';
348
+ $browser['version']=$pcs[1];
349
+ $browser['os']='WinCE';
350
+ $browser['platform']='WAP';
351
+ $ismobile=true;
352
+ }elseif(preg_match('#\s(\d+x\d+)?\;?\s?(?:WebTV|MSNTV)(?:/|\s)([0-9\.]+)*#i',$iestring,$pcs)>0){
353
+ $browser['name']="MSNTV";
354
+ $browser['version']=$pcs[2];
355
+ $browser['platform']='Embedded';
356
+ $browser['device']='TV';
357
+ if(!empty($pcs[1])) $browser['resolution']=$pcs[1];
358
+ }
359
+ }
360
+ }
361
+ //### Step 3: Check for All Other browsers
362
+ if(empty($browser['name']) || (!$ismobile && $browser['name']!="IE")){
363
+ //Opera browsers
364
+ if(preg_match('#Opera[/ ]([0-9\.]+)#',$ua,$pcs)>0){
365
+ $browser['name']='Opera';
366
+ $browser['version']=$pcs[1];
367
+
368
+ //Firefox-based browsers (Camino, Flock) (find before FF)
369
+ }elseif(preg_match('#[^a-z](Camino|Flock|Galeon|Orca)/(\d+[\.0-9a-z]*)#',$ua,$pcs)>0){
370
+ $browser['name']=$pcs[1];
371
+ $browser['version']=$pcs[2];
372
+
373
+ //other Gecko-type browsers (incl. Firefox)
374
+ }elseif(preg_match('#Gecko/\d+\s([a-z0-9_\- ]+)/(\d+[\.0-9a-z]*)(?:$|[^a-z0-9_\-]+([a-z0-9_\- ]+)/(\d+[\.0-9a-z]*)|[^a-z0-9_\-]*\(.*\))#i',$ua,$pcs)>0){
375
+ $browser['name']=$pcs[1];
376
+ $browser['version']=$pcs[2];
377
+ if(!empty($pcs[3])&& stristr($pcs[3],"Firefox")!==false){
378
+ $browser['name']='Firefox';
379
+ $browser['version']=$pcs[4];
380
+ }
381
+ //Firefox browser
382
+ }elseif(preg_match('#[^a-z](Fire(?:fox|bird))/?(\d+[\.0-9a-z]*)?#',$ua,$pcs)>0){
383
+ $browser['name']=$pcs[1];
384
+ if(!empty($pcs[2]))$browser['version']=$pcs[2];
385
+ //Mozilla browser (like FF, but nothing after "rv:" or "Gecko")
386
+ }elseif(preg_match('/^Mozilla\/\d\.\d.+\srv\:(\d[\.0-9a-z]+)[^a-z0-9]+(?:Gecko\/\d+)?$/i',$ua,$pcs)>0){
387
+ $browser['name']='Mozilla';
388
+ if(!empty($pcs[1]))$browser['version']=$pcs[1];
389
+
390
+ //WebKit-based browsers
391
+ }elseif(preg_match('#^Mozilla/\d\.\d\s\((?:([a-z]{3,}.*\s)?([a-z]{2}(?:\-[A-Za-z]{2})?)?)\)\sAppleWebKit/[0-9\.]+\+?\s\([a-z, ]*like\sGecko[a-z\; ]*\)\s([a-zA-Z0-9\./]+(?:\sMobile)?/?[A-Z0-9]*)?(\sSafari/([0-9\.]+))?$#',$ua,$pcs)>0){
392
+ if(!empty($pcs[3]))$vers=$pcs[3];
393
+ else $vers=$pcs[5];
394
+ $webkit=$this->webkitVersion($vers,$ua);
395
+ if(!empty($webkit['name'])){
396
+ $browser['name']=$webkit['name'];
397
+ $browser['version']=$webkit['version'];
398
+ }
399
+ if(!empty($pcs[2]))$browser['language']=$pcs[2];
400
+
401
+ //Text-only browsers Lynx, ELinks...(yep, they still exist)
402
+ }elseif(preg_match("#^(E?Links|Lynx|(?:Emacs\-)?w3m)[^a-z0-9]+([0-9\.]+)?#i",$ua,$pcs)){
403
+ $browser['name']=$pcs[1];
404
+ if(!empty($pcs[2]))$browser['version']=$pcs[2];
405
+
406
+ //Some obscure browsers
407
+ }elseif(preg_match("#(?:^|[^a-z0-9])(ActiveWorlds|Dillo|OffByOne)[/\sv\.]*([0-9\.]+)?#i",$ua,$pcs)){
408
+ $browser['name']=$pcs[1];
409
+ if(!empty($pcs[2]))$browser['version']=$pcs[2];
410
+ else $browser['version']="";
411
+ }
412
+ //TODO: Embedded web browsers (EZLinks, bsalsa)
413
+ //
414
+ if(empty($browser['name'])){
415
+ //Any browser that use the word "browser" in agent
416
+ if(preg_match("#([a-z0-9]+)[\- _\.]Browser[/ v\.]*([0-9\.]+)?#i",$ua,$pcs)){
417
+ $browser['name']=$pcs[1];
418
+ if(!empty($pcs[2]))$browser['version']=$pcs[2];
419
+ else $browser['version']="";
420
+
421
+ //simple alphanumeric strings are usually a crawler
422
+ }elseif(preg_match("#^([a-z]+[\s_]?[a-z]*)[\-/]?([0-9\.]+)*$#",$ua,$pcs)>0){
423
+ $browser['name']=trim($pcs[1]);
424
+ if(!empty($pcs[2]))$browser['version']=$pcs[2];
425
+ if(empty($browser['os'])&& $browser['platform']!="WAP" && stristr($pcs[1],'mozilla')===false)$browser['agenttype']="R";
426
+ }
427
+ }
428
+ } //end if empty(browser[name])
429
+
430
+ //get operating system
431
+ if(empty($browser['os'])&& !empty($browser['name'])&& $browser['agenttype']=="B"){
432
+ list($browser['os'],$platform)=$this->OSversion('',$browser['platform'],$ua);
433
+ if(!empty($platform)&& empty($browser['platform']))$browser['platform']=$platform;
434
+ //if(empty($browser['os'])&& empty($browser['platform']){
435
+ // $browser['os']="unknown";
436
+ //}
437
+ }
438
+
439
+ //check http header for user agent spoofing and for os and screen resolution
440
+ if($is_current_ua){
441
+ list($name,$os,$platform,$resolution,$uatype)=$this->getHeaderData();
442
+ if(!empty($name)) {
443
+ $browser['name']=$name;
444
+ if(!empty($uatype))$browser['agenttype']=$uatype;
445
+ }
446
+ if(!empty($os))$browser['os']=$os;
447
+ if(!empty($resolution))$browser['resolution']=$resolution;
448
+ }
449
+
450
+ if($browser['agenttype']=="B" && empty($browser['language'])){
451
+ $browser['language']=$this->detectLanguage($ua);
452
+ if(!empty($browser['resolution'])){
453
+ if(!empty($wap)|| $browser['platform']=='WAP')$browser['resolution']=$this->detectResolution($ua,'WAP');
454
+ else $browser['resolution']=$this->detectResolution($ua);
455
+ }
456
+ }
457
+ //check for script injection in user-agent string
458
+ if($this->isSpammer($ua)!==false){
459
+ if(function_exists('__'))$browser['name']=__("Script Injection Bot");
460
+ else $browser['name']="Script Injection Bot";
461
+ $browser['agenttype']="S";
462
+ }
463
+ if(!empty($browser['name'])){
464
+ $browser['name']=rtrim($browser['name'],'_- ');
465
+ if(empty($agent)){
466
+ $this->setClassVars($browser);
467
+ if($ismobile || $browser['platform']=='WAP' || strstr($browser['name'],' Mobile')!==false || strstr($browser['name'],' Mini')!==false){
468
+ $this->is_mobile=true;
469
+ }
470
+ }
471
+ }else{
472
+ $browser=false;
473
+ }
474
+ $this->_done_browsers=true;
475
+ return $browser;
476
+ } //end function isBrowserAgent
477
+
478
+ /**
479
+ * detect mobile device browsers or other embedded browsers
480
+ * @access public
481
+ * @param string
482
+ * @return array(browser, device, model, platform)
483
+ */
484
  function isMobileAgent($agent=""){
485
+ $ua="";
486
+ $is_current_ua=false;
487
+ if(empty($agent)) list($ua,$is_current_ua)=$this->isCurrentAgent($agent);
488
+ else $ua=$agent;
489
+ if(empty($ua)) return false; //nothing to check
490
+ $ismobile=false;
491
+ //$device=$ua;
492
+ $wap=array('name'=>"",'version'=>"",'device'=>"",'model'=>"",'os'=>"",'platform'=>"WAP");
493
+ //detect known mobile browsers
494
+
495
+ //Android-based devices
496
+ if(preg_match("#^(?:([a-z0-9\-\s_]{3,})\s)?Mozilla/\d\.\d\s\([a-z\;\s]+Android\s([0-9\.]+)(?:\;\s([a-z]{2}(?:\-[A-Za-z]{2})?)\;)?.*Gecko\)\s([a-zA-Z0-9\./]+(?:\sMobile)?/?[A-Z0-9]*)?(\sSafari/([0-9\.]+))?#i",$ua,$pcs)){
497
+ if(!empty($pcs[4])) $vers=$pcs[4];
498
+ else $vers=$pcs[6];
499
+ $webkit=$this->webkitVersion($vers,$ua);
500
+ if(!empty($webkit['name'])){
501
+ $wap['name']=$webkit['name'];
502
+ $wap['version']=$webkit['version'];
503
+ }
504
+ $wap['os']="Android";
505
+ if(!empty($pcs[2])) $wap['os'] .=" ".$this->majorVersion($pcs[2]);
506
+ if(!empty($pcs[3])) $wap['language']=$pcs[3];
507
+ if(!empty($pcs[1])) $wap['device']=$pcs[1];
508
+
509
+ //Windows Mobile browsers
510
+ }elseif(preg_match('#(Windows\sPhone(?:\sOS)?\s[0-9.]+);\s.+\s(IEMobile|Edge)\/(\d+(?:\.?\d+)?)#i',$ua,$pcs)>0){
511
+ $wap['name']=$pcs[2];
512
+ $wap['version']=$pcs[3];
513
+ $wap['os']=$this->winOSversion($pcs[1]);
514
+ //Windows IE Mobile browser
515
+ }elseif(preg_match('#Windows\sCE;\s?IEMobile\s(\d+)(\.\d+)*\)#i',$ua,$pcs)>0){
516
+ $wap['name']='IEMobile';
517
+ $wap['version']=$pcs[1];
518
+ $wap['os']='WinCE';
519
+ //Opera Mini/mobile browsers
520
+ }elseif(preg_match('#(Opera\s(?:Mini|Mobile))[/ ]([0-9\.]+)#',$ua,$pcs)>0){
521
+ $wap['name']=$pcs[1];
522
+ $wap['version']=$pcs[2];
523
+
524
+ //NetFront and other mobile/embedded browsers
525
+ }elseif(preg_match("#(NetFront|NF\-Browser)/([0-9\.]+)#i",$ua,$pcs)){
526
+ $wap['name']="NetFront";
527
+ $wap['version']=$pcs[2];
528
+ }elseif(preg_match("#[^a-z0-9](Bolt|Iris|Jasmine|Minimo|Novarra\-Vision|Polaris)/([0-9\.]+)#i",$ua,$pcs)){
529
+ $wap['name']=$pcs[1];
530
+ $wap['version']=$pcs[2];
531
+ }elseif(preg_match("#(UP\.browser|SMIT\-Browser)/([0-9\.]+)#i",$ua,$pcs)){
532
+ $wap['name']=$pcs[1];
533
+ $wap['version']=$pcs[2];
534
+ }elseif(preg_match("#\((jig\sbrowser).*\s([0-9\.]+)[^a-z0-9]#i",$ua,$pcs)){
535
+ $wap['name']=$pcs[1];
536
+ $wap['version']=$pcs[2];
537
+ }elseif(preg_match("#[^a-z]Obigo#i",$ua,$pcs)){
538
+ $wap['name']='Obigo';
539
+ }elseif(preg_match("#openwave(\suntrusted)?/([0-9\.]+)#i",$ua,$pcs)){
540
+ $wap['name']='OpenWave';
541
+ $wap['version']=$pcs[2];
542
+ }
543
+ if(!empty($wap['name'])){
544
+ $ismobile=true;
545
+ }
546
+
547
+ //known mobile devices...
548
+ if(preg_match('#(alcatel|amoi|blackberry|docomo\s|htc|ipaq|kindle|kwc|lge|lg\-|lumia|mobilephone|motorola|nexus\sone|nokia|PDA|Palm|Samsung|sanyo|smartphone|SonyEricsson|\st\-mobile|vodafone|zte)[/\-_\s]?((?:\d|[a-z])+\d+[a-z]*)*#i',$ua,$pcs)>0){
549
+ $ismobile=true;
550
+ $wap['device']=trim($pcs[1],'-_ /');
551
+ if(!empty($pcs[2]))$wap['model']=$pcs[2];
552
+ if($pcs[1]=="KWC"){
553
+ $wap['device']=="Kyocera phone";
554
+ $wap['model']==$pcs[0];
555
+ }
556
+ if(empty($wap['name']))$wap['name']=$pcs[1];
557
+ }
558
+ //check if user-agent has mobile profile
559
+ if(!$ismobile){
560
+ if(preg_match('#(J2ME/MIDP|Profile/MIDP|Danger\sHiptop|\sOpenWeb\s\d)#i',$ua)>0){
561
+ $ismobile=true;
562
+
563
+ //check ifbrowser HTTP header has a mobile profile
564
+ }elseif($is_current_ua){
565
+ $header_profile =array('X_WAP_PROFILE','PROFILE','13_PROFILE','56_PROFILE');
566
+ foreach($header_profile AS $wap_profile){
567
+ if(!empty($_SERVER["HTTP_{$wap_profile}"])){
568
+ //has a user-agent profile header, so it's probably a mobile device
569
+ $ismobile=true;
570
+ break 1;
571
+ }
572
+ }
573
+ //check for wireless transcoder gateways
574
+ if(!$ismobile && !empty($_SERVER["HTTP_VIA"])&& preg_match('/([^a-z0-9]WAP|mobile)/i',$_SERVER["HTTP_VIA"])>0){
575
+ $ismobile=true;
576
+ }
577
+ }
578
+ //TODO: check for wireless transcoder service user agents
579
+ if(!$ismobile && preg_match('#wireless\stranscoder#i',$ua)>0)$ismobile=true;
580
+ }
581
+ //set os=device, if missing
582
+ if($ismobile){
583
+ if(!empty($wap['device'])){
584
+ if(empty($wap['name']))$wap['name']=$wap['device'];
585
+ elseif(empty($wap['os']))$wap['os']=$wap['device'];
586
+ }
587
+ }
588
+ if($ismobile){
589
+ if(empty($wap['os']))$wap['os']="WAP";
590
+ return $wap;
591
+ }else{
592
+ return false;
593
+ }
594
+ } //end function isMobileAgent
595
+
596
+ /**
597
+ * detect crawlers, feed readers, link checkers, and other spiders
598
+ * @access public
599
+ * @param string (optional)
600
+ * @return array (associative)
601
+ */
602
  function isSpiderAgent($agent=""){
603
+ $ua="";
604
+ $is_current_ua=false;
605
+ list($ua,$is_current_ua)=$this->isCurrentAgent($agent);
606
+ if(empty($ua))return false; //nothing to check
607
+ $unknown_spider=(function_exists("__"))?__("Unknown Spider"):"Unknown Spider";
608
+ $unknown_feedreader=(function_exists("__"))?__("Unknown Feedreader"):"Unknown Feedreader";
609
+ //##detect spiders
610
+ $spider=array('name'=>"",'version'=>"",'os'=>"",'platform'=>"",'language'=>"",'agenttype'=>"R",'subscribers'=>"");
611
+ // #11 FriendFeedBot
612
+ if(preg_match('#^Mozilla/\d\.\d\s\(compatible;\sFriendFeedBot/([0-9\.]+);\s\+Http\://friendfeed\.com/about/bot\)$#',$ua,$match)>0){
613
+ $spider['name']='FriendFeedBot';
614
+ $spider['version']=$match[1];
615
+ $spider['agenttype']='F';
616
+
617
+ // #12 Twiceler
618
+ }elseif(preg_match('#^Mozilla/\d\.\d\s\(Twiceler\-(\d\.\d)\shttp://www\.cuill?\.com/twiceler/robot\.html\)$#',$ua,$match)>0){
619
+ $spider['name']='Twiceler';
620
+ $spider['version']=$match[1];
621
+ $spider['agenttype']='R';
622
+
623
+ // #13 FeedFetcher Google
624
+ }elseif(preg_match('#^Feedfetcher\-Google[;\s\(\+]+http\://www\.google\.com/feedfetcher\.html[;\)\s]+(?:(\d)\ssubscriber)?#',$ua,$match)>0){
625
+ $spider['name']='FeedFetcher-Google';
626
+ if(!empty($match[1]))$spider['subscribers']=$match[1];
627
+ $spider['agenttype']='F';
628
+
629
+ //Twitterfeed
630
+ }elseif(preg_match('/[^a-z]twitterfeed/i',$ua,$match)>0){
631
+ $spider['name']='Twitterfeed';
632
+ $spider['agenttype']='F';
633
+
634
+ // Nutch spiders
635
+ }elseif(preg_match('#^([a-z]+)?/?nutch\-([0-9\.]+)#i',$ua,$match)>0){
636
+ if(!empty($match[1]))$spider['name']=$match[1];
637
+ else $spider['name']='Nutch';
638
+ $spider['version']=$match[2];
639
+ $spider['platform']="Nutch";
640
+
641
+ // Larbin spiders
642
+ }elseif(preg_match('#^larbin[\-_\s\/]?(v?[0-9\.]+)?#i',$ua,$match)>0){
643
+ $spider['name']='Larbin';
644
+ $spider['platform']="larbin";
645
+ if(!empty($match[1]))$spider['version']=$match[1];
646
+ }elseif(preg_match('#^([a-z_]+)[\-\s\/]?(v?[0-9\.]+)?[^a-z]+larbin([0-9\.]+)\@#i',$ua,$match)>0){
647
+ $spider['name']=$match[1];
648
+ $spider['platform']="larbin";
649
+ if(!empty($match[2]))$spider['version']=$match[2];
650
+
651
+ // #Yahoo spiders
652
+ }elseif(preg_match('#^Mozilla/\d\.\d[^a-z0-9_\-]+(Yahoo[\-\!\s_]+[a-z]+)/?([0-9\.]+)?[^a-z0-9_\-]+.+yahoo.*\.com#i',$ua,$match)>0){
653
+ $spider['name']=$match[1];
654
+ if(!empty($match[2]))$spider['version']=$match[2];
655
+
656
+ // #Microsoft winHTTP-based spiders
657
+ }elseif(preg_match('#WinHTTP#i',$ua,$match)>0){
658
+ $spider['name']="WinHTTP";
659
+
660
+ // #Apple CFNetwork-based spiders
661
+ }elseif(preg_match('#^((?:[a-z]|\%20)+)\/?([0-9\.]+).*[^a-z0-9]CFNetwork\/?([0-9\.]+)#',$ua,$match)>0){
662
+ $spider['name']=$match[1];
663
+ if(!empty($match[2]))$spider['version']=$match[2];
664
+
665
+ // #Caching agents, Proxy server agents
666
+ }elseif(preg_match('/^Mozilla\/\d\.\d\s\(compatible\;\s(HTTrack|ICS)(?:\s(\d\.[a-z0-9]+))?[^a-z0-9\s]/',$ua,$match)>0){
667
+ $spider['name']=$match[1];
668
+ if(!empty($match[2]))$spider['version']=$match[2];
669
+ if(strlen($match[1])< 5)$spider['name']=$match[1]. " Spider";
670
+
671
+ //TODO: Libwww spiders
672
+ //TODO: Trackback agents from blogs on MovableType, Drupal, DotNetNuke,...
673
+
674
+ // #Assume bot if user-agent includes a url (http|www) with a name repeated
675
+ }elseif(preg_match('/^(?:Mozilla\/.*compatible[^a-z]*)?(([a-z]{3,})[\-\s_]?(?:bot|crawl|robot|spider|parser|reader)?[a-z]*)[^a-z^0-9]+v?\s?([0-9\.]+)?.*[^a-z]+(?:http|www).*[^a-z]+(?:\2|\3)\/?(?:\.?[a-z]+)?\.(?:com|net|org|html?|aspx?|[a-z]{2})/i',$ua,$match)>0){
676
+ $spider['name']=$match[1];
677
+ if(!empty($match[3]))$spider['version']=$match[3];
678
+ }elseif(preg_match('#^Mozilla\/\d\.\d\s\(compatible;\s([a-z_ ]+)(?:[-/](\d+\.\d+))?;\s.?http://(?:www\.)?[a-z]+(?:[a-z\.]+)\.(?:[a-z]{2,4})/?[a-z/]*(?:\.s?html?|\.php|\.aspx?)?\)$#i',$ua,$match)>0){
679
+ $spider['name']=$match[1];
680
+ if(!empty($match[2]))$spider['version']=$match[2];
681
+
682
+ // #Assume bot if user-agent 1st word and a contact domain are the same name, ex: Feedburner-feedburner.com, CazoodleBot,
683
+ }elseif(preg_match('/([a-z\_\s\.]+)[\s\/\-_]?(v?[0-9\.]+)?.*(?:http\:\/\/|www\.)(\1)\.[a-z0-9_\-]+/i',$ua,$match)>0){
684
+ $spider['name']=$match[1];
685
+ if(!empty($match[2]))$spider['version']=$match[2];
686
+ // #Assume bot if one-word user-agent+http address
687
+ }elseif(preg_match('/^([a-z\_\.]+)[\s\/\-_]?(v?[0-9\.]+)?[\s\(\+]*(?:http\:\/\/|www\.)[a-z0-9_\-]+\.[a-z0-9_\-\.]+\)?/i',$ua,$match)>0){
688
+ $spider['name']=$match[1];
689
+ if(!empty($match[2]))$spider['version']=$match[2];
690
+ // #Assume bot if name+http://name...
691
+ }elseif(preg_match('/([a-z]+[a-z0-9]{2,})[\s\/\-]?([0-9\.]+)?[^a-z]+[^0-9]*http\:.*\/(\1)[^a-z]/i',$ua,$match)>0){
692
+ $spider['name']=$match[1];
693
+ if(!empty($match[2]))$spider['version']=$match[2];
694
+
695
+ // #Assume bot if name+name@emaildomain...
696
+ }elseif(preg_match('/([a-z]+[a-z0-9]{2,})[\s\/\-]?([0-9\.]+)?.*[^a-z0-9](\1)@[a-z0-9\-_]{2,}\.[a-z0-9\-_]{2,}/i',$ua,$match)>0){
697
+ $spider['name']=$match[1];
698
+ if(!empty($match[2]))$spider['version']=$match[2];
699
+
700
+ // #Assume bot if user-agent includes contact email
701
+ }elseif(preg_match('#^Mozilla\/\d\.\d\s\(compatible;\s([a-z_ ]+)(?:[-/](\d+\.\d+))?;\s[^a-z0-9]?([a-z0-9\.]+@[a-z0-9]+\.[a-z]{2,4})\)$#i',$ua,$match)>0){
702
+ $spider['name']=$match[1];
703
+ if(!empty($match[2]))$spider['version']=$match[2];
704
+ }elseif(preg_match('/^(([a-z]+)\s?(bot|crawler|robot|spider|\s[a-z]+)?)[\/\-\s_](v?[0-9\.]+)?.*[^a-z]+(?:\1|\2|\3)(?:\@|\s?at\s?)[a-z\-_]{2,}(?:\.|\s?dot\s)[a-z]{2,4}/i',$ua,$match)>0){
705
+ $spider['name']=$match[1];
706
+ if(!empty($match[4]))$spider['version']=$match[4];
707
+ }elseif(preg_match('/^(([a-z]+)\s?(bot|crawler|robot|spider|\s[a-z]+)?)[\/\-\s_](v?[0-9\.]+)?.*[^a-z]+[a-z\-_]+(?:\@|\s?at\s?)(?:\1|\2|\3)(?:\.|\s?dot\s)[a-z]{2,4}/i',$ua,$match)>0){
708
+ $spider['name']=$match[1];
709
+ if(!empty($match[4]))$spider['version']=$match[4];
710
+ }elseif(preg_match('/^([a-z]+)[\/\-\s_](v?[0-9\.]+)?.*[a-z0-9_\.]+(?:\@|\sat\s)[a-z0-9\-_]+(?:\.|\s?dot\s)[a-z]{2,4}[^a-z]/i',$ua,$match)>0){
711
+ $spider['name']=$match[1];
712
+ if(!empty($match[2]))$spider['version']=$match[2];
713
+
714
+ // Assume bot if user-agent contains (http|www)name
715
+ // followed by name(+)/version. Ex: Daumoa spider
716
+ }elseif(preg_match('/(?:http|www[a-z0-9]?)[^a-z].*[^a-z]([a-z0-9\-_]{4,}).*\.(?:com|net|org|biz|info|html?|aspx?|[a-z]{2})[^a-z0-9]+(\1[a-z_\-]+)[\/|\s|v]+([\d\.]+)/i',$ua,$match)>0){
717
+ $spider['name']=$match[2];
718
+ $spider['version']=$match[3];
719
+
720
+ // #Assume bot if one-word user-agent.
721
+ }elseif(preg_match('/^([a-z\_\.]+)[\s\/\-_]?(v?[0-9\.]+)?$/i',$ua,$match)>0){
722
+ $spider['name']=$match[1];
723
+ if(!empty($match[2]))$spider['version']=$match[2];
724
+ // Assume bot if user-agent contains (http|www)name
725
+ // followed by name(+)/version. Ex: Daumoa spider
726
+ }elseif(preg_match('/(?:http|www[a-z0-9]?)[^a-z].*[^a-z]([a-z0-9\-_]{4,}).*\.(?:com|net|org|biz|info|html?|aspx?|[a-z]{2})[^a-z0-9]+(\1[a-z_\-]+)[\/|\s|v]+([\d\.]+)/i',$ua,$match)>0){
727
+ $spider['name']=$match[2];
728
+ $spider['version']=$match[3];
729
+
730
+ // #Assume bot if single-word user-agent.
731
+ }elseif(preg_match('/^([a-z\_\.]+)[\s\/\-_]?(v?[0-9\.]+)?$/i',$ua,$match)>0){
732
+ $spider['name']=$match[1];
733
+ if(!empty($match[2]))$spider['version']=$match[2];
734
+
735
+ //Spiders with bot, spider, or crawler in name plus version
736
+ }elseif(preg_match('#(\w+[\s\-_]?(?:bot|crawler|checker|feed|parser|reader|spider|verifier))(?:[\/\s\-\:_])?v?([0-9\.]+)#i',$ua,$match)>0){
737
+ $spider['name']=$match[1];
738
+ $spider['version']=$match[2];
739
+
740
+ //Spiders with bot, reader, spider, or crawler with no version#
741
+ }elseif(preg_match('#([a-z\s]*(?:blog|feed|site)?[a-z\s\-_]*(?:bot|checker|crawler|reader|parser|spider|verifier))(?:$|^[a-z])#i',$ua,$match)>0){
742
+ $spider['name']=$match[1];
743
+ $spider['version']="";
744
+
745
+
746
+ //Some obscure spiders
747
+ }elseif(preg_match('#(\spowermarks)\/([0-9\.]+)#i',$ua,$match)>0){
748
+ $spider['name']=$match[1];
749
+ $spider['version']=$match[2];
750
+ }else{
751
+ if(preg_match("#(robot|bot[\s\-_\/]|bot$|crawl|spider|feed[\s\-_\/]|feed$|fetcher|parser|reader|href|[^\.e]link[\s\-_\/]|linkcheck|checker|http\:\/\/|[^a-z]www[0-9]?\.[a-z0-9_\-]+\.[a-z]{2,3}[^a-z])#i",$ua)>0){
752
+ $spider['name']=$unknown_spider;
753
+ $spider['agenttype']="R";
754
+ }elseif(preg_match("#([a-z0-9_]+(?:\@|\sat\s)[a-z0-9_\-]+(?:\.|\sdot\s)|\/.+\.(?:html?|aspx?|php5?|cgi))#i",$ua)>0){
755
+ $spider['name']=$unknown_spider;
756
+ $spider['agenttype']="R";
757
+ }
758
+ }
759
+ //distinguish feed readers from other spiders
760
+ if(!empty($spider['name'])){
761
+ if($spider['agenttype']!="F" && preg_match("/(feed|rss|atom|xml)/i",$ua)>0){
762
+ $spider['agenttype']="F";
763
+ if(strstr($spider['name'],$unknown_spider)!==false)$spider['name']=$unknown_feedreader;
764
+ }
765
+ if(empty($spider['subscribers'])&& preg_match("/([0-9]{1,10})\s?subscriber/i",$ua,$subscriber)> 0){
766
+ // It's a feedreader with some subscribers
767
+ $spider['subscribers']=$subscriber[1];
768
+ $spider['agenttype']="F";
769
+ }
770
+
771
+ //Some spiders give OS information
772
+ if(empty($spider['os'])){
773
+ if(!$is_current_ua)list($spider['os'],$platform)=$this->OSversion($ua);
774
+ else list($spider['os'],$platform)=$this->OSversion();
775
+ if(!empty($platform)&& empty($spider['platform']))$spider['platform']=$platform;
776
+ }
777
+ $spider['name']=rtrim($spider['name'],'_- ');
778
+ } //end if empty(spider[name])
779
+
780
+ // #Check for spam and script injection attempts
781
+ if($this->isSpammer($ua)!==false){
782
+ $spider['name']=_e("Script Injection Bot");
783
+ $spider['agenttype']="S";
784
+ }
785
+ if(empty($spider['name']))$spider=false;
786
+ else $this->setClassVars($spider);
787
+ $this->_done_spiders=true;
788
+ return $spider;
789
+ } //end function isSpiderAgent
790
+
791
+ /**
792
+ * check if user-agent is a feed and find number of subscribers
793
+ * @return array
794
+ */
795
+ function isFeed($feed_name,$ua=""){
796
+ if(empty($ua)){
797
+ if(!empty($feed_name)){
798
+ $ua=$feed_name;
799
+ $feed_name="";
800
+ }else{
801
+ $ua=$this->agent;
802
+ }
803
+ }
804
+ //separate feed readers from spiders
805
+ if(preg_match("/([0-9]+)\s?subscriber/i",$ua,$subscriber)>0){
806
+ // It's a feedreader with some subscribers
807
+ $feed['subscribers']=$subscriber[1];
808
+ $feed['agenttype']="F";
809
+ }elseif(preg_match("/(feed|rss)/i",$ua)>0){
810
+ $feed['agenttype']="F";
811
+ }
812
+ if(!empty($feed['agenttype'])){
813
+ if(!empty($feed_name))$feed['name']=$feed_name;
814
+ return $feed;
815
+ }else{
816
+ return false;
817
+ }
818
+ } //end function isFeed
819
+
820
+ /**
821
+ * Check string for obvious signs of spam, hack, and script
822
+ * injection attempts
823
+ * @access public
824
+ * @return boolean
825
+ */
826
+ function isSpammer($agent=""){
827
+ if(empty($agent))$ua=$this->agent;
828
+ else $ua=$agent;
829
+ $spambot=false;
830
+ //## Find obvious script injection bots
831
+ if(stristr($ua,'location.href')!==FALSE)$spambot=true;
832
+ elseif(preg_match('/(<|&lt;|&#60;|%3C)script/i',$ua)>0)$spambot=true;
833
+ elseif(preg_match('/(<|&lt;|&#60;|%3C)a(\s|%20|&#32;|\+)+href/i',$ua)>0)$spambot=true;
834
+ elseif(preg_match('/(select|update).*( |%20|%#32;|\+)from( |%20|%#32;|\+)/i',$ua)>0)$spambot=true;
835
+ elseif(preg_match('/(drop|alter)(?:\s|%20|%#32;|\+)table/i',$ua)>0)$spambot=true;
836
+
837
+ return $spambot;
838
+ } //end function isSpammer
839
+
840
+ /**
841
+ * Try to identify a mystery browser|spider by re-checking
842
+ * 'isBrowserAgent()' or by using PHP's 'get_browser' with server
843
+ * Browscap file in 'getBrowscap()'.
844
+ * @access private
845
+ * @return none
846
+ */
847
+ function isWTF($ua=""){
848
+ //recheck browsers or check PHP's browser capabilities file
849
+ if(isset($this->_done_browsers)&& !$this->_done_browsers){
850
+ return $this->isBrowserAgent($ua);
851
+ }else{
852
+ $unknown_agent=$this->getBrowscap($ua);
853
+ if(!empty($unknown_agent['name']))$this->setClassVars($unknown_agent);
854
+ }
855
+ }
856
+
857
+ /**
858
+ * Find operating system and platform from string (or user-agent)
859
+ * @access public
860
+ * @return array(os_type, platform, device)
861
+ */
862
+ function OSversion($os="",$platform="",$ua=""){
863
+ $is_current_ua=false;
864
+ if(empty($os)){
865
+ if(empty($ua))list($ua,$is_current_ua)=$this->isCurrentAgent();
866
+ $os=$ua;
867
+ }
868
+ //some browsers (IEMobile) show OS in HTTP header, use when available
869
+ if($is_current_ua){
870
+ if(!empty($_SERVER['HTTP_UA_OS']))$os=$_SERVER['HTTP_UA_OS'];
871
+ }
872
+ $os_type="";
873
+ $device="";
874
+ if(!empty($os)){
875
+ if(preg_match('/(Windows|Win|NT)[0-9;\s\)\/]/',$os)>0){
876
+ $os_type=$this->winOSversion($os);
877
+ if(!$os_type) $os_type="Windows";
878
+ $platform="Windows";
879
+ }elseif(strpos($os,'Intel Mac OS X')!==FALSE || strpos($os,'PPC Mac OS X')!==FALSE){
880
+ $platform='Macintosh';
881
+ $os_type='MacOSX';
882
+ $device='PC';
883
+
884
+ //iPhone OS similar to OSX, so test before OSX to identify
885
+ }elseif(preg_match('/\siPhone\sOS\s(\d+)?(?:_\d)*/i',$os,$match)>0){
886
+ $version="";
887
+ if(!empty($match[1])) $version=$match[1];
888
+ if(strpos($os,'iPod')!==FALSE){
889
+ $os_type='iPhone OS';
890
+ $platform="WAP";
891
+ $device='iPod Touch';
892
+ }else{
893
+ $os_type='iPhone OS';
894
+ $platform="WAP";
895
+ $device='iPhone'." $version";
896
+ }
897
+ }elseif(stristr($os,'iPhone')!==FALSE){
898
+ $os_type='iPhone';
899
+ $platform="WAP";
900
+ }elseif(strpos($os,'Mac OS X')!==FALSE){
901
+ if(!empty($platform)){
902
+ $os_type="{$platform}";
903
+ }else{
904
+ $os_type='MacOSX';
905
+ $platform='Macintosh';
906
+ }
907
+ }elseif(preg_match('/Android\s?([0-9\.]+)?/',$os)>0){
908
+ $os_type='Android'; //Google Android
909
+ if(!empty($match[1])) $version=$match[1];
910
+ $platform='WAP'; //Linux
911
+ }elseif(preg_match('/[^a-z0-9](BeOS|BePC|Zeta)[^a-z0-9]/',$os)>0){
912
+ $os_type='BeOS';
913
+ }elseif(preg_match('/[^a-z0-9](Commodore\s?64)[^a-z0-9]/i',$os)>0){
914
+ $os_type='Commodore64';
915
+ }elseif(preg_match('/[^a-z0-9]Darwin\/?([0-9\.]+)/i',$os,$match)>0){
916
+ $os_type="Darwin";
917
+ $version=$match[1];
918
+ if(preg_match('/(MacBook|iMac|Macintosh|powerpc-apple)/i',$os)>0){
919
+ $platform='Macintosh';
920
+ $device=$match[1];
921
+ }else{
922
+ $platform='Unix';
923
+ }
924
+ }elseif(preg_match('/[^a-z0-9]Darwin[^a-z0-9]/i',$os,$match)>0){
925
+ $os_type="Darwin";
926
+ $platform="Unix";
927
+ }elseif(preg_match('/((?:Free|Open|Net)BSD)\s?(?:[ix]?[386]+)?\s?([0-9\.]+)?/',$os,$match)>0){
928
+ $os_type=$match[1];
929
+ if(!empty($match[2])) $version=$match[2];
930
+ $platform="Unix";
931
+ //find Linux os brand and version
932
+ }elseif(preg_match('/(?:(i[0-9]{3})\s)?Linux\s*((?:i[0-9]{3})?\s*(?:[0-9]\.[0-9]{1,2}\.[0-9]{1,2})?\s*(?:[ix][0-9_]{3,})?)?(?:.+[\s\(](Android|CentOS|Debian|Fedora|Gentoo|Mandriva|PCLinuxOS|SuSE|[KX]?ubuntu)[\s\/\-\)]+(\d+[a-z0-9\.]*)?)?/i',$os,$match)>0){
933
+ $os_type='Linux';
934
+ if(!empty($match[3])){
935
+ $os_type=$match[3];
936
+ //only Ubuntu has non-browser version# after name
937
+ if(!empty($match[4])&& stristr($linuxos,'ubuntu')!==false)$version=$match[4];
938
+ }elseif(!empty($match[2])){
939
+ $version=$match[2];
940
+ }elseif(!empty($match[1])){
941
+ $version=$match[1];
942
+ }
943
+ $platform='Linux';
944
+ }elseif(preg_match('/Linux/i',$os,$match)>0){
945
+ $os_type=$this->linuxOSversion($os);
946
+ $platform="Linux";
947
+ }elseif(preg_match('/(Mac_PowerPC|Macintosh)/',$os)>0){
948
+ $os_type='MacPPC';
949
+ $platform='Macintosh';
950
+ }elseif(preg_match('/Nintendo\s(Wii|DSi?)?/i',$os,$match)>0){
951
+ $os_type='Nintendo';
952
+ $device='Nintendo';
953
+ if(!empty($match[1])) $device .=" ".$match[1];
954
+ }elseif(preg_match('/[^a-z0-9_\-]MS\-?DOS[^a-z]([0-9\.]+)?/i',$os,$match)>0){
955
+ $os_type='MS-DOS'; //yep, it's still around
956
+ if(!empty($match[1])){ $version=$match[1]; }
957
+ }elseif(preg_match('/[^a-z0-9_\-]OS\/2[^a-z0-9_\-].+Warp\s([0-9\.]+)?/i',$os,$match)>0){
958
+ $os_type='OS/2 Warp';
959
+ if(!empty($match[1])){ $version=$match[1]; }
960
+ }elseif(stristr($os,'PalmOS')!==FALSE){
961
+ $os_type='PalmOS';
962
+ $platform='WAP';
963
+ }elseif(preg_match('/PLAYSTATION\s(\d+)/i',$os,$match)>0){
964
+ $os_type='Playstation';
965
+ $version=$match[1];
966
+ $device='Playstation';
967
+ }elseif(preg_match('/IRIX\s*([0-9\.]+)?/i',$os,$match)>0){
968
+ $os_type='SGI Irix';
969
+ if(!empty($match[1]))$version=$match[1];
970
+ $platform="Unix";
971
+ }elseif(preg_match('/SCO_SV\s([0-9\.]+)?/i',$os,$match)>0){
972
+ $os_type='SCO Unix';
973
+ if(!empty($match[1]))$version=$match[1];
974
+ $platform="Unix";
975
+ }elseif(preg_match('/Solaris\s?([0-9\.]+)?/i',$os,$match)>0){
976
+ $os_type='Solaris';
977
+ if(!empty($match[1]))$version=$match[1];
978
+ $platform="Unix";
979
+ }elseif(preg_match('/SunOS\s?(i?[0-9\.]+)?/i',$os,$match)>0){
980
+ $os_type='SunOS';
981
+ if(!empty($match[1]))$version=$match[1];
982
+ }elseif(preg_match('/SymbianOS\/([0-9\.]+)/i',$os,$match)>0){
983
+ $os_type='SymbianOS';
984
+ $version=$match[1];
985
+ $platform="WAP";
986
+ }elseif(preg_match('/[^a-z]Unixware\s(\d+(?:\.\d+)?)?/i',$ua)){
987
+ $os_type='Unixware';
988
+ if(!empty($match[1]))$version=$match[1];
989
+ $platform="Unix";
990
+ }elseif(preg_match('/\(PDA(?:.*)\)(.*)Zaurus/i',$os)>0){
991
+ $os_type='Zaurus'; //Sharp Zaurus
992
+ $platform="WAP";
993
+ }elseif(preg_match('/[^a-z]Unix/i',$ua)){
994
+ $os_type='Unix'; //Unknown unix os
995
+ $platform="Unix";
996
+ }elseif(preg_match('#^Mozilla/\d\.\d\s\(([a-z0-9]+);\sU;\s(([a-z0-9]+)(?:\s([a-z0-9\.\s]+))?);#i',$os,$match)>0){
997
+ $platform=$match[1];
998
+ $os_type=$match[3];
999
+ if(!empty($match[4]))$version=$match[4];
1000
+ }else{
1001
+ $os_type=$this->linuxOSversion($os);
1002
+ //test "OS/2" string last because is not unique in user-agents
1003
+ if($os_type)
1004
+ $platform='Linux';
1005
+ elseif(preg_match('/[^a-z0-9_\-]OS\/2[^a-z0-9_\-]/i',$os,$match)>0)$os_type="OS/2";
1006
+ else $os_type="";
1007
+ }
1008
+ }
1009
+ //TODO: Amiga?,OpenWeb?,openOS?
1010
+ if(empty($os_type)&& !empty($platform))$os_type=$platform;
1011
+ return array($os_type,$platform,$device);
1012
+ } //end OSversion
1013
+
1014
+ /**
1015
+ * Find Microsoft operating system from string (os/user-agent)
1016
+ * @access public
1017
+ * @return string
1018
+ */
1019
+ function winOSversion($os){
1020
+ if(empty($os)) return false;
1021
+ $winos="";
1022
+ if(strstr($os,'Windows NT 10.')){
1023
+ $winos='Win10'; //Windows 10
1024
+ if(strstr($os,'; Xbox')) $winos="Xbox";
1025
+ elseif(strstr($os,'; ARM')) $winos="Win10 Mobile";
1026
+ //Note: WinRT Surface on ARM discontinued in 2015
1027
+ }elseif(strstr($os,'Windows Phone 10.')){
1028
+ $winos='Win10 Mobile'; //Windows on phone/tablet
1029
+ }elseif(strstr($os,'Windows Phone 8.')){
1030
+ $winos='Win8 Mobile'; //Windows on phone
1031
+ }elseif(strstr($os,'Windows NT 6.3')){
1032
+ $winos='Win8'; //Windows 8.1
1033
+ if(strstr($os,'; ARM')) $winos="WinRT";
1034
+ }elseif(strstr($os,'Windows NT 6.2')){
1035
+ $winos='Win8'; //same agent for Windows 8.0 and Win2K12
1036
+ if(strstr($os,'; ARM')) $winos="WinRT";
1037
+ }elseif(strstr($os,'Windows NT 6.1')){
1038
+ $winos='Win7';
1039
+ }elseif(strstr($os,'Windows NT 6.0')){
1040
+ $winos='WinVista'; //winVista, win2K8 server
1041
+ }elseif(strstr($os,'Windows NT 5.2')){
1042
+ $winos='Win2003'; //win2K3 server
1043
+ }elseif(strstr($os,'Windows NT 5.1')){
1044
+ $winos='WinXP';
1045
+ }elseif(strstr($os,'Windows NT 5.0') || strstr($os,'Windows 2000')){
1046
+ $winos='Win2000';
1047
+ }elseif(strstr($os,'Windows ME')){
1048
+ $winos='WinME';
1049
+ }elseif(strstr($os,' Xbox')){
1050
+ $winos='Xbox';
1051
+ }elseif(preg_match('/Win(?:dows\s)?NT\s?([0-9\.]+)?/',$os,$match)>0){
1052
+ $winos='WinNT';
1053
+ if(!empty($match[1])) $winos .=" ".$match[1];
1054
+ }elseif(preg_match('