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.

150 lines
6.2 KiB
HTML

2 years ago
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/mixed.css" rel="stylesheet">
</block>
<block name="body">
<div class="page-form normal_list siteServer-add-form">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>联盟站点></span><span>区服列表></span><span>编辑区服</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_qufu.png"><span class="title_main">{$meta_title}</span>
</div>
<div class="trunk-content article">
<div class="trunk-list">
<form action="" novalidate="novalidate" method="post" id="data">
<table class="table2">
<tr>
<td class="l"><span class="must_style">*</span>游戏名称:</td>
<td class="r">
<select name="game_id" id="game_id" class="reselect select_gallery" style="width:262px;" disabled>
<option value="">请选择游戏</option>
<volist name="game" id="vo">
<option value="{$vo.id}" <if condition="$vo['game_name'] eq $data['game_name']"> selected =="true"</if>>{$vo.game_name}<eq name='vo.sdk_version' value='1'>(安卓版)<else/><eq name='vo.sdk_version' value='2'>(苹果版)</eq></eq><eq name='vo.game_source' value='1'>(平台)<else /><eq name='vo.game_source' value='2'>(第三方)</eq></eq></option>
</volist>
</select>
</td>
</tr>
<tr style="height: 34px;">
<td class="l">运行系统:</td>
<td class="r form-radio jspayradio" id="server_version">
<eq name="data.server_version" value="1">
<label><input type="radio" name="server_version" class="ggg" value="1" disabled checked ><i></i><span>安卓</span></label>
<else />
<eq name="data.server_version" value="2">
<label><input type="radio" name="server_version" class="ggg" value="2" disabled checked ><i></i><span>苹果</span></label>
</eq>
</eq>
</td>
</tr>
<tr>
<td class="l"><i class="must-mark">&nbsp;</i>显示状态:</td>
<td class="r form-radio jspayradio">
<label><input type="radio" name="status" class="name" value="1" ><i></i><span>开启</span></label>
<label><input type="radio" name="status" class="name" value="2" ><i></i><span>关闭</span></label>
</td>
</tr>
<tr>
<td class="l"><span class="must_style">*</span>区服名称:</td>
<td class="r">
<input name="server_name" class="name txt" id="server_name" value="{$data.server_name}">
</td>
</tr>
<tr>
<td class="l"><span class="must_style">*</span>开服时间:</td>
<td class="r">
<input name="start_time" class="name txt date" id="start_time" value="{:time_format($data['start_time'])}">
</td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<input name="id" hidden="hidden" value="{$data.id}">
<button type="button" class="tjbnt btn" onclick="save()">保存</button>
<a class="back_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();">返回</a>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</block>
<block name="script">
<link rel="stylesheet" type="text/css" href="__STATIC__/jquery-ui/jquery-ui.css">
<script type="text/javascript" src="__STATIC__/jquery-ui/jquery-ui.js"></script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__CSS__/dropdown171205.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
setValue("game_id","{$data.game_id}");
setValue("status","{$data.status}");
$(function() {
$('.date').datetimepicker({
format: 'yyyy-mm-dd hh:ii',
language:"zh-CN",
minView:0,
autoclose:true
});
$(".select_gallery").select2();
$('.jspayradio input:checked').siblings('i').addClass('current');
$('.jspayradio input').click(function() {
var that=$(this);
that.closest('.jspayradio').find('i').removeClass('current');
if (that.prop('checked')) {
that.siblings('i').addClass('current');
}
});
});
var sub = true;
function save() {
if(!sub){
return false;
}
var data = $("#data").serialize();
sub = false;
$.ajax({
type: "post",
url: "{:U('edit')}",
dataType: "json",
data: data,
success: function (res) {
if (res.status != 0) {
layer.msg(res.info, {icon: 1});
setTimeout(function () {
location.href = "{:U('index')}";
},1000)
}
else {
sub = true;
layer.msg(res.info, {icon: 2});
}
},
error: function () {
layer.msg('服务器故障', {icon: 5});
}
})
}
//导航高亮
highlight_subnav('{:U('index')}');
</script>
</block>