forgot_pwd.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <?php
  2. #忘记
  3. require_once '../path.php';
  4. require_once "../public/load_lang.php";
  5. require_once "../public/function.php";
  6. ?>
  7. <!DOCTYPE html>
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  11. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  12. <link type="text/css" rel="stylesheet" href="../studio/css/font.css"/>
  13. <link type="text/css" rel="stylesheet" href="../studio/css/style.css"/>
  14. <link type="text/css" rel="stylesheet" href="../studio/css/color_day.css" id="colorchange" />
  15. <title>wikipali reset password</title>
  16. <script src="../public/js/comm.js"></script>
  17. <script src="../studio/js/jquery-3.3.1.min.js"></script>
  18. <script src="../studio/js/fixedsticky.js"></script>
  19. <style>
  20. #login_body{
  21. display: flex;
  22. padding: 2em;
  23. margin: auto;
  24. }
  25. #login_left {
  26. padding-right: 12em;
  27. padding-top: 5em;
  28. }
  29. .title{
  30. font-size: 150%;
  31. margin-top: 1em;
  32. margin-bottom: 0.5em;
  33. }
  34. #login_form{
  35. padding: 2em 0 1em 0;
  36. }
  37. #tool_bar {
  38. padding: 1em;
  39. display: flex;
  40. justify-content: space-between;
  41. }
  42. #login_shortcut {
  43. display: flex;
  44. flex-direction: column;
  45. padding: 2em 0;
  46. }
  47. #login_shortcut button{
  48. height:3em;
  49. }
  50. #button_area{
  51. text-align: right;
  52. padding: 1em 0;
  53. }
  54. .form_help{
  55. font-weight: 400;
  56. color: var(--bookx);
  57. }
  58. .login_form input{
  59. margin-top:2em;
  60. padding:0.5em 0.5em;
  61. }
  62. .login_form select{
  63. margin-top:2em;
  64. padding:0.5em 0.5em;
  65. }
  66. .login_form input[type="submit"]{
  67. margin-top:2em;
  68. padding:0.1em 0.5em;
  69. }
  70. .form_error{
  71. color:var(--error-text);
  72. }
  73. #login_form_div{
  74. width:30em;
  75. }
  76. #ucenter_body {
  77. display: flex;
  78. flex-direction: column;
  79. margin: 0;
  80. padding: 0;
  81. background-color: var(--tool-bg-color3);
  82. color: var(--btn-color);
  83. }
  84. .icon_big {
  85. height: 2em;
  86. width: 2em;
  87. fill: var(--btn-color);
  88. transition: all 0.2s ease;
  89. }
  90. .form_field_name{
  91. position: absolute;
  92. margin-left: 7px;
  93. margin-top: 2em;
  94. color: var(--btn-border-line-color);
  95. -webkit-transition-duration: 0.4s;
  96. -moz-transition-duration: 0.4s;
  97. transition-duration: 0.4s;
  98. transform: translateY(0.5em);
  99. }
  100. .viewswitch_on {
  101. position: absolute;
  102. margin-left: 7px;
  103. margin-top: 1.5em;
  104. color: var(--bookx);
  105. -webkit-transition-duration: 0.4s;
  106. -moz-transition-duration: 0.4s;
  107. transition-duration: 0.4s;
  108. transform: translateY(-15px);
  109. }
  110. </style>
  111. <script>
  112. function login_init(){
  113. $("input").focus(function(){
  114. let name = $(this).attr("name");
  115. var objNave = document.getElementById("tip_"+name);
  116. objNave.className = "viewswitch_on";
  117. });
  118. $(".form_field_name").click(function(){
  119. let id = $(this).attr("id");
  120. var objNave = document.getElementById(id);
  121. objNave.className = "viewswitch_on";
  122. let arrId=id.split("_");
  123. document.getElementById('input_'+arrId[1]).focus();
  124. });
  125. }
  126. </script>
  127. <link type="text/css" rel="stylesheet" href="mobile.css" media="screen and (max-width:800px)">
  128. </head>
  129. <body id="ucenter_body" onload="login_init()">
  130. <div id="tool_bar">
  131. </div>
  132. <div id="login_body" >
  133. <div id="login_left">
  134. <div >
  135. <svg style="height: 8em;width: 25em;">
  136. <use xlink:href="../public/images/svg/wikipali_login_page.svg#logo_login"></use>
  137. </svg>
  138. </div>
  139. <div style=" padding: 1em 0 0 3.5em;font-weight: 400;">
  140. <?php echo $_local->gui->pali_literature_platform; ?>
  141. <ul style="padding-left: 1.2em;">
  142. <li><?php echo $_local->gui->online_dict_db; ?></li>
  143. <li><?php echo $_local->gui->user_data_share; ?></li>
  144. <li><?php echo $_local->gui->cooperate_edit; ?></li>
  145. </ul>
  146. </div>
  147. </div>
  148. <div id="login_right">
  149. <div id = "login_form_div" class="fun_block" >
  150. <div class="title">
  151. 忘记密码?
  152. </div>
  153. <div class="login_new">
  154. <span class="form_help"><?php echo $_local->gui->have_account; ?> ?</span><a href="index.php?language=<?php echo $currLanguage; ?>">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $_local->gui->login; //登入账户 ?></a>
  155. </div>
  156. <div class="login_form" style=" padding: 3em 0 3em 0;">
  157. <div class="form_help">
  158. 我们将向您的注册邮箱发送电子邮件。里面包含了重置密码链接。点击链接后按照提示操作,重置账户密码。
  159. </div>
  160. <div class="form_help" id="message"> </div>
  161. <form action="../api/user.php" method="get">
  162. <div>
  163. <div>
  164. <span id='tip_email' class='form_field_name'><?php echo $_local->gui->email_address; ?></span>
  165. <input id="form_email" type="input" name="email" value="" />
  166. </div>
  167. <div id="error_email" class="form_error"> </div>
  168. <div class="form_help"></div>
  169. </div>
  170. <input type="hidden" name="_method" value="reset_email" />
  171. </form>
  172. <div id="button_area">
  173. <button onclick="submit()" style="background-color: var(--link-hover-color);border-color: var(--link-hover-color);" >
  174. <?php echo $_local->gui->continue; ?>
  175. </button>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. <script>
  182. login_init();
  183. function submit(){
  184. $.getJSON(
  185. "../api/user.php",
  186. {
  187. _method:"reset_email",
  188. email:$("#form_email").val()
  189. }
  190. ).done(function (data) {
  191. $("#message").text(data.message);
  192. if(data.ok){
  193. $("#message").removeClass("form_error");
  194. }else{
  195. $("#message").addClass("form_error");
  196. }
  197. }).fail(function(jqXHR, textStatus, errorThrown){
  198. $("#message").removeClass("form_error");
  199. $("#message").text(textStatus);
  200. switch (textStatus) {
  201. case "timeout":
  202. break;
  203. case "error":
  204. switch (jqXHR.status) {
  205. case 404:
  206. break;
  207. case 500:
  208. break;
  209. default:
  210. break;
  211. }
  212. break;
  213. case "abort":
  214. break;
  215. case "parsererror":
  216. console.log("delete-parsererror",jqXHR.responseText);
  217. break;
  218. default:
  219. break;
  220. }
  221. });
  222. }
  223. </script>
  224. </body>
  225. </html>