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.

398 lines
19 KiB
HTML

5 years ago
<extend name="Public/base" />
<block name="body">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<div class="main-place">
<span class="main-placetitle">位置</span>
<ul class="main-placeul">
<li><a href="{:U('Game/lists')}">游戏</a></li>
<li><a href="{:U('Game/lists')}">游戏管理</a></li>
<li><a href="#">{$meta_title}</a></li>
</ul>
</div>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="tab_nav jstabnav">
<ul>
<li data-tab="tab1" class="current"><a href="javascript:void(0);">基础信息</a></li>
<li data-tab="tab3" ><a href="javascript:void(0);">参数配置</a></li>
</ul></div>
<div class="tab-content tab_content">
<!-- 表单 -->
<form id="form" action="{:U('relation')}" method="post" class="form-horizontal">
<!-- 基础 -->
<div id="tab1" class="tab-pane in tab1 tab_table ">
<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="{$data['relation_game_name']}" style="background: #e7e7e7" disabled="disabled" placeholder="请输入游戏名称">
<input type="hidden" name="game_name" value="{$data['relation_game_name']}">
<input type="hidden" name="game_appid" value="{$data['game_appid']}">
</td>
<td class="l">运营平台:</td>
<td class="r table_radio">
<if condition="$data['sdk_version'] eq 2">
<label><input type="radio" class="inp_radio js-device" value="1" name="sdk_version" checked="checked" > 安卓版</label>
<elseif condition="$data['sdk_version'] eq 1"/>
<label><input type="radio" class="inp_radio js-device" value="2" name="sdk_version" checked="checked"> 苹果版</label>
</if>
</td>
</tr>
<tr>
<td class="l">游戏类型:</td>
<td class="r">
<select id="game_type_id" name="game_type_id" disabled="disabled">
<volist name=":get_game_type_all()" id="vo">
<option value="{$vo.id}" <if condition="$list['game_type_id'] eq $vo['id']">selected="selected"</if> >{$vo.type_name}</option>
</volist>
</select>
<input type="hidden" name="game_type_id" value="{$list['game_type_id']}"></input>
<input type="hidden" id="game_type_name" name="game_type_name" value="{$list['game_type_name']}"></input>
</td>
<td class="l">开放类型:</td>
<td class="r table_radio">
<label>
<input type="radio" class="inp_radio" value="0" name="category" checked disabled="disabled"> 不限</label>
<volist name=":get_opentype_all()" id="vo">
<label><input type="radio" class="inp_radio" disabled="disabled" value="$vo['id']" name="category" <eq name="data.category" value="$vo['id']"> checked="checked" </eq>> {$vo.open_name}</label>
</volist>
<input type="hidden" name="category" value="{$data['category']}"></input>
</td>
</tr>
<tr>
<td class="l">推荐状态:</td>
<td class="r table_radio">
<label class="inp_radio">
<input type="radio" disabled="disabled" class="inp_radio" value="0" name="recommend_status" <if condition="$data['recommend_status'] eq 0">checked="checked"</if>> 不推荐
</label>
<label>
<input type="radio" disabled="disabled" class="inp_radio" value="1" name="recommend_status" <if condition="$data['recommend_status'] eq 1">checked="checked"</if>> 推荐
</label>
<label>
<input type="radio" disabled="disabled" class="inp_radio" value="2" name="recommend_status" <if condition="$data['recommend_status'] eq 2">checked="checked"</if>> 热门
</label>
<label>
<input type="radio" disabled="disabled" class="inp_radio" value="3" name="recommend_status" <if condition="$data['recommend_status'] eq 3">checked="checked"</if>> 最新
</label>
<input type="hidden" name="recommend_status" value="{$data['recommend_status']}">
</td>
<td class="l">显示状态:</td>
<td class="r table_radio">
<label>
<input type="radio" disabled="disabled" class="inp_radio" value="0" name="game_status" <if condition="$data['game_status'] eq 0">checked="checked"</if>> 关闭
</label>
<label>
<input type="radio" disabled="disabled" class="inp_radio" value="1" name="game_status" <if condition="$data['game_status'] eq 1">checked="checked"</if>> 开启
</label>
<input type="hidden" name="game_status" value="{$data['game_status']}">
</td>
</tr>
<tr>
<td class="l">游戏排序:</td>
<td class="r">
<input type="text" class="txt" disabled="disabled" style="background: #e7e7e7" name="sort" value="{$data['sort']}">
<input type="hidden" class="txt" name="sort" value="{$data['sort']}">
</td>
<td class="l">游戏评分:</td>
<td class="r">
<input type="text" class="txt" disabled="disabled" style="background: #e7e7e7" name="game_score" value="{$data['game_score']}" placeholder="请输入小于10的一位小数">
<input type="hidden" class="txt" name="game_score" value="{$data['game_score']}" placeholder="请输入小于10的一位小数">
</td>
</tr>
<tr>
<td class="l">开发商:</td>
<td class="r">
<input type="text" class="txt" name="developers" value="{$data['developers']}">
</td>
<if condition="$data['sdk_version'] eq 2">
<td class="l android">第三方安卓原包地址:</td>
<td class="r android" >
<input type="text" class="txt " name="add_game_address" value="">
</td>
<else/>
<td class="l ios">第三方IOS原包地址</td>
<td class="r ios" >
<input type="text" class="txt " name="ios_game_address" value="">
</td>
</if>
</tr>
<tr>
<td class="l" >游戏简介:</td>
<td class="r" >
<input type="text" class="txt " disabled="disabled" style="background: #e7e7e7" name="features" value="{$data['features']}">
<input type="hidden" class="txt " name="features" value="{$data['features']}">
</td>
<td class="l">游戏图标:<span class="infonotice2">(尺寸115*115px)</span> </td>
<td class="r">
<input type="hidden" name="icon" id="cover_id_icon" value="{$data.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>
</tr>
<tr>
<td class="l">游戏封面:<span class="infonotice2">(尺寸275*160px)</span> </td>
<td class="r">
<input type="hidden" name="cover" id="cover_id_cover" value="{$data.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>
<td class="l">游戏截图:<span class="infonotice2">(尺寸210*350px)</span> </td>
<td class="r" >
{:hook('UploadImages', array('name'=>'screenshot','value'=>$data['screenshot'],'disabled'=>disabled))}
</td>
</tr>
<tr>
<td class="l">详细介绍:</td>
<td class="r" colspan='3'>
<textarea name="introduction" disabled="disabled" style="background: #e7e7e7" class="txt_area">{$data['introduction']}</textarea>
<input type="hidden" class="txt " name="introduction" value="{$data['introduction']}">
</td>
</tr>
</tbody>
</table>
</div>
<!-- 设置 -->
<div id="tab3" class="tab-pane tab3 tab_table">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">代充折扣:</td>
<td class="r">
<input type="text" class="txt" name="discount" value="10" placeholder="代充折扣为1-10">
</td>
<td class="l noticeinfo">
绑币充值折扣:
</td>
<td class="r">
<input type="text" class="txt" name="bind_recharge_discount" value="10" placeholder="绑币充值折扣为1-10">
</td>
</tr>
<tr>
<td class="l">CPS分成比例</td>
<td class="r">
<input type="text" class="txt" name="ratio" value="" placeholder="分成比例为1~100%(不要输入%)">
</td>
<td class="l">CPA注册单价</td>
<td class="r">
<input type="text" class="txt" name="money" value="" placeholder="注册单价(元) 大于0的整数">
</td>
</tr>
<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_server_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="" placeholder="游戏支付通知时的加密key">
</td>
<td class="l">访问秘钥:</td>
<td class="r">
<input type="text" class="txt" name="access_key" value="" placeholder="SDK访问服务器时的加密key">
</td>
</tr>
<tr>
<td class="l">威富通商户号:</td>
<td class="r">
<input type="text" class="txt" name="partner" value="" placeholder="输入威富通商户号">
</td>
<td class="l">威富通秘钥:</td>
<td class="r" colspan='3'>
<input type="text" class="txt" name="key" value="" placeholder="输入威富通秘钥">
</td>
</tr>
<tr>
<td class="l">游戏支付appid</td>
<td class="r">
<input type="text" class="txt" name="game_pay_appid" value="" placeholder="微信支付时用的的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="" placeholder="安卓生成APK时的包名">
</td>
<td class="l">游戏签名:</td>
<td class="r" colspan='3'>
<input type="text" class="txt" name="apk_pck_sign" value="" placeholder="安卓生成APK时的签名">
</td>
</tr>
</tbody>
</table>
</div>
<div class="form-item cf">
<input type="hidden" name='relation_game_id' value="{$data['relation_game_id']}"></input>
<button class="submit_btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
</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('developers/game')}');
$('.side-sub-menu').eq(0).show();
Think.setValue("game_type_id", {$data.game_type_id|default = 0});
Think.setValue("category", {$data.category|default = 0});
$('#submit').click(function(){
$('#form').submit();
});
$(function(){
$("#game_type_name").val($("#game_type_id option:selected").text());
$('.time').datetimepicker({
format: 'yyyy-mm-dd hh:ii',
language:"zh-CN",
minView:2,
autoclose:true
});
$('.date').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true
});
showTab();
});
$("#add_another").click(function() {
layer.open({
type: 2,
title: '游戏登陆记录',
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: url+'admin.php?s=/Game/add_another/id/1111'//iframe的url
});
});
/*获取游戏类型名称*/
$("#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>