<?php
require 'config.php';
if (empty($_POST)) $_POST = $_GET;  //如果为GET方式访问
$payid = $_POST['payid'];
$money = $_POST['money'];
$actorid = $_POST['actorid'];
$serverid = $_POST['serverid'];
$rolename = $_POST['actorname'];
$accounts = $_POST["username"];
$gameprops="元宝";
if(!empty($payid) && $payid==100 && $money==28){
    //28元元宝月卡 $payid==100
    $gameprops="元宝月卡";
}else if(!empty($payid) && $payid==101 && $money==88){
    //88元特权月卡 $payid==101
    $gameprops="特权月卡";
}
$account =  $gameprops."_".$serverid."_".$rolename;
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>游戏赞助页面</title>
	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
	<!--引入阿里字体图标-->
	<link rel="stylesheet" type="text/css" href="static/css/iconfont.css" />
	<!--引入jquery-->
	<script src="static/js/jquery.min.js" charset="utf-8"></script>
	<!--引入jquery-weui框架-->
	<link rel="stylesheet" href="static/weui/css/weui.min.css">
	<link rel="stylesheet" href="static/weui/css/jquery-weui.min.css">
	<script src="static/weui/js/jquery-weui.min.js" charset="utf-8"></script>
	<link rel="stylesheet" href="static/css/pay.css" type="text/css">
</head>
<body class="center">
	<!--头部  star-->
	<!--<header>
		<div class="title-box">
			<a href="javascript:close();" class="title-left"><i class="iconfont" style="font-size:16px;">&#xe635;</i>返回游戏</a>
			<a class="title-center">游戏赞助页面</a>
			<a href="https://18pay.net/pay/query.html" class="title-right"><i class="iconfont" style="font-size:16px;">&#xe6b4;</i>订单查询</a>
		</div>
	</header>-->
	<!--头部 end-->
    <form action="<?php echo $payurl;?>" method="post">
        <div class="weui-pay">
            <h1 class="weui-payselect-title">充值金额</h1>
            <p class="weui-pay-num">￥<?php echo $money?>.00</p>
            <p class="weui-pay-info"><label class="label f-red b-red f16">充值角色 → 【<?php echo $rolename?>】</label></p>
            <!--支付 star-->
			<div class="pay-box">
				<div class="pay-box-cell">
					<li>
					<label>
					<img src="static/images/pay-zfb.jpg">
					<input name="paytype" value="1" type="radio" checked='true'>
					<span></span>
					</label> 
					</li>
					<li>
					<label>
					<img src="static/images/pay-wx.jpg">
					<input name="paytype" value="2" type="radio">
					<span></span>
					</label> 
					</li>
				</div>
			</div>
			<!--支付 end-->
            <div class="pay-div">
                <input type='hidden' name='money' value ='<?php echo $money;?>'/>
                <input type='hidden' name='account' value ='<?php echo $account;?>'/>
                <button type="submit" class="weui-btn weui-btn_primary">立即支付</button>
            </div>
        </div>
    </form>
</body>
</html>
<script language="javascript">
function close(){
    //关闭父窗口
    window.parent.document.getElementById('dialog').style.display = 'none'
}
</script>