userinfo.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. <?php require_once 'header.php' ?>
  2. <link rel="stylesheet" href="/view/kindeditor/themes/default/default.css" />
  3. <script charset="utf-8" src="/view/kindeditor/kindeditor-all-min.js"></script>
  4. <script charset="utf-8" src="/view/kindeditor/CN.js"></script>
  5. <style>
  6. #DemoArea
  7. {
  8. width: 220px;
  9. height: 150px;
  10. }
  11. #DemoArea .box-ribbon {
  12. color: #fff;
  13. position: absolute;
  14. line-height: 24px;
  15. text-align: center;
  16. top: 175px;
  17. right: 592px;
  18. width: 100px;
  19. height: 25px;
  20. padding: 1px;
  21. border-radius:2px;
  22. text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.13);
  23. background-color: #5DB9E4;
  24. }
  25. #DemoArea img{
  26. border-radius:10px;
  27. margin:0;
  28. padding:0;
  29. margin-left: 10px;
  30. background-color: #ffffff;
  31. border: 1px solid #c3c3c3;
  32. width:100%;
  33. height:100%;
  34. }
  35. </style>
  36. <script type="text/javascript">
  37. <!--
  38. function test_demo_val(strValue)
  39. {
  40. var strId="DemoArea"
  41. document.getElementById(strId).style.borderRadius=strValue;
  42. document.getElementById("CodeValue").innerHTML=strValue;
  43. }
  44. //-->
  45. </script>
  46. <script>
  47. var editor;
  48. KindEditor.ready(function(K) {
  49. var editor = K.editor({
  50. allowFileManager : true
  51. });
  52. K('#image3').click(function() {
  53. editor.loadPlugin('image', function() {
  54. editor.plugin.imageDialog({
  55. showRemote : false,
  56. imageUrl : K('#xuke').val(),
  57. clickFn : function(url, title, width, height, border, align) {
  58. K('#xuke').val(url);
  59. editor.hideDialog();
  60. K('#image3-img').html("<img widht=200 height=200 src="+url+" />");
  61. }
  62. });
  63. });
  64. });
  65. K('#image2').click(function() {
  66. editor.loadPlugin('image', function() {
  67. editor.plugin.imageDialog({
  68. showRemote : false,
  69. imageUrl : K('#yingye').val(),
  70. clickFn : function(url, title, width, height, border, align) {
  71. K('#yingye').val(url);
  72. editor.hideDialog();
  73. K('#image2-img').html("<img widht=200 height=200 src="+url+" />");
  74. }
  75. });
  76. });
  77. });
  78. K('#image1').click(function() {
  79. editor.loadPlugin('image', function() {
  80. editor.plugin.imageDialog({
  81. showRemote : false,
  82. imageUrl : K('#fanbian').val(),
  83. clickFn : function(url, title, width, height, border, align) {
  84. K('#fanbian').val(url);
  85. editor.hideDialog();
  86. K('#image1-img').html("<img widht=200 height=200 src="+url+" />");
  87. }
  88. });
  89. });
  90. });
  91. K('#image4').click(function() {
  92. editor.loadPlugin('image', function() {
  93. editor.plugin.imageDialog({
  94. showRemote : false,
  95. imageUrl : K('#shenfen').val(),
  96. clickFn : function(url, title, width, height, border, align) {
  97. K('#shenfen').val(url);
  98. editor.hideDialog();
  99. K('#image4-img').html("<img widht=200 height=200 src="+url+" />");
  100. }
  101. });
  102. });
  103. });
  104. });
  105. </script>
  106. <div class="row wrapper wrapper-content">
  107. <div class="row">
  108. <div class="col-md-12">
  109. <div class="panel panel-default">
  110. <div class="panel-heading">
  111. <div class="panel-title">
  112. <em class="fa fa-list">
  113. </em>
  114. <?php echo $title ?>
  115. </div>
  116. </div>
  117. <?php if($this->userData['is_state']=='0'):?>
  118. <div class="alert alert-warning" style="margin-bottom:0;">
  119. <span class="glyphicon glyphicon-info-sign">
  120. </span>
  121. &nbsp;您当前的账号状态为
  122. <span class="label label-danger">
  123. 未审核
  124. </span>
  125. ,请继续完善以下信息然后联系客服以便审核。
  126. </div>
  127. <?php endif;?>
  128. <div class="panel-body">
  129. <div class="content-box">
  130. <form class="form-ajax form-horizontal" action="/member/userinfo/editsave"
  131. method="post">
  132. <div class="form-group">
  133. <label class="col-md-2 control-label">
  134. 注册邮箱:
  135. </label>
  136. <div class="col-lg-6">
  137. <div class="input-group">
  138. <input type="text" class="form-control" value="<?php echo $userinfo['email']?>"
  139. disabled><span class="input-group-addon" >
  140. <?php echo $users['is_verify_email']==1 ? '已验证' : '未验证'?>
  141. </span>
  142. </div> </div>
  143. </div>
  144. <div class="form-group">
  145. <label class="col-md-2 control-label">
  146. 手机号码:
  147. </label>
  148. <div class="col-lg-6">
  149. <div class="input-group">
  150. <input type="text" name="phone" class="form-control"
  151. <?php echo $users['is_verify_phone']==1 ? 'value="'.substr_replace($userinfo['phone'],'****',3,4).'"'.' disabled' : 'value="'.$userinfo['phone'].'"'.' required' ?>>
  152. <span class="input-group-btn">
  153. <button class="btn btn-default" <?php echo $users['is_verify_phone']==1 ? 'disabled="disabled"' : '' ?> onclick="showContent('手机验证','/member/userinfo/addsms')" type="button">
  154. <?php echo $users['is_verify_phone']==1 ? '已验证' : '未验证' ?>
  155. </button></span>
  156. </div>
  157. </div>
  158. </div>
  159. <!---
  160. input-group-addon"
  161. --->
  162. <div class="form-group">
  163. <label class="col-md-2 control-label">
  164. 联系QQ:
  165. </label>
  166. <div class="col-md-6">
  167. <input type="text" name="qq" class="form-control" value="<?php echo $userinfo['qq']?>"
  168. required>
  169. </div>
  170. </div>
  171. <div class="form-group">
  172. <label class="col-md-2 control-label">
  173. 真实姓名:
  174. </label>
  175. <div class="col-md-6">
  176. <input type="text" name="realname" class="form-control" value="<?php echo $userinfo['realname']?>"
  177. required>
  178. </div>
  179. </div>
  180. <div class="form-group">
  181. <label class="col-md-2 control-label">
  182. 身份证号:
  183. </label>
  184. <div class="col-md-6">
  185. <input type="text" name="idcard" class="form-control" value="<?php echo $userinfo['idcard']?>"
  186. required>
  187. </div>
  188. </div>
  189. <div class="form-group">
  190. <label class="col-md-2 control-label">
  191. 收款银行:
  192. </label>
  193. <div class="col-md-6">
  194. <select name="batype" class="form-control">
  195. <?php foreach($this->
  196. setConfig->shipBank() as $bank):?>
  197. <option value="<?php echo $bank ?>" <?php echo $userinfo[ 'batype']==$bank ? ' selected' : ''?>
  198. >
  199. <?php echo $bank ?>
  200. </option>
  201. <?php endforeach;?>
  202. </select>
  203. </div>
  204. </div>
  205. <div class="form-group">
  206. <label class="col-md-2 control-label">
  207. 收款银行账号:
  208. </label>
  209. <div class="col-md-6">
  210. <input type="text" name="baname" class="form-control" value="<?php echo $userinfo['baname']?>"
  211. placeholder="银行卡帐号" required>
  212. </div>
  213. </div>
  214. <div class="form-group">
  215. <label class="col-md-2 control-label">
  216. 开户银行地址:
  217. </label>
  218. <div class="col-md-6">
  219. <input type="text" name="baaddr" class="form-control" value="<?php echo $userinfo['baaddr']?>"
  220. placeholder="省份/城市/分行名称" required>
  221. </div>
  222. </div>
  223. <div class="form-group">
  224. <label class="col-md-2 control-label">
  225. 网站名称:
  226. </label>
  227. <div class="col-md-6">
  228. <input type="text" name="sitename" class="form-control" value="<?php echo $userinfo['sitename']?>"
  229. placeholder="填写网站或平台名称" required>
  230. </div>
  231. </div>
  232. <div class="form-group">
  233. <label class="col-md-2 control-label">
  234. 网站地址:
  235. </label>
  236. <div class="col-md-6">
  237. <input type="text" name="siteurl" class="form-control" value="<?php echo $userinfo['siteurl']?>"
  238. placeholder="http://" required>
  239. </div>
  240. </div>
  241. <div class="form-group">
  242. <label class="col-md-2 control-label">
  243. 身份证正面:
  244. </label>
  245. <div class="col-md-6">
  246. <input type="button" id="image4" value="选择图片" />(本地上传)
  247. <input type="hidden" name="shenfen" id="shenfen" class="form-control" value=""
  248. required>
  249. <div id="image4-img">
  250. <?php
  251. if (!$userinfo['shenfen']){
  252. echo "未上传,请上传身份证正面";
  253. }else{
  254. echo "<br><div id='DemoArea'><img src='".$userinfo['shenfen']."' width=300 /><div class='box-ribbon'>已通过认证</div></div>";
  255. }
  256. ?>
  257. </div>
  258. </div>
  259. </div>
  260. <div class="form-group">
  261. <label class="col-md-2 control-label">
  262. 身份证反面:
  263. </label>
  264. <div class="col-md-6">
  265. <input type="button" id="image1" value="选择图片" />(本地上传)
  266. <input type="hidden" name="fanbian" id="fanbian" class="form-control" value=""
  267. required>
  268. <div id="image1-img">
  269. <?php
  270. if (!$userinfo['fanbian']){
  271. echo "未上传,请上传身份证反面";
  272. }else{
  273. echo "<br><div id='DemoArea'><img src='".$userinfo['fanbian']."' width=300 /><div class='box-ribbon'>已通过认证</div></div>";
  274. }
  275. ?>
  276. </div>
  277. </div>
  278. </div>
  279. <div class="form-group">
  280. <label class="col-md-2 control-label">
  281. 营业执照:
  282. </label>
  283. <div class="col-md-6">
  284. <input type="button" id="image2" value="选择图片" />(本地上传)<span style="color:red">个人用户请上传手持身份证照片</span>
  285. <input type="hidden" name="yingye" id="yingye" class="form-control" value=""
  286. required>
  287. <div id="image2-img">
  288. <?php
  289. if (!$userinfo['yingye']){
  290. echo "未上传,请上传营业执照";
  291. }else{
  292. echo "<br><div id='DemoArea'><img src='".$userinfo['yingye']."' width=300 /><div class='box-ribbon'>已通过认证</div></div>";
  293. }
  294. ?></div>
  295. </div>
  296. </div>
  297. <div class="form-group">
  298. <label class="col-md-2 control-label">
  299. 开户许可证:
  300. </label>
  301. <div class="col-md-6">
  302. <input type="button" id="image3" value="选择图片" />(本地上传)<span style="color:red">个人用户请上传结算卡正面照片</span>
  303. <input type="hidden" name="xuke" id="xuke" class="form-control" value=""
  304. required>
  305. <div id="image3-img">
  306. <?php
  307. if (!$userinfo['xuke']){
  308. echo "未上传,请上传开户许可证";
  309. }else{
  310. echo "<br><div id='DemoArea'><img src='".$userinfo['xuke']."' width=300 /><div class='box-ribbon'>已通过认证</div></div>";
  311. }
  312. ?>
  313. </div>
  314. </div>
  315. </div>
  316. <?php if ($users['is_verify_phone']==1) : ?>
  317. <div class="form-group">
  318. <label class="col-md-2 control-label">
  319. 手机验证码:
  320. </label>
  321. <div class="col-lg-6">
  322. <div class="input-group">
  323. <input type="text" id="verifycode" name="verifycode" class="form-control" maxlength="5" required>
  324. <span class="input-group-btn">
  325. <button id="btnSendCode" class="btn btn-default getcode" onClick="getCode(this)" type="button">
  326. <i class="fa fa-mobile"></i> &nbsp;获取手机验证码</button>
  327. </button></span>
  328. </div>
  329. </div>
  330. </div>
  331. <?php endif;?>
  332. <div class="form-group">
  333. <div class="col-md-offset-2 col-md-6">
  334. <button type="submit" class="btn btn-success">
  335. &nbsp;
  336. <i class="fa fa-check-square-o"></i>
  337. &nbsp;保存设置&nbsp;
  338. </button>
  339. </div>
  340. </div>
  341. </form>
  342. </div>
  343. </div>
  344. </div>
  345. </div>
  346. </div>
  347. </div>
  348. </div>
  349. <script type="text/javascript">
  350. var InterValObj; //timer变量,控制时间
  351. var count = 60; //间隔函数,1秒执行
  352. var curCount;//当前剩余秒数
  353. var code = ""; //验证码
  354. var codeLength = 6;//验证码长度
  355. var tel = <?php echo $userinfo['phone'] ?>;
  356. function getCode(obj) {
  357. curCount = count;
  358. if(tel!=''){
  359. //验证手机有效性
  360. var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(14[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
  361. alert(tel);
  362. if(!myreg.test(tel))
  363. {
  364. alert('请输入有效的手机号码!');
  365. return false;
  366. }
  367. $("#btnSendCode").attr("disabled", "true");
  368. $("#btnSendCode").html("请在" + curCount + "秒内输入验证码");
  369. InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器,1秒执行一次
  370. $.ajax({
  371. url: "/sms.php",
  372. type: "Post",
  373. data: "Tel=" + tel,
  374. success: function(msg) {
  375. if (msg == "ok") {
  376. alert("生成成功!请等侍短信提示。")
  377. return;
  378. }
  379. if (msg == "error") {
  380. alert("生成失败!请联系管理员")
  381. return;
  382. }
  383. alert(msg);
  384. }
  385. });
  386. }else{
  387. alert('请填写手机号码');
  388. }
  389. }
  390. function SetRemainTime() {
  391. if (curCount == 0) {
  392. window.clearInterval(InterValObj);//停止计时器
  393. $("#btnSendCode").removeAttr("disabled");//启用按钮
  394. $("#btnSendCode").html("重新发送验证码");
  395. code = ""; //清除验证码。如果不清除,过时间后,输入收到的验证码依然有效
  396. }
  397. else {
  398. curCount--;
  399. $("#btnSendCode").html("请在" + curCount + "秒内输入验证码");
  400. }
  401. }
  402. </script>
  403. <?php require_once 'footer.php' ?>