Reminder.template.php 7.9 KB

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