<!--#include file="QvodCms_Conn.asp"-->
<link href="skins/css/jaja_main.css" rel="stylesheet" type="text/css" />
<%
Dim action,allid,del_server_name,del_server_endid,reurl,re_url
action=Trim(Request.QueryString("action"))
allid=Trim(Request.Form("data_id"))'批量影片ID
y_id=Trim(Request.Form("y_id"))'批量影片ID
y_class=Trim(Request.Form("y_class"))
re_url=Trim(Request.Form("re_url"))
reurl=Request.ServerVariables("Http_Referer")
Call OpenConn()
If reurl="" Then reurl="qvodcms_news.asp"
If action="delall" Then
    Call Data_safe
    Call Data_delall
ElseIf action="shenhe" Then
    Call Data_safe
	Call Data_shenhe
ElseIf action="daishen" Then
    Call Data_safe
	Call Data_daishen
ElseIf action="yidong" Then
    Call Data_safe
	Call Data_yidong
ElseIf action="shezhi" Then
    Call Data_safe
	Call Data_shezhi	
ElseIf action="tuijian" Then
    Call Data_safe
	Call Data_tuijian
ElseIf action="daijian" Then
    Call Data_safe
	Call Data_daijian
ElseIf action="remen" Then
    Call Data_safe
	Call Data_remen
ElseIf action="daire" Then
    Call Data_safe
	Call Data_daire	
ElseIf action="orderby" Then
    Call Data_safe
	Call Data_orderby
ElseIf action="orderbydel" Then
    Call Data_safe
	Call Data_orderbydel					
ElseIf action="yidongsave" Then
	If y_id="" Then 
		Call QvodCms_Err("必要参数不能为空！")
		Response.End
	End if
	Call Data_yidong_save
ElseIf action="shezhisave" Then
	If y_id="" Then 
		Call QvodCms_Err("必要参数不能为空！")
		Response.End
	End if
	Call Data_shezhi_save
Else
    Call QvodCms_Err("必要参数不能为空！")
    Response.End				
End If

Sub Data_safe'作用：检查查询ID
	If allid="" Then 
		Call QvodCms_Err("必要参数不能为空！")
		Response.End
	End if
End Sub

Sub Data_delall'作用：批量删除影片
    dim id_a,id_b,j,Content,ContentNum,CurrentPage,y
	id_a=split(allid,", ")
	id_b=ubound(id_a)
	For j=0 to id_b
      Set rs_d=conn.execute("select * from qvodcms_news where id="&id_a(j)&" ")
	    If Not(rs_d.bof and rs_d.eof)  Then
		
		      If Not(Instr(rs_d("Pic"),"http://")>0 Or LCase(rs_d("Pic"))="images/nopic.gif") Then Call DelHtml ("../"&rs_d("Pic")&"")'删除图片
		  
		      If Config(17)="html" Then
			  Content=Split(rs_d("Content"),"$分页$"):ContentNum=ubound(Content)
			  For p=1 to ContentNum+1:y=p
	            CurrentPage=y 
		        StrPath=GetDataLinkNews(rs_d("class_id"),rs_d("id"),rs_d("datetimes"),y):If Config(0)<>"/" Then StrPath=Replace(StrPath,Config(0),"/")
				'Response.Write StrPath&"<BR>"
		        Call DelHtml(".."&StrPath)
			   next	
		      End If
			  
	    End If
        rs_d.close:Set rs_d=Nothing
	Next
     conn.execute(" delete from qvodcms_news where id in("&allid&")  ")'删除影片
	 Call CloseConn
	 Response.Redirect(reurl)	
End Sub

Sub Data_shenhe '作用:批量审核影片
    dim id_a,id_b,j
	id_a=split(allid,", ")
	id_b=ubound(id_a)
	For j=0 to id_b
        'Response.Write(id_a(j))&"<br>"
		conn.execute(" update [qvodcms_name] set data_status=1 where name_id="&id_a(j)&" ")'更新影片为审核属性
	Next
	Call CloseConn
	Response.Redirect(reurl)
End Sub

Sub Data_daishen '作用:批量取消审核影片
    dim id_a,id_b,j
	id_a=split(allid,", ")
	id_b=ubound(id_a)
	For j=0 to id_b
        'Response.Write(id_a(j))&"<br>"
		conn.execute(" update [qvodcms_name] set data_status=1 where name_id="&id_a(j)&" ")'更新影片为审核属性
	Next
	Call CloseConn
	Response.Redirect(reurl)
End Sub

Sub Data_tuijian '作用:批量推荐影片
    dim id_a,id_b,j
	id_a=split(allid,", ")
	id_b=ubound(id_a)
	For j=0 to id_b
        'Response.Write(id_a(j))&"<br>"
		conn.execute(" update [qvodcms_news] set elite=1 where id="&id_a(j)&" ")'推荐影片
	Next
	Call CloseConn
	Response.Redirect(reurl)
End Sub

Sub Data_daijian '作用:批量取消推荐
    dim id_a,id_b,j
	id_a=split(allid,", ")
	id_b=ubound(id_a)
	For j=0 to id_b
        'Response.Write(id_a(j))&"<br>"
		conn.execute(" update [qvodcms_news] set elite=0 where id="&id_a(j)&" ")'推荐影片
	Next
	Call CloseConn
	Response.Redirect(reurl)
End Sub

Sub Data_remen '作用:批量热门影片
    dim id_a,id_b,j
	id_a=split(allid,", ")
	id_b=ubound(id_a)
	For j=0 to id_b
		conn.execute(" update [qvodcms_name] set data_hits="&cint(AdminId(28))&" where name_id="&id_a(j)&" ")'推荐影片
	Next
	Call CloseConn
	Response.Redirect(reurl)
End Sub

Sub Data_daire '作用:批量取消热门
    dim id_a,id_b,j
	id_a=split(allid,", ")
	id_b=ubound(id_a)
	For j=0 to id_b
		conn.execute(" update [qvodcms_name] set data_hits="&cint(AdminId(28))-1&" where name_id="&id_a(j)&" ")'推荐影片
	Next
	Call CloseConn
	Response.Redirect(reurl)
End Sub

Sub Data_orderby '作用:批量升序影片
    dim id_a,id_b,j
	id_a=split(allid,", ")
	id_b=ubound(id_a)
	For j=0 to id_b
        'Response.Write(id_a(j))&"<br>"
		conn.execute(" update [qvodcms_name] set data_order=1 where name_id="&id_a(j)&" ")'升序影片
	Next
	Call CloseConn
	Response.Redirect(reurl)
End Sub

Sub Data_orderbydel '作用:批量取消升序
    dim id_a,id_b,j
	id_a=split(allid,", ")
	id_b=ubound(id_a)
	For j=0 to id_b
        'Response.Write(id_a(j))&"<br>"
		conn.execute(" update [qvodcms_name] set data_order=0 where name_id="&id_a(j)&" ")'取消升序影片
	Next
	Call CloseConn
	Response.Redirect(reurl)
End Sub

Sub Data_yidong_save '作用:批量移动影片
    dim id_a,id_b,j
	id_a=split(y_id,",")
	id_b=ubound(id_a)
	For j=0 to id_b
		conn.execute(" update [qvodcms_news] set class_id="&cint(y_class)&" where id="&id_a(j)&" ")'更新影片为审核属性
	Next
	Call CloseConn
	Response.Write"<h1 style='font-size:14px; color:#FF0000;'>移动数据成功,3秒后自动返回数据中心>><meta http-equiv='refresh' content=3;url='"&re_url&"'>［<a href='"&re_url&"'>点此手动返回</a>]</h1>"
End Sub

Sub Data_shezhi_save '作用:批量保存设置影片信息
    '''''1.0311新加功能	
	Dim id_a,id_b,j,she_hits
    Dim data_hits,data_erea,data_inputer,data_elite,data_status,data_lastdate,data_year,data_language,data_continu
	Dim s_hits,s_erea,s_inputer,s_elite,s_status,s_year,s_language,s_continu,sql,data_vip
	'初始化变量
	sql=""
	'
	s_erea=Cint(Request.Form("s_erea"))
	s_hits=Cint(Request.Form("s_hits"))
	s_elite=Cint(Request.Form("s_elite"))
	s_status=Cint(Request.Form("s_status"))
	s_date=Cint(Request.Form("s_date"))
    s_year=Cint(Request.Form("s_year"))
	s_continu=Cint(Request.Form("s_continu"))
	
	data_reurl=Trim(Request.Form("Author"))
	data_elite=Cint(Request.Form("data_elite"))
	data_status=Cint(Request.Form("data_status"))
	data_hits=Cint(Request.Form("data_hits"))
	data_year=Trim(Request.Form("nSource"))
	data_continu=Cint(Request.Form("data_Hot"))	
	data_lastdate=Request.Form("data_lastdate")
	'
	If s_hits="1" Then Sql=Sql&",Hits="&data_hits&""
	If s_erea="1" Then Sql=Sql&",Author='"&data_reurl&"'"
	If s_year="1" Then Sql=Sql&",Source='"&data_year&"'"
	If s_elite="1" Then Sql=Sql&",Elite="&data_elite&""
	If s_status="1" Then Sql=Sql&",status="&data_status&""
	If s_date="1" Then Sql=Sql&",datetimes='"&data_lastdate&"'"
	If s_continu="1" Then Sql=Sql&",Hot="&data_continu&""
	'
	id_a=split(y_id,",")
	id_b=ubound(id_a)
	For j=0 to id_b
		Conn.execute(" update [qvodcms_news] set keywords=keywords "&sql&" where id="&Clng(id_a(j))&" ")				
	Next
	Call CloseConn
	Response.Write"<h1 style='font-size:14px; color:#FF0000;'>操作成功,3秒后自动返回数据中心>><meta http-equiv='refresh' content=3;url='"&re_url&"'>［<a href='"&re_url&"'>点此手动返回</a>]</h1>"
End Sub
%>

<%Sub Data_yidong
allid=replace(allid," ","")
%>
<html>
<head>
<title>批量设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form id="form1" name="form1" method="post" action="qvodcms_news_all.asp?action=yidongsave">
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> 
<th colspan=7 style="text-align:center;"><strong>批量移动新闻</strong></th>
</tr>
<!--影片信息展示开始-->
<tr style="text-align:center; font-size:14px; font-weight:bold">
  <td width="250" class="td2">
    影片ID</td>
  <td class="td2">目标栏目</td>
  <td width="150" class="td2">常规操作</td>
</tr>
<tr style="text-align:center; font-size:14px; font-weight:bold">
  <input type="hidden" name="re_url" value="<%=reurl%>">
  <td class="td2"><textarea name="y_id" rows="10" style="height:250px;width:230px;overflow:auto"><%=allid%></textarea></td>
  <td class="td2"><select name="y_class" size="2" style="height:250px;width:200px;"><%=QvodCms_Class_News(0,"","")%></select></td>
  <td class="td2"><input type="submit" name="Submit" value="马上移动" /></td>
</tr>
</table>
</form>
</body>
</html>
<%End Sub%>

<%Sub Data_shezhi
allid=replace(allid," ","")
%>
<html>
<head>
<title>批量设置新闻相关信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form id="form1" name="form1" method="post" action="qvodcms_news_all.asp?action=shezhisave">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> 
<th colspan=6 style="text-align:center;" background="Skins/images/tdbg.gif"><strong>批量设置新闻相关信息</strong></th>
</tr>
<!--影片信息展示开始-->
<tr style="text-align:center; font-size:14px; font-weight:bold">
  <td width="250" class="td2">新闻ID</td>
  <td class="td2">新闻相关属性设置</td>
  </tr>
<tr style="text-align:center; font-size:14px; font-weight:bold">
  <input type="hidden" name="re_url" value="<%=reurl%>">
  <td class="td2"><textarea name="y_id" rows="10" style="height:270px;width:230px;overflow:auto"><%=allid%></textarea></td>
  <td class="td2"><table width="95%" border="0" cellpadding="0" cellspacing="2" style=" border:1px solid #CCCCCC; height:270px;">
    <tr>
      <td colspan="6"><input type="checkbox" name="s_erea" value="1" style="border:none">新闻作者：<input name="Author" type="text" style="width:80px;" value="Admin"></td>
    </tr>
    <tr>
      <td colspan="6"><input type="checkbox" name="s_year" value="1" style="border:none">新闻来源：<input name="nSource" type="text" style="width:80px;" value="新浪网"></td>
    </tr>
    <tr>
      <td colspan="6"><input type="checkbox" name="s_hits" value="1" style="border:none">点击次数：<input type="text" name="data_hits" style=" width:80px;" value="550"></td>
    </tr>	
    <tr>
      <td colspan="6"><input type="checkbox" name="s_date" value="1" style="border:none">更新时间：<input type="text" name="data_lastdate" style=" width:80px;" value="<%=now()%>"></td>
    </tr>	
    <tr>
      <td colspan="6"><input type="checkbox" name="s_elite" value="1" style="border:none">新闻属性：<input type="checkbox" name="data_elite" value="1" style="border:none">推荐新闻</td>
    </tr>
	<tr>
      <td colspan="6"><input type="checkbox" name="s_continu" value="1" style="border:none">新闻属性：<input type="checkbox" name="data_Hot" style="border:none" value="1">图片影片</td>
    </tr>
    <tr>
      <td colspan="6"><input type="checkbox" name="s_status" value="1" style="border:none">新闻属性：<input type="checkbox" name="data_status" style="border:none" value="1" checked>终审通过</td>
    </tr>	
    
  </table></td>
  </tr>
 <tr> 
<th colspan=6 style="text-align:center;"><strong><input type="submit" name="Submit" value="更新所有选项" /></strong></th>
</tr> 
</table>
</form>
</body>
</html>
<%End Sub%>