init
This commit is contained in:
69
pay/index.php
Normal file
69
pay/index.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
天天支付 www.ttfk.cc
|
||||
亲手写的代码。请保留信息!
|
||||
对得起自己的职业操守!
|
||||
**/
|
||||
require 'config.php';
|
||||
|
||||
$serverid = htmlspecialchars(trim($_GET['serverId']));
|
||||
$actorid = htmlspecialchars(trim($_GET['actorid']));
|
||||
$money = htmlspecialchars(trim($_GET['amount']));
|
||||
|
||||
if(0 >= $money) exit('金额错误!');
|
||||
if(!isset($serverid) || !isset($actorid)) exit('参数错误!');
|
||||
|
||||
$sid = intval(str_replace('s', '', $serverid));
|
||||
$db_name = 'mir_actor_s'.$sid;
|
||||
if(0 >= $sid) exit('区服ID错误!');
|
||||
|
||||
$conn = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $db_name, $_CONFIG_DB['db_port']);
|
||||
// 检测连接
|
||||
if ($conn->connect_error) {
|
||||
die("连接失败: " . $conn->connect_error);
|
||||
}
|
||||
$stmt = $conn->prepare('SELECT actorname FROM `actors` WHERE actorid = ? limit 1');
|
||||
$stmt->bind_param('s', $actorid);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
$row = mysqli_fetch_assoc($result);
|
||||
if(empty($row)) exit('找不到角色!');
|
||||
|
||||
$username = isset($row) ? $row['actorname'] : '';
|
||||
$out_trade_no = date("YmdHis").mt_rand(100,999);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
||||
<link type="text/css" rel="stylesheet" href="./img/css/style.css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>赞助中心-<?=$_CONFIG['game_name']?></title>
|
||||
</head>
|
||||
<body >
|
||||
<!-- <center class="top_center" ><?php echo $yxm?></center>
|
||||
<form method="post" action="api.php" role="form">
|
||||
<div class="text-center">
|
||||
<p class="serverlist">区服 : <?php echo $serverid?></p>
|
||||
<p class="serverlist">昵称 : <?php echo $username?></p>
|
||||
<p class="serverlist">金额 : <?php echo $money?></p>
|
||||
</div>
|
||||
<div class="content">
|
||||
<input type="hidden" class="game_name" id="game_name" value="<?php echo $serverid."_".$actorid."_".$username?>" autocomplete="off" name="game_name"/>
|
||||
<input type="hidden" name="pid" value="<?php echo $id?>" />
|
||||
<input class="form-control" placeholder="商户订单号" type="hidden" value="h5<?php echo $out_trade_no ?>" name="WIDout_trade_no" type="text" readonly="readonly">
|
||||
<input type="hidden" class="aaa" autocomplete="off" value="<?php echo $money;?>" name="money"/>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<p><button type="radio" value="wxpay" name="type" class="btn wxpay btn-success my-3"></button></p>
|
||||
<p><button type="radio" value="alipay" name="type" class="btn alipay btn-success my-3"></button></p>
|
||||
</div>
|
||||
</form>-->
|
||||
<div class="footer">
|
||||
<p>想充值!没门儿~ 看游戏公告,免费后台充值哈~</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user