<!--#include file="tgzcm_Conn.asp"-->
<%Response.Charset="GB2312"
Dim action,dataid,valuestr
action=Trim(Request.QueryString("action"))
dataid=PE_CLng(Request.QueryString("dataid"))
valuestr=Trim(Request.QueryString("value"))
'Response.write valuestr
'REsponse.end
'Call OpenConn()
Select Case action
Case "ct"'连载
    Conn.Execute(" update [tgzcm_name] set data_reurl='"&valuestr&"' where name_id="&dataid&" ")
	Set lrs=Conn.Execute("select data_reurl from [tgzcm_name] where name_id="&dataid&" ")
	If len(lrs("data_reurl"))>1 then
	Response.Write "<span onClick=""setday('ct',"&dataid&")"" style=""cursor:hand"" title=""修改集数状态"">"&lrs("data_reurl")&"</span>" 
	Else 
	Response.Write"<img src=""Images/ct_01.gif"" title=""设置连载状态"" style=""cursor:pointer"" onClick=""setday('ct',"&dataid&")""/>"
	End If
Case "sp"'专题
    Conn.Execute(" update [adnim_data] set special_id="&PE_CLng(valuestr)&" where data_id="&dataid&" ")
	If PE_CLng(valuestr)>0 then
	Response.Write"<a href=""javascript:setday('sp',"&dataid&","&PE_CLng(valuestr)&")""><img src=""images/zt_01.gif"" border=""0"" /></a>" 
	Else 
	Response.Write"<a href=""javascript:setday('sp',"&dataid&","&PE_CLng(valuestr)&")""><img src=""images/zt_02.gif"" border=""0"" /></a>"
	End If
Case "gb"'留言置顶
    Conn.Execute(" update [adnim_gb] set gb_top="&Cint(valuestr)&" where gb_id="&dataid&" ")
	If PE_CLng(valuestr)=1 then
	Response.Write"<a href=""javascript:setajax('"&action&"',"&dataid&",0)""><img src=""images/icon_01.gif"" border=""0"" /></a>" 
	Else 
	Response.Write"<a href=""javascript:setajax('"&action&"',"&dataid&",1)""><img src=""images/icon_02.gif"" border=""0"" /></a>"
	End If
Case "el"'推荐
    Conn.Execute(" update [tgzcm_name] set data_elite="&PE_CLng(valuestr)&" where name_id="&dataid&" ")
	If PE_CLng(valuestr)=1 then
	Response.Write"<a href=""javascript:setajax('"&action&"',"&dataid&",0)""><img src=""images/icon_01.gif"" border=""0"" /></a>" 
	Else 
	Response.Write"<a href=""javascript:setajax('"&action&"',"&dataid&",1)""><img src=""images/icon_02.gif"" border=""0"" /></a>"
	End If
Case "sh"'审核
    Conn.Execute(" update [tgzcm_name] set data_status="&PE_CLng(valuestr)&" where name_id="&dataid&" ")
	If PE_CLng(valuestr)=1 then
	Response.Write"<a href=""javascript:setajax('"&action&"',"&dataid&",0)""><img src=""images/icon_01.gif"" border=""0"" /></a>" 
	Else 
	Response.Write"<a href=""javascript:setajax('"&action&"',"&dataid&",1)""><img src=""images/icon_02.gif"" border=""0"" /></a>"
	End If
Case "jc"'检查重名
	Set rs = Conn.Execute("Select name_id from tgzcm_name where data_name='"&valuestr&"'")
	If Not rs.eof then
	Response.Write"发现重名影片 ID:"&rs("name_id")
	Else
	Response.Write"恭喜.没有发现重名影片！" 
	End if
	rs.close
	Set rs = nothing
Case "rm"'热门
   Conn.Execute(" update [tgzcm_name] set data_hits="&PE_CLng(valuestr)&" where name_id="&dataid&" ")
   'Set rs=Conn.Execute("Select data_hits from tgzcm_name where name_id="&dataid&" ")
	If PE_CLng(valuestr)>=Clng(tgzcm(10)) then
	Response.Write"<a href=""javascript:setajax('"&action&"',"&dataid&","&Clng(tgzcm(10)-1)&")""><img src=""images/icon_01.gif"" border=""0"" /></a>" 
	Else 
	Response.Write"<a href=""javascript:setajax('"&action&"',"&dataid&","&Clng(tgzcm(10))&")""><img src=""images/icon_02.gif"" border=""0"" /></a>"
	End If
Case "vip"'会员设置 2.5新加功能
    Conn.Execute(" update [tgzcm_name] set data_vip="&PE_CLng(valuestr)&" where name_id="&dataid&" ")
	If PE_CLng(valuestr)=1 then
	Response.Write"<a href=""javascript:setajax('"&action&"',"&dataid&",0)""><img src=""images/icon_01.gif"" border=""0"" /></a>" 
	Else 
	Response.Write"<a href=""javascript:setajax('"&action&"',"&dataid&",1)""><img src=""images/icon_02.gif"" border=""0"" /></a>"
	End If	
End Select
Call CloseConn()
%>