PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 110812
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v110812
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 / includes / menu-pages / down-ops.inc.php

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

339 lines 27.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Menu page for the s2Member plugin ( File Download Options page ).
4 *
5 * Copyright: © 2009-2011
6 * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7 * ( coded in the USA )
8 *
9 * Released under the terms of the GNU General Public License.
10 * You should have received a copy of the GNU General Public License,
11 * along with this software. In the main directory, see: /licensing/
12 * If not, see: {@link http://www.gnu.org/licenses/}.
13 *
14 * @package s2Member\Menu_Pages
15 * @since 3.0
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_menu_page_down_ops"))
21 {
22 /**
23 * Menu page for the s2Member plugin ( File Download Options page ).
24 *
25 * @package s2Member\Menu_Pages
26 * @since 110531
27 */
28 class c_ws_plugin__s2member_menu_page_down_ops
29 {
30 public function __construct ()
31 {
32 echo '<div class="wrap ws-menu-page">' . "\n";
33 /**/
34 echo '<div id="icon-plugins" class="icon32"><br /></div>' . "\n";
35 echo '<h2>s2Member® File Download Options</h2>' . "\n";
36 /**/
37 echo '<table class="ws-menu-page-table">' . "\n";
38 echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
39 echo '<tr class="ws-menu-page-table-tr">' . "\n";
40 echo '<td class="ws-menu-page-table-l">' . "\n";
41 /**/
42 echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form">' . "\n";
43 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";
44 echo '<input type="hidden" name="ws_plugin__s2member_configured" id="ws-plugin--s2member-configured" value="1" />' . "\n";
45 /**/
46 do_action ("ws_plugin__s2member_during_down_ops_page_before_left_sections", get_defined_vars ());
47 /**/
48 if (apply_filters ("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_restrictions", true, get_defined_vars ()))
49 {
50 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_restrictions", get_defined_vars ());
51 /**/
52 echo '<div class="ws-menu-page-group" title="Basic Download Restrictions">' . "\n";
53 /**/
54 echo '<div class="ws-menu-page-section ws-plugin--s2member-restrictions-section">' . "\n";
55 echo '<h3>File Download Restrictions ( required, if providing access to protected files )</h3>' . "\n";
56 echo '<p>If your Membership offering allows access to restricted files, you\'ll want to configure these options.</p>' . "\n";
57 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_restrictions", get_defined_vars ());
58 /**/
59 echo '<div class="ws-menu-page-hr"></div>' . "\n";
60 /**/
61 echo '<p><strong>Upload restricted files to this security-enabled directory:</strong><br /><code>' . esc_html (preg_replace ("/^" . preg_quote ($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '</code></p>' . "\n";
62 echo '<p>- Now, you can link to any protected file, using this special format:<br />&nbsp;&nbsp;<code>' . esc_html (site_url ("/?s2member_file_download=example-file.zip")) . '</code><br />&nbsp;&nbsp;<small><em><strong>s2member_file_download</strong> = location of the file, relative to the /' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/ directory. In other words, just the file name.</em></small></p>' . "\n";
63 /**/
64 echo '<div class="ws-menu-page-hr"></div>' . "\n";
65 /**/
66 echo '<p>s2Member will allow access to these protected files, based on the configuration you specify below. Repeated downloads of the same exact file are NOT tabulated against the totals below. Once a file has been downloaded, future downloads of the same exact file, by the same exact Member will not be counted against them. In other words, if a Member downloads the same file three times, the system only counts that as one unique download.</p>' . "\n";
67 echo '<p>s2Member will automatically detect links, anywhere in your content, and/or anywhere in your theme files, that contain <code>?s2member_file_download</code>. Whenever a logged-in Member clicks a link that contains <code>?s2member_file_download</code>, the system will politely ask the user to confirm the download using a very intuitive JavaScript confirmation prompt that contains specific details about download limitations. This way your Members will be aware of how many files they\'ve downloaded in the current period; and they\'ll be able to make a conscious decision about whether to proceed with a specific download or not. If you want to suppress this JavaScript confirmation prompt, you can add this to the end of your links: <code>&amp;s2member_skip_confirmation</code>.</p>' . "\n";
68 echo '<p><em>* The above only applies to Users who are logged in as Members. For all other visitors in the general public, the <code>?s2member_file_download</code> links will redirect them your Membership Options Page, so that new visitors can signup, in order to gain access, by becoming a Member. You may also want to have a look down below at s2Member\'s "Advanced Download Restrictions", which provides a greater degree of flexibility.</em></p>' . "\n";
69 /**/
70 echo '<div class="ws-menu-page-hr"></div>' . "\n";
71 /**/
72 echo '<table class="form-table" style="margin-top:0;">' . "\n";
73 echo '<tbody>' . "\n";
74 /**/
75 for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
76 {
77 echo '<tr>' . "\n";
78 /**/
79 echo '<th style="padding-top:0;">' . "\n";
80 echo '<label for="ws-plugin--s2member-level' . $n . '-file-downloads-allowed">' . "\n";
81 echo ($n === $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]) ? 'File Downloads ( Highest Level #' . $n . ' ):' . "\n" : 'File Downloads ( Level #' . $n . ' Or Higher ):' . "\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="text" name="ws_plugin__s2member_level' . $n . '_file_downloads_allowed" id="ws-plugin--s2member-level' . $n . '-file-downloads-allowed" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed"]) . '" style="width:200px;" maxlength="9" /> every <input type="text" name="ws_plugin__s2member_level' . $n . '_file_downloads_allowed_days" id="ws-plugin--s2member-level' . $n . '-file-downloads-allowed-days" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed_days"]) . '" style="width:200px;" maxlength="3" onkeyup="if(this.value > 365){ alert(\'( 365 days is the maximum ).\\nThis keeps the logs optimized.\'); this.value = 365; }" /> days.<br />' . "\n";
90 echo 'Only this many unique downloads ( <code><em>999999999 = unlimited</em></code> ) will be permitted every X days.' . "\n";
91 echo '</td>' . "\n";
92 /**/
93 echo '</tr>' . "\n";
94 /**/
95 echo ($n < $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]) ? '<tr><td><div class="ws-menu-page-hr"></div></td></tr>' : '';
96 }
97 /**/
98 echo '</tbody>' . "\n";
99 echo '</table>' . "\n";
100 echo '</div>' . "\n";
101 /**/
102 echo '</div>' . "\n";
103 /**/
104 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_restrictions", get_defined_vars ());
105 }
106 /**/
107 if (apply_filters ("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_limit_exceeded_page", true, get_defined_vars ()))
108 {
109 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_limit_exceeded_page", get_defined_vars ());
110 /**/
111 echo '<div class="ws-menu-page-group" title="Download Limit Exceeded">' . "\n";
112 /**/
113 echo '<div class="ws-menu-page-section ws-plugin--s2member-limit-exceeded-page-section">' . "\n";
114 echo '<h3>Download Limit Exceeded Page ( required, if providing access to protected files )</h3>' . "\n";
115 echo '<p>This Page will be shown if a Member reaches their download limit, based on the configuration you\'ve specified in the fields above. This Page should be created by you, in WordPress®. This Page should provide an informative message to the Member, describing your file access restrictions. Just tell them a little bit about your policy on file downloads, and why they might have reached this Page.</p>' . "\n";
116 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_limit_exceeded_page", get_defined_vars ());
117 /**/
118 echo '<table class="form-table">' . "\n";
119 echo '<tbody>' . "\n";
120 echo '<tr>' . "\n";
121 /**/
122 echo '<th>' . "\n";
123 echo '<label for="ws-plugin--s2member-file-download-limit-exceeded-page">' . "\n";
124 echo 'Download Limit Exceeded Page:' . "\n";
125 echo '</label>' . "\n";
126 echo '</th>' . "\n";
127 /**/
128 echo '</tr>' . "\n";
129 echo '<tr>' . "\n";
130 /**/
131 echo '<td>' . "\n";
132 echo '<select name="ws_plugin__s2member_file_download_limit_exceeded_page" id="ws-plugin--s2member-file-download-limit-exceeded-page">' . "\n";
133 echo '<option value="">&mdash; Select &mdash;</option>' . "\n";
134 foreach (($ws_plugin__s2member_temp_a = array_merge ((array)get_pages ())) as $ws_plugin__s2member_temp_o)
135 echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '"' . (($ws_plugin__s2member_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]) ? ' selected="selected"' : '') . '>' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
136 echo '</select><br />' . "\n";
137 echo 'Please choose a Page that Members will see if they reach their file download limit. This Page should provide an informative message to the Member, describing your file access restrictions. Just tell them a little bit about your policy on file downloads. We recommend the following title: <code>Download Limit Exceeded</code>.' . "\n";
138 echo '</td>' . "\n";
139 /**/
140 echo '</tr>' . "\n";
141 echo '</tbody>' . "\n";
142 echo '</table>' . "\n";
143 echo '</div>' . "\n";
144 /**/
145 echo '</div>' . "\n";
146 /**/
147 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_limit_exceeded_page", get_defined_vars ());
148 }
149 /**/
150 if (apply_filters ("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_advanced_restrictions", true, get_defined_vars ()))
151 {
152 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_advanced_restrictions", get_defined_vars ());
153 /**/
154 echo '<div class="ws-menu-page-group" title="Advanced Download Restrictions">' . "\n";
155 /**/
156 echo '<div class="ws-menu-page-section ws-plugin--s2member-restrictions-section">' . "\n";
157 echo '<h3>Advanced Download Restrictions ( optional, for greater flexibility )</h3>' . "\n";
158 echo '<p>By default, s2Member uses your Basic Download Restrictions, as configured above. However, you can force s2Member to allow File Downloads, using an extra query string parameter ( <code>s2member_file_download_key</code> ). A File Download `Key` is passed through this parameter, and it tells s2Member to allow the download of this particular file, regardless of Membership Level; and WITHOUT checking any Basic Restrictions, that you may, or may not, have configured above. The creation of a File Download `Key`, requires a small PHP code snippet. In order to use PHP scripting inside your Posts/Pages, you\'ll need to install this handy plugin ( <a href="http://wordpress.org/extend/plugins/php-execution-plugin/" target="_blank" rel="external">PHP Execution</a> ).</p>' . "\n";
159 echo '<p>' . esc_html (site_url ("/?s2member_file_download=example-file.zip")) . '<code>&amp;s2member_file_download_key=&lt;?php echo s2member_file_download_key("example-file.zip"); ?&gt;</code><br />&nbsp;&nbsp;<small><em><strong>s2member_file_download_key</strong> = &lt;?php echo s2member_file_download_key("location of the file, relative to the /' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/ directory"); ?&gt;</em></small></p>' . "\n";
160 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_advanced_restrictions", get_defined_vars ());
161 /**/
162 echo '<div class="ws-menu-page-hr"></div>' . "\n";
163 /**/
164 echo '<p>The function `<code>s2member_file_download_key()</code>`, is part of the s2Member API. It produces a time-sensitive File Download Key that is unique to each and every visitor. Each Key it produces ( at the time it is produced ), will be valid for the current day, and only for a specific IP address and User-Agent string; as detected by s2Member. This makes it possible for you to create links on your site, which provide access to protected file downloads; and without having to worry about one visitor sharing their link with another. So let\'s take a quick look at what <code>s2member_file_download_key()</code> actually produces.</p>' . "\n";
165 echo '<p><code>s2member_file_download_key ("example-file.zip")</code> = a site-specific hash of <em>s2member_xencrypt(date("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file)</em></p>' . "\n";
166 echo '<p>When <code>s2member_file_download_key = <em>a valid Key</em></code>, it works independently from Member Level Access. That is, a visitor does NOT have to be logged in to receive access; they just need a valid Key. Using this advanced technique, you could extend s2Member\'s file protection routines, or even combine them with Specific Post/Page Access, and more. The possibilities are limitless really.</p>' . "\n";
167 /**/
168 echo '</div>' . "\n";
169 /**/
170 echo '</div>' . "\n";
171 /**/
172 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_advanced_restrictions", get_defined_vars ());
173 }
174 /**/
175 if (apply_filters ("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_inline_extensions", true, get_defined_vars ()))
176 {
177 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_inline_extensions", get_defined_vars ());
178 /**/
179 echo '<div class="ws-menu-page-group" title="Inline File Extensions">' . "\n";
180 /**/
181 echo '<div class="ws-menu-page-section ws-plugin--s2member-inline-extensions-section">' . "\n";
182 echo '<h3>Inline File Extensions ( optional, for content-disposition )</h3>' . "\n";
183 echo '<p>There are two ways to serve files. Inline, or as an Attachment. By default, s2Member will serve all of your protected files, as downloadable attachments. Meaning, visitors will be given a file download prompt. Otherwise known as <code>Content-Disposition: attachment</code>. In some cases though, you may wish to serve files inline. For example, PDF files and images should usually be served inline. When you serve a file inline, it is displayed in your browser immediately, rather than your browser prompting you to download the file as an attachment.</p>' . "\n";
184 echo '<p>Using the field below, you can list all of the extensions that you want s2Member to serve inline ( ex: <code>htm,html,pdf,jpg,jpeg,jpe,gif,png,mp3,mp4,flv</code> ). Please understand, some files just cannot be displayed inline. For instance, there is no way to display an <code>exe</code> file inline. So only specify extensions that can, and should be displayed inline by a web browser. Alternatively, if you would rather handle this on a case-by-case basis, you can simply add the following to the end of your download links: <code>&amp;s2member_file_inline=yes</code>.</p>' . "\n";
185 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_inline_extensions", get_defined_vars ());
186 /**/
187 echo '<table class="form-table">' . "\n";
188 echo '<tbody>' . "\n";
189 echo '<tr>' . "\n";
190 /**/
191 echo '<th>' . "\n";
192 echo '<label for="ws-plugin--s2member-file-download-inline-extensions">' . "\n";
193 echo 'Default Inline File Extensions ( comma-delimited ):' . "\n";
194 echo '</label>' . "\n";
195 echo '</th>' . "\n";
196 /**/
197 echo '</tr>' . "\n";
198 echo '<tr>' . "\n";
199 /**/
200 echo '<td>' . "\n";
201 echo '<input type="text" name="ws_plugin__s2member_file_download_inline_extensions" id="ws-plugin--s2member-file-download-inline-extensions" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_inline_extensions"]) . '" /><br />' . "\n";
202 echo 'Inline extensions in comma-delimited format. Example: <code>htm,html,pdf,jpg,jpeg,jpe,gif,png,mp3,mp4,flv</code>' . "\n";
203 echo '</td>' . "\n";
204 /**/
205 echo '</tr>' . "\n";
206 echo '</tbody>' . "\n";
207 echo '</table>' . "\n";
208 echo '</div>' . "\n";
209 /**/
210 echo '</div>' . "\n";
211 /**/
212 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_inline_extensions", get_defined_vars ());
213 }
214 /**/
215 if (apply_filters ("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_remote_authorization", true, get_defined_vars ()))
216 {
217 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_remote_authorization", get_defined_vars ());
218 /**/
219 echo '<div class="ws-menu-page-group" title="Remote Auth / Podcasting">' . "\n";
220 /**/
221 echo '<div class="ws-menu-page-section ws-plugin--s2member-remote-authorization-section">' . "\n";
222 echo '<h3>Remote Header Authorization ( optional )</h3>' . "\n";
223 echo '<p>This can be enabled on a case-by-case basis. Just add this to the end of your download links: <code>&amp;s2member_file_remote=yes</code>.</p>' . "\n";
224 echo '<p>Remote Header Authorization allows access to file downloads through an entirely different approach. Instead of asking the Member to log into your site through a browser, a Member will be prompted automatically, to log in through HTTP Header Authorization prompts; which is the same technique used in more traditional security systems via .htaccess files. In other words, Remote Header Authorization makes it possible for your Members to access files through remote applications that may NOT use a browser. This is often the case when a Member needs to access protected files through a software client like iTunes®; typical with podcasts. See <a href="http://www.primothemes.com/forums/viewtopic.php?f=4&t=837&p=28558#p28558" target="_blank" rel="external">tutorial here</a> for details about how to setup a Podcast for iTunes®.</p>' . "\n";
225 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_remote_authorization", get_defined_vars ());
226 echo '</div>' . "\n";
227 /**/
228 echo '</div>' . "\n";
229 /**/
230 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_remote_authorization", get_defined_vars ());
231 }
232 /**/
233 if (apply_filters ("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_amazon_s3", true, get_defined_vars ()))
234 {
235 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_amazon_s3", get_defined_vars ());
236 /**/
237 echo '<div class="ws-menu-page-group" title="Amazon® S3/CDN Storage Option">' . "\n";
238 /**/
239 echo '<div class="ws-menu-page-section ws-plugin--s2member-inline-extensions-section">' . "\n";
240 echo '<h3>Amazon® S3/CDN Storage &amp; Delivery ( optional )</h3>' . "\n";
241 echo '<a href="http://aws.amazon.com/s3/" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/amazon-logo.png" class="ws-menu-page-right" style="width:250px; height:100px; border:0;" alt="." /></a>' . "\n";
242 echo '<p>Amazon® Simple Storage Service ( <a href="http://aws.amazon.com/s3/" target="_blank" rel="external">Amazon® S3</a> ). Amazon® S3 is storage for the Internet. It is designed to make web-scale computing easier for developers. Amazon® S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. It gives developers access to the same highly scalable, reliable, secure, fast, inexpensive infrastructure that Amazon® uses to run its own global network of web sites. s2Member has been integrated with Amazon® S3, so that <em>( if you wish )</em>, instead of using the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory, you can store all of your protected files inside an Amazon® S3 Bucket.</p>' . "\n";
243 echo '<p>If you configure the options below, s2Member will assume all protected files are inside your Amazon® S3 Bucket; and the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory is no longer used at all. That being said, all other aspects of s2Member\'s File Download protection remain the same. The only thing that changes, is the location of your protected Files. In other words, Basic Download Restrictions, Download Keys, Inline Extensions, Custom Capability and/or Membership Level Files will all continue to work just as before. The only difference is that s2Member will use your Amazon® S3 Bucket as a CDN <em>( i.e. Content Delivery Network )</em> instead of the local <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory.</p>' . "\n";
244 echo '<p>s2Member assumes that you\'re creating a new Amazon® S3 Bucket, specifically for this installation; and that your Bucket is NOT available publicly. In other words, if you type this URL into your browser ( i.e. <code>http://s3.amazonaws.com/your-bucket-name/</code> ), you should get an error that says: <code>Access Denied</code>. That\'s good, that\'s exactly what you want. You can create your Amazon® S3 Bucket using the <a href="https://console.aws.amazon.com/s3/home" target="_blank" rel="external">Amazon® interface</a>. Or, some people prefer to use this popular Firefox® extension ( <a href="http://www.s3fox.net/" target="_blank" rel="external">S3 Fox Organizer</a> ).</p>' . "\n";
245 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_amazon_s3", get_defined_vars ());
246 /**/
247 echo '<div class="ws-menu-page-hr"></div>' . "\n";
248 /**/
249 echo '<p><em><strong>*Dev Note*</strong> s2Member uses "Query String Authentication", provided by the Amazon® S3 API. Documented for developers <a href="http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html" target="_blank" rel="external">here</a>. To put it simply, s2Member will generate S3 authenticated redirect URLs ( internally ); which allow Customers temporary access to specific files inside your S3 Bucket. s2Member\'s Query String Authentication through Amazon® S3 gives a Customer 30 seconds to connect to the file inside your S3 Bucket ( i.e. the automatic redirection URL ). This connection period of 30 seconds is largely irrelevant when used in combination with s2Member. It just needs to be a low value, to further prevent any possibility of S3 authenticated link sharing. If you need to change this connection timeout of <code>30 seconds</code> for some reason ( not likely ), you can use this WordPress® Filter: <code>ws_plugin__s2member_amazon_s3_file_expires_time</code>. If you need help, please check the s2Member Forums.</em></p>' . "\n";
250 /**/
251 echo '<div class="ws-menu-page-hr"></div>' . "\n";
252 /**/
253 echo '<table class="form-table" style="margin-top:0;">' . "\n";
254 echo '<tbody>' . "\n";
255 echo '<tr>' . "\n";
256 /**/
257 echo '<th style="padding-top:0;">' . "\n";
258 echo '<label for="ws-plugin--s2member-amazon-s3-files-bucket">' . "\n";
259 echo 'Amazon® S3 File Bucket: ( where protected files are )' . "\n";
260 echo '</label>' . "\n";
261 echo '</th>' . "\n";
262 /**/
263 echo '</tr>' . "\n";
264 echo '<tr>' . "\n";
265 /**/
266 echo '<td>' . "\n";
267 echo '<input type="text" name="ws_plugin__s2member_amazon_s3_files_bucket" id="ws-plugin--s2member-amazon-s3-files-bucket" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"]) . '" /><br />' . "\n";
268 echo 'Your Amazon® S3 Bucket will be used, instead of the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory.' . "\n";
269 echo '</td>' . "\n";
270 /**/
271 echo '</tr>' . "\n";
272 echo '<tr>' . "\n";
273 /**/
274 echo '<th>' . "\n";
275 echo '<label for="ws-plugin--s2member-amazon-s3-files-access-key">' . "\n";
276 echo 'Amazon® Access Key: ( Access Key ID )' . "\n";
277 echo '</label>' . "\n";
278 echo '</th>' . "\n";
279 /**/
280 echo '</tr>' . "\n";
281 echo '<tr>' . "\n";
282 /**/
283 echo '<td>' . "\n";
284 echo '<input type="text" name="ws_plugin__s2member_amazon_s3_files_access_key" id="ws-plugin--s2member-amazon-s3-files-access-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_access_key"]) . '" /><br />' . "\n";
285 echo 'See: <code>Amazon® Web Services -> Account -> Security Credentials</code>.' . "\n";
286 echo '</td>' . "\n";
287 /**/
288 echo '</tr>' . "\n";
289 echo '<tr>' . "\n";
290 /**/
291 echo '<th>' . "\n";
292 echo '<label for="ws-plugin--s2member-amazon-s3-files-secret-key">' . "\n";
293 echo 'Amazon® Secret Key: ( Secret Access Key )' . "\n";
294 echo '</label>' . "\n";
295 echo '</th>' . "\n";
296 /**/
297 echo '</tr>' . "\n";
298 echo '<tr>' . "\n";
299 /**/
300 echo '<td>' . "\n";
301 echo '<input type="text" name="ws_plugin__s2member_amazon_s3_files_secret_key" id="ws-plugin--s2member-amazon-s3-files-secret-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"]) . '" /><br />' . "\n";
302 echo 'See: <code>Amazon® Web Services -> Account -> Security Credentials</code>.' . "\n";
303 echo '</td>' . "\n";
304 /**/
305 echo '</tr>' . "\n";
306 echo '</tbody>' . "\n";
307 echo '</table>' . "\n";
308 echo '</div>' . "\n";
309 /**/
310 echo '</div>' . "\n";
311 /**/
312 do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_inline_extensions", get_defined_vars ());
313 }
314 /**/
315 do_action ("ws_plugin__s2member_during_down_ops_page_after_left_sections", get_defined_vars ());
316 /**/
317 echo '<div class="ws-menu-page-hr"></div>' . "\n";
318 /**/
319 echo '<p class="submit"><input type="submit" class="button-primary" value="Save All Changes" /></p>' . "\n";
320 /**/
321 echo '</form>' . "\n";
322 /**/
323 echo '</td>' . "\n";
324 /**/
325 echo '<td class="ws-menu-page-table-r">' . "\n";
326 c_ws_plugin__s2member_menu_pages_rs::display ();
327 echo '</td>' . "\n";
328 /**/
329 echo '</tr>' . "\n";
330 echo '</tbody>' . "\n";
331 echo '</table>' . "\n";
332 /**/
333 echo '</div>' . "\n";
334 }
335 }
336 }
337 /**/
338 new c_ws_plugin__s2member_menu_page_down_ops ();
339 ?>