Reminder.template.php 7.8 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.0
  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. </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. <span class="upperframe"><span></span></span>
  47. <div class="roundframe">
  48. <p><strong>', $txt['authentication_options'], ':</strong></p>
  49. <p>
  50. <input type="radio" name="reminder_type" id="reminder_type_email" value="email" checked="checked" class="input_radio" /></dt>
  51. <label for="reminder_type_email">', $txt['authentication_' . $context['account_type'] . '_email'], '</label></dd>
  52. </p>
  53. <p>
  54. <input type="radio" name="reminder_type" id="reminder_type_secret" value="secret" class="input_radio" />
  55. <label for="reminder_type_secret">', $txt['authentication_' . $context['account_type'] . '_secret'], '</label>
  56. </p>
  57. <p class="centertext"><input type="submit" value="', $txt['reminder_continue'], '" class="button_submit" /></p>
  58. </div>
  59. <span class="lowerframe"><span></span></span>
  60. </div>
  61. <input type="hidden" name="uid" value="', $context['current_member']['id'], '" />
  62. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  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. <span class="upperframe"><span></span></span>
  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. <img id="smf_autov_pwmain_img" src="', $settings['images_url'], '/icons/field_invalid.gif" alt="*" />
  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. <img id="smf_autov_pwverify_img" src="', $settings['images_url'], '/icons/field_invalid.gif" alt="*" />
  103. </span>
  104. </dd>
  105. </dl>
  106. <p class="align_center"><input type="submit" value="', $txt['save'], '" class="button_submit" /></p>
  107. </div>
  108. <span class="lowerframe"><span></span></span>
  109. </div>
  110. <input type="hidden" name="code" value="', $context['code'], '" />
  111. <input type="hidden" name="u" value="', $context['memID'], '" />
  112. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  113. </form>
  114. <script type="text/javascript"><!-- // --><![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, $options, $txt, $scripturl, $modSettings;
  128. echo '
  129. <script type="text/javascript" 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. <span class="upperframe"><span></span></span>
  137. <div class="roundframe">
  138. <p class="smalltext">', $context['account_type'] == 'password' ? $txt['enter_new_password'] : $txt['openid_secret_reminder'], '</p>
  139. <dl>
  140. <dt>', $txt['secret_question'], ':</dt>
  141. <dd>', $context['secret_question'], '</dd>
  142. <dt>', $txt['secret_answer'], ':</dt>
  143. <dd><input type="text" name="secret_answer" size="22" class="input_text" /></dd>';
  144. if ($context['account_type'] == 'password')
  145. echo '
  146. <dt>', $txt['choose_pass'], ': </dt>
  147. <dd>
  148. <input type="password" name="passwrd1" id="smf_autov_pwmain" size="22" class="input_password" />
  149. <span id="smf_autov_pwmain_div" style="display: none;">
  150. <img id="smf_autov_pwmain_img" src="', $settings['images_url'], '/icons/field_invalid.gif" alt="*" />
  151. </span>
  152. </dd>
  153. <dt>', $txt['verify_pass'], ': </dt>
  154. <dd>
  155. <input type="password" name="passwrd2" id="smf_autov_pwverify" size="22" class="input_password" />
  156. <span id="smf_autov_pwverify_div" style="display: none;">
  157. <img id="smf_autov_pwverify_img" src="', $settings['images_url'], '/icons/field_valid.gif" alt="*" />
  158. </span>
  159. </dd>';
  160. echo '
  161. </dl>
  162. <p class="align_center"><input type="submit" value="', $txt['save'], '" class="button_submit" /></p>
  163. </div>
  164. <span class="lowerframe"><span></span></span>
  165. </div>
  166. <input type="hidden" name="uid" value="', $context['remind_user'], '" />
  167. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  168. </form>';
  169. if ($context['account_type'] == 'password')
  170. echo '
  171. <script type="text/javascript"><!-- // --><![CDATA[
  172. var regTextStrings = {
  173. "password_short": "', $txt['registration_password_short'], '",
  174. "password_reserved": "', $txt['registration_password_reserved'], '",
  175. "password_numbercase": "', $txt['registration_password_numbercase'], '",
  176. "password_no_match": "', $txt['registration_password_no_match'], '",
  177. "password_valid": "', $txt['registration_password_valid'], '"
  178. };
  179. var verificationHandle = new smfRegister("creator", ', empty($modSettings['password_strength']) ? 0 : $modSettings['password_strength'], ', regTextStrings);
  180. // ]]></script>';
  181. }
  182. ?>