Reminder.template.php 7.5 KB

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