<!--#include file="QvodCms_Conn.asp"-->
<!--#include file="QvodCms_Check.asp"-->
<%
Dim action,class_id,class_bigid,server_id,shuxin_id,search_type,search_class,search_keyword,pagelink,order,ListUrl,DataUrl
Dim idcount,pagec,sqlid
sql="":S1="":S2="":S3=""
action=Trim(Request.QueryString("action"))
order=Trim(Request.QueryString("order"))
class_id=qvodcms_clng(Request.QueryString("class_id"))  '分类筛选参数－栏目
server_id=qvodcms_clng(Request.QueryString("server_id"))'分类筛选参数－服务器组
shuxin_id=qvodcms_clng(Request.QueryString("shuxin_id"))'分类筛选参数－电影属性
search_type=qvodcms_clng(Request.QueryString("search_type"))'搜索筛选参数－影片名
search_keyword=Trim(Request.QueryString("search_keyword"))'搜索关键字
page=qvodcms_clng(Request.QueryString("page")):If page<=0 or page="" Then page=1'初始化分页参数
Call OpenConn()	
Sub Data_elite()'作用：处理显示该影片是否推荐
	If rs("data_elite")=0 then
	    Response.Write("<a href=qvodcms_data_save.asp?action=elite&data_id="&rs("name_id")&"&elite_id=1>设为推荐</a> ")
	Else
	    Response.Write("<a href=qvodcms_data_save.asp?action=elite&data_id="&rs("name_id")&"&elite_id=0><font color=#990000>取消推荐</font></a> ")
	End If
End Sub

Sub dysx()'处理电影属性
	If rs("data_elite")=1 then
	 Response.Write"<img src=""images/icon_01.gif"" border=""0"" style=""cursor: pointer;"" onClick=""setajax('el',"&rs("name_id")&",0)""/>"
	Else
	Response.Write"<img src=""images/icon_02.gif"" border=""0"" style=""cursor: pointer;"" onClick=""setajax('el',"&rs("name_id")&",1)""/>"
	End If
End Sub

Sub dyrm()'处理热门
    If rs("data_hits")>=Clng(AdminId(28)) then
	 Response.Write"<img src=""images/icon_01.gif"" border=""0"" style=""cursor: pointer;"" onClick=""setajax('rm',"&rs("name_id")&","&Clng(AdminId(28))&")""/>"
	Else
	Response.Write"<img src=""images/icon_02.gif"" border=""0"" style=""cursor: pointer;"" onClick=""setajax('rm',"&rs("name_id")&",1)""/>"
	End if
End Sub

Sub dysh()'处理电影属性
	If rs("data_status")=1 then
	 Response.Write"<img src=""images/icon_01.gif"" border=""0"" style=""cursor: pointer;"" onClick=""setajax('sh',"&rs("name_id")&",0)""/>"
	Else
	Response.Write"<img src=""images/icon_02.gif"" border=""0"" style=""cursor: pointer;"" onClick=""setajax('sh',"&rs("name_id")&",1)""/>"
	End If
End Sub

Sub dyvip()'处理电影vip属性
	If rs("data_vip")=1 then
	 Response.Write"<img src=""images/icon_01.gif"" border=""0"" style=""cursor: pointer;"" onClick=""setajax('vip',"&rs("name_id")&",0)""/>"
	Else
	Response.Write"<img src=""images/icon_02.gif"" border=""0"" style=""cursor: pointer;"" onClick=""setajax('vip',"&rs("name_id")&",1)""/>"
	End If
End Sub

Sub dycu()'处理加粗
    If rs("data_cu")=1 then
	 Response.Write("<font color='red'> 粗</font>")
	End If 
End Sub

Sub dyp()'处理排序
    If rs("data_order")=1 then
	 Response.Write("<font color='red'>↑升</font>")  
	End If 
End Sub


%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<TITLE>管理页面</TITLE>
<link href="skins/css/jaja_main.css" rel="stylesheet" type="text/css" />
<script language = "javaScript" src = "qvodcms_All.js" type="text/javascript"></script>
<script type='text/javascript' src='../Js/qvodcms.Ajax.js'></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
<th colspan=12 style="text-align:center;">使用方法:有两个或两个以上重复的片名,将多余的影片删除或取消审核(建议设置取消审核前台就不会显示)</th>
</tr>
<tr style="text-align:center;">
<td width="32" background="Skins/images/tdbg.gif" class="td2"  align="center">选中</td>
<td width="34" background="Skins/images/tdbg.gif" class="td2">ID</td>
<td width="359" background="Skins/images/tdbg.gif" class="td2">影片名称</td>
<td width="110" background="Skins/images/tdbg.gif" class="td2">连载</td>
<td width="83" background="Skins/images/tdbg.gif" class="td2">更新时间</td>
<td width="71" background="Skins/images/tdbg.gif"  class="td2">次 数</td>
<td width="31" background="Skins/images/tdbg.gif"  class="td2">推荐</td>
<td width="31" background="Skins/images/tdbg.gif" class="td2">热门</td>
<td width="31" background="Skins/images/tdbg.gif" class="td2">审核</td>
<td width="31" background="Skins/images/tdbg.gif" class="td2">会员</td>
<td width="84" background="Skins/images/tdbg.gif" class="td2">播放资源</td>
<td width="93" background="Skins/images/tdbg.gif" class="td2">常规操作</td>
</tr>
<form name='myform' method='Post' action=''>
<%
Set rs = Server.CreateObject("adodb.recordset")
nameid=Cint(AdminId(26))
pagelink="QvodCms_Data_Rename.asp"
Set rs = Server.CreateObject("adodb.recordset")
If nameid=0 Then
sql = " Select name_id,data_name,class_id,data_hits,data_elite,data_status,data_inputer,data_lastdate,data_color,data_py,data_cu,data_order,data_reurl,data_vip from qvodcms_name where data_status=1 and data_name in (select data_name from qvodcms_name where data_status=1 group by data_name having count(data_name) > 1)"
Else
sql = " Select name_id,data_name,class_id,data_hits,data_elite,data_status,data_inputer,data_lastdate,data_color,data_py,data_cu,data_order,data_reurl,data_vip from qvodcms_name where data_status=1 and left(data_name,"&nameid&") in (select left(data_name,"&nameid&") from qvodcms_name where data_status=1 group by left(data_name,"&nameid&") having count(left(data_name,"&nameid&")) > 1) order by data_name"
End If
rs.Open sql, Conn, 1, 1
If not(rs.bof And rs.eof) Then
	rs.pagesize=Clng(AdminId(19))'每页数据
	rs.AbsolutePage=page
	m=rs.recordcount     '总记录
	n=rs.PageCount       '总页数
	z=rs.pagesize        '每页数量
	i=0
	Do While Not rs.eof and i<rs.pagesize
	i=i+1
%>
<tr bgcolor="#FFFFFF" onMouseOver="javascript:this.bgColor='#ecf5f8'" onMouseOut="javascript:this.bgColor='#FFFFFF'" style="text-align:center;">
  <td ><input name='data_id' type='checkbox' value='<%=rs("name_id")%>' style="border:none">  </td>
  <td ><%=rs("name_id")%></td>
  <td style="text-align:left;">[<a href="qvodcms_data.asp?action=fenlei&data_type=class&class_id=<%=rs("class_id")%>"><%=GetClassName(rs("class_id"))%></a>] <a href="<%=GetDataLink(rs("class_id"),rs("name_id"),rs("data_py"))%>" target="_blank"><%=GetColor(left(rs("data_name"),12),rs("data_color"))%></a> <%If Config(17)="html" Then%> <a href="#" onClick="ops('QvodCms_CreateData.asp?BeginID=<%=rs("name_id")%>&EndID=<%=rs("name_id")%>&Action=id','150','300');">生成</a><%End If%> <%Call dycu()%> <%Call dyp()%> </td>
  <td><!--<%'=GetReplace(rs("data_reurl"))%>--><span  id="ct<%=rs("name_id")%>"><%If len(rs("data_reurl"))>1 Then%><span style="cursor:pointer" onClick="setday('ct',<%=rs("name_id")%>,0)" title='修改集数状态'><%=trim(rs("data_reurl"))%></span><%Else%><img src="Images/ct_01.gif" title="设置集数状态" style="cursor:pointer;font-size:12px;" onClick="setday('ct',<%=rs("name_id")%>,0)"/><%End If%></span></td>
  <td ><%=formatdatetime(rs("data_lastdate"),2)%></td>
  <td ><%=rs("data_hits")%></td>
  <td  id="el<%=rs("name_id")%>"><%Call dysx%></td>
  <td  id="rm<%=rs("name_id")%>"><%Call dyrm%></td>
  <td  id="sh<%=rs("name_id")%>"><%Call dysh%></td>
  <td  id="vip<%=rs("name_id")%>"><%Call dyvip%></td>
 <td id="playurl<%=rs("name_id")%>"><img src="Images/icon_url.gif" align="absmiddle" title="设置影片播放地址" style="cursor:pointer;font-size:12px;" onClick="setday('playurl',<%=rs("name_id")%>,'<%=rs("data_name")%>')"/></td>
  <td ><a href="qvodcms_data_edit.asp?data_id=<%=rs("name_id")%>">修改</a> <a href="qvodcms_data_save.asp?action=del&data_id=<%=rs("name_id")%>" onClick="return confirm('删除后将不能恢复,确定要删除吗?');">删除</a> <%'Call Data_elite%></td>
  </tr>
<%
	rs.movenext  
	loop 
%>
<tr >
  <td colspan="12" class="td2" style="text-align:left; height:30px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="81" style="padding-left:6px;"><input type="checkbox" name="ChkAll" id="ChkAll" class="checkbox" onClick="checkOthers('input','data_id')"/>全/反选</td>
    <td width="905">
<input name='submit1' class="inputt" type='submit' value='批量生成' onClick="document.myform.action='qvodcms_CreateData.asp?Action=allid';">
<input name='submit1' class="inputt" type='submit' value='批量升序' onClick="document.myform.action='qvodcms_data_all.asp?action=orderby';">
<input name='submit1' class="inputt" type='submit' value='批量降序' onClick="document.myform.action='qvodcms_data_all.asp?action=orderbydel';">
<input name='submit1' class="inputt" type='submit' value='批量推荐' onClick="document.myform.action='qvodcms_data_all.asp?action=tuijian';">&nbsp;<input name='submit1' class="inputt" type='submit' value='取消推荐' onClick="document.myform.action='qvodcms_data_all.asp?action=daijian';">&nbsp;<input name='submit1' class="inputt" type='submit' value='设为热门' onClick="document.myform.action='qvodcms_data_all.asp?action=remen';">&nbsp;<input name='submit1' class="inputt" type='submit' value='取消热门' onClick="document.myform.action='qvodcms_data_all.asp?action=daire';">&nbsp;<input name='submit1' class="inputt" type='submit' value='批量移动' onClick="document.myform.action='qvodcms_data_all.asp?action=yidong';">&nbsp;<input name='submit1'  class="inputt" type='submit' value='批量删除' onClick="document.myform.action='qvodcms_data_all.asp?action=delall';">&nbsp;<input name='submit1' class="inputt" type='submit' value='批量设置' onClick="document.myform.action='qvodcms_data_all.asp?action=shezhi';"></td>
  </tr>
</table></td>
  </tr>
</form> 
<tr> 
<th colspan=12 style="text-align:center; padding:5px;"><%=ShowPage(pagelink, m, z, page, True, True, "条", False)%></th>
</tr>
</table>
<%
Else
    Call QvodCms_Err("暂无数据！")
End If
rs.Close:Set rs=nothing:Call CloseConn()
%>
<div style="text-align:center; margin-top:5px; color: #FF0000">页面执行时间：<%=GetRunTime()%>秒</div>
</body>
</html>