<?php
error_reporting(0); 
include("../../config/qiantai.php");
session_start();
if(!isset($_SESSION['username'])){echo "<script>alert('请重新登录!')</script><script>top.location.href='/index$dshz'</script>";exit;}
$username=$_SESSION['username'];
$type="where name='$username'";
$user=queryall(user,$type);
$userid=$user['userid'];
if(!$user){echo "<script>alert('请重新登录!')</script><script>top.location.href='/index$dshz'</script>";exit;}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312">
<title>基本资料</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="/2019newui/qiantai/css/x-admin.css" media="all">
<script src="/2019newui/js/jquery.min.js"></script>
<script type="text/javascript" src="/2019newui/js/jquery1.9.min.js"></script>
</head>
<body>
<div class="x-body">
<blockquote class="layui-elem-quote">
<dl class="apps-filter-tr">
<dt><span  class="xb">我的资料</span> <span style="font-size:14px;color:#ff0000">(您当前的推广计费ID：<?php echo $user['userid']?>)</span></dt>
</dl>
<span class="x-right" style="margin-top:-24px;line-height:10px"> <a class="layui-btn-small" style="line-height:10px;margin-top:-2px;float:right"  href="javascript:location.replace(location.href);" title="刷新"><i class="fa fa-refresh"></i></a></span>
</blockquote>

<div class="layui-tab-content" >
<div class="layui-tab-item layui-show">
<form class="layui-form layui-form-pane" action="" method="post" name="FormInfo" id="FormInfo">
<input type="hidden" name="lx"  value="user" />
<div class="layui-form-item">
<label class="layui-form-label">用户昵称</label>
<div class="layui-input-inline" style="width:88%;">
<input type="text" name="nikname" required lay-verify="required" autocomplete="off" value="<?php echo $user['nikname']?>" class="layui-input"  placeholder="请输入用户昵称" >
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">原密码</label>
<div class="layui-input-inline" style="width:88%;">
<input type="text" name="pass" required lay-verify="required" autocomplete="off" value="" class="layui-input"  placeholder="请输入原密码" >
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">新密码</label>
<div class="layui-input-inline" style="width:88%;">
<input type="text" name="newpass" required lay-verify="required" autocomplete="off" value="" class="layui-input"  placeholder="请输入新密码" >
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">联系QQ</label>
<div class="layui-input-inline" style="width:88%;">
<input type="text" name="qq" required lay-verify="required" autocomplete="off" value="<?php echo $user['qq']?>" class="layui-input"  placeholder="请输入联系QQ" >
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">微信号</label>
<div class="layui-input-inline" style="width:88%;">
<input type="text" name="weixin" required lay-verify="required" autocomplete="off" value="<?php echo $user['weixin']?>" class="layui-input" placeholder="请输入微信号" >
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">收款人</label>
<div class="layui-input-inline" style="width:88%;">
<input type="text" name="txname" required lay-verify="required" autocomplete="off" value="<?php echo $user['txname']?>" class="layui-input"  placeholder="请输入收款人" >
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">收款人</label>
<div class="layui-input-inline" style="width:88%;">
<input type="text" name="tixian" required lay-verify="required" autocomplete="off" value="<?php echo $user['tixian']?>" class="layui-input"  placeholder="请输入收款账号" >
</div>
</div>
<div class="layui-form-item"><button class="layui-btn" lay-submit="" lay-filter="FormInfo" style="width:100%;">修改资料</button></div>
</form>
<div style="height:100px;"></div>
</div>
<script src="/layui/layui.js"></script>
<script>
layui.use(['form', 'layedit', 'laydate', 'element', 'jquery', 'layer'], function(){
  var form = layui.form
  ,layer   = layui.layer
  ,layedit = layui.layedit
  ,element = layui.element
 ,$       = layui.jquery
  ,laydate = layui.laydate;
form.on('submit(FormInfo)', function (data) {var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type:'POST',
url : "/post<?php echo $dshz?>",
data:$("#FormInfo").serialize(),
dataType:'json',
success:function(result){
if(result.status == 'true'){
layer.closeAll('loading');
layer.open({
type: 1
,offset: 'auto'
,id: 'layerMsg'
,content: '<div style="padding: 20px 100px;">修改成功</div>'
,btn: '确定'
,btnAlign: 'c'
,shade: 0
,closeBtn: 0
,yes: function(index){
location.reload();
}
});
}else{
layer.closeAll('loading');
layer.msg(result.msg);
}
}	
});
return false;
});
});
</script>
</body>
</html>