<!--#include file="QvodCms_Conn.asp"-->
<!--#include file="QvodCms_Check.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="skins/css/jaja_main.css" rel="stylesheet" type="text/css" />
<title>xml生成</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
</head>
<body>
<table width="100%" border="0" cellspacing="1" class="td1" cellpadding="0">
  <tr>
 <td align="left" background="Skins/images/tdbg.gif" class="STYLE2"><div align="center"><strong>一键生成今日更新影片qvod订阅    </strong></div></td>
  </tr>
  <%if request.form("s1")="" then%>
  <form method="post">
  <tr>
    <td align="center" class="td3">
  <textarea rows="25" name="s1" cols="100%" ><?xml version="1.0" encoding="gb2312"?>
<QvodPlayChannel>
<channel title="qvodchannel" link="<%=Config(9)%>" type="getxml" adder="<%=Config(9)%>/Channel.xml">
<%
Dim mrs1,counts
Call OpenConn()
Set rs=server.createobject("adodb.recordset")
l=year(now)
y=month(now)
r=day(now)
REsponse.write l&"年"&y&"年"&r&"日"
rs.open"select data_name,name_id,class_id,data_lastdate,data_py,data_playurl,data_playpath from [qvodcms_name] where  year(data_lastdate)="&l&" and month(data_lastdate)="&y&" and day(data_lastdate)="&r&" and data_playpath like '%快播QVOD%' order by data_lastdate desc ",conn,1,1
'Response.write rs("name_id")
If not(rs.bof and rs.eof) Then
Do while not rs.Eof
 data_playpath=rs("data_playpath")
 data_playurl=rs("data_playurl")
 if left(data_playpath,2)="快播" then
  PlayUrlData=Split(data_playurl,"$$$")
	VolumeAdd1=Split(PlayUrlData(0),"#")
	Response.Write "<items title='"&rs("data_name")&"' updatetime="""&formatdatetime(rs("data_lastdate"),2)&""" ncount="""&Ubound(VolumeAdd1)+1&""" link="""&Config(9)&GetDataLink(rs("class_id"),rs("name_id"),rs("data_py"))&""">"&chr(13)&""
	For P=0 To Ubound(VolumeAdd1)
	 qvodurl=Split(VolumeAdd1(P),"$")
 Response.Write "<item  title='"&qvodurl(0)&"' url='"&Trim(qvodurl(1))&"' link='"&Config(9)&GetDataLink(rs("class_id"),rs("name_id"),rs("data_py"))&"'/>"&chr(13)&""
  Next
 End if
Response.Flush
Response.Write "</items>"
Response.Flush
Response.Clear
rs.movenext
Loop
rs.close:Set rs=nothing
Call CloseConn()
Else
Response.Write "没更新数据，无需生成"
End if
%>
</channel>
</QvodPlayChannel></textarea>
<%Response.write "<BR>注意：如果一次更新的影片太多，文档过大，服务器默认是不能够生成，请复制内容手动保存"%></td>
  </tr>
  <tr>
    <td align="center"><input name="B1" type="submit" class="anan" value="首页生成Xml" /></td>
  </tr>
  </form>
<tr></tr>
</table>
<%
else
conter=request.form("s1")
id=request("typeid")
Set fs=Server.CreateObject("Scripting.FileSystemObject")  '创建fso对象
FilePath=server.MapPath("../Channel.xml")
set htm=fs.opentextfile(filepath,2,true)
htm.write conter
response.write"<script>alert('QVOD订阅XML生成成功！');history.back();</Script>"
end if
%>
</body>
</html>
 
