<?php
error_reporting(0); 
include("../../config/ht.php");
session_start();
if(!isset($_SESSION['adminname'])){echo "<script>alert('请重新登录!')</script><script>top.location.href='/$htlj/'</script>";exit;}
$adminname=$_SESSION['adminname'];
$type="where name='$adminname'";
$adminpd=queryall(admin,$type);
if(!$adminpd){echo "<script>alert('请重新登录!')</script><script>top.location.href='/$htlj/'</script>";exit;}
if($adminpd[qx]=='超级管理员'){}else{echo "<script>alert('无权限')</script><script>top.location.href='/$htlj/'</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">
<link rel="stylesheet" href="/layui/css/layui.css" media="all" />
<script src="/layui/layui.js"></script>
<link rel="stylesheet" href="/2019newui/houtai/css/font-awesome.min.css" media="all" />
<link rel="stylesheet" href="/2019newui/houtai/css/admin.css" media="all">
</head>
<body style="padding:10px;">
<div class="tplay-body-div">
<div class="layui-tab">
<ul class="layui-tab-title">
<li class="layui-this">用户相关设置</li>
<li>代理相关设置</li>
<li>链接防封设置</li>
<li>网站相关设置</li>
<li>宣传提示语设置</li>
<li>推广盒子设置</li>
<li>播放设置</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<form class="layui-form" action="" method="post" name="peizhi1" id="peizhi1">
<input type="hidden"  value="peizhi1"   name='lx'>
<div class="layui-form-item">
<label class="layui-form-label">提现最低金额设置</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="js"  value="<?php echo $js?>"   required  lay-verify="required"  class="layui-input"  onkeyup="value=value.replace(/[^\d]/g,'')"  >
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置代理最低的提现金额</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">用户提现费率设置</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="fl"  value="<?php echo $fl?>"   required  lay-verify="required"  class="layui-input"  onkeyup="value=value.replace(/[^\d]/g,'')" >
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置注册时代理默认提现费率</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">用户返佣比例设置</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="fy"  value="<?php echo $fy?>"   required  lay-verify="required"  class="layui-input"  onkeyup="value=value.replace(/[^\d]/g,'')" >
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置用户返佣比例功能</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">返佣最低金额起效</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="yye"  value="<?php echo $yye?>"   required  lay-verify="required"  class="layui-input"  onkeyup="value=value.replace(/[^\d]/g,'')" >
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置代理下级满足条件上级可返佣</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">每日提现最高金额</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="daymoney"  value="<?php echo $daymoney?>"   required  lay-verify="required"  class="layui-input"  onkeyup="value=value.replace(/[^\d]/g,'')" >
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置每日提现上限</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">安全提现金额设置</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="txmoney"  value="<?php echo $txmoney?>"   required  lay-verify="required"  class="layui-input"  onkeyup="value=value.replace(/[^\d]/g,'')" >
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置代理提现单笔金额</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">邀请码收费标准</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="yqm"  value="<?php echo $yqm?>"   required  lay-verify="required"  class="layui-input"  onkeyup="value=value.replace(/[^\d]/g,'')" >
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置邀请码购买的价格</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">设置提现次数</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="txcs"  value="<?php echo $txcs?>"   required  lay-verify="required"  class="layui-input"  onkeyup="value=value.replace(/[^\d]/g,'')" >
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置提现次数</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">打赏金额最小限制</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="zxm"  value="<?php echo $zxm?>"   required  lay-verify="required"  class="layui-input"  onkeyup="value=value.replace(/[^\d]/g,'')" >
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置打赏金额最小限制</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">打赏金额最大限制</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="zdm"  value="<?php echo $zdm?>"   required  lay-verify="required"  class="layui-input"  onkeyup="value=value.replace(/[^\d]/g,'')" >
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置打赏金额最大限制</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">暗雷金额最大限制</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="lm"  value="<?php echo $lm?>"   required  lay-verify="required"  class="layui-input"  onkeyup="value=value.replace(/[^\d]/g,'')" >
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置暗雷金额最大限制</div>
</div>
<div class="layui-form-item">
<button  class="layui-btn" lay-submit="" lay-filter="peizhi1" style="width:770px;">提交</button>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form" action="" method="post" name="peizhi2" id="peizhi2">
<input type="hidden"  value="peizhi2"   name='lx'>
<div class="layui-form-item">
<label class="layui-form-label">金额选择设置</label>
<div class="layui-input-block">
<?php if($sjsz==1){?>
<input type="radio" name="sjsz" value="1" title="开启金额随机" checked="">
<input type="radio" name="sjsz" value="0" title="开启金额固定">
<?php }else{?>
<input type="radio" name="sjsz" value="1" title="开启金额随机">
<input type="radio" name="sjsz" value="0" title="开启金额固定" checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">公私片库模式</label>
<div class="layui-input-block">
<?php if($pic==1){?>
<input type="radio" name="pic" value="1" title="公私片库开启有图预览模式"  checked="">
<input type="radio" name="pic" value="0" title="公私片库开启无图预览模式">
<?php }else{?>
<input type="radio" name="pic" value="1" title="公私片库开启有图预览模式">
<input type="radio" name="pic" value="0" title="公私片库开启无图预览模式"  checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">暗雷功能设置</label>
<div class="layui-input-block">
<?php if($lei==1){?>
<input type="radio" name="lei" value="1" title="开启暗雷功能"  checked="">
<input type="radio" name="lei" value="0" title="关闭暗雷功能">
<?php }else{?>
<input type="radio" name="lei" value="1" title="开启暗雷功能">
<input type="radio" name="lei" value="0" title="关闭暗雷功能"  checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">发布视频设置</label>
<div class="layui-input-block">
<?php if($shipin==1){?>
<input type="radio" name="shipin" value="1" title="允许用户发布视频"  checked="">
<input type="radio" name="shipin" value="0" title="禁止用户发布视频">
<?php }else{?>
<input type="radio" name="shipin" value="1" title="允许用户发布视频">
<input type="radio" name="shipin" value="0" title="禁止用户发布视频"  checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">上传视频审核设置</label>
<div class="layui-input-block">
<?php if($sh==1){?>
<input type="radio" name="sh" value="1" title="上传视频需要审核"  checked="">
<input type="radio" name="sh" value="0" title="上传视频无需审核">
<?php }else{?>
<input type="radio" name="sh" value="1" title="上传视频需要审核">
<input type="radio" name="sh" value="0" title="上传视频无需审核"  checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">预览视频设置</label>
<div class="layui-input-block">
<?php if($yulan==1){?>
<input type="radio" name="yulan" value="1" title="允许用户预览视频"  checked="">
<input type="radio" name="yulan" value="0" title="禁止用户预览视频">
<?php }else{?>
<input type="radio" name="yulan" value="1" title="允许用户预览视频">
<input type="radio" name="yulan" value="0" title="禁止用户预览视频"  checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">邀请码开关</label>
<div class="layui-input-block">
<?php if($yqmkg==1){?>
<input type="radio" name="yqmkg" value="1" title="开启邀请码注册" checked="">
<input type="radio" name="yqmkg" value="0" title="关闭邀请码注册">
<?php }else{?>
<input type="radio" name="yqmkg" value="1" title="开启邀请码注册">
<input type="radio" name="yqmkg" value="0" title="关闭邀请码注册" checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">短网址接口</label>
<div class="layui-input-block">
<?php if($dwzjk==1){?>
<input type="radio" name="dwzjk" value="1" title="T.CN" checked="">
<input type="radio" name="dwzjk" value="2" title="W.URL">
<?php }elseif($dwzjk==2){?>
<input type="radio" name="dwzjk" value="1" title="T.CN">
<input type="radio" name="dwzjk" value="2" title="W.URL" checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">代理模板选择</label>
<div class="layui-input-block">
<?php if($mb==1){?>
<input type="radio" name="mb" value="1" title="开启代理模板选择版块" checked="">
<input type="radio" name="mb" value="0" title="关闭代理模板选择版块">
<?php }else{?>
<input type="radio" name="mb" value="1" title="开启代理模板选择版块">
<input type="radio" name="mb" value="0" title="关闭代理模板选择版块" checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">视频预览时间设置</label>
<div class="layui-input-inline" style="width:570px;">
<input name="shipinsj"  placeholder="请输入视频预览时间设置" autocomplete="off" class="layui-input" type="text" value="<?php echo $shipinsj?>" required lay-verify="required"   onkeyup="value=value.replace(/[^\d]/g,'')">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">文件伪造后缀</label>
<div class="layui-input-inline" style="width:570px;">
<input name="dshz"  placeholder="请输入文件伪造后缀" autocomplete="off" class="layui-input" type="text" value="<?php echo $dshz?>" required lay-verify="required"  id="ht" onkeyup="this.value=this.value.replace(/[^a-z0-9_.]/g,'');" >
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">后台路径</label>
<div class="layui-input-inline" style="width:570px;">
<input name="htlj"  placeholder="请输入后台路径" autocomplete="off" class="layui-input" type="text" value="<?php echo $htlj?>" required lay-verify="required"  id="htlj" onkeyup="this.value=this.value.replace(/[^a-z0-9_.]/g,'');" >
</div>
</div>
<div class="layui-form-item">
<button  class="layui-btn" lay-submit="" lay-filter="peizhi2" style="width:770px;">提交</button>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form" action="" method="post" name="peizhi3" id="peizhi3">
<input type="hidden"  value="peizhi3"   name='lx'>
<div class="layui-form-item">
<label class="layui-form-label">打赏域名开关</label>
<div class="layui-input-block">
<?php if($tz==1){?>
<input type="radio" name="tz" value="1" title="开启多域名随机调用" checked="">
<input type="radio" name="tz" value="0" title="关闭多域名随机调用">
<?php }else{?>
<input type="radio" name="tz" value="1" title="开启多域名随机调用">
<input type="radio" name="tz" value="0" title="关闭多域名随机调用" checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">微信访问</label>
<div class="layui-input-block">
<?php if($wx==1){?>
<input type="radio" name="wx" value="1" title="允许微信浏览器访问" checked="">
<input type="radio" name="wx" value="0" title="提示外部浏览器打开">
<?php }else{?>
<input type="radio" name="wx" value="1" title="允许微信浏览器访问">
<input type="radio" name="wx" value="0" title="提示外部浏览器打开" checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">主域名地址</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="url"  value="<?php echo $url?>"   required  lay-verify="required"  class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置主域名地址</div>
</div>
<div class="layui-form-item">
<button  class="layui-btn" lay-submit="" lay-filter="peizhi3" style="width:770px;">提交</button>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form" action="" method="post" name="peizhi4" id="peizhi4">
<input type="hidden"  value="peizhi4"   name='lx'>
<div class="layui-form-item">
<label class="layui-form-label">网站开关</label>
<div class="layui-input-block">
<?php if($gb==1){?>
<input type="radio" name="gb" value="1" title="开启网站"  checked="">
<input type="radio" name="gb" value="0" title="关闭网站">
<?php }else{?>
<input type="radio" name="gb" value="1" title="开启网站">
<input type="radio" name="gb" value="0" title="关闭网站"  checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">域名检测开关</label>
<div class="layui-input-block">
<?php if($ymjc==1){?>
<input type="radio" name="ymjc" value="1" title="开启域名检测功能" checked="">
<input type="radio" name="ymjc" value="0" title="关闭域名检测功能">
<?php }else{?>
<input type="radio" name="ymjc" value="1" title="开启域名检测功能">
<input type="radio" name="ymjc" value="0" title="关闭域名检测功能" checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">电脑访问开关</label>
<div class="layui-input-block">
<?php if($pc==1){?>
<input type="radio" name="pc" value="1" title="允许电脑访问" checked="">
<input type="radio" name="pc" value="0" title="不允许电脑访问">
<?php }else{?>
<input type="radio" name="pc" value="1" title="允许电脑访问">
<input type="radio" name="pc" value="0" title="不允许电脑访问" checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">扣量开关</label>
<div class="layui-input-block">
<?php if($kl==1){?>
<input type="radio" name="kl" value="1" title="开启扣量" checked="">
<input type="radio" name="kl" value="0" title="关闭扣量">
<?php }else{?>
<input type="radio" name="kl" value="1" title="开启扣量">
<input type="radio" name="kl" value="0" title="关闭扣量" checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">注册开关</label>
<div class="layui-input-block">
<?php if($reg==1){?>
<input type="radio" name="reg" value="1" title="开启注册" checked="">
<input type="radio" name="reg" value="0" title="关闭注册">
<?php }else{?>
<input type="radio" name="reg" value="1" title="开启注册">
<input type="radio" name="reg" value="0" title="关闭注册" checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">网站名称</label>
<div class="layui-input-inline" style="width:570px;">
<input name="name"  placeholder="请输入网站名称" autocomplete="off" class="layui-input" type="text" value="<?php echo $name?>" required lay-verify="required" >
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">电脑访问跳转</label>
<div class="layui-input-inline" style="width:570px;">
<input name="pcurl"  placeholder="请输入电脑访问跳转" autocomplete="off" class="layui-input" type="text" value="<?php echo $pcurl?>" required lay-verify="required" >
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">微信号</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="weixin"  value="<?php echo $weixin?>"   required  lay-verify="required"  class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是显示我也要玩 管理联系的微信号</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">微信二维码</label>
<div class="layui-input-inline" style="width:570px;">
<button type="button" class="layui-btn layui-btn-danger" id="userAvatar" style="margin-left:10px;"><i class="layui-icon">&#xE64A;</i>上传二维码</button>
<br><br><br>
<div class="layui-inline layui-word-aux"><?php if($ewm){?><img src="<?php echo $ewm?>" height="100" width="100" id='pic' ><br><br><?php }?>上传限制 500KB 以内</div>
</div>
</div>
<div class="layui-form-item">
<button  class="layui-btn" lay-submit="" lay-filter="peizhi4" style="width:770px;">提交</button>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form" action="" method="post" name="peizhi5" id="peizhi5">
<input type="hidden"  value="peizhi5"   name='lx'>
<div class="layui-form-item">
<label class="layui-form-label">标题提示</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="tip"  value="<?php echo $tip?>"   required  lay-verify="required"  class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是代理前台私有片库复制链接提示语</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">中部提示</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="tip1"  value="<?php echo $tip1?>"   required  lay-verify="required"  class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是代理前台私有片库复制链接提示语</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">结尾提示</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="tip2"  value="<?php echo $tip2?>"   required  lay-verify="required"  class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是代理前台私有片库复制链接提示语</div>
</div>
<div class="layui-form-item">
<button  class="layui-btn" lay-submit="" lay-filter="peizhi5" style="width:770px;">提交</button>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form" action="" method="post" name="peizhi6" id="peizhi6">
<input type="hidden"  value="peizhi6"   name='lx'>
<div class="layui-form-item">
<label class="layui-form-label">盒子功能开关</label>
<div class="layui-input-block">
<?php if($hezi==1){?>
<input type="radio" name="hezi" value="1" title="开启盒子"  checked="">
<input type="radio" name="hezi" value="0" title="关闭盒子">
<?php }else{?>
<input type="radio" name="hezi" value="1" title="开启盒子">
<input type="radio" name="hezi" value="0" title="关闭盒子"  checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">盒子广告语内容</label>
<div class="layui-input-inline" style="width:570px;">
<textarea name="hezigg" placeholder="请输入盒子广告语内容" class="layui-textarea" style="width:570px;"><?php echo $gg?></textarea>
</div>
</div>
<div class="layui-form-item">
<button  class="layui-btn" lay-submit="" lay-filter="peizhi6" style="width:770px;">提交</button>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form" action="" method="post" name="peizhi7" id="peizhi7">
<input type="hidden"  value="peizhi7"   name='lx'>
<div class="layui-form-item">
<label class="layui-form-label">播放限时</label>
<div class="layui-input-block">
<?php if($playxs==1){?>
<input type="radio" name="playxs" value="1" title="开启播放限时"  checked="">
<input type="radio" name="playxs" value="0" title="关闭播放限时">
<?php }else{?>
<input type="radio" name="playxs" value="1" title="开启播放限时">
<input type="radio" name="playxs" value="0" title="关闭播放限时"  checked="">
<?php }?>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">限时天数</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="playts"  value="<?php echo $playts?>"   required  lay-verify="required"  class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是设置播放链接到期时间，请填写数字</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">描述提示</label>
<div class="layui-input-inline" style="width:570px;">
<input type="text" name="playms"  value="<?php echo $playms?>"   required  lay-verify="required"  class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">*说明：此项功能是播放链接到期描述</div>
</div>
<div class="layui-form-item">
<button  class="layui-btn" lay-submit="" lay-filter="peizhi7" style="width:770px;">提交</button>
</div>
</form>
</div>
</div>
</div>
</div>
<script>
layui.use(['form', 'layedit', 'laydate', 'element', 'jquery', 'upload', 'layer'], function(){
var form = layui.form
,layer   = layui.layer
,layedit = layui.layedit
,element = layui.element
,upload  = layui.upload
,$       = layui.jquery
,laydate = layui.laydate;
form.on('submit(peizhi1)', function (data) {
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type:'POST',
url : "/htpost<?php echo $dshz?>",
data:$("#peizhi1").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);
location.reload();
}
}	
});
return false;
});

form.on('submit(peizhi2)', function (data) {
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
var ht = $("#ht").val();
$.ajax({
type:'POST',
url : "/htpost<?php echo $dshz?>",
data:$("#peizhi2").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.href='/htlogout'+ht+'/';
}
});
}else{
layer.closeAll('loading');
layer.msg(result.msg);
location.reload();
}
}	
});
return false;
});
form.on('submit(peizhi3)', function (data) {
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type:'POST',
url : "/htpost<?php echo $dshz?>",
data:$("#peizhi3").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);
location.reload();
}
}	
});
return false;
});
form.on('submit(peizhi4)', function (data) {
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});

$.ajax({
type:'POST',
url : "/htpost<?php echo $dshz?>",
data:$("#peizhi4").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);
location.reload();
}
}	
});
return false;
});
form.on('submit(peizhi5)', function (data) {
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type:'POST',
url : "/htpost<?php echo $dshz?>",
data:$("#peizhi5").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);
location.reload();
}
}	
});
return false;
});
form.on('submit(peizhi6)', function (data) {
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type:'POST',
url : "/htpost<?php echo $dshz?>",
data:$("#peizhi6").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);
location.reload();
}
}	
});
return false;
});
form.on('submit(peizhi7)', function (data) {
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type:'POST',
url : "/htpost<?php echo $dshz?>",
data:$("#peizhi7").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);
location.reload();
}
}	
});
return false;
});
upload.render({
elem: '#userAvatar'
,url: '/htewm<?php echo $dshz?>'
,size: 500
,done: function(res){
if(res.status=='true'){
layer.msg("上传成功！");
$("#pic").attr("src",res.img);
}
}
});
});
</script>
</body>
</html>