Source Code Documentation


s2member-pro\includes\menu-pages\paypal-ops-sp-email.inc.php


  1. <?php
  2. /**
  3. * Menu page for s2Member Pro ( PayPal® options, Specific Post/Page Email ).
  4. *
  5. * Copyright: © 2009-2011
  6. * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
  7. * ( coded in the USA )
  8. *
  9. * This WordPress® plugin ( s2Member Pro ) is comprised of two parts:
  10. *
  11. * o (1) Its PHP code is licensed under the GPL license, as is WordPress®.
  12. * You should have received a copy of the GNU General Public License,
  13. * along with this software. In the main directory, see: /licensing/
  14. * If not, see: {@link http://www.gnu.org/licenses/}.
  15. *
  16. * o (2) All other parts of ( s2Member Pro ); including, but not limited to:
  17. * the CSS code, some JavaScript code, images, and design;
  18. * are licensed according to the license purchased.
  19. * See: {@link http://www.s2member.com/prices/}
  20. *
  21. * Unless you have our prior written consent, you must NOT directly or indirectly license,
  22. * sub-license, sell, resell, or provide for free; part (2) of the s2Member Pro Module;
  23. * or make an offer to do any of these things. All of these things are strictly
  24. * prohibited with part (2) of the s2Member Pro Module.
  25. *
  26. * Your purchase of s2Member Pro includes free lifetime upgrades via s2Member.com
  27. * ( i.e. new features, bug fixes, updates, improvements ); along with full access
  28. * to our video tutorial library: {@link http://www.s2member.com/videos/}
  29. *
  30. * @package s2Member\Menu_Pages
  31. * @since 1.5
  32. */
  33. if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
  34. exit("Do not access this file directly.");
  35. /**/
  36. if (!class_exists ("c_ws_plugin__s2member_pro_menu_page_paypal_ops_sp_email"))
  37. {
  38. /**
  39. * Menu page for s2Member Pro ( PayPal® options, Specific Post/Page Email ).
  40. *
  41. * @package s2Member\Menu_Pages
  42. * @since 110531
  43. */
  44. class c_ws_plugin__s2member_pro_menu_page_paypal_ops_sp_email
  45. {
  46. public function __construct ()
  47. {
  48. echo '<div class="ws-menu-page-group" title="Specific Post/Page Confirmation Email ( Pro Form )">' . "\n";
  49. /**/
  50. echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-sp-confirmation-email-section">' . "\n";
  51. echo '<h3>Specific Post/Page Confirmation Email ( required, but the default works fine )<br />— specifically for s2Member Pro Form integrations</h3>' . "\n";
  52. echo '<p>This email is sent to new Customers after they successfully complete a PayPal® "Pro Form" submission on your site, for Specific Post/Page Access. ( see: <code>s2Member -> Restriction Options -> Specific Post/Page Access</code> ). This is NOT used for Membership sales, only for Specific Post/Page Access. The <strong>primary</strong> purpose of this email, is to provide the Customer with a receipt, along with a link to access the Specific Post/Page they\'ve purchased access to. If you\'ve created a Specific Post/Page Package ( with multiple Posts/Pages bundled together into one transaction ), this ONE link ( <code>%%sp_access_url%%</code> ) will automatically authenticate them for access to ALL of the Posts/Pages included in their transaction. You may customize this email further, by providing details that are specifically geared to your site.</p>' . "\n";
  53. /**/
  54. echo '<table class="form-table">' . "\n";
  55. echo '<tbody>' . "\n";
  56. echo '<tr>' . "\n";
  57. /**/
  58. echo '<th>' . "\n";
  59. echo '<label for="ws-plugin--s2member-pro-sp-email-recipients">' . "\n";
  60. echo 'Specific Post/Page Confirmation Recipients:' . "\n";
  61. echo '</label>' . "\n";
  62. echo '</th>' . "\n";
  63. /**/
  64. echo '</tr>' . "\n";
  65. echo '<tr>' . "\n";
  66. /**/
  67. echo '<td>' . "\n";
  68. echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_sp_email_recipients" id="ws-plugin--s2member-pro-sp-email-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_sp_email_recipients"]) . '" /><br />' . "\n";
  69. echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
  70. echo '<code>"%%full_name%%" &lt;%%payer_email%%&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
  71. echo '</td>' . "\n";
  72. /**/
  73. echo '</tr>' . "\n";
  74. echo '<tr>' . "\n";
  75. /**/
  76. echo '<th>' . "\n";
  77. echo '<label for="ws-plugin--s2member-pro-sp-email-subject">' . "\n";
  78. echo 'Specific Post/Page Confirmation Email Subject:' . "\n";
  79. echo '</label>' . "\n";
  80. echo '</th>' . "\n";
  81. /**/
  82. echo '</tr>' . "\n";
  83. echo '<tr>' . "\n";
  84. /**/
  85. echo '<td>' . "\n";
  86. echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_sp_email_subject" id="ws-plugin--s2member-pro-sp-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_sp_email_subject"]) . '" /><br />' . "\n";
  87. echo 'Subject Line used in the email sent to a Customer after a successful purchase has occurred through a PayPal® Pro Form, for Specific Post/Page Access.' . "\n";
  88. echo '</td>' . "\n";
  89. /**/
  90. echo '</tr>' . "\n";
  91. echo '<tr>' . "\n";
  92. /**/
  93. echo '<th>' . "\n";
  94. echo '<label for="ws-plugin--s2member-pro-sp-email-message">' . "\n";
  95. echo 'Specific Post/Page Confirmation Email Message:' . "\n";
  96. echo '</label>' . "\n";
  97. echo '</th>' . "\n";
  98. /**/
  99. echo '</tr>' . "\n";
  100. echo '<tr>' . "\n";
  101. /**/
  102. echo '<td>' . "\n";
  103. echo '<textarea name="ws_plugin__s2member_pro_sp_email_message" id="ws-plugin--s2member-pro-sp-email-message" rows="10">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_sp_email_message"]) . '</textarea><br />' . "\n";
  104. echo 'Message Body used in the email sent to a Customer after a successful purchase has occurred through a PayPal® Pro Form, for Specific Post/Page Access.<br /><br />' . "\n";
  105. echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
  106. echo '<ul>' . "\n";
  107. echo '<li><code>%%sp_access_url%%</code> = The full URL ( generated by s2Member ) where the Customer can gain access.</li>' . "\n";
  108. echo '<li><code>%%sp_access_exp%%</code> = Human readable expiration for <code>%%sp_access_url%%</code>. Ex: <em>( link expires in <code>%%sp_access_exp%%</code> )</em>.</li>' . "\n";
  109. echo '<li><code>%%txn_id%%</code> = The PayPal® Transaction ID. PayPal® assigns a unique identifier for every purchase.</li>' . "\n";
  110. echo '<li><code>%%amount%%</code> = The full Amount that you charged for Specific Post/Page Access. This value will <code>always be > 0</code>.</li>' . "\n";
  111. echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
  112. echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
  113. echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
  114. echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
  115. echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
  116. echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
  117. echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
  118. echo '</ul>' . "\n";
  119. /**/
  120. echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
  121. echo '<ul>' . "\n";
  122. echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
  123. echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
  124. echo '</ul>' . "\n";
  125. echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
  126. echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
  127. echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
  128. /**/
  129. echo '</td>' . "\n";
  130. /**/
  131. echo '</tr>' . "\n";
  132. echo '</tbody>' . "\n";
  133. echo '</table>' . "\n";
  134. echo '</div>' . "\n";
  135. /**/
  136. echo '</div>' . "\n";
  137. }
  138. }
  139. }
  140. /**/
  141. new c_ws_plugin__s2member_pro_menu_page_paypal_ops_sp_email ();
  142. ?>

s2member-pro\includes\menu-pages\paypal-ops-sp-email.inc.php

Source Code Documentation