c8aaf1d9f4a9a380b52972c345b1e98d.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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. <style>
  27. .button {
  28. background-color: #4CAF50; /* Green */
  29. border: none;
  30. color: white;
  31. padding: 16px 32px;
  32. text-align: center;
  33. text-decoration: none;
  34. display: inline-block;
  35. font-size: 16px;
  36. margin: 4px 2px;
  37. -webkit-transition-duration: 0.4s; /* Safari */
  38. transition-duration: 0.4s;
  39. cursor: pointer;
  40. }
  41. .button4{
  42. background-color: white;
  43. color: black;
  44. border: 2px solid #e7e7e7;
  45. }
  46. .button4:hover {
  47. background-color: #e7e7e7;
  48. }
  49. </style>
  50. </head>
  51. <body>
  52. <div class="container-fluid ctbox">
  53. <div class="no_header">
  54. <div class="fl bhalf allhg txtl" style="line-height:50px;">
  55. <i class="bi bi-x fcc fw" onclick="goindex()" style="font-size:36px;"></i>
  56. </div>
  57. <div class="fr bhalf allhg txtr" style="line-height:50px;">
  58. <a href="<?php echo U('Login/index');?>" class="fzmmm fcy"><?php echo L('登录');?></a>
  59. </div>
  60. </div>
  61. <div class="no_content">
  62. <div class="no_title">
  63. <span class="title_txt fch"><?php echo L('注册');?></span>
  64. </div>
  65. <!-- <button class="button button4" onclick="shou()" id="shou">手机号</button>-->
  66. <!-- <button class="button button4" onclick="you()" id="you">邮箱</button>-->
  67. <div class="no_inbox">
  68. <div class="inputbox boxh" id="yx">
  69. <div class="input_title txtl">
  70. <span class="fzmm fcc"><?php echo L('邮箱');?></span>
  71. </div>
  72. <div class="input_div">
  73. <input type="text" style="height:45px;" class="cinput" name="email" id="email" placeholder="<?php echo L('请输入邮箱');?>" />
  74. </div>
  75. </div>
  76. <input type="hidden" value="2" style="height:45px;" id="yincang" />
  77. <div class="inputbox boxh" id="sj">
  78. <div class="input_title txtl">
  79. <span class="fzmm fcc"><?php echo L('手机');?></span>
  80. </div>
  81. <div class="input_div">
  82. <input type="tel" pattern="^(0|86|17951)?1[0-9]{10}" maxlength="11" required="required" style="height:45px;" id="phone" class="cinput" name="phone" placeholder="<?php echo L('请输入手机号');?>" />
  83. </div>
  84. </div>
  85. <div class="inputbox boxh" hidden>
  86. <div class="input_title txtl">
  87. <span class="fzmm fcc"><?php echo L('图形验证码');?></span>
  88. </div>
  89. <div class="input_div" style="width:60%;float:left;" >
  90. <input type="text" style="height:45px;" class="cinput" name="vcode" id="vcode" placeholder="<?php echo L('请输入图形验证码');?>" />
  91. </div>
  92. <div style="width:35%;float:right;padding:0px;" >
  93. <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">
  94. </div>
  95. </div>
  96. <div class="inputbox boxh">
  97. <div class="input_title txtl">
  98. <span class="fzmm fcc"><?php echo L('邮箱验证码');?></span>
  99. </div>
  100. <div class="input_div" style="width:60%;float:left;" >
  101. <input type="text" style="height:45px;" class="cinput" name="ecode" id="ecode" placeholder="<?php echo L('请输入邮箱验证码');?>" />
  102. </div>
  103. <div class="smsbtn" onclick="emailsend();" id="sendsms">
  104. <span class="fzmm fcy" id="smsstr"><?php echo L('获取验证码');?></span>
  105. </div>
  106. </div>
  107. <div class="inputbox boxh">
  108. <div class="input_title txtl">
  109. <span class="fzmm fcc"><?php echo L('密码');?></span>
  110. </div>
  111. <div class="input_div">
  112. <input type="password" style="height:45px;" class="cinput" name="lpwd" id="lpwd" placeholder="<?php echo L('请输入密码');?>" />
  113. </div>
  114. </div>
  115. <div class="inputbox boxh">
  116. <div class="input_title txtl">
  117. <span class="fzmm fcc"><?php echo L('确认密码');?></span>
  118. </div>
  119. <div class="input_div">
  120. <input type="password" style="height:45px;" class="cinput" name="lpwds" id="lpwds" placeholder="<?php echo L('请确认密码');?>" />
  121. </div>
  122. </div>
  123. <div class="inputbox boxh">
  124. <div class="input_title txtl">
  125. <span class="fzmm fcc"><?php echo L('邀请码');?></span>
  126. </div>
  127. <div class="input_div">
  128. <input type="text" style="height:45px;" class="cinput" value="<?php echo ($qrcode); ?>" id="invit" name="invit" placeholder="<?php echo L('请输入邀请码');?>(<?php echo L('选填');?>)" />
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. <div class="no_button_box">
  134. <div class="regxybox" style="line-height: 25px;">
  135. <span><?php echo L('注册即表示同意');?>&nbsp;&nbsp;</span>
  136. <a href="##" class="fzmm fcy"><?php echo L('用户服务协议');?></a>
  137. </div>
  138. <div class="small_hs_btn" onclick="upreg();">
  139. <i class="bi bi-arrow-right bi_right"></i>
  140. </div>
  141. </div>
  142. </div>
  143. </body>
  144. <body>
  145. <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  146. <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
  147. <script type="text/javascript">
  148. $("#sj").hide();
  149. function you(){
  150. $("#sj").hide();//隐藏div
  151. $("#yx").show();//隐藏div
  152. $("#yincang").val(1);
  153. }
  154. function shou(){
  155. $("#yx").hide();//隐藏div
  156. $("#sj").show();//隐藏div
  157. $("#yincang").val(2);
  158. }
  159. function upreg(){
  160. var yincang = $("#yincang").val();
  161. var email = $("#email").val();
  162. if(yincang != 2 ){
  163. var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
  164. if(email=='' || email == null){
  165. layer.msg("<?php echo L('请输入邮箱');?>");return false;
  166. }
  167. if(!reg.test(email)){
  168. layer.msg("<?php echo L('邮箱格式不正确');?>");return false;
  169. }
  170. }
  171. var ecode = $("#ecode").val();
  172. if(ecode == ''){
  173. layer.msg("<?php echo L('请输入邮箱验证码');?>");return false;
  174. }
  175. var lpwd = $("#lpwd").val();
  176. if(lpwd == ''){
  177. layer.msg("<?php echo L('请输入密码');?>");return false;
  178. }
  179. var invit = $("#invit").val();
  180. var phone = $("#phone").val();
  181. /*if( invit == ''){
  182. layer.msg("<?php echo L('请输入邀请码');?>");return false;
  183. }*/
  184. var lpwds = $("#lpwds").val();
  185. if(lpwd != lpwds){
  186. layer.msg("<?php echo L('两次输入密码不一致');?>");return false;
  187. }
  188. $.post("<?php echo U('Login/upregister');?>",
  189. {'email' : email, 'lpwd' : lpwd, 'invit' : invit ,'phone' : phone,'yincang':1, 'ecode': ecode},
  190. function(data){
  191. if(data.code == 1){
  192. layer.msg(data.info);
  193. setTimeout(function(){
  194. window.location.href="<?php echo U('Login/index');?>";
  195. },2000);
  196. }else{
  197. layer.msg(data.info);return false;
  198. }
  199. }
  200. );
  201. }
  202. </script>
  203. <script type="text/javascript">
  204. function emailsend(){
  205. var email = $("#email").val();
  206. var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
  207. if(email=='' || email == null){
  208. layer.msg("<?php echo L('请输入邮箱');?>");return false;
  209. }
  210. if(!reg.test(email)){
  211. layer.msg("<?php echo L('邮箱格式不正确');?>");return false;
  212. }
  213. var vcode = $("#vcode").val();
  214. // if(vcode == ''){
  215. // layer.msg("<?php echo L('请输入图形验证码');?>");return false;
  216. // }
  217. $.post("<?php echo U('Login/sendcode');?>",
  218. {'email':email,'vcode':vcode},
  219. function(data){
  220. if(data.code == 1){
  221. layer.msg(data.info);
  222. var obj = $("#sendsms");
  223. var strobj = $("#smsstr");
  224. var t = 60;
  225. var interval = setInterval(function() {
  226. obj.removeAttr('onclick');
  227. strobj.text(t + "<?php echo L('秒后再发送');?>");
  228. t--;
  229. if(t < 1){
  230. obj.attr("onclick","emailsend();");
  231. clearInterval(interval);
  232. strobj.text("<?php echo L('获取验证码');?>");
  233. }
  234. },1000);
  235. }else{
  236. layer.msg(data.info);
  237. $("#sendsms").attr("onclick","emailsend();");
  238. $("#smsstr").text("<?php echo L('获取验证码');?>");
  239. $("#verifycode").click();
  240. }
  241. }
  242. )}
  243. </script>
  244. <script type="text/javascript">
  245. function goindex(){
  246. window.location.href="<?php echo U('Index/index');?>";
  247. }
  248. </script>
  249. </html>