| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 | <include file="public@header"/><style>.table img{	max-width:100px;	max-height:100px;}.textArea textarea{	width:90%;padding:3%;height:80%;margin:0 auto;margin-top:30px;	margin-left: 2%;}.textArea_btn{	text-align: right;	margin-top: 30px;}.textArea_btn input{	margin-right: 30px;}</style></head><body>	<div class="wrap js-check-wrap">		<ul class="nav nav-tabs">			<li class="active"><a >下架视频列表</a></li>					</ul>			<form class="well form-inline margin-top-20" method="post" action="{:url('Video/lowervideo')}">					排序:			<select class="select_2 form-control" name="ordertype">				<option value="">默认</option>				<option value="1" <if condition="input('request.ordertype') eq 1">selected</if> >评论数排序</option>						<option value="2" <if condition="input('request.ordertype') eq 2">selected</if> >点赞数排序</option>				<option value="3" <if condition="input('request.ordertype') eq 3">selected</if> >分享数排序</option>								</select>			视频分类:			<select class="select_2 form-control" name="classid">				<option value="">默认</option>				<volist name="classify" id="vo">					<option value="{$vo.id}" <if condition="input('request.classid') eq $vo.id">selected</if> >{$vo.title}</option>				</volist>					</select>			关键字: 			<input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}" placeholder="视频ID/会员ID">			<input class="form-control" type="text" name="keyword1" style="width: 200px;" value="{:input('request.keyword1')}" placeholder="视频标题">			<input class="form-control" type="text" name="keyword2" style="width: 200px;" value="{:input('request.keyword2')}" placeholder="用户名称">			<input type="submit" class="btn btn-primary" value="搜索">			<a class="btn btn-danger" href="{:url('Admin/Video/lowervideo')}">清空</a>		</form>					<form method="post" class="js-ajax-form">			<div class="table-actions">                <button class="btn btn-danger btn-sm js-ajax-submit" type="submit" data-action="{:url('Video/setBatchDel')}"                        data-subcheck="true">批量删除                </button>                <p class="help-block" style="font-weight: bold;">批量操作请谨慎</p>            </div>			<table class="table table-hover table-bordered">				<thead>					<tr>						<th width="16">	                            <label>                                <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">                            </label>	                        </th>						<th align="center">ID</th>						<th>会员昵称(ID)</th>						<th style="max-width: 300px;">标题</th>						<th>图片</th>						<th>点赞数</th>						<th>评论数</th>						<th>分享数</th>						<th>视频状态</th>						<th>发布时间</th>						<th align="center">{:lang('ACTIONS')}</th>					</tr>				</thead>				<tbody>					<php>$isdel=array("0"=>"上架","1"=>"下架");$status=array("0"=>"待审核","1"=>"通过","2"=>"不通过");</php>					<foreach name="lists" item="vo">					<tr>						<td>                            <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}">                        </td>						<td align="center">{$vo.id}</td>						<td>{$vo['userinfo']['user_nicename']} ({$vo['uid']})</td>						<td style="max-width: 300px;">{$vo['title']}</td>						<td><img src="{:get_upload_path($vo['thumb'])}" class="imgtip" /></td>						<td>{$vo['likes']}</td>						<td>{$vo['comments']}</td>						<td>{$vo['shares']}</td>						<td>{$status[$vo['status']]}</td>						<td>{:date('Y-m-d H:i:s',$vo['addtime'])}</td>						<td align="center">								<a class="btn btn-xs btn-primary" href="javascript:void(0)" onclick="videoListen({$vo['id']})" >观看</a>														<a class="btn btn-xs btn-primary" href="{:url('Video/edit',array('id'=>$vo['id'],'from'=>'lowervideo'))}" >编辑</a>														<if condition="$vo['isdel'] eq '1'">							<a href="{:url('Video/set_shangjia',array('id'=>$vo['id']))}" class="btn btn-xs btn-primary js-ajax-dialog-btn" data-msg="您确定要将该视频上架吗?">上架</a>								</if>														 <a class="btn btn-xs btn-danger" href="javascript:void (0)" onclick="del({$vo['id']})" >删除</a>													</td>					</tr>					</foreach>				</tbody>			</table>			<div class="table-actions">                <button class="btn btn-danger btn-sm js-ajax-submit" type="submit" data-action="{:url('Video/setBatchDel')}"                        data-subcheck="true">批量删除                </button>                <p class="help-block" style="font-weight: bold;">批量操作请谨慎</p>            </div>			<div class="pagination">{$page}</div>		</form>	</div>	<script src="__STATIC__/js/admin.js?t={$time}"></script>	<script src="__STATIC__/layer/layer.js"></script>	<script type="text/javascript">				var del_status=0;				function del(id){			var p={$p};			layer.open({			  type: 1,			  title:"是否确定将该视频删除",			  skin: 'layui-layer-rim', //加上边框			  area: ['30%', '30%'], //宽高			  content: '<div class="textArea"><textarea id="del_reason" maxlength="50" placeholder="请输入删除原因,最多50字" /> </div><div class="textArea_btn" ><input type="button" id="delete" value="删除" onclick="del_submit('+id+','+p+')" /><input type="button" id="cancel" onclick="layer.closeAll();" value="取消" /></div>'			});		}		function del_submit(id,p){			var reason=$("#del_reason").val();			if(del_status==1){				return;			}			del_status=1;			$.ajax({				url: '/admin/video/del.html',				type: 'POST',				dataType: 'json',				data: {id:id,reason: reason},				success:function(data){					var code=data.code;					if(code!=0){						layer.msg(data.msg);						return;					}					del_status=0;					if(data.msg=='您没有访问权限!'){						layer.msg(data.msg);						return;					}					//设置按钮不可用					$("#delete").attr("disabled",true);					$("#cancel").attr("disabled",true);					layer.msg("删除成功",{icon: 1,time:1000},function(){						layer.closeAll();												//location.href='/admin/video/lowervideo.html&p='+p;						location.reload();					});				},				error:function(e){					$("#delete").attr("disabled",false);					$("#cancel").attr("disabled",false);					console.log(e);				}			});								}		/*获取视频评论列表*/		function commentlists(videoid){			layer.open({				type: 2,				title: '视频评论列表',				shadeClose: true,				shade: 0.8,				area: ['60%', '90%'],				content: '/admin/video/commentlists.html&videoid='+videoid 			}); 		}	</script>	<script type="text/javascript">		function videoListen(id){			layer.open({			  type: 2,			  title: '观看视频',			  shadeClose: true,			  shade: 0.8,			  area: ['500px', '750px'],			  content: '/admin/video/video_listen.html&id='+id			}); 		}	</script>	</body></html>
 |