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.
199 lines
6.3 KiB
HTML
199 lines
6.3 KiB
HTML
<extend name="Public/base"/>
|
|
|
|
<block name="body">
|
|
<!-- 标题栏 -->
|
|
|
|
<style>
|
|
.navtab_tip {width:100%; border-bottom:3px solid #ddd; margin: 15px 0px;padding-bottom: 10px;}
|
|
</style>
|
|
|
|
|
|
|
|
<div class="cf main-place top_nav_list navtab_list">
|
|
{:W('Index/navigation',array('value'=>'Site/media','compare'=>'Adv/media_adv_pos_lists'))}
|
|
<h3 class="page_title">广告管理</h3>
|
|
<p class="description_text">设置PC官网的相关广告图片</p>
|
|
</div>
|
|
|
|
|
|
<div class="tab_nav stabnav17112 jstabnav box_mt">
|
|
<ul>
|
|
<li class="">
|
|
<a href="{:U('Adv/media_adv_pos_lists')}">广告位列表</a>
|
|
</li>
|
|
<li class="current">
|
|
<a href="{:U('Adv/media_adv_lists')}">广告列表</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="cf top_nav_list">
|
|
<div class="fl button_list">
|
|
<empty name="model.extend">
|
|
<div class="tools">
|
|
<a class=" ajax-post confirm " target-form="ids" url="{:U('del_adv?model='.$model['id'],array('row'=>I('row')))}"><span class="button_icon button_icon2"></span>删除</a>
|
|
</div>
|
|
</empty>
|
|
</div>
|
|
<!-- 高级搜索 -->
|
|
<div class="jssearch fr cf search_list">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 数据列表 -->
|
|
<div class="data_list">
|
|
<div class="">
|
|
<table>
|
|
<!-- 表头 -->
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<input class="check-all" type="checkbox">
|
|
</th>
|
|
<th>编号</th>
|
|
<th>广告标题</th>
|
|
<th>广告链接</th>
|
|
<th>所属广告位</th>
|
|
<th>开始时间</th>
|
|
<th>结束时间</th>
|
|
<th>打开方式</th>
|
|
<th>排序</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<!-- 列表 -->
|
|
<tbody>
|
|
<volist name="list_data" id="data">
|
|
<tr style="text-align:center">
|
|
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
|
|
<td>{$data['id']}</td>
|
|
<td>{$data['title']}</td>
|
|
<td>{$data['url']}</td>
|
|
<td>{:get_adv_pos_title($data['pos_id'])}</td>
|
|
<td>{:set_show_time($data['start_time'],'','forever')}</td>
|
|
<td>{:set_show_time($data['end_time'],'','forever')}</td>
|
|
<td>
|
|
<switch name="data['target']" >
|
|
<case value="_blank" >新页面</case>
|
|
<case value="_self">本页面</case>
|
|
<default />未知
|
|
</switch></td>
|
|
<td>
|
|
<a href="javascript:;" data-field="sort" data-title="{$data.title} 排序修改" data-id="{$data.id}" class="jschangevalue">
|
|
{$data.sort}
|
|
</a>
|
|
|
|
</td>
|
|
<td>
|
|
<a href="{:U('media_edit_adv',array('id'=>$data['id'],'model'=>$model['id']))}">编辑</a>
|
|
<a href="{:U('del_adv?ids='.$data['id'])}" class="ajax-get confirm" target-form="ids">删除</a>
|
|
</td>
|
|
</tr>
|
|
</volist>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="page">
|
|
{$_page|default=''}
|
|
</div>
|
|
|
|
|
|
<div class="common_settings">
|
|
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
|
<form class="addShortcutIcon">
|
|
<input type="hidden" name="title" value="{$m_title}">
|
|
<input type="hidden" name="url" value="Site/media">
|
|
</form>
|
|
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
|
|
</div>
|
|
|
|
|
|
</block>
|
|
|
|
<block name="script">
|
|
<script src="__STATIC__/layer/layer.js"></script>
|
|
<script src="__STATIC__/layer/extend/layer.ext.js"></script>
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
//导航高亮
|
|
highlight_subnav('{:U('Site/media')}');
|
|
Think.setValue('row','{:I("row",10)}');
|
|
//搜索功能
|
|
$("#search").click(function(){
|
|
var url = $(this).attr('url');
|
|
var query = $('.jssearch').find('input').serialize();
|
|
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
|
query = query.replace(/^&/g,'');
|
|
if( url.indexOf('?')>0 ){
|
|
url += '&' + query;
|
|
}else{
|
|
url += '?' + query;
|
|
}
|
|
window.location.href = url;
|
|
});
|
|
|
|
//回车自动提交
|
|
$('.jssearch').find('input').keyup(function(event){
|
|
if(event.keyCode===13){
|
|
$("#search").click();
|
|
}
|
|
});
|
|
|
|
$('.jschangevalue').on('click',function() {
|
|
var that = $(this);
|
|
var id = that.attr('data-id');
|
|
var title = that.attr('data-title');
|
|
|
|
|
|
layer.prompt({title:title,formType:0},function(value,index) {
|
|
|
|
if (!/^(?:0|[1-9][0-9]*)$/.test(value)) {
|
|
updateAlert('请输入正整数','tip_error');
|
|
setTimeout(function(){
|
|
$('#tip').find('.tipclose').click();
|
|
},2000);
|
|
return false;
|
|
}
|
|
|
|
layer.close(index);
|
|
|
|
$.ajax({
|
|
async: false,
|
|
url:"{:U('change_value')}",
|
|
type:"POST",
|
|
dataType:"json",
|
|
data:{id:id,value:value},
|
|
success:function(result){
|
|
if(result.status){
|
|
updateAlert(result.info);
|
|
setTimeout(function(){
|
|
$('#tip').find('.tipclose').click();
|
|
window.location.reload();
|
|
},2000);
|
|
|
|
}else{
|
|
updateAlert(result.info,'tip_error');
|
|
setTimeout(function(){
|
|
$('#tip').find('.tipclose').click();
|
|
},2000);
|
|
}
|
|
},
|
|
error:function(){
|
|
updateAlert('服务器异常','tip_error');
|
|
setTimeout(function(){
|
|
$('#tip').find('.tipclose').click();
|
|
},2000);
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
return false;
|
|
});
|
|
|
|
})
|
|
</script>
|
|
</block>
|