s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) - Version 111029

Version Description

Download this release

Release Info

Developer PriMoThemes
Plugin Icon 128x128 s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members)
Version 111029
Comparing to
See all releases

Code changes from version 111017 to 111029

Files changed (34) hide show
  1. includes/classes/auto-eots.inc.php +2 -3
  2. includes/classes/constants.inc.php +38 -0
  3. includes/classes/files-in.inc.php +90 -68
  4. includes/classes/files.inc.php +96 -21
  5. includes/classes/login-customizations.inc.php +7 -7
  6. includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php +8 -9
  7. includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php +4 -5
  8. includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php +0 -1
  9. includes/classes/paypal-return-in-subscr-modify-w-level.inc.php +0 -1
  10. includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php +0 -1
  11. includes/classes/profile-mods-4bp-in.inc.php +8 -8
  12. includes/classes/profile-mods-in.inc.php +2 -2
  13. includes/classes/querys.inc.php +12 -12
  14. includes/classes/ssl.inc.php +1 -1
  15. includes/classes/systematics-sp.inc.php +11 -11
  16. includes/classes/systematics.inc.php +10 -4
  17. includes/classes/utils-arrays.inc.php +17 -29
  18. includes/classes/utils-gets.inc.php +1 -1
  19. includes/classes/utils-users.inc.php +11 -11
  20. includes/functions/api-functions.inc.php +162 -4
  21. includes/hooks.inc.php +2 -2
  22. includes/menu-pages/menu-pages-min.js +1 -1
  23. includes/menu-pages/menu-pages-s-min.js +1 -1
  24. includes/menu-pages/menu-pages-s.js +4 -14
  25. includes/menu-pages/menu-pages.css +29 -16
  26. includes/menu-pages/menu-pages.js +9 -2
  27. includes/s2member-min.js +1 -1
  28. includes/s2member.css +2 -0
  29. includes/s2member.js +1 -1
  30. includes/syscon.inc.php +4 -4
  31. includes/templates/cfg-files/s2member-files.php +1 -1
  32. includes/translations/s2member.pot +115 -115
  33. readme.txt +25 -11
  34. s2member.php +6 -5
includes/classes/auto-eots.inc.php CHANGED
@@ -102,8 +102,8 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
102
  /**/
103
  include_once ABSPATH . "wp-admin/includes/admin.php";
104
  /**/
105
- @set_time_limit (0); /* Make time for processing larger userbases. */
106
- @ini_set ("memory_limit", "256M"); /* Acquire some additional RAM. */
107
  /**/
108
  eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
109
  do_action ("ws_plugin__s2member_before_auto_eot_system", get_defined_vars ());
@@ -162,7 +162,6 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
162
  delete_user_option ($user_id, "s2member_last_payment_time");
163
  delete_user_option ($user_id, "s2member_auto_eot_time");
164
  /**/
165
- delete_user_option ($user_id, "s2member_file_download_access_arc");
166
  delete_user_option ($user_id, "s2member_file_download_access_log");
167
  /**/
168
  c_ws_plugin__s2member_user_notes::append_user_notes ($user_id, "Demoted by s2Member: " . date ("D M j, Y g:i a T"));
102
  /**/
103
  include_once ABSPATH . "wp-admin/includes/admin.php";
104
  /**/
105
+ @set_time_limit (0); /* Make time for processing a larger userbase. */
106
+ @ini_set ("memory_limit", apply_filters ("admin_memory_limit", WP_MAX_MEMORY_LIMIT));
107
  /**/
108
  eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
109
  do_action ("ws_plugin__s2member_before_auto_eot_system", get_defined_vars ());
162
  delete_user_option ($user_id, "s2member_last_payment_time");
163
  delete_user_option ($user_id, "s2member_auto_eot_time");
164
  /**/
 
165
  delete_user_option ($user_id, "s2member_file_download_access_log");
166
  /**/
167
  c_ws_plugin__s2member_user_notes::append_user_notes ($user_id, "Demoted by s2Member: " . date ("D M j, Y g:i a T"));
includes/classes/constants.inc.php CHANGED
@@ -1035,6 +1035,10 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
1035
  *
1036
  * @var int
1037
  *
 
 
 
 
1038
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1039
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
1040
  *
@@ -1085,6 +1089,10 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
1085
  *
1086
  * @var bool
1087
  *
 
 
 
 
1088
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1089
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
1090
  *
@@ -1125,6 +1133,12 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
1125
  *
1126
  * @var int
1127
  *
 
 
 
 
 
 
1128
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1129
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1130
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
@@ -1165,6 +1179,10 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
1165
  *
1166
  * @var int
1167
  *
 
 
 
 
1168
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1169
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1170
  *
@@ -1205,6 +1223,10 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
1205
  *
1206
  * @var int
1207
  *
 
 
 
 
1208
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1209
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1210
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
@@ -1375,6 +1397,10 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
1375
  *
1376
  * @var str
1377
  *
 
 
 
 
1378
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1379
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1380
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
@@ -1636,6 +1662,10 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
1636
  *
1637
  * @var int
1638
  *
 
 
 
 
1639
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1640
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1641
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
@@ -1685,6 +1715,10 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
1685
  *
1686
  * @var int
1687
  *
 
 
 
 
1688
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1689
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1690
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
@@ -1726,6 +1760,10 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
1726
  *
1727
  * @var str
1728
  *
 
 
 
 
1729
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1730
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1731
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
1035
  *
1036
  * @var int
1037
  *
1038
+ * @see s2Member\API_Functions\s2member_user_downloads()
1039
+ * @see s2Member\API_Functions\s2member_total_downloads_of()
1040
+ * @see s2Member\API_Functions\s2member_total_unique_downloads_of()
1041
+ *
1042
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1043
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
1044
  *
1089
  *
1090
  * @var bool
1091
  *
1092
+ * @see s2Member\API_Functions\s2member_user_downloads()
1093
+ * @see s2Member\API_Functions\s2member_total_downloads_of()
1094
+ * @see s2Member\API_Functions\s2member_total_unique_downloads_of()
1095
+ *
1096
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1097
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
1098
  *
1133
  *
1134
  * @var int
1135
  *
1136
+ * @note This does NOT include File Downloads accessed with an Advanced File Download Key.
1137
+ *
1138
+ * @see s2Member\API_Functions\s2member_user_downloads()
1139
+ * @see s2Member\API_Functions\s2member_total_downloads_of()
1140
+ * @see s2Member\API_Functions\s2member_total_unique_downloads_of()
1141
+ *
1142
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1143
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1144
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
1179
  *
1180
  * @var int
1181
  *
1182
+ * @see s2Member\API_Functions\s2member_user_downloads()
1183
+ * @see s2Member\API_Functions\s2member_total_downloads_of()
1184
+ * @see s2Member\API_Functions\s2member_total_unique_downloads_of()
1185
+ *
1186
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1187
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1188
  *
1223
  *
1224
  * @var int
1225
  *
1226
+ * @see s2Member\API_Functions\s2member_user_downloads()
1227
+ * @see s2Member\API_Functions\s2member_total_downloads_of()
1228
+ * @see s2Member\API_Functions\s2member_total_unique_downloads_of()
1229
+ *
1230
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1231
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1232
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
1397
  *
1398
  * @var str
1399
  *
1400
+ * @see s2Member\API_Functions\s2member_user_downloads()
1401
+ * @see s2Member\API_Functions\s2member_total_downloads_of()
1402
+ * @see s2Member\API_Functions\s2member_total_unique_downloads_of()
1403
+ *
1404
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1405
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1406
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
1662
  *
1663
  * @var int
1664
  *
1665
+ * @see s2Member\API_Functions\s2member_user_downloads()
1666
+ * @see s2Member\API_Functions\s2member_total_downloads_of()
1667
+ * @see s2Member\API_Functions\s2member_total_unique_downloads_of()
1668
+ *
1669
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1670
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1671
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
1715
  *
1716
  * @var int
1717
  *
1718
+ * @see s2Member\API_Functions\s2member_user_downloads()
1719
+ * @see s2Member\API_Functions\s2member_total_downloads_of()
1720
+ * @see s2Member\API_Functions\s2member_total_unique_downloads_of()
1721
+ *
1722
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1723
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1724
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
1760
  *
1761
  * @var str
1762
  *
1763
+ * @see s2Member\API_Functions\s2member_user_downloads()
1764
+ * @see s2Member\API_Functions\s2member_total_downloads_of()
1765
+ * @see s2Member\API_Functions\s2member_total_unique_downloads_of()
1766
+ *
1767
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
1768
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
1769
  * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
includes/classes/files-in.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_files_in"))
21
  {
@@ -43,7 +43,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
43
  */
44
  public static function check_file_download_access ($create_file_download_url = FALSE)
45
  {
46
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
47
  do_action ("ws_plugin__s2member_before_file_download_access", get_defined_vars ());
48
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
49
  /**/
@@ -87,7 +87,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
87
  if (!$using_amazon_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $req["file_download"]))
88
  {
89
  if ($serving) /* We only need this section when/if we're actually serving. */
90
- status_header(404) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
91
  . exit (_x ('<strong>404: Sorry, file not found.</strong> Please contact Support for assistance.', "s2member-front", "s2member"));
92
  /**/
93
  else /* Else return false. */
@@ -97,7 +97,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
97
  else if ($req["file_download_key"] && is_string ($req["file_download_key"]) && !$valid_file_download_key)
98
  {
99
  if ($serving) /* We only need this section when/if we're actually serving. */
100
- status_header(503) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
101
  . exit (_x ('<strong>503 ( Invalid Key ):</strong> Sorry, your access to this file has expired. Please contact Support for assistance.', "s2member-front", "s2member"));
102
  /**/
103
  else /* Else return false. */
@@ -117,7 +117,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
117
  if ((isset ($file_downloads_enabled_by_site_owner, $min_level_4_downloads) && $file_downloads_enabled_by_site_owner === false) || ($file_downloads_enabled_by_site_owner = $min_level_4_downloads = c_ws_plugin__s2member_files::min_level_4_downloads ()) === false)
118
  {
119
  if ($serving) /* We only need this section when/if we're actually serving. */
120
- status_header(503) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
121
  . exit (_x ('<strong>503: Basic File Downloads are NOT enabled yet.</strong> Please contact Support for assistance. If you are the site owner, please configure: <code>s2Member -> Download Options -> Basic Download Restrictions</code>.', "s2member-front", "s2member"));
122
  /**/
123
  else /* Else return false. */
@@ -174,32 +174,50 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
174
  $user_previous_file_downloads = 0; /* Downloads the User has already; in current period/cycle. */
175
  $user_already_downloaded_this_file = $user_already_downloaded_a_streaming_variation_of_this_file = false;
176
  /**/
177
- $user_file_download_access_log = (array)get_user_option ("s2member_file_download_access_log", $user_id);
178
- $user_file_download_access_arc = (array)get_user_option ("s2member_file_download_access_arc", $user_id);
179
  /**/
180
  $streaming_file_extns = c_ws_plugin__s2member_utils_strings::preg_quote_deep ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["streaming_file_extns"], "/");
181
  $streaming_variations = /* Only count one streaming media file variation. */ "/\.(" . implode ("|", $streaming_file_extns) . ")$/i";
182
  /**/
183
- $max_download_period_days = c_ws_plugin__s2member_files::max_download_period (); /* Max download period; counted in days. */
184
- /**/
185
  foreach ($user_file_download_access_log as $user_file_download_access_log_entry_key => $user_file_download_access_log_entry)
186
  {
187
- if (strtotime ($user_file_download_access_log_entry["date"]) < strtotime ("-" . $max_download_period_days . " days"))
188
- {
189
- unset($user_file_download_access_log[$user_file_download_access_log_entry_key]);
190
- $user_file_download_access_arc[] = $user_file_download_access_log_entry;
191
- }
192
- else if (strtotime ($user_file_download_access_log_entry["date"]) >= strtotime ("-" . $user_file_downloads["allowed_days"] . " days"))
193
  {
194
- $user_previous_file_downloads++; /* A previous file that counts against this User/Member, since it's already in the log. */
195
- /**/
196
- if ($user_file_download_access_log_entry["file"] === $req["file_download"]) /* Already downloaded this file before? */
197
- $user_already_downloaded_this_file = true; /* Already downloaded this file? If yes, mark this flag as true. */
198
- /**/
199
- else if (preg_replace ($streaming_variations, "", $user_file_download_access_log_entry["file"]) === preg_replace ($streaming_variations, "", $req["file_download"]))
200
- $user_already_downloaded_this_file = $user_already_downloaded_a_streaming_variation_of_this_file = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  }
 
 
202
  }
 
 
203
  /**/
204
  if (!$user_already_downloaded_this_file && !$user_already_downloaded_a_streaming_variation_of_this_file && !$user->has_cap ("administrator") && $user_previous_file_downloads >= $user_file_downloads["allowed"])
205
  {
@@ -209,15 +227,8 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
209
  else /* Else return false. */
210
  return false;
211
  }
212
- /**/
213
- else if (!$user_already_downloaded_this_file && !$user_already_downloaded_a_streaming_variation_of_this_file)
214
- $user_file_download_access_log[] = array ("date" => date ("Y-m-d"), "file" => $req["file_download"]);
215
- /**/
216
- if ($updating_user_counter) /* By default, we do NOT update the counter when a URL is being created; but this behavior can be modified. */
217
- {
218
- update_user_option ($user_id, "s2member_file_download_access_arc", c_ws_plugin__s2member_utils_arrays::array_unique ($user_file_download_access_arc));
219
- update_user_option ($user_id, "s2member_file_download_access_log", c_ws_plugin__s2member_utils_arrays::array_unique ($user_file_download_access_log));
220
- }
221
  }
222
  }
223
  }
@@ -226,7 +237,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
226
  if (!$using_amazon_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $req["file_download"]))
227
  {
228
  if ($serving) /* We only need this section when/if we're actually serving. */
229
- status_header(404) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
230
  . exit (_x ('<strong>404: Sorry, file not found.</strong> Please contact Support for assistance.', "s2member-front", "s2member"));
231
  /**/
232
  else /* Else return false. */
@@ -259,14 +270,14 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
259
  $mimetype = ($mimetypes[$extension]) ? $mimetypes[$extension] : "application/octet-stream";
260
  $length = (!$using_amazon_storage && $file) ? filesize ($file) : -1;
261
  /**/
262
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
263
  do_action ("ws_plugin__s2member_during_file_download_access", get_defined_vars ());
264
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
265
  /**/
266
  if ($using_amazon_s3_storage && ($serving || ($creating && $url_to_storage_source)))
267
  {
268
  if ($serving) /* We only need this section when/if we're actually serving. */
269
- wp_redirect(c_ws_plugin__s2member_files_in::amazon_s3_url ($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype)) . exit ();
270
  /**/
271
  else /* Else return File Download URL. */
272
  return apply_filters ("ws_plugin__s2member_file_download_access_url", c_ws_plugin__s2member_files_in::amazon_s3_url ($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype), get_defined_vars ());
@@ -275,7 +286,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
275
  else if ($using_amazon_cf_storage && ($serving || ($creating && $url_to_storage_source)))
276
  {
277
  if ($serving) /* We only need this section when/if we're actually serving. */
278
- wp_redirect(c_ws_plugin__s2member_files_in::amazon_cf_url ($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype)) . exit ();
279
  /**/
280
  else /* Else return File Download URL. */
281
  return apply_filters ("ws_plugin__s2member_file_download_access_url", c_ws_plugin__s2member_files_in::amazon_cf_url ($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype), get_defined_vars ());
@@ -319,53 +330,64 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
319
  /**/
320
  else /* Else, ``if ($serving)`` , use local storage option (default). */
321
  {
322
- @set_time_limit(0) . @ini_set ("zlib.output_compression", 0);
323
  /**/
324
- status_header(200); /* 200 OK status header. */
325
  /**/
326
- header("Accept-Ranges: none");
327
- header("Content-Encoding: none");
328
- header("Content-Type: " . $mimetype);
329
- header("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
330
- header("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
331
- header("Cache-Control: no-cache, must-revalidate, max-age=0");
332
  header ("Cache-Control: post-check=0, pre-check=0", false);
333
- header("Pragma: no-cache");
 
 
334
  /**/
335
- header('Content-Disposition: ' . (($inline) ? "inline" : "attachment") . '; filename="' . $basename . '"');
336
  /**/
337
- eval('while (@ob_end_clean ());'); /* End/clean any output buffers that may exist already. */
338
  /**/
339
- if ($length && apply_filters ("ws_plugin__s2member_chunk_file_downloads", true, get_defined_vars ()) && is_resource ($resource = fopen ($file, "rb")))
340
  {
341
  $_chunk_size = apply_filters ("ws_plugin__s2member_chunk_file_downloads_w_chunk_size", 2097152, get_defined_vars ());
342
- $_chunk_w_content_length = (stripos (PHP_OS, "win") === 0 && (!function_exists ("apache_get_version") || apache_get_version () === false)) ? false : true;
343
  /**/
344
- /* Windows® IIS doesn't seem to like it when both `Content-Length` and `Transfer-Encoding: chunked` are sent together. */
345
- if (apply_filters ("ws_plugin__s2member_chunk_file_downloads_w_content_length", $_chunk_w_content_length, get_defined_vars ()))
346
- header("Content-Length: " . $length);
347
  /**/
348
- header("Transfer-Encoding: chunked"); /* Uses `Transfer-Encoding: chunked` for simulated streaming. */
349
  /**/
350
  while (!feof ($resource) && ($chunk_size = strlen ($data = fread ($resource, $_chunk_size))))
351
- eval('echo dechex ($chunk_size) . "\r\n". $data . "\r\n"; @flush ();');
 
 
 
 
 
 
 
 
 
352
  /**/
353
- fclose($resource) . exit ("0\r\n\r\n");
 
354
  }
355
  else if ($length) /* Else, use: ``file_get_contents()``. */
356
  {
357
- header("Content-Length: " . $length) . exit (file_get_contents ($file));
 
358
  }
359
  else /* Else, we have an empty file with no length. */
360
  {
361
- header("Content-Length: 0") . exit ();
362
  }
363
  }
364
  }
365
  }
366
  /**/
367
  else if ($serving && $req["file_download"]) /* We only need this section when/if we're actually serving. */
368
- status_header(503) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
369
  . exit (_x ('<strong>503: Access denied.</strong> Invalid File Download specs.', "s2member-front", "s2member"));
370
  /**/
371
  else if ($creating) /* We only need this section when/if we're creating a URL. */
@@ -390,7 +412,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
390
  */
391
  public static function create_file_download_url ($config = FALSE, $get_streamer_array = FALSE)
392
  {
393
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
394
  do_action ("ws_plugin__s2member_before_create_file_download_url", get_defined_vars ()); /* Be VERY careful, if you use this Hook. */
395
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
396
  /**/
@@ -404,7 +426,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
404
  /**/
405
  if (($_url = c_ws_plugin__s2member_files_in::check_file_download_access (($create_file_download_url = $config))) /* Successfully created a URL to the file? */)
406
  {
407
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
408
  do_action ("ws_plugin__s2member_during_create_file_download_url", get_defined_vars ()); /* Be VERY careful, if you use this Hook. */
409
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
410
  /**/
@@ -412,10 +434,10 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
412
  $streaming = (isset ($config["file_stream"])) ? filter_var ($config["file_stream"], FILTER_VALIDATE_BOOLEAN) : ((in_array ($extension, preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_stream_extensions"]))) ? true : false);
413
  $ssl = (isset ($config["file_ssl"])) ? filter_var ($config["file_ssl"], FILTER_VALIDATE_BOOLEAN) : ((is_ssl ()) ? true : false);
414
  /**/
415
- if ($get_streamer_array && $streaming && ($cfx = "/cfx/st") && ($cfx_pos = strpos ($_url, $cfx)) !== false && ($streamer = substr ($_url, 0, $cfx_pos + strlen ($cfx))) && ($url = c_ws_plugin__s2member_files_in::check_file_download_access (array_merge ($config, array ("file_stream" => false, "check_user" => false)))))
416
  $return = array ("streamer" => $streamer, "file" => preg_replace ("/^" . preg_quote ($streamer, "/") . "\//", "", $_url), "url" => preg_replace ("/^.+?\:/", (($ssl) ? "https:" : "http:"), $url));
417
  /**/
418
- else if ($get_streamer_array && $streaming && is_array ($ups = c_ws_plugin__s2member_utils_urls::parse_url ($_url)) && isset ($ups["scheme"], $ups["host"]) && ($streamer = $ups["scheme"] . "://" . $ups["host"] . ((!empty ($ups["port"])) ? ":" . $ups["port"] : "")) && ($url = c_ws_plugin__s2member_files_in::check_file_download_access (array_merge ($config, array ("file_stream" => false, "check_user" => false)))))
419
  $return = array ("streamer" => $streamer, "file" => preg_replace ("/^" . preg_quote ($streamer, "/") . "\//", "", $_url), "url" => preg_replace ("/^.+?\:/", (($ssl) ? "https:" : "http:"), $url));
420
  /**/
421
  else if ($get_streamer_array) /* Else, we MUST return false here, unable to acquire streamer/file. */
@@ -440,7 +462,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
440
  */
441
  public static function check_file_remote_authorization ($user = FALSE)
442
  {
443
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
444
  do_action ("ws_plugin__s2member_before_check_file_remote_authorization", get_defined_vars ());
445
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
446
  /**/
@@ -452,13 +474,13 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
452
  /**/
453
  if (empty ($_SERVER["PHP_AUTH_USER"]) || empty ($_SERVER["PHP_AUTH_PW"]) || !user_pass_ok ($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]))
454
  {
455
- header('WWW-Authenticate: Basic realm="' . c_ws_plugin__s2member_utils_strings::esc_dq (strip_tags (_x ("Members Only", "s2member-front", "s2member"))) . '"');
456
  /**/
457
- status_header(401); /* Send an unauthorized 401 status header now. */
458
- header("Content-Type: text/html; charset=utf-8"); /* Content-Type with UTF-8. */
459
- eval('while (@ob_end_clean ());'); /* End/clean any output buffers that may exist. */
460
  /**/
461
- exit(_x ('<strong>401:</strong> Sorry, access denied.', "s2member-front", "s2member"));
462
  }
463
  else if (is_object ($_user = new WP_User ($_SERVER["PHP_AUTH_USER"])) && !empty ($_user->ID))
464
  $user = $_user; /* Now assign ``$user``. */
@@ -480,7 +502,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
480
  */
481
  public static function check_file_download_key ($file = FALSE, $key = FALSE)
482
  {
483
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
484
  do_action ("_ws_plugin__s2member_before_check_file_download_key", get_defined_vars ());
485
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
486
  /**/
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_files_in"))
21
  {
43
  */
44
  public static function check_file_download_access ($create_file_download_url = FALSE)
45
  {
46
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
47
  do_action ("ws_plugin__s2member_before_file_download_access", get_defined_vars ());
48
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
49
  /**/
87
  if (!$using_amazon_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $req["file_download"]))
88
  {
89
  if ($serving) /* We only need this section when/if we're actually serving. */
90
+ status_header (404) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
91
  . exit (_x ('<strong>404: Sorry, file not found.</strong> Please contact Support for assistance.', "s2member-front", "s2member"));
92
  /**/
93
  else /* Else return false. */
97
  else if ($req["file_download_key"] && is_string ($req["file_download_key"]) && !$valid_file_download_key)
98
  {
99
  if ($serving) /* We only need this section when/if we're actually serving. */
100
+ status_header (503) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
101
  . exit (_x ('<strong>503 ( Invalid Key ):</strong> Sorry, your access to this file has expired. Please contact Support for assistance.', "s2member-front", "s2member"));
102
  /**/
103
  else /* Else return false. */
117
  if ((isset ($file_downloads_enabled_by_site_owner, $min_level_4_downloads) && $file_downloads_enabled_by_site_owner === false) || ($file_downloads_enabled_by_site_owner = $min_level_4_downloads = c_ws_plugin__s2member_files::min_level_4_downloads ()) === false)
118
  {
119
  if ($serving) /* We only need this section when/if we're actually serving. */
120
+ status_header (503) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
121
  . exit (_x ('<strong>503: Basic File Downloads are NOT enabled yet.</strong> Please contact Support for assistance. If you are the site owner, please configure: <code>s2Member -> Download Options -> Basic Download Restrictions</code>.', "s2member-front", "s2member"));
122
  /**/
123
  else /* Else return false. */
174
  $user_previous_file_downloads = 0; /* Downloads the User has already; in current period/cycle. */
175
  $user_already_downloaded_this_file = $user_already_downloaded_a_streaming_variation_of_this_file = false;
176
  /**/
177
+ $user_file_download_access_log = (is_array ($user_file_download_access_log = get_user_option ("s2member_file_download_access_log", $user_id))) ? $user_file_download_access_log : array ();
178
+ $user_file_download_access_arc = (is_array ($user_file_download_access_arc = get_user_option ("s2member_file_download_access_arc", $user_id))) ? $user_file_download_access_arc : array ();
179
  /**/
180
  $streaming_file_extns = c_ws_plugin__s2member_utils_strings::preg_quote_deep ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["streaming_file_extns"], "/");
181
  $streaming_variations = /* Only count one streaming media file variation. */ "/\.(" . implode ("|", $streaming_file_extns) . ")$/i";
182
  /**/
 
 
183
  foreach ($user_file_download_access_log as $user_file_download_access_log_entry_key => $user_file_download_access_log_entry)
184
  {
185
+ if ( /* Weed out corrupt/empty log entries. */isset ($user_file_download_access_log_entry["date"], $user_file_download_access_log_entry["file"]))
 
 
 
 
 
186
  {
187
+ if (strtotime ($user_file_download_access_log_entry["date"]) < strtotime ("-" . $user_file_downloads["allowed_days"] . " days"))
188
+ {
189
+ unset ($user_file_download_access_log[$user_file_download_access_log_entry_key]); /* Remove it from the `log`. */
190
+ $user_file_download_access_arc[] = $user_file_download_access_log_entry; /* Move `log` entry to the `archive` now. */
191
+ }
192
+ else if (strtotime ($user_file_download_access_log_entry["date"]) >= strtotime ("-" . $user_file_downloads["allowed_days"] . " days"))
193
+ {
194
+ $user_previous_file_downloads++; /* Previous files always count against this User/Member; it's already in the `log`. */
195
+ /**/
196
+ $_user_file_download_access_log_entry = &$user_file_download_access_log[$user_file_download_access_log_entry_key];
197
+ $_user_already_downloaded_this_file = $_user_already_downloaded_a_streaming_variation_of_this_file = false;
198
+ /**/
199
+ if ($user_file_download_access_log_entry["file"] === $req["file_download"]) /* Already downloaded this file? If yes, mark this flag as true. */
200
+ $user_already_downloaded_this_file = $_user_already_downloaded_this_file = true; /* Already downloaded this file? If yes, mark as true. */
201
+ /**/
202
+ else if (preg_replace ($streaming_variations, "", $user_file_download_access_log_entry["file"]) === preg_replace ($streaming_variations, "", $req["file_download"]))
203
+ $user_already_downloaded_this_file = $_user_already_downloaded_this_file = $user_already_downloaded_a_streaming_variation_of_this_file = $_user_already_downloaded_a_streaming_variation_of_this_file = true;
204
+ /**/
205
+ if ( /* Updating counter? */$updating_user_counter && ($_user_already_downloaded_this_file || $_user_already_downloaded_a_streaming_variation_of_this_file))
206
+ {
207
+ $_user_file_download_access_log_entry /* First, we update the last download time for this file. */["ltime"] = time ();
208
+ /**/
209
+ if ( /* Backward compatiility here. Is this even set? */!empty ($user_file_download_access_log_entry["counter"]))
210
+ $_user_file_download_access_log_entry["counter"] = (int)$user_file_download_access_log_entry["counter"] + 1;
211
+ else /* Backward compatiility here. Default value to `1`, if this is NOT even set yet. */
212
+ $_user_file_download_access_log_entry["counter"] = 1 + 1;
213
+ }
214
+ }
215
  }
216
+ else /* Weed out empty log entries. Some older versions of s2Member may have corrupt/empty log entries by mistake. */
217
+ unset ($user_file_download_access_log[$user_file_download_access_log_entry_key]); /* Remove from `log`. */
218
  }
219
+ if ( /* Updating counter? */$updating_user_counter && /* Do we need a new log entry for this file? */ !$user_already_downloaded_this_file && !$user_already_downloaded_a_streaming_variation_of_this_file)
220
+ $user_file_download_access_log[] = array ("date" => date ("Y-m-d"), "time" => time (), "ltime" => time (), "file" => $req["file_download"], "counter" => 1);
221
  /**/
222
  if (!$user_already_downloaded_this_file && !$user_already_downloaded_a_streaming_variation_of_this_file && !$user->has_cap ("administrator") && $user_previous_file_downloads >= $user_file_downloads["allowed"])
223
  {
227
  else /* Else return false. */
228
  return false;
229
  }
230
+ else if /* Save/update counter? */ ($updating_user_counter) /* By default, we do NOT update the counter when a URL is simply being created for access. */
231
+ update_user_option ($user_id, "s2member_file_download_access_log", c_ws_plugin__s2member_utils_arrays::array_unique ($user_file_download_access_log)) . update_user_option ($user_id, "s2member_file_download_access_arc", c_ws_plugin__s2member_utils_arrays::array_unique ($user_file_download_access_arc));
 
 
 
 
 
 
 
232
  }
233
  }
234
  }
237
  if (!$using_amazon_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $req["file_download"]))
238
  {
239
  if ($serving) /* We only need this section when/if we're actually serving. */
240
+ status_header (404) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
241
  . exit (_x ('<strong>404: Sorry, file not found.</strong> Please contact Support for assistance.', "s2member-front", "s2member"));
242
  /**/
243
  else /* Else return false. */
270
  $mimetype = ($mimetypes[$extension]) ? $mimetypes[$extension] : "application/octet-stream";
271
  $length = (!$using_amazon_storage && $file) ? filesize ($file) : -1;
272
  /**/
273
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
274
  do_action ("ws_plugin__s2member_during_file_download_access", get_defined_vars ());
275
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
276
  /**/
277
  if ($using_amazon_s3_storage && ($serving || ($creating && $url_to_storage_source)))
278
  {
279
  if ($serving) /* We only need this section when/if we're actually serving. */
280
+ wp_redirect (c_ws_plugin__s2member_files_in::amazon_s3_url ($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype)) . exit ();
281
  /**/
282
  else /* Else return File Download URL. */
283
  return apply_filters ("ws_plugin__s2member_file_download_access_url", c_ws_plugin__s2member_files_in::amazon_s3_url ($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype), get_defined_vars ());
286
  else if ($using_amazon_cf_storage && ($serving || ($creating && $url_to_storage_source)))
287
  {
288
  if ($serving) /* We only need this section when/if we're actually serving. */
289
+ wp_redirect (c_ws_plugin__s2member_files_in::amazon_cf_url ($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype)) . exit ();
290
  /**/
291
  else /* Else return File Download URL. */
292
  return apply_filters ("ws_plugin__s2member_file_download_access_url", c_ws_plugin__s2member_files_in::amazon_cf_url ($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype), get_defined_vars ());
330
  /**/
331
  else /* Else, ``if ($serving)`` , use local storage option (default). */
332
  {
333
+ @set_time_limit (0) . @ini_set ("zlib.output_compression", 0);
334
  /**/
335
+ status_header (200); /* 200 OK status header. */
336
  /**/
337
+ header ("Accept-Ranges: none");
338
+ header ("Content-Encoding: none");
339
+ header ("Content-Type: " . $mimetype);
340
+ header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
341
+ header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
342
+ header ("Cache-Control: no-cache, must-revalidate, max-age=0");
343
  header ("Cache-Control: post-check=0, pre-check=0", false);
344
+ header ("Pragma: no-cache");
345
+ /**/
346
+ header ('Content-Disposition: ' . (($inline) ? "inline" : "attachment") . '; filename="' . $basename . '"');
347
  /**/
348
+ eval ('while (@ob_end_clean ());'); /* End/clean any output buffers that may exist already. Prep for content delivery. */
349
  /**/
350
+ $_chunk_file = ($_SERVER["SERVER_PROTOCOL"] === "HTTP/1.1" && preg_match ("/apache/i", $_SERVER["SERVER_SOFTWARE"])) ? true : false;
351
  /**/
352
+ if ($length && apply_filters ("ws_plugin__s2member_chunk_file_downloads", $_chunk_file, get_defined_vars ()) && is_resource ($resource = fopen ($file, "rb")))
353
  {
354
  $_chunk_size = apply_filters ("ws_plugin__s2member_chunk_file_downloads_w_chunk_size", 2097152, get_defined_vars ());
 
355
  /**/
356
+ if (apply_filters ("ws_plugin__s2member_chunk_file_downloads_w_content_length", true, get_defined_vars ()))
357
+ header ("Content-Length: " . $length);
 
358
  /**/
359
+ header ("Transfer-Encoding: chunked"); /* `Transfer-Encoding: chunked` conserves memory. */
360
  /**/
361
  while (!feof ($resource) && ($chunk_size = strlen ($data = fread ($resource, $_chunk_size))))
362
+ eval ('echo dechex ($chunk_size) . "\r\n". $data . "\r\n"; @flush ();');
363
+ /**/
364
+ fclose ($resource) . exit ("0\r\n\r\n");
365
+ }
366
+ else if ($length && apply_filters ("ws_plugin__s2member_flush_file_downloads", true, get_defined_vars ()) && is_resource ($resource = fopen ($file, "rb")))
367
+ {
368
+ $_flush_size = apply_filters ("ws_plugin__s2member_flush_file_downloads_w_flush_size", 2097152, get_defined_vars ());
369
+ /**/
370
+ if (apply_filters ("ws_plugin__s2member_flush_file_downloads_w_content_length", true, get_defined_vars ()))
371
+ header ("Content-Length: " . $length);
372
  /**/
373
+ while (!feof ($resource) && ($flush_size = strlen ($data = fread ($resource, $_flush_size))))
374
+ eval ('echo $data; @flush ();'); /* Conserves memory. */
375
  }
376
  else if ($length) /* Else, use: ``file_get_contents()``. */
377
  {
378
+ @ini_set ("memory_limit", WP_MAX_MEMORY_LIMIT); /* RAM/memory. */
379
+ header ("Content-Length: " . $length) . exit (file_get_contents ($file));
380
  }
381
  else /* Else, we have an empty file with no length. */
382
  {
383
+ header ("Content-Length: 0") . exit ();
384
  }
385
  }
386
  }
387
  }
388
  /**/
389
  else if ($serving && $req["file_download"]) /* We only need this section when/if we're actually serving. */
390
+ status_header (503) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
391
  . exit (_x ('<strong>503: Access denied.</strong> Invalid File Download specs.', "s2member-front", "s2member"));
392
  /**/
393
  else if ($creating) /* We only need this section when/if we're creating a URL. */
412
  */
413
  public static function create_file_download_url ($config = FALSE, $get_streamer_array = FALSE)
414
  {
415
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
416
  do_action ("ws_plugin__s2member_before_create_file_download_url", get_defined_vars ()); /* Be VERY careful, if you use this Hook. */
417
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
418
  /**/
426
  /**/
427
  if (($_url = c_ws_plugin__s2member_files_in::check_file_download_access (($create_file_download_url = $config))) /* Successfully created a URL to the file? */)
428
  {
429
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
430
  do_action ("ws_plugin__s2member_during_create_file_download_url", get_defined_vars ()); /* Be VERY careful, if you use this Hook. */
431
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
432
  /**/
434
  $streaming = (isset ($config["file_stream"])) ? filter_var ($config["file_stream"], FILTER_VALIDATE_BOOLEAN) : ((in_array ($extension, preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_stream_extensions"]))) ? true : false);
435
  $ssl = (isset ($config["file_ssl"])) ? filter_var ($config["file_ssl"], FILTER_VALIDATE_BOOLEAN) : ((is_ssl ()) ? true : false);
436
  /**/
437
+ if ($get_streamer_array && $streaming && ($cfx = "/cfx/st") && ($cfx_pos = strpos ($_url, $cfx)) !== false && ($streamer = substr ($_url, 0, $cfx_pos + strlen ($cfx))) && ($url = c_ws_plugin__s2member_files_in::check_file_download_access (array_merge ($config, array ("file_stream" => false, "check_user" => false, "count_against_user" => false)))))
438
  $return = array ("streamer" => $streamer, "file" => preg_replace ("/^" . preg_quote ($streamer, "/") . "\//", "", $_url), "url" => preg_replace ("/^.+?\:/", (($ssl) ? "https:" : "http:"), $url));
439
  /**/
440
+ else if ($get_streamer_array && $streaming && is_array ($ups = c_ws_plugin__s2member_utils_urls::parse_url ($_url)) && isset ($ups["scheme"], $ups["host"]) && ($streamer = $ups["scheme"] . "://" . $ups["host"] . ((!empty ($ups["port"])) ? ":" . $ups["port"] : "")) && ($url = c_ws_plugin__s2member_files_in::check_file_download_access (array_merge ($config, array ("file_stream" => false, "check_user" => false, "count_against_user" => false)))))
441
  $return = array ("streamer" => $streamer, "file" => preg_replace ("/^" . preg_quote ($streamer, "/") . "\//", "", $_url), "url" => preg_replace ("/^.+?\:/", (($ssl) ? "https:" : "http:"), $url));
442
  /**/
443
  else if ($get_streamer_array) /* Else, we MUST return false here, unable to acquire streamer/file. */
462
  */
463
  public static function check_file_remote_authorization ($user = FALSE)
464
  {
465
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
466
  do_action ("ws_plugin__s2member_before_check_file_remote_authorization", get_defined_vars ());
467
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
468
  /**/
474
  /**/
475
  if (empty ($_SERVER["PHP_AUTH_USER"]) || empty ($_SERVER["PHP_AUTH_PW"]) || !user_pass_ok ($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]))
476
  {
477
+ header ('WWW-Authenticate: Basic realm="' . c_ws_plugin__s2member_utils_strings::esc_dq (strip_tags (_x ("Members Only", "s2member-front", "s2member"))) . '"');
478
  /**/
479
+ status_header (401); /* Send an unauthorized 401 status header now. */
480
+ header ("Content-Type: text/html; charset=utf-8"); /* Content-Type with UTF-8. */
481
+ eval ('while (@ob_end_clean ());'); /* End/clean any output buffers that may exist. */
482
  /**/
483
+ exit (_x ('<strong>401:</strong> Sorry, access denied.', "s2member-front", "s2member"));
484
  }
485
  else if (is_object ($_user = new WP_User ($_SERVER["PHP_AUTH_USER"])) && !empty ($_user->ID))
486
  $user = $_user; /* Now assign ``$user``. */
502
  */
503
  public static function check_file_download_key ($file = FALSE, $key = FALSE)
504
  {
505
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
506
  do_action ("_ws_plugin__s2member_before_check_file_download_key", get_defined_vars ());
507
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
508
  /**/
includes/classes/files.inc.php CHANGED
@@ -100,9 +100,9 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
100
  * @return int Number of days, where 0 means no access to files is allowed.
101
  * Will not return a value > `365`, because this routine also controls the age of download logs to archives.
102
  *
103
- * @todo Remove the limitation of `365` days somehow.
104
  */
105
- public static function max_download_period ()
106
  {
107
  do_action ("ws_plugin__s2member_before_max_download_period", get_defined_vars ());
108
  /**/
@@ -122,7 +122,7 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
122
  *
123
  * @return bool|int False if no access is allowed, else Level number (int) 0+.
124
  */
125
- public static function min_level_4_downloads ()
126
  {
127
  do_action ("ws_plugin__s2member_before_min_level_4_downloads", get_defined_vars ());
128
  /**/
@@ -179,18 +179,24 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
179
  * @package s2Member\Files
180
  * @since 3.5
181
  *
182
- * @param obj $user Optional. Defaults to the current User's object.
183
- * @param str $not_counting_this_particular_file Optional. If you want to exclude a particular file.
184
- * @param array $log Optional. Prevents another database connection *( i.e. the log does not need to be pulled again )*.
185
- * @return array An array with three elements: `allowed`, `allowed_days`, `currently`.
 
 
 
 
 
186
  */
187
- public static function user_downloads ($user = FALSE, $not_counting_this_particular_file = FALSE, $log = NULL)
188
  {
189
  eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
190
  do_action ("ws_plugin__s2member_before_user_downloads", get_defined_vars ());
191
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
192
  /**/
193
- $allowed = $allowed_days = $currently = 0; /* Initialize all of these to a default value of zero. */
 
194
  /**/
195
  if ((is_object ($user) || is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false)) && !empty ($user->ID) && ($user_id = $user->ID))
196
  {
@@ -198,26 +204,95 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
198
  {
199
  if ($user->has_cap ("access_s2member_level" . $n)) /* Do they have access? */
200
  {
201
- if (!empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed"]))
202
- if (!empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed_days"]))
203
- {
204
- $allowed = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed"];
205
- $allowed_days = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed_days"];
206
- }
207
  if ($user->has_cap ("s2member_level" . $n)) /* We can stop now, if this is their Role. */
208
  break; /* Break now. */
209
  }
210
  }
 
 
211
  /**/
212
- $user_file_download_access_log = (isset ($log)) ? (array)$log : (array)get_user_option ("s2member_file_download_access_log", $user_id);
213
- /**/
214
- foreach ($user_file_download_access_log as $user_file_download_access_log_entry_key => $user_file_download_access_log_entry)
215
- if (strtotime ($user_file_download_access_log_entry["date"]) >= strtotime ("-" . $allowed_days . " days"))
216
- if ($user_file_download_access_log_entry["file"] !== $not_counting_this_particular_file)
217
  $currently = $currently + 1;
218
  }
219
  /**/
220
- return apply_filters ("ws_plugin__s2member_user_downloads", array ("allowed" => $allowed, "allowed_days" => $allowed_days, "currently" => $currently), get_defined_vars ());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  }
222
  }
223
  }
100
  * @return int Number of days, where 0 means no access to files is allowed.
101
  * Will not return a value > `365`, because this routine also controls the age of download logs to archives.
102
  *
103
+ * @deprecated Deprecated in v111029. This function is no longer used by s2Member.
104
  */
105
+ public static function max_download_period /* No longer used by s2Member. */ ()
106
  {
107
  do_action ("ws_plugin__s2member_before_max_download_period", get_defined_vars ());
108
  /**/
122
  *
123
  * @return bool|int False if no access is allowed, else Level number (int) 0+.
124
  */
125
+ public static function min_level_4_downloads () /* Multipurpose. False if no access. */
126
  {
127
  do_action ("ws_plugin__s2member_before_min_level_4_downloads", get_defined_vars ());
128
  /**/
179
  * @package s2Member\Files
180
  * @since 3.5
181
  *
182
+ * @param obj $user Optional. A `WP_User` object. Defaults to the current User's object.
183
+ * @param str $not_counting_this_particular_file Optional. If you want to exclude a particular file,
184
+ * relative to the `/s2member-files/` directory, or relative to the root of your Amazon® S3 Bucket *( when applicable )*.
185
+ * @param array $user_log Optional. Prevents another database connection *( i.e. the User's log does not need to be pulled again )*.
186
+ * @param array $user_arc Optional. Prevents another database connection *( i.e. the User's archive does not need to be pulled again )*.
187
+ * @return array An array with the following elements... File Downloads allowed for this User: (int)`allowed`, Download Period for this User in days: (int)`allowed_days`, Files downloaded by this User in the current Period: (int)`currently`, log of all Files downloaded in the current Period, with file names/dates: (array)`log`, archive of all Files downloaded in prior Periods, with file names/dates: (array)`archive`.
188
+ *
189
+ * @note Calculations returned by this function do NOT include File Downloads that were accessed with an Advanced File Download Key.
190
+ * @todo Make it possible for s2Member to keep a count of files downloaded with an Advanced Download Key.
191
  */
192
+ public static function user_downloads ($user = FALSE, $not_counting_this_particular_file = FALSE, $user_log = FALSE, $user_arc = FALSE)
193
  {
194
  eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
195
  do_action ("ws_plugin__s2member_before_user_downloads", get_defined_vars ());
196
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
197
  /**/
198
+ $allowed = $allowed_days = $currently = 0; /* Initialize these to zero. */
199
+ $log = $arc = array (); /* Initialize these to a default empty array value. */
200
  /**/
201
  if ((is_object ($user) || is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false)) && !empty ($user->ID) && ($user_id = $user->ID))
202
  {
204
  {
205
  if ($user->has_cap ("access_s2member_level" . $n)) /* Do they have access? */
206
  {
207
+ if (!empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed"]) && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed_days"]))
208
+ {
209
+ $allowed = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed"];
210
+ $allowed_days = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed_days"];
211
+ }
 
212
  if ($user->has_cap ("s2member_level" . $n)) /* We can stop now, if this is their Role. */
213
  break; /* Break now. */
214
  }
215
  }
216
+ $log = (is_array ($user_log)) ? $user_log : ((is_array ($log = get_user_option ("s2member_file_download_access_log", $user_id)) && $log !== array (false)) ? $log : array ());
217
+ $arc = (is_array ($user_arc)) ? $user_arc : ((is_array ($arc = get_user_option ("s2member_file_download_access_arc", $user_id)) && $arc !== array (false)) ? $arc : array ());
218
  /**/
219
+ foreach (($user_file_download_access_log = $log) as $user_file_download_access_log_entry_key => $user_file_download_access_log_entry)
220
+ if (isset ($user_file_download_access_log_entry["date"]) && strtotime ($user_file_download_access_log_entry["date"]) >= strtotime ("-" . $allowed_days . " days"))
221
+ if (isset ($user_file_download_access_log_entry["file"]) && $user_file_download_access_log_entry["file"] !== $not_counting_this_particular_file)
 
 
222
  $currently = $currently + 1;
223
  }
224
  /**/
225
+ return apply_filters ("ws_plugin__s2member_user_downloads", array ("allowed" => $allowed, "allowed_days" => $allowed_days, "currently" => $currently, "log" => $log, "archive" => $arc), get_defined_vars ());
226
+ }
227
+ /**
228
+ * Total downloads of a particular file; possibly by a particular User.
229
+ *
230
+ * @package s2Member\Files
231
+ * @since 111026
232
+ *
233
+ * @param str $file Required. Location of the file, relative to the `/s2member-files/` directory, or relative to the root of your Amazon® S3 Bucket *( when applicable )*.
234
+ * @param str|int $user_id Optional. If specified, s2Member will return total downloads by a particular User/Member, instead of collectively *( i.e among all Users/Members )*.
235
+ * @param bool $check_archives_too Optional. Defaults to true. When true, s2Member checks its File Download Archive too, instead of ONLY looking at Files downloaded in the current Period. Period is based on your Basic Download Restrictions setting of allowed days across various Levels of Membership, for each respective User/Member. Or, if ``$user_id`` is specified, based solely on a specific User's `allowed_days`, configured in your Basic Download Restrictions, at the User's current Membership Level.
236
+ * @return int The total for this particular ``$file``, based on configuration of function arguments.
237
+ *
238
+ * @note Calculations returned by this function do NOT include File Downloads that were accessed with an Advanced File Download Key.
239
+ * @todo Make it possible for s2Member to keep a count of files downloaded with an Advanced Download Key.
240
+ */
241
+ public static function total_downloads_of ($file = FALSE, $user_id = FALSE, $check_archives_too = TRUE)
242
+ {
243
+ global $wpdb; /* Global database object reference. */
244
+ /**/
245
+ if ($file && is_string ($file)) /* Was ``$file`` passed in properly? */
246
+ {
247
+ if (is_array ($results = $wpdb->get_results ("SELECT `meta_key`, `meta_value` FROM `" . $wpdb->usermeta . "` WHERE " . ((is_numeric ($user_id)) ? "`user_id` = '" . esc_sql ($user_id) . "' AND " : "") . "(`meta_key` = '" . $wpdb->prefix . "s2member_file_download_access_log'" . (($check_archives_too) ? " OR `meta_key` = '" . $wpdb->prefix . "s2member_file_download_access_arc'" : "") . ") AND `meta_value` REGEXP '.*\"file\";s:[0-9]+:\"" . esc_sql ($file) . "\".*'")))
248
+ {
249
+ foreach ($results as $r /* Go through the entire array of results found in the `REGEXP` database query above. */)
250
+ if (is_array ($la_entries = /* Unserialize the array. */ maybe_unserialize ($r->meta_value)) && !empty ($la_entries))
251
+ /**/
252
+ foreach ($la_entries as $la_entry /* Go through all of the entries in each result ``$r``; collecting `counter` values. */)
253
+ if (!empty ($la_entry["file"]) && $la_entry["file"] === $file && /* Back compatibility. Is `counter` even set? */ (!empty ($la_entry["counter"]) || ($la_entry["counter"] = 1)))
254
+ {
255
+ $total = (!empty ($total)) ? $total + (int)$la_entry["counter"] : (int)$la_entry["counter"];
256
+ break; /* Break now. No need to continue looping; ``$file`` found in these entries. */
257
+ }
258
+ }
259
+ }
260
+ return (!empty ($total)) ? $total : /* Else return zero by default. */ 0;
261
+ }
262
+ /**
263
+ * Total unique downloads of a particular file; possibly by a particular User.
264
+ *
265
+ * @package s2Member\Files
266
+ * @since 111026
267
+ *
268
+ * @param str $file Required. Location of the file, relative to the `/s2member-files/` directory, or relative to the root of your Amazon® S3 Bucket *( when applicable )*.
269
+ * @param str|int $user_id Optional. If specified, s2Member will return total downloads by a particular User/Member, instead of collectively *( i.e among all Users/Members )*.
270
+ * @param bool $check_archives_too Optional. Defaults to true. When true, s2Member checks its File Download Archive too, instead of ONLY looking at Files downloaded in the current Period. Period is based on your Basic Download Restrictions setting of allowed days across various Levels of Membership, for each respective User/Member. Or, if ``$user_id`` is specified, based solely on a specific User's `allowed_days`, configured in your Basic Download Restrictions, at the User's current Membership Level.
271
+ * @return int The total for this particular ``$file``, based on configuration of function arguments.
272
+ *
273
+ * @note Calculations returned by this function do NOT include File Downloads that were accessed with an Advanced File Download Key.
274
+ * @todo Make it possible for s2Member to keep a count of files downloaded with an Advanced Download Key.
275
+ */
276
+ public static function total_unique_downloads_of ($file = FALSE, $user_id = FALSE, $check_archives_too = TRUE)
277
+ {
278
+ global $wpdb; /* Global database object reference. */
279
+ /**/
280
+ if ($file && is_string ($file)) /* Was ``$file`` passed in properly? */
281
+ {
282
+ if (is_array ($results = $wpdb->get_results ("SELECT `meta_key`, `meta_value` FROM `" . $wpdb->usermeta . "` WHERE " . ((is_numeric ($user_id)) ? "`user_id` = '" . esc_sql ($user_id) . "' AND " : "") . "(`meta_key` = '" . $wpdb->prefix . "s2member_file_download_access_log'" . (($check_archives_too) ? " OR `meta_key` = '" . $wpdb->prefix . "s2member_file_download_access_arc'" : "") . ") AND `meta_value` REGEXP '.*\"file\";s:[0-9]+:\"" . esc_sql ($file) . "\".*'")))
283
+ {
284
+ foreach ($results as $r /* Go through the entire array of results found in the `REGEXP` database query above. */)
285
+ if (is_array ($la_entries = /* Unserialize the array. */ maybe_unserialize ($r->meta_value)) && !empty ($la_entries))
286
+ /**/
287
+ foreach ($la_entries as $la_entry /* Go through all of the entries in each result ``$r``; collecting `counter` values. */)
288
+ if (!empty ($la_entry["file"]) && $la_entry["file"] === $file && /* Back compatibility. Is `counter` even set? */ (!empty ($la_entry["counter"]) || ($la_entry["counter"] = 1)))
289
+ {
290
+ $total = (!empty ($total)) ? /* Only count `1` here ( i.e. unique downloads ). */ $total + 1 : 1;
291
+ break; /* Break now. No need to continue looping; ``$file`` found in these entries. */
292
+ }
293
+ }
294
+ }
295
+ return (!empty ($total)) ? $total : /* Else return zero by default. */ 0;
296
  }
297
  }
298
  }
includes/classes/login-customizations.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
21
  {
@@ -80,7 +80,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
80
  $s = ""; /* Initialize styles string here to give Hooks a chance. */
81
  $a = array (); /* Initialize here to give Filters a chance. */
82
  /**/
83
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
84
  do_action ("ws_plugin__s2member_before_login_header_styles", get_defined_vars ());
85
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
86
  /**/
@@ -106,7 +106,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
106
  $a[] = 'div#login p#backtoblog, div#login p#backtoblog a, div#login p#backtoblog a:hover, div#login p#backtoblog a:active, div#login p#backtoblog a:focus { color:#' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_color"] . $i . '; text-shadow:1px 1px 3px #' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_shadow_color"] . $i . '; }';
107
  /**/
108
  $a[] = 'div#login form p { margin:2px 0 16px 0' . $i . '; }'; /* Handles paragraph margins inside the form. */
109
- $a[] = 'div#login form input[type="text"], div#login form input[type="password"], div#login form textarea, div#login form select { font-weight:normal' . $i . '; color:#333333' . $i . '; background:none repeat scroll 0 0 #FBFBFB' . $i . '; border:1px solid #E5E5E5' . $i . '; font-size:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_field_size"] . $i . '; margin:0' . $i . '; padding:3px' . $i . '; -moz-border-radius:3px' . $i . '; -webkit-border-radius:3px' . $i . '; border-radius:3px' . $i . '; width:100%' . $i . '; width:98%' . $i . ' !ie<8; margin-right:2%' . $i . ' !ie<8; box-sizing:border-box' . $i . '; -ms-box-sizing:border-box' . $i . '; -moz-box-sizing:border-box' . $i . '; -webkit-box-sizing:border-box' . $i . '; }';
110
  $a[] = 'div#login form select { width:99.5%' . $i . ' !ie<8; } div#login form select > option { font-size:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_field_size"] . $i . '; }';
111
  $a[] = 'div#login form label { cursor:pointer' . $i . '; } div#login form label.ws-plugin--s2member-custom-reg-field-op-l { opacity:0.7' . $i . '; font-size:90%' . $i . '; vertical-align:middle' . $i . '; }';
112
  $a[] = 'div#login form input[type="checkbox"], div#login form input[type="radio"] { margin:0 3px 0 0' . $i . '; vertical-align:middle' . $i . '; }';
@@ -118,8 +118,8 @@ if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
118
  $a[] = 'div#login form p.submit { margin-bottom:0' . $i . '; }';
119
  $a[] = 'div#login form input[type="submit"], div#login form input[type="submit"]:hover, div#login form input[type="submit"]:active, div#login form input[type="submit"]:focus { color:#666666' . $i . '; text-shadow:2px 2px 5px #EEEEEE' . $i . '; border:1px solid #999999' . $i . '; background:#FBFBFB' . $i . '; padding:5px' . $i . '; -moz-border-radius:3px' . $i . '; -webkit-border-radius:3px' . $i . '; border-radius:3px' . $i . '; }';
120
  $a[] = 'div#login form input[type="submit"]:hover, div#login form input[type="submit"]:active, div#login form input[type="submit"]:focus { color:#000000' . $i . '; text-shadow:2px 2px 5px #CCCCCC' . $i . '; border-color:#000000' . $i . '; }';
121
- $a[] = 'div#login form#registerform { padding-bottom:16px' . $i . '; } div#login form#registerform p.submit { float:none' . $i . '; margin-top:-10px' . $i . '; } div#login form#registerform input[type="submit"] { width:100%' . $i . '; }';
122
- $a[] = 'div#login form#lostpasswordform { padding-bottom:16px' . $i . '; } div#login form#lostpasswordform p.submit { float:none' . $i . '; } div#login form#lostpasswordform input[type="submit"] { width:100%' . $i . '; }';
123
  /**/
124
  $a[] = 'div.ws-plugin--s2member-password-strength { margin-top:3px' . $i . '; font-color:#000000' . $i . '; background-color:#EEEEEE' . $i . '; padding:3px' . $i . '; -moz-border-radius:3px' . $i . '; -webkit-border-radius:3px' . $i . '; border-radius:3px' . $i . '; } div.ws-plugin--s2member-password-strength-short { background-color:#FFA0A0' . $i . '; } div.ws-plugin--s2member-password-strength-bad { background-color:#FFB78C' . $i . '; } div.ws-plugin--s2member-password-strength-good { background-color:#FFEC8B' . $i . '; } div.ws-plugin--s2member-password-strength-strong { background-color:#C3FF88' . $i . '; } div.ws-plugin--s2member-password-strength-mismatch { background-color:#D6C1AB' . $i . '; }';
125
  /**/
@@ -131,7 +131,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
131
  $a = apply_filters ("ws_plugin__s2member_login_header_styles_array_before_close", $a, get_defined_vars ());
132
  $a[] = '</style>'; /* Now close style tag. There are other Filters below. */
133
  /**/
134
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
135
  do_action ("ws_plugin__s2member_during_login_header_styles", get_defined_vars ());
136
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
137
  /**/
@@ -166,7 +166,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
166
  }
167
  else /* Otherwise, safe to allow PHP code. */
168
  {
169
- eval ("?>" . $code);
170
  }
171
  /**/
172
  do_action ("ws_plugin__s2member_after_login_footer_design", get_defined_vars ());
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
21
  {
80
  $s = ""; /* Initialize styles string here to give Hooks a chance. */
81
  $a = array (); /* Initialize here to give Filters a chance. */
82
  /**/
83
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
84
  do_action ("ws_plugin__s2member_before_login_header_styles", get_defined_vars ());
85
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
86
  /**/
106
  $a[] = 'div#login p#backtoblog, div#login p#backtoblog a, div#login p#backtoblog a:hover, div#login p#backtoblog a:active, div#login p#backtoblog a:focus { color:#' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_color"] . $i . '; text-shadow:1px 1px 3px #' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_shadow_color"] . $i . '; }';
107
  /**/
108
  $a[] = 'div#login form p { margin:2px 0 16px 0' . $i . '; }'; /* Handles paragraph margins inside the form. */
109
+ $a[] = 'div#login form input[type="text"], div#login form input[type="email"], div#login form input[type="password"], div#login form textarea, div#login form select { font-weight:normal' . $i . '; color:#333333' . $i . '; background:none repeat scroll 0 0 #FBFBFB' . $i . '; border:1px solid #E5E5E5' . $i . '; font-size:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_field_size"] . $i . '; margin:0' . $i . '; padding:3px' . $i . '; -moz-border-radius:3px' . $i . '; -webkit-border-radius:3px' . $i . '; border-radius:3px' . $i . '; width:100%' . $i . '; width:98%' . $i . ' !ie<8; margin-right:2%' . $i . ' !ie<8; box-sizing:border-box' . $i . '; -ms-box-sizing:border-box' . $i . '; -moz-box-sizing:border-box' . $i . '; -webkit-box-sizing:border-box' . $i . '; }';
110
  $a[] = 'div#login form select { width:99.5%' . $i . ' !ie<8; } div#login form select > option { font-size:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_field_size"] . $i . '; }';
111
  $a[] = 'div#login form label { cursor:pointer' . $i . '; } div#login form label.ws-plugin--s2member-custom-reg-field-op-l { opacity:0.7' . $i . '; font-size:90%' . $i . '; vertical-align:middle' . $i . '; }';
112
  $a[] = 'div#login form input[type="checkbox"], div#login form input[type="radio"] { margin:0 3px 0 0' . $i . '; vertical-align:middle' . $i . '; }';
118
  $a[] = 'div#login form p.submit { margin-bottom:0' . $i . '; }';
119
  $a[] = 'div#login form input[type="submit"], div#login form input[type="submit"]:hover, div#login form input[type="submit"]:active, div#login form input[type="submit"]:focus { color:#666666' . $i . '; text-shadow:2px 2px 5px #EEEEEE' . $i . '; border:1px solid #999999' . $i . '; background:#FBFBFB' . $i . '; padding:5px' . $i . '; -moz-border-radius:3px' . $i . '; -webkit-border-radius:3px' . $i . '; border-radius:3px' . $i . '; }';
120
  $a[] = 'div#login form input[type="submit"]:hover, div#login form input[type="submit"]:active, div#login form input[type="submit"]:focus { color:#000000' . $i . '; text-shadow:2px 2px 5px #CCCCCC' . $i . '; border-color:#000000' . $i . '; }';
121
+ $a[] = 'div#login form#registerform { padding-bottom:16px' . $i . '; } div#login form#registerform p.submit { float:none' . $i . '; margin-top:-10px' . $i . '; } div#login form#registerform input[type="submit"] { float:none' . $i . '; width:100%' . $i . '; width:98%' . $i . ' !ie<8; margin-right:2%' . $i . ' !ie<8; box-sizing:border-box' . $i . '; -ms-box-sizing:border-box' . $i . '; -moz-box-sizing:border-box' . $i . '; -webkit-box-sizing:border-box' . $i . '; }';
122
+ $a[] = 'div#login form#lostpasswordform { padding-bottom:16px' . $i . '; } div#login form#lostpasswordform p.submit { float:none' . $i . '; } div#login form#lostpasswordform input[type="submit"] { float:none' . $i . '; width:100%' . $i . '; width:98%' . $i . ' !ie<8; margin-right:2%' . $i . ' !ie<8; box-sizing:border-box' . $i . '; -ms-box-sizing:border-box' . $i . '; -moz-box-sizing:border-box' . $i . '; -webkit-box-sizing:border-box' . $i . '; }';
123
  /**/
124
  $a[] = 'div.ws-plugin--s2member-password-strength { margin-top:3px' . $i . '; font-color:#000000' . $i . '; background-color:#EEEEEE' . $i . '; padding:3px' . $i . '; -moz-border-radius:3px' . $i . '; -webkit-border-radius:3px' . $i . '; border-radius:3px' . $i . '; } div.ws-plugin--s2member-password-strength-short { background-color:#FFA0A0' . $i . '; } div.ws-plugin--s2member-password-strength-bad { background-color:#FFB78C' . $i . '; } div.ws-plugin--s2member-password-strength-good { background-color:#FFEC8B' . $i . '; } div.ws-plugin--s2member-password-strength-strong { background-color:#C3FF88' . $i . '; } div.ws-plugin--s2member-password-strength-mismatch { background-color:#D6C1AB' . $i . '; }';
125
  /**/
131
  $a = apply_filters ("ws_plugin__s2member_login_header_styles_array_before_close", $a, get_defined_vars ());
132
  $a[] = '</style>'; /* Now close style tag. There are other Filters below. */
133
  /**/
134
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
135
  do_action ("ws_plugin__s2member_during_login_header_styles", get_defined_vars ());
136
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
137
  /**/
166
  }
167
  else /* Otherwise, safe to allow PHP code. */
168
  {
169
+ eval("?>" . $code);
170
  }
171
  /**/
172
  do_action ("ws_plugin__s2member_after_login_footer_design", get_defined_vars ());
includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level"))
21
  {
@@ -40,13 +40,13 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
- extract ($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^subscr_modify$/i", $paypal["txn_type"]))/**/
46
  && (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
47
  && (!empty ($paypal["subscr_id"])) && (!empty ($paypal["payer_email"]))/**/)
48
  {
49
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
50
  do_action ("ws_plugin__s2member_during_paypal_notify_before_subscr_modify", get_defined_vars ());
51
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
52
  /**/
@@ -68,7 +68,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
68
  $paypal["regular_term"] = $paypal["period3"]; /* This is just set to keep a standard; this way both initial_term & regular_term are available. */
69
  $paypal["recurring"] = ($paypal["recurring"]) ? $paypal["mc_amount3"] : "0"; /* If non-recurring, this should be zero, otherwise Regular. */
70
  /**/
71
- eval ('$ipn_signup_vars = $paypal; unset($ipn_signup_vars["s2member_log"]);'); /* Create array of IPN signup vars w/o s2member_log. */
72
  /**/
73
  if (($user_id = c_ws_plugin__s2member_utils_users::get_user_id_with ($paypal["subscr_id"])) && is_object ($user = new WP_User ($user_id)) && $user->ID)
74
  {
@@ -76,7 +76,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
76
  {
77
  $processing = $modifying = $during = true; /* Yes, we ARE processing this. */
78
  /**/
79
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
80
  do_action ("ws_plugin__s2member_during_paypal_notify_during_before_subscr_modify", get_defined_vars ());
81
  do_action ("ws_plugin__s2member_during_collective_mods", $user_id, get_defined_vars (), "ipn-upgrade-downgrade", "modification", "s2member_level" . $paypal["level"]);
82
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -87,7 +87,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
87
  /**/
88
  if (is_multisite () && !is_user_member_of_blog ($user_id)) /* Must have a Role on this Blog. */
89
  {
90
- add_existing_user_to_blog (array ("user_id" => $user_id, "role" => "s2member_level" . $paypal["level"]));
91
  $user = new WP_User ($user_id);
92
  }
93
  /**/
@@ -115,7 +115,6 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
115
  /**/
116
  update_user_option ($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars);
117
  /**/
118
- delete_user_option ($user_id, "s2member_file_download_access_arc");
119
  delete_user_option ($user_id, "s2member_file_download_access_log");
120
  /**/
121
  delete_user_option ($user_id, "s2member_auto_eot_time");
@@ -265,7 +264,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
265
  }
266
  }
267
  /**/
268
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
269
  do_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_modify", get_defined_vars ());
270
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
271
  }
@@ -282,7 +281,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
282
  $paypal["s2member_log"][] = "Duplicate IPN. Already processed. This IPN will be ignored.";
283
  }
284
  /**/
285
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
286
  do_action ("ws_plugin__s2member_during_paypal_notify_after_subscr_modify", get_defined_vars ());
287
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
288
  /**/
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level"))
21
  {
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
+ extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^subscr_modify$/i", $paypal["txn_type"]))/**/
46
  && (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
47
  && (!empty ($paypal["subscr_id"])) && (!empty ($paypal["payer_email"]))/**/)
48
  {
49
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
50
  do_action ("ws_plugin__s2member_during_paypal_notify_before_subscr_modify", get_defined_vars ());
51
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
52
  /**/
68
  $paypal["regular_term"] = $paypal["period3"]; /* This is just set to keep a standard; this way both initial_term & regular_term are available. */
69
  $paypal["recurring"] = ($paypal["recurring"]) ? $paypal["mc_amount3"] : "0"; /* If non-recurring, this should be zero, otherwise Regular. */
70
  /**/
71
+ eval('$ipn_signup_vars = $paypal; unset($ipn_signup_vars["s2member_log"]);'); /* Create array of IPN signup vars w/o s2member_log. */
72
  /**/
73
  if (($user_id = c_ws_plugin__s2member_utils_users::get_user_id_with ($paypal["subscr_id"])) && is_object ($user = new WP_User ($user_id)) && $user->ID)
74
  {
76
  {
77
  $processing = $modifying = $during = true; /* Yes, we ARE processing this. */
78
  /**/
79
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
80
  do_action ("ws_plugin__s2member_during_paypal_notify_during_before_subscr_modify", get_defined_vars ());
81
  do_action ("ws_plugin__s2member_during_collective_mods", $user_id, get_defined_vars (), "ipn-upgrade-downgrade", "modification", "s2member_level" . $paypal["level"]);
82
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
87
  /**/
88
  if (is_multisite () && !is_user_member_of_blog ($user_id)) /* Must have a Role on this Blog. */
89
  {
90
+ add_existing_user_to_blog(array ("user_id" => $user_id, "role" => "s2member_level" . $paypal["level"]));
91
  $user = new WP_User ($user_id);
92
  }
93
  /**/
115
  /**/
116
  update_user_option ($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars);
117
  /**/
 
118
  delete_user_option ($user_id, "s2member_file_download_access_log");
119
  /**/
120
  delete_user_option ($user_id, "s2member_auto_eot_time");
264
  }
265
  }
266
  /**/
267
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
268
  do_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_modify", get_defined_vars ());
269
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
270
  }
281
  $paypal["s2member_log"][] = "Duplicate IPN. Already processed. This IPN will be ignored.";
282
  }
283
  /**/
284
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
285
  do_action ("ws_plugin__s2member_during_paypal_notify_after_subscr_modify", get_defined_vars ());
286
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
287
  /**/
includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php CHANGED
@@ -49,9 +49,9 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_l
49
  && (!empty ($paypal["subscr_id"]) || ($paypal["subscr_id"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_subscr_id ($paypal)) || (!empty ($paypal["parent_txn_id"]) && ($paypal["subscr_id"] = $paypal["parent_txn_id"]))) /* Or `parent_txn_id`? */
50
  && (!empty ($paypal["period1"]) || ($paypal["period1"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_period1 ($paypal, false)) || empty ($recurring) || ($paypal["period1"] = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_var ("period1", false, $paypal["subscr_id"])) || ($paypal["period1"] = "0 D"))/**/
51
  && (!empty ($paypal["period3"]) || ($paypal["period3"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_period3 ($paypal, false)) || empty ($recurring) || ($paypal["period3"] = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_var ("period3", false, $paypal["subscr_id"])) || ($paypal["period3"] = "1 D"))/**/
52
- && ((!empty ($paypal["item_number"]) || ($paypal["item_number"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_item_number ($paypal))) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
53
- && (!empty ($paypal["item_name"]) || ($paypal["item_name"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_item_name ($paypal)) || ($paypal["item_name"] = $_SERVER["HTTP_HOST"]))/**/
54
- && (!empty ($paypal["payer_email"]) || ($paypal["payer_email"] = c_ws_plugin__s2member_utils_users::get_user_email_with ($paypal["subscr_id"])))/**/)
55
  {
56
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
57
  do_action ("ws_plugin__s2member_during_paypal_notify_before_subscr_eot", get_defined_vars ());
@@ -78,7 +78,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_l
78
  $paypal["ip"] = (preg_match ("/ip address/i", $paypal["option_name2"]) && $paypal["option_selection2"]) ? $paypal["option_selection2"] : "";
79
  $paypal["ip"] = (!$paypal["ip"] && preg_match ("/^[a-z0-9]+~[0-9\.]+$/i", $paypal["invoice"])) ? preg_replace ("/^[a-z0-9]+~/i", "", $paypal["invoice"]) : $paypal["ip"];
80
  /**/
81
- if (($user_id = c_ws_plugin__s2member_utils_users::get_user_id_with ($paypal["subscr_id"])) && is_object ($user = new WP_User ($user_id)) && $user->ID)
82
  {
83
  $fields = get_user_option ("s2member_custom_fields", $user_id); /* These will be needed below. */
84
  $user_reg_ip = get_user_option ("s2member_registration_ip", $user_id); /* Needed below. */
@@ -130,7 +130,6 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_l
130
  delete_user_option ($user_id, "s2member_last_payment_time");
131
  delete_user_option ($user_id, "s2member_auto_eot_time");
132
  /**/
133
- delete_user_option ($user_id, "s2member_file_download_access_arc");
134
  delete_user_option ($user_id, "s2member_file_download_access_log");
135
  /**/
136
  c_ws_plugin__s2member_user_notes::append_user_notes ($user_id, "Demoted by s2Member: " . date ("D M j, Y g:i a T"));
49
  && (!empty ($paypal["subscr_id"]) || ($paypal["subscr_id"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_subscr_id ($paypal)) || (!empty ($paypal["parent_txn_id"]) && ($paypal["subscr_id"] = $paypal["parent_txn_id"]))) /* Or `parent_txn_id`? */
50
  && (!empty ($paypal["period1"]) || ($paypal["period1"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_period1 ($paypal, false)) || empty ($recurring) || ($paypal["period1"] = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_var ("period1", false, $paypal["subscr_id"])) || ($paypal["period1"] = "0 D"))/**/
51
  && (!empty ($paypal["period3"]) || ($paypal["period3"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_period3 ($paypal, false)) || empty ($recurring) || ($paypal["period3"] = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_var ("period3", false, $paypal["subscr_id"])) || ($paypal["period3"] = "1 D"))/**/
52
+ && ((!empty ($paypal["item_number"]) || ($paypal["item_number"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_item_number ($paypal)) || ($paypal["item_number"] = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_var ("item_number", false, $paypal["subscr_id"]))) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
53
+ && (!empty ($paypal["item_name"]) || ($paypal["item_name"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_item_name ($paypal)) || ($paypal["item_name"] = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_var ("item_name", false, $paypal["subscr_id"])) || ($paypal["item_name"] = $_SERVER["HTTP_HOST"]))/**/
54
+ && (!empty ($paypal["payer_email"]) || ($paypal["payer_email"] = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_var ("payer_email", false, $paypal["subscr_id"])) || ($paypal["payer_email"] = c_ws_plugin__s2member_utils_users::get_user_email_with ($paypal["subscr_id"])))/**/)
55
  {
56
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
57
  do_action ("ws_plugin__s2member_during_paypal_notify_before_subscr_eot", get_defined_vars ());
78
  $paypal["ip"] = (preg_match ("/ip address/i", $paypal["option_name2"]) && $paypal["option_selection2"]) ? $paypal["option_selection2"] : "";
79
  $paypal["ip"] = (!$paypal["ip"] && preg_match ("/^[a-z0-9]+~[0-9\.]+$/i", $paypal["invoice"])) ? preg_replace ("/^[a-z0-9]+~/i", "", $paypal["invoice"]) : $paypal["ip"];
80
  /**/
81
+ if (($user_id = c_ws_plugin__s2member_utils_users::get_user_id_with ($paypal["subscr_id"])) && is_object ($user = new WP_User ($user_id)) && !empty ($user->ID))
82
  {
83
  $fields = get_user_option ("s2member_custom_fields", $user_id); /* These will be needed below. */
84
  $user_reg_ip = get_user_option ("s2member_registration_ip", $user_id); /* Needed below. */
130
  delete_user_option ($user_id, "s2member_last_payment_time");
131
  delete_user_option ($user_id, "s2member_auto_eot_time");
132
  /**/
 
133
  delete_user_option ($user_id, "s2member_file_download_access_log");
134
  /**/
135
  c_ws_plugin__s2member_user_notes::append_user_notes ($user_id, "Demoted by s2Member: " . date ("D M j, Y g:i a T"));
includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php CHANGED
@@ -136,7 +136,6 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level"
136
  /**/
137
  update_user_option ($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars);
138
  /**/
139
- delete_user_option ($user_id, "s2member_file_download_access_arc");
140
  delete_user_option ($user_id, "s2member_file_download_access_log");
141
  /**/
142
  if (preg_match ("/^web_accept$/i", $paypal["txn_type"]) && $paypal["eotper"])
136
  /**/
137
  update_user_option ($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars);
138
  /**/
 
139
  delete_user_option ($user_id, "s2member_file_download_access_log");
140
  /**/
141
  if (preg_match ("/^web_accept$/i", $paypal["txn_type"]) && $paypal["eotper"])
includes/classes/paypal-return-in-subscr-modify-w-level.inc.php CHANGED
@@ -113,7 +113,6 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
113
  if (!get_user_option ("s2member_registration_ip", $user_id))
114
  update_user_option ($user_id, "s2member_registration_ip", $paypal["ip"]);
115
  /**/
116
- delete_user_option ($user_id, "s2member_file_download_access_arc");
117
  delete_user_option ($user_id, "s2member_file_download_access_log");
118
  /**/
119
  delete_user_option ($user_id, "s2member_auto_eot_time");
113
  if (!get_user_option ("s2member_registration_ip", $user_id))
114
  update_user_option ($user_id, "s2member_registration_ip", $paypal["ip"]);
115
  /**/
 
116
  delete_user_option ($user_id, "s2member_file_download_access_log");
117
  /**/
118
  delete_user_option ($user_id, "s2member_auto_eot_time");
includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php CHANGED
@@ -151,7 +151,6 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
151
  if (!get_user_option ("s2member_registration_ip", $user_id))
152
  update_user_option ($user_id, "s2member_registration_ip", $paypal["ip"]);
153
  /**/
154
- delete_user_option ($user_id, "s2member_file_download_access_arc");
155
  delete_user_option ($user_id, "s2member_file_download_access_log");
156
  /**/
157
  if (preg_match ("/^web_accept$/i", $paypal["txn_type"]) && $paypal["eotper"])
151
  if (!get_user_option ("s2member_registration_ip", $user_id))
152
  update_user_option ($user_id, "s2member_registration_ip", $paypal["ip"]);
153
  /**/
 
154
  delete_user_option ($user_id, "s2member_file_download_access_log");
155
  /**/
156
  if (preg_match ("/^web_accept$/i", $paypal["txn_type"]) && $paypal["eotper"])
includes/classes/profile-mods-4bp-in.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_profile_mods_4bp_in"))
21
  {
@@ -51,7 +51,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_4bp_in"))
51
  {
52
  $GLOBALS["ws_plugin__s2member_profile_4bp_saved"] = true; /* Global flag as having been saved/updated successfully. */
53
  /**/
54
- $_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST)); /* Clean POST vars. */
55
  /**/
56
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
57
  if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level ("auto-detection", "profile"))
@@ -68,24 +68,24 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_4bp_in"))
68
  if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
69
  $fields[$field_var] = $_existing_fields[$field_var];
70
  else /* Else ``unset()``. */
71
- unset ($fields[$field_var]);
72
  }
73
  else if ($field["required"] === "yes" && (!isset ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) || (!is_array ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && !is_string ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])) || (is_array ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && empty ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && !strlen ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]))))
74
  {
75
  if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
76
  $fields[$field_var] = $_existing_fields[$field_var];
77
  else /* Else ``unset()``. */
78
- unset ($fields[$field_var]);
79
  }
80
  else if (isset ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]))
81
  {
82
  if ((is_array ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && strlen ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])))
83
  $fields[$field_var] = $_p["ws_plugin__s2member_profile_4bp_" . $field_var];
84
  else /* Else ``unset()``. */
85
- unset ($fields[$field_var]);
86
  }
87
  else /* Else ``unset()``. */
88
- unset ($fields[$field_var]);
89
  }
90
  /**/
91
  if (!empty ($fields))
@@ -94,11 +94,11 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_4bp_in"))
94
  delete_user_option ($user_id, "s2member_custom_fields");
95
  }
96
  /**/
97
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
98
  do_action ("ws_plugin__s2member_during_handle_profile_modifications_4bp", get_defined_vars ());
99
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
100
  /**/
101
- $user = new WP_User ($user_id); /* Update the WP_User object for the current User/Member. */
102
  (function_exists ("setup_userdata")) ? setup_userdata () : null; /* Update global vars. */
103
  }
104
  }
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_profile_mods_4bp_in"))
21
  {
51
  {
52
  $GLOBALS["ws_plugin__s2member_profile_4bp_saved"] = true; /* Global flag as having been saved/updated successfully. */
53
  /**/
54
+ $_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST)); /* Clean ``$_POST`` vars. */
55
  /**/
56
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
57
  if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level ("auto-detection", "profile"))
68
  if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
69
  $fields[$field_var] = $_existing_fields[$field_var];
70
  else /* Else ``unset()``. */
71
+ unset($fields[$field_var]);
72
  }
73
  else if ($field["required"] === "yes" && (!isset ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) || (!is_array ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && !is_string ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])) || (is_array ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && empty ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && !strlen ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]))))
74
  {
75
  if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
76
  $fields[$field_var] = $_existing_fields[$field_var];
77
  else /* Else ``unset()``. */
78
+ unset($fields[$field_var]);
79
  }
80
  else if (isset ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]))
81
  {
82
  if ((is_array ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && strlen ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])))
83
  $fields[$field_var] = $_p["ws_plugin__s2member_profile_4bp_" . $field_var];
84
  else /* Else ``unset()``. */
85
+ unset($fields[$field_var]);
86
  }
87
  else /* Else ``unset()``. */
88
+ unset($fields[$field_var]);
89
  }
90
  /**/
91
  if (!empty ($fields))
94
  delete_user_option ($user_id, "s2member_custom_fields");
95
  }
96
  /**/
97
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
98
  do_action ("ws_plugin__s2member_during_handle_profile_modifications_4bp", get_defined_vars ());
99
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
100
  /**/
101
+ $user = new WP_User ($user_id); /* Update the ``WP_User`` object for the current User/Member. */
102
  (function_exists ("setup_userdata")) ? setup_userdata () : null; /* Update global vars. */
103
  }
104
  }
includes/classes/profile-mods-in.inc.php CHANGED
@@ -52,7 +52,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_in"))
52
  {
53
  $GLOBALS["ws_plugin__s2member_profile_saved"] = true; /* Global flag as having been saved/updated successfully. */
54
  /**/
55
- $_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST));
56
  /**/
57
  $userdata["ID"] = $user_id; /* Needed for database update. */
58
  /**/
@@ -121,7 +121,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_in"))
121
  do_action ("ws_plugin__s2member_during_handle_profile_modifications", get_defined_vars ());
122
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
123
  /**/
124
- $user = new WP_User ($user_id); /* Update the WP_User object for the current User/Member. */
125
  (function_exists ("setup_userdata")) ? setup_userdata () : null; /* Update global vars. */
126
  /**/
127
  $lwp = c_ws_plugin__s2member_login_redirects::login_redirection_url ($user);
52
  {
53
  $GLOBALS["ws_plugin__s2member_profile_saved"] = true; /* Global flag as having been saved/updated successfully. */
54
  /**/
55
+ $_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST)); /* Clean ``$_POST`` vars. */
56
  /**/
57
  $userdata["ID"] = $user_id; /* Needed for database update. */
58
  /**/
121
  do_action ("ws_plugin__s2member_during_handle_profile_modifications", get_defined_vars ());
122
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
123
  /**/
124
+ $user = new WP_User ($user_id); /* Update the ``WP_User`` object for the current User/Member. */
125
  (function_exists ("setup_userdata")) ? setup_userdata () : null; /* Update global vars. */
126
  /**/
127
  $lwp = c_ws_plugin__s2member_login_redirects::login_redirection_url ($user);
includes/classes/querys.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_querys"))
21
  {
@@ -35,7 +35,7 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
35
  *
36
  * @var null|obj
37
  */
38
- static $current_wp_query;
39
  /**
40
  * Forces query Filters *( on-demand )*.
41
  *
@@ -52,13 +52,13 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
52
  */
53
  public static function force_query_level_access (&$wp_query = FALSE)
54
  {
55
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
56
  do_action ("ws_plugin__s2member_before_force_query_level_access", get_defined_vars ());
57
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
58
  /**/
59
  c_ws_plugin__s2member_querys::query_level_access ($wp_query, true);
60
  /**/
61
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
62
  do_action ("ws_plugin__s2member_after_force_query_level_access", get_defined_vars ());
63
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
64
  /**/
@@ -86,7 +86,7 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
86
  static $initial_query = true; /* Tracks initial query. */
87
  c_ws_plugin__s2member_querys::$current_wp_query = &$wp_query;
88
  /**/
89
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
90
  do_action ("ws_plugin__s2member_before_query_level_access", get_defined_vars ());
91
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
92
  /**/
@@ -214,14 +214,14 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
214
  }
215
  }
216
  /**/
217
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
218
  do_action ("ws_plugin__s2member_during_query_level_access", get_defined_vars ());
219
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
220
  }
221
  }
222
  }
223
  /**/
224
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
225
  do_action ("ws_plugin__s2member_after_query_level_access", get_defined_vars ());
226
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
227
  /**/
@@ -245,7 +245,7 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
245
  {
246
  global $wpdb; /* Global database object reference. */
247
  /**/
248
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
249
  do_action ("_ws_plugin__s2member_before_query_level_access_sys", get_defined_vars ());
250
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
251
  /**/
@@ -257,12 +257,12 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
257
  $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), $s)));
258
  $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $s)));
259
  /**/
260
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
261
  do_action ("_ws_plugin__s2member_during_query_level_access_sys", get_defined_vars ());
262
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
263
  }
264
  /**/
265
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
266
  do_action ("_ws_plugin__s2member_after_query_level_access_sys", get_defined_vars ());
267
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
268
  /**/
@@ -296,9 +296,9 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
296
  {
297
  foreach ($items as $child_item_key => $child_item)
298
  if (!empty ($child_item->menu_item_parent) && (int)$child_item->menu_item_parent === (int)$item->ID)
299
- unset ($items[$child_item_key]);
300
  /**/
301
- unset ($items[$item_key]);
302
  }
303
  }
304
  /**/
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_querys"))
21
  {
35
  *
36
  * @var null|obj
37
  */
38
+ public static $current_wp_query;
39
  /**
40
  * Forces query Filters *( on-demand )*.
41
  *
52
  */
53
  public static function force_query_level_access (&$wp_query = FALSE)
54
  {
55
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
56
  do_action ("ws_plugin__s2member_before_force_query_level_access", get_defined_vars ());
57
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
58
  /**/
59
  c_ws_plugin__s2member_querys::query_level_access ($wp_query, true);
60
  /**/
61
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
62
  do_action ("ws_plugin__s2member_after_force_query_level_access", get_defined_vars ());
63
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
64
  /**/
86
  static $initial_query = true; /* Tracks initial query. */
87
  c_ws_plugin__s2member_querys::$current_wp_query = &$wp_query;
88
  /**/
89
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
90
  do_action ("ws_plugin__s2member_before_query_level_access", get_defined_vars ());
91
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
92
  /**/
214
  }
215
  }
216
  /**/
217
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
218
  do_action ("ws_plugin__s2member_during_query_level_access", get_defined_vars ());
219
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
220
  }
221
  }
222
  }
223
  /**/
224
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
225
  do_action ("ws_plugin__s2member_after_query_level_access", get_defined_vars ());
226
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
227
  /**/
245
  {
246
  global $wpdb; /* Global database object reference. */
247
  /**/
248
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
249
  do_action ("_ws_plugin__s2member_before_query_level_access_sys", get_defined_vars ());
250
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
251
  /**/
257
  $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), $s)));
258
  $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $s)));
259
  /**/
260
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
261
  do_action ("_ws_plugin__s2member_during_query_level_access_sys", get_defined_vars ());
262
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
263
  }
264
  /**/
265
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
266
  do_action ("_ws_plugin__s2member_after_query_level_access_sys", get_defined_vars ());
267
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
268
  /**/
296
  {
297
  foreach ($items as $child_item_key => $child_item)
298
  if (!empty ($child_item->menu_item_parent) && (int)$child_item->menu_item_parent === (int)$item->ID)
299
+ unset($items[$child_item_key]);
300
  /**/
301
+ unset($items[$item_key]);
302
  }
303
  }
304
  /**/
includes/classes/ssl.inc.php CHANGED
@@ -50,7 +50,7 @@ if (!class_exists ("c_ws_plugin__s2member_ssl"))
50
  do_action ("ws_plugin__s2member_before_check_force_ssl", get_defined_vars ());
51
  /**/
52
  if (!$forced) /* Only force SSL here once. We definitely do NOT need to run this particular routine more than ONE time. */
53
- if (!c_ws_plugin__s2member_systematics::is_wp_systematic_use_page ()) /* Exclude all WordPress® Systematics. */
54
  {
55
  $s2_ssl_gv = apply_filters ("ws_plugin__s2member_check_force_ssl_get_var_name", "s2-ssl", get_defined_vars ());
56
  $_g_s2_ssl = (isset ($_GET[$s2_ssl_gv]) && (!strlen ($_GET[$s2_ssl_gv]) || !preg_match ("/^(0|no|off|false)$/i", $_GET[$s2_ssl_gv]))) ? ((!strlen ($_GET[$s2_ssl_gv])) ? true : $_GET[$s2_ssl_gv]) : false;
50
  do_action ("ws_plugin__s2member_before_check_force_ssl", get_defined_vars ());
51
  /**/
52
  if (!$forced) /* Only force SSL here once. We definitely do NOT need to run this particular routine more than ONE time. */
53
+ if (!c_ws_plugin__s2member_systematics::is_wp_systematic_use_page () /* NOT on WordPress® Systematics. */)
54
  {
55
  $s2_ssl_gv = apply_filters ("ws_plugin__s2member_check_force_ssl_get_var_name", "s2-ssl", get_defined_vars ());
56
  $_g_s2_ssl = (isset ($_GET[$s2_ssl_gv]) && (!strlen ($_GET[$s2_ssl_gv]) || !preg_match ("/^(0|no|off|false)$/i", $_GET[$s2_ssl_gv]))) ? ((!strlen ($_GET[$s2_ssl_gv])) ? true : $_GET[$s2_ssl_gv]) : false;
includes/classes/systematics-sp.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_systematics_sp"))
21
  {
@@ -42,6 +42,8 @@ if (!class_exists ("c_ws_plugin__s2member_systematics_sp"))
42
  */
43
  public static function is_systematic_use_specific_page ($singular_id = FALSE, $uri = FALSE)
44
  {
 
 
45
  $singular_id = ($singular_id && is_numeric ($singular_id)) ? (int)$singular_id : false; /* Force types. */
46
  $uri = ($uri && is_string ($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri ($uri))) ? $uri : false;
47
  /**/
@@ -69,6 +71,14 @@ if (!class_exists ("c_ws_plugin__s2member_systematics_sp"))
69
  {
70
  return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
71
  }
 
 
 
 
 
 
 
 
72
  else /* Otherwise, we return false ( i.e. it's NOT a Systematic area ). */
73
  return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", false, get_defined_vars ()));
74
  }
@@ -84,8 +94,6 @@ if (!class_exists ("c_ws_plugin__s2member_systematics_sp"))
84
  */
85
  public static function is_wp_systematic_use_specific_page ($singular_id = FALSE, $uri = FALSE)
86
  {
87
- global $bp; /* If BuddyPress is installed, we'll need this global reference. */
88
- /**/
89
  $singular_id = ($singular_id && is_numeric ($singular_id)) ? (int)$singular_id : false; /* Force types. */
90
  $uri = ($uri && is_string ($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri ($uri))) ? $uri : false;
91
  /**/
@@ -97,14 +105,6 @@ if (!class_exists ("c_ws_plugin__s2member_systematics_sp"))
97
  {
98
  return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", true, get_defined_vars ()));
99
  }
100
- else if ($uri && c_ws_plugin__s2member_utils_conds::bp_is_installed () && preg_match ("/\/(" . preg_quote (trim (((function_exists ("bp_get_signup_slug")) ? bp_get_signup_slug () : BP_REGISTER_SLUG), "/"), "/") . "|" . preg_quote (trim (((function_exists ("bp_get_activate_slug")) ? bp_get_activate_slug () : BP_ACTIVATION_SLUG), "/"), "/") . ")(\/|$)/", $uri))
101
- {
102
- return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", true, get_defined_vars ()));
103
- }
104
- else if ($singular_id && c_ws_plugin__s2member_utils_conds::bp_is_installed () && ((!empty ($bp->pages->register->id) && $singular_id === (int)$bp->pages->register->id) || (!empty ($bp->pages->activate->id) && $singular_id === (int)$bp->pages->activate->id)))
105
- {
106
- return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", true, get_defined_vars ()));
107
- }
108
  else /* Otherwise, we return false ( i.e. it's NOT a WordPress® Systematic area ). */
109
  return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", false, get_defined_vars ()));
110
  }
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_systematics_sp"))
21
  {
42
  */
43
  public static function is_systematic_use_specific_page ($singular_id = FALSE, $uri = FALSE)
44
  {
45
+ global $bp; /* If BuddyPress is installed, we'll need this global reference. */
46
+ /**/
47
  $singular_id = ($singular_id && is_numeric ($singular_id)) ? (int)$singular_id : false; /* Force types. */
48
  $uri = ($uri && is_string ($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri ($uri))) ? $uri : false;
49
  /**/
71
  {
72
  return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
73
  }
74
+ else if ($uri && c_ws_plugin__s2member_utils_conds::bp_is_installed () && preg_match ("/\/(" . preg_quote (trim (((function_exists ("bp_get_signup_slug")) ? bp_get_signup_slug () : BP_REGISTER_SLUG), "/"), "/") . "|" . preg_quote (trim (((function_exists ("bp_get_activate_slug")) ? bp_get_activate_slug () : BP_ACTIVATION_SLUG), "/"), "/") . ")(\/|$)/", $uri))
75
+ {
76
+ return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
77
+ }
78
+ else if ($singular_id && c_ws_plugin__s2member_utils_conds::bp_is_installed () && ((!empty ($bp->pages->register->id) && $singular_id === (int)$bp->pages->register->id) || (!empty ($bp->pages->activate->id) && $singular_id === (int)$bp->pages->activate->id)))
79
+ {
80
+ return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
81
+ }
82
  else /* Otherwise, we return false ( i.e. it's NOT a Systematic area ). */
83
  return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", false, get_defined_vars ()));
84
  }
94
  */
95
  public static function is_wp_systematic_use_specific_page ($singular_id = FALSE, $uri = FALSE)
96
  {
 
 
97
  $singular_id = ($singular_id && is_numeric ($singular_id)) ? (int)$singular_id : false; /* Force types. */
98
  $uri = ($uri && is_string ($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri ($uri))) ? $uri : false;
99
  /**/
105
  {
106
  return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", true, get_defined_vars ()));
107
  }
 
 
 
 
 
 
 
 
108
  else /* Otherwise, we return false ( i.e. it's NOT a WordPress® Systematic area ). */
109
  return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", false, get_defined_vars ()));
110
  }
includes/classes/systematics.inc.php CHANGED
@@ -34,6 +34,9 @@ if (!class_exists ("c_ws_plugin__s2member_systematics"))
34
  * @since 3.5
35
  *
36
  * @return bool True if Systematic, else false.
 
 
 
37
  */
38
  public static function is_systematic_use_page ()
39
  {
@@ -67,6 +70,10 @@ if (!class_exists ("c_ws_plugin__s2member_systematics"))
67
  {
68
  return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
69
  }
 
 
 
 
70
  else /* Otherwise, we return false ( it's NOT Systematic ). */
71
  return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", false, get_defined_vars ()));
72
  }
@@ -77,6 +84,9 @@ if (!class_exists ("c_ws_plugin__s2member_systematics"))
77
  * @since 111002
78
  *
79
  * @return bool True if WordPress® Systematic, else false.
 
 
 
80
  */
81
  public static function is_wp_systematic_use_page ()
82
  {
@@ -110,10 +120,6 @@ if (!class_exists ("c_ws_plugin__s2member_systematics"))
110
  {
111
  return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_page", true, get_defined_vars ()));
112
  }
113
- else if (c_ws_plugin__s2member_utils_conds::bp_is_installed () && (bp_is_register_page () || bp_is_activation_page ()))
114
- {
115
- return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_page", true, get_defined_vars ()));
116
- }
117
  else if ($_SERVER["REMOTE_ADDR"] === $_SERVER["SERVER_ADDR"] && stripos ($_SERVER["HTTP_HOST"], "localhost") === false && strpos ($_SERVER["HTTP_HOST"], "127.0.0.1") === false && (!defined ("LOCALHOST") || !LOCALHOST))
118
  {
119
  return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_page", true, get_defined_vars ()));
34
  * @since 3.5
35
  *
36
  * @return bool True if Systematic, else false.
37
+ *
38
+ * @note The results of this function are cached staticially.
39
+ * Do NOT call upon this until the `wp` Hook is fired.
40
  */
41
  public static function is_systematic_use_page ()
42
  {
70
  {
71
  return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
72
  }
73
+ else if (c_ws_plugin__s2member_utils_conds::bp_is_installed () && (bp_is_register_page () || bp_is_activation_page ()))
74
+ {
75
+ return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
76
+ }
77
  else /* Otherwise, we return false ( it's NOT Systematic ). */
78
  return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", false, get_defined_vars ()));
79
  }
84
  * @since 111002
85
  *
86
  * @return bool True if WordPress® Systematic, else false.
87
+ *
88
+ * @note The results of this function are cached staticially.
89
+ * Do NOT call upon this until the `wp` Hook is fired.
90
  */
91
  public static function is_wp_systematic_use_page ()
92
  {
120
  {
121
  return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_page", true, get_defined_vars ()));
122
  }
 
 
 
 
123
  else if ($_SERVER["REMOTE_ADDR"] === $_SERVER["SERVER_ADDR"] && stripos ($_SERVER["HTTP_HOST"], "localhost") === false && strpos ($_SERVER["HTTP_HOST"], "127.0.0.1") === false && (!defined ("LOCALHOST") || !LOCALHOST))
124
  {
125
  return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_page", true, get_defined_vars ()));
includes/classes/utils-arrays.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utils_arrays"))
21
  {
@@ -38,26 +38,17 @@ if (!class_exists ("c_ws_plugin__s2member_utils_arrays"))
38
  */
39
  public static function array_unique ($array = FALSE)
40
  {
41
- if (!is_array ($array))
42
- {
43
- return array ($array);
44
- }
45
- else /* Serialized array_unique. */
46
- {
47
- foreach ($array as &$value)
48
- {
49
- $value = serialize ($value);
50
- }
51
- /**/
52
- $array = array_unique ($array);
53
- /**/
54
- foreach ($array as &$value)
55
- {
56
- $value = unserialize ($value);
57
- }
58
- /**/
59
- return $array;
60
- }
61
  }
62
  /**
63
  * Searches an array *( or even a multi-dimensional array )* using a regular expression match against array values.
@@ -137,16 +128,13 @@ if (!class_exists ("c_ws_plugin__s2member_utils_arrays"))
137
  {
138
  if (is_array ($array) && !empty ($array))
139
  {
140
- foreach ($array as $key => $value)
141
  {
142
- if (is_array ($value)) /* Recursive function call. */
143
- {
144
- $array[$key] = c_ws_plugin__s2member_utils_arrays::remove_null_keys ($value);
145
- }
146
  else if (is_null ($value)) /* Is it null? */
147
- {
148
- unset($array[$key]);
149
- }
150
  }
151
  /**/
152
  return $array;
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utils_arrays"))
21
  {
38
  */
39
  public static function array_unique ($array = FALSE)
40
  {
41
+ $array = (array)$array;
42
+ /**/
43
+ foreach ($array as &$value)
44
+ $value = serialize ($value);
45
+ /**/
46
+ $array = array_unique ($array);
47
+ /**/
48
+ foreach ($array as &$value)
49
+ $value = unserialize ($value);
50
+ /**/
51
+ return $array;
 
 
 
 
 
 
 
 
 
52
  }
53
  /**
54
  * Searches an array *( or even a multi-dimensional array )* using a regular expression match against array values.
128
  {
129
  if (is_array ($array) && !empty ($array))
130
  {
131
+ foreach ($array as $key => &$value)
132
  {
133
+ if (is_array ($value)) /* Recursive function call here. */
134
+ $value = c_ws_plugin__s2member_utils_arrays::remove_null_keys ($value);
135
+ /**/
 
136
  else if (is_null ($value)) /* Is it null? */
137
+ unset ($array[$key]);
 
 
138
  }
139
  /**/
140
  return $array;
includes/classes/utils-gets.inc.php CHANGED
@@ -156,7 +156,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_gets"))
156
  {
157
  foreach ($results as $result) /* Now we need to check Custom Capabilities against $user. */
158
  {
159
- if (!is_object ($user) || !$user->ID) /* No ``$user``, not logged-in?. */
160
  $singular_ids[] = $result->post_id; /* No way to satisfy. */
161
  /**/
162
  else if (is_array ($ccaps = @unserialize ($result->meta_value)))
156
  {
157
  foreach ($results as $result) /* Now we need to check Custom Capabilities against $user. */
158
  {
159
+ if (!is_object ($user) || empty ($user->ID)) /* No ``$user``, not logged-in?. */
160
  $singular_ids[] = $result->post_id; /* No way to satisfy. */
161
  /**/
162
  else if (is_array ($ccaps = @unserialize ($result->meta_value)))
includes/classes/utils-users.inc.php CHANGED
@@ -65,7 +65,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
65
  {
66
  global $wpdb; /* Need global DB obj. */
67
  /**/
68
- if ($subscr_or_txn_id && $os0) /* This case includes some additional routines that can use the $os0 value. */
69
  {
70
  if (($q = $wpdb->get_row ("SELECT `user_id` FROM `" . $wpdb->usermeta . "` WHERE (`meta_key` = '" . $wpdb->prefix . "s2member_subscr_id' OR `meta_key` = '" . $wpdb->prefix . "s2member_first_payment_txn_id') AND (`meta_value` = '" . $wpdb->escape ($subscr_or_txn_id) . "' OR `meta_value` = '" . $wpdb->escape ($os0) . "') LIMIT 1"))/**/
71
  || ($q = $wpdb->get_row ("SELECT `ID` AS `user_id` FROM `" . $wpdb->users . "` WHERE `ID` = '" . $wpdb->escape ($os0) . "' LIMIT 1")))
@@ -97,7 +97,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
97
  {
98
  global $wpdb; /* Need global DB obj. */
99
  /**/
100
- if ($subscr_or_txn_id && $os0) /* This case includes some additional routines that can use the $os0 value. */
101
  {
102
  if (($q = $wpdb->get_row ("SELECT `user_id` FROM `" . $wpdb->usermeta . "` WHERE (`meta_key` = '" . $wpdb->prefix . "s2member_subscr_id' OR `meta_key` = '" . $wpdb->prefix . "s2member_first_payment_txn_id') AND (`meta_value` = '" . $wpdb->escape ($subscr_or_txn_id) . "' OR `meta_value` = '" . $wpdb->escape ($os0) . "') LIMIT 1"))/**/
103
  || ($q = $wpdb->get_row ("SELECT `ID` AS `user_id` FROM `" . $wpdb->users . "` WHERE `ID` = '" . $wpdb->escape ($os0) . "' LIMIT 1")))
@@ -127,17 +127,17 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
127
  {
128
  global $wpdb; /* Need global DB obj. */
129
  /**/
130
- if ($subscr_or_txn_id && $os0) /* This case includes some additional routines that can use the $os0 value. */
131
  {
132
  if (($q = $wpdb->get_row ("SELECT `user_id` FROM `" . $wpdb->usermeta . "` WHERE (`meta_key` = '" . $wpdb->prefix . "s2member_subscr_id' OR `meta_key` = '" . $wpdb->prefix . "s2member_first_payment_txn_id') AND (`meta_value` = '" . $wpdb->escape ($subscr_or_txn_id) . "' OR `meta_value` = '" . $wpdb->escape ($os0) . "') LIMIT 1"))/**/
133
  || ($q = $wpdb->get_row ("SELECT `ID` AS `user_id` FROM `" . $wpdb->users . "` WHERE `ID` = '" . $wpdb->escape ($os0) . "' LIMIT 1")))
134
- if (is_object ($user = new WP_User ($q->user_id)) && $user->ID && ($email = $user->user_email))
135
  return $email;
136
  }
137
  else if ($subscr_or_txn_id) /* Otherwise, if all we have is a Subscr./Txn. ID value. */
138
  {
139
  if (($q = $wpdb->get_row ("SELECT `user_id` FROM `" . $wpdb->usermeta . "` WHERE (`meta_key` = '" . $wpdb->prefix . "s2member_subscr_id' OR `meta_key` = '" . $wpdb->prefix . "s2member_first_payment_txn_id') AND `meta_value` = '" . $wpdb->escape ($subscr_or_txn_id) . "' LIMIT 1")))
140
- if (is_object ($user = new WP_User ($q->user_id)) && $user->ID && ($email = $user->user_email))
141
  return $email;
142
  }
143
  /**/
@@ -159,7 +159,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
159
  */
160
  public static function get_user_ipn_signup_vars ($user_id = FALSE, $subscr_id = FALSE)
161
  {
162
- if ($user_id || ($subscr_id && ($user_id = c_ws_plugin__s2member_utils_users::get_user_id_with ($subscr_id))) || (!$user_id && !$subscr_id && is_object ($user = wp_get_current_user ()) && ($user_id = $user->ID)))
163
  {
164
  if (($_subscr_id = get_user_option ("s2member_subscr_id", $user_id)) && (!$subscr_id || $subscr_id === $_subscr_id) && ($subscr_id = $_subscr_id))
165
  if (is_array ($ipn_signup_vars = get_user_option ("s2member_ipn_signup_vars", $user_id)))
@@ -209,9 +209,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
209
  */
210
  public static function get_user_subscr_or_wp_id ($user = FALSE)
211
  {
212
- if ((func_num_args () && (!is_object ($user) || !$user->ID)) || (!func_num_args () && !$user && (!is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false) || !$user->ID)))
213
  {
214
- return false; /* The $user was passed in but is NOT an object; or nobody is logged in. */
215
  }
216
  else /* Else return Paid Subscr. ID ( if available ), otherwise return their WP database User ID. */
217
  return ($subscr_id = get_user_option ("s2member_subscr_id", $user->ID)) ? $subscr_id : $user->ID;
@@ -288,7 +288,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
288
  * Or, this could be set to any property that exists on the WP_User object for a particular User;
289
  * ( i.e. `id`, `ID`, `user_login`, `user_email`, `first_name`, `last_name`, `display_name`, `ip`, `IP`,
290
  * `s2member_registration_ip`, `s2member_custom`, `s2member_subscr_id`, `s2member_subscr_or_wp_id`,
291
- * `s2member_subscr_gateway`, `s2member_custom_fields`, `s2member_file_download_access_log`,
292
  * `s2member_auto_eot_time`, `s2member_last_payment_time`, `s2member_paid_registration_times`,
293
  * `s2member_access_role`, `s2member_access_level`, `s2member_access_label`,
294
  * `s2member_access_ccaps`, etc, etc. ).
@@ -301,7 +301,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
301
  /**/
302
  $current_user = wp_get_current_user (); /* Current User's object ( used when/if `$user_id` is empty ). */
303
  /**/
304
- if (is_object ($user = ($user_id) ? new WP_User ($user_id) : $current_user) && ($user_id = $user->ID))
305
  {
306
  if (isset ($user->$field_id)) /* Immediate User object property? ( most likely ) */
307
  return $user->$field_id;
@@ -336,7 +336,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
336
  else if (strcasecmp ($field_id, "s2member_access_ccaps") === 0) /* Custom Caps? */
337
  return c_ws_plugin__s2member_user_access::user_access_ccaps ($user);
338
  /**/
339
- else if (strcasecmp ($field_id, "ip") === 0 && is_object ($current_user) && $current_user->ID === $user_id)
340
  return $_SERVER["REMOTE_ADDR"]; /* The current User's IP address, right now. */
341
  /**/
342
  else if (strcasecmp ($field_id, "s2member_registration_ip") === 0 || strcasecmp ($field_id, "reg_ip") === 0 || strcasecmp ($field_id, "ip") === 0)
65
  {
66
  global $wpdb; /* Need global DB obj. */
67
  /**/
68
+ if ($subscr_or_txn_id && $os0) /* This case includes some additional routines that can use the ``$os0`` value. */
69
  {
70
  if (($q = $wpdb->get_row ("SELECT `user_id` FROM `" . $wpdb->usermeta . "` WHERE (`meta_key` = '" . $wpdb->prefix . "s2member_subscr_id' OR `meta_key` = '" . $wpdb->prefix . "s2member_first_payment_txn_id') AND (`meta_value` = '" . $wpdb->escape ($subscr_or_txn_id) . "' OR `meta_value` = '" . $wpdb->escape ($os0) . "') LIMIT 1"))/**/
71
  || ($q = $wpdb->get_row ("SELECT `ID` AS `user_id` FROM `" . $wpdb->users . "` WHERE `ID` = '" . $wpdb->escape ($os0) . "' LIMIT 1")))
97
  {
98
  global $wpdb; /* Need global DB obj. */
99
  /**/
100
+ if ($subscr_or_txn_id && $os0) /* This case includes some additional routines that can use the ``$os0`` value. */
101
  {
102
  if (($q = $wpdb->get_row ("SELECT `user_id` FROM `" . $wpdb->usermeta . "` WHERE (`meta_key` = '" . $wpdb->prefix . "s2member_subscr_id' OR `meta_key` = '" . $wpdb->prefix . "s2member_first_payment_txn_id') AND (`meta_value` = '" . $wpdb->escape ($subscr_or_txn_id) . "' OR `meta_value` = '" . $wpdb->escape ($os0) . "') LIMIT 1"))/**/
103
  || ($q = $wpdb->get_row ("SELECT `ID` AS `user_id` FROM `" . $wpdb->users . "` WHERE `ID` = '" . $wpdb->escape ($os0) . "' LIMIT 1")))
127
  {
128
  global $wpdb; /* Need global DB obj. */
129
  /**/
130
+ if ($subscr_or_txn_id && $os0) /* This case includes some additional routines that can use the ``$os0`` value. */
131
  {
132
  if (($q = $wpdb->get_row ("SELECT `user_id` FROM `" . $wpdb->usermeta . "` WHERE (`meta_key` = '" . $wpdb->prefix . "s2member_subscr_id' OR `meta_key` = '" . $wpdb->prefix . "s2member_first_payment_txn_id') AND (`meta_value` = '" . $wpdb->escape ($subscr_or_txn_id) . "' OR `meta_value` = '" . $wpdb->escape ($os0) . "') LIMIT 1"))/**/
133
  || ($q = $wpdb->get_row ("SELECT `ID` AS `user_id` FROM `" . $wpdb->users . "` WHERE `ID` = '" . $wpdb->escape ($os0) . "' LIMIT 1")))
134
+ if (is_object ($user = new WP_User ($q->user_id)) && !empty ($user->ID) && ($email = $user->user_email))
135
  return $email;
136
  }
137
  else if ($subscr_or_txn_id) /* Otherwise, if all we have is a Subscr./Txn. ID value. */
138
  {
139
  if (($q = $wpdb->get_row ("SELECT `user_id` FROM `" . $wpdb->usermeta . "` WHERE (`meta_key` = '" . $wpdb->prefix . "s2member_subscr_id' OR `meta_key` = '" . $wpdb->prefix . "s2member_first_payment_txn_id') AND `meta_value` = '" . $wpdb->escape ($subscr_or_txn_id) . "' LIMIT 1")))
140
+ if (is_object ($user = new WP_User ($q->user_id)) && !empty ($user->ID) && ($email = $user->user_email))
141
  return $email;
142
  }
143
  /**/
159
  */
160
  public static function get_user_ipn_signup_vars ($user_id = FALSE, $subscr_id = FALSE)
161
  {
162
+ if ($user_id || ($subscr_id && ($user_id = c_ws_plugin__s2member_utils_users::get_user_id_with ($subscr_id))) || (!$user_id && !$subscr_id && is_object ($user = wp_get_current_user ()) && !empty ($user->ID) && ($user_id = $user->ID)))
163
  {
164
  if (($_subscr_id = get_user_option ("s2member_subscr_id", $user_id)) && (!$subscr_id || $subscr_id === $_subscr_id) && ($subscr_id = $_subscr_id))
165
  if (is_array ($ipn_signup_vars = get_user_option ("s2member_ipn_signup_vars", $user_id)))
209
  */
210
  public static function get_user_subscr_or_wp_id ($user = FALSE)
211
  {
212
+ if ((func_num_args () && (!is_object ($user) || empty ($user->ID))) || (!func_num_args () && (!is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false) || empty ($user->ID))))
213
  {
214
+ return false; /* The ``$user`` was passed in but is NOT an object; or nobody is logged in. */
215
  }
216
  else /* Else return Paid Subscr. ID ( if available ), otherwise return their WP database User ID. */
217
  return ($subscr_id = get_user_option ("s2member_subscr_id", $user->ID)) ? $subscr_id : $user->ID;
288
  * Or, this could be set to any property that exists on the WP_User object for a particular User;
289
  * ( i.e. `id`, `ID`, `user_login`, `user_email`, `first_name`, `last_name`, `display_name`, `ip`, `IP`,
290
  * `s2member_registration_ip`, `s2member_custom`, `s2member_subscr_id`, `s2member_subscr_or_wp_id`,
291
+ * `s2member_subscr_gateway`, `s2member_custom_fields`, `s2member_file_download_access_[log|arc]`,
292
  * `s2member_auto_eot_time`, `s2member_last_payment_time`, `s2member_paid_registration_times`,
293
  * `s2member_access_role`, `s2member_access_level`, `s2member_access_label`,
294
  * `s2member_access_ccaps`, etc, etc. ).
301
  /**/
302
  $current_user = wp_get_current_user (); /* Current User's object ( used when/if `$user_id` is empty ). */
303
  /**/
304
+ if (is_object ($user = ($user_id) ? new WP_User ($user_id) : $current_user) && !empty ($user->ID) && ($user_id = $user->ID))
305
  {
306
  if (isset ($user->$field_id)) /* Immediate User object property? ( most likely ) */
307
  return $user->$field_id;
336
  else if (strcasecmp ($field_id, "s2member_access_ccaps") === 0) /* Custom Caps? */
337
  return c_ws_plugin__s2member_user_access::user_access_ccaps ($user);
338
  /**/
339
+ else if (strcasecmp ($field_id, "ip") === 0 && is_object ($current_user) && !empty ($current_user->ID) && $current_user->ID === ($user_id = $user->ID))
340
  return $_SERVER["REMOTE_ADDR"]; /* The current User's IP address, right now. */
341
  /**/
342
  else if (strcasecmp ($field_id, "s2member_registration_ip") === 0 || strcasecmp ($field_id, "reg_ip") === 0 || strcasecmp ($field_id, "ip") === 0)
includes/functions/api-functions.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**
20
  * Conditional to determine if the current User is NOT logged in.
21
  *
@@ -1972,6 +1972,162 @@ if (!function_exists ("s2member_file_download_key"))
1972
  }
1973
  }
1974
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1975
  * Obtains the Registration Time for the current User, and/or for a particular User.
1976
  *
1977
  * The Registration Time, is the time at which the Username was created for the account, that's it.
@@ -2091,7 +2247,8 @@ if (!function_exists ("s2member_paid_registration_time"))
2091
  * $s2member_subscr_gateway = get_user_field ("s2member_subscr_gateway"); # Paid Subscr. Gateway Code for the current User.
2092
  * $s2member_registration_ip = get_user_field ("s2member_registration_ip"); # IP the current User had during registration.
2093
  * $s2member_custom_fields = get_user_field ("s2member_custom_fields"); # Associative array of all Custom Registration/Profile Fields.
2094
- * $s2member_file_download_access_log = get_user_field ("s2member_file_download_access_log"); # Associative array of all File Downloads by the current User.
 
2095
  * $s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time"); # Auto EOT-Time for the current User ( when applicable ).
2096
  * $s2member_last_payment_time = get_user_field ("s2member_last_payment_time"); # Timestamp. Last time an actual payment was received by s2Member.
2097
  * $s2member_paid_registration_times = get_user_field ("s2member_paid_registration_times"); # Timestamps. Associative array of all Paid Registration Times.
@@ -2172,7 +2329,8 @@ if (!function_exists ("s2member_paid_registration_time"))
2172
  * $s2member_subscr_gateway = get_user_option ("s2member_subscr_gateway"); # Paid Subscr. Gateway Code for the current User.
2173
  * $s2member_registration_ip = get_user_option ("s2member_registration_ip"); # IP the current User had during registration.
2174
  * $s2member_custom_fields = get_user_option ("s2member_custom_fields"); # Associative array of all Custom Registration/Profile Fields.
2175
- * $s2member_file_download_access_log = get_user_option ("s2member_file_download_access_log"); # Associative array of all File Downloads by the current User.
 
2176
  * $s2member_auto_eot_time = get_user_option ("s2member_auto_eot_time"); # Auto EOT-Time for the current User ( when applicable ).
2177
  * $s2member_last_payment_time = get_user_option ("s2member_last_payment_time"); # Timestamp. Last time an actual payment was received by s2Member.
2178
  * $s2member_paid_registration_times = get_user_option ("s2member_paid_registration_times"); # Timestamps. Associative array of all Paid Registration Times.
@@ -2195,7 +2353,7 @@ if (!function_exists ("s2member_paid_registration_time"))
2195
  * Or, this could be set to any property that exists on the WP_User object for a particular User;
2196
  * ( i.e. `id`, `ID`, `user_login`, `user_email`, `first_name`, `last_name`, `display_name`, `ip`, `IP`,
2197
  * `s2member_registration_ip`, `s2member_custom`, `s2member_subscr_id`, `s2member_subscr_or_wp_id`,
2198
- * `s2member_subscr_gateway`, `s2member_custom_fields`, `s2member_file_download_access_log`,
2199
  * `s2member_auto_eot_time`, `s2member_last_payment_time`, `s2member_paid_registration_times`,
2200
  * `s2member_access_role`, `s2member_access_level`, `s2member_access_label`,
2201
  * `s2member_access_ccaps`, `s2member_login_counter`, etc, etc. ).
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**
20
  * Conditional to determine if the current User is NOT logged in.
21
  *
1972
  }
1973
  }
1974
  /**
1975
+ * Retrieves an array of details, related to a User's File Downloads.
1976
+ *
1977
+ * ———— PHP Code Samples ————
1978
+ * ```
1979
+ * <!php
1980
+ * $user_downloads = s2member_user_downloads();
1981
+ * $specific_user_downloads = s2member_user_downloads(($user_id = 123));
1982
+ * !>
1983
+ * ```
1984
+ * ———— Shortcode Equivalent ————
1985
+ * ```
1986
+ * There is NO Shortcode equivalent for this yet.
1987
+ * ```
1988
+ *
1989
+ * @package s2Member\API_Functions
1990
+ * @since 111026
1991
+ *
1992
+ * @param str|int $user_id Optional. Defaults to the currently logged-in User's ID.
1993
+ * @param str $not_counting_this_particular_file Optional. If you want to exclude a particular file, relative to the `/s2member-files/` directory, or relative to the root of your Amazon® S3 Bucket *( when applicable )*.
1994
+ * @return array An array with the following elements... File Downloads allowed for this User: (int)`allowed`, Download Period for this User in days: (int)`allowed_days`, Files downloaded by this User in the current Period: (int)`currently`, log of all Files downloaded in the current Period, with file names/dates: (array)`log`, archive of all Files downloaded in prior Periods, with file names/dates: (array)`archive`.
1995
+ *
1996
+ * @note Calculations returned by this function do NOT include File Downloads that were accessed with an Advanced File Download Key.
1997
+ *
1998
+ * @see s2Member\API_Functions\s2member_total_downloads_of()
1999
+ * @see s2Member\API_Functions\s2member_total_unique_downloads_of()
2000
+ *
2001
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
2002
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
2003
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
2004
+ *
2005
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
2006
+ *
2007
+ * @see s2Member\API_Constants\S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
2008
+ * @see s2Member\API_Constants\S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
2009
+ *
2010
+ * @see s2Member\API_Constants\S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
2011
+ * @see s2Member\API_Constants\S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
2012
+ *
2013
+ * @see s2Member\API_Constants\S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
2014
+ *
2015
+ * @todo Make it possible for s2Member to keep a count of files downloaded with an Advanced Download Key.
2016
+ * @todo Create a Shortcode equivalent.
2017
+ */
2018
+ if (!function_exists ("s2member_user_downloads"))
2019
+ {
2020
+ function s2member_user_downloads ($user_id = FALSE, $not_counting_this_particular_file = FALSE)
2021
+ {
2022
+ $user = ($user_id && is_object ($user = new WP_User ((int)$user_id)) && !empty ($user->ID)) ? $user : false;
2023
+ return c_ws_plugin__s2member_files::user_downloads ($user, $not_counting_this_particular_file);
2024
+ }
2025
+ }
2026
+ /**
2027
+ * Total downloads of a particular file; possibly by a particular User.
2028
+ *
2029
+ * ———— PHP Code Samples ————
2030
+ * ```
2031
+ * File: `example-file.zip`, has been downloaded a total of <!php echo s2member_total_downloads_of("example-file.zip"); !> times; collectively, among all Users/Members, for all time *( includes all duplicate downloads of the same file by the same User/Member )*.
2032
+ * File: `example-file.zip`, has been downloaded a total of <!php echo s2member_total_downloads_of("example-file.zip", false, false); !> times; collectively, among all Users/Members, in this Period only *( includes all duplicate downloads of the same file by the same User/Member )*.
2033
+ * File: `example-file.zip`, has been downloaded by User ID# 123, a total of <!php echo s2member_total_downloads_of("example-file.zip", 123); !> times; for all time, since they first became a User/Member of the site *( includes all duplicate downloads of the same file by this User/Member )*.
2034
+ * File: `example-file.zip`, has been downloaded by User ID# 123, a total of <!php echo s2member_total_downloads_of("example-file.zip", 123, false); !> times; in this Period only *( includes all duplicate downloads of the same file by this User/Member )*.
2035
+ * ```
2036
+ * ———— Shortcode Equivalent ————
2037
+ * ```
2038
+ * There is NO Shortcode equivalent for this yet.
2039
+ * ```
2040
+ *
2041
+ * @package s2Member\API_Functions
2042
+ * @since 111026
2043
+ *
2044
+ * @param str $file Required. Location of the file, relative to the `/s2member-files/` directory, or relative to the root of your Amazon® S3 Bucket *( when applicable )*.
2045
+ * @param str|int $user_id Optional. If specified, s2Member will return total downloads by a particular User/Member, instead of collectively *( i.e among all Users/Members )*.
2046
+ * @param bool $check_archives_too Optional. Defaults to true. When true, s2Member checks its File Download Archive too, instead of ONLY looking at Files downloaded in the current Period. Period is based on your Basic Download Restrictions setting of allowed days across various Levels of Membership, for each respective User/Member. Or, if ``$user_id`` is specified, based solely on a specific User's `allowed_days`, configured in your Basic Download Restrictions, at the User's current Membership Level.
2047
+ * @return int The total for this particular ``$file``, based on configuration of function arguments.
2048
+ *
2049
+ * @note Calculations returned by this function do NOT include File Downloads that were accessed with an Advanced File Download Key.
2050
+ *
2051
+ * @see s2Member\API_Functions\s2member_user_downloads()
2052
+ * @see s2Member\API_Functions\s2member_total_unique_downloads_of()
2053
+ *
2054
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
2055
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
2056
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
2057
+ *
2058
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
2059
+ *
2060
+ * @see s2Member\API_Constants\S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
2061
+ * @see s2Member\API_Constants\S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
2062
+ *
2063
+ * @see s2Member\API_Constants\S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
2064
+ * @see s2Member\API_Constants\S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
2065
+ *
2066
+ * @see s2Member\API_Constants\S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
2067
+ *
2068
+ * @todo Make it possible for s2Member to keep a count of files downloaded with an Advanced Download Key.
2069
+ * @todo Create a Shortcode equivalent.
2070
+ */
2071
+ if (!function_exists ("s2member_total_downloads_of"))
2072
+ {
2073
+ function s2member_total_downloads_of ($file = FALSE, $user_id = FALSE, $check_archives_too = TRUE)
2074
+ {
2075
+ return c_ws_plugin__s2member_files::total_downloads_of ($file, $user_id, $check_archives_too);
2076
+ }
2077
+ }
2078
+ /**
2079
+ * Total unique downloads of a particular file; possibly by a particular User.
2080
+ *
2081
+ * ———— PHP Code Samples ————
2082
+ * ```
2083
+ * File: `example-file.zip`, has been downloaded a total of <!php echo s2member_total_unique_downloads_of("example-file.zip"); !> times; collectively, among all Users/Members, for all time *( does NOT include duplicate downloads of the same file, in a single Period, by the same User/Member )*.
2084
+ * File: `example-file.zip`, has been downloaded a total of <!php echo s2member_total_unique_downloads_of("example-file.zip", false, false); !> times; collectively, among all Users/Members, in this Period only *( does NOT include duplicate downloads of the same file, in a single Period, by the same User/Member )*.
2085
+ * File: `example-file.zip`, has been downloaded by User ID# 123, a total of <!php echo s2member_total_unique_downloads_of("example-file.zip", 123); !> times; for all time, since they first became a User/Member of the site *( does NOT include duplicate downloads of the same file, in a single Period, by this User/Member )*.
2086
+ * File: `example-file.zip`, has been downloaded by User ID# 123, a total of <!php echo s2member_total_unique_downloads_of("example-file.zip", 123, false); !> times; in this Period only *( does NOT include duplicate downloads of the same file, in a single Period, by this User/Member )*.
2087
+ * ```
2088
+ * ———— Shortcode Equivalent ————
2089
+ * ```
2090
+ * There is NO Shortcode equivalent for this yet.
2091
+ * ```
2092
+ *
2093
+ * @package s2Member\API_Functions
2094
+ * @since 111026
2095
+ *
2096
+ * @param str $file Required. Location of the file, relative to the `/s2member-files/` directory, or relative to the root of your Amazon® S3 Bucket *( when applicable )*.
2097
+ * @param str|int $user_id Optional. If specified, s2Member will return total downloads by a particular User/Member, instead of collectively *( i.e among all Users/Members )*.
2098
+ * @param bool $check_archives_too Optional. Defaults to true. When true, s2Member checks its File Download Archive too, instead of ONLY looking at Files downloaded in the current Period. Period is based on your Basic Download Restrictions setting of allowed days across various Levels of Membership, for each respective User/Member. Or, if ``$user_id`` is specified, based solely on a specific User's `allowed_days`, configured in your Basic Download Restrictions, at the User's current Membership Level.
2099
+ * @return int The total for this particular ``$file``, based on configuration of function arguments.
2100
+ *
2101
+ * @note Calculations returned by this function do NOT include File Downloads that were accessed with an Advanced File Download Key.
2102
+ *
2103
+ * @see s2Member\API_Functions\s2member_user_downloads()
2104
+ * @see s2Member\API_Functions\s2member_total_downloads_of()
2105
+ *
2106
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED
2107
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED
2108
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS
2109
+ *
2110
+ * @see s2Member\API_Constants\S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY
2111
+ *
2112
+ * @see s2Member\API_Constants\S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID
2113
+ * @see s2Member\API_Constants\S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL
2114
+ *
2115
+ * @see s2Member\API_Constants\S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED
2116
+ * @see s2Member\API_Constants\S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS
2117
+ *
2118
+ * @see s2Member\API_Constants\S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS
2119
+ *
2120
+ * @todo Make it possible for s2Member to keep a count of files downloaded with an Advanced Download Key.
2121
+ * @todo Create a Shortcode equivalent.
2122
+ */
2123
+ if (!function_exists ("s2member_total_unique_downloads_of"))
2124
+ {
2125
+ function s2member_total_unique_downloads_of ($file = FALSE, $user_id = FALSE, $check_archives_too = TRUE)
2126
+ {
2127
+ return c_ws_plugin__s2member_files::total_unique_downloads_of ($file, $user_id, $check_archives_too);
2128
+ }
2129
+ }
2130
+ /**
2131
  * Obtains the Registration Time for the current User, and/or for a particular User.
2132
  *
2133
  * The Registration Time, is the time at which the Username was created for the account, that's it.
2247
  * $s2member_subscr_gateway = get_user_field ("s2member_subscr_gateway"); # Paid Subscr. Gateway Code for the current User.
2248
  * $s2member_registration_ip = get_user_field ("s2member_registration_ip"); # IP the current User had during registration.
2249
  * $s2member_custom_fields = get_user_field ("s2member_custom_fields"); # Associative array of all Custom Registration/Profile Fields.
2250
+ * $s2member_file_download_access_log = get_user_field ("s2member_file_download_access_log"); # Associative array of all File Downloads by the current User, in the current Period *( Period is based on a specific User's `allowed_days`, configured in your Basic Download Restrictions, at the User's current Membership Level )*.
2251
+ * $s2member_file_download_access_arc = get_user_field ("s2member_file_download_access_arc"); # Associative array of all File Downloads by the current User, in previous Periods *( Periods are based on a specific User's `allowed_days`, configured in your Basic Download Restrictions, at the User's Membership Levels in the past )*.
2252
  * $s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time"); # Auto EOT-Time for the current User ( when applicable ).
2253
  * $s2member_last_payment_time = get_user_field ("s2member_last_payment_time"); # Timestamp. Last time an actual payment was received by s2Member.
2254
  * $s2member_paid_registration_times = get_user_field ("s2member_paid_registration_times"); # Timestamps. Associative array of all Paid Registration Times.
2329
  * $s2member_subscr_gateway = get_user_option ("s2member_subscr_gateway"); # Paid Subscr. Gateway Code for the current User.
2330
  * $s2member_registration_ip = get_user_option ("s2member_registration_ip"); # IP the current User had during registration.
2331
  * $s2member_custom_fields = get_user_option ("s2member_custom_fields"); # Associative array of all Custom Registration/Profile Fields.
2332
+ * $s2member_file_download_access_log = get_user_option ("s2member_file_download_access_log"); # Associative array of all File Downloads by the current User, in the current Period *( Period is based on a specific User's `allowed_days`, configured in your Basic Download Restrictions, at the User's current Membership Level )*.
2333
+ * $s2member_file_download_access_arc = get_user_option ("s2member_file_download_access_arc"); # Associative array of all File Downloads by the current User, in previous Periods *( Periods are based on a specific User's `allowed_days`, configured in your Basic Download Restrictions, at the User's Membership Levels in the past )*.
2334
  * $s2member_auto_eot_time = get_user_option ("s2member_auto_eot_time"); # Auto EOT-Time for the current User ( when applicable ).
2335
  * $s2member_last_payment_time = get_user_option ("s2member_last_payment_time"); # Timestamp. Last time an actual payment was received by s2Member.
2336
  * $s2member_paid_registration_times = get_user_option ("s2member_paid_registration_times"); # Timestamps. Associative array of all Paid Registration Times.
2353
  * Or, this could be set to any property that exists on the WP_User object for a particular User;
2354
  * ( i.e. `id`, `ID`, `user_login`, `user_email`, `first_name`, `last_name`, `display_name`, `ip`, `IP`,
2355
  * `s2member_registration_ip`, `s2member_custom`, `s2member_subscr_id`, `s2member_subscr_or_wp_id`,
2356
+ * `s2member_subscr_gateway`, `s2member_custom_fields`, `s2member_file_download_access_[log|arc]`,
2357
  * `s2member_auto_eot_time`, `s2member_last_payment_time`, `s2member_paid_registration_times`,
2358
  * `s2member_access_role`, `s2member_access_level`, `s2member_access_label`,
2359
  * `s2member_access_ccaps`, `s2member_login_counter`, etc, etc. ).
includes/hooks.inc.php CHANGED
@@ -171,6 +171,6 @@ add_action ("bbp_activation", "c_ws_plugin__s2member_roles_caps::config_roles",
171
  /*
172
  Register the activation | de-activation routines.
173
  */
174
- register_activation_hook ($GLOBALS["WS_PLUGIN__"]["s2member"]["l"], "c_ws_plugin__s2member_installation::activate");
175
- register_deactivation_hook ($GLOBALS["WS_PLUGIN__"]["s2member"]["l"], "c_ws_plugin__s2member_installation::deactivate");
176
  ?>
171
  /*
172
  Register the activation | de-activation routines.
173
  */
174
+ register_activation_hook ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["plugin_basename"], "c_ws_plugin__s2member_installation::activate");
175
+ register_deactivation_hook ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["plugin_basename"], "c_ws_plugin__s2member_installation::deactivate");
176
  ?>
includes/menu-pages/menu-pages-min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(b){b("div#ws-menu-page-js-c-w").hide();var a=b("div.ws-menu-page-group");a.each(function(e){var g=b(this),d="<ins>+</ins>",f=g,h=b.trim(f.attr("title"));var c=b('<div class="ws-menu-page-group-header">'+d+h+"</div>");c.css({"z-index":100-e});c.insertBefore(f),f.hide(),c.click(function(){var k=b(this),j=b("ins",k),i=k.next();if(i.css("display")==="none"){k.addClass("open"),j.html("-"),i.show()}else{k.removeClass("open"),j.html("+"),i.hide()}return false});if(a.length>1&&e===0){b('<div class="ws-menu-page-groups-show">+</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.addClass("open"),j.html("-"),i.show();return});return false});b('<div class="ws-menu-page-groups-hide">-</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.removeClass("open"),j.html("+"),i.hide();return});return false})}if(f.attr("default-state")==="open"){c.trigger("click")}return});if(a.length>1){b("div.ws-menu-page-group-header:first").css({"margin-right":"140px"});b("div.ws-menu-page-group:first").css({"margin-right":"145px"})}b("div.ws-menu-page-r-group-header").click(function(){var d=b(this),c=d.next("div.ws-menu-page-r-group");if(c.css("display")==="none"){b("ins",d).html("-"),d.addClass("open"),c.show()}else{b("ins",d).html("+"),d.removeClass("open");c.hide()}return false});b("div.ws-menu-page-group-header:first, div.ws-menu-page-r-group-header:first").css({"margin-top":"0"});b("div.ws-menu-page-group > div.ws-menu-page-section:first-child > h3").css({"margin-top":"0"});b("div.ws-menu-page-readme > div.readme > div.section:last-child").css({"border-bottom-width":"0"});b("input.ws-menu-page-media-btn").filter(function(){return(b(this).attr("rel"))?true:false}).click(function(){var c=b(this);window.send_to_editor=function(g){var h,f,d=b.trim(c.attr("rel"));if(d&&(h=b("input#"+d)).length>0){var e=h.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;h.val(i),h.css({"background-color":"#FFFFCC"}),setTimeout(function(){h.css({"background-color":e})},2000);tb_remove();return}else{if(d&&(f=b("textarea#"+d)).length>0){var e=f.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;f.val(b.trim(f.val())+"\n"+i),f.css({"background-color":"#FFFFCC"}),setTimeout(function(){f.css({"background-color":e})},2000);tb_remove();return}}};tb_show("","./media-upload.php?type=image&TB_iframe=true");return false});b("form#ws-mlist-form").submit(function(){var c="";if(!b.trim(b("input#ws-mlist-fname").val())){c+="First Name missing, please try again.\n\n"}if(!b.trim(b("input#ws-mlist-lname").val())){c+="Last Name missing, please try again.\n\n"}if(!b.trim(b("input#ws-mlist-email").val())){c+="Email missing, please try again.\n\n"}else{if(!b("input#ws-mlist-email").val().match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){c+="Invalid email address, please try again.\n\n"}}if(c=b.trim(c)){alert("— Oops, you missed something: —\n\n"+c);return false}return true})});
1
+ jQuery(document).ready(function(b){b("div#ws-menu-page-js-c-w").hide();b(window).resize(tb_position=function(){var c=(b(window).width()>720)?720:b(window).width(),e=b(window).height(),d=(b("body.admin-bar").length)?28:0;b("#TB_window").css({width:c-50+"px",height:e-45-d+"px",top:25+d+"px","margin-top":0,"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});b("#TB_ajaxContent").css({width:c-50+"px",height:e-75-d+"px",margin:0,padding:0})});var a=b("div.ws-menu-page-group");a.each(function(e){var g=b(this),d="<ins>+</ins>",f=g,h=b.trim(f.attr("title"));var c=b('<div class="ws-menu-page-group-header">'+d+h+"</div>");c.css({"z-index":100-e});c.insertBefore(f),f.hide(),c.click(function(){var k=b(this),j=b("ins",k),i=k.next();if(i.css("display")==="none"){k.addClass("open"),j.html("-"),i.show()}else{k.removeClass("open"),j.html("+"),i.hide()}return false});if(a.length>1&&e===0){b('<div class="ws-menu-page-groups-show">+</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.addClass("open"),j.html("-"),i.show();return});return false});b('<div class="ws-menu-page-groups-hide">-</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.removeClass("open"),j.html("+"),i.hide();return});return false})}if(f.attr("default-state")==="open"){c.trigger("click")}return});if(a.length>1){b("div.ws-menu-page-group-header:first").css({"margin-right":"140px"});b("div.ws-menu-page-group:first").css({"margin-right":"145px"})}b("div.ws-menu-page-r-group-header").click(function(){var d=b(this),c=d.next("div.ws-menu-page-r-group");if(c.css("display")==="none"){b("ins",d).html("-"),d.addClass("open"),c.show()}else{b("ins",d).html("+"),d.removeClass("open");c.hide()}return false});b("div.ws-menu-page-group-header:first, div.ws-menu-page-r-group-header:first").css({"margin-top":"0"});b("div.ws-menu-page-group > div.ws-menu-page-section:first-child > h3").css({"margin-top":"0"});b("div.ws-menu-page-readme > div.readme > div.section:last-child").css({"border-bottom-width":"0"});b("input.ws-menu-page-media-btn").filter(function(){return(b(this).attr("rel"))?true:false}).click(function(){var c=b(this);window.send_to_editor=function(g){var h,f,d=b.trim(c.attr("rel"));if(d&&(h=b("input#"+d)).length>0){var e=h.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;h.val(i),h.css({"background-color":"#FFFFCC"}),setTimeout(function(){h.css({"background-color":e})},2000);tb_remove();return}else{if(d&&(f=b("textarea#"+d)).length>0){var e=f.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;f.val(b.trim(f.val())+"\n"+i),f.css({"background-color":"#FFFFCC"}),setTimeout(function(){f.css({"background-color":e})},2000);tb_remove();return}}};tb_show("","./media-upload.php?type=image&TB_iframe=true");return false});b("form#ws-mlist-form").submit(function(){var c="";if(!b.trim(b("input#ws-mlist-fname").val())){c+="First Name missing, please try again.\n\n"}if(!b.trim(b("input#ws-mlist-lname").val())){c+="Last Name missing, please try again.\n\n"}if(!b.trim(b("input#ws-mlist-email").val())){c+="Email missing, please try again.\n\n"}else{if(!b("input#ws-mlist-email").val().match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){c+="Invalid email address, please try again.\n\n"}}if(c=b.trim(c)){alert("— Oops, you missed something: —\n\n"+c);return false}return true})});
includes/menu-pages/menu-pages-s-min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function($){var esc_attr=esc_html=function(str){return String(str).replace(/"/g,"&quot;").replace(/\</g,"&lt;").replace(/\>/g,"&gt;")};if(location.href.match(/page\=ws-plugin--s2member/)){$("input.ws-plugin--s2member-update-roles-button, input.ws-plugin--s2member-reset-roles-button").click(function(){var $this=$(this);$this.val("one moment please ...");var levels='<?php echo (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; ?>';var resetUpdate=($this.hasClass("ws-plugin--s2member-reset-roles-button"))?"Reset":"Update";$.post(ajaxurl,{action:"ws_plugin__s2member_update_roles_via_ajax",ws_plugin__s2member_update_roles_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-update-roles-via-ajax")); ?>'},function(response){if(response==="1"){alert("s2Member's Roles/Capabilities "+((resetUpdate.toLowerCase()==="reset")?"have been successfully reset":"updated successfully")+".\nYour installation of s2Member has Membership Levels 0-"+levels+"."),$this.val(resetUpdate+" Roles/Capabilities")}else{if(response==="l"){alert("Sorry, your request failed.\ns2Member's Roles/Capabilities are locked by Filter:\nws_plugin__s2member_lock_roles_caps"),$this.val(resetUpdate+" Roles/Capabilities")}else{alert("Sorry, your request failed.\nAccess denied. Do you have the ability to `create_users`?"),$this.val(resetUpdate+" Roles/Capabilities")}}});return false})}if(location.href.match(/page\=ws-plugin--s2member-mms-ops/)){$("select#ws-plugin--s2member-mms-registration-file").change(function(){if($(this).val()==="wp-signup"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").show(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").hide(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").show();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0")[((gv==="all")?"show":"hide")]();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val(((gv==="all")?((l0v>0)?l0v:"1"):"0"))}else{if($(this).val()==="wp-login"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").hide(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").show(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").hide();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0").hide();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val("0")}}}).trigger("change");$("select#ws-plugin--s2member-mms-registration-grants").change(function(){$("select#ws-plugin--s2member-mms-registration-file").trigger("change")})}if(location.href.match(/page\=ws-plugin--s2member-gen-ops/)){ws_plugin__s2member_generateSecurityKey=function(){var mt_rand=function(min,max){min=(arguments.length<1)?0:min;max=(arguments.length<2)?2147483647:max;return Math.floor(Math.random()*(max-min+1))+min};var chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()";for(var i=0,key="";i<64;i++){key+=chars.substr(mt_rand(0,chars.length-1),1)}$("input#ws-plugin--s2member-sec-encryption-key").val(key);return false};ws_plugin__s2member_enableSecurityKey=function(){if(confirm("Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you've been testing s2Member, feel free to change this Key before you go live. Just don't go live, and then change it. You'll have unhappy Customers. Data corruption WILL occur! For your safety, s2Member keeps a history of the last 10 Keys that you've used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.")){$("input#ws-plugin--s2member-sec-encryption-key").removeAttr("disabled")}return false};ws_plugin__s2member_securityKeyHistory=function(){$("div#ws-plugin--s2member-sec-encryption-key-history").toggle();return false};$("select#ws-plugin--s2member-new-user-emails-enabled").change(function(){var $pluggable=$("input#ws-plugin--s2member-pluggables-wp-new-user-notification"),$this=$(this),$newUserEmails=$("div#ws-plugin--s2member-new-user-emails");if($pluggable.val()==="0"||$this.val()==="0"){($pluggable.val()==="0")?$this.attr("disabled","disabled"):$this.removeAttr("disabled");$(":input",$newUserEmails).attr("disabled","disabled"),$newUserEmails.css("opacity","0.5")}else{$this.removeAttr("disabled"),$(":input",$newUserEmails).removeAttr("disabled"),$newUserEmails.css("opacity","")}}).trigger("change");if($("input#ws-plugin--s2member-custom-reg-fields").length&&$("div#ws-plugin--s2member-custom-reg-field-configuration").length){(function(){var i,fieldDefaults,tools,table,$tools,$table;var $fields=$("input#ws-plugin--s2member-custom-reg-fields");var $configuration=$("div#ws-plugin--s2member-custom-reg-field-configuration");var fields=($fields.val())?$.JSON.parse($fields.val()):[];fields=(fields instanceof Array)?fields:[];fieldDefaults={section:"no",sectitle:"",id:"",label:"",type:"text",deflt:"",options:"",expected:"",required:"yes",levels:"all",editable:"yes",classes:"",styles:"",attrs:""};for(i=0;i<fields.length;i++){fields[i]=$.extend(true,{},fieldDefaults,fields[i])}tools='<div id="ws-plugin--s2member-custom-reg-field-configuration-tools"></div>',table='<table id="ws-plugin--s2member-custom-reg-field-configuration-table"></table>';$configuration.html(tools+table);$tools=$("div#ws-plugin--s2member-custom-reg-field-configuration-tools"),$table=$("table#ws-plugin--s2member-custom-reg-field-configuration-table");ws_plugin__s2member_customRegFieldSectionChange=function(select){var section=$(select).val();var sectitle_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle";(section==="yes")?$(sectitle_trs).css("display",""):$(sectitle_trs).css("display","none")};ws_plugin__s2member_customRegFieldTypeChange=function(select){var type=$(select).val();var deflt_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt",options_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-options",expected_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected";(type.match(/^(text|textarea)$/))?$(deflt_trs).css("display",""):$(deflt_trs).css("display","none");(type.match(/^(select|selects|checkboxes|radios)$/))?$(options_trs).css("display",""):$(options_trs).css("display","none");(type.match(/^(text|textarea)$/))?$(expected_trs).css("display",""):$(expected_trs).css("display","none")};ws_plugin__s2member_customRegFieldDelete=function(index){var newFields=new Array();for(var i=0;i<fields.length;i++){if(i!==index){newFields.push(fields[i])}}fields=newFields,updateFields(),buildTable()};ws_plugin__s2member_customRegFieldMoveUp=function(index){if(typeof fields[index]==="object"&&typeof fields[index-1]==="object"){var prevFieldObj=fields[index-1],thisFieldObj=fields[index];fields[index-1]=thisFieldObj,fields[index]=prevFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldMoveDown=function(index){if(typeof fields[index]==="object"&&typeof fields[index+1]==="object"){var nextFieldObj=fields[index+1],thisFieldObj=fields[index];fields[index+1]=thisFieldObj,fields[index]=nextFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldCreate=function(){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field))){fields.push(field),updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+(fields.length-1);alert('Field created successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldUpdate=function(index){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field,index))){fields[index]=field,updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+index;alert('Field updated successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldAdd=function(){buildTools(true)};ws_plugin__s2member_customRegFieldEdit=function(index){buildTools(false,index),scrollReset()};ws_plugin__s2member_customRegFieldCancel=function(){buildTools(),scrollReset()};var validateField=function(field,index){var editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,errors=[],options,i;if(typeof field!=="object"||typeof(field=$.extend(true,{},fieldDefaults,field))!=="object"){alert("Invalid field object. Please try again.");return false}field.sectitle=(field.section==="yes")?field.sectitle:"";field.deflt=(field.type.match(/^(text|textarea)$/))?field.deflt:"";field.deflt=(field.type.match(/^(text)$/))?field.deflt.replace(/[\r\n\t ]+/g," "):field.deflt;field.options=(field.type.match(/^(select|selects|checkboxes|radios)$/))?field.options:"";field.expected=(field.type.match(/^(text|textarea)$/))?field.expected:"";if(!field.id){errors.push("Unique Field ID:\nThis is required. Please try again.")}else{if(fieldIdExists(field.id)&&(!editing||field.id!==fields[index].id)){errors.push("Unique Field ID:\nThat Field ID already exists. Please try again.")}}if(!field.label){errors.push("Field Label/Description:\nThis is required. Please try again.")}if(field.type.match(/^(select|selects|checkboxes|radios)$/)&&!field.options){errors.push("Option Configuration File:\nThis is required. Please try again.")}else{if(field.type.match(/^(select|selects|checkboxes|radios)$/)){for(i=0;i<(options=field.options.split(/[\r\n]+/)).length;i++){if(!(options[i]=$.trim(options[i])).match(/^([^\|]*)(\|)([^\|]*)(\|default)?$/)){errors.push("Option Configuration File:\nInvalid configuration at line #"+(i+1)+".");break}}field.options=$.trim(options.join("\n"))}}if(!(field.levels=field.levels.replace(/ /g,""))){errors.push("Applicable Levels:\nThis is required. Please try again.")}else{if(!field.levels.match(/^(all|[0-9,]+)$/)){errors.push("Applicable Levels:\nShould be comma-delimited Levels, or just type: all.\n( examples: 0,1,2,3,4 or type the word: all )")}}if(field.classes&&field.classes.match(/[^a-z 0-9 _ \-]/i)){errors.push("CSS Classes:\nContains invalid characters. Please try again.\n( only: alphanumerics, underscores, hyphens, spaces )")}if(field.styles&&field.styles.match(/["\=\>\<]/)){errors.push('CSS Styles:\nContains invalid characters. Please try again.\n( do NOT use these characters: = " < > )')}if(field.attrs&&field.attrs.match(/[\>\<]/)){errors.push("Other Attributes:\nContains invalid characters. Please try again.\n( do NOT use these characters: < > )")}if(errors.length>0){alert(errors.join("\n\n"));return false}else{return field}};var updateFields=function(){$fields.val(((fields.length>0)?$.JSON.stringify(fields):""))};var fieldId2Var=function(fieldId){return(typeof fieldId==="string")?$.trim(fieldId).toLowerCase().replace(/[^a-z0-9]/g,"_"):""};var fieldTypeDesc=function(type){var types={text:"Text ( single line )",textarea:"Textarea ( multi-line )",select:"Select Menu ( drop-down )",selects:"Select Menu ( multi-option )",checkbox:"Checkbox ( single )",pre_checkbox:"Checkbox ( pre-checked )",checkboxes:"Checkboxes ( multi-option )",radios:"Radio Buttons ( multi-option )"};if(typeof types[type]==="string"){return types[type]}return""};var fieldIdExists=function(fieldId){for(var i=0;i<fields.length;i++){if(fields[i].id===fieldId){return true}}};var scrollReset=function(){scrollTo(0,$("div.ws-plugin--s2member-custom-reg-fields-section").offset()["top"]-100)};var buildTools=function(adding,index){var i=0,html="",form="",w=0,h=0,editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,displayForm=(adding||editing)?true:false,field=(editing)?$.extend(true,{},fieldDefaults,fields[index]):fieldDefaults;html+='<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>';tb_remove(),$("div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form").remove();if(displayForm){form+='<div id="ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form">';form+='<table id="ws-plugin--s2member-custom-reg-field-configuration-tools-form">';form+="<tbody>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">Starts A New Section?</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<select property="section" onchange="ws_plugin__s2member_customRegFieldSectionChange(this);" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<option value="no"'+((field.section==="no")?' selected="selected"':"")+'">No ( this Field flows normally )</option>';form+='<option value="yes"'+((field.section==="yes")?' selected="selected"':"")+'">Yes ( this Field begins a new section )</option>';form+="</select><br />";form+="<small>Optional. Allows Fields to be grouped into sections.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+'><td colspan="2"><hr /></td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+">";form+='<td colspan="2">';form+="Title for this new section? ( optional )<br />";form+='<input type="text" property="sectitle" value="'+esc_attr(field.sectitle)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle" /><br />';form+="<small>If empty, a simple divider will be used by default.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-type"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">Form Field Type: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<select property="type" onchange="ws_plugin__s2member_customRegFieldTypeChange(this);" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<option value="text"'+((field.type==="text")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("text"))+"</option>";form+='<option value="textarea"'+((field.type==="textarea")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("textarea"))+"</option>";form+='<option value="select"'+((field.type==="select")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("select"))+"</option>";form+='<option value="selects"'+((field.type==="selects")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("selects"))+"</option>";form+='<option value="checkbox"'+((field.type==="checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkbox"))+"</option>";form+='<option value="pre_checkbox"'+((field.type==="pre_checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("pre_checkbox"))+"</option>";form+='<option value="checkboxes"'+((field.type==="checkboxes")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkboxes"))+"</option>";form+='<option value="radios"'+((field.type==="radios")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("radios"))+"</option>";form+="</select><br />";form+="<small>The options below may change, based on the Field Type you choose here.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-label"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">Field Label/Desc: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<input type="text" property="label" value="'+esc_attr(field.label)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label" /><br />';form+="<small>Examples: <code>Choose Country</code>, <code>Street Address</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-id"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">Unique Field ID: *</label></label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<input type="text" property="id" value="'+esc_attr(field.id)+'" maxlength="25" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id" /><br />';form+="<small>Examples: <code>country_code</code>, <code>street_address</code></small><br />";form+='<small>e.g. <code>[s2Get user_field="country_code" /]</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-required"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">Field Required: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<select property="required" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<option value="yes"'+((field.required==="yes")?' selected="selected"':"")+'">Yes ( required )</option>';form+='<option value="no"'+((field.required==="no")?' selected="selected"':"")+'">No ( optional )</option>';form+="</select><br />";form+='<small>If <code>yes</code>, only Users/Members will be "required" to enter this field.</small><br />';form+="<small>* Administrators are exempt from this requirement.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">Default Text Value: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="deflt" rows="1" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">'+esc_html(field.deflt)+"</textarea><br />";form+="<small>Default value before user input is received.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">Option Configuration File: * ( one option per line )</label><br />';form+="<small>Use a pipe <code>|</code> delimited format: <code>option value|option label</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="options" rows="3" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">'+esc_html(field.options)+"</textarea><br />";form+="Here is a quick example:<br />";form+="<small>You can also specify a <em>default</em> option:</small><br />";form+="<code>US|United States|default</code><br />";form+="<code>CA|Canada</code><br />";form+="<code>VI|Virgin Islands (U.S.)</code>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">Expected Format: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<select property="expected" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">';form+='<option value=""'+((field.expected==="")?' selected="selected"':"")+'">Anything Goes</option>';form+='<option disabled="disabled"></option>';form+='<optgroup label="Specific Input Types">';form+='<option value="numeric-wp-commas"'+((field.expected==="numeric-wp-commas")?' selected="selected"':"")+'">Numeric ( with or without decimals, commas allowed )</option>';form+='<option value="numeric"'+((field.expected==="numeric")?' selected="selected"':"")+'">Numeric ( with or without decimals, no commas )</option>';form+='<option value="integer"'+((field.expected==="integer")?' selected="selected"':"")+'">Integer ( whole number, without any decimals )</option>';form+='<option value="integer-gt-0"'+((field.expected==="integer-gt-0")?' selected="selected"':"")+'">Integer > 0 ( whole number, no decimals, greater than 0 )</option>';form+='<option value="float"'+((field.expected==="float")?' selected="selected"':"")+'">Float ( floating point number, decimals required )</option>';form+='<option value="float-gt-0"'+((field.expected==="float-gt-0")?' selected="selected"':"")+'">Float > 0 ( floating point number, decimals required, greater than 0 )</option>';form+='<option value="date"'+((field.expected==="date")?' selected="selected"':"")+'">Date ( required date format: dd/mm/yyyy )</option>';form+='<option value="email"'+((field.expected==="email")?' selected="selected"':"")+'">Email ( require valid email )</option>';form+='<option value="url"'+((field.expected==="url")?' selected="selected"':"")+'">Full URL ( starting with http or https )</option>';form+='<option value="domain"'+((field.expected==="domain")?' selected="selected"':"")+'">Domain Name ( domain name only, without http )</option>';form+='<option value="phone"'+((field.expected==="phone")?' selected="selected"':"")+'">Phone # ( 10 digits w/possible hyphens,spaces,brackets )</option>';form+='<option value="uszip"'+((field.expected==="uszip")?' selected="selected"':"")+'">US Zipcode ( 5-9 digits w/possible hyphen )</option>';form+='<option value="cazip"'+((field.expected==="cazip")?' selected="selected"':"")+'">Canadian Zipcode ( 6 alpha-numerics w/possible space )</option>';form+='<option value="uczip"'+((field.expected==="uczip")?' selected="selected"':"")+'">US/Canadian Zipcode ( either a US or Canadian zipcode )</option>';form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Any Character Combination">';for(i=1;i<=25;i++){form+='<option value="any-'+i+'"'+((field.expected==="any-"+i)?' selected="selected"':"")+'">Any Character Combination ( '+i+" character minimum )</option>";form+='<option value="any-'+i+'-e"'+((field.expected==="any-"+i+"-e")?' selected="selected"':"")+'">Any Character Combination ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics, Spaces &amp; Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-punctuation-'+i+'"'+((field.expected==="alphanumerics-spaces-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-spaces-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics &amp; Spaces Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-'+i+'"'+((field.expected==="alphanumerics-spaces-"+i)?' selected="selected"':"")+'">Alphanumerics &amp; Spaces ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-'+i+'-e"'+((field.expected==="alphanumerics-spaces-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics &amp; Spaces ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics &amp; Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-punctuation-'+i+'"'+((field.expected==="alphanumerics-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-'+i+'"'+((field.expected==="alphanumerics-"+i)?' selected="selected"':"")+'">Alphanumerics ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-'+i+'-e"'+((field.expected==="alphanumerics-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphabetics Only">';for(i=1;i<=25;i++){form+='<option value="alphabetics-'+i+'"'+((field.expected==="alphabetics-"+i)?' selected="selected"':"")+'">Alphabetics ( '+i+" character minimum )</option>";form+='<option value="alphabetics-'+i+'-e"'+((field.expected==="alphabetics-"+i+"-e")?' selected="selected"':"")+'">Alphabetics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Numeric Digits Only">';for(i=1;i<=25;i++){form+='<option value="numerics-'+i+'"'+((field.expected==="numerics-"+i)?' selected="selected"':"")+'">Numeric Digits ( '+i+" digit minimum )</option>";form+='<option value="numerics-'+i+'-e"'+((field.expected==="numerics-"+i+"-e")?' selected="selected"':"")+'">Numeric Digits ( exactly '+i+" digit"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+="</select><br />";form+="<small>Only Users/Members will be required to meet this criteria.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">Applicable Membership Levels: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<input type="text" property="levels" value="'+esc_attr(field.levels)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels" /><br />';form+="<small>Please use comma-delimited Level #'s: <code>0,1,2,3,4</code> or type: <code>all</code>.</small><br />";form+="<small>This allows you to enable this field - only at specific Membership Levels.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">Allow Profile Edits: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<select property="editable" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<option value="yes"'+((field.editable==="yes")?' selected="selected"':"")+'">Yes ( editable )</option>';form+='<option value="no"'+((field.editable==="no")?' selected="selected"':"")+'">No ( uneditable after registration )</option>';form+='<option value="no-invisible"'+((field.editable==="no-invisible")?' selected="selected"':"")+'">No ( uneditable &amp; totally invisible after registration )</option>';form+='<option value="yes-invisible"'+((field.editable==="yes-invisible")?' selected="selected"':"")+'">Yes ( editable after registration / invisible during registration )</option>';form+="</select><br />";form+="<small>If <code>No</code>, this field will be un-editable after registration.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">CSS Classes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<input type="text" property="classes" value="'+esc_attr(field.classes)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes" /><br />';form+="<small>Example: <code>my-style-1 my-style-2</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">CSS Styles: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<input type="text" property="styles" value="'+esc_attr(field.styles)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles" /><br />';form+="<small>Example: <code>color:#000000; background:#FFFFFF;</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">Other Attributes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<input type="text" property="attrs" value="'+esc_attr(field.attrs)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs" /><br />';form+='<small>Example: <code>onkeyup="" onblur=""</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons">';form+='<td align="left">';form+='<input type="button" value="Cancel" onclick="ws_plugin__s2member_customRegFieldCancel();" />';form+="</td>";form+='<td align="right">';form+='<input type="button" value="'+((editing)?"Update This Field":"Create Registration Field")+'" onclick="'+((editing)?"ws_plugin__s2member_customRegFieldUpdate("+index+");":"ws_plugin__s2member_customRegFieldCreate();")+'" />';form+="</td>";form+="</tr>";form+="</tbody>";form+="</table>";form+="<div>";$("body").append(form);tb_show(((editing)?"Editing Registration/Profile Field":"New Custom Registration/Profile Field"),"#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form"),$(window).trigger("resize");$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form").show()}$tools.html(html)};var attachTBResizer=function(){$(window).resize(function(){var w,h;w=$(window).width(),h=$(window).height(),w=(w>720)?720:w;$("#TB_ajaxContent").css({width:w-50,height:h-75,margin:0,padding:0})})};var buildTable=function(){var l=fields.length,i=0,html="",eo="o";html+="<tbody>";html+="<tr>";html+="<th>Order</th>";html+="<th>Field Type</th>";html+="<th>Unique ID</th>";html+="<th>Required</th>";html+="<th>Levels</th>";html+="<th>- Tools -</th>";html+="</tr>";if(fields.length>0){for(i=0;i<fields.length;i++){html+='<tr class="'+esc_attr((eo=(eo==="o")?"e":"o"))+((fields[i].section==="yes")?" s":"")+" ws-plugin--s2member-custom-reg-field-configuration-table-row-"+i+'">';html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-move-up" href="#" onclick="ws_plugin__s2member_customRegFieldMoveUp('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-move-down" href="#" onclick="ws_plugin__s2member_customRegFieldMoveDown('+i+'); return false;"></a></td>';html+='<td nowrap="nowrap">'+esc_html(fieldTypeDesc(fields[i].type))+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].id)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].required)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].levels)+"</td>";html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-edit" href="#" onclick="ws_plugin__s2member_customRegFieldEdit('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-delete" href="#" onclick="ws_plugin__s2member_customRegFieldDelete('+i+'); return false;"></a></td>';html+="</tr>"}}else{html+="<tr>";html+='<td colspan="6">No Custom Fields are configured.</td>';html+="</tr>"}html+="</tbody>";$table.html(html)};buildTools(),attachTBResizer(),buildTable()})()}}if(location.href.match(/page\=ws-plugin--s2member-res-ops/)){$("input#ws-plugin--s2member-brute-force-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's Brute Force Restriction Logs have all been reset."),$this.val("Reset Brute Force Logs")});return false});$("input#ws-plugin--s2member-ip-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's IP Restriction Logs have all been reset."),$this.val("Reset IP Restriction Logs")});return false});$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').change(function(){var thisChange=$(this).val();$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="all"&&this.checked){$this.nextAll(checkboxes).attr({checked:"checked",disabled:"disabled"})}else{if(val==="all"&&!this.checked){$this.nextAll(checkboxes).removeAttr("disabled");(thisChange==="all")?$this.nextAll(checkboxes).removeAttr("checked"):null}}})}).last().trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-down-ops/)){var updateCloudFrontPrivateKey=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyEntry=$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry");var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyEntryValue=$.trim($visiblePrivateKeyEntry.val());if((hiddenPrivateKeyValue&&!visiblePrivateKeyEntryValue)||visiblePrivateKeyEntryValue.match(/[^\r\n\u25CF]/)){$hiddenPrivateKey.val(visiblePrivateKeyEntryValue),$visiblePrivateKeyEntry.val(visiblePrivateKeyEntryValue.replace(/[^\r\n]/g,String.fromCharCode(9679)))}};$("form#ws-plugin--s2member-options-form").submit(updateCloudFrontPrivateKey);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontPrivateKey).trigger("change");var updateCloudFrontDistroCfgs=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyId=$("input#ws-plugin--s2member-amazon-cf-files-private-key-id");var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistrosStatus=$("input#ws-plugin--s2member-amazon-cf-files-distros-auto-config-status");var autoConfigDistrosStatusValue=$.trim($autoConfigDistrosStatus.val());var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyIdValue=$.trim($visiblePrivateKeyId.val());var hiddenPrivateKeyPrevConfigValue=$.trim($hiddenPrivateKey.attr("data-s-prev-config-value")),visiblePrivateKeyIdPrevConfigValue=$.trim($visiblePrivateKeyId.attr("data-s-prev-config-value"));if(autoConfigDistrosStatusValue==="configured"&&((visiblePrivateKeyIdPrevConfigValue&&visiblePrivateKeyIdValue!==visiblePrivateKeyIdPrevConfigValue)||(hiddenPrivateKeyPrevConfigValue&&hiddenPrivateKeyValue!==hiddenPrivateKeyPrevConfigValue))){alert("s2Member will need to delete and re-configure your Amazon® CloudFront distributions if you change this. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}else{if(autoConfigDistrosStatusValue!=="configured"&&visiblePrivateKeyIdValue&&hiddenPrivateKeyValue){alert("s2Member will need to auto-configure your Amazon® CloudFront distributions for you. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}}};$("input#ws-plugin--s2member-amazon-cf-files-private-key-id").change(updateCloudFrontDistroCfgs);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontDistroCfgs);$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros-w-cnames").change(function(){var $this=$(this),thisChecked=(this.checked)?true:false;var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistroCnames=$("div#ws-plugin--s2member-amazon-cf-files-auto-configure-distro-cnames");(thisChecked)?$autoConfigDistroCnames.show():$autoConfigDistroCnames.hide();(thisChecked)?$autoConfigDistros.attr("checked","checked"):null}).trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-paypal-ops/)){$("select#ws-plugin--s2member-auto-eot-system-enabled").change(function(){var $this=$(this),val=$this.val();var $viaCron=$("p#ws-plugin--s2member-auto-eot-system-enabled-via-cron");if(val==2){$viaCron.show()}else{$viaCron.hide()}})}if(location.href.match(/page\=ws-plugin--s2member-paypal-buttons/)){$("div.ws-menu-page select[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification)-term$/)}).change(function(){var button=this.id.replace(/^ws-plugin--s2member-(.+?)-term$/g,"$1");var trialDisabled=($(this).val().split("-")[2].replace(/[^0-1BN]/g,"")==="BN")?1:0;$("p#ws-plugin--s2member-"+button+"-trial-line").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-trial-then").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-20p-rule").css("display",(trialDisabled?"none":""));(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-period").val(0):null;(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-amount").val("0.00"):null});$("div.ws-menu-page input[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification|ccap)-ccaps$/)}).keyup(function(){var value=this.value.replace(/^(-all|-al|-a|-)[;,]*/gi,""),_all=(this.value.match(/^(-all|-al|-a|-)[;,]*/i))?"-all,":"";if(value.match(/[^a-z_0-9,]/)){this.value=_all+$.trim($.trim(value).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase())}});ws_plugin__s2member_paypalButtonGenerate=function(button){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="",labels={};eval("<?php echo c_ws_plugin__s2member_utils_strings::esc_dq($labels); ?>");var shortCode=$("input#ws-plugin--s2member-"+button+"-shortcode");var code=$("textarea#ws-plugin--s2member-"+button+"-button");var modLevel=$("select#ws-plugin--s2member-modification-level");var level=(button==="modification")?modLevel.val().split(":",2)[1]:button.replace(/^level/,"");var label=labels["level"+level].replace(/"/g,"");var desc=$.trim($("input#ws-plugin--s2member-"+button+"-desc").val().replace(/"/g,""));var trialAmount=$("input#ws-plugin--s2member-"+button+"-trial-amount").val().replace(/[^0-9\.]/g,"");var trialPeriod=$("input#ws-plugin--s2member-"+button+"-trial-period").val().replace(/[^0-9]/g,"");var trialTerm=$("select#ws-plugin--s2member-"+button+"-trial-term").val().replace(/[^A-Z]/g,"");var regAmount=$("input#ws-plugin--s2member-"+button+"-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var regRecurTimes="",regRecurRetry="1";var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-"+button+"-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-"+button+"-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();trialPeriod=(regRecur==="BN")?"0":trialPeriod;trialAmount=(!trialAmount||isNaN(trialAmount)||trialAmount<0.01||trialPeriod<=0)?"0":trialAmount;var levelCcapsPer=(regRecur==="BN"&&regTerm!=="L")?level+":"+cCaps+":"+regPeriod+" "+regTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(trialAmount!=="0"&&(isNaN(trialAmount)||trialAmount<0)){alert("— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be >= 0.00");return false}else{if(trialAmount!=="0"&&trialAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Trial Amount is: 10000.00");return false}else{if(trialTerm==="D"&&trialPeriod>7){alert("— Oops, a slight problem: —\n\nMaximum Trial Days is: 7.\nIf you want to offer more than 7 days, please choose Weeks or Months from the drop-down.");return false}else{if(trialTerm==="W"&&trialPeriod>52){alert("— Oops, a slight problem: —\n\nMaximum Trial Weeks is: 52.\nIf you want to offer more than 52 weeks, please choose Months from the drop-down.");return false}else{if(trialTerm==="M"&&trialPeriod>12){alert("— Oops, a slight problem: —\n\nMaximum Trial Months is: 12.\nIf you want to offer more than 12 months, please choose Years from the drop-down.");return false}else{if(trialTerm==="Y"&&trialPeriod>1){alert("— Oops, a slight problem: —\n\nMax Trial Period Years is: 1.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}}}}}}code.html(code.val().replace(/ \<\!--(\<input type\="hidden" name\="(amount|src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)--\>/g," $1"));(parseInt(trialPeriod)<=0)?code.html(code.val().replace(/ (\<input type\="hidden" name\="(a1|p1|t1)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick$3")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="(src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick-subscriptions$3")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g," <!--$1-->")):null;shortCodeTemplateAttrs+=(button==="modification")?'modify="1" ':"";shortCodeTemplateAttrs+='level="'+esc_attr(level)+'" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'" custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"';shortCodeTemplateAttrs+=' ta="'+esc_attr(trialAmount)+'" tp="'+esc_attr(trialPeriod)+'" tt="'+esc_attr(trialTerm)+'" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'" rrt="'+esc_attr(regRecurTimes)+'" rra="'+esc_attr(regRecurRetry)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="modify" value\="(.*?)"/,' name="modify" value="'+((button==="modification")?"1":"0")+'"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="src" value\="(.*?)"/,' name="src" value="'+esc_attr(regRecur)+'"'));code.html(code.val().replace(/ name\="srt" value\="(.*?)"/,' name="srt" value="'+esc_attr(regRecurTimes)+'"'));code.html(code.val().replace(/ name\="sra" value\="(.*?)"/,' name="sra" value="'+esc_attr(regRecurRetry)+'"'));code.html(code.val().replace(/ name\="a1" value\="(.*?)"/,' name="a1" value="'+esc_attr(trialAmount)+'"'));code.html(code.val().replace(/ name\="p1" value\="(.*?)"/,' name="p1" value="'+esc_attr(trialPeriod)+'"'));code.html(code.val().replace(/ name\="t1" value\="(.*?)"/,' name="t1" value="'+esc_attr(trialTerm)+'"'));code.html(code.val().replace(/ name\="a3" value\="(.*?)"/,' name="a3" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="p3" value\="(.*?)"/,' name="p3" value="'+esc_attr(regPeriod)+'"'));code.html(code.val().replace(/ name\="t3" value\="(.*?)"/,' name="t3" value="'+esc_attr(regTerm)+'"'));$("div#ws-plugin--s2member-"+button+"-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));(button==="modification")?alert("Your Modification Button has been generated.\nPlease copy/paste the Shortcode Format into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Modification Buttons should be displayed to existing Users/Members, and they should be logged-in, BEFORE clicking this Button."):alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalCcapButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-ccap-shortcode");var code=$("textarea#ws-plugin--s2member-ccap-button");var desc=$.trim($("input#ws-plugin--s2member-ccap-desc").val().replace(/"/g,""));var regAmount=$("input#ws-plugin--s2member-ccap-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-ccap-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-ccap-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-ccap-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-ccap-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-ccap-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();var levelCcapsPer=(regRecur==="BN"&&regTerm!=="L")?"*:"+cCaps+":"+regPeriod+" "+regTerm:"*:"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!cCaps||cCaps==="-all"){alert("— Oops, a slight problem: —\n\nPlease provide at least one Custom Capability.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}shortCodeTemplateAttrs+='level="*" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-ccap-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalSpButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-sp-shortcode");var code=$("textarea#ws-plugin--s2member-sp-button");var leading=$("select#ws-plugin--s2member-sp-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-hours").val().replace(/[^0-9]/g,"");var regAmount=$("input#ws-plugin--s2member-sp-amount").val().replace(/[^0-9\.]/g,"");var desc=$.trim($("input#ws-plugin--s2member-sp-desc").val().replace(/"/g,""));var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-sp-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-sp-currency").val().replace(/[^A-Z]/g,"");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}var spIdsHours="sp:"+ids+":"+hours;shortCodeTemplateAttrs+='sp="1" ids="'+esc_attr(ids)+'" exp="'+esc_attr(hours)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(spIdsHours)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-sp-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your WordPress® Editor.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalRegLinkGenerate=function(){var level=$("select#ws-plugin--s2member-reg-link-level").val().replace(/[^0-9]/g,"");var subscrID=$.trim($("input#ws-plugin--s2member-reg-link-subscr-id").val());var custom=$.trim($("input#ws-plugin--s2member-reg-link-custom").val());var cCaps=$.trim($.trim($("input#ws-plugin--s2member-reg-link-ccaps").val()).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());var fixedTerm=$.trim($("input#ws-plugin--s2member-reg-link-fixed-term").val().replace(/[^A-Z 0-9]/gi,"").toUpperCase());var $link=$("p#ws-plugin--s2member-reg-link"),$loading=$("img#ws-plugin--s2member-reg-link-loading");var levelCcapsPer=(fixedTerm&&!fixedTerm.match(/L$/))?level+":"+cCaps+":"+fixedTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!subscrID){alert("— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.");return false}else{if(!custom||custom.indexOf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq ($_SERVER["HTTP_HOST"]); ?>')!==0){alert("— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.");return false}else{if(fixedTerm&&!fixedTerm.match(/^[1-9]+ (D|W|M|Y|L)$/)){alert("— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly.");return false}}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_reg_access_link_via_ajax",ws_plugin__s2member_reg_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-reg-access-link-via-ajax")); ?>',s2member_reg_access_link_subscr_gateway:"paypal",s2member_reg_access_link_subscr_id:subscrID,s2member_reg_access_link_custom:custom,s2member_reg_access_link_item_number:levelCcapsPer},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false};ws_plugin__s2member_paypalSpLinkGenerate=function(){var leading=$("select#ws-plugin--s2member-sp-link-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-link-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-link-hours").val().replace(/[^0-9]/g,"");var $link=$("p#ws-plugin--s2member-sp-link"),$loading=$("img#ws-plugin--s2member-sp-link-loading");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_sp_access_link_via_ajax",ws_plugin__s2member_sp_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-sp-access-link-via-ajax")); ?>',s2member_sp_access_link_ids:ids,s2member_sp_access_link_hours:hours},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false}}if(location.href.match(/page\=ws-plugin--s2member-els-ops/)){$("select#ws-plugin--s2member-custom-reg-opt-in").change(function(){var $this=$(this),val=$this.val();var $rows=$("tr.ws-plugin--s2member-custom-reg-opt-in-label-row");var $prevImg=$("img.ws-plugin--s2member-custom-reg-opt-in-label-prev-img");if(val<=0){$rows.css("display","none"),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}else{if(val==1){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/unchecked\.png$/,"/checked.png"))}else{if(val==2){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}}}});$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').change(function(){var thisChange=$(this).val(),checkedIndexes=[];$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="removal-deletion"&&this.checked){$this.nextAll(checkboxes).slice(0,2).attr({checked:"checked",disabled:"disabled"})}else{if(val==="removal-deletion"&&!this.checked){$this.nextAll(checkboxes).slice(0,2).removeAttr("disabled");(thisChange==="removal-deletion")?$this.nextAll(checkboxes).slice(0,2).removeAttr("checked"):null}else{if(val==="modification"&&this.checked){$this.nextAll(checkboxes).slice(0,3).attr({checked:"checked",disabled:"disabled"})}else{if(val==="modification"&&!this.checked){(thisChange==="modification")?$this.nextAll(checkboxes).slice(0,3).removeAttr("checked"):null;$this.nextAll(checkboxes).slice(0,3).removeAttr("disabled")}}}}}).each(function(index){(this.checked)?checkedIndexes.push(index):null});$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").removeAttr("disabled");if($.inArray(3,checkedIndexes)===-1&&$.inArray(4,checkedIndexes)===-1&&$.inArray(5,checkedIndexes)===-1&&$.inArray(6,checkedIndexes)===-1){$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").attr("disabled","disabled")}}).last().trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-integrations/)){$("select#ws-plugin--s2member-bbpress-ovg").change(function(){if($(this).val()==="0"){$("span#ws-plugin--s2member-bbpress-ovg-off-note").css("display","inline");var l='form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';$(l).text($(l).text().replace(/to (read\/)?participate/i,"to read/participate")),$("select#ws-plugin--s2member-bbpress-min-level option").each(function(){$(this).text($(this).text().replace(/\( to( read and)? participate \)/i,"( to read and participate )"))})}else{if($(this).val()==="1"){$("span#ws-plugin--s2member-bbpress-ovg-off-note").css("display","none");var l='form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';$(l).text($(l).text().replace(/to (read\/)?participate/i,"to participate")),$("select#ws-plugin--s2member-bbpress-min-level option").each(function(){$(this).text($(this).text().replace(/\( to( read and)? participate \)/i,"( to participate )"))})}}}).trigger("change")}});
1
+ jQuery(document).ready(function($){var esc_attr=esc_html=function(str){return String(str).replace(/"/g,"&quot;").replace(/\</g,"&lt;").replace(/\>/g,"&gt;")};if(location.href.match(/page\=ws-plugin--s2member/)){$("input.ws-plugin--s2member-update-roles-button, input.ws-plugin--s2member-reset-roles-button").click(function(){var $this=$(this);$this.val("one moment please ...");var levels='<?php echo (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; ?>';var resetUpdate=($this.hasClass("ws-plugin--s2member-reset-roles-button"))?"Reset":"Update";$.post(ajaxurl,{action:"ws_plugin__s2member_update_roles_via_ajax",ws_plugin__s2member_update_roles_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-update-roles-via-ajax")); ?>'},function(response){if(response==="1"){alert("s2Member's Roles/Capabilities "+((resetUpdate.toLowerCase()==="reset")?"have been successfully reset":"updated successfully")+".\nYour installation of s2Member has Membership Levels 0-"+levels+"."),$this.val(resetUpdate+" Roles/Capabilities")}else{if(response==="l"){alert("Sorry, your request failed.\ns2Member's Roles/Capabilities are locked by Filter:\nws_plugin__s2member_lock_roles_caps"),$this.val(resetUpdate+" Roles/Capabilities")}else{alert("Sorry, your request failed.\nAccess denied. Do you have the ability to `create_users`?"),$this.val(resetUpdate+" Roles/Capabilities")}}});return false})}if(location.href.match(/page\=ws-plugin--s2member-mms-ops/)){$("select#ws-plugin--s2member-mms-registration-file").change(function(){if($(this).val()==="wp-signup"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").show(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").hide(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").show();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0")[((gv==="all")?"show":"hide")]();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val(((gv==="all")?((l0v>0)?l0v:"1"):"0"))}else{if($(this).val()==="wp-login"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").hide(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").show(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").hide();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0").hide();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val("0")}}}).trigger("change");$("select#ws-plugin--s2member-mms-registration-grants").change(function(){$("select#ws-plugin--s2member-mms-registration-file").trigger("change")})}if(location.href.match(/page\=ws-plugin--s2member-gen-ops/)){ws_plugin__s2member_generateSecurityKey=function(){var mt_rand=function(min,max){min=(arguments.length<1)?0:min;max=(arguments.length<2)?2147483647:max;return Math.floor(Math.random()*(max-min+1))+min};var chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()";for(var i=0,key="";i<64;i++){key+=chars.substr(mt_rand(0,chars.length-1),1)}$("input#ws-plugin--s2member-sec-encryption-key").val(key);return false};ws_plugin__s2member_enableSecurityKey=function(){if(confirm("Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you've been testing s2Member, feel free to change this Key before you go live. Just don't go live, and then change it. You'll have unhappy Customers. Data corruption WILL occur! For your safety, s2Member keeps a history of the last 10 Keys that you've used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.")){$("input#ws-plugin--s2member-sec-encryption-key").removeAttr("disabled")}return false};ws_plugin__s2member_securityKeyHistory=function(){$("div#ws-plugin--s2member-sec-encryption-key-history").toggle();return false};$("select#ws-plugin--s2member-new-user-emails-enabled").change(function(){var $pluggable=$("input#ws-plugin--s2member-pluggables-wp-new-user-notification"),$this=$(this),$newUserEmails=$("div#ws-plugin--s2member-new-user-emails");if($pluggable.val()==="0"||$this.val()==="0"){($pluggable.val()==="0")?$this.attr("disabled","disabled"):$this.removeAttr("disabled");$(":input",$newUserEmails).attr("disabled","disabled"),$newUserEmails.css("opacity","0.5")}else{$this.removeAttr("disabled"),$(":input",$newUserEmails).removeAttr("disabled"),$newUserEmails.css("opacity","")}}).trigger("change");if($("input#ws-plugin--s2member-custom-reg-fields").length&&$("div#ws-plugin--s2member-custom-reg-field-configuration").length){(function(){var i,fieldDefaults,tools,table,$tools,$table;var $fields=$("input#ws-plugin--s2member-custom-reg-fields");var $configuration=$("div#ws-plugin--s2member-custom-reg-field-configuration");var fields=($fields.val())?$.JSON.parse($fields.val()):[];fields=(fields instanceof Array)?fields:[];fieldDefaults={section:"no",sectitle:"",id:"",label:"",type:"text",deflt:"",options:"",expected:"",required:"yes",levels:"all",editable:"yes",classes:"",styles:"",attrs:""};for(i=0;i<fields.length;i++){fields[i]=$.extend(true,{},fieldDefaults,fields[i])}tools='<div id="ws-plugin--s2member-custom-reg-field-configuration-tools"></div>',table='<table id="ws-plugin--s2member-custom-reg-field-configuration-table"></table>';$configuration.html(tools+table);$tools=$("div#ws-plugin--s2member-custom-reg-field-configuration-tools"),$table=$("table#ws-plugin--s2member-custom-reg-field-configuration-table");ws_plugin__s2member_customRegFieldSectionChange=function(select){var section=$(select).val();var sectitle_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle";(section==="yes")?$(sectitle_trs).css("display",""):$(sectitle_trs).css("display","none")};ws_plugin__s2member_customRegFieldTypeChange=function(select){var type=$(select).val();var deflt_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt",options_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-options",expected_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected";(type.match(/^(text|textarea)$/))?$(deflt_trs).css("display",""):$(deflt_trs).css("display","none");(type.match(/^(select|selects|checkboxes|radios)$/))?$(options_trs).css("display",""):$(options_trs).css("display","none");(type.match(/^(text|textarea)$/))?$(expected_trs).css("display",""):$(expected_trs).css("display","none")};ws_plugin__s2member_customRegFieldDelete=function(index){var newFields=new Array();for(var i=0;i<fields.length;i++){if(i!==index){newFields.push(fields[i])}}fields=newFields,updateFields(),buildTable()};ws_plugin__s2member_customRegFieldMoveUp=function(index){if(typeof fields[index]==="object"&&typeof fields[index-1]==="object"){var prevFieldObj=fields[index-1],thisFieldObj=fields[index];fields[index-1]=thisFieldObj,fields[index]=prevFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldMoveDown=function(index){if(typeof fields[index]==="object"&&typeof fields[index+1]==="object"){var nextFieldObj=fields[index+1],thisFieldObj=fields[index];fields[index+1]=thisFieldObj,fields[index]=nextFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldCreate=function(){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field))){fields.push(field),updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+(fields.length-1);alert('Field created successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldUpdate=function(index){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field,index))){fields[index]=field,updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+index;alert('Field updated successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldAdd=function(){buildTools(true)};ws_plugin__s2member_customRegFieldEdit=function(index){buildTools(false,index),scrollReset()};ws_plugin__s2member_customRegFieldCancel=function(){buildTools(),scrollReset()};var validateField=function(field,index){var editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,errors=[],options,i;if(typeof field!=="object"||typeof(field=$.extend(true,{},fieldDefaults,field))!=="object"){alert("Invalid field object. Please try again.");return false}field.sectitle=(field.section==="yes")?field.sectitle:"";field.deflt=(field.type.match(/^(text|textarea)$/))?field.deflt:"";field.deflt=(field.type.match(/^(text)$/))?field.deflt.replace(/[\r\n\t ]+/g," "):field.deflt;field.options=(field.type.match(/^(select|selects|checkboxes|radios)$/))?field.options:"";field.expected=(field.type.match(/^(text|textarea)$/))?field.expected:"";if(!field.id){errors.push("Unique Field ID:\nThis is required. Please try again.")}else{if(fieldIdExists(field.id)&&(!editing||field.id!==fields[index].id)){errors.push("Unique Field ID:\nThat Field ID already exists. Please try again.")}}if(!field.label){errors.push("Field Label/Description:\nThis is required. Please try again.")}if(field.type.match(/^(select|selects|checkboxes|radios)$/)&&!field.options){errors.push("Option Configuration File:\nThis is required. Please try again.")}else{if(field.type.match(/^(select|selects|checkboxes|radios)$/)){for(i=0;i<(options=field.options.split(/[\r\n]+/)).length;i++){if(!(options[i]=$.trim(options[i])).match(/^([^\|]*)(\|)([^\|]*)(\|default)?$/)){errors.push("Option Configuration File:\nInvalid configuration at line #"+(i+1)+".");break}}field.options=$.trim(options.join("\n"))}}if(!(field.levels=field.levels.replace(/ /g,""))){errors.push("Applicable Levels:\nThis is required. Please try again.")}else{if(!field.levels.match(/^(all|[0-9,]+)$/)){errors.push("Applicable Levels:\nShould be comma-delimited Levels, or just type: all.\n( examples: 0,1,2,3,4 or type the word: all )")}}if(field.classes&&field.classes.match(/[^a-z 0-9 _ \-]/i)){errors.push("CSS Classes:\nContains invalid characters. Please try again.\n( only: alphanumerics, underscores, hyphens, spaces )")}if(field.styles&&field.styles.match(/["\=\>\<]/)){errors.push('CSS Styles:\nContains invalid characters. Please try again.\n( do NOT use these characters: = " < > )')}if(field.attrs&&field.attrs.match(/[\>\<]/)){errors.push("Other Attributes:\nContains invalid characters. Please try again.\n( do NOT use these characters: < > )")}if(errors.length>0){alert(errors.join("\n\n"));return false}else{return field}};var updateFields=function(){$fields.val(((fields.length>0)?$.JSON.stringify(fields):""))};var fieldId2Var=function(fieldId){return(typeof fieldId==="string")?$.trim(fieldId).toLowerCase().replace(/[^a-z0-9]/g,"_"):""};var fieldTypeDesc=function(type){var types={text:"Text ( single line )",textarea:"Textarea ( multi-line )",select:"Select Menu ( drop-down )",selects:"Select Menu ( multi-option )",checkbox:"Checkbox ( single )",pre_checkbox:"Checkbox ( pre-checked )",checkboxes:"Checkboxes ( multi-option )",radios:"Radio Buttons ( multi-option )"};if(typeof types[type]==="string"){return types[type]}return""};var fieldIdExists=function(fieldId){for(var i=0;i<fields.length;i++){if(fields[i].id===fieldId){return true}}};var scrollReset=function(){scrollTo(0,$("div.ws-plugin--s2member-custom-reg-fields-section").offset()["top"]-100)};var buildTools=function(adding,index){var i=0,html="",form="",w=0,h=0,editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,displayForm=(adding||editing)?true:false,field=(editing)?$.extend(true,{},fieldDefaults,fields[index]):fieldDefaults;html+='<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>';tb_remove(),$("div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form").remove();if(displayForm){form+='<div id="ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form">';form+='<table id="ws-plugin--s2member-custom-reg-field-configuration-tools-form">';form+="<tbody>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">Starts A New Section?</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<select property="section" onchange="ws_plugin__s2member_customRegFieldSectionChange(this);" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<option value="no"'+((field.section==="no")?' selected="selected"':"")+'">No ( this Field flows normally )</option>';form+='<option value="yes"'+((field.section==="yes")?' selected="selected"':"")+'">Yes ( this Field begins a new section )</option>';form+="</select><br />";form+="<small>Optional. Allows Fields to be grouped into sections.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+'><td colspan="2"><hr /></td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+">";form+='<td colspan="2">';form+="Title for this new section? ( optional )<br />";form+='<input type="text" property="sectitle" value="'+esc_attr(field.sectitle)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle" /><br />';form+="<small>If empty, a simple divider will be used by default.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-type"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">Form Field Type: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<select property="type" onchange="ws_plugin__s2member_customRegFieldTypeChange(this);" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<option value="text"'+((field.type==="text")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("text"))+"</option>";form+='<option value="textarea"'+((field.type==="textarea")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("textarea"))+"</option>";form+='<option value="select"'+((field.type==="select")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("select"))+"</option>";form+='<option value="selects"'+((field.type==="selects")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("selects"))+"</option>";form+='<option value="checkbox"'+((field.type==="checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkbox"))+"</option>";form+='<option value="pre_checkbox"'+((field.type==="pre_checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("pre_checkbox"))+"</option>";form+='<option value="checkboxes"'+((field.type==="checkboxes")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkboxes"))+"</option>";form+='<option value="radios"'+((field.type==="radios")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("radios"))+"</option>";form+="</select><br />";form+="<small>The options below may change, based on the Field Type you choose here.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-label"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">Field Label/Desc: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<input type="text" property="label" value="'+esc_attr(field.label)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label" /><br />';form+="<small>Examples: <code>Choose Country</code>, <code>Street Address</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-id"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">Unique Field ID: *</label></label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<input type="text" property="id" value="'+esc_attr(field.id)+'" maxlength="25" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id" /><br />';form+="<small>Examples: <code>country_code</code>, <code>street_address</code></small><br />";form+='<small>e.g. <code>[s2Get user_field="country_code" /]</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-required"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">Field Required: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<select property="required" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<option value="yes"'+((field.required==="yes")?' selected="selected"':"")+'">Yes ( required )</option>';form+='<option value="no"'+((field.required==="no")?' selected="selected"':"")+'">No ( optional )</option>';form+="</select><br />";form+='<small>If <code>yes</code>, only Users/Members will be "required" to enter this field.</small><br />';form+="<small>* Administrators are exempt from this requirement.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">Default Text Value: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="deflt" rows="1" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">'+esc_html(field.deflt)+"</textarea><br />";form+="<small>Default value before user input is received.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">Option Configuration File: * ( one option per line )</label><br />';form+="<small>Use a pipe <code>|</code> delimited format: <code>option value|option label</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="options" rows="3" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">'+esc_html(field.options)+"</textarea><br />";form+="Here is a quick example:<br />";form+="<small>You can also specify a <em>default</em> option:</small><br />";form+="<code>US|United States|default</code><br />";form+="<code>CA|Canada</code><br />";form+="<code>VI|Virgin Islands (U.S.)</code>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">Expected Format: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<select property="expected" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">';form+='<option value=""'+((field.expected==="")?' selected="selected"':"")+'">Anything Goes</option>';form+='<option disabled="disabled"></option>';form+='<optgroup label="Specific Input Types">';form+='<option value="numeric-wp-commas"'+((field.expected==="numeric-wp-commas")?' selected="selected"':"")+'">Numeric ( with or without decimals, commas allowed )</option>';form+='<option value="numeric"'+((field.expected==="numeric")?' selected="selected"':"")+'">Numeric ( with or without decimals, no commas )</option>';form+='<option value="integer"'+((field.expected==="integer")?' selected="selected"':"")+'">Integer ( whole number, without any decimals )</option>';form+='<option value="integer-gt-0"'+((field.expected==="integer-gt-0")?' selected="selected"':"")+'">Integer > 0 ( whole number, no decimals, greater than 0 )</option>';form+='<option value="float"'+((field.expected==="float")?' selected="selected"':"")+'">Float ( floating point number, decimals required )</option>';form+='<option value="float-gt-0"'+((field.expected==="float-gt-0")?' selected="selected"':"")+'">Float > 0 ( floating point number, decimals required, greater than 0 )</option>';form+='<option value="date"'+((field.expected==="date")?' selected="selected"':"")+'">Date ( required date format: dd/mm/yyyy )</option>';form+='<option value="email"'+((field.expected==="email")?' selected="selected"':"")+'">Email ( require valid email )</option>';form+='<option value="url"'+((field.expected==="url")?' selected="selected"':"")+'">Full URL ( starting with http or https )</option>';form+='<option value="domain"'+((field.expected==="domain")?' selected="selected"':"")+'">Domain Name ( domain name only, without http )</option>';form+='<option value="phone"'+((field.expected==="phone")?' selected="selected"':"")+'">Phone # ( 10 digits w/possible hyphens,spaces,brackets )</option>';form+='<option value="uszip"'+((field.expected==="uszip")?' selected="selected"':"")+'">US Zipcode ( 5-9 digits w/possible hyphen )</option>';form+='<option value="cazip"'+((field.expected==="cazip")?' selected="selected"':"")+'">Canadian Zipcode ( 6 alpha-numerics w/possible space )</option>';form+='<option value="uczip"'+((field.expected==="uczip")?' selected="selected"':"")+'">US/Canadian Zipcode ( either a US or Canadian zipcode )</option>';form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Any Character Combination">';for(i=1;i<=25;i++){form+='<option value="any-'+i+'"'+((field.expected==="any-"+i)?' selected="selected"':"")+'">Any Character Combination ( '+i+" character minimum )</option>";form+='<option value="any-'+i+'-e"'+((field.expected==="any-"+i+"-e")?' selected="selected"':"")+'">Any Character Combination ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics, Spaces &amp; Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-punctuation-'+i+'"'+((field.expected==="alphanumerics-spaces-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-spaces-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics &amp; Spaces Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-'+i+'"'+((field.expected==="alphanumerics-spaces-"+i)?' selected="selected"':"")+'">Alphanumerics &amp; Spaces ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-'+i+'-e"'+((field.expected==="alphanumerics-spaces-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics &amp; Spaces ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics &amp; Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-punctuation-'+i+'"'+((field.expected==="alphanumerics-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-'+i+'"'+((field.expected==="alphanumerics-"+i)?' selected="selected"':"")+'">Alphanumerics ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-'+i+'-e"'+((field.expected==="alphanumerics-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphabetics Only">';for(i=1;i<=25;i++){form+='<option value="alphabetics-'+i+'"'+((field.expected==="alphabetics-"+i)?' selected="selected"':"")+'">Alphabetics ( '+i+" character minimum )</option>";form+='<option value="alphabetics-'+i+'-e"'+((field.expected==="alphabetics-"+i+"-e")?' selected="selected"':"")+'">Alphabetics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Numeric Digits Only">';for(i=1;i<=25;i++){form+='<option value="numerics-'+i+'"'+((field.expected==="numerics-"+i)?' selected="selected"':"")+'">Numeric Digits ( '+i+" digit minimum )</option>";form+='<option value="numerics-'+i+'-e"'+((field.expected==="numerics-"+i+"-e")?' selected="selected"':"")+'">Numeric Digits ( exactly '+i+" digit"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+="</select><br />";form+="<small>Only Users/Members will be required to meet this criteria.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">Applicable Membership Levels: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<input type="text" property="levels" value="'+esc_attr(field.levels)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels" /><br />';form+="<small>Please use comma-delimited Level #'s: <code>0,1,2,3,4</code> or type: <code>all</code>.</small><br />";form+="<small>This allows you to enable this field - only at specific Membership Levels.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">Allow Profile Edits: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<select property="editable" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<option value="yes"'+((field.editable==="yes")?' selected="selected"':"")+'">Yes ( editable )</option>';form+='<option value="no"'+((field.editable==="no")?' selected="selected"':"")+'">No ( uneditable after registration )</option>';form+='<option value="no-invisible"'+((field.editable==="no-invisible")?' selected="selected"':"")+'">No ( uneditable &amp; totally invisible after registration )</option>';form+='<option value="yes-invisible"'+((field.editable==="yes-invisible")?' selected="selected"':"")+'">Yes ( editable after registration / invisible during registration )</option>';form+="</select><br />";form+="<small>If <code>No</code>, this field will be un-editable after registration.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">CSS Classes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<input type="text" property="classes" value="'+esc_attr(field.classes)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes" /><br />';form+="<small>Example: <code>my-style-1 my-style-2</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">CSS Styles: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<input type="text" property="styles" value="'+esc_attr(field.styles)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles" /><br />';form+="<small>Example: <code>color:#000000; background:#FFFFFF;</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">Other Attributes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<input type="text" property="attrs" value="'+esc_attr(field.attrs)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs" /><br />';form+='<small>Example: <code>onkeyup="" onblur=""</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons">';form+='<td align="left">';form+='<input type="button" value="Cancel" onclick="ws_plugin__s2member_customRegFieldCancel();" />';form+="</td>";form+='<td align="right">';form+='<input type="button" value="'+((editing)?"Update This Field":"Create Registration Field")+'" onclick="'+((editing)?"ws_plugin__s2member_customRegFieldUpdate("+index+");":"ws_plugin__s2member_customRegFieldCreate();")+'" />';form+="</td>";form+="</tr>";form+="</tbody>";form+="</table>";form+="<div>";$("body").append(form);tb_show(((editing)?"Editing Registration/Profile Field":"New Custom Registration/Profile Field"),"#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form");$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form").show()}$tools.html(html)};var buildTable=function(){var l=fields.length,i=0,html="",eo="o";html+="<tbody>";html+="<tr>";html+="<th>Order</th>";html+="<th>Field Type</th>";html+="<th>Unique ID</th>";html+="<th>Required</th>";html+="<th>Levels</th>";html+="<th>- Tools -</th>";html+="</tr>";if(fields.length>0){for(i=0;i<fields.length;i++){html+='<tr class="'+esc_attr((eo=(eo==="o")?"e":"o"))+((fields[i].section==="yes")?" s":"")+" ws-plugin--s2member-custom-reg-field-configuration-table-row-"+i+'">';html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-move-up" href="#" onclick="ws_plugin__s2member_customRegFieldMoveUp('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-move-down" href="#" onclick="ws_plugin__s2member_customRegFieldMoveDown('+i+'); return false;"></a></td>';html+='<td nowrap="nowrap">'+esc_html(fieldTypeDesc(fields[i].type))+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].id)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].required)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].levels)+"</td>";html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-edit" href="#" onclick="ws_plugin__s2member_customRegFieldEdit('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-delete" href="#" onclick="ws_plugin__s2member_customRegFieldDelete('+i+'); return false;"></a></td>';html+="</tr>"}}else{html+="<tr>";html+='<td colspan="6">No Custom Fields are configured.</td>';html+="</tr>"}html+="</tbody>";$table.html(html)};buildTools(),buildTable()})()}}if(location.href.match(/page\=ws-plugin--s2member-res-ops/)){$("input#ws-plugin--s2member-brute-force-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's Brute Force Restriction Logs have all been reset."),$this.val("Reset Brute Force Logs")});return false});$("input#ws-plugin--s2member-ip-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's IP Restriction Logs have all been reset."),$this.val("Reset IP Restriction Logs")});return false});$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').change(function(){var thisChange=$(this).val();$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="all"&&this.checked){$this.nextAll(checkboxes).attr({checked:"checked",disabled:"disabled"})}else{if(val==="all"&&!this.checked){$this.nextAll(checkboxes).removeAttr("disabled");(thisChange==="all")?$this.nextAll(checkboxes).removeAttr("checked"):null}}})}).last().trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-down-ops/)){var updateCloudFrontPrivateKey=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyEntry=$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry");var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyEntryValue=$.trim($visiblePrivateKeyEntry.val());if((hiddenPrivateKeyValue&&!visiblePrivateKeyEntryValue)||visiblePrivateKeyEntryValue.match(/[^\r\n\u25CF]/)){$hiddenPrivateKey.val(visiblePrivateKeyEntryValue),$visiblePrivateKeyEntry.val(visiblePrivateKeyEntryValue.replace(/[^\r\n]/g,String.fromCharCode(9679)))}};$("form#ws-plugin--s2member-options-form").submit(updateCloudFrontPrivateKey);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontPrivateKey).trigger("change");var updateCloudFrontDistroCfgs=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyId=$("input#ws-plugin--s2member-amazon-cf-files-private-key-id");var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistrosStatus=$("input#ws-plugin--s2member-amazon-cf-files-distros-auto-config-status");var autoConfigDistrosStatusValue=$.trim($autoConfigDistrosStatus.val());var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyIdValue=$.trim($visiblePrivateKeyId.val());var hiddenPrivateKeyPrevConfigValue=$.trim($hiddenPrivateKey.attr("data-s-prev-config-value")),visiblePrivateKeyIdPrevConfigValue=$.trim($visiblePrivateKeyId.attr("data-s-prev-config-value"));if(autoConfigDistrosStatusValue==="configured"&&((visiblePrivateKeyIdPrevConfigValue&&visiblePrivateKeyIdValue!==visiblePrivateKeyIdPrevConfigValue)||(hiddenPrivateKeyPrevConfigValue&&hiddenPrivateKeyValue!==hiddenPrivateKeyPrevConfigValue))){alert("s2Member will need to delete and re-configure your Amazon® CloudFront distributions if you change this. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}else{if(autoConfigDistrosStatusValue!=="configured"&&visiblePrivateKeyIdValue&&hiddenPrivateKeyValue){alert("s2Member will need to auto-configure your Amazon® CloudFront distributions for you. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}}};$("input#ws-plugin--s2member-amazon-cf-files-private-key-id").change(updateCloudFrontDistroCfgs);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontDistroCfgs);$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros-w-cnames").change(function(){var $this=$(this),thisChecked=(this.checked)?true:false;var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistroCnames=$("div#ws-plugin--s2member-amazon-cf-files-auto-configure-distro-cnames");(thisChecked)?$autoConfigDistroCnames.show():$autoConfigDistroCnames.hide();(thisChecked)?$autoConfigDistros.attr("checked","checked"):null}).trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-paypal-ops/)){$("select#ws-plugin--s2member-auto-eot-system-enabled").change(function(){var $this=$(this),val=$this.val();var $viaCron=$("p#ws-plugin--s2member-auto-eot-system-enabled-via-cron");if(val==2){$viaCron.show()}else{$viaCron.hide()}})}if(location.href.match(/page\=ws-plugin--s2member-paypal-buttons/)){$("div.ws-menu-page select[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification)-term$/)}).change(function(){var button=this.id.replace(/^ws-plugin--s2member-(.+?)-term$/g,"$1");var trialDisabled=($(this).val().split("-")[2].replace(/[^0-1BN]/g,"")==="BN")?1:0;$("p#ws-plugin--s2member-"+button+"-trial-line").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-trial-then").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-20p-rule").css("display",(trialDisabled?"none":""));(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-period").val(0):null;(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-amount").val("0.00"):null});$("div.ws-menu-page input[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification|ccap)-ccaps$/)}).keyup(function(){var value=this.value.replace(/^(-all|-al|-a|-)[;,]*/gi,""),_all=(this.value.match(/^(-all|-al|-a|-)[;,]*/i))?"-all,":"";if(value.match(/[^a-z_0-9,]/)){this.value=_all+$.trim($.trim(value).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase())}});ws_plugin__s2member_paypalButtonGenerate=function(button){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="",labels={};eval("<?php echo c_ws_plugin__s2member_utils_strings::esc_dq($labels); ?>");var shortCode=$("input#ws-plugin--s2member-"+button+"-shortcode");var code=$("textarea#ws-plugin--s2member-"+button+"-button");var modLevel=$("select#ws-plugin--s2member-modification-level");var level=(button==="modification")?modLevel.val().split(":",2)[1]:button.replace(/^level/,"");var label=labels["level"+level].replace(/"/g,"");var desc=$.trim($("input#ws-plugin--s2member-"+button+"-desc").val().replace(/"/g,""));var trialAmount=$("input#ws-plugin--s2member-"+button+"-trial-amount").val().replace(/[^0-9\.]/g,"");var trialPeriod=$("input#ws-plugin--s2member-"+button+"-trial-period").val().replace(/[^0-9]/g,"");var trialTerm=$("select#ws-plugin--s2member-"+button+"-trial-term").val().replace(/[^A-Z]/g,"");var regAmount=$("input#ws-plugin--s2member-"+button+"-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var regRecurTimes="",regRecurRetry="1";var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-"+button+"-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-"+button+"-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();trialPeriod=(regRecur==="BN")?"0":trialPeriod;trialAmount=(!trialAmount||isNaN(trialAmount)||trialAmount<0.01||trialPeriod<=0)?"0":trialAmount;var levelCcapsPer=(regRecur==="BN"&&regTerm!=="L")?level+":"+cCaps+":"+regPeriod+" "+regTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(trialAmount!=="0"&&(isNaN(trialAmount)||trialAmount<0)){alert("— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be >= 0.00");return false}else{if(trialAmount!=="0"&&trialAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Trial Amount is: 10000.00");return false}else{if(trialTerm==="D"&&trialPeriod>7){alert("— Oops, a slight problem: —\n\nMaximum Trial Days is: 7.\nIf you want to offer more than 7 days, please choose Weeks or Months from the drop-down.");return false}else{if(trialTerm==="W"&&trialPeriod>52){alert("— Oops, a slight problem: —\n\nMaximum Trial Weeks is: 52.\nIf you want to offer more than 52 weeks, please choose Months from the drop-down.");return false}else{if(trialTerm==="M"&&trialPeriod>12){alert("— Oops, a slight problem: —\n\nMaximum Trial Months is: 12.\nIf you want to offer more than 12 months, please choose Years from the drop-down.");return false}else{if(trialTerm==="Y"&&trialPeriod>1){alert("— Oops, a slight problem: —\n\nMax Trial Period Years is: 1.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}}}}}}code.html(code.val().replace(/ \<\!--(\<input type\="hidden" name\="(amount|src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)--\>/g," $1"));(parseInt(trialPeriod)<=0)?code.html(code.val().replace(/ (\<input type\="hidden" name\="(a1|p1|t1)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick$3")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="(src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick-subscriptions$3")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g," <!--$1-->")):null;shortCodeTemplateAttrs+=(button==="modification")?'modify="1" ':"";shortCodeTemplateAttrs+='level="'+esc_attr(level)+'" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'" custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"';shortCodeTemplateAttrs+=' ta="'+esc_attr(trialAmount)+'" tp="'+esc_attr(trialPeriod)+'" tt="'+esc_attr(trialTerm)+'" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'" rrt="'+esc_attr(regRecurTimes)+'" rra="'+esc_attr(regRecurRetry)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="modify" value\="(.*?)"/,' name="modify" value="'+((button==="modification")?"1":"0")+'"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="src" value\="(.*?)"/,' name="src" value="'+esc_attr(regRecur)+'"'));code.html(code.val().replace(/ name\="srt" value\="(.*?)"/,' name="srt" value="'+esc_attr(regRecurTimes)+'"'));code.html(code.val().replace(/ name\="sra" value\="(.*?)"/,' name="sra" value="'+esc_attr(regRecurRetry)+'"'));code.html(code.val().replace(/ name\="a1" value\="(.*?)"/,' name="a1" value="'+esc_attr(trialAmount)+'"'));code.html(code.val().replace(/ name\="p1" value\="(.*?)"/,' name="p1" value="'+esc_attr(trialPeriod)+'"'));code.html(code.val().replace(/ name\="t1" value\="(.*?)"/,' name="t1" value="'+esc_attr(trialTerm)+'"'));code.html(code.val().replace(/ name\="a3" value\="(.*?)"/,' name="a3" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="p3" value\="(.*?)"/,' name="p3" value="'+esc_attr(regPeriod)+'"'));code.html(code.val().replace(/ name\="t3" value\="(.*?)"/,' name="t3" value="'+esc_attr(regTerm)+'"'));$("div#ws-plugin--s2member-"+button+"-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));(button==="modification")?alert("Your Modification Button has been generated.\nPlease copy/paste the Shortcode Format into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Modification Buttons should be displayed to existing Users/Members, and they should be logged-in, BEFORE clicking this Button."):alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalCcapButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-ccap-shortcode");var code=$("textarea#ws-plugin--s2member-ccap-button");var desc=$.trim($("input#ws-plugin--s2member-ccap-desc").val().replace(/"/g,""));var regAmount=$("input#ws-plugin--s2member-ccap-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-ccap-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-ccap-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-ccap-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-ccap-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-ccap-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();var levelCcapsPer=(regRecur==="BN"&&regTerm!=="L")?"*:"+cCaps+":"+regPeriod+" "+regTerm:"*:"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!cCaps||cCaps==="-all"){alert("— Oops, a slight problem: —\n\nPlease provide at least one Custom Capability.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}shortCodeTemplateAttrs+='level="*" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-ccap-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalSpButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-sp-shortcode");var code=$("textarea#ws-plugin--s2member-sp-button");var leading=$("select#ws-plugin--s2member-sp-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-hours").val().replace(/[^0-9]/g,"");var regAmount=$("input#ws-plugin--s2member-sp-amount").val().replace(/[^0-9\.]/g,"");var desc=$.trim($("input#ws-plugin--s2member-sp-desc").val().replace(/"/g,""));var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-sp-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-sp-currency").val().replace(/[^A-Z]/g,"");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}var spIdsHours="sp:"+ids+":"+hours;shortCodeTemplateAttrs+='sp="1" ids="'+esc_attr(ids)+'" exp="'+esc_attr(hours)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(spIdsHours)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-sp-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your WordPress® Editor.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalRegLinkGenerate=function(){var level=$("select#ws-plugin--s2member-reg-link-level").val().replace(/[^0-9]/g,"");var subscrID=$.trim($("input#ws-plugin--s2member-reg-link-subscr-id").val());var custom=$.trim($("input#ws-plugin--s2member-reg-link-custom").val());var cCaps=$.trim($.trim($("input#ws-plugin--s2member-reg-link-ccaps").val()).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());var fixedTerm=$.trim($("input#ws-plugin--s2member-reg-link-fixed-term").val().replace(/[^A-Z 0-9]/gi,"").toUpperCase());var $link=$("p#ws-plugin--s2member-reg-link"),$loading=$("img#ws-plugin--s2member-reg-link-loading");var levelCcapsPer=(fixedTerm&&!fixedTerm.match(/L$/))?level+":"+cCaps+":"+fixedTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!subscrID){alert("— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.");return false}else{if(!custom||custom.indexOf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq ($_SERVER["HTTP_HOST"]); ?>')!==0){alert("— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.");return false}else{if(fixedTerm&&!fixedTerm.match(/^[1-9]+ (D|W|M|Y|L)$/)){alert("— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly.");return false}}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_reg_access_link_via_ajax",ws_plugin__s2member_reg_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-reg-access-link-via-ajax")); ?>',s2member_reg_access_link_subscr_gateway:"paypal",s2member_reg_access_link_subscr_id:subscrID,s2member_reg_access_link_custom:custom,s2member_reg_access_link_item_number:levelCcapsPer},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false};ws_plugin__s2member_paypalSpLinkGenerate=function(){var leading=$("select#ws-plugin--s2member-sp-link-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-link-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-link-hours").val().replace(/[^0-9]/g,"");var $link=$("p#ws-plugin--s2member-sp-link"),$loading=$("img#ws-plugin--s2member-sp-link-loading");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_sp_access_link_via_ajax",ws_plugin__s2member_sp_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-sp-access-link-via-ajax")); ?>',s2member_sp_access_link_ids:ids,s2member_sp_access_link_hours:hours},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false}}if(location.href.match(/page\=ws-plugin--s2member-els-ops/)){$("select#ws-plugin--s2member-custom-reg-opt-in").change(function(){var $this=$(this),val=$this.val();var $rows=$("tr.ws-plugin--s2member-custom-reg-opt-in-label-row");var $prevImg=$("img.ws-plugin--s2member-custom-reg-opt-in-label-prev-img");if(val<=0){$rows.css("display","none"),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}else{if(val==1){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/unchecked\.png$/,"/checked.png"))}else{if(val==2){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}}}});$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').change(function(){var thisChange=$(this).val(),checkedIndexes=[];$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="removal-deletion"&&this.checked){$this.nextAll(checkboxes).slice(0,2).attr({checked:"checked",disabled:"disabled"})}else{if(val==="removal-deletion"&&!this.checked){$this.nextAll(checkboxes).slice(0,2).removeAttr("disabled");(thisChange==="removal-deletion")?$this.nextAll(checkboxes).slice(0,2).removeAttr("checked"):null}else{if(val==="modification"&&this.checked){$this.nextAll(checkboxes).slice(0,3).attr({checked:"checked",disabled:"disabled"})}else{if(val==="modification"&&!this.checked){(thisChange==="modification")?$this.nextAll(checkboxes).slice(0,3).removeAttr("checked"):null;$this.nextAll(checkboxes).slice(0,3).removeAttr("disabled")}}}}}).each(function(index){(this.checked)?checkedIndexes.push(index):null});$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").removeAttr("disabled");if($.inArray(3,checkedIndexes)===-1&&$.inArray(4,checkedIndexes)===-1&&$.inArray(5,checkedIndexes)===-1&&$.inArray(6,checkedIndexes)===-1){$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").attr("disabled","disabled")}}).last().trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-integrations/)){$("select#ws-plugin--s2member-bbpress-ovg").change(function(){if($(this).val()==="0"){$("span#ws-plugin--s2member-bbpress-ovg-off-note").css("display","inline");var l='form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';$(l).text($(l).text().replace(/to (read\/)?participate/i,"to read/participate")),$("select#ws-plugin--s2member-bbpress-min-level option").each(function(){$(this).text($(this).text().replace(/\( to( read and)? participate \)/i,"( to read and participate )"))})}else{if($(this).val()==="1"){$("span#ws-plugin--s2member-bbpress-ovg-off-note").css("display","none");var l='form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';$(l).text($(l).text().replace(/to (read\/)?participate/i,"to participate")),$("select#ws-plugin--s2member-bbpress-min-level option").each(function(){$(this).text($(this).text().replace(/\( to( read and)? participate \)/i,"( to participate )"))})}}}).trigger("change")}});
includes/menu-pages/menu-pages-s.js CHANGED
@@ -352,7 +352,7 @@ jQuery(document).ready (function($)
352
  /**/
353
  var fieldId2Var = function(fieldId) /* Convert ids to variables. */
354
  {
355
- return ( typeof fieldId === 'string') ? $.trim (fieldId).toLowerCase ().replace (/[^a-z0-9]/g, '_') : '';
356
  };
357
  /**/
358
  var fieldTypeDesc = function(type)
@@ -736,7 +736,7 @@ jQuery(document).ready (function($)
736
  /**/
737
  $('body').append (form);
738
  /**/
739
- tb_show(((editing) ? 'Editing Registration/Profile Field' : 'New Custom Registration/Profile Field'), '#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form'), $(window).trigger ('resize');
740
  /**/
741
  $('table#ws-plugin--s2member-custom-reg-field-configuration-tools-form').show ();
742
  }
@@ -744,16 +744,6 @@ jQuery(document).ready (function($)
744
  $tools.html (html);
745
  };
746
  /**/
747
- var attachTBResizer = function() /* Resize inline #TB_ajaxContent. */
748
- {
749
- $(window).resize (function()
750
- {
751
- var w, h; /* Initialize width/height vars. */
752
- w = $(window).width (), h = $(window).height (), w = (w > 720) ? 720 : w;
753
- $('#TB_ajaxContent').css ({'width': w - 50, 'height': h - 75, 'margin': 0, 'padding': 0});
754
- });
755
- };
756
- /**/
757
  var buildTable = function() /* This builds the table of existing fields. */
758
  {
759
  var l = fields.length, i = 0, html = '', eo = 'o';
@@ -794,8 +784,8 @@ jQuery(document).ready (function($)
794
  /**/
795
  $table.html (html);
796
  };
797
- /* Initialize configuration. */
798
- buildTools (), attachTBResizer (), buildTable ();
799
  /**/
800
  }) ();
801
  }
352
  /**/
353
  var fieldId2Var = function(fieldId) /* Convert ids to variables. */
354
  {
355
+ return( typeof fieldId === 'string') ? $.trim (fieldId).toLowerCase ().replace (/[^a-z0-9]/g, '_') : '';
356
  };
357
  /**/
358
  var fieldTypeDesc = function(type)
736
  /**/
737
  $('body').append (form);
738
  /**/
739
+ tb_show(((editing) ? 'Editing Registration/Profile Field' : 'New Custom Registration/Profile Field'), '#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form');
740
  /**/
741
  $('table#ws-plugin--s2member-custom-reg-field-configuration-tools-form').show ();
742
  }
744
  $tools.html (html);
745
  };
746
  /**/
 
 
 
 
 
 
 
 
 
 
747
  var buildTable = function() /* This builds the table of existing fields. */
748
  {
749
  var l = fields.length, i = 0, html = '', eo = 'o';
784
  /**/
785
  $table.html (html);
786
  };
787
+ /* Initialize config. */
788
+ buildTools (), buildTable ();
789
  /**/
790
  }) ();
791
  }
includes/menu-pages/menu-pages.css CHANGED
@@ -185,13 +185,18 @@ table.ws-menu-page-table div.ws-menu-page-groups-show,
185
  table.ws-menu-page-table div.ws-menu-page-groups-hide
186
  {
187
  float: right;
 
 
188
  color: #333333;
189
  padding: 10px;
190
- font-size: 220%;
191
  cursor: pointer;
 
192
  font-weight: bold;
 
 
193
  background: #FFFFFF;
194
- margin: 0 0 0 30px;
 
195
  font-family: monospace;
196
  border: 1px solid #666666;
197
  -moz-border-radius: 5px;
@@ -209,19 +214,21 @@ table.ws-menu-page-table div.ws-menu-page-groups-hide
209
  table.ws-menu-page-table div.ws-menu-page-group-header,
210
  table.ws-menu-page-table div.ws-menu-page-r-group-header
211
  {
 
212
  color: #666666;
213
  padding: 10px;
214
- font-size: 145%;
215
  cursor: pointer;
 
 
216
  position: relative;
217
  background: #FFFFFF;
218
  margin: 30px 0 30px 0;
 
 
219
  border: 1px solid #CCCCCC;
220
  -moz-border-radius: 5px;
221
  -webkit-border-radius: 5px;
222
  border-radius: 5px;
223
- font-family: 'Georgia', serif;
224
- vertical-align: middle;
225
  -moz-user-select: none;
226
  -webkit-user-select: none;
227
  user-select: none;
@@ -229,18 +236,19 @@ table.ws-menu-page-table div.ws-menu-page-r-group-header
229
  table.ws-menu-page-table div.ws-menu-page-group-header > ins,
230
  table.ws-menu-page-table div.ws-menu-page-r-group-header > ins
231
  {
 
232
  width: 22px;
233
  height: 22px;
234
  color: #CCCCCC;
235
- font-size: 17px;
236
  line-height: 22px;
237
  font-weight: bold;
238
  text-align: center;
239
- margin: -2px 10px 0 0;
240
  background: #666666;
241
  text-decoration: none;
242
  font-family: monospace;
243
- vertical-align: middle;
244
  border: 1px solid transparent;
245
  -moz-border-radius: 5px;
246
  -webkit-border-radius: 5px;
@@ -336,14 +344,17 @@ table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr >
336
  {
337
  width: 99.5% !ie<8; /* Required in IE < 8. */
338
  }
339
- table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > ul
 
340
  {
341
  margin: 10px 0 10px 20px;
 
 
 
342
  list-style: disc outside;
343
  }
344
- table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > ol
345
  {
346
- margin: 10px 0 10px 20px;
347
  list-style: decimal outside;
348
  }
349
  table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > div.ws-menu-page-scrollbox
@@ -376,16 +387,18 @@ div.ws-menu-page-readme > div.readme > div.section > h2
376
  padding-top: 0;
377
  font-size: 150%;
378
  }
379
- div.ws-menu-page-readme > div.readme > div.section > div.content ul
 
380
  {
381
  padding: 0;
382
  margin: 10px 0 0 25px;
 
 
 
383
  list-style: disc outside;
384
  }
385
- div.ws-menu-page-readme > div.readme > div.section > div.content ol
386
  {
387
- padding: 0;
388
- margin: 10px 0 0 25px;
389
  list-style: decimal outside;
390
  }
391
  /*
@@ -435,12 +448,12 @@ div.ws-menu-page-mlist ul
435
  {
436
  padding: 0;
437
  margin: 0 0 0 12px;
438
- list-style: square outside;
439
  }
440
  div.ws-menu-page-mlist ul > li
441
  {
442
  padding: 0;
443
  margin: 5px 0 5px 0;
 
444
  -moz-user-select: none;
445
  -webkit-user-select: none;
446
  user-select: none;
185
  table.ws-menu-page-table div.ws-menu-page-groups-hide
186
  {
187
  float: right;
188
+ height: 24px;
189
+ width: 24px;
190
  color: #333333;
191
  padding: 10px;
 
192
  cursor: pointer;
193
+ font-size: 28px;
194
  font-weight: bold;
195
+ line-height: 24px;
196
+ text-align: center;
197
  background: #FFFFFF;
198
+ margin: 0 0 0 20px;
199
+ vertical-align: middle;
200
  font-family: monospace;
201
  border: 1px solid #666666;
202
  -moz-border-radius: 5px;
214
  table.ws-menu-page-table div.ws-menu-page-group-header,
215
  table.ws-menu-page-table div.ws-menu-page-r-group-header
216
  {
217
+ height: 24px;
218
  color: #666666;
219
  padding: 10px;
 
220
  cursor: pointer;
221
+ font-size: 19px;
222
+ line-height: 24px;
223
  position: relative;
224
  background: #FFFFFF;
225
  margin: 30px 0 30px 0;
226
+ vertical-align: middle;
227
+ font-family: 'Georgia', serif;
228
  border: 1px solid #CCCCCC;
229
  -moz-border-radius: 5px;
230
  -webkit-border-radius: 5px;
231
  border-radius: 5px;
 
 
232
  -moz-user-select: none;
233
  -webkit-user-select: none;
234
  user-select: none;
236
  table.ws-menu-page-table div.ws-menu-page-group-header > ins,
237
  table.ws-menu-page-table div.ws-menu-page-r-group-header > ins
238
  {
239
+ padding: 0;
240
  width: 22px;
241
  height: 22px;
242
  color: #CCCCCC;
243
+ font-size: 22px;
244
  line-height: 22px;
245
  font-weight: bold;
246
  text-align: center;
247
+ margin: 0 10px 0 0;
248
  background: #666666;
249
  text-decoration: none;
250
  font-family: monospace;
251
+ vertical-align: text-top;
252
  border: 1px solid transparent;
253
  -moz-border-radius: 5px;
254
  -webkit-border-radius: 5px;
344
  {
345
  width: 99.5% !ie<8; /* Required in IE < 8. */
346
  }
347
+ table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > ul,
348
+ table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > ol
349
  {
350
  margin: 10px 0 10px 20px;
351
+ }
352
+ table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > ul > li
353
+ {
354
  list-style: disc outside;
355
  }
356
+ table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > ol > li
357
  {
 
358
  list-style: decimal outside;
359
  }
360
  table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > div.ws-menu-page-scrollbox
387
  padding-top: 0;
388
  font-size: 150%;
389
  }
390
+ div.ws-menu-page-readme > div.readme > div.section > div.content ul,
391
+ div.ws-menu-page-readme > div.readme > div.section > div.content ol
392
  {
393
  padding: 0;
394
  margin: 10px 0 0 25px;
395
+ }
396
+ div.ws-menu-page-readme > div.readme > div.section > div.content ul > li
397
+ {
398
  list-style: disc outside;
399
  }
400
+ div.ws-menu-page-readme > div.readme > div.section > div.content ol > li
401
  {
 
 
402
  list-style: decimal outside;
403
  }
404
  /*
448
  {
449
  padding: 0;
450
  margin: 0 0 0 12px;
 
451
  }
452
  div.ws-menu-page-mlist ul > li
453
  {
454
  padding: 0;
455
  margin: 5px 0 5px 0;
456
+ list-style: square outside;
457
  -moz-user-select: none;
458
  -webkit-user-select: none;
459
  user-select: none;
includes/menu-pages/menu-pages.js CHANGED
@@ -23,7 +23,14 @@ These routines address common layout styles for menu pages.
23
  */
24
  jQuery(document).ready (function($)
25
  {
26
- $('div#ws-menu-page-js-c-w').hide (); /* Hide warning. */
 
 
 
 
 
 
 
27
  /**/
28
  var $groups = $('div.ws-menu-page-group'); /* Query groups. */
29
  $groups.each (function(index) /* Go through each group, one at a time. */
@@ -112,7 +119,7 @@ jQuery(document).ready (function($)
112
  /**/
113
  $('input.ws-menu-page-media-btn').filter (function() /* Only those that have a rel attribute. */
114
  {
115
- return($(this).attr ('rel')) ? true : false; /* Must have rel targeting an input id. */
116
  })/**/
117
  .click (function() /* Attach click events to media buttons with send_to_editor(). */
118
  {
23
  */
24
  jQuery(document).ready (function($)
25
  {
26
+ $('div#ws-menu-page-js-c-w').hide (); /* Hide JavaScript conflict warning. */
27
+ /**/
28
+ $(window).resize ( /* Global function. */tb_position /* Thickbox resizer/positioner. */ = function()
29
+ {
30
+ var w = ($(window).width () > 720) ? 720 : $(window).width (), h = $(window).height (), admin_bar_h = ($('body.admin-bar').length) ? 28 : 0;
31
+ $('#TB_window').css ({'width': w - 50 + 'px', 'height': h - 45 - admin_bar_h + 'px', 'top': 25 + admin_bar_h + 'px', 'margin-top': 0, 'margin-left': '-' + parseInt(((w - 50) / 2), 10) + 'px'});
32
+ $('#TB_ajaxContent').css ({'width': w - 50 + 'px', 'height': h - 75 - admin_bar_h + 'px', 'margin': 0, 'padding': 0});
33
+ });
34
  /**/
35
  var $groups = $('div.ws-menu-page-group'); /* Query groups. */
36
  $groups.each (function(index) /* Go through each group, one at a time. */
119
  /**/
120
  $('input.ws-menu-page-media-btn').filter (function() /* Only those that have a rel attribute. */
121
  {
122
+ return ($(this).attr ('rel')) ? true : false; /* Must have rel targeting an input id. */
123
  })/**/
124
  .click (function() /* Attach click events to media buttons with send_to_editor(). */
125
  {
includes/s2member-min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(b){ws_plugin__s2member_uniqueFilesDownloaded=[];var a='<?php echo c_ws_plugin__s2member_utils_conds::bp_is_installed ("query-active-plugins") ? "1" : ""; ?>';if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN&&S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY<S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED){b('a[href*="s2member_file_download"], a[href*="s2member-file"').click(function(){if(!this.href.match(/s2member_file_download_key\=(.+)/i)){var d='<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Confirm File Download —", "s2member-front", "s2member")); ?>\n\n';d+=b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`ve downloaded %s protected %s in the last %s.", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY,((S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("file", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("files", "s2member-front", "s2member")); ?>'),((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("24 hours", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("%s days", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS)))+"\n\n";d+=(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to UNLIMITED downloads though ( so, no worries ).", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to %s unique %s %s.", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED,((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("download", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("downloads", "s2member-front", "s2member")); ?>'),((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("each day", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("every %s-day period", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS)));if(this.href.match(/s2member[_\-]skip[_\-]confirmation/i)&&!this.href.match(/s2member[_\-]skip[_\-]confirmation[\=\-](0|no|false)/i)||confirm(d)){if(b.inArray(this.href,ws_plugin__s2member_uniqueFilesDownloaded)===-1){ws_plugin__s2member_uniqueFilesDownloaded.push(this.href),S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY++}return true}else{return false}}else{return true}})}if(!location.href.match(/\/wp-admin(\/|$)/)){b("input#ws-plugin--s2member-profile-password1, input#ws-plugin--s2member-profile-password2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#ws-plugin--s2member-profile-login"),b("input#ws-plugin--s2member-profile-password1"),b("input#ws-plugin--s2member-profile-password2"),b("div#ws-plugin--s2member-profile-password-strength"))});b("form#ws-plugin--s2member-profile").submit(function(){var e=this,d="",c="",i="";var g=b("input#ws-plugin--s2member-profile-password1",e);var f=b("input#ws-plugin--s2member-profile-password2",e);var h=b("input#ws-plugin--s2member-profile-submit",e);b(":input",e).each(function(){var j=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(j&&(d=b.trim(b('label[for="'+j+'"]',e).first().children("strong").first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}});if(i=b.trim(i)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+i);return false}else{if(b.trim(g.val())&&b.trim(g.val())!==b.trim(f.val())){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');return false}else{if(b.trim(g.val())&&b.trim(g.val()).length<6){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');return false}}}ws_plugin__s2member_animateProcessing(h);return true})}if(location.href.match(/\/wp-signup\.php/)){b("div#content > div.mu_register > form#setupform").submit(function(){var e=this,d="",c="",g="";b("input#user_email",e).attr("data-expected","email");var f=b('p.submit input[type="submit"]',e);b("input#user_name, input#user_email, input#blogname, input#blog_title, input#captcha_code",e).attr({"aria-required":"true"});b(":input",e).each(function(){var h=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(h&&(d=b.trim(b('label[for="'+h+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){g+=c+"\n\n"}}});if(g=b.trim(g)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+g);return false}ws_plugin__s2member_animateProcessing(f);return true})}if(location.href.match(/\/wp-login\.php/)){b("input#ws-plugin--s2member-custom-reg-field-user-pass1, input#ws-plugin--s2member-custom-reg-field-user-pass2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#user_login"),b("input#ws-plugin--s2member-custom-reg-field-user-pass1"),b("input#ws-plugin--s2member-custom-reg-field-user-pass2"),b("div#ws-plugin--s2member-custom-reg-field-user-pass-strength"))});b("div#login > form#registerform input#wp-submit").attr("tabindex","1000");b("div#login > form#registerform").submit(function(){var e=this,d="",c="",i="";b("input#user_email",e).attr("data-expected","email");var h=b('input#ws-plugin--s2member-custom-reg-field-user-pass1[aria-required="true"]',e);var f=b("input#ws-plugin--s2member-custom-reg-field-user-pass2",e);var g=b("input#wp-submit",e);b("input#user_login, input#user_email, input#captcha_code",e).attr({"aria-required":"true"});b(":input",e).each(function(){var j=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(b.inArray(j,["user_login","user_email","captcha_code"])!==-1){if((d=b.trim(b(this).parent("label").text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}}else{if(j&&(d=b.trim(b('label[for="'+j+'"]',e).first().children("span").first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}}});if(i=b.trim(i)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+i);return false}else{if(h.length&&b.trim(h.val())!==b.trim(f.val())){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');return false}else{if(h.length&&b.trim(h.val()).length<6){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');return false}}}ws_plugin__s2member_animateProcessing(g);return true})}if(location.href.match(/\/wp-admin\/(user\/)?profile\.php/)){b("form#your-profile").submit(function(){var e=this,d="",c="",f="";b("input#email",e).attr("data-expected","email");b(':input[id^="ws-plugin--s2member-profile-"]',e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true})}if(a){b("body.registration form div#ws-plugin--s2member-custom-reg-fields-4bp-section").closest("form").submit(function(){var e=this,d="",c="",f="";b("input#signup_email",e).attr("data-expected","email");b("input#signup_username, input#signup_email, input#signup_password, input#field_1",e).attr({"aria-required":"true"});b(":input",e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true});b('body.logged-in.profile.profile-edit input.ws-plugin--s2member-profile-field-4bp[type = "text"]').closest("form").submit(function(){var e=this,d="",c="",f="";b("input#field_1",e).attr({"aria-required":"true"});b(":input",e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true})}ws_plugin__s2member_passwordStrength=function(d,f,e,c){if(d instanceof jQuery&&f instanceof jQuery&&e instanceof jQuery&&c instanceof jQuery&&typeof passwordStrength==="function"&&typeof pwsL10n==="object"){c.removeClass("ws-plugin--s2member-password-strength-short ws-plugin--s2member-password-strength-bad ws-plugin--s2member-password-strength-good ws-plugin--s2member-password-strength-strong ws-plugin--s2member-password-strength-mismatch");switch(passwordStrength(f.val(),d.val(),e.val())){case 1:c.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"]);break;case 2:c.addClass("ws-plugin--s2member-password-strength-bad").html(pwsL10n.bad);break;case 3:c.addClass("ws-plugin--s2member-password-strength-good").html(pwsL10n.good);break;case 4:c.addClass("ws-plugin--s2member-password-strength-strong").html(pwsL10n.strong);break;case 5:c.addClass("ws-plugin--s2member-password-strength-mismatch").html(pwsL10n.mismatch);break;default:c.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"])}}return};ws_plugin__s2member_validationErrors=function(o,n,d,j,i){if(typeof o==="string"&&o&&typeof n==="object"&&typeof d==="object"){if(typeof n.tagName==="string"&&n.tagName.match(/^(input|textarea|select)$/i)&&!n.disabled){var q=n.tagName.toLowerCase(),m=b(n),l=b.trim(m.attr("type")).toLowerCase(),c=b.trim(m.attr("name")),p=m.val();var j=(typeof j==="boolean")?j:(m.attr("aria-required")==="true"),i=(typeof i==="string")?i:b.trim(m.attr("data-expected"));var h=('<?php echo strlen($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"]); ?>'>0)?true:false;var f=new RegExp('^(<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (implode ("|", preg_split ("/[\r\n\t ;,]+/", preg_quote ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"], "/")))); ?>)@',"i");if(q==="input"&&l==="checkbox"&&c.match(/\[\]$/)){if(typeof n.id==="string"&&n.id.match(/-0$/)){if(j&&!b('input[name="'+c.replace(/([\[\]])/g,"$1")+'"]:checked',d).length){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please check at least one of the boxes.", "s2member-front", "s2member")); ?>'}}}else{if(q==="input"&&l==="checkbox"){if(j&&!n.checked){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Required. This box must be checked.", "s2member-front", "s2member")); ?>'}}else{if(q==="input"&&l==="radio"){if(typeof n.id==="string"&&n.id.match(/-0$/)){if(j&&!b('input[name="'+c.replace(/([\[\]])/g,"$1")+'"]:checked',d).length){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select one of the options.", "s2member-front", "s2member")); ?>'}}}else{if(q==="select"&&m.attr("multiple")){if(j&&(!(p instanceof Array)||!p.length)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select at least one of the options.", "s2member-front", "s2member")); ?>'}}else{if(typeof p!=="string"||(j&&!(p=b.trim(p)).length)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("This is a required field, please try again.", "s2member-front", "s2member")); ?>'}else{if((p=b.trim(p)).length&&((q==="input"&&l.match(/^(text|password)$/i))||q==="textarea")&&typeof i==="string"&&i.length){if(i==="numeric-wp-commas"&&(!p.match(/^[0-9\.,]+$/)||isNaN(p.replace(/,/g,"")))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, commas allowed ).", "s2member-front", "s2member")); ?>'}else{if(i==="numeric"&&(!p.match(/^[0-9\.]+$/)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, no commas ).", "s2member-front", "s2member")); ?>'}else{if(i==="integer"&&(!p.match(/^[0-9]+$/)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer ( a whole number, without any decimals ).", "s2member-front", "s2member")); ?>'}else{if(i==="integer-gt-0"&&(!p.match(/^[0-9]+$/)||isNaN(p)||p<=0)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer > 0 ( whole number, no decimals, greater than 0 ).", "s2member-front", "s2member")); ?>'}else{if(i==="float"&&(!p.match(/^[0-9\.]+$/)||!p.match(/[0-9]/)||!p.match(/\./)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float ( floating point number, decimals required ).", "s2member-front", "s2member")); ?>'}else{if(i==="float-gt-0"&&(!p.match(/^[0-9\.]+$/)||!p.match(/[0-9]/)||!p.match(/\./)||isNaN(p)||p<=0)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float > 0 ( floating point number, decimals required, greater than 0 ).", "s2member-front", "s2member")); ?>'}else{if(i==="date"&&!p.match(/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a date ( required date format: dd/mm/yyyy ).", "s2member-front", "s2member")); ?>'}else{if(i==="email"&&!p.match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a valid email address.", "s2member-front", "s2member")); ?>'}else{if(i==="email"&&h&&p.match(f)){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use a personal email address.\nAddresses like <%s@> are problematic.", "s2member-front", "s2member")); ?>',p.split("@")[0])}else{if(i==="url"&&!p.match(/^http(s?)\:\/\/(.{5,})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a full URL ( starting with http or https ).", "s2member-front", "s2member")); ?>'}else{if(i==="domain"&&!p.match(/^([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a domain name ( domain name only, without http ).", "s2member-front", "s2member")); ?>'}else{if(i==="phone"&&(!p.match(/^[0-9 \(\)\-]+$/)||p.replace(/[^0-9]/g,"").length!==10)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a phone # ( 10 digits w/possible hyphens,spaces,brackets ).", "s2member-front", "s2member")); ?>'}else{if(i==="uszip"&&!p.match(/^[0-9]{5}(-[0-9]{4})?$/)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a US zipcode ( 5-9 digits w/possible hyphen ).", "s2member-front", "s2member")); ?>'}else{if(i==="cazip"&&!p.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a Canadian zipcode ( 6 alpha-numerics w/possible space ).", "s2member-front", "s2member")); ?>'}else{if(i==="uczip"&&!p.match(/^[0-9]{5}(-[0-9]{4})?$/)&&!p.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a zipcode ( either a US or Canadian zipcode ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-spaces-punctuation-([0-9]+)(-e)?$/)&&!p.match(/^[a-z 0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics, spaces & punctuation only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-spaces-([0-9]+)(-e)?$/)&&!p.match(/^[a-z 0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & spaces only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-punctuation-([0-9]+)(-e)?$/)&&!p.match(/^[a-z0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & punctuation only ( no spaces ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-([0-9]+)(-e)?$/)&&!p.match(/^[a-z0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics only ( no spaces/punctuation ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphabetics-([0-9]+)(-e)?$/)&&!p.match(/^[a-z]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphabetics only ( no digits/spaces/punctuation ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^numerics-([0-9]+)(-e)?$/)&&!p.match(/^[0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use numeric digits only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^(any|alphanumerics-spaces-punctuation|alphanumerics-spaces|alphanumerics-punctuation|alphanumerics|alphabetics|numerics)-([0-9]+)(-e)?$/)){var k=i.split("-"),e=Number(k[1]),g=(k.length>2&&k[2]==="e")?true:false;if(g&&p.length!==e){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be exactly %s %s.", "s2member-front", "s2member")); ?>',e,((k[0]==="numerics")?((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>'):((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')))}else{if(p.length<e){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be at least %s %s.", "s2member-front", "s2member")); ?>',e,((k[0]==="numerics")?((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>'):((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')))}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return""};ws_plugin__s2member_animateProcessingConfig={originalText:"",interval:null,speed:100},ws_plugin__s2member_animateProcessing=function(d,c){if(d instanceof jQuery){if(c){clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);if(ws_plugin__s2member_animateProcessingConfig.originalText){d.val(ws_plugin__s2member_animateProcessingConfig.originalText)}return}d.first().each(function(){var g=b(this),f=0,e="r",h=[".","..","..."];ws_plugin__s2member_animateProcessingConfig.originalText=g.val();clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);ws_plugin__s2member_animateProcessingConfig.interval=setInterval(function(){if(e==="r"){if(f+1<=h.length-1){f=f+1,e="r"}else{f=f-1,e="l"}}else{if(e==="l"){if(f-1>=0){f=f-1,e="l"}else{f=f+1,e="r"}}}for(var j=h[f],i=h[f].length;i<h.length;i++){j+=" "}g.val('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Processing", "s2member-front", "s2member")); ?>'+j)},ws_plugin__s2member_animateProcessingConfig.speed)})}}});
1
+ jQuery(document).ready(function(b){ws_plugin__s2member_uniqueFilesDownloaded=[];var a='<?php echo c_ws_plugin__s2member_utils_conds::bp_is_installed ("query-active-plugins") ? "1" : ""; ?>';if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN&&S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY<S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED){b('a[href*="s2member_file_download"], a[href*="s2member-file"').click(function(){if(!this.href.match(/s2member_file_download_key\=(.+)/i)){var d='<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Confirm File Download —", "s2member-front", "s2member")); ?>\n\n';d+=b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`ve downloaded %s protected %s in the last %s.", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY,((S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("file", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("files", "s2member-front", "s2member")); ?>'),((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("24 hours", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("%s days", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS)))+"\n\n";d+=(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to UNLIMITED downloads though ( so, no worries ).", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to %s unique %s %s.", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED,((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("download", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("downloads", "s2member-front", "s2member")); ?>'),((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("each day", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("every %s-day period", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS)));if(this.href.match(/s2member[_\-]skip[_\-]confirmation/i)&&!this.href.match(/s2member[_\-]skip[_\-]confirmation[\=\-](0|no|false)/i)||confirm(d)){if(b.inArray(this.href,ws_plugin__s2member_uniqueFilesDownloaded)===-1){ws_plugin__s2member_uniqueFilesDownloaded.push(this.href),S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY++}return true}else{return false}}else{return true}})}if(!location.href.match(/\/wp-admin(\/|$)/)){b("input#ws-plugin--s2member-profile-password1, input#ws-plugin--s2member-profile-password2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#ws-plugin--s2member-profile-login"),b("input#ws-plugin--s2member-profile-password1"),b("input#ws-plugin--s2member-profile-password2"),b("div#ws-plugin--s2member-profile-password-strength"))});b("form#ws-plugin--s2member-profile").submit(function(){var e=this,d="",c="",i="";var g=b("input#ws-plugin--s2member-profile-password1",e);var f=b("input#ws-plugin--s2member-profile-password2",e);var h=b("input#ws-plugin--s2member-profile-submit",e);b(":input",e).each(function(){var j=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(j&&(d=b.trim(b('label[for="'+j+'"]',e).first().children("strong").first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}});if(i=b.trim(i)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+i);return false}else{if(b.trim(g.val())&&b.trim(g.val())!==b.trim(f.val())){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');return false}else{if(b.trim(g.val())&&b.trim(g.val()).length<6){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');return false}}}ws_plugin__s2member_animateProcessing(h);return true})}if(location.href.match(/\/wp-signup\.php/)){b("div#content > div.mu_register > form#setupform").submit(function(){var e=this,d="",c="",g="";b("input#user_email",e).attr("data-expected","email");var f=b('p.submit input[type="submit"]',e);b("input#user_name, input#user_email, input#blogname, input#blog_title, input#captcha_code",e).attr({"aria-required":"true"});b(":input",e).each(function(){var h=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(h&&(d=b.trim(b('label[for="'+h+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){g+=c+"\n\n"}}});if(g=b.trim(g)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+g);return false}ws_plugin__s2member_animateProcessing(f);return true})}if(location.href.match(/\/wp-login\.php/)){b("input#ws-plugin--s2member-custom-reg-field-user-pass1, input#ws-plugin--s2member-custom-reg-field-user-pass2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#user_login"),b("input#ws-plugin--s2member-custom-reg-field-user-pass1"),b("input#ws-plugin--s2member-custom-reg-field-user-pass2"),b("div#ws-plugin--s2member-custom-reg-field-user-pass-strength"))});b("div#login > form#registerform input#wp-submit").attr("tabindex","1000");b("div#login > form#registerform").submit(function(){var e=this,d="",c="",i="";b("input#user_email",e).attr("data-expected","email");var h=b('input#ws-plugin--s2member-custom-reg-field-user-pass1[aria-required="true"]',e);var f=b("input#ws-plugin--s2member-custom-reg-field-user-pass2",e);var g=b("input#wp-submit",e);b("input#user_login, input#user_email, input#captcha_code",e).attr({"aria-required":"true"});b(":input",e).each(function(){var j=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(b.inArray(j,["user_login","user_email","captcha_code"])!==-1){if((d=b.trim(b(this).parent("label").text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}}else{if(j&&(d=b.trim(b('label[for="'+j+'"]',e).first().children("span").first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}}});if(i=b.trim(i)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+i);return false}else{if(h.length&&b.trim(h.val())!==b.trim(f.val())){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');return false}else{if(h.length&&b.trim(h.val()).length<6){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');return false}}}ws_plugin__s2member_animateProcessing(g);return true})}if(location.href.match(/\/wp-admin\/(user\/)?profile\.php/)){b("form#your-profile").submit(function(){var e=this,d="",c="",f="";b("input#email",e).attr("data-expected","email");b(':input[id^="ws-plugin--s2member-profile-"]',e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true})}if(a){b("body.registration form div#ws-plugin--s2member-custom-reg-fields-4bp-section").closest("form").submit(function(){var e=this,d="",c="",f="";b("input#signup_email",e).attr("data-expected","email");b("input#signup_username, input#signup_email, input#signup_password, input#field_1",e).attr({"aria-required":"true"});b(":input",e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true});b("body.logged-in.profile.profile-edit :input.ws-plugin--s2member-profile-field-4bp").closest("form").submit(function(){var e=this,d="",c="",f="";b("input#field_1",e).attr({"aria-required":"true"});b(":input",e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true})}ws_plugin__s2member_passwordStrength=function(d,f,e,c){if(d instanceof jQuery&&f instanceof jQuery&&e instanceof jQuery&&c instanceof jQuery&&typeof passwordStrength==="function"&&typeof pwsL10n==="object"){c.removeClass("ws-plugin--s2member-password-strength-short ws-plugin--s2member-password-strength-bad ws-plugin--s2member-password-strength-good ws-plugin--s2member-password-strength-strong ws-plugin--s2member-password-strength-mismatch");switch(passwordStrength(f.val(),d.val(),e.val())){case 1:c.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"]);break;case 2:c.addClass("ws-plugin--s2member-password-strength-bad").html(pwsL10n.bad);break;case 3:c.addClass("ws-plugin--s2member-password-strength-good").html(pwsL10n.good);break;case 4:c.addClass("ws-plugin--s2member-password-strength-strong").html(pwsL10n.strong);break;case 5:c.addClass("ws-plugin--s2member-password-strength-mismatch").html(pwsL10n.mismatch);break;default:c.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"])}}return};ws_plugin__s2member_validationErrors=function(o,n,d,j,i){if(typeof o==="string"&&o&&typeof n==="object"&&typeof d==="object"){if(typeof n.tagName==="string"&&n.tagName.match(/^(input|textarea|select)$/i)&&!n.disabled){var q=n.tagName.toLowerCase(),m=b(n),l=b.trim(m.attr("type")).toLowerCase(),c=b.trim(m.attr("name")),p=m.val();var j=(typeof j==="boolean")?j:(m.attr("aria-required")==="true"),i=(typeof i==="string")?i:b.trim(m.attr("data-expected"));var h=('<?php echo strlen($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"]); ?>'>0)?true:false;var f=new RegExp('^(<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (implode ("|", preg_split ("/[\r\n\t ;,]+/", preg_quote ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"], "/")))); ?>)@',"i");if(q==="input"&&l==="checkbox"&&c.match(/\[\]$/)){if(typeof n.id==="string"&&n.id.match(/-0$/)){if(j&&!b('input[name="'+c.replace(/([\[\]])/g,"$1")+'"]:checked',d).length){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please check at least one of the boxes.", "s2member-front", "s2member")); ?>'}}}else{if(q==="input"&&l==="checkbox"){if(j&&!n.checked){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Required. This box must be checked.", "s2member-front", "s2member")); ?>'}}else{if(q==="input"&&l==="radio"){if(typeof n.id==="string"&&n.id.match(/-0$/)){if(j&&!b('input[name="'+c.replace(/([\[\]])/g,"$1")+'"]:checked',d).length){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select one of the options.", "s2member-front", "s2member")); ?>'}}}else{if(q==="select"&&m.attr("multiple")){if(j&&(!(p instanceof Array)||!p.length)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select at least one of the options.", "s2member-front", "s2member")); ?>'}}else{if(typeof p!=="string"||(j&&!(p=b.trim(p)).length)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("This is a required field, please try again.", "s2member-front", "s2member")); ?>'}else{if((p=b.trim(p)).length&&((q==="input"&&l.match(/^(text|password)$/i))||q==="textarea")&&typeof i==="string"&&i.length){if(i==="numeric-wp-commas"&&(!p.match(/^[0-9\.,]+$/)||isNaN(p.replace(/,/g,"")))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, commas allowed ).", "s2member-front", "s2member")); ?>'}else{if(i==="numeric"&&(!p.match(/^[0-9\.]+$/)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, no commas ).", "s2member-front", "s2member")); ?>'}else{if(i==="integer"&&(!p.match(/^[0-9]+$/)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer ( a whole number, without any decimals ).", "s2member-front", "s2member")); ?>'}else{if(i==="integer-gt-0"&&(!p.match(/^[0-9]+$/)||isNaN(p)||p<=0)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer > 0 ( whole number, no decimals, greater than 0 ).", "s2member-front", "s2member")); ?>'}else{if(i==="float"&&(!p.match(/^[0-9\.]+$/)||!p.match(/[0-9]/)||!p.match(/\./)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float ( floating point number, decimals required ).", "s2member-front", "s2member")); ?>'}else{if(i==="float-gt-0"&&(!p.match(/^[0-9\.]+$/)||!p.match(/[0-9]/)||!p.match(/\./)||isNaN(p)||p<=0)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float > 0 ( floating point number, decimals required, greater than 0 ).", "s2member-front", "s2member")); ?>'}else{if(i==="date"&&!p.match(/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a date ( required date format: dd/mm/yyyy ).", "s2member-front", "s2member")); ?>'}else{if(i==="email"&&!p.match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a valid email address.", "s2member-front", "s2member")); ?>'}else{if(i==="email"&&h&&p.match(f)){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use a personal email address.\nAddresses like <%s@> are problematic.", "s2member-front", "s2member")); ?>',p.split("@")[0])}else{if(i==="url"&&!p.match(/^http(s?)\:\/\/(.{5,})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a full URL ( starting with http or https ).", "s2member-front", "s2member")); ?>'}else{if(i==="domain"&&!p.match(/^([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a domain name ( domain name only, without http ).", "s2member-front", "s2member")); ?>'}else{if(i==="phone"&&(!p.match(/^[0-9 \(\)\-]+$/)||p.replace(/[^0-9]/g,"").length!==10)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a phone # ( 10 digits w/possible hyphens,spaces,brackets ).", "s2member-front", "s2member")); ?>'}else{if(i==="uszip"&&!p.match(/^[0-9]{5}(-[0-9]{4})?$/)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a US zipcode ( 5-9 digits w/possible hyphen ).", "s2member-front", "s2member")); ?>'}else{if(i==="cazip"&&!p.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a Canadian zipcode ( 6 alpha-numerics w/possible space ).", "s2member-front", "s2member")); ?>'}else{if(i==="uczip"&&!p.match(/^[0-9]{5}(-[0-9]{4})?$/)&&!p.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a zipcode ( either a US or Canadian zipcode ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-spaces-punctuation-([0-9]+)(-e)?$/)&&!p.match(/^[a-z 0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics, spaces & punctuation only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-spaces-([0-9]+)(-e)?$/)&&!p.match(/^[a-z 0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & spaces only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-punctuation-([0-9]+)(-e)?$/)&&!p.match(/^[a-z0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & punctuation only ( no spaces ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-([0-9]+)(-e)?$/)&&!p.match(/^[a-z0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics only ( no spaces/punctuation ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphabetics-([0-9]+)(-e)?$/)&&!p.match(/^[a-z]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphabetics only ( no digits/spaces/punctuation ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^numerics-([0-9]+)(-e)?$/)&&!p.match(/^[0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use numeric digits only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^(any|alphanumerics-spaces-punctuation|alphanumerics-spaces|alphanumerics-punctuation|alphanumerics|alphabetics|numerics)-([0-9]+)(-e)?$/)){var k=i.split("-"),e=Number(k[1]),g=(k.length>2&&k[2]==="e")?true:false;if(g&&p.length!==e){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be exactly %s %s.", "s2member-front", "s2member")); ?>',e,((k[0]==="numerics")?((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>'):((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')))}else{if(p.length<e){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be at least %s %s.", "s2member-front", "s2member")); ?>',e,((k[0]==="numerics")?((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>'):((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')))}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return""};ws_plugin__s2member_animateProcessingConfig={originalText:"",interval:null,speed:100},ws_plugin__s2member_animateProcessing=function(d,c){if(d instanceof jQuery){if(c){clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);if(ws_plugin__s2member_animateProcessingConfig.originalText){d.val(ws_plugin__s2member_animateProcessingConfig.originalText)}return}d.first().each(function(){var g=b(this),f=0,e="r",h=[".","..","..."];ws_plugin__s2member_animateProcessingConfig.originalText=g.val();clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);ws_plugin__s2member_animateProcessingConfig.interval=setInterval(function(){if(e==="r"){if(f+1<=h.length-1){f=f+1,e="r"}else{f=f-1,e="l"}}else{if(e==="l"){if(f-1>=0){f=f-1,e="l"}else{f=f+1,e="r"}}}for(var j=h[f],i=h[f].length;i<h.length;i++){j+=" "}g.val('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Processing", "s2member-front", "s2member")); ?>'+j)},ws_plugin__s2member_animateProcessingConfig.speed)})}}});
includes/s2member.css CHANGED
@@ -86,6 +86,7 @@ div#content > div.mu_register h2
86
  width: 100%; /* Expand to 100%. */
87
  }
88
  div#content > div.mu_register > form#setupform input[type = "text"],
 
89
  div#content > div.mu_register > form#setupform input[type = "password"],
90
  div#content > div.mu_register > form#setupform input[type = "submit"],
91
  div#content > div.mu_register > form#setupform textarea,
@@ -442,6 +443,7 @@ If you're using a `PriMo Theme`, you can use:
442
  See: http://www.primothemes.com/
443
  */
444
  body.logged-in.profile.profile-edit form#profile-edit-form div.editfield input[type = "text"],
 
445
  body.logged-in.profile.profile-edit form input.ws-plugin--s2member-profile-field-4bp[type = "text"],
446
  body.logged-in.profile.profile-edit form input.ws-plugin--s2member-profile-field-4bp[type = "password"],
447
  body.logged-in.profile.profile-edit form textarea.ws-plugin--s2member-profile-field-4bp,
86
  width: 100%; /* Expand to 100%. */
87
  }
88
  div#content > div.mu_register > form#setupform input[type = "text"],
89
+ div#content > div.mu_register > form#setupform input[type = "email"],
90
  div#content > div.mu_register > form#setupform input[type = "password"],
91
  div#content > div.mu_register > form#setupform input[type = "submit"],
92
  div#content > div.mu_register > form#setupform textarea,
443
  See: http://www.primothemes.com/
444
  */
445
  body.logged-in.profile.profile-edit form#profile-edit-form div.editfield input[type = "text"],
446
+ body.logged-in.profile.profile-edit form#profile-edit-form div.editfield input[type = "email"],
447
  body.logged-in.profile.profile-edit form input.ws-plugin--s2member-profile-field-4bp[type = "text"],
448
  body.logged-in.profile.profile-edit form input.ws-plugin--s2member-profile-field-4bp[type = "password"],
449
  body.logged-in.profile.profile-edit form textarea.ws-plugin--s2member-profile-field-4bp,
includes/s2member.js CHANGED
@@ -282,7 +282,7 @@ jQuery(document).ready (function($)
282
  /*
283
  Attach form submission handler to `/profile/edit/` for BuddyPress.
284
  */
285
- $('body.logged-in.profile.profile-edit input.ws-plugin--s2member-profile-field-4bp[type = "text"]').closest ('form').submit (function()
286
  {
287
  var context = this, label = '', error = '', errors = '';
288
  /**/
282
  /*
283
  Attach form submission handler to `/profile/edit/` for BuddyPress.
284
  */
285
+ $('body.logged-in.profile.profile-edit :input.ws-plugin--s2member-profile-field-4bp').closest ('form').submit (function()
286
  {
287
  var context = this, label = '', error = '', errors = '';
288
  /**/
includes/syscon.inc.php CHANGED
@@ -18,7 +18,7 @@
18
  * @since 3.0
19
  */
20
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
21
- exit ("Do not access this file directly.");
22
  /*
23
  Determine the directory.
24
  */
@@ -68,12 +68,12 @@ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["streaming_file_extns"] = array_unique
68
  /*
69
  Configure directory and .htaccess for files protected by s2Member.
70
  */
71
- $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] = apply_filters ("ws_plugin__s2member_files_dir", dirname (dirname (__FILE__)) . "-files" . ((stripos (PHP_OS, "win") === 0 && (!function_exists ("apache_get_version") || apache_get_version () === false)) ? "/app_data" : ""));
72
  $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir_htaccess"] = dirname (__FILE__) . "/templates/cfg-files/s2member-files.php";
73
  /*
74
  Configure the directory for logs protected by s2Member.
75
  */
76
- $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"] = apply_filters ("ws_plugin__s2member_logs_dir", dirname (dirname (__FILE__)) . "-logs" . ((stripos (PHP_OS, "win") === 0 && (!function_exists ("apache_get_version") || apache_get_version () === false)) ? "/app_data" : ""));
77
  $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir_htaccess"] = dirname (__FILE__) . "/templates/cfg-files/s2member-logs.php";
78
  /*
79
  Configure the global reCaptcha for ( www.s2-all-domains.com ). These public/private keys work on any installation.
@@ -340,7 +340,7 @@ if (!function_exists ("ws_plugin__s2member_configure_options_and_their_defaults"
340
  foreach ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"] as $key => &$value)
341
  {
342
  if (!isset ($default_options[$key]) && !preg_match ("/^pro_/", $key))
343
- unset ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"][$key]);
344
  /**/
345
  else if ($key === "options_checksum" && (!is_string ($value) || !strlen ($value)))
346
  $value = $default_options[$key];
18
  * @since 3.0
19
  */
20
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
21
+ exit("Do not access this file directly.");
22
  /*
23
  Determine the directory.
24
  */
68
  /*
69
  Configure directory and .htaccess for files protected by s2Member.
70
  */
71
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] = apply_filters ("ws_plugin__s2member_files_dir", dirname (dirname (__FILE__)) . "-files" . ((stripos (PHP_OS, "win") === 0 && stripos ($_SERVER["SERVER_SOFTWARE"], "apache") === false) ? "/app_data" : ""));
72
  $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir_htaccess"] = dirname (__FILE__) . "/templates/cfg-files/s2member-files.php";
73
  /*
74
  Configure the directory for logs protected by s2Member.
75
  */
76
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"] = apply_filters ("ws_plugin__s2member_logs_dir", dirname (dirname (__FILE__)) . "-logs" . ((stripos (PHP_OS, "win") === 0 && stripos ($_SERVER["SERVER_SOFTWARE"], "apache") === false) ? "/app_data" : ""));
77
  $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir_htaccess"] = dirname (__FILE__) . "/templates/cfg-files/s2member-logs.php";
78
  /*
79
  Configure the global reCaptcha for ( www.s2-all-domains.com ). These public/private keys work on any installation.
340
  foreach ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"] as $key => &$value)
341
  {
342
  if (!isset ($default_options[$key]) && !preg_match ("/^pro_/", $key))
343
+ unset($GLOBALS["WS_PLUGIN__"]["s2member"]["o"][$key]);
344
  /**/
345
  else if ($key === "options_checksum" && (!is_string ($value) || !strlen ($value)))
346
  $value = $default_options[$key];
includes/templates/cfg-files/s2member-files.php CHANGED
@@ -8,7 +8,7 @@ $ws_plugin__s2member_temp_s_base = (!empty ($base)) ? $base : c_ws_plugin__s2mem
8
  /* Do NOT use ``site`` URL. Must use the `home` URL here, because that's what WordPress® uses in its own `mod_rewrite` implementation. */
9
  ?>
10
 
11
- Options +FollowSymLinks -MultiViews
12
 
13
  <IfModule mod_rewrite.c>
14
  RewriteEngine On
8
  /* Do NOT use ``site`` URL. Must use the `home` URL here, because that's what WordPress® uses in its own `mod_rewrite` implementation. */
9
  ?>
10
 
11
+ Options +FollowSymLinks -MultiViews -Indexes
12
 
13
  <IfModule mod_rewrite.c>
14
  RewriteEngine On
includes/translations/s2member.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the s2Member package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: s2Member 111017\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/.__s2member\n"
7
- "POT-Creation-Date: 2011-10-17 18:16:12+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -77,7 +77,7 @@ msgid "as a Member"
77
  msgstr ""
78
 
79
  #: s2member/includes/classes/files-in.inc.php:91
80
- #: s2member/includes/classes/files-in.inc.php:230
81
  msgctxt "s2member-front"
82
  msgid "<strong>404: Sorry, file not found.</strong> Please contact Support for assistance."
83
  msgstr ""
@@ -92,17 +92,17 @@ msgctxt "s2member-front"
92
  msgid "<strong>503: Basic File Downloads are NOT enabled yet.</strong> Please contact Support for assistance. If you are the site owner, please configure: <code>s2Member -> Download Options -> Basic Download Restrictions</code>."
93
  msgstr ""
94
 
95
- #: s2member/includes/classes/files-in.inc.php:369
96
  msgctxt "s2member-front"
97
  msgid "<strong>503: Access denied.</strong> Invalid File Download specs."
98
  msgstr ""
99
 
100
- #: s2member/includes/classes/files-in.inc.php:455
101
  msgctxt "s2member-front"
102
  msgid "Members Only"
103
  msgstr ""
104
 
105
- #: s2member/includes/classes/files-in.inc.php:461
106
  msgctxt "s2member-front"
107
  msgid "<strong>401:</strong> Sorry, access denied."
108
  msgstr ""
@@ -111,12 +111,12 @@ msgstr ""
111
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
112
  #. `%s` if you like.
113
 
114
- #: s2member/includes/classes/files-in.inc.php:599
115
  msgctxt "s2member-admin"
116
  msgid "Unable to update existing Amazon® S3 Cross-Domain Policy. %s"
117
  msgstr ""
118
 
119
- #: s2member/includes/classes/files-in.inc.php:602
120
  msgctxt "s2member-admin"
121
  msgid "Unable to update existing Amazon® S3 Cross-Domain Policy. Connection failed."
122
  msgstr ""
@@ -125,12 +125,12 @@ msgstr ""
125
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
126
  #. `%s` if you like.
127
 
128
- #: s2member/includes/classes/files-in.inc.php:606
129
  msgctxt "s2member-admin"
130
  msgid "Unable to update existing Amazon® S3 Bucket Policy. %s"
131
  msgstr ""
132
 
133
- #: s2member/includes/classes/files-in.inc.php:609
134
  msgctxt "s2member-admin"
135
  msgid "Unable to update existing Amazon® S3 Bucket Policy. Connection failed."
136
  msgstr ""
@@ -139,17 +139,17 @@ msgstr ""
139
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
140
  #. `%s` if you like.
141
 
142
- #: s2member/includes/classes/files-in.inc.php:613
143
  msgctxt "s2member-admin"
144
  msgid "Unable to update existing Amazon® S3 Bucket ACLs. %s"
145
  msgstr ""
146
 
147
- #: s2member/includes/classes/files-in.inc.php:616
148
  msgctxt "s2member-admin"
149
  msgid "Unable to update existing Amazon® S3 Bucket ACLs. Connection failed."
150
  msgstr ""
151
 
152
- #: s2member/includes/classes/files-in.inc.php:619
153
  msgctxt "s2member-admin"
154
  msgid "Unable to acquire/read existing Amazon® S3 Bucket ACLs. Unexpected response."
155
  msgstr ""
@@ -158,22 +158,22 @@ msgstr ""
158
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
159
  #. `%s` if you like.
160
 
161
- #: s2member/includes/classes/files-in.inc.php:623
162
  msgctxt "s2member-admin"
163
  msgid "Unable to acquire existing Amazon® S3 Bucket ACLs. %s"
164
  msgstr ""
165
 
166
- #: s2member/includes/classes/files-in.inc.php:626
167
  msgctxt "s2member-admin"
168
  msgid "Unable to acquire existing Amazon® S3 Bucket ACLs. Connection failed."
169
  msgstr ""
170
 
171
- #: s2member/includes/classes/files-in.inc.php:629
172
  msgctxt "s2member-admin"
173
  msgid "Unable to auto-configure existing Amazon® S3 Bucket ACLs. Incomplete Amazon® S3 configuration options. Missing one of: Amazon® S3 Bucket, Access Key, or Secret Key."
174
  msgstr ""
175
 
176
- #: s2member/includes/classes/files-in.inc.php:731
177
  msgctxt "s2member-admin"
178
  msgid "Unable to delete existing Amazon® CloudFront Downloads Distro. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
179
  msgstr ""
@@ -182,12 +182,12 @@ msgstr ""
182
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
183
  #. exclude `%s` if you like.
184
 
185
- #: s2member/includes/classes/files-in.inc.php:738
186
  msgctxt "s2member-admin"
187
  msgid "Unable to delete existing Amazon® CloudFront Downloads Distro. %s"
188
  msgstr ""
189
 
190
- #: s2member/includes/classes/files-in.inc.php:750
191
  msgctxt "s2member-admin"
192
  msgid "Unable to delete existing Amazon® CloudFront Streaming Distro. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
193
  msgstr ""
@@ -196,7 +196,7 @@ msgstr ""
196
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
197
  #. exclude `%s` if you like.
198
 
199
- #: s2member/includes/classes/files-in.inc.php:757
200
  msgctxt "s2member-admin"
201
  msgid "Unable to delete existing Amazon® CloudFront Streaming Distro. %s"
202
  msgstr ""
@@ -205,8 +205,8 @@ msgstr ""
205
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
206
  #. exclude `%s` if you like.
207
 
208
- #: s2member/includes/classes/files-in.inc.php:773
209
- #: s2member/includes/classes/files-in.inc.php:955
210
  msgctxt "s2member-admin"
211
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. %s"
212
  msgstr ""
@@ -215,12 +215,12 @@ msgstr ""
215
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
216
  #. `%s` if you like.
217
 
218
- #: s2member/includes/classes/files-in.inc.php:812
219
  msgctxt "s2member-admin"
220
  msgid "Unable to update existing Amazon® S3 ACLs. %s"
221
  msgstr ""
222
 
223
- #: s2member/includes/classes/files-in.inc.php:815
224
  msgctxt "s2member-admin"
225
  msgid "Unable to update existing Amazon® S3 ACLs. Connection failed."
226
  msgstr ""
@@ -229,14 +229,14 @@ msgstr ""
229
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
230
  #. exclude `%s` if you like.
231
 
232
- #: s2member/includes/classes/files-in.inc.php:819
233
- #: s2member/includes/classes/files-in.inc.php:1243
234
  msgctxt "s2member-admin"
235
  msgid "Unable to create Amazon® CloudFront Streaming Distro. %s"
236
  msgstr ""
237
 
238
- #: s2member/includes/classes/files-in.inc.php:822
239
- #: s2member/includes/classes/files-in.inc.php:1245
240
  msgctxt "s2member-admin"
241
  msgid "Unable to create Amazon® CloudFront Streaming Distro. Connection failed."
242
  msgstr ""
@@ -245,14 +245,14 @@ msgstr ""
245
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
246
  #. exclude `%s` if you like.
247
 
248
- #: s2member/includes/classes/files-in.inc.php:826
249
- #: s2member/includes/classes/files-in.inc.php:1222
250
  msgctxt "s2member-admin"
251
  msgid "Unable to create Amazon® CloudFront Downloads Distro. %s"
252
  msgstr ""
253
 
254
- #: s2member/includes/classes/files-in.inc.php:829
255
- #: s2member/includes/classes/files-in.inc.php:1224
256
  msgctxt "s2member-admin"
257
  msgid "Unable to create Amazon® CloudFront Downloads Distro. Connection failed."
258
  msgstr ""
@@ -261,19 +261,19 @@ msgstr ""
261
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
262
  #. exclude `%s` if you like.
263
 
264
- #: s2member/includes/classes/files-in.inc.php:833
265
- #: s2member/includes/classes/files-in.inc.php:1000
266
  msgctxt "s2member-admin"
267
  msgid "Unable to create Amazon® CloudFront Origin Access Identity. %s"
268
  msgstr ""
269
 
270
- #: s2member/includes/classes/files-in.inc.php:836
271
- #: s2member/includes/classes/files-in.inc.php:1003
272
  msgctxt "s2member-admin"
273
  msgid "Unable to create Amazon® CloudFront Origin Access Identity. Connection failed."
274
  msgstr ""
275
 
276
- #: s2member/includes/classes/files-in.inc.php:839
277
  msgctxt "s2member-admin"
278
  msgid "Unable to clear existing Amazon® CloudFront Origin Access Identity."
279
  msgstr ""
@@ -282,19 +282,19 @@ msgstr ""
282
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
283
  #. exclude `%s` if you like.
284
 
285
- #: s2member/includes/classes/files-in.inc.php:843
286
- #: s2member/includes/classes/files-in.inc.php:912
287
  msgctxt "s2member-admin"
288
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. %s"
289
  msgstr ""
290
 
291
- #: s2member/includes/classes/files-in.inc.php:846
292
- #: s2member/includes/classes/files-in.inc.php:915
293
  msgctxt "s2member-admin"
294
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. Connection failed."
295
  msgstr ""
296
 
297
- #: s2member/includes/classes/files-in.inc.php:849
298
  msgctxt "s2member-admin"
299
  msgid "Unable to clear existing Amazon® CloudFront Streaming Distro."
300
  msgstr ""
@@ -303,17 +303,17 @@ msgstr ""
303
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
304
  #. exclude `%s` if you like.
305
 
306
- #: s2member/includes/classes/files-in.inc.php:853
307
  msgctxt "s2member-admin"
308
  msgid "Unable to acquire existing Amazon® CloudFront Streaming Distro. %s"
309
  msgstr ""
310
 
311
- #: s2member/includes/classes/files-in.inc.php:856
312
  msgctxt "s2member-admin"
313
  msgid "Unable to acquire existing Amazon® CloudFront Streaming Distro. Connection failed."
314
  msgstr ""
315
 
316
- #: s2member/includes/classes/files-in.inc.php:859
317
  msgctxt "s2member-admin"
318
  msgid "Unable to clear existing Amazon® CloudFront Downloads Distro."
319
  msgstr ""
@@ -322,22 +322,22 @@ msgstr ""
322
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
323
  #. exclude `%s` if you like.
324
 
325
- #: s2member/includes/classes/files-in.inc.php:863
326
  msgctxt "s2member-admin"
327
  msgid "Unable to acquire existing Amazon® CloudFront Downloads Distro. %s"
328
  msgstr ""
329
 
330
- #: s2member/includes/classes/files-in.inc.php:866
331
  msgctxt "s2member-admin"
332
  msgid "Unable to acquire existing Amazon® CloudFront Downloads Distro. Connection failed."
333
  msgstr ""
334
 
335
- #: s2member/includes/classes/files-in.inc.php:869
336
  msgctxt "s2member-admin"
337
  msgid "Unable to auto-configure Amazon® CloudFront Distros. Incomplete Amazon® CloudFront configuration options. Missing of one: Amazon® CloudFront Private Key-Pair-ID, or Private Key file contents."
338
  msgstr ""
339
 
340
- #: s2member/includes/classes/files-in.inc.php:872
341
  msgctxt "s2member-admin"
342
  msgid "Unable to auto-configure Amazon® S3/CloudFront Distros. Incomplete Amazon® S3 configuration options. Missing one of: Amazon® S3 Bucket, Access Key, or Secret Key. You must provide s2Member with an Amazon® S3 configuration before enabling CloudFront."
343
  msgstr ""
@@ -346,34 +346,34 @@ msgstr ""
346
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
347
  #. exclude `%s` if you like.
348
 
349
- #: s2member/includes/classes/files-in.inc.php:908
350
  msgctxt "s2member-admin"
351
  msgid "Existing Amazon® CloudFront Origin Access Identity NOT found. %s"
352
  msgstr ""
353
 
354
- #: s2member/includes/classes/files-in.inc.php:918
355
  msgctxt "s2member-admin"
356
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. Invalid Access ID."
357
  msgstr ""
358
 
359
- #: s2member/includes/classes/files-in.inc.php:958
360
  msgctxt "s2member-admin"
361
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. Connection failed."
362
  msgstr ""
363
 
364
- #: s2member/includes/classes/files-in.inc.php:961
365
  msgctxt "s2member-admin"
366
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. Invalid Access ID, ETag, or XML config."
367
  msgstr ""
368
 
369
- #: s2member/includes/classes/files-in.inc.php:987
370
- #: s2member/includes/classes/files-in.inc.php:1210
371
- #: s2member/includes/classes/files-in.inc.php:1231
372
  msgctxt "s2member-admin"
373
  msgid "Created by s2Member, for S3 Bucket: %s."
374
  msgstr ""
375
 
376
- #: s2member/includes/classes/files-in.inc.php:996
377
  msgctxt "s2member-admin"
378
  msgid "Unable to create/read Amazon® CloudFront Origin Access Identity. Unexpected response."
379
  msgstr ""
@@ -382,7 +382,7 @@ msgstr ""
382
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
383
  #. exclude `%s` if you like.
384
 
385
- #: s2member/includes/classes/files-in.inc.php:1040
386
  msgctxt "s2member-admin"
387
  msgid "Existing Amazon® CloudFront Distro NOT found. %s"
388
  msgstr ""
@@ -391,17 +391,17 @@ msgstr ""
391
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
392
  #. exclude `%s` if you like.
393
 
394
- #: s2member/includes/classes/files-in.inc.php:1044
395
  msgctxt "s2member-admin"
396
  msgid "Unable to acquire existing Amazon® CloudFront Distro. %s"
397
  msgstr ""
398
 
399
- #: s2member/includes/classes/files-in.inc.php:1047
400
  msgctxt "s2member-admin"
401
  msgid "Unable to acquire existing Amazon® CloudFront Distro. Connection failed."
402
  msgstr ""
403
 
404
- #: s2member/includes/classes/files-in.inc.php:1050
405
  msgctxt "s2member-admin"
406
  msgid "Unable to acquire existing Amazon® CloudFront Distro. Invalid Distro ID and/or Distro type."
407
  msgstr ""
@@ -410,24 +410,24 @@ msgstr ""
410
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
411
  #. exclude `%s` if you like.
412
 
413
- #: s2member/includes/classes/files-in.inc.php:1094
414
- #: s2member/includes/classes/files-in.inc.php:1169
415
  msgctxt "s2member-admin"
416
  msgid "Unable to disable existing Amazon® CloudFront Distro. %s"
417
  msgstr ""
418
 
419
- #: s2member/includes/classes/files-in.inc.php:1097
420
- #: s2member/includes/classes/files-in.inc.php:1172
421
  msgctxt "s2member-admin"
422
  msgid "Unable to disable existing Amazon® CloudFront Distro. Connection failed."
423
  msgstr ""
424
 
425
- #: s2member/includes/classes/files-in.inc.php:1100
426
  msgctxt "s2member-admin"
427
  msgid "Existing Amazon® CloudFront Distro cannot be disabled at this time. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
428
  msgstr ""
429
 
430
- #: s2member/includes/classes/files-in.inc.php:1106
431
  msgctxt "s2member-admin"
432
  msgid "Unable to disable existing Amazon® CloudFront Distro. Invalid Distro ID, ETag, or XML config."
433
  msgstr ""
@@ -436,12 +436,12 @@ msgstr ""
436
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
437
  #. exclude `%s` if you like.
438
 
439
- #: s2member/includes/classes/files-in.inc.php:1151
440
  msgctxt "s2member-admin"
441
  msgid "Unable to delete existing Amazon® CloudFront Distro. %s"
442
  msgstr ""
443
 
444
- #: s2member/includes/classes/files-in.inc.php:1154
445
  msgctxt "s2member-admin"
446
  msgid "Unable to delete existing Amazon® CloudFront Distro. Connection failed."
447
  msgstr ""
@@ -450,7 +450,7 @@ msgstr ""
450
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
451
  #. exclude `%s` if you like.
452
 
453
- #: s2member/includes/classes/files-in.inc.php:1158
454
  msgctxt "s2member-admin"
455
  msgid "Existing Amazon® CloudFront Distro cannot be deleted at this time. Still in a `pending` state after having been disabled by s2Member. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
456
  msgstr ""
@@ -459,37 +459,37 @@ msgstr ""
459
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
460
  #. exclude `%s` if you like.
461
 
462
- #: s2member/includes/classes/files-in.inc.php:1162
463
  msgctxt "s2member-admin"
464
  msgid "Unable to check status of existing Amazon® CloudFront Distro. %s"
465
  msgstr ""
466
 
467
- #: s2member/includes/classes/files-in.inc.php:1165
468
  msgctxt "s2member-admin"
469
  msgid "Unable to check status of existing Amazon® CloudFront Distro. Connection failed."
470
  msgstr ""
471
 
472
- #: s2member/includes/classes/files-in.inc.php:1175
473
  msgctxt "s2member-admin"
474
  msgid "Existing Amazon® CloudFront Distro cannot be deleted at this time. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
475
  msgstr ""
476
 
477
- #: s2member/includes/classes/files-in.inc.php:1178
478
  msgctxt "s2member-admin"
479
  msgid "Unable to delete existing Amazon® CloudFront Distro. Invalid Distro ID or ETag."
480
  msgstr ""
481
 
482
- #: s2member/includes/classes/files-in.inc.php:1218
483
  msgctxt "s2member-admin"
484
  msgid "Unable to create/read Amazon® CloudFront Downloads Distro. Unexpected response."
485
  msgstr ""
486
 
487
- #: s2member/includes/classes/files-in.inc.php:1239
488
  msgctxt "s2member-admin"
489
  msgid "Unable to create/read Amazon® CloudFront Streaming Distro. Unexpected response."
490
  msgstr ""
491
 
492
- #: s2member/includes/classes/files-in.inc.php:1249
493
  msgctxt "s2member-admin"
494
  msgid "Unable to create Amazon® CloudFront Distro. Invalid Distro type."
495
  msgstr ""
@@ -499,23 +499,23 @@ msgctxt "s2member-front"
499
  msgid "<strong>503: Service Temporarily Unavailable</strong><br />Too many IP addresses accessing one secure area<em>!</em><br />Please contact Support if you need assistance."
500
  msgstr ""
501
 
502
- #: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:132
503
- #: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:160
504
  #: s2member/includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php:100
505
  msgctxt "s2member-front"
506
  msgid "Thank you! Your account has been updated."
507
  msgstr ""
508
 
509
- #: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:132
510
- #: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:160
511
- #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:180
512
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:226
513
  msgctxt "s2member-front"
514
  msgid "Thank you! You've been updated to:"
515
  msgstr ""
516
 
517
- #: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:132
518
- #: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:160
519
  #: s2member/includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php:100
520
  msgctxt "s2member-front"
521
  msgid "Please log back in now."
@@ -546,12 +546,12 @@ msgid "Check Your Email ( Then Click Here )"
546
  msgstr ""
547
 
548
  #: s2member/includes/classes/paypal-return-in-no-tx-data.inc.php:63
549
- #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:192
550
- #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:203
551
- #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:214
552
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:238
553
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:249
554
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:362
555
  #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:158
556
  #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:169
557
  #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:180
@@ -576,41 +576,41 @@ msgctxt "s2member-front"
576
  msgid "Continue ( Click Here )"
577
  msgstr ""
578
 
579
- #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:181
580
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:227
581
  #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:147
582
  msgctxt "s2member-front"
583
  msgid "Please Log Back In ( Click Here )"
584
  msgstr ""
585
 
586
- #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:191
587
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:237
588
  msgctxt "s2member-front"
589
  msgid "<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing."
590
  msgstr ""
591
 
592
- #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:202
593
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:248
594
  msgctxt "s2member-front"
595
  msgid "<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB."
596
  msgstr ""
597
 
598
- #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:213
599
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:361
600
  #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:190
601
  #: s2member/includes/classes/paypal-return-in-web-accept-sp.inc.php:131
602
  msgctxt "s2member-front"
603
  msgid "<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance."
604
  msgstr ""
605
 
606
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:321
607
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:344
608
  msgctxt "s2member-front"
609
  msgid "<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>"
610
  msgstr ""
611
 
612
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:322
613
- #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:345
614
  msgctxt "s2member-front"
615
  msgid "Please Register Now ( Click Here )"
616
  msgstr ""
@@ -685,7 +685,7 @@ msgstr ""
685
 
686
  #: s2member/includes/classes/profile-in.inc.php:78
687
  #: s2member/includes/classes/sc-profile-in.inc.php:94
688
- #: s2member-pro/includes/classes/login-widget.inc.php:115
689
  msgctxt "s2member-front"
690
  msgid "Username"
691
  msgstr ""
@@ -3617,57 +3617,57 @@ msgctxt "s2member-admin"
3617
  msgid "Invalid form configuration. Invalid \"rr, rra\" attributes. When \"rr\" ( Regular Recurring ) is 0 or 1, \"rra\" ( Recurring Retry Attempts ) must be >= 0."
3618
  msgstr ""
3619
 
3620
- #: s2member-pro/includes/classes/login-widget.inc.php:120
3621
  msgctxt "s2member-front"
3622
  msgid "Password"
3623
  msgstr ""
3624
 
3625
- #: s2member-pro/includes/classes/login-widget.inc.php:126
3626
  msgctxt "s2member-front"
3627
  msgid "signup now"
3628
  msgstr ""
3629
 
3630
- #: s2member-pro/includes/classes/login-widget.inc.php:127
3631
  msgctxt "s2member-front"
3632
  msgid "forgot password?"
3633
  msgstr ""
3634
 
3635
- #: s2member-pro/includes/classes/login-widget.inc.php:131
3636
  msgctxt "s2member-front"
3637
  msgid "Remember Me"
3638
  msgstr ""
3639
 
3640
- #: s2member-pro/includes/classes/login-widget.inc.php:136
3641
  msgctxt "s2member-front"
3642
  msgid "Log Me In"
3643
  msgstr ""
3644
 
3645
- #: s2member-pro/includes/classes/login-widget.inc.php:189
3646
  msgctxt "s2member-front"
3647
  msgid "My Account"
3648
  msgstr ""
3649
 
3650
- #: s2member-pro/includes/classes/login-widget.inc.php:190
3651
  msgctxt "s2member-front"
3652
  msgid "Please disable popup blockers and try again!"
3653
  msgstr ""
3654
 
3655
- #: s2member-pro/includes/classes/login-widget.inc.php:190
3656
  msgctxt "s2member-front"
3657
  msgid "Edit My Profile"
3658
  msgstr ""
3659
 
3660
- #: s2member-pro/includes/classes/login-widget.inc.php:191
3661
  msgctxt "s2member-front"
3662
  msgid "Logout"
3663
  msgstr ""
3664
 
3665
- #: s2member-pro/includes/classes/login-widget.inc.php:310
3666
  msgctxt "s2member-front"
3667
  msgid "Membership Login"
3668
  msgstr ""
3669
 
3670
- #: s2member-pro/includes/classes/login-widget.inc.php:310
3671
  msgctxt "s2member-front"
3672
  msgid "My Profile Summary"
3673
  msgstr ""
2
  # This file is distributed under the same license as the s2Member package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: s2Member 111029\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/.__s2member\n"
7
+ "POT-Creation-Date: 2011-10-29 23:51:45+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
77
  msgstr ""
78
 
79
  #: s2member/includes/classes/files-in.inc.php:91
80
+ #: s2member/includes/classes/files-in.inc.php:241
81
  msgctxt "s2member-front"
82
  msgid "<strong>404: Sorry, file not found.</strong> Please contact Support for assistance."
83
  msgstr ""
92
  msgid "<strong>503: Basic File Downloads are NOT enabled yet.</strong> Please contact Support for assistance. If you are the site owner, please configure: <code>s2Member -> Download Options -> Basic Download Restrictions</code>."
93
  msgstr ""
94
 
95
+ #: s2member/includes/classes/files-in.inc.php:391
96
  msgctxt "s2member-front"
97
  msgid "<strong>503: Access denied.</strong> Invalid File Download specs."
98
  msgstr ""
99
 
100
+ #: s2member/includes/classes/files-in.inc.php:477
101
  msgctxt "s2member-front"
102
  msgid "Members Only"
103
  msgstr ""
104
 
105
+ #: s2member/includes/classes/files-in.inc.php:483
106
  msgctxt "s2member-front"
107
  msgid "<strong>401:</strong> Sorry, access denied."
108
  msgstr ""
111
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
112
  #. `%s` if you like.
113
 
114
+ #: s2member/includes/classes/files-in.inc.php:621
115
  msgctxt "s2member-admin"
116
  msgid "Unable to update existing Amazon® S3 Cross-Domain Policy. %s"
117
  msgstr ""
118
 
119
+ #: s2member/includes/classes/files-in.inc.php:624
120
  msgctxt "s2member-admin"
121
  msgid "Unable to update existing Amazon® S3 Cross-Domain Policy. Connection failed."
122
  msgstr ""
125
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
126
  #. `%s` if you like.
127
 
128
+ #: s2member/includes/classes/files-in.inc.php:628
129
  msgctxt "s2member-admin"
130
  msgid "Unable to update existing Amazon® S3 Bucket Policy. %s"
131
  msgstr ""
132
 
133
+ #: s2member/includes/classes/files-in.inc.php:631
134
  msgctxt "s2member-admin"
135
  msgid "Unable to update existing Amazon® S3 Bucket Policy. Connection failed."
136
  msgstr ""
139
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
140
  #. `%s` if you like.
141
 
142
+ #: s2member/includes/classes/files-in.inc.php:635
143
  msgctxt "s2member-admin"
144
  msgid "Unable to update existing Amazon® S3 Bucket ACLs. %s"
145
  msgstr ""
146
 
147
+ #: s2member/includes/classes/files-in.inc.php:638
148
  msgctxt "s2member-admin"
149
  msgid "Unable to update existing Amazon® S3 Bucket ACLs. Connection failed."
150
  msgstr ""
151
 
152
+ #: s2member/includes/classes/files-in.inc.php:641
153
  msgctxt "s2member-admin"
154
  msgid "Unable to acquire/read existing Amazon® S3 Bucket ACLs. Unexpected response."
155
  msgstr ""
158
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
159
  #. `%s` if you like.
160
 
161
+ #: s2member/includes/classes/files-in.inc.php:645
162
  msgctxt "s2member-admin"
163
  msgid "Unable to acquire existing Amazon® S3 Bucket ACLs. %s"
164
  msgstr ""
165
 
166
+ #: s2member/includes/classes/files-in.inc.php:648
167
  msgctxt "s2member-admin"
168
  msgid "Unable to acquire existing Amazon® S3 Bucket ACLs. Connection failed."
169
  msgstr ""
170
 
171
+ #: s2member/includes/classes/files-in.inc.php:651
172
  msgctxt "s2member-admin"
173
  msgid "Unable to auto-configure existing Amazon® S3 Bucket ACLs. Incomplete Amazon® S3 configuration options. Missing one of: Amazon® S3 Bucket, Access Key, or Secret Key."
174
  msgstr ""
175
 
176
+ #: s2member/includes/classes/files-in.inc.php:753
177
  msgctxt "s2member-admin"
178
  msgid "Unable to delete existing Amazon® CloudFront Downloads Distro. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
179
  msgstr ""
182
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
183
  #. exclude `%s` if you like.
184
 
185
+ #: s2member/includes/classes/files-in.inc.php:760
186
  msgctxt "s2member-admin"
187
  msgid "Unable to delete existing Amazon® CloudFront Downloads Distro. %s"
188
  msgstr ""
189
 
190
+ #: s2member/includes/classes/files-in.inc.php:772
191
  msgctxt "s2member-admin"
192
  msgid "Unable to delete existing Amazon® CloudFront Streaming Distro. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
193
  msgstr ""
196
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
197
  #. exclude `%s` if you like.
198
 
199
+ #: s2member/includes/classes/files-in.inc.php:779
200
  msgctxt "s2member-admin"
201
  msgid "Unable to delete existing Amazon® CloudFront Streaming Distro. %s"
202
  msgstr ""
205
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
206
  #. exclude `%s` if you like.
207
 
208
+ #: s2member/includes/classes/files-in.inc.php:795
209
+ #: s2member/includes/classes/files-in.inc.php:977
210
  msgctxt "s2member-admin"
211
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. %s"
212
  msgstr ""
215
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
216
  #. `%s` if you like.
217
 
218
+ #: s2member/includes/classes/files-in.inc.php:834
219
  msgctxt "s2member-admin"
220
  msgid "Unable to update existing Amazon® S3 ACLs. %s"
221
  msgstr ""
222
 
223
+ #: s2member/includes/classes/files-in.inc.php:837
224
  msgctxt "s2member-admin"
225
  msgid "Unable to update existing Amazon® S3 ACLs. Connection failed."
226
  msgstr ""
229
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
230
  #. exclude `%s` if you like.
231
 
232
+ #: s2member/includes/classes/files-in.inc.php:841
233
+ #: s2member/includes/classes/files-in.inc.php:1265
234
  msgctxt "s2member-admin"
235
  msgid "Unable to create Amazon® CloudFront Streaming Distro. %s"
236
  msgstr ""
237
 
238
+ #: s2member/includes/classes/files-in.inc.php:844
239
+ #: s2member/includes/classes/files-in.inc.php:1267
240
  msgctxt "s2member-admin"
241
  msgid "Unable to create Amazon® CloudFront Streaming Distro. Connection failed."
242
  msgstr ""
245
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
246
  #. exclude `%s` if you like.
247
 
248
+ #: s2member/includes/classes/files-in.inc.php:848
249
+ #: s2member/includes/classes/files-in.inc.php:1244
250
  msgctxt "s2member-admin"
251
  msgid "Unable to create Amazon® CloudFront Downloads Distro. %s"
252
  msgstr ""
253
 
254
+ #: s2member/includes/classes/files-in.inc.php:851
255
+ #: s2member/includes/classes/files-in.inc.php:1246
256
  msgctxt "s2member-admin"
257
  msgid "Unable to create Amazon® CloudFront Downloads Distro. Connection failed."
258
  msgstr ""
261
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
262
  #. exclude `%s` if you like.
263
 
264
+ #: s2member/includes/classes/files-in.inc.php:855
265
+ #: s2member/includes/classes/files-in.inc.php:1022
266
  msgctxt "s2member-admin"
267
  msgid "Unable to create Amazon® CloudFront Origin Access Identity. %s"
268
  msgstr ""
269
 
270
+ #: s2member/includes/classes/files-in.inc.php:858
271
+ #: s2member/includes/classes/files-in.inc.php:1025
272
  msgctxt "s2member-admin"
273
  msgid "Unable to create Amazon® CloudFront Origin Access Identity. Connection failed."
274
  msgstr ""
275
 
276
+ #: s2member/includes/classes/files-in.inc.php:861
277
  msgctxt "s2member-admin"
278
  msgid "Unable to clear existing Amazon® CloudFront Origin Access Identity."
279
  msgstr ""
282
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
283
  #. exclude `%s` if you like.
284
 
285
+ #: s2member/includes/classes/files-in.inc.php:865
286
+ #: s2member/includes/classes/files-in.inc.php:934
287
  msgctxt "s2member-admin"
288
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. %s"
289
  msgstr ""
290
 
291
+ #: s2member/includes/classes/files-in.inc.php:868
292
+ #: s2member/includes/classes/files-in.inc.php:937
293
  msgctxt "s2member-admin"
294
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. Connection failed."
295
  msgstr ""
296
 
297
+ #: s2member/includes/classes/files-in.inc.php:871
298
  msgctxt "s2member-admin"
299
  msgid "Unable to clear existing Amazon® CloudFront Streaming Distro."
300
  msgstr ""
303
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
304
  #. exclude `%s` if you like.
305
 
306
+ #: s2member/includes/classes/files-in.inc.php:875
307
  msgctxt "s2member-admin"
308
  msgid "Unable to acquire existing Amazon® CloudFront Streaming Distro. %s"
309
  msgstr ""
310
 
311
+ #: s2member/includes/classes/files-in.inc.php:878
312
  msgctxt "s2member-admin"
313
  msgid "Unable to acquire existing Amazon® CloudFront Streaming Distro. Connection failed."
314
  msgstr ""
315
 
316
+ #: s2member/includes/classes/files-in.inc.php:881
317
  msgctxt "s2member-admin"
318
  msgid "Unable to clear existing Amazon® CloudFront Downloads Distro."
319
  msgstr ""
322
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
323
  #. exclude `%s` if you like.
324
 
325
+ #: s2member/includes/classes/files-in.inc.php:885
326
  msgctxt "s2member-admin"
327
  msgid "Unable to acquire existing Amazon® CloudFront Downloads Distro. %s"
328
  msgstr ""
329
 
330
+ #: s2member/includes/classes/files-in.inc.php:888
331
  msgctxt "s2member-admin"
332
  msgid "Unable to acquire existing Amazon® CloudFront Downloads Distro. Connection failed."
333
  msgstr ""
334
 
335
+ #: s2member/includes/classes/files-in.inc.php:891
336
  msgctxt "s2member-admin"
337
  msgid "Unable to auto-configure Amazon® CloudFront Distros. Incomplete Amazon® CloudFront configuration options. Missing of one: Amazon® CloudFront Private Key-Pair-ID, or Private Key file contents."
338
  msgstr ""
339
 
340
+ #: s2member/includes/classes/files-in.inc.php:894
341
  msgctxt "s2member-admin"
342
  msgid "Unable to auto-configure Amazon® S3/CloudFront Distros. Incomplete Amazon® S3 configuration options. Missing one of: Amazon® S3 Bucket, Access Key, or Secret Key. You must provide s2Member with an Amazon® S3 configuration before enabling CloudFront."
343
  msgstr ""
346
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
347
  #. exclude `%s` if you like.
348
 
349
+ #: s2member/includes/classes/files-in.inc.php:930
350
  msgctxt "s2member-admin"
351
  msgid "Existing Amazon® CloudFront Origin Access Identity NOT found. %s"
352
  msgstr ""
353
 
354
+ #: s2member/includes/classes/files-in.inc.php:940
355
  msgctxt "s2member-admin"
356
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. Invalid Access ID."
357
  msgstr ""
358
 
359
+ #: s2member/includes/classes/files-in.inc.php:980
360
  msgctxt "s2member-admin"
361
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. Connection failed."
362
  msgstr ""
363
 
364
+ #: s2member/includes/classes/files-in.inc.php:983
365
  msgctxt "s2member-admin"
366
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. Invalid Access ID, ETag, or XML config."
367
  msgstr ""
368
 
369
+ #: s2member/includes/classes/files-in.inc.php:1009
370
+ #: s2member/includes/classes/files-in.inc.php:1232
371
+ #: s2member/includes/classes/files-in.inc.php:1253
372
  msgctxt "s2member-admin"
373
  msgid "Created by s2Member, for S3 Bucket: %s."
374
  msgstr ""
375
 
376
+ #: s2member/includes/classes/files-in.inc.php:1018
377
  msgctxt "s2member-admin"
378
  msgid "Unable to create/read Amazon® CloudFront Origin Access Identity. Unexpected response."
379
  msgstr ""
382
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
383
  #. exclude `%s` if you like.
384
 
385
+ #: s2member/includes/classes/files-in.inc.php:1062
386
  msgctxt "s2member-admin"
387
  msgid "Existing Amazon® CloudFront Distro NOT found. %s"
388
  msgstr ""
391
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
392
  #. exclude `%s` if you like.
393
 
394
+ #: s2member/includes/classes/files-in.inc.php:1066
395
  msgctxt "s2member-admin"
396
  msgid "Unable to acquire existing Amazon® CloudFront Distro. %s"
397
  msgstr ""
398
 
399
+ #: s2member/includes/classes/files-in.inc.php:1069
400
  msgctxt "s2member-admin"
401
  msgid "Unable to acquire existing Amazon® CloudFront Distro. Connection failed."
402
  msgstr ""
403
 
404
+ #: s2member/includes/classes/files-in.inc.php:1072
405
  msgctxt "s2member-admin"
406
  msgid "Unable to acquire existing Amazon® CloudFront Distro. Invalid Distro ID and/or Distro type."
407
  msgstr ""
410
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
411
  #. exclude `%s` if you like.
412
 
413
+ #: s2member/includes/classes/files-in.inc.php:1116
414
+ #: s2member/includes/classes/files-in.inc.php:1191
415
  msgctxt "s2member-admin"
416
  msgid "Unable to disable existing Amazon® CloudFront Distro. %s"
417
  msgstr ""
418
 
419
+ #: s2member/includes/classes/files-in.inc.php:1119
420
+ #: s2member/includes/classes/files-in.inc.php:1194
421
  msgctxt "s2member-admin"
422
  msgid "Unable to disable existing Amazon® CloudFront Distro. Connection failed."
423
  msgstr ""
424
 
425
+ #: s2member/includes/classes/files-in.inc.php:1122
426
  msgctxt "s2member-admin"
427
  msgid "Existing Amazon® CloudFront Distro cannot be disabled at this time. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
428
  msgstr ""
429
 
430
+ #: s2member/includes/classes/files-in.inc.php:1128
431
  msgctxt "s2member-admin"
432
  msgid "Unable to disable existing Amazon® CloudFront Distro. Invalid Distro ID, ETag, or XML config."
433
  msgstr ""
436
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
437
  #. exclude `%s` if you like.
438
 
439
+ #: s2member/includes/classes/files-in.inc.php:1173
440
  msgctxt "s2member-admin"
441
  msgid "Unable to delete existing Amazon® CloudFront Distro. %s"
442
  msgstr ""
443
 
444
+ #: s2member/includes/classes/files-in.inc.php:1176
445
  msgctxt "s2member-admin"
446
  msgid "Unable to delete existing Amazon® CloudFront Distro. Connection failed."
447
  msgstr ""
450
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
451
  #. exclude `%s` if you like.
452
 
453
+ #: s2member/includes/classes/files-in.inc.php:1180
454
  msgctxt "s2member-admin"
455
  msgid "Existing Amazon® CloudFront Distro cannot be deleted at this time. Still in a `pending` state after having been disabled by s2Member. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
456
  msgstr ""
459
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
460
  #. exclude `%s` if you like.
461
 
462
+ #: s2member/includes/classes/files-in.inc.php:1184
463
  msgctxt "s2member-admin"
464
  msgid "Unable to check status of existing Amazon® CloudFront Distro. %s"
465
  msgstr ""
466
 
467
+ #: s2member/includes/classes/files-in.inc.php:1187
468
  msgctxt "s2member-admin"
469
  msgid "Unable to check status of existing Amazon® CloudFront Distro. Connection failed."
470
  msgstr ""
471
 
472
+ #: s2member/includes/classes/files-in.inc.php:1197
473
  msgctxt "s2member-admin"
474
  msgid "Existing Amazon® CloudFront Distro cannot be deleted at this time. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
475
  msgstr ""
476
 
477
+ #: s2member/includes/classes/files-in.inc.php:1200
478
  msgctxt "s2member-admin"
479
  msgid "Unable to delete existing Amazon® CloudFront Distro. Invalid Distro ID or ETag."
480
  msgstr ""
481
 
482
+ #: s2member/includes/classes/files-in.inc.php:1240
483
  msgctxt "s2member-admin"
484
  msgid "Unable to create/read Amazon® CloudFront Downloads Distro. Unexpected response."
485
  msgstr ""
486
 
487
+ #: s2member/includes/classes/files-in.inc.php:1261
488
  msgctxt "s2member-admin"
489
  msgid "Unable to create/read Amazon® CloudFront Streaming Distro. Unexpected response."
490
  msgstr ""
491
 
492
+ #: s2member/includes/classes/files-in.inc.php:1271
493
  msgctxt "s2member-admin"
494
  msgid "Unable to create Amazon® CloudFront Distro. Invalid Distro type."
495
  msgstr ""
499
  msgid "<strong>503: Service Temporarily Unavailable</strong><br />Too many IP addresses accessing one secure area<em>!</em><br />Please contact Support if you need assistance."
500
  msgstr ""
501
 
502
+ #: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:131
503
+ #: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:159
504
  #: s2member/includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php:100
505
  msgctxt "s2member-front"
506
  msgid "Thank you! Your account has been updated."
507
  msgstr ""
508
 
509
+ #: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:131
510
+ #: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:159
511
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:179
512
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:225
513
  msgctxt "s2member-front"
514
  msgid "Thank you! You've been updated to:"
515
  msgstr ""
516
 
517
+ #: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:131
518
+ #: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:159
519
  #: s2member/includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php:100
520
  msgctxt "s2member-front"
521
  msgid "Please log back in now."
546
  msgstr ""
547
 
548
  #: s2member/includes/classes/paypal-return-in-no-tx-data.inc.php:63
549
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:191
550
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:202
551
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:213
552
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:237
553
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:248
554
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:361
555
  #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:158
556
  #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:169
557
  #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:180
576
  msgid "Continue ( Click Here )"
577
  msgstr ""
578
 
579
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:180
580
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:226
581
  #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:147
582
  msgctxt "s2member-front"
583
  msgid "Please Log Back In ( Click Here )"
584
  msgstr ""
585
 
586
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:190
587
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:236
588
  msgctxt "s2member-front"
589
  msgid "<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing."
590
  msgstr ""
591
 
592
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:201
593
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:247
594
  msgctxt "s2member-front"
595
  msgid "<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB."
596
  msgstr ""
597
 
598
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:212
599
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:360
600
  #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:190
601
  #: s2member/includes/classes/paypal-return-in-web-accept-sp.inc.php:131
602
  msgctxt "s2member-front"
603
  msgid "<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance."
604
  msgstr ""
605
 
606
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:320
607
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:343
608
  msgctxt "s2member-front"
609
  msgid "<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>"
610
  msgstr ""
611
 
612
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:321
613
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:344
614
  msgctxt "s2member-front"
615
  msgid "Please Register Now ( Click Here )"
616
  msgstr ""
685
 
686
  #: s2member/includes/classes/profile-in.inc.php:78
687
  #: s2member/includes/classes/sc-profile-in.inc.php:94
688
+ #: s2member-pro/includes/classes/login-widget.inc.php:118
689
  msgctxt "s2member-front"
690
  msgid "Username"
691
  msgstr ""
3617
  msgid "Invalid form configuration. Invalid \"rr, rra\" attributes. When \"rr\" ( Regular Recurring ) is 0 or 1, \"rra\" ( Recurring Retry Attempts ) must be >= 0."
3618
  msgstr ""
3619
 
3620
+ #: s2member-pro/includes/classes/login-widget.inc.php:123
3621
  msgctxt "s2member-front"
3622
  msgid "Password"
3623
  msgstr ""
3624
 
3625
+ #: s2member-pro/includes/classes/login-widget.inc.php:129
3626
  msgctxt "s2member-front"
3627
  msgid "signup now"
3628
  msgstr ""
3629
 
3630
+ #: s2member-pro/includes/classes/login-widget.inc.php:130
3631
  msgctxt "s2member-front"
3632
  msgid "forgot password?"
3633
  msgstr ""
3634
 
3635
+ #: s2member-pro/includes/classes/login-widget.inc.php:134
3636
  msgctxt "s2member-front"
3637
  msgid "Remember Me"
3638
  msgstr ""
3639
 
3640
+ #: s2member-pro/includes/classes/login-widget.inc.php:139
3641
  msgctxt "s2member-front"
3642
  msgid "Log Me In"
3643
  msgstr ""
3644
 
3645
+ #: s2member-pro/includes/classes/login-widget.inc.php:192
3646
  msgctxt "s2member-front"
3647
  msgid "My Account"
3648
  msgstr ""
3649
 
3650
+ #: s2member-pro/includes/classes/login-widget.inc.php:193
3651
  msgctxt "s2member-front"
3652
  msgid "Please disable popup blockers and try again!"
3653
  msgstr ""
3654
 
3655
+ #: s2member-pro/includes/classes/login-widget.inc.php:193
3656
  msgctxt "s2member-front"
3657
  msgid "Edit My Profile"
3658
  msgstr ""
3659
 
3660
+ #: s2member-pro/includes/classes/login-widget.inc.php:194
3661
  msgctxt "s2member-front"
3662
  msgid "Logout"
3663
  msgstr ""
3664
 
3665
+ #: s2member-pro/includes/classes/login-widget.inc.php:313
3666
  msgctxt "s2member-front"
3667
  msgid "Membership Login"
3668
  msgstr ""
3669
 
3670
+ #: s2member-pro/includes/classes/login-widget.inc.php:313
3671
  msgctxt "s2member-front"
3672
  msgid "My Profile Summary"
3673
  msgstr ""
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === s2Member® ( Membership w/ PayPal® ) ===
2
 
3
- Version: 111017
4
- Stable tag: 111017
5
  Framework: WS-P-110523
6
 
7
  SSL Compatible: yes
@@ -12,14 +12,14 @@ WP Multisite Compatible: yes
12
  Multisite Blog Farm Compatible: yes
13
 
14
  PayPal® Standard Compatible: yes
15
- PayPal® Pro Compatible: w/ s2Member Pro
16
- Google® Checkout Compatible: w/ s2Member Pro
17
- Authorize.Net® Compatible: w/ s2Member Pro
18
- ClickBank® Compatible: w/ s2Member Pro
19
- AliPay® Compatible: w/ s2Member Pro
20
- ccBill® Compatible: w/ s2Member Pro
21
-
22
- Tested up to: 3.2.1
23
  Requires at least: 3.2
24
  Requires: WordPress® 3.2+, PHP 5.2.3+
25
 
@@ -35,6 +35,7 @@ Domain Path: /includes/translations
35
 
36
  Plugin Name: s2Member
37
  Video Tutorials: http://www.s2member.com/videos/
 
38
  Pro Module / Prices: http://www.s2member.com/prices/
39
  Forum URI: http://www.primothemes.com/forums/viewforum.php?f=4
40
  Privacy URI: http://www.primothemes.com/about/privacy-policy/
@@ -178,10 +179,23 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
178
 
179
  == Changelog ==
180
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  = v111017 =
182
  * (s2Member/s2Member Pro) **Bug fix**. s2Member now works around a known bug in PHP, related to the `parse_url()` function. For further details, please see [this PHP bug report](https://bugs.php.net/bug.php?id=38143).
183
  * (s2Member/s2Member Pro) **Compatibility**. Improvements to s2Member's `wp_mail()` conformity, related to the reducton of `"Name" <email>` to just `email`. This release should work to further improve email deliverability in edge cases, particulary on sites running an SMTP mail plugin.
184
- * (s2Member/s2Member Pro) **Compatibility**. Improvements to s2Member's JW Player® integration. s2Member now prevents `unreserved chars`, i.e. `array ("-", ".", "_", "~")` from being URL-encoded in file download URLs, maximizing compatibility with many media players, including JW Player®. In previous releases, JW Player® would randomly fail on some RTMP streams with error `Stream Not Found`. Fixed in this release, with [one exception](https://forums.aws.amazon.com/thread.jspa?messageID=286182&#286182). For further details, see [RFC 3896](http://www.faqs.org/rfcs/rfc3986.html).
185
  * (s2Member/s2Member Pro) **Compatibility**. Initial testing against WordPress v3.3-beta1. Looks pretty good. A few minor cosmetic issues still need to be addressed in a future release of s2Member though.
186
  * (s2Member/s2Member Pro) **Compatibility**. Tested against BuddyPress v1.5.1. Updated s2Member to support `$bp->maintenance_mode`, and other cases where `bp_core_loaded` is NOT fired at all.
187
  * (s2Member/s2Member Pro) **Routine maintenance**. Some code optimization, some cleanup, and some organizational improvements in preparation for new features in a coming release.
1
  === s2Member® ( Membership w/ PayPal® ) ===
2
 
3
+ Version: 111029
4
+ Stable tag: 111029
5
  Framework: WS-P-110523
6
 
7
  SSL Compatible: yes
12
  Multisite Blog Farm Compatible: yes
13
 
14
  PayPal® Standard Compatible: yes
15
+ PayPal® Pro Compatible: yes w/ s2Member Pro
16
+ Google® Checkout Compatible: yes w/ s2Member Pro
17
+ Authorize.Net® Compatible: yes w/ s2Member Pro
18
+ ClickBank® Compatible: yes w/ s2Member Pro
19
+ AliPay® Compatible: yes w/ s2Member Pro
20
+ ccBill® Compatible: yes w/ s2Member Pro
21
+
22
+ Tested up to: 3.3-beta2
23
  Requires at least: 3.2
24
  Requires: WordPress® 3.2+, PHP 5.2.3+
25
 
35
 
36
  Plugin Name: s2Member
37
  Video Tutorials: http://www.s2member.com/videos/
38
+ Pro Module / Home Page: http://www.s2member.com/
39
  Pro Module / Prices: http://www.s2member.com/prices/
40
  Forum URI: http://www.primothemes.com/forums/viewforum.php?f=4
41
  Privacy URI: http://www.primothemes.com/about/privacy-policy/
179
 
180
  == Changelog ==
181
 
182
+ = v111029 =
183
+ * (s2Member Pro) **Compatibility**. s2Member Pro now supports automatic upgrades through filesystem methdologies, other than `direct`. For further details, please see [this thread](http://www.primothemes.com/forums/viewtopic.php?f=4&t=15283#p49034).
184
+ * (s2Member) **Bug fix**. A bug in the s2Member framework was causing some IPNs with `txn_type = recurring_payment_suspended_due_to_max_failed_payment` to get bypassed inadvertently. Fixed in this release. For further details, please see [this thread](http://www.primothemes.com/forums/viewtopic.php?f=4&t=6204&p=48246#p48361).
185
+ * (s2Member Pro) **Bug fix**. A bug in s2Member Pro's AliPay® integration was causing an error `could not find existing User ID`. Fixed in this release. For further details, please see [this thread](http://www.primothemes.com/forums/viewtopic.php?f=4&t=15569&p=49044#p48604).
186
+ * (s2Member Pro) **Bug fix**. A bug in s2Member Pro's AliPay® integration was causing issues in duplicate IPNs received from AliPay®. Fixed in this release.
187
+ * (s2Member/s2Member Pro) **Compatibility**. File Downloads. s2Member now considers server software environments before chunking file downloads, avoiding issues with partially corrupted files on some hosting platforms. In addition, s2Member is now capable of falling back on a flushed delivery method so it can continue to avoid memory issues on shared hosting accounts, even when `Transfer-Encoding: chunked` is not possible. These improvements allow s2Member to remain compatible in edge cases. Such as when running on Litespeed and/or Windows servers; or on shared hosting platforms that have fewer resources available.
188
+ * (s2Member Pro) **Bug fix**. Automatic upgrader failing on `copy` command when running at HostGator. Fixed in this release.
189
+ * (s2Member/s2Member Pro) **Security fix**. The `/s2member-files/` directory *(with newly updated Mod Rewrite rules in its .htaccess file)* was allowing directory indexing inadvertently, on some servers. This was a low-level vulnerability, because although directory indexing was possible, protected file access was not. Fixed in this release. For further details, please see [this thread](http://www.primothemes.com/forums/viewtopic.php?f=4&t=15665&p=48984&hilit=next+release#p48984).
190
+ * (s2Member/s2Member Pro) **Bug fix**. A bug related to the `init()` Hook firing an early call to `c_ws_plugin__s2member_systematics::is_wp_systematic_use_page()` was identified. Fixed in this release. One symptom of this bug was for Users/Members to have trouble accessing a BuddyPress registration form after having paid for Membership, under the right scenario.
191
+ * (s2Member/s2Member Pro) **New API Functions**. New API Functions: `s2member_shorten_url()`, `s2member_user_downloads()`, `s2member_total_downloads_of()`, and `s2member_total_unique_downloads_of()`. For further details, please check the [s2Member Codex](http://www.primothemes.com/forums/viewtopic.php?f=40&t=12455).
192
+ * (s2Member/s2Member Pro) **Routine maintenance**. Some code optimization, some cleanup, and some organizational improvements in preparation for new features in a coming release.
193
+ * (s2Member/s2Member Pro) **WordPress® 3.3-beta2**. Compatibility updates. CSS tweaks, JavaScript tweaks and other considerations for the coming release of WordPress® 3.3.
194
+
195
  = v111017 =
196
  * (s2Member/s2Member Pro) **Bug fix**. s2Member now works around a known bug in PHP, related to the `parse_url()` function. For further details, please see [this PHP bug report](https://bugs.php.net/bug.php?id=38143).
197
  * (s2Member/s2Member Pro) **Compatibility**. Improvements to s2Member's `wp_mail()` conformity, related to the reducton of `"Name" <email>` to just `email`. This release should work to further improve email deliverability in edge cases, particulary on sites running an SMTP mail plugin.
198
+ * (s2Member/s2Member Pro) **Compatibility**. Improvements to s2Member's JW Player® integration. s2Member now prevents `unreserved chars`, i.e. `array ("-", ".", "_", "~")` from being URL-encoded in file download URLs, maximizing compatibility with many media players, including JW Player®. In previous releases, JW Player® would randomly fail on some RTMP streams with error `Stream Not Found`. Fixed in this release. For further details, see [RFC 3896](http://www.faqs.org/rfcs/rfc3986.html).
199
  * (s2Member/s2Member Pro) **Compatibility**. Initial testing against WordPress v3.3-beta1. Looks pretty good. A few minor cosmetic issues still need to be addressed in a future release of s2Member though.
200
  * (s2Member/s2Member Pro) **Compatibility**. Tested against BuddyPress v1.5.1. Updated s2Member to support `$bp->maintenance_mode`, and other cases where `bp_core_loaded` is NOT fired at all.
201
  * (s2Member/s2Member Pro) **Routine maintenance**. Some code optimization, some cleanup, and some organizational improvements in preparation for new features in a coming release.
s2member.php CHANGED
@@ -19,8 +19,8 @@
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
- Version: 111017
23
- Stable tag: 111017
24
  Framework: WS-P-110523
25
 
26
  SSL Compatible: yes
@@ -38,7 +38,7 @@ ClickBank® Compatible: w/ s2Member Pro
38
  AliPay® Compatible: w/ s2Member Pro
39
  ccBill® Compatible: w/ s2Member Pro
40
 
41
- Tested up to: 3.2.1
42
  Requires at least: 3.2
43
  Requires: WordPress® 3.2+, PHP 5.2.3+
44
 
@@ -54,6 +54,7 @@ Domain Path: /includes/translations
54
 
55
  Plugin Name: s2Member
56
  Video Tutorials: http://www.s2member.com/videos/
 
57
  Pro Module / Prices: http://www.s2member.com/prices/
58
  Forum URI: http://www.primothemes.com/forums/viewforum.php?f=4
59
  Privacy URI: http://www.primothemes.com/about/privacy-policy/
@@ -75,7 +76,7 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
75
  * @var str
76
  */
77
  if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
78
- define ("WS_PLUGIN__S2MEMBER_VERSION", "111017");
79
  /**
80
  * Minimum PHP version required to run s2Member.
81
  *
@@ -105,7 +106,7 @@ if (!defined ("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION"))
105
  * @var str
106
  */
107
  if (!defined ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
108
- define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "111017");
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
+ Version: 111029
23
+ Stable tag: 111029
24
  Framework: WS-P-110523
25
 
26
  SSL Compatible: yes
38
  AliPay® Compatible: w/ s2Member Pro
39
  ccBill® Compatible: w/ s2Member Pro
40
 
41
+ Tested up to: 3.3-beta2
42
  Requires at least: 3.2
43
  Requires: WordPress® 3.2+, PHP 5.2.3+
44
 
54
 
55
  Plugin Name: s2Member
56
  Video Tutorials: http://www.s2member.com/videos/
57
+ Pro Module / Home Page: http://www.s2member.com/
58
  Pro Module / Prices: http://www.s2member.com/prices/
59
  Forum URI: http://www.primothemes.com/forums/viewforum.php?f=4
60
  Privacy URI: http://www.primothemes.com/about/privacy-policy/
76
  * @var str
77
  */
78
  if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
79
+ define ("WS_PLUGIN__S2MEMBER_VERSION", "111029");
80
  /**
81
  * Minimum PHP version required to run s2Member.
82
  *
106
  * @var str
107
  */
108
  if (!defined ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
109
+ define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "111029");
110
  /*
111
  Several compatibility checks.
112
  If all pass, load the s2Member plugin.