PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 260917
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v260917
260917 260913 260909 260829 260814 260805 110710 110731 110812 110815 110912 110913 110915 110926 110927 111002 111003 111011 111017 111029 111105 111206 111216 111220 120213 All 189 releases
s2member / src / includes / menu-pages / logs.inc.php

logs.inc.php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 260917, at src/includes/menu-pages/logs.inc.php

323 lines 23.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // @codingStandardsIgnoreFile
3 /**
4 * Menu page for the s2Member plugin (Logs page).
5 *
6 * Copyright: © 2009-2011
7 * {@link http://websharks-inc.com/ WebSharks, Inc.}
8 * (coded in the USA)
9 *
10 * Released under the terms of the GNU General Public License.
11 * You should have received a copy of the GNU General Public License,
12 * along with this software. In the main directory, see: /licensing/
13 * If not, see: {@link http://www.gnu.org/licenses/}.
14 *
15 * @package s2Member\Menu_Pages
16 * @since 130210
17 */
18 if(!defined('WPINC')) // MUST have WordPress.
19 exit("Do not access this file directly.");
20
21 if(!class_exists("c_ws_plugin__s2member_menu_page_logs"))
22 {
23 /**
24 * Menu page for the s2Member plugin (Integrations page).
25 *
26 * @package s2Member\Menu_Pages
27 * @since 110531
28 */
29 class c_ws_plugin__s2member_menu_page_logs
30 {
31 public function __construct()
32 {
33 echo '<div class="wrap ws-menu-page">'."\n";
34
35 echo '<div class="wp-header-end"></div>'."\n";
36
37 echo '<div class="ws-menu-page-toolbox">'."\n";
38 c_ws_plugin__s2member_menu_pages_tb::display();
39 echo '</div>'."\n";
40
41 echo '<h2>Log Files</h2>'."\n";
42
43 echo '<table class="ws-menu-page-table">'."\n";
44 echo '<tbody class="ws-menu-page-table-tbody">'."\n";
45 echo '<tr class="ws-menu-page-table-tr">'."\n";
46 echo '<td class="ws-menu-page-table-l">'."\n";
47
48 do_action("ws_plugin__s2member_during_logs_page_before_left_sections", get_defined_vars());
49
50 if(apply_filters("ws_plugin__s2member_during_logs_page_during_left_sections_display_log_settings", TRUE, get_defined_vars()))
51 {
52 do_action("ws_plugin__s2member_during_logs_page_during_left_sections_before_log_settings", get_defined_vars());
53
54 echo '<div class="ws-menu-page-group" title="Logging Configuration">'."\n";
55 echo '<div class="ws-menu-page-section ws-plugin--s2member-log-settings-section">'."\n";
56
57 echo '<div class="">'."\n";
58 echo '<p>We highly recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems that occur during processing. Enable logging here, and then view your log files below, in the s2Member Log Viewer.</p>'."\n";
59 echo '<p>However, it is recommended to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, API credentials, passwords and/or other sensitive information. We strongly suggest that logging be disabled on a live site (for security reasons) when not needed.</p>'."\n";
60 echo '<p>It is fine to enable logging on a live site for troubleshooting purposes. This is what the logs are meant for. Troubleshooting is not just done while building the site, they are sometimes needed after the site has been live a while and being used. Just remember to disable logging after you are done with it.</p>'."\n";
61 echo '<p></p>'."\n";
62 echo '</div>'."\n";
63
64 echo '<div class="warning" style="margin-bottom:0;">'."\n";
65 echo '<p style="margin:0;"><span>Regarding s2Member Security Badges. If debug logging is enabled, your site will not qualify for an s2Member Security Badge until you disable logging (and you must also download, and then delete any existing log files). For further details, please see KB Article: <a href="http://www.s2member.com/kb/security-badges/" target="_blank" rel="external">s2Member Security Badges</a>.</span></p>'."\n";
66 echo '</div>'."\n";
67
68 echo '<div class="ws-menu-page-hr"></div>'."\n";
69
70 do_action("ws_plugin__s2member_during_logs_page_during_left_sections_during_log_settings", get_defined_vars());
71
72 echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form" autocomplete="off">'."\n";
73 echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="'.esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")).'" />'."\n";
74
75 echo '<table class="form-table">'."\n";
76 echo '<tbody>'."\n";
77 echo '<tr>'."\n";
78
79 echo '<th>'."\n";
80 echo '<label for="ws-plugin--s2member-gateway-debug-logs">'."\n";
81 echo 'Enable Logging Routines?'."\n";
82 echo '</label>'."\n";
83 echo '</th>'."\n";
84
85 echo '</tr>'."\n";
86 echo '<tr>'."\n";
87
88 echo '<td>'."\n";
89 echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-0" value="0"'.((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) ? ' checked="checked"' : '').' /> <label for="ws-plugin--s2member-gateway-debug-logs-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-1" value="1"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) ? ' checked="checked"' : '').' /> <label for="ws-plugin--s2member-gateway-debug-logs-1">Yes, enable debugging w/ HTTP, API, IPN &amp; Return Page logging (and List Server API logs too).</label><br />'."\n";
90 echo '<em>This enables logging overall. Includes s2Member HTTP, API, IPN and Return Page logging. Also logs any List Server integrations.</em><br />'."\n";
91
92 //260907.2203 Document the CSS/JS operational log with the setting that enables s2Member logging.
93 echo '<em>The CSS/JS Asset Log (<code>css-js.log</code>) records important static and dynamic CSS/JS events such as generation, refreshes, delivery problems, fallbacks, and recovery. Routine page loads are not logged.</em><br />'."\n";
94
95 echo '<em>* Logging can contain sensitive operational data. Enable it only when needed, review log access carefully, and disable it when troubleshooting is complete.<br />* The log files are stored here: <code>'.esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])).'</code></em>'."\n";
96 echo '</td>'."\n";
97
98 echo '</tr>'."\n";
99 echo '<tr>'."\n";
100
101 echo '<th>'."\n";
102 echo '<label for="ws-plugin--s2member-gateway-debug-logs-extensive">'."\n";
103 echo 'Enable Additional Logging Routines?'."\n";
104 echo '</label>'."\n";
105 echo '</th>'."\n";
106
107 echo '</tr>'."\n";
108 echo '<tr>'."\n";
109
110 echo '<td>'."\n";
111 echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs_extensive" id="ws-plugin--s2member-gateway-debug-logs-extensive-0" value="0"'.((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs_extensive"]) ? ' checked="checked"' : '').' /> <label for="ws-plugin--s2member-gateway-debug-logs-extensive-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_gateway_debug_logs_extensive" id="ws-plugin--s2member-gateway-debug-logs-extensive-1" value="1"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs_extensive"]) ? ' checked="checked"' : '').' /> <label for="ws-plugin--s2member-gateway-debug-logs-extensive-1">Yes, enable debugging w/ HTTP connection logging for ALL of WordPress.</label><br />'."\n";
112 echo '<em>This enables HTTP connection logging for ALL of WordPress (quite extensive).<br />* Use only for debugging. This should NEVER be enabled on a live site.<br />* Creates the additional log file: <code>wp-http-api-debug.log</code></em>'."\n";
113 echo '</td>'."\n";
114
115 echo '</tr>'."\n";
116 echo '</tbody>'."\n";
117 echo '</table>'."\n";
118
119 echo '<p class="submit">'."\n";
120 echo '<input type="submit" value="Update Logging Configuration" />'."\n";
121 echo '</p>'."\n";
122
123 echo '</form>'."\n";
124
125 echo '</div>'."\n";
126 echo '</div>'."\n";
127
128 do_action("ws_plugin__s2member_during_logs_page_during_left_sections_after_log_settings", get_defined_vars());
129 }
130 if(apply_filters("ws_plugin__s2member_during_logs_page_during_left_sections_display_logs", TRUE, get_defined_vars()))
131 {
132 do_action("ws_plugin__s2member_during_logs_page_during_left_sections_before_logs", get_defined_vars());
133
134 echo '<div class="ws-menu-page-group" title="Logs Viewer" default-state="open">'."\n";
135
136 echo '<div class="ws-menu-page-section ws-plugin--s2member-logs-section">'."\n";
137 echo '<h3>Debugging Tools/Tips &amp; Other Important Details (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-debugging-tips-details\').toggle(); return false;" class="ws-dotted-link">click here to toggle</a>)</h3>'."\n";
138
139 echo '<div id="ws-plugin--s2member-debugging-tips-details" style="display:none;">'."\n";
140
141 echo '<div class="ws-menu-page-hr"></div>'."\n";
142
143 echo '<form method="post" onsubmit="if(!confirm(\'Archive all existing log files?\n\nAll of your current log files will be archived (i.e., they will simply be renamed with an ARCHIVED tag &amp; date in their file name); and new log files will be created automatically the next time s2Member logs something on your installation.\n\nPlease click OK to confirm this action.\')) return false;" autocomplete="off">'."\n";
144 echo '<input type="hidden" name="ws_plugin__s2member_logs_archive_start_fresh" value="'.esc_attr(wp_create_nonce("ws-plugin--s2member-logs-archive-start-fresh")).'" />'."\n";
145 echo '<input type="submit" value="Archive All Current Log Files" class="ws-menu-page-right ws-plugin--s2member-archive-logs-start-fresh-button" style="font-size:110%; font-weight:normal; clear:right; min-width:300px;" />'."\n";
146 echo '</form>'."\n";
147
148 echo '<form method="post" onsubmit="if(!confirm(\'Delete all existing log files?\n\nThis will permanently delete ALL of your existing log files (including any archived log files).\n\nPlease click OK to confirm this action.\')) return false;" autocomplete="off">'."\n";
149 echo '<input type="hidden" name="ws_plugin__s2member_logs_delete_start_fresh" value="'.esc_attr(wp_create_nonce("ws-plugin--s2member-logs-delete-start-fresh")).'" />'."\n";
150 echo '<input type="submit" value="Permanently Delete All Log Files" class="ws-menu-page-right ws-plugin--s2member-delete-logs-start-fresh-button" style="font-size:110%; font-weight:normal; clear:right; min-width:300px;" />'."\n";
151 echo '</form>'."\n";
152
153 echo '<form method="post" autocomplete="off">'."\n";
154 echo '<input type="hidden" name="ws_plugin__s2member_logs_download_zip" value="'.esc_attr(wp_create_nonce("ws-plugin--s2member-logs-download-zip")).'" />'."\n";
155 echo '<input type="submit" value="Download All Log Files (Zip File)" class="ws-menu-page-right ws-plugin--s2member-logs-download-zip-button" style="font-size:110%; font-weight:normal; clear:right; min-width:300px;" />'."\n";
156 echo '</form>'."\n";
157
158 echo '<p><strong>Debugging Tips:</strong> &nbsp;&nbsp; It is normal to see a few errors in your log files. This is because s2Member logs <em>all</em> of its communication with Payment Gateways. Everything—not just successes. With that in mind, there will be some failures that s2Member expects (to a certain extent); and s2Member deals with these gracefully. What you\'re looking for here, are things that jump right out at you as being a major issue (e.g., when s2Member makes a point of providing details to you in a log entry about problems that should be corrected on your installation). Please read carefully.</p>'."\n";
159 echo '<p><strong>Test Transaction Tips:</strong> &nbsp;&nbsp; Generally speaking, it is best to run test transactions for yourself. Be sure to run your final test transactions against a live Payment Gateway that is <em>not</em> in Sandbox/Test Mode (<a href="#" onclick="alert(\'While some Payment Gateways make it possible for you to run test transactions in Sandbox/Test Mode, these are not a reliable way to test s2Member.\n\nOften times (particularly with PayPal) Sandbox/Test mode behaves somewhat differently—often with buggy behavior. This can really create frustration for site owners. Therefore, it is always a good idea to run low-dollar test transactions against a live Payment Gateway.\n\nAlso, please be sure that you are not logged in as an Administrator when running test transactions. For most test transactions, you will want to be completely logged-out of your site before completing checkout (just like a new Customer would be). If you are testing an upgrade or downgrade (where you do need to be logged-in), please do not attempt this under an Administrative account. s2Member will not upgrade/downgrade Administrative accounts—for security purposes.\'); return false;">click here for details</a>). After running test transactions, please review the log file entries pertaining to your transaction. Does s2Member report any major issues? If so, please read through any details that s2Member provides in the log file. If you need assistance, please <a href="https://s2member.com/r/s2member-kb/" target="_blank" rel="external">search s2Member.com</a> for answers to common questions.</p>'."\n";
160 echo '<p><strong>s2 Core Processors:</strong> &nbsp;&nbsp; It is normal to have a <code>gateway-core-ipn.log</code> and/or a <code>gateway-core-rtn.log</code> file at all times. Ultimately, all Payment Gateway integrations supported by s2Member pass through it\'s core post-processing handlers. If you\'re having trouble, and you don\'t find any errors in your Payment Gateway log files, please check the <code>gateway-core-ipn.log</code> and <code>gateway-core-rtn.log</code> files too. Regarding s2Member Pro-Forms... If you\'ve integrated s2Member Pro-Forms, you will not have a <code>gateway-core-rtn.log</code> file, because that particular processor is not used with Pro-Form integrations. However, you will have a <code>gateway-core-ipn.log</code> file, and you will need to make a point of inspecting this file to ensure there were no post-processing issues.</p>'."\n";
161 echo '<p><strong>s2 HTTP API Logs:</strong> &nbsp;&nbsp; If s2Member is not behaving as expected, and you cannot find errors anywhere in your Payment Gateway log files (or with any core processors), please review your <code>s2-http-api-debug.log</code> file too. Look for any HTTP connections where s2Member is getting <code>403</code>, <code>404</code>, <code>503</code> errors from your server. This can sometimes happen due to <a href="http://www.s2member.com/kb/mod-security-random-503-403-errors/" target="_blank" rel="external">paranoid Mod Security configurations</a>, and it may require you to contact your hosting company for assistance.</p>'."\n";
162 echo '<p style="font-style:italic;"><strong>Archived Log Files:</strong> &nbsp;&nbsp; All s2Member log files are stored here: <code>'.esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])).'</code>. Any log files that contain the word <code>ARCHIVED</code> in their name, are files that reached a size of more than 2MB; so s2Member archived them automatically to prevent any single log file from becoming too large. Archived log file names will also contain the date/time they were archived by s2Member. These archived log files typically contain much older (and possibly outdated) log entries.</p>'."\n";
163
164 echo '<div class="ws-menu-page-hr"></div>'."\n";
165
166 echo '<h3>s2Member Log File Descriptions (for <em>all</em> possible log file names)</h3>'."\n";
167
168 echo '<div class="ws-menu-page-hr"></div>'."\n";
169
170 echo '<ul class="ws-menu-page-li-margins">'."\n";
171 foreach(c_ws_plugin__s2member_utils_logs::$log_file_descriptions as $_k => $_v)
172 echo '<li><code><strong>'.esc_html(preg_replace(array('/^\/|\/$/', '/\\\\+/'), '', $_k)).'.log</strong></code> &nbsp;&nbsp; '.esc_html($_v["long"]).'</li>'."\n";
173 unset($_k, $_v); // Housekeeping.
174 echo '</ul>'."\n";
175
176 echo '<div class="ws-menu-page-hr"></div>'."\n";
177
178 echo '</div>'."\n";
179
180 do_action("ws_plugin__s2member_during_logs_page_during_left_sections_during_logs", get_defined_vars());
181
182 $log_file_options = ""; // Initialize to an empty string.
183 $view_log_file = (!empty($_POST["ws_plugin__s2member_log_file"])) ? sanitize_file_name($_POST["ws_plugin__s2member_log_file"]) : ""; //250422 Sanitize log file name.
184 $view_log_file = (preg_match('/\.log$/i', $view_log_file)) ? $view_log_file : "";
185 $logs_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"];
186
187 if(is_dir($logs_dir)) // Do we have a logs directory on this installation?
188 {
189 $log_files = scandir($logs_dir);
190 sort($log_files, SORT_STRING);
191
192 $log_file_options .= '<optgroup label="Current Log Files">';
193 foreach($log_files as $_log_file) // Build options for each current log file.
194 {
195 $_log_file_description = array("short" => "No description available.", "long" => "No description available.");
196
197 foreach(c_ws_plugin__s2member_utils_logs::$log_file_descriptions as $_k => $_v)
198 if(preg_match($_k, $_log_file))
199 {
200 $_log_file_description = $_v;
201 break; // Stop here.
202 }
203 unset($_k, $_v); // Housekeeping.
204
205 if(preg_match("/\.log$/", $_log_file) && stripos($_log_file, "-ARCHIVED-") === FALSE)
206 $log_file_options .= '<option data-type="current" title="'.esc_attr($_log_file_description["long"]).'" value="'.esc_attr($_log_file).'"'.(($view_log_file === $_log_file) ? ' style="font-weight:bold;" selected="selected"' : '').'>'.esc_html($_log_file).''.esc_html($_log_file_description["short"]).'</option>';
207 }
208 unset($_log_file_description, $_log_file); // Housekeeping.
209 $log_file_options .= '</optgroup>';
210
211 if(stripos($log_file_options, '<option data-type="current"') === FALSE)
212 $log_file_options .= '<option value="" disabled="disabled">— No current log files yet. —</option>';
213
214 $log_file_options .= '<option value="" disabled="disabled"></option>';
215
216 $log_file_options .= '<optgroup label="Archived Log Files">';
217 foreach($log_files as $_log_file) // Build options for each ARCHIVED log file.
218 {
219 if(preg_match("/\.log$/", $_log_file) && stripos($_log_file, "-ARCHIVED-") !== FALSE)
220 $log_file_options .= '<option data-type="archived" value="'.esc_attr($_log_file).'"'.(($view_log_file === $_log_file) ? ' style="font-weight:bold;" selected="selected"' : '').'>'.esc_html($_log_file).'</option>';
221 }
222 $log_file_options .= '</optgroup>';
223
224 if(stripos($log_file_options, '<option data-type="archived"') === FALSE)
225 $log_file_options .= '<option value="" disabled="disabled">— No log files archived yet. —</option>';
226 }
227 $log_file_options = '<option value="">— Choose a Log File to View —</option>'.
228 '<option value="" disabled="disabled"></option>'.
229 $log_file_options;
230
231 echo '<form method="post" name="ws_plugin__s2member_log_viewer" id="ws-plugin--s2member-log-viewer" autocomplete="off">'."\n";
232
233 echo '<table class="form-table">'."\n";
234 echo '<tbody>'."\n";
235 echo '<tr>'."\n";
236
237 echo '<td style="width:80%;">'."\n";
238 echo '<select name="ws_plugin__s2member_log_file" id="ws-plugin--s2member-log-file">'."\n";
239 echo $log_file_options."\n";
240 echo '</select>'."\n";
241 echo '</td>'."\n";
242
243 echo '<td style="width:20%; padding-left:5px;">'."\n";
244 echo '<input type="submit" value="View" style="font-size:120%; font-weight:normal;" />'."\n";
245 echo '</td>'."\n";
246
247 echo '</tr>'."\n";
248 echo '</tbody>'."\n";
249 echo '</table>'."\n";
250
251 echo '<table class="form-table">'."\n";
252 echo '<tbody>'."\n";
253 echo '<tr>'."\n";
254
255 echo '<td>'."\n";
256
257 if($view_log_file && file_exists($logs_dir."/".$view_log_file) && filesize($logs_dir."/".$view_log_file))
258 {
259 $_log_file_description = array("short" => "", "long" => "");
260
261 foreach(c_ws_plugin__s2member_utils_logs::$log_file_descriptions as $_k => $_v)
262 if(preg_match($_k, $view_log_file))
263 {
264 $_log_file_description = $_v;
265 break; // Stop here.
266 }
267 unset($_k, $_v); // Housekeeping.
268
269 if(!empty($_log_file_description["long"])) // Do we have a description that we can display here?
270 echo '<p style="clear:both; width:80%; font-family:\'Georgia\', serif; font-style:italic;"><strong>Description for <a href="'.esc_attr(add_query_arg(array("ws_plugin__s2member_download_log_file" => $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce("ws-plugin--s2member-download-log-file-v")))).'">'.esc_html($view_log_file).'</a></strong>: '.esc_html($_log_file_description["long"]).'</p>'."\n";
271 unset($_log_file_description); // Just a little housekeeping here.
272
273 echo '<p style="float:left; text-align:left;"><strong>Viewing:</strong> <a href="'.esc_attr(add_query_arg(array("ws_plugin__s2member_download_log_file" => $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce("ws-plugin--s2member-download-log-file-v")))).'">'.esc_html($view_log_file).'</a> (log entries oldest to newest)</p>'."\n";
274 echo '<p style="float:right; text-align:right;">[ <a href="'.esc_attr(add_query_arg(array("ws_plugin__s2member_download_log_file" => $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce("ws-plugin--s2member-download-log-file-v")))).'"><strong>download file</strong></a> ]</p>'."\n";
275 echo '<p style="margin-right:10px; float:right; text-align:right;"><a href="#" class="ws-plugin--s2member-log-file-viewport-toggle" style="text-decoration:none;">&#8659; expand viewport &#8659;</a></p>'."\n";
276
277 echo '<textarea id="ws-plugin--s2member-log-file-viewer" rows="20" wrap="on" spellcheck="false" style="box-shadow:inset 0 0 5px rgba(0,0,0,0.5); background:#EEEEEE; color:#000000; overflow-y:scroll;">'.htmlspecialchars(file_get_contents($logs_dir."/".$view_log_file)).'</textarea>'."\n";
278
279 echo '<p style="float:left; text-align:left;"><strong>Viewing:</strong> <a href="'.esc_attr(add_query_arg(array("ws_plugin__s2member_download_log_file" => $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce("ws-plugin--s2member-download-log-file-v")))).'">'.esc_html($view_log_file).'</a> (log entries oldest to newest)</p>'."\n";
280 echo '<p style="float:right; text-align:right;">[ <a href="'.esc_attr(add_query_arg(array("ws_plugin__s2member_download_log_file" => $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce("ws-plugin--s2member-download-log-file-v")))).'"><strong>download file</strong></a> ]</p>'."\n";
281 echo '<p style="margin-right:10px; float:right; text-align:right;"><a href="#" class="ws-plugin--s2member-log-file-viewport-toggle" style="text-decoration:none;">&#8659; expand viewport &#8659;</a></p>'."\n";
282 }
283 else if($view_log_file && file_exists($logs_dir."/".$view_log_file))
284 echo '<textarea id="ws-plugin--s2member-log-file-viewer" rows="20" wrap="on" spellcheck="false" style="box-shadow:inset 0 0 5px rgba(0,0,0,0.5); background:#EEEEEE; color:#000000; overflow-y:scroll; font-style:italic;">— Empty at this time —</textarea>'."\n";
285
286 else if($view_log_file && !file_exists($logs_dir."/".$view_log_file))
287 echo '<textarea id="ws-plugin--s2member-log-file-viewer" rows="20" wrap="on" spellcheck="false" style="box-shadow:inset 0 0 5px rgba(0,0,0,0.5); background:#EEEEEE; color:#000000; overflow-y:scroll; font-style:italic;">— File no longer exists —</textarea>'."\n";
288
289 else // Display an empty textarea in this default scenario.
290 echo '<textarea id="ws-plugin--s2member-log-file-viewer" rows="20" wrap="on" spellcheck="false" style="box-shadow:inset 0 0 5px rgba(0,0,0,0.5); background:#EEEEEE; color:#000000; overflow-y:scroll; font-style:italic;"></textarea>'."\n";
291
292 echo '</td>'."\n";
293
294 echo '</tr>'."\n";
295 echo '</tbody>'."\n";
296 echo '</table>'."\n";
297
298 echo '</form>'."\n";
299
300 echo '</div>'."\n";
301 echo '</div>'."\n";
302
303 do_action("ws_plugin__s2member_during_logs_page_during_left_sections_after_logs", get_defined_vars());
304 }
305 do_action("ws_plugin__s2member_during_logs_page_after_left_sections", get_defined_vars());
306
307 echo '</td>'."\n";
308
309 echo '<td class="ws-menu-page-table-r">'."\n";
310 c_ws_plugin__s2member_menu_pages_rs::display();
311 echo '</td>'."\n";
312
313 echo '</tr>'."\n";
314 echo '</tbody>'."\n";
315 echo '</table>'."\n";
316
317 echo '</div>'."\n";
318 }
319 }
320 }
321
322 new c_ws_plugin__s2member_menu_page_logs();
323