| 1 |
<?php |
| 2 |
/* --------------------------------------------------------------- */ |
| 3 |
|
| 4 |
$_g = stripslashes_deep ($_GET); |
| 5 |
|
| 6 |
/* ------------------------------------------------------------------------------------ */ |
| 7 |
|
| 8 |
if (isset ($_g["_s2member_seeking"]["type"]) /* One of: page|post|catg|ptag|file|ruri */ ) |
| 9 |
echo 'You were trying to access a protected: ' . esc_html ($_g["_s2member_seeking"]["type"]) . '.'; |
| 10 |
|
| 11 |
/* --------------------------------------------------------------- */ |
| 12 |
|
| 13 |
if (isset ($_g["_s2member_seeking"]["page"])) |
| 14 |
echo 'You were trying to access Page ID #' . esc_html ($_g["_s2member_seeking"]["page"]) . '.'; |
| 15 |
|
| 16 |
else if (isset ($_g["_s2member_seeking"]["post"])) |
| 17 |
echo 'You were trying to access Post ID #' . esc_html ($_g["_s2member_seeking"]["post"]) . '.'; |
| 18 |
|
| 19 |
else if (isset ($_g["_s2member_seeking"]["catg"])) |
| 20 |
echo 'You were trying to access Category ID #' . esc_html ($_g["_s2member_seeking"]["catg"]) . '.'; |
| 21 |
|
| 22 |
else if (isset ($_g["_s2member_seeking"]["ptag"])) |
| 23 |
echo 'You were trying to access the Tag ID #' . esc_html ($_g["_s2member_seeking"]["ptag"]) . '.'; |
| 24 |
|
| 25 |
else if (isset ($_g["_s2member_seeking"]["file"])) |
| 26 |
echo 'You were trying to access the File: ' . esc_html ($_g["_s2member_seeking"]["file"]) . '.'; |
| 27 |
|
| 28 |
else if (isset ($_g["_s2member_seeking"]["ruri"]) /* Full URI they were trying to access. */) |
| 29 |
echo 'You were trying to access URI: ' . esc_html (base64_decode ($_g["_s2member_seeking"]["ruri"])) . '.'; |
| 30 |
/* See also: <http://codex.wordpress.org/Function_Reference/site_url>. */ |
| 31 |
/* See also: <http://php.net/manual/en/function.base64-decode.php>. */ |
| 32 |
|
| 33 |
/* --------------------------------------------------------------- */ |
| 34 |
|
| 35 |
if (isset ($_g["_s2member_seeking"]["_uri"]) /* Full URI they were trying to access. */ ) |
| 36 |
echo 'You were trying to access URL: ' . esc_html (site_url(base64_decode($_g["_s2member_seeking"]["_uri"]))) . '.'; |
| 37 |
/* See also: <http://codex.wordpress.org/Function_Reference/site_url>. */ |
| 38 |
/* See also: <http://php.net/manual/en/function.base64-decode.php>. */ |
| 39 |
|
| 40 |
/* ------------------------------------------------------------------------------------ */ |
| 41 |
|
| 42 |
if (isset ($_g["_s2member_req"]["type"]) /* One of: level|ccap|sp */) |
| 43 |
echo 'You were trying to access content that requires: ' . esc_html ($_g["_s2member_req"]["type"]) . '.'; |
| 44 |
|
| 45 |
/* --------------------------------------------------------------- */ |
| 46 |
|
| 47 |
if (isset ($_g["_s2member_req"]["level"])) |
| 48 |
echo 'You must be a Member at Level #' . esc_html ($_g["_s2member_req"]["level"]) . ' or higher.'; |
| 49 |
|
| 50 |
else if (isset ($_g["_s2member_req"]["ccap"])) |
| 51 |
echo 'You must be a Member with Custom Capability: ' . esc_html ($_g["_s2member_req"]["ccap"]) . '.'; |
| 52 |
|
| 53 |
else if (isset ($_g["_s2member_req"]["sp"])) |
| 54 |
echo 'You must purchase Specific Post/Page ID #' . esc_html ($_g["_s2member_req"]["sp"]) . '.'; |
| 55 |
|
| 56 |
/* ------------------------------------------------------------------------------------ */ |
| 57 |
|
| 58 |
if (isset ($_g["_s2member_res"]["type"]) /* One of: post|page|catg|ptag|file|ruri|ccap|sp|sys */) |
| 59 |
echo 'You were trying to access content protected via s2Member: ' . esc_html ($_g["_s2member_res"]["type"]) . ' restrictions.'; |
| 60 |
?> |