You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

517 lines
22 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>{$meta_title}-{:C('WEB_SITE_TITLE')}</title>
<!-- <link href="__ROOT__/Public/favicon.ico" type="image/x-icon" rel="shortcut icon"> -->
<link href="{:get_cover(C('SITE_ICO'),'path')}" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/module.css">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/{$Think.config.COLOR_STYLE}.css" media="all">
<!--[if lt IE 9]>
<script type="text/javascript" src="__STATIC__/jquery-1.10.2.min.js"></script>
<![endif]--><!--[if gte IE 9]><!-->
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
<!--<![endif]-->
<block name="style"></block>
</head>
<style>
body{ padding: 0px; }
</style>
<block name="body">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<div class="main-title cf">
<h2>新增 [游戏]</h2>
</div>
<!-- 标签页导航 -->
<div class="tab-wrap">
<ul class="tab-nav nav">
<li data-tab="tab1" class="current"><a href="javascript:void(0);">基础</a></li>
<li data-tab="tab2" ><a href="javascript:void(0);">扩展</a></li>
<li data-tab="tab3" ><a href="javascript:void(0);">设置</a></li>
</ul>
<div class="tab-content zc_for">
<!-- 表单 -->
<form id="form" action="{:U('add')}" method="post" class="form-horizontal">
<!-- 基础 -->
<div id="tab1" class="tab-pane in tab1 tab-look">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">游戏名称:</td>
<td class="r">
<input type="text" class="txt " name="game_name" value="" placeholder="请输入游戏名称">
<input type="hidden" name="game_appid" value="">
</td>
<td class="l">游戏支持:</td>
<td class="r">
<input type="radio" class="inp_radio" value="(安卓版)" name="g_version" checked > 安卓版
<input type="radio" class="inp_radio" value="(苹果版)" name="g_version" > 苹果版
</td>
</tr>
<tr>
<td class="l">第三方安卓原包地址:</td>
<td class="r" >
<input type="text" class="txt " name="add_game_address" value="">
</td>
<td class="l">第三方IOS原包地址</td>
<td class="r" >
<input type="text" class="txt " name="ios_game_address" value="">
</td>
</tr>
<tr>
<td class="l">游戏类型:</td>
<td class="r">
<select id="game_type_id" name="game_type_id">
<volist name=":get_game_type_all()" id="vo">
<option value="{$vo.id}">{$vo.type_name}</option>
</volist>
</select>
<input type="hidden" id="game_type_name" name="game_type_name" value=""></input>
</td>
<td class="l">开放类型:</td>
<td class="r">
<label class="inp_radio">
<input type="radio" class="inp_radio" value="0" name="category" checked >不限
<volist name=":get_opentype_all()" id="vo">
<input type="radio" class="inp_radio" value="{$vo.id}" name="category" >{$vo.open_name}
</volist>
</label>
</td>
</tr>
<tr>
<td class="l">游戏折扣:</td>
<td class="r">
<input type="text" class="txt" name="discount" value="" placeholder="游戏折扣为1-10">
</td>
</tr>
<tr>
<td class="l">分成比例:</td>
<td class="r">
<input type="text" class="txt" name="ratio" value="" placeholder="分成比例为1~100%">
</td>
<td class="l">注册单价</td>
<td class="r">
<input type="text" class="txt" name="money" value="" placeholder="注册单价(元) 大于0的整数">
</td>
</tr>
<tr>
<td class="l">游戏排序:</td>
<td class="r">
<input type="text" class="txt" name="sort" value="" placeholder="请输入游戏排序如1">
</td>
<td class="l">游戏版本:</td>
<td class="r">
<input type="text" class="txt" name="version" value="">
</td>
</tr>
<tr>
</tr>
<tr>
<td class="l">游戏图标:<span class="infonotice2">(尺寸115*115px)</span> </td>
<td class="r">
<input type="file" id="upload_picture_icon">
<input type="hidden" name="icon" id="cover_id_icon"/>
<div class="upload-img-box">
<notempty name="data['icon']">
<div class="upload-pre-item"><img src="{$data['icon']|get_cover='path'}"/></div>
</notempty>
</div>
</td>
<td class="l">游戏封面:<span class="infonotice2">(尺寸275*160px)</span> </td>
<td class="r">
<input type="file" id="upload_picture_cover">
<input type="hidden" name="cover" id="cover_id_cover"/>
<div class="upload-img-box">
<notempty name="data['cover']">
<div class="upload-pre-item"><img src="{$data['cover']|get_cover='path'}"/></div>
</notempty>
</div>
</td>
</tr>
<tr>
<td class="l">游戏截图:<span class="infonotice2">(尺寸210*350px)</span> </td>
<td class="r" >
{:hook('UploadImages', array('name'=>'screenshot','value'=>''))}
</td>
<td class="l">游戏简介:</td>
<td class="r" >
<input type="text" class="txt " name="features" style="" value="">
</td>
</tr>
<tr>
<td class="l">游戏评分:</td>
<td class="r">
<input type="text" class="txt" name="game_score" value="" placeholder="请输入小于10的一位小数">
</td>
<td class="l">推荐指数:</td>
<td class="r">
<input type="text" class="txt" name="recommend_level" value="" placeholder="请输入小于10的一位小数">
</td>
</tr>
<tr>
<td class='l'>游戏大小</td>
<td class='r'><input type="text" class='txt' name='game_size' value=""></td>
<td class='l'></td>
<td class='r'></td>
</tr>
</tbody>
</table>
</div>
<!-- 扩展 -->
<div id="tab2" class="tab-pane tab2 tab-look">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">显示状态:</td>
<td class="r">
<label class="inp_radio">
<input type="radio" class="inp_radio" value="0" name="game_status">关闭
<input type="radio" class="inp_radio" value="1" name="game_status" checked="checked">开启
</label>
</td>
<td class="l">推荐状态:</td>
<td class="r">
<label class="inp_radio">
<input type="radio" class="inp_radio" value="0" name="recommend_status">不推荐
<input type="radio" class="inp_radio" value="1" name="recommend_status" checked="checked">推荐
<input type="radio" class="inp_radio" value="2" name="recommend_status" >热门
<input type="radio" class="inp_radio" value="3" name="recommend_status" >最新
</label>
<span class="notice-text">设置游戏的推荐类型,更改此游戏在网站所属的推荐板块;</span>
</td>
</tr>
<tr>
<td class="l">下载状态:</td>
<td class="r">
<label class="inp_radio">
<input type="radio" class="inp_radio" value="0" name="dow_status">&nbsp;&nbsp;&nbsp;
<input type="radio" class="inp_radio" value="1" name="dow_status" checked="checked">开启
</label>
</td>
</tr>
<tr>
<td class="l">语言:</td>
<td class="r">
<input type="text" class="txt" name="language" value="">
</td>
<td class="l">开发商:</td>
<td class="r">
<input type="text" class="txt" name="developers" value="">
</td>
</tr>
<tr>
<td class="l">游戏币名称:</td>
<td class="r">
<input type="text" class="txt" name="game_coin_name" value="">
</td>
<td class="l">游戏币比例:</td>
<td class="r">
<input type="text" class="txt" name="game_coin_ration" value="">
</td>
</tr>
<tr>
<td class="l">详细介绍:</td>
<td class="r" colspan='3'>
<textarea name="introduction" class="txt_area"></textarea>
</td>
</tr>
</tbody>
</table>
</div>
<!-- 设置 -->
<div id="tab3" class="tab-pane tab3 tab-look">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">游戏登陆通知地址:</td>
<td class="r" colspan='3'>
<input type="text" class="txt txt_title" name="login_notify_url" value="">
</td>
</tr>
<tr>
<td class="l">游戏支付通知地址:</td>
<td class="r" colspan='3'>
<input type="text" class="txt txt_title" name="pay_notify_url" value="">
</td>
</tr>
<tr>
<td class="l">游戏角色获取地址:</td>
<td class="r" colspan='3'>
<input type="text" class="txt txt_title" name="game_role_url" value="">
</td>
</tr>
<tr>
<td class="l">游戏礼包领取地址:</td>
<td class="r" colspan='3'>
<input type="text" class="txt txt_title" name="game_gift_url" value="">
</td>
</tr>
<tr>
<td class="l">游戏key</td>
<td class="r">
<input type="text" class="txt" name="game_key" value="">
(游戏支付通知时的加密key)
</td>
<td class="l">访问秘钥:</td>
<td class="r">
<input type="text" class="txt" name="access_key" value="">
(SDK访问服务器时的加密key)
</td>
</tr>
<tr>
<td class="l">威富通商户号:</td>
<td class="r">
<input type="text" class="txt" name="partner" value="">
(威富通商户号)
</td>
<td class="l">威富通秘钥:</td>
<td class="r" colspan='3'>
<input type="text" class="txt" name="key" value="">
</td>
</tr>
<tr>
<td class="l">游戏支付appid</td>
<td class="r">
<input type="text" class="txt" name="game_pay_appid" value="">
(微信支付时用的的APPID)
</td>
<td class="l">游戏合作id</td>
<td class="r" colspan='3'>
<input type="text" class="txt" name="agent_id" value="">
</td>
</tr>
<tr>
<td class="l">游戏包名:</td>
<td class="r">
<input type="text" class="txt" name="apk_pck_name" value="">
(安卓生成APK时的包名)
</td>
<td class="l">游戏签名:</td>
<td class="r" colspan='3'>
<input type="text" class="txt" name="apk_pck_sign" value="">
(安卓生成APK时的签名)
</td>
</tr>
</tbody>
</table>
</div>
<div class="form-item cf">
<button class="btn submit-btn ajax-post hidden" id="submit" type="submit" target-form="form-horizontal">确 定</button>
<a class="btn btn-return" href="javascript:history.back(-1);">返 回</a>
</div>
</form>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Game/lists')}');
$('#submit').click(function(){
$('#form').submit();
});
$(function(){
$("input[name='game_appid']").val("{:generate_game_appid()}");
$("#game_type_name").val($("#game_type_id option:selected").text());
$('.date').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true
});
$('.time').datetimepicker({
format: 'yyyy-mm-dd hh:ii',
language:"zh-CN",
minView:2,
autoclose:true
});
showTab();
});
/*获取游戏类型名称*/
$("#game_type_id").change(function() {
$("#game_type_name").val($("#game_type_id option:selected").text());
});
//上传游戏图标
/* 初始化上传插件 */
$("#upload_picture_icon").uploadify({
"height" : 30,
"swf" : "__STATIC__/uploadify/uploadify.swf",
"fileObjName" : "download",
"buttonText" : "上传图标",
"uploader" : "{:U('File/uploadPicture',array('session_id'=>session_id()))}",
"width" : 120,
'removeTimeout' : 1,
'fileTypeExts' : '*.jpg; *.jpeg; *.png; *.gif;',
"onUploadSuccess" : upload_picture_icon{$field.name},
'onFallback' : function() {
alert('未检测到兼容版本的Flash.');
}
});
function upload_picture_icon{$field.name}(file, data){
var data = $.parseJSON(data);
var src = '';
if(data.status){
$("#cover_id_icon").val(data.id);
src = data.url || '__ROOT__' + data.path;
$("#cover_id_icon").parent().find('.upload-img-box').html(
'<div class="upload-pre-item"><img src="' + src + '"/></div>'
);
} else {
updateAlert(data.info);
setTimeout(function(){
$('#top-alert').find('button').click();
$(that).removeClass('disabled').prop('disabled',false);
},1500);
}
}
//上传游戏封面
/* 初始化上传插件 */
$("#upload_picture_cover").uploadify({
"height" : 30,
"swf" : "__STATIC__/uploadify/uploadify.swf",
"fileObjName" : "download",
"buttonText" : "上传封面",
"uploader" : "{:U('File/uploadPicture',array('session_id'=>session_id()))}",
"width" : 120,
'removeTimeout' : 1,
'fileTypeExts' : '*.jpg; *.jpeg; *.png; *.gif;',
"onUploadSuccess" : upload_picture_cover{$field.name},
'onFallback' : function() {
alert('未检测到兼容版本的Flash.');
}
});
function upload_picture_cover{$field.name}(file, data){
var data = $.parseJSON(data);
var src = '';
if(data.status){
$("#cover_id_cover").val(data.id);
src = data.url || '__ROOT__' + data.path;
$("#cover_id_cover").parent().find('.upload-img-box').html(
'<div class="upload-pre-item"><img src="' + src + '"/></div>'
);
} else {
updateAlert(data.info);
setTimeout(function(){
$('#top-alert').find('button').click();
$(that).removeClass('disabled').prop('disabled',false);
},1500);
}
}
</script>
</block>
<script type="text/javascript">
(function(){
var ThinkPHP = window.Think = {
"ROOT" : "__ROOT__", //当前网站地址
"APP" : "__APP__", //当前项目地址
"PUBLIC" : "__PUBLIC__", //项目公共目录地址
"DEEP" : "{:C('URL_PATHINFO_DEPR')}", //PATHINFO分割符
"MODEL" : ["{:C('URL_MODEL')}", "{:C('URL_CASE_INSENSITIVE')}", "{:C('URL_HTML_SUFFIX')}"],
"VAR" : ["{:C('VAR_MODULE')}", "{:C('VAR_CONTROLLER')}", "{:C('VAR_ACTION')}"]
}
})();
</script>
<script type="text/javascript" src="__STATIC__/think.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>
<script type="text/javascript">
+function(){
var $window = $(window), $subnav = $("#subnav"), url;
$window.resize(function(){
$("#main").css("min-height", $window.height() - 130);
}).resize();
/*初始化导航菜单*/
$subnav.find(".icon").addClass("icon-fold");
// $subnav.find("ul").siblings(".side-sub-menu").hide();
/* 左边菜单高亮 */
url = window.location.pathname + window.location.search;
url = url.replace(/(\/(p)\/\d+)|(&p=\d+)|(\/(id)\/\d+)|(&id=\d+)|(\/(group)\/\d+)|(&group=\d+)/, "");
$subnav.find("a[href='" + url + "']").parent().addClass("current");
//显示选中的菜单
$subnav.find("a[href='" + url + "']").parent().parent().prev("h3").find("i").removeClass("icon-fold");
$subnav.find("a[href='" + url + "']").parent().parent().show();
/* 左边菜单显示收起 */
$("#subnav").on("click", "h3", function(){
var $this = $(this);
$this.find(".icon").toggleClass("icon-fold");
$this.next().slideToggle("fast").siblings(".side-sub-menu:visible").
prev("h3").find("i").addClass("icon-fold").end().end().hide();
});
$("#subnav h3 a").click(function(e){e.stopPropagation()});
/* 头部管理员菜单 */
$(".user-bar").mouseenter(function(){
var userMenu = $(this).children(".user-menu ");
userMenu.removeClass("hidden");
clearTimeout(userMenu.data("timeout"));
}).mouseleave(function(){
var userMenu = $(this).children(".user-menu");
userMenu.data("timeout") && clearTimeout(userMenu.data("timeout"));
userMenu.data("timeout", setTimeout(function(){userMenu.addClass("hidden")}, 100));
});
/* 表单获取焦点变色 */
$("form").on("focus", "input", function(){
$(this).addClass('focus');
}).on("blur","input",function(){
$(this).removeClass('focus');
});
$("form").on("focus", "textarea", function(){
$(this).closest('label').addClass('focus');
}).on("blur","textarea",function(){
$(this).closest('label').removeClass('focus');
});
// 导航栏超出窗口高度后的模拟滚动条
var sHeight = $(".sidebar").height();
var subHeight = $(".subnav").height();
var diff = subHeight - sHeight; //250
var sub = $(".subnav");
if(diff > 0){
$(window).mousewheel(function(event, delta){
if(delta>0){
if(parseInt(sub.css('marginTop'))>-10){
sub.css('marginTop','0px');
}else{
sub.css('marginTop','+='+10);
}
}else{
if(parseInt(sub.css('marginTop'))<'-'+(diff-10)){
sub.css('marginTop','-'+(diff-10));
}else{
sub.css('marginTop','-='+10);
}
}
});
}
}();
</script>
<block name="script"></block>
</body>
</html>