Reminder.template.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <?php
  2. /**
  3. * Simple Machines Forum (SMF)
  4. *
  5. * @package SMF
  6. * @author Simple Machines
  7. * @copyright 2011 Simple Machines
  8. * @license http://www.simplemachines.org/about/smf/license.php BSD
  9. *
  10. * @version 2.1 Alpha 1
  11. */
  12. function template_main()
  13. {
  14. global $context, $settings, $options, $txt, $scripturl;
  15. echo '
  16. <br />
  17. <form action="', $scripturl, '?action=reminder;sa=picktype" method="post" accept-charset="', $context['character_set'], '">
  18. <div class="tborder login">
  19. <div class="cat_bar">
  20. <h3 class="catbg">', $txt['authentication_reminder'], '</h3>
  21. </div>
  22. <span class="upperframe"><span></span></span>
  23. <div class="roundframe">
  24. <p class="smalltext centertext">', $txt['password_reminder_desc'], '</p>
  25. <dl>
  26. <dt>', $txt['user_email'], ':</dt>
  27. <dd><input type="text" name="user" size="30" class="input_text" /></dd>
  28. </dl>
  29. <p class="centertext"><input type="submit" value="', $txt['reminder_continue'], '" class="button_submit" /></p>
  30. </div>
  31. <span class="lowerframe"><span></span></span>
  32. </div>
  33. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  34. <input type="hidden" name="', $context['remind_token_var'], '" value="', $context['remind_token'], '" />
  35. </form>';
  36. }
  37. function template_reminder_pick()
  38. {
  39. global $context, $settings, $options, $txt, $scripturl;
  40. echo '
  41. <br />
  42. <form action="', $scripturl, '?action=reminder;sa=picktype" method="post" accept-charset="', $context['character_set'], '">
  43. <div class="tborder login">
  44. <div class="cat_bar">
  45. <h3 class="catbg">', $txt['authentication_reminder'], '</h3>
  46. </div>
  47. <span class="upperframe"><span></span></span>
  48. <div class="roundframe">
  49. <p><strong>', $txt['authentication_options'], ':</strong></p>
  50. <p>
  51. <input type="radio" name="reminder_type" id="reminder_type_email" value="email" checked="checked" class="input_radio" /></dt>
  52. <label for="reminder_type_email">', $txt['authentication_' . $context['account_type'] . '_email'], '</label></dd>
  53. </p>
  54. <p>
  55. <input type="radio" name="reminder_type" id="reminder_type_secret" value="secret" class="input_radio" />
  56. <label for="reminder_type_secret">', $txt['authentication_' . $context['account_type'] . '_secret'], '</label>
  57. </p>
  58. <p class="centertext"><input type="submit" value="', $txt['reminder_continue'], '" class="button_submit" /></p>
  59. </div>
  60. <span class="lowerframe"><span></span></span>
  61. </div>
  62. <input type="hidden" name="uid" value="', $context['current_member']['id'], '" />
  63. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  64. <input type="hidden" name="', $context['remind_token_var'], '" value="', $context['remind_token'], '" />
  65. </form>';
  66. }
  67. function template_sent()
  68. {
  69. global $context, $settings, $options, $txt, $scripturl;
  70. echo '
  71. <br />
  72. <div class="tborder login" id="reminder_sent">
  73. <div class="cat_bar">
  74. <h3 class="catbg">' . $context['page_title'] . '</h3>
  75. </div>
  76. <p class="information">' . $context['description'] . '</p>
  77. </div>';
  78. }
  79. function template_set_password()
  80. {
  81. global $context, $settings, $options, $txt, $scripturl, $modSettings;
  82. echo '
  83. <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/register.js"></script>
  84. <br />
  85. <form action="', $scripturl, '?action=reminder;sa=setpassword2" name="reminder_form" id="reminder_form" method="post" accept-charset="', $context['character_set'], '">
  86. <div class="tborder login">
  87. <div class="cat_bar">
  88. <h3 class="catbg">', $context['page_title'], '</h3>
  89. </div>
  90. <span class="upperframe"><span></span></span>
  91. <div class="roundframe">
  92. <dl>
  93. <dt>', $txt['choose_pass'], ': </dt>
  94. <dd>
  95. <input type="password" name="passwrd1" id="smf_autov_pwmain" size="22" class="input_password" />
  96. <span id="smf_autov_pwmain_div" style="display: none;">
  97. <img id="smf_autov_pwmain_img" src="', $settings['images_url'], '/icons/field_invalid.gif" alt="*" />
  98. </span>
  99. </dd>
  100. <dt>', $txt['verify_pass'], ': </dt>
  101. <dd>
  102. <input type="password" name="passwrd2" id="smf_autov_pwverify" size="22" class="input_password" />
  103. <span id="smf_autov_pwverify_div" style="display: none;">
  104. <img id="smf_autov_pwverify_img" src="', $settings['images_url'], '/icons/field_invalid.gif" alt="*" />
  105. </span>
  106. </dd>
  107. </dl>
  108. <p class="align_center"><input type="submit" value="', $txt['save'], '" class="button_submit" /></p>
  109. </div>
  110. <span class="lowerframe"><span></span></span>
  111. </div>
  112. <input type="hidden" name="code" value="', $context['code'], '" />
  113. <input type="hidden" name="u" value="', $context['memID'], '" />
  114. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  115. <input type="hidden" name="', $context['remind-sp_token_var'], '" value="', $context['remind-sp_token'], '" />
  116. </form>
  117. <script type="text/javascript"><!-- // --><![CDATA[
  118. var regTextStrings = {
  119. "password_short": "', $txt['registration_password_short'], '",
  120. "password_reserved": "', $txt['registration_password_reserved'], '",
  121. "password_numbercase": "', $txt['registration_password_numbercase'], '",
  122. "password_no_match": "', $txt['registration_password_no_match'], '",
  123. "password_valid": "', $txt['registration_password_valid'], '"
  124. };
  125. var verificationHandle = new smfRegister("reminder_form", ', empty($modSettings['password_strength']) ? 0 : $modSettings['password_strength'], ', regTextStrings);
  126. // ]]></script>';
  127. }
  128. function template_ask()
  129. {
  130. global $context, $settings, $options, $txt, $scripturl, $modSettings;
  131. echo '
  132. <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/register.js"></script>
  133. <br />
  134. <form action="', $scripturl, '?action=reminder;sa=secret2" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator">
  135. <div class="tborder login">
  136. <div class="cat_bar">
  137. <h3 class="catbg">', $txt['authentication_reminder'], '</h3>
  138. </div>
  139. <span class="upperframe"><span></span></span>
  140. <div class="roundframe">
  141. <p class="smalltext">', $context['account_type'] == 'password' ? $txt['enter_new_password'] : $txt['openid_secret_reminder'], '</p>
  142. <dl>
  143. <dt>', $txt['secret_question'], ':</dt>
  144. <dd>', $context['secret_question'], '</dd>
  145. <dt>', $txt['secret_answer'], ':</dt>
  146. <dd><input type="text" name="secret_answer" size="22" class="input_text" /></dd>';
  147. if ($context['account_type'] == 'password')
  148. echo '
  149. <dt>', $txt['choose_pass'], ': </dt>
  150. <dd>
  151. <input type="password" name="passwrd1" id="smf_autov_pwmain" size="22" class="input_password" />
  152. <span id="smf_autov_pwmain_div" style="display: none;">
  153. <img id="smf_autov_pwmain_img" src="', $settings['images_url'], '/icons/field_invalid.gif" alt="*" />
  154. </span>
  155. </dd>
  156. <dt>', $txt['verify_pass'], ': </dt>
  157. <dd>
  158. <input type="password" name="passwrd2" id="smf_autov_pwverify" size="22" class="input_password" />
  159. <span id="smf_autov_pwverify_div" style="display: none;">
  160. <img id="smf_autov_pwverify_img" src="', $settings['images_url'], '/icons/field_valid.gif" alt="*" />
  161. </span>
  162. </dd>';
  163. echo '
  164. </dl>
  165. <p class="align_center"><input type="submit" value="', $txt['save'], '" class="button_submit" /></p>
  166. </div>
  167. <span class="lowerframe"><span></span></span>
  168. </div>
  169. <input type="hidden" name="uid" value="', $context['remind_user'], '" />
  170. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  171. <input type="hidden" name="', $context['remind-sai_token_var'], '" value="', $context['remind-sai_token'], '" />
  172. </form>';
  173. if ($context['account_type'] == 'password')
  174. echo '
  175. <script type="text/javascript"><!-- // --><![CDATA[
  176. var regTextStrings = {
  177. "password_short": "', $txt['registration_password_short'], '",
  178. "password_reserved": "', $txt['registration_password_reserved'], '",
  179. "password_numbercase": "', $txt['registration_password_numbercase'], '",
  180. "password_no_match": "', $txt['registration_password_no_match'], '",
  181. "password_valid": "', $txt['registration_password_valid'], '"
  182. };
  183. var verificationHandle = new smfRegister("creator", ', empty($modSettings['password_strength']) ? 0 : $modSettings['password_strength'], ', regTextStrings);
  184. // ]]></script>';
  185. }
  186. ?>