qa-ifish7/web/Application/Admin/View/Ad/index.html

76 lines
3.3 KiB
HTML

<include file="Inc:header"/>
<div class="container-fluid">
<div class="main_head">
<div class="main_h1"><h1>{$pagetitle}</h1></div>
<div class="main_add">
<a class="btn btn-inverse" href="{:U("add",array("adid"=>$adid))}">添加广告</a>
</div>
</div>
<div style="text-align:right; float:right"></div>
<div class="row-fluid">
<div class="span12">
<div class="widget-box">
<div class="widget-content nopadding">
<form method="post" action="__SELF__" onsubmit="return save_form2(this);" class="modelIndex">
<table class="table table-striped">
<thead>
<tr>
<th width="5%">排序</th>
<th width="3%">ID</th>
<th width="30%">广告名称</th>
<th width="5%">状态</th>
<th width="10%">图片</th>
<th width="20%">链接地址</th>
<th width="15%">操作</th>
</tr>
</thead>
<tbody>
<foreach name="data" item="v" >
<tr>
<td style="text-align: center;"><input type='text' value="{$v.sort}" name="sort[]" class="" style="width:30px;height:10px; margin:0px;"><input type='hidden' value="{$v.id}" name="id[]"></td>
<td style="text-align: center;">{$v.id}</inpu></td>
<td style="text-align: center;">{$v.name}</td>
<td class="center">
<if condition="$v.status eq 1 ">
<span class="label label-success">启用</span>
<else />
<span class="label">禁用</span>
</if>
</td>
<td style="text-align: center;"><a href="{$v.thumb}" target="_blank"><img src="{$v.thumb}" style="height:30px;"></a></td>
<td class="center tab-title" title=""><a href="{$v.link}" target="_blank">{$v.link}</a></td>
<td class="center">
<a href="{:U('editor',array('id'=>$v[id]))}" class="btn btn-primary btn-mini">修改</a>
<a href="{:U('delete',array('ids'=>$v[id]))}" class="btn btn-danger btn-mini ajax_del {:check_user_node('Ad/delete')?'':'none'}">删除</a>
</td>
</tr>
</foreach>
</tbody>
</table>
</form>
</div>
</div>
<div class="widget-bottom">
<button class="btn btn-success" onclick="$('.modelIndex').attr('action','{:U('sort')}');$('.modelIndex').submit();" type="button">修改顺序</button>
</div>
<div class="pagination alternate">
<ul>{$listpage}</ul>
</div>
</div>
</div>
</div>
<include file="Inc/footer"/>
<script>
function this_delete(){
layer.confirm("您确定要删除吗?",function(){
$('.modelIndex').attr('action','{:U('delete')}');
$('.modelIndex').submit();
},function(){layer.closeAll();return false;});
}
</script>