<?php
/*
* +----------------------------------------------------------------------
* | Quotes [ 未来很长，我满怀期待 ]
* +----------------------------------------------------------------------
* | Name: 孜然多程序授权系统
* +----------------------------------------------------------------------
* | Team: 孜然云 Qun：678484243
* +----------------------------------------------------------------------
* | Author: 孜然 Qq：2937978586
* +----------------------------------------------------------------------
* | Date: 2022年1月15日 12:24:06
* +----------------------------------------------------------------------
* | Ps: 孜然云团队，孜然原创程序，代码解决请留版权
* +----------------------------------------------------------------------
* | 送给未来孜然: 这年你15岁 初三了，对未来满怀期待但十分不舍的现在初中的美好时光，但你不要
* | 原地踏步，你要看得更长远，你要坚持自己的梦想，不要被他人动摇，要好好赚钱，要成立自己的公
* | 司，要好好爱她，要好好孝顺父母，不要抽烟，不要喝酒，不要碰违法犯罪的事情，好好学习，读个好
* | 高中，上个好大学！
* +----------------------------------------------------------------------
*/
?>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<title>
<?php echo $conf['sitename']?> - <?php echo $conf['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.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="keywords" content="<?php echo $conf['keywords'];?>">
<meta name="description" content="<?php echo $conf['description'];?>">
<link href="//lib.baomitu.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<link rel="stylesheet" href="../assets/libs/layui/css/layui.css" />
<link rel="stylesheet" href="../assets/module/admin.css?v=318" />
<script src="//lib.baomitu.com/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="../assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="../assets/js/common.js?v=318"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<style type="text/css">
       *{
         padding: 0;
         margin: 0;
       }
      
       .layui-anim-upbit .article-tiem{
         position:relative;
         display: inline-block;
         width: 100%;
         background-color: #fff;
         border-radius: 6px;
         overflow: hidden;
         margin-bottom: 8px;
         box-shadow: 0 0 3px 2px #f7f7f7;
       }
       .layui-anim-upbit .article-tiem:hover .article-text {
          color:#0090ff;
       }
       .layui-anim-upbit .article-tiem:hover {
           transform:scale(1.02);
           transition: 0.1s;
           box-shadow: 3px 3px 8px 1px #e5efff;
      }

      .layui-col-space8{margin:0px -12px}
      .layui-col-space8>*{padding:0px 5px}
      .layui-anim-upbit .top-text { 
         position:absolute;
         top: 0;
         left: 0px;
         padding: 0px 8px;
         background-color: #00be72;      
         font-size: 12px;
         border-radius: 0 0 4px 0;
         color: #fff;
       }
       .zuixin {
         background: linear-gradient(to left, #94e3a8, #00bc2f);       
       }
      .remen {
        background: linear-gradient(to left, #ffbca6, #ff0048);
      }
      .layui-anim-upbit a>img{
         width: 100%;
         height: 140px;
         z-index: 0;
         
       }

       .article-content {
         color: #333;
         padding: 4px 6px 8px;
         font-size: 15px;
       }
       .article-content p{
         margin-bottom: 0px;
       }
       .article-content .article-text {
         overflow:hidden;
         white-space:nowrap;
         /*文字超出宽度则显示ellipsis省略号*/
         text-overflow:ellipsis;
       }
       .article-content .labels {
         padding: 4px 4px 2px;
         background-color: #00a5ff;
         background: linear-gradient(to left, #0091EA, #4FC3F7);
         font-size: 12px;
         border-radius: 4px;
         margin-right: 5px;
         color: #fff;
       }
       .article-content .users {
          display: flex;
          justify-content: space-between;
          margin-top: 4px;
          font-size: 12px;
          color: #666;
       }
       .article-content .users img {
         width: 20px;
         height: 20px;
         border-radius: 50%;
         vertical-align: middle;
         
       }
       .article-content .users span:nth-child(2)>span{
         height: 20px;
         vertical-align: middle;
       }
body {
font-family: '微软雅黑';
font-weight: 400
}

.images {
width: 110%;
height: 110%;
background-size: 100% 100%;
z-index: -100;
position: fixed;
left: -5%;
top: -5%;
background-color: #C9BDBB;
filter: blur(0px);
}

.layui-input {
border: none;
box-shadow: 2px 2px 12px 0px whitesmoke;
border-bottom: solid 1px whitesmoke;
text-align: center;
border-radius: 0.2rem;
margin-top: 1rem;
}

.qint_color {
background: linear-gradient(to left, #FF8A80, #FF5252);
border-radius: 0.3rem;
box-shadow: 1px 1px 9px 1px #eee;
}

.qint_color2 {
background: linear-gradient(to left, #0091EA, #4FC3F7);
border-radius: 0.3rem;
box-shadow: 1px 1px 9px 1px #eee;
}

.qint_color3 {
background: linear-gradient(to left, #5E35B1, #651FFF);
border-radius: 0.3rem;
box-shadow: 1px 1px 9px 1px #eee;
}

.misett {
transition: all 0.4s;
}

.layui-layer-btn {
border-top: solid 1px #eee;
}

.layui-layer-title {
background: linear-gradient(to right, #5ccdde, #5c2b1b);
background-size: 1915%;
animation: gradientBackground 8s alternate ease-out;
animation-iteration-count: infinite;
color: white !important;
}

.layui-layer-content {
text-align: center;
}

.layui-layer-btn0, .layui-layer-btn1, .layui-layer-btn2, .layui-layer-btn3 {
margin-left: 0%;
border-radius: 0.3rem;
background-color: #FFFFFF !important;
color: darkslategray !important;
border: none !important;
transition: all 0.5s;
}

.layui-layer-btn0:hover, .layui-layer-btn1:hover, .layui-layer-btn2:hover, .layui-layer-btn3:hover {
background-color: #F5F5F5 !important;
}

@keyframes gradientBackground {
0% {
background-position: 0 0
}
50% {
background-position: 50% 100%
}
100% {
background-position: 100% 0
}
}

.image_body {
height: 60px;
overflow: hidden;
padding: 0;
padding-bottom: 1rem;
text-align: center;
margin-bottom: 1rem;
}
;
</style>
<style>
@font-face {
  font-family: "iconfont"; /* Project id 3014203 */
  src: url('//at.alicdn.com/t/font_3014203_1jy6ft2ncuo.woff2?t=1642532893344') format('woff2'),
       url('//at.alicdn.com/t/font_3014203_1jy6ft2ncuo.woff?t=1642532893344') format('woff'),
       url('//at.alicdn.com/t/font_3014203_1jy6ft2ncuo.ttf?t=1642532893344') format('truetype');
}

.iconfont {
  font-family: "iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-liulan:before {
  content: "\e739";
}

.icon-liulan1:before {
  content: "\e67e";
}

.icon-beijing:before {
  content: "\e61f";
}

.icon-xiazai:before {
  content: "\e8bc";
}

.icon-xitongshezhi:before {
  content: "\e62a";
}

.icon-yonghu:before {
  content: "\e788";
}

.icon-cuowu:before {
  content: "\e600";
}

.icon-zhengquequeding:before {
  content: "\e6cc";
}

.icon-cuowukongxin:before {
  content: "\ed1a";
}

.icon-zhengque:before {
  content: "\e661";
}

.icon-shenqingshouquan:before {
  content: "\e648";
}

.icon-yunduanxiazai:before {
  content: "\ec1d";
}

.icon-shouquan:before {
  content: "\e758";
}

.icon-pingtaishouquan:before {
  content: "\e609";
}

.icon-yunsousuoshouquan:before {
  content: "\e627";
}
</style>
<body class="layui-layout-body">
<div class="images"></div>
<div class="layui-fluid layadmin-homepage-fluid">
<div class="layui-row layui-col-space8">
<div class="layui-col-xs12 layui-col-sm8 layui-col-sm-offset2 layui-col-md6 layui-col-md-offset3 misett">
<div class="layui-card">
<div class="layui-card-header"
 style="font-size: 1.5rem;text-align: center;height: 3rem;line-height: 3rem;">
<a href="/"><?php echo $conf['name'];?></a>
</div>
<div class="layui-card-body">
<form class="layui-form">
<div class="layui-form-item">
<select name="proid" class="layui-input" style="width: 100%;" lay-filter="type">
<option value="">请选择查询的程序</option>
<?php
$ZR=$DB->query("SELECT * FROM zrauth_procedure WHERE type=1 order by id asc limit 10");
while($row = $DB->fetch($ZR))
{
?>
<option value="<?php echo $row['id'];?>">
<?php echo $row['name'];?>
</option>
<?php } ?>
</select>
</div>
<div class="layui-form-item">
<input type="hidden" name="gonggao" value="<?php echo $gg=$conf['gonggao']?$conf['gonggao']:'';?>" />
<input type="text" name="text" placeholder="请填写需要查询的内容" lay-verType="tips" class="layui-input" lay-verify="required" style="width: 100%;" />
</div>
<div class="layui-form-item">
<div class="layui-row layui-col-space12">
<div class="layui-col-xs4">
<button type="button" class="layui-btn layui-btn-fluid qint_color" onclick="ajax_msg('auth')" lay-filter="submit_url">查询授权
</button>
</div>
<div class="layui-col-xs4">
<button type="button" class="layui-btn layui-btn-fluid qint_color2" onclick="ajax_msg('dlcx')" lay-filter="submit_user">代理查询
</button>
</div>
<div class="layui-col-xs4">
<button type="button" class="layui-btn layui-btn-fluid qint_color3" onclick="ajax_msg('pay')" lay-filter="submit_blacklist">认证查询
</button>
</div>
</div>
</div>
</form>
<center>
<a href="https://jq.qq.com/?_wv=1027&k=N8RGYPM8"
 target="_blank" style="color:seagreen;">点我加入官方群：<?php echo $conf['qqqun'];?><font color="red"></font>
</a>
</center>
</div>
</div>
</div>
<div class="layui-col-xs12 layui-col-sm8 layui-col-sm-offset2 layui-col-md6 layui-col-md-offset3 misett" style="margin-top: 0.5rem;">
<div class="layui-card">
<div class="layui-card-header" style="font-size: 1.5rem;text-align: center;height: 3rem;line-height: 3rem;transition: all 0.5s;" id="text_renqi">更多功能</div>
<script>
var color = "#EF5350|#FF8A80|#FF4081|#EC407A|#F44336|#E91E63|#00E676|#FF8F00|#F4511E|#FF3D00";
color = color.split("|");
document.getElementById("text_renqi").style.color = color[parseInt(Math.random() * color.length)];
</script>
<div class="layui-card-body">
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
<ul class="layui-tab-title" style="text-align: center;margin-bottom: 1rem;">
<li class="layui-this">文章资讯</li>
<li>价格一览</li>
<li>卡密兑换</li>
<li>自助授权</li>
<li>更换授权</li>
<li>下载源码</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<div class="layui-row layui-col-space8 ">
<?php
$ZR=$DB->query("SELECT * FROM zrauth_post WHERE type=1 order by time asc");
while($row = $DB->fetch($ZR))
{
$img=getpic($row['content']);
?>
<div class=" layui-col-xs6 layui-col-sm4 layui-col-md3 layui-anim layui-anim-upbit">
   <a href="<?php echo "../post_{$row['id']}.html";?>" class="article-tiem">
      <img src="<?php echo $img;?>">
      <?php
      if ($row['look']>=100) {
      $hot='<span class="top-text remen">热门</span>';
      } else {
      $hot='';
      }
      echo $hot;
        ?>
         <div class="article-content">
            <p class="article-text"><?php echo $row['title'];?></p>
            <hr>
            <p class="users"><span><img src="https://q1.qlogo.cn/g?b=qq&nk=<?php echo $conf['kfqq'];?>&s=640"/><span> <?php echo $conf['name'];?></span></span>
            <span><i class="fa fa-eye" aria-hidden="true"></i><span> <?php echo $row['look'];?></span><span></p>
         </div>
    </a>
</div>
<?php } ?>
</div>
</div>
<div class="layui-tab-item">
<blockquote class="layui-elem-quote">
<li class="layui-timeline-item">
<i class="layui-icon layui-anim layui-anim-rotate layui-anim-loop layui-timeline-axis"></i>
<div class="layui-timeline-content layui-text">
<div class="layui-timeline-title">若发现低于上面价格的可以联系QQ:
<?php echo $conf['kfqq']?>,举报者可获得他的权限</div>
</div>
</li>
</blockquote>
<div class="layui-collapse" lay-accordion="">
<?php
$ZR=$DB->query("SELECT * FROM zrauth_procedure WHERE type=1 order by id asc");
while($row = $DB->fetch($ZR))
{
?>
<div class="layui-colla-item">
<h2 class="layui-colla-title">
<font>
<?php echo $row['name'];?>
</font>
</h2>
<div class="layui-colla-content layui-show">
<ul class="layui-timeline">
<li class="layui-timeline-item">
<i class="layui-icon layui-timeline-axis"></i>
<div class="layui-timeline-content layui-text">
<div class="layui-timeline-title">
授权
<?php echo $row['youke_url'];?>元一发
</div>
</div>
</li>
<li class="layui-timeline-item">
<i class="layui-icon layui-timeline-axis"></i>
<div class="layui-timeline-content layui-text">
<div class="layui-timeline-title">代理商
<?php echo $row['youke_agency'];?>元</div>
</div>
</li>
<li class="layui-timeline-item">
<i class="layui-icon layui-timeline-axis"></i>
<div class="layui-timeline-content layui-text">
<div class="layui-timeline-title">授权商
<?php echo $row['youke_auth'];?>元</div>
</div>
</li>
<li class="layui-timeline-item">
<i class="layui-icon layui-timeline-axis"></i>
<div class="layui-timeline-content layui-text">
<div class="layui-timeline-title">合作商
<?php echo $row['youke_cooperate']?>元</div>
</div>
</li>
</ul>
</div>
</div>
<?php } ?>
</div>
</div>
<div class="layui-tab-item">

<form class="layui-form layui-form-pane" id="formBasForm" lay-filter="formBasForm">
<div class="layui-form-item">
<select name="type" class="layui-input" style="width: 100%;" lay-filter="type">
<option value="">请选择兑换类型</option>
<option value="1">授权卡密</option>
<option value="2">权限卡密</option>
</select>
</div>
<div id="url" style="display:none">
<input type="text" name="kms" placeholder="请填写获取到的卡密" class="layui-input" style="width: 100%;" />
<input type="text" name="qq" placeholder="请填写授权的QQ" class="layui-input" style="width: 100%;" />
<input type="text" name="url" placeholder="请填写授权的域名" class="layui-input" style="width: 100%;" />
<br />
</div>
<div id="dl" style="display:none">
<input type="text" name="kms2" placeholder="请填写获取到的卡密" class="layui-input" style="width: 100%;" />
<input type="text" name="user" placeholder="请填写兑换用户的用户名" class="layui-input" style="width: 100%;" />
<input type="text" name="pwd" placeholder="请填写兑换用户的密码" class="layui-input" style="width: 100%;" />
<input type="text" name="qq2" placeholder="请填写兑换用户的QQ" class="layui-input" style="width: 100%;" />
<input type="text" name="email" placeholder="请填写兑换用户的邮箱" class="layui-input" style="width: 100%;" />
<br />
</div>
<div class="layui-form-item">
<div class="layui-row layui-col-space12">
<div class="layui-col-xs12">
<button type"button" class="layui-btn layui-btn-fluid auth_color3" lay-submit lay-filter="noticeBtn">立即兑换</button>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-row layui-col-space12">
<div class="layui-col-xs12">
<button type="reset" class="layui-btn layui-btn-fluid layui-btn-primary" id="formreset">重置表单</button>
</div>
</div>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form layui-form-pane" id="formBasForm" lay-filter="formBasForm">
<div class="layui-form-item">
<select name="procedure" class="layui-input" style="width: 100%;" lay-filter="type">
<option value="">请选择授权的程序</option>
<?php
$ZR=$DB->query("SELECT * FROM zrauth_procedure WHERE type=1 order by id asc");
while($row = $DB->fetch($ZR))
{
?>
<option value="<?php echo $row['id'];?>">
<?php echo $row['name'];?>
</option>
<?php } ?>
</select>
</div>
<input type="text" name="qq3" placeholder="请填写授权的QQ" class="layui-input" style="width: 100%;" />
<input type="text" name="url3" placeholder="请填写授权的域名" class="layui-input" style="width: 100%;" />
<br />
<div class="layui-form-item">
<div class="layui-row layui-col-space12">
<div class="layui-col-xs12">
<button type"button" class="layui-btn layui-btn-fluid auth_color3" lay-submit lay-filter="buy">立即购买</button>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-row layui-col-space12">
<div class="layui-col-xs12">
<button type="reset" class="layui-btn layui-btn-fluid layui-btn-primary" id="formreset2">重置表单</button>
</div>
</div>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form layui-form-pane" id="formBasForm" lay-filter="formBasForm">
<div class="layui-form-item">
<select name="cx2" class="layui-input" style="width: 100%;" lay-filter="type">
<option value="">请选择更换的程序</option>
<?php
$ZR=$DB->query("SELECT * FROM zrauth_procedure WHERE type=1 order by id asc");
while($row = $DB->fetch($ZR))
{
?>
<option value="<?php echo $row['id'];?>">
<?php echo $row['name'];?>
</option>
<?php } ?>
</select>
</div>
<input type="text" name="authcode" placeholder="请填写此域名的授权码" class="layui-input" style="width: 100%;" />
<input type="text" name="oldurl" placeholder="请填写授权的旧域名" class="layui-input" style="width: 100%;" />
<input type="text" name="url4" placeholder="请填写需要更换的域名" class="layui-input" style="width: 100%;" />
<br />
<div class="layui-form-item">
<div class="layui-row layui-col-space12">
<div class="layui-col-xs12">
<button type"button" class="layui-btn layui-btn-fluid auth_color3" lay-submit lay-filter="replace">确定更换</button>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-row layui-col-space12">
<div class="layui-col-xs12">
<button type="reset" class="layui-btn layui-btn-fluid layui-btn-primary" id="formreset3">重置表单</button>
</div>
</div>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form layui-form-pane" id="formBasForm" lay-filter="formBasForm">
<div class="layui-form-item">
<select name="cx3" class="layui-input" style="width: 100%;" lay-filter="type">
<option value="">请选择下载的程序</option>
<?php
$ZR=$DB->query("SELECT * FROM zrauth_procedure WHERE type=1 order by id asc");
while($row = $DB->fetch($ZR))
{
?>
<option value="<?php echo $row['id'];?>">
<?php echo $row['name'];?>
</option>
<?php } ?>
</select>
</div>
<input type="text" name="qq5" placeholder="请填写此下载的QQ" class="layui-input" style="width: 100%;" />
<input type="text" name="url5" placeholder="请填写此下载的域名" class="layui-input" style="width: 100%;" />
<input type="text" name="code" placeholder="请填写验证码" class="layui-input" style="width: 100%;" />
<br />
<div id="download"></div>
<div class="layui-form-item">
<div class="layui-row layui-col-space12">
<div class="layui-col-xs6"><button class="layui-btn layui-btn-fluid layui-btn-primary" id="GetCode">发送验证码</button></div>
<div class="layui-col-xs6"><button type="submit" class="layui-btn layui-btn-fluid auth_color" lay-submit lay-filter="download">立即验证</button></div>
</div>
</form>
</div>
<div class="layui-text" align="center" style="margin-top: 2.5rem;color: darkgrey;">因排版原因只展示如上内容! <a href="user/reg.php">注册用户</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="color: white;width: 100%;text-align: center;margin-bottom: 2rem;">
Copyright © 2020 -
<?php echo date('Y').' 孜然云'?>
</div>
<div class="images" style="background-image: url(https://api.ixiaowai.cn/gqapi/gqapi.php);">
</div>
<script src="//lib.baomitu.com//jquery/3.4.1/jquery.min.js"></script>
<script src="../assets/layui/layui.all.js"></script>
<script type="text/javascript">
layui.use(['form', 'element'], function () {
var form = layui.form;
var element = layui.element;
form.on('submit(submit_squrl)', function (data) {
chaxsq();
return false;
});
form.on('submit(submit_user)', function (data) {
chaxdl();
return false;
});
form.on('submit(submit_rzurl)', function (data) {
chaxrz();
return false;
});
form.on('submit(submit_blacklist)', function (data) {
chaxblack();
return false;
});
});
window.getCookie = function (cname){
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i=0; i<ca.length; i++) {
var c = ca[i].trim();
if (c.indexOf(name)==0) { return c.substring(name.length,c.length); }
}
return "";
}
window.setCookie3 = function (cname,cvalue,exdays){
var d = new Date();
d.setTime(d.getTime()+(exdays*24*60*60*1000));
var expires = "expires="+d.toGMTString();
document.cookie = cname+"="+cvalue+"; "+expires;
} 

function aa() {
layer.open({
type: 1,
title: false,
closeBtn: 0,
area: '300px',
shade: 0.8,
id: 'LAY_layuipro',
btn: ['好的了解', '登录后台'],
btnAlign: 'c',
moveOut: true,
moveType: 0,
btn2: function (layero, index) {window.open("user", "_blank");},
content: '<div style="background-color:#393D49;color:#eeeeee;padding:0.5em"><h3 style="text-align:center;padding-top:0.5em">平台公告</h3><hr>暂无公告<hr/><center>客服QQ：<?php echo $conf['kfqq'];?></center></div>'
});
};
layui.use('util', function () {
var util = layui.util;
util.fixbar({
bar2: '&#xe667;', 
bar1: true, 
click: function (type) {
if (type === 'bar1') {
layer.alert('是否需要联系站长,若有任何不懂的地方,可以随时联系他哦~<br>客服QQ:<?php echo $conf['kfqq'];?>', {
title: '联系客服',
icon: '3',
btn: ['这就联系Ta', '不用了'],
btn1: function (layero, index) {
layer.msg('正在跳转聊天窗口!');
window.open("http://wpa.qq.com/msgrd?v=3&uin=<?php echo $conf['kfqq'];?>&site=qq&menu=yes", "_blank");
}
});
}
if (type === 'bar2') {
aa()
}
}
});
});
</script>
<script type="text/javascript">
layui.use(['form', 'element','jquery', 'admin', 'tagsInput', 'notice'], function () { 
var form = layui.form;
var $ = layui.jquery;
var tagsInput = layui.tagsInput;
var admin = layui.admin;
var notice = layui.notice;
$('#formreset').click(function () {
document.getElementById("formBasForm").reset();
notice.destroy();
notice.msg('重置表单成功！', {animateInside: true, icon: 1});
});
$('#formreset2').click(function () {
document.getElementById("formBasForm").reset();
notice.destroy();
notice.msg('重置表单成功！', {animateInside: true, icon: 1});
});
$('#formreset3').click(function () {
document.getElementById("formBasForm").reset();
notice.destroy();
notice.msg('重置表单成功！', {animateInside: true, icon: 1});
});
form.on('button(submit_url)', function (data) {
ajax_msg(data.field, 'auth');
return false;
});
form.on('button(submit_user)', function (data) {
ajax_msg(data.field, 'dlcx');
return false;
});
form.on('button(submit_blacklist)', function (data) {
ajax_msg(data.field, 'pay');
return false;
});
window.ajax_msg = function (type) {
admin.showLoading('#divLoading', 3, '.8');
var data=$("input[name='text']").val();
var proid = $("select[name='proid']").val();
if(proid == ""){
notice.error({
title: '消息通知',
message: '请选择查询的程序！',
animateInside:true,
position:'topCenter',
transitionOut:'flipOutX',
transitionOutMobile: 'flipOutX', 
displayMode:'2',
audio:'1'
});
admin.removeLoading('#divLoading', true, true);
return false;
} else if (data == "") {
notice.error({
title: '消息通知',
message: '请输入需要查询的内容！',
animateInside:true,
position:'topCenter',
transitionOut:'flipOutX',
transitionOutMobile: 'flipOutX', 
displayMode:'2',
audio:'1'
});
admin.removeLoading('#divLoading', true, true);
return false;
}
$.ajax({
type: "post",
url: "ajax.php?act=" + type,
data: {proid:proid,data:data},
async: true,
dataType: 'json',
success: function (data) {
if (data['code'] == 0) {
notice.success({
title: '查询成功通知',
message: data.msg,
animateInside:true,
position:'topCenter',
transitionOut:'flipOutX',
transitionOutMobile: 'flipOutX', 
timeout:false,
displayMode:'2',
drag:false,
audio:'1'
});
} else {
notice.error({
title: '查询失败通知',
message: data.msg,
animateInside:true,
position:'topCenter',
transitionOut:'flipOutX',
transitionOutMobile: 'flipOutX', 
displayMode:'2',
audio:'1'
});
}
admin.removeLoading('#divLoading', true, true);
}, 
error: function () {
notice.error({
title: '查询失败通知',
message: '服务器错误！',
animateInside:true,
position:'topCenter',
transitionOut:'flipOutX',
transitionOutMobile: 'flipOutX', 
timeout:false,
displayMode:'2',
audio:'1'
});
admin.removeLoading('#divLoading', true, true);
}
});
}
form.on('submit(noticeBtn)', function (data) {
var type = $("select[name='type']").val();
var kms = $("input[name='kms']").val();
var url = $("input[name='url']").val();
var kms2 = $("input[name='kms2']").val();
var user = $("input[name='user']").val();
var pwd = $("input[name='pwd']").val();
var qq2 = $("input[name='qq2']").val();
var qq = $("input[name='qq']").val();
var email = $("input[name='email']").val();
admin.btnLoading('[lay-filter="noticeBtn"]',' 兑换中');
var ii = layer.load(2, {shade:[0.1,'#fff']});
notice.destroy();
$.ajax({
type: "POST",
url: "ajax.php?act=userkm",
data : {type:type,kms:kms,url:url,kms2:kms2,user:user,pwd:pwd,qq2:qq2,qq:qq,email:email},
dataType: "json",
success: function(data) {
layer.close(ii);
admin.btnLoading('[lay-filter="noticeBtn"]', false);
if (data.code == 0) {
notice.msg(data.msg, {animateInside: true, icon: 1});
} else {
notice.msg(data.msg, {animateInside: true, icon: 2});
}
},
error:function(data){
notice.msg('代码错误！作者QQ2937978586', {animateInside: true, icon: 2});
return false;
}
});
return false;
});
form.on('submit(buy)', function (data) {
var procedure = $("select[name='procedure']").val();
var qq3 = $("input[name='qq3']").val();
var url3 = $("input[name='url3']").val();
admin.btnLoading('[lay-filter="buy"]',' 执行中');
var ii = layer.load(2, {shade:[0.1,'#fff']});
notice.destroy();
$.ajax({
type: "POST",
url: "ajax.php?act=buy",
data : {procedure:procedure,qq3:qq3,url3:url3},
dataType: "json",
success: function(data) {
layer.close(ii);
admin.btnLoading('[lay-filter="buy"]', false);
if (data.status == 1) {
layer.msg('正在跳转支付页面...',{icon:16,time:10000});
window.location.href="../user/ZR_pay.php?orderid="+data.trade_no;
} else {
notice.msg(data.msg, {animateInside: true, icon: 2});
}
},
error:function(data){
notice.msg('代码错误！作者QQ2937978586', {animateInside: true, icon: 2});
return false;
}
});
return false;
});
form.on('submit(replace)', function (data) {
var cx2 = $("select[name='cx2']").val();
var authcode = $("input[name='authcode']").val();
var oldurl = $("input[name='oldurl']").val();
var url4 = $("input[name='url4']").val();
admin.btnLoading('[lay-filter="replace"]',' 执行中');
var ii = layer.load(2, {shade:[0.1,'#fff']});
notice.destroy();
$.ajax({
type: "POST",
url: "ajax.php?act=replace",
data : {cx2:cx2,authcode:authcode,oldurl:oldurl,url4:url4},
dataType: "json",
success: function(data) {
layer.close(ii);
admin.btnLoading('[lay-filter="replace"]', false);
if (data.status == 1) {
layer.msg('正在跳转支付页面...',{icon:16,time:10000});
window.location.href="../user/ZR_pay.php?orderid="+data.trade_no;
} else {
notice.msg(data.msg, {animateInside: true, icon: 2});
}
},
error:function(data){
notice.msg('代码错误！作者QQ2937978586', {animateInside: true, icon: 2});
return false;
}
});
return false;
});
form.on('submit(download)', function (data) {
var cx3 = $("select[name='cx3']").val();
var qq5 = $("input[name='qq5']").val();
var url5 = $("input[name='url5']").val();
var code = $("input[name='code']").val();
admin.btnLoading('[lay-filter="download"]',' 获取中');
var ii = layer.load(2, {shade:[0.1,'#fff']});
notice.destroy();
$.ajax({
type: "POST",
url: "ajax.php?act=download",
data : {cx3:cx3,qq5:qq5,url5:url5,code:code},
dataType: "json",
success: function(data) {
layer.close(ii);
admin.btnLoading('[lay-filter="download"]', false);
if (data.code == 0) {
notice.msg(data.msg, {animateInside: true, icon: 1});
$('#info').hide();
$("#download").html('<div class="layui-form-item"><div style="overflow-x: scroll;overflow-y: hidden;"><table class="layui-table" style="white-space: nowrap;" lay-skin="line"><tbody><tr><td> <b>授权ＱＱ：</b> '+data.qq+'&nbsp;<a href="tencent://message/?uin='+data.qq+'&amp;Site=孜然授权平台&amp;Menu=yes"><img src="http://wpa.qq.com/pa?p=1:'+data.qq+':1" border=0></a></td></tr><tr><td> <b>授权码：</b> '+data.authcode+'</td></tr><tr><td> <b>程序ID：</b> '+data.procedure+'</td></tr><tr><td> <b>下载类型：</b> <a href="'+data.installer+'" class="layui-btn layui-btn-xs layui-btn-warm">完整安装包</a>&nbsp;<a href="'+data.updater+'" class="layui-btn layui-btn-xs">更新包</a></td></tr></tbody></table></div><span class="layui-icon layui-icon-about"></span> 新购用户请下载完整安装包！</div></div>'); 
} else {
notice.msg(data.msg, {animateInside: true, icon: 2});
}
},
error:function(data){
notice.msg('代码错误！作者QQ2937978586', {animateInside: true, icon: 2});
return false;
}
});
return false;
});
form.on('select(type)', function(data){
if(data.value == 2){
$("#dl").css("display","inherit");
}else{
$("#dl").css("display","none");
}
if(data.value == 1){
$("#url").css("display","inherit");
}else{
$("#url").css("display","none");
}
});
    /* 获取验证码 */
    $('#GetCode').click(function () {
        var qq5 = $("input[name='qq5']").val();
        var ii = layer.load(2, {shade:[0.1,'#fff']});
        notice.destroy();
        $.ajax({
            type: "POST",
            url: "ajax.php?act=code",
            data : {qq5:qq5},
            dataType: "json",
            success: function(data) {
                layer.close(ii);
                if (data.code == 0) {
                notice.msg('发送成功，有效时间两分钟！', {animateInside: true, icon: 1});
                } else {
                    notice.msg(data.msg, {animateInside: true, icon: 2});
                }
            },
            error:function(data){
                notice.msg('服务器错误', {animateInside: true, icon: 2});
                return false;
            }
        });
        return false;
    });
});
</script>
</body>
</html>