Reminder.template.php 8.3 KB

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