<?php
include("./core/common.php");
?>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title><?php echo $conf['sitename']; ?></title>
    <meta name="description" content="<?php echo $conf['description']; ?>">
    <meta name="keywords" content="<?php echo $conf['keywords']; ?>">
    <link rel="icon" type="image/ico" href="//gravatar.loli.net/avatar/4cc893d113dd74ceca73f9863f2c5446/">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/5.12.1/css/all.min.css">
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css">

</head>



<body>
    <div id="main" class="container">
        <div class="row my-card justify-content-center">
            <div class="col-lg-4 photo-bg"></div>
            <div class="col-lg-8 card">
                <h1><?php echo $conf['panel']; ?></h1>
                <p><?php echo $conf['gg']; ?>
                </p>
  

<form name=alipayment action=pay.php method=post target="_blank">
<div class="input-group">			 
<span class="input-group-addon"><span class="glyphicon glyphicon-barcode"></span> 赞助单号</span>
<input size="30" name="WIDout_trade_no" value="<?php echo date("YmdHis").mt_rand(100,999); ?>"  class="form-control" />
</div>
<br/>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-shopping-cart"></span> 赞助留言</span>
<input size="30" name="WIDsubject" value="<?php echo $conf['liuyan']; ?>" class="form-control" required="required" />
</div>
<br/>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-yen"></span> 赞助金额</span>
<input size="30" name="WIDtotal_fee" value="1" class="form-control" required="required"/>			        
</div>        			
<br/> 
<center><div class="alert alert-warning">选择一种方式进行赞助...</div></center>
<center>
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<div class="btn-group" role="group">
<button type="radio" name="type" value="alipay" class="btn btn-primary">支付宝</button>
</div>
<div class="btn-group" role="group">
<button type="radio" name="type" value="qqpay" class="btn btn-danger">QQ</button>
</div>
<div class="btn-group" role="group">
<button type="radio" name="type" value="wxpay" class="btn btn-success">微信</button>
</div>
<div class="btn-group" role="group">
<button type="radio" name="type" value="tenpay" class="btn btn-info">财付通</button>
</div>
</div>
</div>
</center> 
</div>
</form>
</p>
             
<?php
$data = curl_get($alipay_config['apiurl'] . "api.php?act=orders&limit=10&pid=" . $alipay_config['partner'] . "&key=" . $alipay_config['key'] . "&url=" . $_SERVER["HTTP_HOST"]);
$arr = json_decode($data, true);
if ($arr["code"] == 0 - 2)sysmsg("易支付配置信息有误！");
echo "<div class=\"col-xs-120 col-sm-100 col-lg-80 center-block\" style=\"float: none;\"><div class=\"panel panel-primary\"><div class=\"panel-heading\" style=\"background: linear-gradient(to right,#b221ff,#14b7ff,#8ae68a);\"><center><font color=\"#000000\"><b>朋友们的赞助记录</b></font></center></div><div class=\"table-responsive\">\r\n<table class=\"table table-striped\">\r\n<thead><tr><th>订单号</th><th>赞助方式</th><th>赞助金额</th><th>状态</th></tr></thead>\r\n<tbody>";
	foreach ($arr["data"] as $res) {
	echo "<tr><td>" . $res["trade_no"] . "</td><td>".($res['type']=='qqpay'?'QQ':null).($res['type']=='wxpay'?'微信':null).($res['type']=='alipay'?'支付宝':null).($res['type']=='tenpay'?'财付通':null).($res['type']=='no'?'未知方式':null).($res['type']==''?'未知方式':null)."</b></td><td>" . $res["money"] . "元</b></td><td>" . ($res["status"] == 1 ? "<font color=green>已完成赞助</font>" : "<font color=red>未完成赞助</font>") . "</td></tr>";
	}
echo "</tbody>\r\n</table>\r\n</div>\r\n\t</div>";
?>






               
                <footer>
                    <p>Copyright 2018 - Now <a href="/" target="_blank"><?php echo $conf['copy']; ?></a> <a href="http://beian.miit.gov.cn/" target="_blank">豫ICP备1314520号-1</a>
                        <br> 鸣谢：
                        <a href="#" target="_blank" rel="nofollow">XF防红系统</a>
						<a href="#" target="_blank" rel="nofollow">支付联系</a>
                        

                    </p>
                    </p>

                </footer>
            </div>
        </div>

    </div>
    <div id="aplayer" class="aplayer" data-order="random" data-id="<?php echo $conf['music']; ?>" data-server="netease" data-type="playlist" data-fixed="true" data-autoplay="true" data-volume="0.8"></div>
    <!-- aplayer -->



    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/meting@1.2.0/dist/Meting.min.js"></script>
    <!-- end_aplayer -->
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script defer src="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/js/bootstrap.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/kaygb/kaygb@master/layer/layer.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/kaygb/kaygb@master/js/v3.js"></script>
    <script>
        //弹出一个页面层
        $('#kaygb-blog').on('click', function() {
            layer.open({
                type: 2,
                title: '风也温柔',
                shadeClose: true,
                shade: false,
                maxmin: true, //开启最大化最小化按钮
                area: ['80%', '100%'],
                content: '//eas1.cn/'
            });
        });
        $('#kaygb-mail').on('click', function() {
            layer.open({
                type: 2,
                title: '风也温柔',
                shadeClose: true,
                shade: false,
                maxmin: true, //开启最大化最小化按钮
                area: ['80%', '100%'],
                content: '//mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=i@eas1.cn'
            });
        });
    </script>

</html>