<?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;}
$id=ubo($_GET["id"]);
$lx=ubo($_GET["lx"]);
$type="where id='$id'";
$hzpay=queryall(hzpay,$type);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312">
<title>【<?php echo $hzpay[name]?>】 支付通道分组列表</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/houtai.css" media="all" />
<link rel="stylesheet" href="/2019newui/houtai/css/font-awesome.min.css" media="all" />
<link rel="stylesheet" href="/2019newui/houtai/css/admin.css" media="all">
<link rel="stylesheet" href="/2019newui/houtai/css/peizhi.css" media="all">
<script src="/2019newui/js/jquery.min.js"></script>
<script src="/layui/layui.js"></script>
<script src="/2019newui/js/bootstrap.min.js"></script>
<style type="text/css">
#tooltip{position:absolute;border:1px solid #ccc;background:#333;padding:2px;display:none;color:#fff;}
</style>
</head>
<body style="padding:10px;">
<div class="tplay-body-div">
<fieldset class="layui-elem-field layui-field-title" style="margin-top:20px;"><legend>【<?php echo $hzpay[name]?>】 支付通道分组列表</legend></fieldset>
<div class="layui-tab layui-tab-brief">
<div class="layui-tab-content">
<div class="layui-form-item">
<div class="layui-inline">
<a class="layui-btn layui-btn-normal addNews_btn pub_btn" data-toggle="modal" data-target="#myPublic2">添加配置</a>
</div>
</div>
</div> 
<table class="layui-table">
<thead>
<tr>
<?php if($lx=='zfbwap'){?>
<th style="text-align:center;">ID</th>
<th style="text-align:center; ">使用状态</th>
<th style="text-align:center;" >通道名称</th>
<th style="text-align:center;" >支付宝partner</th>
<th style="text-align:center;" >支付宝key</th>
<?php }elseif($lx=='wxh5'){?>
<th style="text-align:center;">ID</th>
<th style="text-align:center; ">使用状态</th>
<th style="text-align:center;" >通道名称</th>
<th style="text-align:center;" >微信支付授权域名</th>
<th style="text-align:center;" >微信支付appid</th>
<th style="text-align:center;" >微信支付mchid</th>
<th style="text-align:center;" >微信支付key</th>
<?php }elseif($lx=='wxgzh'){?>
<th style="text-align:center;">ID</th>
<th style="text-align:center; ">使用状态</th>
<th style="text-align:center;" >通道名称</th>
<th style="text-align:center;" >微信支付授权域名</th>
<th style="text-align:center;" >微信支付appid</th>
<th style="text-align:center;" >微信支付mchid</th>
<th style="text-align:center;" >微信支付key</th>
<th style="text-align:center;" >微信支付appsecret</th>
<?php }elseif($lx=='ubofu'){?>
<th style="text-align:center;">ID</th>
<th style="text-align:center; ">使用状态</th>
<th style="text-align:center;" >通道名称</th>
<th style="text-align:center;" >SDK</th>
<th style="text-align:center;" >通知秘钥</th>
<th style="text-align:center;" >支付网关</th>
<?php }else{?>
<th style="text-align:center;">ID</th>
<th style="text-align:center; ">使用状态</th>
<th style="text-align:center;" >通道名称</th>
<th style="text-align:center;" >商户ID</th>
<th style="text-align:center;" >商户秘钥</th>
<?php if($lx=='ysf'){?><th style="text-align:center;" >通信秘钥</th><?php }else{?><th style="text-align:center;" >支付网关</th><?php }?>
<?php }?>
<th style="text-align:center;">分配使用</th>
<th style="text-align:center;">使用者</th>
<th style="text-align:center;">操作</th>
<th style="text-align:center;">设置</th>
</tr>
</thead>
<tbody>
<?php 
$resultyttrt = mysql_query("select id from hzpayto  where biaoshi='$hzpay[biaoshi]'");
$count = mysql_num_rows($resultyttrt); 
?>
<?php if($count == 0){?>
<tr><td  colspan=18  style="text-align:center;"><center>没有记录</center></td></tr>
<?php }?>
<?php 
$query = mysql_query("select * from  hzpayto  where biaoshi='$hzpay[biaoshi]'");
while ($a=mysql_fetch_array($query)) { 
?> 	
<tr>
<?php if($lx=='zfbwap'){?>
<td style="text-align:center;"><?php echo $a[id]?></td>
<td style="text-align:center;" ><div class="layui-form"><input type="checkbox"  name="open"  data-id="<?php echo $a[id]?>"  lay-skin="switch" lay-filter="sz" lay-text="使用中|未使用" <?php if($a[sz]=="1"){?> checked<?php }?>></div></td>
<td style="text-align:center;"><?php echo $a[name]?></td>
<td style="text-align:center;"><?php echo $a[payid]?></td>
<td style="text-align:center;"><?php echo $a[paykey]?></td>
<td style="text-align:center;"><a class="layui-btn layui-btn-xs a_menu layui-btn-primary publish" data-id="<?php echo $a[id]?>" data-toggle="modal" data-target="#fenpei"  data-name="<?php echo $a[name]?>"  data-payid="<?php echo $a[payid]?>"   data-paykey="<?php echo $a[paykey]?>"   data-biaoshi="<?php echo $a[biaoshi]?>"     style="margin-right: 0;font-size:12px;">分配</a></td>
<td style="text-align:center;"><a  class="layui-btn layui-btn-xs layui-btn-normal open_if"   w="100%" h="100%" u="/ht-hzpaylist-<?php echo $a[id]?><?php echo $dshz?>"  n="使用【<?php echo $a[name]?>】配置">使用者列表</a></td>
<td style="text-align:center;">
<a class="layui-btn layui-btn-xs a_menu layui-btn-primary publish_btn" data-id="<?php echo $a[id]?>" data-toggle="modal" data-target="#myPublic"  data-name="<?php echo $a[name]?>"  data-payid="<?php echo $a[payid]?>"   data-paykey="<?php echo $a[paykey]?>"    style="margin-right: 0;font-size:12px;">编辑</a>
<a class="layui-btn layui-btn-xs delete layui-btn-primary"  style="margin-right: 0;font-size:12px;"  onClick="sc('<?php echo $a[id]?>')">删除</a>
</td>
<td style="text-align:center;" ><div class="layui-form"><input type="checkbox"  name="open"  data-id="<?php echo $a[id]?>"  lay-skin="switch" lay-filter="zt" lay-text="设为默认接口|无操作" <?php if($a[zt]=="1"){?> checked<?php }?>></div></td>
<?php }elseif($lx=='wxh5'){?>
<td style="text-align:center;"><?php echo $a[id]?></td>
<td style="text-align:center;" ><div class="layui-form"><input type="checkbox"  name="open"  data-id="<?php echo $a[id]?>"  lay-skin="switch" lay-filter="sz" lay-text="使用中|未使用" <?php if($a[sz]=="1"){?> checked<?php }?>></div></td>
<td style="text-align:center;"><?php echo $a[name]?></td>
<td style="text-align:center;"><?php echo $a[squrl]?></td>
<td style="text-align:center;"><?php echo $a[payid]?></td>
<td style="text-align:center;"><?php echo $a[mchid]?></td>
<td style="text-align:center;"><?php echo $a[paykey]?></td>
<td style="text-align:center;"><a class="layui-btn layui-btn-xs a_menu layui-btn-primary publish" data-id="<?php echo $a[id]?>" data-toggle="modal" data-target="#fenpei"  data-name="<?php echo $a[name]?>"  data-payid="<?php echo $a[payid]?>"   data-paykey="<?php echo $a[paykey]?>"   data-biaoshi="<?php echo $a[biaoshi]?>"   data-squrl="<?php echo $a[squrl]?>"  data-mchid="<?php echo $a[mchid]?>"      style="margin-right: 0;font-size:12px;">分配</a></td>
<td style="text-align:center;"><a  class="layui-btn layui-btn-xs layui-btn-normal open_if"   w="100%" h="100%" u="/ht-hzpaylist-<?php echo $a[id]?><?php echo $dshz?>"  n="使用【<?php echo $a[name]?>】配置">使用者列表</a></td>
<td style="text-align:center;">
<a class="layui-btn layui-btn-xs a_menu layui-btn-primary publish_btn" data-id="<?php echo $a[id]?>" data-toggle="modal" data-target="#myPublic"  data-name="<?php echo $a[name]?>"  data-payid="<?php echo $a[payid]?>"   data-paykey="<?php echo $a[paykey]?>"  data-squrl="<?php echo $a[squrl]?>"  data-mchid="<?php echo $a[mchid]?>"    style="margin-right: 0;font-size:12px;">编辑</a>
<a class="layui-btn layui-btn-xs delete layui-btn-primary"  style="margin-right: 0;font-size:12px;"  onClick="sc('<?php echo $a[id]?>')">删除</a>
</td>
<td style="text-align:center;" ><div class="layui-form"><input type="checkbox"  name="open"  data-id="<?php echo $a[id]?>"  lay-skin="switch" lay-filter="zt" lay-text="设为默认接口|无操作" <?php if($a[zt]=="1"){?> checked<?php }?>></div></td>
<?php }elseif($lx=='wxgzh'){?>
<td style="text-align:center;"><?php echo $a[id]?></td>
<td style="text-align:center;" ><div class="layui-form"><input type="checkbox"  name="open"  data-id="<?php echo $a[id]?>"  lay-skin="switch" lay-filter="sz" lay-text="使用中|未使用" <?php if($a[sz]=="1"){?> checked<?php }?>></div></td>
<td style="text-align:center;"><?php echo $a[name]?></td>
<td style="text-align:center;"><?php echo $a[squrl]?></td>
<td style="text-align:center;"><?php echo $a[payid]?></td>
<td style="text-align:center;"><?php echo $a[mchid]?></td>
<td style="text-align:center;"><?php echo $a[paykey]?></td>
<td style="text-align:center;"><?php echo $a[appsecret]?></td>
<td style="text-align:center;"><a class="layui-btn layui-btn-xs a_menu layui-btn-primary publish" data-id="<?php echo $a[id]?>" data-toggle="modal" data-target="#fenpei"  data-name="<?php echo $a[name]?>"  data-payid="<?php echo $a[payid]?>"   data-paykey="<?php echo $a[paykey]?>"   data-biaoshi="<?php echo $a[biaoshi]?>"   data-squrl="<?php echo $a[squrl]?>"  data-mchid="<?php echo $a[mchid]?>"   data-appsecret="<?php echo $a[appsecret]?>"     style="margin-right: 0;font-size:12px;">分配</a></td>
<td style="text-align:center;"><a  class="layui-btn layui-btn-xs layui-btn-normal open_if"   w="100%" h="100%" u="/ht-hzpaylist-<?php echo $a[id]?><?php echo $dshz?>"  n="使用【<?php echo $a[name]?>】配置">使用者列表</a></td>
<td style="text-align:center;">
<a class="layui-btn layui-btn-xs a_menu layui-btn-primary publish_btn" data-id="<?php echo $a[id]?>" data-toggle="modal" data-target="#myPublic"  data-name="<?php echo $a[name]?>"  data-payid="<?php echo $a[payid]?>"   data-paykey="<?php echo $a[paykey]?>"  data-squrl="<?php echo $a[squrl]?>"  data-mchid="<?php echo $a[mchid]?>"   data-appsecret="<?php echo $a[appsecret]?>"    style="margin-right: 0;font-size:12px;">编辑</a>
<a class="layui-btn layui-btn-xs delete layui-btn-primary"  style="margin-right: 0;font-size:12px;"  onClick="sc('<?php echo $a[id]?>')">删除</a>
</td>
<td style="text-align:center;" ><div class="layui-form"><input type="checkbox"  name="open"  data-id="<?php echo $a[id]?>"  lay-skin="switch" lay-filter="gzhzt" lay-text="设为默认接口|无操作" <?php if($a[zt]=="1"){?> checked<?php }?>></div></td>
<?php }elseif($lx=='ubofu'){?>
<td style="text-align:center;"><?php echo $a[id]?></td>
<td style="text-align:center;" ><div class="layui-form"><input type="checkbox"  name="open"  data-id="<?php echo $a[id]?>"  lay-skin="switch" lay-filter="sz" lay-text="使用中|未使用" <?php if($a[sz]=="1"){?> checked<?php }?>></div></td>
<td style="text-align:center;"><?php echo $a[name]?></td>
<td style="text-align:center;"><?php echo $a[payid]?></td>
<td style="text-align:center;"><?php echo $a[paykey]?></td>
<td style="text-align:center;"><?php echo $a[payurl]?></td>
<td style="text-align:center;"><a class="layui-btn layui-btn-xs a_menu layui-btn-primary publish" data-id="<?php echo $a[id]?>" data-toggle="modal" data-target="#fenpei"  data-name="<?php echo $a[name]?>"  data-payid="<?php echo $a[payid]?>"   data-paykey="<?php echo $a[paykey]?>"    data-payurl="<?php echo $a[payurl]?>"  data-biaoshi="<?php echo $a[biaoshi]?>"     style="margin-right: 0;font-size:12px;">分配</a></td>
<td style="text-align:center;"><a  class="layui-btn layui-btn-xs layui-btn-normal open_if"   w="100%" h="100%" u="/ht-hzpaylist-<?php echo $a[id]?><?php echo $dshz?>"  n="使用【<?php echo $a[name]?>】配置">使用者列表</a></td>
<td style="text-align:center;">
<a class="layui-btn layui-btn-xs a_menu layui-btn-primary publish_btn" data-id="<?php echo $a[id]?>" data-toggle="modal" data-target="#myPublic"  data-name="<?php echo $a[name]?>"  data-payid="<?php echo $a[payid]?>"   data-paykey="<?php echo $a[paykey]?>"   data-payurl="<?php echo $a[payurl]?>"   style="margin-right: 0;font-size:12px;">编辑</a>
<?php if($a[zt]==1){?><?php }else{?><a class="layui-btn layui-btn-xs delete layui-btn-primary"  style="margin-right: 0;font-size:12px;"  onClick="sc('<?php echo $a[id]?>')">删除</a><?php }?>
</td>
<td style="text-align:center;" ><div class="layui-form"><input type="checkbox"  name="open"  data-id="<?php echo $a[id]?>"  lay-skin="switch" lay-filter="zt" lay-text="设为默认接口|无操作" <?php if($a[zt]=="1"){?> checked<?php }?>></div></td>
<?php }else{?>
<td style="text-align:center;"><?php echo $a[id]?></td>
<td style="text-align:center;" ><div class="layui-form"><input type="checkbox"  name="open"  data-id="<?php echo $a[id]?>"  lay-skin="switch" lay-filter="sz" lay-text="使用中|未使用" <?php if($a[sz]=="1"){?> checked<?php }?>></div></td>
<td style="text-align:center;"><?php echo $a[name]?></td>
<td style="text-align:center;"><?php echo $a[payid]?></td>
<td style="text-align:center;"><?php echo $a[paykey]?></td>
<td style="text-align:center;"><?php echo $a[payurl]?></td>
<td style="text-align:center;"><a class="layui-btn layui-btn-xs a_menu layui-btn-primary publish" data-id="<?php echo $a[id]?>" data-toggle="modal" data-target="#fenpei"  data-name="<?php echo $a[name]?>"  data-payid="<?php echo $a[payid]?>"   data-paykey="<?php echo $a[paykey]?>"    data-payurl="<?php echo $a[payurl]?>"  data-biaoshi="<?php echo $a[biaoshi]?>"     style="margin-right: 0;font-size:12px;">分配</a></td>
<td style="text-align:center;"><a  class="layui-btn layui-btn-xs layui-btn-normal open_if"   w="100%" h="100%" u="/ht-hzpaylist-<?php echo $a[id]?><?php echo $dshz?>"  n="使用【<?php echo $a[name]?>】配置">使用者列表</a></td>
<td style="text-align:center;">
<a class="layui-btn layui-btn-xs a_menu layui-btn-primary publish_btn" data-id="<?php echo $a[id]?>" data-toggle="modal" data-target="#myPublic"  data-name="<?php echo $a[name]?>"  data-payid="<?php echo $a[payid]?>"   data-paykey="<?php echo $a[paykey]?>"   data-payurl="<?php echo $a[payurl]?>"   style="margin-right: 0;font-size:12px;">编辑</a>
<a class="layui-btn layui-btn-xs delete layui-btn-primary"  style="margin-right: 0;font-size:12px;"  onClick="sc('<?php echo $a[id]?>')">删除</a>
</td>
<td style="text-align:center;" ><div class="layui-form"><input type="checkbox"  name="open"  data-id="<?php echo $a[id]?>"  lay-skin="switch" lay-filter="zt" lay-text="设为默认接口|无操作" <?php if($a[zt]=="1"){?> checked<?php }?>></div></td>
<?php }?>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<script type="text/javascript">
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('switch(sz)', function (data) {
var zt = this.checked ? 1 : 0,
id = $(this).attr('data-id');
if(zt=='1'){
tip='设置为使用状态吗？';
}else{
tip='取消使用状态吗？';
}
layer.confirm("确认要" +tip , { title: "确认" }, function (index) {
layer.close(index);
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type : "post",
url : "/htpost<?php echo $dshz?>",
dataType: "json",  
async: true,
data: {id: id,lx:'hzpaytosz',zt:zt},
timeout: 10000 ,
success : function(data){
if(data.zt=='1'){  
layer.closeAll('loading');
layer.msg('设置成功');
location.reload();
}else{
layer.closeAll('loading');
layer.msg(data.msg);
location.reload();
} 
},
error:function(){
}
});
}); 
});

form.on('switch(zt)', function (data) {
var zt = this.checked ? 1 : 0,
id = $(this).attr('data-id');
if(zt=='1'){
tip='设置为默认接口吗？';
}else{
tip='取消默认接口吗？';
}
layer.confirm("确认要" +tip , { title: "确认" }, function (index) {
layer.close(index);
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type : "post",
url : "/htpost<?php echo $dshz?>",
dataType: "json",  
async: true,
data: {id: id,lx:'hzpaytozt',zt:zt},
timeout: 10000 ,
success : function(data){
if(data.zt=='1'){  
layer.closeAll('loading');
layer.msg('设置成功');
location.reload();
}else{
layer.closeAll('loading');
layer.msg(data.msg);
location.reload();
} 
},
error:function(){
}
});
}); 
});
<?php if($lx=='wxgzh'){?>
form.on('switch(gzhzt)', function (data) {
var zt = this.checked ? 1 : 0,
id = $(this).attr('data-id');
if(zt=='1'){
tip='设置为默认接口吗？';
}else{
tip='取消默认接口吗？';
}
layer.confirm("确认要" +tip , { title: "确认" }, function (index) {
layer.close(index);
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type : "post",
url : "/htpost<?php echo $dshz?>",
dataType: "json",  
async: true,
data: {id: id,lx:'gzhzt',zt:zt},
timeout: 10000 ,
success : function(data){
if(data.zt=='1'){  
layer.closeAll('loading');
layer.msg('设置成功');
location.reload();
}else{
layer.closeAll('loading');
layer.msg(data.msg);
location.reload();
} 
},
error:function(){
}
});
}); 
});
<?php }?>
});
function sc(id) {
layer.confirm("确认要删除吗，删除后不能恢复", { title: "确认" }, function (index) {
layer.close(index);
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type : "post",
url : "/htpost<?php echo $dshz?>",
dataType: "json",  
async: true,
data: {id: id,lx:'hzpaytosc'},
timeout: 10000 ,
success : function(data){
if(data.zt=='1'){  
layer.closeAll('loading');
layer.msg('删除成功');
location.reload();
} 
},
error:function(){
}
});
}); 
}
</script>
<script type="text/javascript">
$('.pub_btn').on('click', function () {
})
$(function () {
$("#pub_btn").click(function () {
var name = $("#name").val();
var biaoshi ='<?php  echo $hzpay[biaoshi]?>';
var payid = $("#payid").val();
var paykey = $("#paykey").val();
if (name == '') {
layer.msg('通道名称不能为空');
return false;
}
<?php if($lx=='zfbwap'){?>
if (payid == '') {
layer.msg('支付宝partner不能为空');
return false;
}
if (paykey == '') {
layer.msg('支付宝key不能为空');
return false;
}
<?php }elseif($lx=='wxh5'){?>
var squrl = $("#squrl").val();
var mchid = $("#mchid").val();
if (squrl == '') {
layer.msg('授权域名不能为空');
return false;
}
if (mchid == '') {
layer.msg('支付mchid不能为空');
return false;
}
if (payid == '') {
layer.msg('微信支付appid不能为空');
return false;
}
if (paykey == '') {
layer.msg('微信支付key不能为空');
return false;
}
<?php }elseif($lx=='wxgzh'){?>
var squrl = $("#squrl").val();
var mchid = $("#mchid").val();
var appsecret = $("#appsecret").val();
if (squrl == '') {
layer.msg('授权域名不能为空');
return false;
}
if (mchid == '') {
layer.msg('支付mchid不能为空');
return false;
}
if (payid == '') {
layer.msg('微信支付appid不能为空');
return false;
}
if (paykey == '') {
layer.msg('微信支付key不能为空');
return false;
}
if (appsecret == '') {
layer.msg('微信支付appsecret不能为空');
return false;
}
<?php }else{?>
var payurl = $("#payurl").val();

if (paykey == '') {
layer.msg('商户秘钥不能为空');
return false;
}
if (payurl == '') {
layer.msg('网关地址不能为空');
return false;
}
<?php }?>
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type : "post",
url : "/htpost<?php echo $dshz?>",
dataType: "json",  
async: true,
<?php if($lx=='zfbwap'){?>
data: {name:name,biaoshi:biaoshi,lx: 'hzpaytoadd',payid:payid,paykey:paykey},
<?php }elseif($lx=='wxh5'){?>
data: {name:name,biaoshi:biaoshi,lx: 'hzpaytoadd',payid:payid,paykey:paykey,squrl:squrl,mchid:mchid},
<?php }elseif($lx=='wxgzh'){?>
data: {name:name,biaoshi:biaoshi,lx: 'hzpaytoadd',payid:payid,paykey:paykey,squrl:squrl,mchid:mchid,appsecret:appsecret},
<?php }else{?>
data: {name:name,biaoshi:biaoshi,lx: 'hzpaytoadd',payid:payid,paykey:paykey,payurl:payurl},
<?php }?>
timeout: 10000 ,
success : function(data){
if(data.zt=='1'){  
layer.closeAll('loading');
layer.msg('添加成功');
location.reload();
}else{
layer.closeAll('loading');
layer.msg(data.msg);
location.reload();
} 
},
error:function(){
}
});
});
})
<?php if($count =="0"){?>
<?php }else{?>
$(function () {
$("#publish_btn").click(function () {
var id = $("#xg-id").val();
var name = $("#xg-name").val();
var payid = $("#xg-payid").val();
var paykey = $("#xg-paykey").val();
if (name == '') {
layer.msg('通道名称不能为空');
return false;
}
<?php if($lx=='zfbwap'){?>
if (payid == '') {
layer.msg('支付宝partner不能为空');
return false;
}
if (paykey == '') {
layer.msg('支付宝key不能为空');
return false;
}
<?php }elseif($lx=='wxh5'){?>
var squrl = $("#xg-squrl").val();
var mchid = $("#xg-mchid").val();
if (squrl == '') {
layer.msg('授权域名不能为空');
return false;
}
if (mchid == '') {
layer.msg('支付mchid不能为空');
return false;
}
if (payid == '') {
layer.msg('微信支付appid不能为空');
return false;
}
if (paykey == '') {
layer.msg('微信支付key不能为空');
return false;
}
<?php }elseif($lx=='wxgzh'){?>
var squrl = $("#xg-squrl").val();
var mchid = $("#xg-mchid").val();
var appsecret = $("#xg-appsecret").val();
if (squrl == '') {
layer.msg('授权域名不能为空');
return false;
}
if (mchid == '') {
layer.msg('支付mchid不能为空');
return false;
}
if (payid == '') {
layer.msg('微信支付appid不能为空');
return false;
}
if (paykey == '') {
layer.msg('微信支付key不能为空');
return false;
}
if (appsecret == '') {
layer.msg('微信支付appsecret不能为空');
return false;
}
<?php }else{?>
var payurl = $("#xg-payurl").val();
if (paykey == '') {
layer.msg('商户秘钥不能为空');
return false;
}
if (payurl == '') {
layer.msg('网关地址不能为空');
return false;
}
<?php }?>
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type : "post",
url : "/htpost<?php echo $dshz?>",
dataType: "json",  
async: true,
<?php if($lx=='zfbwap'){?>
data: {id:id,name:name,lx: 'hzpaytoxg',payid:payid,paykey:paykey},
<?php }elseif($lx=='wxh5'){?>
data: {id:id,name:name,lx: 'hzpaytoxg',payid:payid,paykey:paykey,squrl:squrl,mchid:mchid},
<?php }elseif($lx=='wxgzh'){?>
data: {id:id,name:name,lx: 'hzpaytoxg',payid:payid,paykey:paykey,squrl:squrl,mchid:mchid,appsecret:appsecret},
<?php }else{?>
data: {id:id,name:name,lx: 'hzpaytoxg',payid:payid,paykey:paykey,payurl:payurl},
<?php }?>
timeout: 10000 ,
success : function(data){
if(data.zt=='1'){  
layer.closeAll('loading');
layer.msg('更新成功');
location.reload();
}else{
layer.closeAll('loading');
layer.msg(data.msg);
location.reload();
} 
},
error:function(){
}
});
});
})
$('.publish_btn').on('click', function () {
<?php if($lx=='zfbwap'){?>
$('#xg-id').val($(this).data('id'));
$('#xg-name').val($(this).data('name'));
$('#xg-payid').val($(this).data('payid'));
$('#xg-paykey').val($(this).data('paykey'));
<?php }elseif($lx=='wxh5'){?>
$('#xg-id').val($(this).data('id'));
$('#xg-name').val($(this).data('name'));
$('#xg-payid').val($(this).data('payid'));
$('#xg-paykey').val($(this).data('paykey'));
$('#xg-squrl').val($(this).data('squrl'));
$('#xg-mchid').val($(this).data('mchid'));
<?php }elseif($lx=='wxgzh'){?>
$('#xg-id').val($(this).data('id'));
$('#xg-name').val($(this).data('name'));
$('#xg-payid').val($(this).data('payid'));
$('#xg-paykey').val($(this).data('paykey'));
$('#xg-squrl').val($(this).data('squrl'));
$('#xg-mchid').val($(this).data('mchid'));
$('#xg-appsecret').val($(this).data('appsecret'));
<?php }else{?>
$('#xg-id').val($(this).data('id'));
$('#xg-name').val($(this).data('name'));
$('#xg-payid').val($(this).data('payid'));
$('#xg-paykey').val($(this).data('paykey'));
$('#xg-payurl').val($(this).data('payurl'));
<?php }?>
})
//这是分配的
$(function () {
$("#pub").click(function () {
var id = $("#fenpei-id").val();
var name = $("#fenpei-name").val();
var biaoshi = $("#fenpei-biaoshi").val();
var payid = $("#fenpei-payid").val();
var paykey = $("#fenpei-paykey").val();
var userid = $("#fenpei-user").val();
if (userid == '') {
layer.msg('代理未选择');
return false;
}
<?php if($lx=='wxh5'){?>
var squrl = $("#fenpei-squrl").val();
var mchid = $("#fenpei-mchid").val();
<?php }elseif($lx=='wxgzh'){?>
var squrl = $("#fenpei-squrl").val();
var mchid = $("#fenpei-mchid").val();
var appsecret = $("#fenpei-appsecret").val();
<?php }else{?>
var payurl = $("#fenpei-payurl").val();
<?php }?>
var index = layer.load(3, {
shade: [0.1,'#fff'] 
});
$.ajax({
type : "post",
url : "/htpost<?php echo $dshz?>",
dataType: "json",  
async: true,
<?php if($lx=='zfbwap'){?>
data: {id:id,name:name,lx: 'hzlistadd',payid:payid,paykey:paykey,userid:userid,biaoshi:biaoshi},
<?php }elseif($lx=='wxh5'){?>
data: {id:id,name:name,lx: 'hzlistadd',payid:payid,paykey:paykey,squrl:squrl,mchid:mchid,userid:userid,biaoshi:biaoshi},
<?php }elseif($lx=='wxgzh'){?>
data: {id:id,name:name,lx: 'hzlistadd',payid:payid,paykey:paykey,squrl:squrl,mchid:mchid,appsecret:appsecret,userid:userid,biaoshi:biaoshi},
<?php }elseif($lx=='ubofu'){?>
data: {id:id,name:name,lx: 'hzlistadd',payid:payid,paykey:paykey,payurl:payurl,userid:userid,biaoshi:biaoshi},
<?php }else{?>
data: {id:id,name:name,lx: 'hzlistadd',payid:payid,paykey:paykey,payurl:payurl,userid:userid,biaoshi:biaoshi},
<?php }?>
timeout: 10000 ,
success : function(data){
if(data.zt=='1'){  
layer.closeAll('loading');
layer.msg('分配成功');
location.reload();
}else{
layer.closeAll('loading');
layer.msg(data.msg);
location.reload();
} 
},
error:function(){
}
});
});
})
//这是分配的
//这是分配的
$('.publish').on('click', function () {
<?php if($lx=='zfbwap'){?>
$('#fenpei-id').val($(this).data('id'));
$('#fenpei-name').val($(this).data('name'));
$('#fenpei-payid').val($(this).data('payid'));
$('#fenpei-paykey').val($(this).data('paykey'));
$('#fenpei-biaoshi').val($(this).data('biaoshi'));
<?php }elseif($lx=='wxh5'){?>
$('#fenpei-id').val($(this).data('id'));
$('#fenpei-name').val($(this).data('name'));
$('#fenpei-payid').val($(this).data('payid'));
$('#fenpei-paykey').val($(this).data('paykey'));
$('#fenpei-squrl').val($(this).data('squrl'));
$('#fenpei-mchid').val($(this).data('mchid'));
$('#fenpei-biaoshi').val($(this).data('biaoshi'));
<?php }elseif($lx=='wxgzh'){?>
$('#fenpei-id').val($(this).data('id'));
$('#fenpei-name').val($(this).data('name'));
$('#fenpei-payid').val($(this).data('payid'));
$('#fenpei-paykey').val($(this).data('paykey'));
$('#fenpei-squrl').val($(this).data('squrl'));
$('#fenpei-mchid').val($(this).data('mchid'));
$('#fenpei-appsecret').val($(this).data('appsecret'));
$('#fenpei-biaoshi').val($(this).data('biaoshi'));
<?php }elseif($lx=='ubofu'){?>
$('#fenpei-id').val($(this).data('id'));
$('#fenpei-name').val($(this).data('name'));
$('#fenpei-payid').val($(this).data('payid'));
$('#fenpei-paykey').val($(this).data('paykey'));
$('#fenpei-payurl').val($(this).data('payurl'));
$('#fenpei-biaoshi').val($(this).data('biaoshi'));
<?php }else{?>
$('#fenpei-id').val($(this).data('id'));
$('#fenpei-name').val($(this).data('name'));
$('#fenpei-payid').val($(this).data('payid'));
$('#fenpei-paykey').val($(this).data('paykey'));
$('#fenpei-payurl').val($(this).data('payurl'));
$('#fenpei-biaoshi').val($(this).data('biaoshi'));
<?php }?>
})
//这是分配的
$(function() {
$('.open_if').on('click', function () {
var u = $(this).attr('u');
var w = $(this).attr('w');
var h = $(this).attr('h');
var n = $(this).attr('n');
layer.open({
type: 2,
title: n,
shadeClose: true,
area: [w, h],
content: u
});
});
});
<?php }?>
</script>
<div class="modal fade layui-form" id="myPublic2" tabindex="-1" role="dialog" aria-labelledby="myPublicLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">添加通道</h4>
</div>
<?php if($lx=='zfbwap'){?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="name" placeholder="输入通道名称" required >
</div>
<div class="form-group">
<label  class="control-label">支付宝partner</label>
<input type="text"  class="layui-input" id="payid" placeholder="请输入支付宝partner" required >
</div>
<div class="form-group">
<label  class="control-label">支付宝key</label>
<input type="text"  class="layui-input" id="paykey" placeholder="请输入支付宝key" required >
</div>
<?php }elseif($lx=='wxh5'){?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="name" placeholder="输入通道名称" required >
</div>
<div class="form-group">
<label  class="control-label">微信授权域名</label>
<input type="text"  class="layui-input" id="squrl" placeholder="请输入微信授权域名" required >
</div>
<div class="form-group">
<label  class="control-label">微信appid</label>
<input type="text"  class="layui-input" id="payid" placeholder="请输入微信appid" required >
</div>
<div class="form-group">
<label  class="control-label">微信mchid</label>
<input type="text"  class="layui-input" id="mchid" placeholder="请输入微信mchid" required >
</div>
<div class="form-group">
<label  class="control-label">微信支付key</label>
<input type="text"  class="layui-input" id="paykey" placeholder="请输入微信支付key" required >
</div>
<?php }elseif($lx=='wxgzh'){?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="name" placeholder="输入通道名称" required >
</div>
<div class="form-group">
<label  class="control-label">微信授权域名</label>
<input type="text"  class="layui-input" id="squrl" placeholder="请输入微信授权域名" required >
</div>
<div class="form-group">
<label  class="control-label">微信appid</label>
<input type="text"  class="layui-input" id="payid" placeholder="请输入微信appid" required >
</div>
<div class="form-group">
<label  class="control-label">微信mchid</label>
<input type="text"  class="layui-input" id="mchid" placeholder="请输入微信mchid" required >
</div>
<div class="form-group">
<label  class="control-label">微信支付key</label>
<input type="text"  class="layui-input" id="paykey" placeholder="请输入微信支付key" required >
</div>
<div class="form-group">
<label  class="control-label">微信支付appsecret</label>
<input type="text"  class="layui-input" id="appsecret" placeholder="请输入微信支付key" required >
</div>
<?php }elseif($lx=='ubofu'){?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="name" placeholder="输入通道名称" required >
</div>
<div class="form-group">
<label  class="control-label">SDK</label>
<input type="text"  class="layui-input" id="payid" placeholder="请输入SDK" required >
</div>
<div class="form-group">
<label  class="control-label">通知秘钥</label>
<input type="text"  class="layui-input" id="paykey" placeholder="请输入通知秘钥" required >
</div>
<div class="form-group">
<label  class="control-label">网关地址</label>
<input type="text"  class="layui-input" id="payurl" placeholder="请输入网关地址" required >
</div>
<?php }else{?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="name" placeholder="输入通道名称" required >
</div>
<div class="form-group">
<label  class="control-label">商户ID</label>
<input type="text"  class="layui-input" id="payid" placeholder="请输入商户ID" required >
</div>
<div class="form-group">
<label  class="control-label">商户秘钥</label>
<input type="text"  class="layui-input" id="paykey" placeholder="请输入商户秘钥" required >
</div>
<?php if($lx=='ysf'){?>
<div class="form-group">
<label  class="control-label">通信秘钥</label>
<input type="text"  class="layui-input" id="payurl" placeholder="请输入通信秘钥" required >
</div>
<?php }else{?>
<div class="form-group">
<label  class="control-label">网关地址</label>
<input type="text"  class="layui-input" id="payurl" placeholder="请输入网关地址" required >
</div>
<?php }?>
<?php }?>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" id="pub_btn" class="btn btn-primary">确认</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade layui-form" id="fenpei" tabindex="-1" role="dialog" aria-labelledby="myPublicLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">分配通道</h4>
</div>
<input type="hidden" name="id" class="form-control" id="fenpei-id">
<input type="hidden" name="biaoshi" class="form-control" id="fenpei-biaoshi">
<?php if($lx=='zfbwap'){?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">代理ID</label>
<input type="text"  class="layui-input" id="fenpei-user" placeholder="输入代理ID 比如10000-10050" >
</div>
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="fenpei-name" placeholder="输入通道名称"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">支付宝partner</label>
<input type="text"  class="layui-input" id="fenpei-payid" placeholder="请输入支付宝partner"  readonly="readonly" >
</div>
<div class="form-group">
<label  class="control-label">支付宝key</label>
<input type="text"  class="layui-input" id="fenpei-paykey" placeholder="请输入支付宝key"  readonly="readonly" >
</div>

<?php }elseif($lx=='wxh5'){?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">代理ID</label>
<input type="text"  class="layui-input" id="fenpei-user" placeholder="输入代理ID 比如10000-10050" >
</div>
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="fenpei-name" placeholder="输入通道名称"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">微信授权域名</label>
<input type="text"  class="layui-input" id="fenpei-squrl" placeholder="请输入微信授权域名"  readonly="readonly" >
</div>
<div class="form-group">
<label  class="control-label">微信appid</label>
<input type="text"  class="layui-input" id="fenpei-payid" placeholder="请输入微信appid"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">微信mchid</label>
<input type="text"  class="layui-input" id="fenpei-mchid" placeholder="请输入微信mchid"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">微信支付key</label>
<input type="text"  class="layui-input" id="fenpei-paykey" placeholder="请输入微信支付key"  readonly="readonly">
</div>

<?php }elseif($lx=='wxgzh'){?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">代理ID</label>
<input type="text"  class="layui-input" id="fenpei-user" placeholder="输入代理ID 比如10000-10050" >
</div>
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="fenpei-name" placeholder="输入通道名称"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">微信授权域名</label>
<input type="text"  class="layui-input" id="fenpei-squrl" placeholder="请输入微信授权域名"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">微信appid</label>
<input type="text"  class="layui-input" id="fenpei-payid" placeholder="请输入微信appid"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">微信mchid</label>
<input type="text"  class="layui-input" id="fenpei-mchid" placeholder="请输入微信mchid"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">微信支付key</label>
<input type="text"  class="layui-input" id="fenpei-paykey" placeholder="请输入微信支付key"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">微信支付appsecret</label>
<input type="text"  class="layui-input" id="fenpei-appsecret" placeholder="请输入微信支付key"  readonly="readonly">
</div>
<?php }elseif($lx=='ubofu'){?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">代理ID</label>
<input type="text"  class="layui-input" id="fenpei-user" placeholder="输入代理ID 比如10000-10050" >
</div>
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="fenpei-name" placeholder="输入通道名称"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">SDK</label>
<input type="text"  class="layui-input" id="fenpei-payid" placeholder="请输入SDK"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">通知秘钥</label>
<input type="text"  class="layui-input" id="fenpei-paykey" placeholder="请输入通知秘钥"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">网关地址</label>
<input type="text"  class="layui-input" id="fenpei-payurl" placeholder="请输入网关地址"   readonly="readonly">
</div>
<?php }else{?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">代理ID</label>
<input type="text"  class="layui-input" id="fenpei-user" placeholder="输入代理ID 比如10000-10050"  >
</div>
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="fenpei-name" placeholder="输入通道名称"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">商户ID</label>
<input type="text"  class="layui-input" id="fenpei-payid" placeholder="请输入商户ID"  readonly="readonly">
</div>
<div class="form-group">
<label  class="control-label">商户秘钥</label>
<input type="text"  class="layui-input" id="fenpei-paykey" placeholder="请输入商户秘钥"  readonly="readonly">
</div>
<?php if($lx=='ysf'){?>
<div class="form-group">
<label  class="control-label">通信秘钥</label>
<input type="text"  class="layui-input" id="fenpei-payurl" placeholder="请输入通信秘钥"   readonly="readonly">
</div>
<?php }else{?>
<div class="form-group">
<label  class="control-label">网关地址</label>
<input type="text"  class="layui-input" id="fenpei-payurl" placeholder="请输入网关地址"   readonly="readonly">
</div>
<?php }?>
<?php }?>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" id="pub" class="btn btn-primary">确认</button>
</div>
</div>
</div>
</div>
</div>
<?php if($count =="0"){?>
<?php }else{?>
<div class="modal fade layui-form" id="myPublic" tabindex="-1" role="dialog" aria-labelledby="myPublicLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">修改通道</h4>
</div>
<div class="modal-body">
<input type="hidden" name="id" class="form-control" id="xg-id">
<?php if($lx=='zfbwap'){?>
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="xg-name" placeholder="输入通道名称" required >
</div>
<div class="form-group">
<label  class="control-label">支付宝partner</label>
<input type="text"  class="layui-input" id="xg-payid" placeholder="请输入支付宝partner" required >
</div>
<div class="form-group">
<label  class="control-label">支付宝key</label>
<input type="text"  class="layui-input" id="xg-paykey" placeholder="请输入支付宝key" required >
</div>
<?php }elseif($lx=='wxh5'){?>
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="xg-name" placeholder="输入通道名称" required >
</div>
<div class="form-group">
<label  class="control-label">微信授权域名</label>
<input type="text"  class="layui-input" id="xg-squrl" placeholder="请输入微信授权域名" required >
</div>
<div class="form-group">
<label  class="control-label">微信appid</label>
<input type="text"  class="layui-input" id="xg-payid" placeholder="请输入微信appid" required >
</div>
<div class="form-group">
<label  class="control-label">微信mchid</label>
<input type="text"  class="layui-input" id="xg-mchid" placeholder="请输入微信mchid" required >
</div>
<div class="form-group">
<label  class="control-label">微信支付key</label>
<input type="text"  class="layui-input" id="xg-paykey" placeholder="请输入微信支付key" required >
</div>
<?php }elseif($lx=='wxgzh'){?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="xg-name" placeholder="输入通道名称" required >
</div>
<div class="form-group">
<label  class="control-label">微信授权域名</label>
<input type="text"  class="layui-input" id="xg-squrl" placeholder="请输入微信授权域名" required >
</div>
<div class="form-group">
<label  class="control-label">微信appid</label>
<input type="text"  class="layui-input" id="xg-payid" placeholder="请输入微信appid" required >
</div>
<div class="form-group">
<label  class="control-label">微信mchid</label>
<input type="text"  class="layui-input" id="xg-mchid" placeholder="请输入微信mchid" required >
</div>
<div class="form-group">
<label  class="control-label">微信支付key</label>
<input type="text"  class="layui-input" id="xg-paykey" placeholder="请输入微信支付key" required >
</div>
<div class="form-group">
<label  class="control-label">微信支付appsecret</label>
<input type="text"  class="layui-input" id="xg-appsecret" placeholder="请输入微信支付key" required >
</div>
<?php }elseif($lx=='ubofu'){?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="xg-name" placeholder="输入通道名称" required >
</div>
<div class="form-group">
<label  class="control-label">SDK</label>
<input type="text"  class="layui-input" id="xg-payid" placeholder="请输入SDK" required >
</div>
<div class="form-group">
<label  class="control-label">通知秘钥</label>
<input type="text"  class="layui-input" id="xg-paykey" placeholder="请输入通知秘钥" required >
</div>
<div class="form-group">
<label  class="control-label">网关地址</label>
<input type="text"  class="layui-input" id="xg-payurl" placeholder="请输入网关地址" required >
</div>
<?php }else{?>
<div class="modal-body">
<div class="form-group">
<label  class="control-label">通道名称</label>
<input type="text"  class="layui-input" id="xg-name" placeholder="输入通道名称" required >
</div>
<div class="form-group">
<label  class="control-label">商户ID</label>
<input type="text"  class="layui-input" id="xg-payid" placeholder="请输入商户ID" required >
</div>
<div class="form-group">
<label  class="control-label">商户秘钥</label>
<input type="text"  class="layui-input" id="xg-paykey" placeholder="请输入商户秘钥" required >
</div>
<?php if($lx=='ysf'){?>
<div class="form-group">
<label  class="control-label">通信秘钥</label>
<input type="text"  class="layui-input" id="xg-payurl" placeholder="请输入通信秘钥" required >
</div>
<?php }else{?>
<div class="form-group">
<label  class="control-label">网关地址</label>
<input type="text"  class="layui-input" id="xg-payurl" placeholder="请输入网关地址" required >
</div>
<?php }?>
<?php }?>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" id="publish_btn" class="btn btn-primary">确认</button>
</div>
</div>
</div>
</div>
</div>
<?php }?>
</body>
</html>