176 lines
6.4 KiB
PHP
176 lines
6.4 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="renderer" content="webkit">
|
|
<title>西游·点卡兑换</title>
|
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
|
{css href="__GAME_PLUGINS__/bootstrap/css/bootstrap.min.css" /}
|
|
{css href="__GAME_PLUGINS__/font-awesome/css/font-awesome.min.css" /}
|
|
{css href="__GAME_CSS__/AdminLTE.min.css" /}
|
|
{css href="__GAME_CSS__/admin.css" /}
|
|
|
|
<style>
|
|
.login-page {
|
|
background-color: #ececec;
|
|
background-image: url("__GAME_IMAGES__/bg.jpg");
|
|
background-repeat: no-repeat;
|
|
background-size: cover;
|
|
background-attachment: fixed;
|
|
background-position: 50% 50%;
|
|
}
|
|
|
|
.login-box {
|
|
margin-top: 25%;
|
|
width: 420px;
|
|
}
|
|
</style>
|
|
{js href="__GAME_PLUGINS__/jquery/jquery.min.js" /}
|
|
{js href="__GAME_PLUGINS__/bootstrap/js/bootstrap.min.js" /}
|
|
{js href="__GAME_PLUGINS__/jquery-validation/jquery.validate.min.js" /}
|
|
{js href="__GAME_PLUGINS__/jquery-validation/localization/messages_zh.min.js" /}
|
|
{js href="__GAME_PLUGINS__/layer/layer.js" /}
|
|
{js href="__GAME_JS__/game.js" /}
|
|
|
|
<!--[if lt IE 9]>
|
|
{js href="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js" /}
|
|
{js href="https://oss.maxcdn.com/respond/1.4.2/respond.min.js" /}
|
|
<![endif]-->
|
|
<script>
|
|
var adminDebug = false;
|
|
</script>
|
|
|
|
</head>
|
|
<body class="hold-transition login-page">
|
|
<div class="login-box">
|
|
<div class="login-box-body">
|
|
<p class="login-box-msg" style="font-size: 16px; color:red">西游·兑换中心</p>
|
|
<form class="dataForm" id="dataForm" method="post">
|
|
<div class="form-group has-feedback">
|
|
<label class="col-sm-2 control-label" style="padding-left: 0px">账号</label>
|
|
<input name="account" id="account" autocomplete="off" type="text" class="form-control"
|
|
placeholder="请输入账号">
|
|
<span class="glyphicon glyphicon-user form-control-feedback"></span>
|
|
</div>
|
|
<div class="form-group has-feedback">
|
|
<label class="col-sm-2 control-label" style="padding-left: 0px">角色ID</label>
|
|
<input name="role_id" id="role_id" autocomplete="off" type="text" class="form-control"
|
|
placeholder="请输入角色ID">
|
|
<span class="glyphicon glyphicon-user form-control-feedback"></span>
|
|
</div>
|
|
<div class="form-group has-feedback">
|
|
<label class="col-sm-2 control-label" style="padding-left: 0px">卡密</label>
|
|
<input name="cdk_code" id="cdk_code" autocomplete="off" type="text" class="form-control"
|
|
placeholder="请输入卡密">
|
|
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<button type="submit" id="cdk_submit" class="btn btn-success btn-block btn-flat">兑 换 卡 密</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<br />
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<button type="submit" id="purchase" class="btn btn-info btn-block btn-flat">点 击 购 买 卡 密
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="browser_warning" style="display: none">
|
|
<div class=" margin text-center">
|
|
<p class="text-red ">请使用现代浏览器(谷歌浏览器、360极速或其他国产浏览器极速模式)操作本后台!</p>
|
|
<a class="btn btn-success" target="_blank" href="https://www.google.cn/chrome/" data-toggle="tooltip"
|
|
title="点击去下载谷歌浏览器">谷歌浏览器</a>
|
|
<a class="btn btn-success" target="_blank" href="https://browser.360.cn/ee/index.html" data-toggle="tooltip"
|
|
title="点击去下载360极速浏览器">360极速浏览器</a>
|
|
<a class="btn btn-success" target="_blank" href="https://browser.qq.com/" title="点击去下载QQ浏览器"
|
|
data-toggle="tooltip">QQ浏览器</a>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
$("#purchase").click(function () {
|
|
window.open("{$Think.config.game.cdk.order_url}");
|
|
})
|
|
$(document).ready(function () {
|
|
$("#dataForm").validate({
|
|
rules: {
|
|
account: {
|
|
required: true,
|
|
minlength: 6
|
|
},
|
|
role_id: {
|
|
required: true,
|
|
number: true,
|
|
rangelength: [8, 8]
|
|
},
|
|
cdk_code: {
|
|
required: true,
|
|
rangelength: [10, 10]
|
|
}
|
|
},
|
|
messages: {
|
|
account: {
|
|
required: "账号不能为空",
|
|
minlength: "账号长度不能小于6位数"
|
|
},
|
|
role_id: {
|
|
required: "角色ID不能为空",
|
|
number: '角色ID只能是数字',
|
|
rangelength: "角色ID只能是8位数"
|
|
},
|
|
cdk_code: {
|
|
required: '卡密不能为空',
|
|
rangelength: '卡密只能是10位数'
|
|
}
|
|
},
|
|
submitHandler: function (form) {
|
|
let data = {
|
|
account: $('#account').val(),
|
|
role_id: $('#role_id').val(),
|
|
cdk_code: $('#cdk_code').val(),
|
|
};
|
|
ajaxRequest("{:url('index')}", 'POST', data);
|
|
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
|
|
checkBrowser();
|
|
|
|
/*检查浏览器*/
|
|
function checkBrowser() {
|
|
if (isIE()) {
|
|
if (adminDebug) {
|
|
console.log('古代浏览器');
|
|
}
|
|
layer.open({
|
|
type: 1,
|
|
content: $('#browser_warning').html(),
|
|
icon: 5,
|
|
title: '警告',
|
|
area: ['500px', '300px'],
|
|
closeBtn: 0,
|
|
moveType: 1,
|
|
resize: false
|
|
});
|
|
} else {
|
|
|
|
}
|
|
}
|
|
|
|
function isIE() {
|
|
return !!window.ActiveXObject || "ActiveXObject" in window;
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|