8f6a5d4fc140a0aabe30635943c4e39b.php 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  7. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
  8. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
  9. <link rel="stylesheet" type="text/css" href="/Public/Static/css/base.css" />
  10. <link rel="stylesheet" type="text/css" href="/Public/Static/css/nologed.css" />
  11. <title><?php echo ($webname); ?></title>
  12. <style>
  13. ::-webkit-input-placeholder { /* WebKit browsers */
  14. color: #b5b5b5;
  15. font-size: 18px;
  16. }
  17. ::-moz-placeholder { /* Mozilla Firefox 19+ */
  18. color: #b5b5b5;
  19. font-size: 18px;
  20. }
  21. input:focus{background:#F5F5F5;outline: 1px solid #F5F5F5;}
  22. a:hover,a:link,a:visited,a:active{color:#FCD535;text-decoration:none;}
  23. .boxh{height: 90px}
  24. .smsbtn{width:35%;float:right;height:50px;line-height:50px;border-radius:5px;background: #F5F5F5;text-align: center;}
  25. </style>
  26. </head>
  27. <body>
  28. <div class="container-fluid ctbox">
  29. <div class="no_header">
  30. <div onclick="goback();" class="fl bhalf allhg txtl" style="line-height:50px;">
  31. <i class="bi bi-arrow-left fcc fw" style="font-size:26px;"></i>
  32. </div>
  33. </div>
  34. <div class="no_content">
  35. <div class="no_title">
  36. <span class="title_txt fch"><?php echo L('重置密码');?></span>
  37. </div>
  38. <div class="no_inbox">
  39. <div class="inputbox boxh">
  40. <div class="input_title txtl">
  41. <span class="fzmm fcc"><?php echo L('重置密码');?></span>
  42. </div>
  43. <div class="input_div">
  44. <input type="text" class="cinput" id="email" name="email" placeholder="<?php echo L('重置密码');?>" />
  45. </div>
  46. </div>
  47. <div class="inputbox boxh">
  48. <div class="input_title txtl">
  49. <span class="fzmm fcc"><?php echo L('图形验证码');?></span>
  50. </div>
  51. <div class="input_div" style="width:60%;float:left;" >
  52. <input type="text" id="vcode" name="vcode" class="cinput" placeholder="<?php echo L('请输入图形验证码');?>" />
  53. </div>
  54. <div style="width:35%;float:right;padding:0px;" >
  55. <img style="width:100%;height:50px;border-radius:5px;" src="<?php echo U('Verify/code');?>" onclick="this.src=this.src+'?t='+Math.random()" title="<?php echo L('换一张');?>" id="verifycode">
  56. </div>
  57. </div>
  58. <div class="inputbox boxh">
  59. <div class="input_title txtl">
  60. <span class="fzmm fcc"><?php echo L('邮箱验证码');?></span>
  61. </div>
  62. <div class="input_div" style="width:60%;float:left;" >
  63. <input type="text" id="ecode" class="cinput" placeholder="<?php echo L('请输入邮箱验证码');?>" />
  64. </div>
  65. <div class="smsbtn" onclick="emailsend()" id="sendsms">
  66. <span class="fzmmm fcy" id="smsstr"><?php echo L('获取验证码');?></span>
  67. </div>
  68. </div>
  69. <div class="inputbox boxh">
  70. <div class="input_title txtl">
  71. <span class="fzmm fcc"><?php echo L('新密码');?></span>
  72. </div>
  73. <div class="input_div">
  74. <input type="password" id="lpwd" class="cinput" placeholder="<?php echo L('请输入新密码');?>" />
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="no_button_box">
  80. <div onclick="resetpwd()" class="small_hs_btn">
  81. <i class="bi bi-arrow-right bi_right"></i>
  82. </div>
  83. </div>
  84. </div>
  85. </body>
  86. <body>
  87. <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  88. <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
  89. <script type="text/javascript">
  90. function resetpwd(){
  91. var email = $("#email").val();
  92. var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
  93. if(email=='' || email == null){
  94. layer.msg("<?php echo L('请输入邮箱');?>");return false;
  95. }
  96. if(!reg.test(email)){
  97. layer.msg("<?php echo L('邮箱格式不正确');?>");return false;
  98. }
  99. var ecode = $("#ecode").val();
  100. if(ecode == ''){
  101. layer.msg("<?php echo L('请输入邮箱验证码');?>");return false;
  102. }
  103. var lpwd = $("#lpwd").val();
  104. if(lpwd == ''){
  105. layer.msg("<?php echo L('请输入密码');?>");return false;
  106. }
  107. $.post("<?php echo U('Login/resetpwd');?>",
  108. {'email':email,'ecode':ecode,'lpwd':lpwd},
  109. function(data){
  110. if(data.code == 1){
  111. layer.msg(data.info);
  112. setTimeout(function(){
  113. window.location.href = "<?php echo U('Login/index');?>";
  114. },2000);
  115. }else{
  116. layer.msg(data.info);return false;
  117. }
  118. });
  119. }
  120. </script>
  121. <script type="text/javascript">
  122. function emailsend(){
  123. var email = $("#email").val();
  124. var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
  125. if(email=='' || email == null){
  126. layer.msg("<?php echo L('请输入邮箱');?>");return false;
  127. }
  128. if(!reg.test(email)){
  129. layer.msg("<?php echo L('邮箱格式不正确');?>");return false;
  130. }
  131. var vcode = $("#vcode").val();
  132. if(vcode == ''){
  133. layer.msg("<?php echo L('请输入图形验证码');?>");return false;
  134. }
  135. $.post("<?php echo U('Login/findsendcode');?>",
  136. {'email':email,'vcode':vcode},
  137. function(data){
  138. if(data.code == 1){
  139. layer.msg(data.info);
  140. var obj = $("#sendsms");
  141. var strobj = $("#smsstr");
  142. var t = 60;
  143. var interval = setInterval(function() {
  144. obj.removeAttr('onclick');
  145. strobj.text(t + "<?php echo L('秒后再发送');?>");
  146. t--;
  147. if(t < 1){
  148. obj.attr("onclick","emailsend();");
  149. clearInterval(interval);
  150. strobj.text("<?php echo L('获取验证码');?>");
  151. }
  152. },1000);
  153. }else{
  154. layer.msg(data.info);
  155. $("#sendsms").attr("onclick","emailsend();");
  156. $("#smsstr").text("<?php echo L('获取验证码');?>");
  157. $("#verifycode").click();
  158. }
  159. });
  160. }
  161. </script>
  162. <script type="text/javascript">
  163. function goback(){
  164. window.history.back(-1);
  165. }
  166. </script>
  167. </html>