<!--#include file="conn.asp"-->
<%
on error resume next
function LenString(txt,length)
txt=trim(txt)
x = len(txt)
y = 0
if x >= 1 then
for ii = 1 to x
if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then '如果是汉字
y = y + 2
else
y = y + 1
end if
if y >= length then 
txt = left(trim(txt),ii-1) & ".." '字符串限长
exit for
end if
next
LenString = txt
else
LenString = ""
end if
end function

function erectStr(str)
dim tmpstr,i
for i=1 to len(str)-1
tempStr=tempStr+mid(str,i,1) & "<br>"
next
tempStr=tempStr+mid(str,i,1)
erectStr=tempStr
end function


vodid = request.QueryString("vodid")
if vodid = "" then
vodid = 0
end if
id = request.QueryString("id")
if id = "" then
id = 0
end if
%>
<link href="css/doc.css" rel="stylesheet" type="text/css" />

<body scroll="no">

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #67acac">
  <tr>
    <td align="center" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="3" cellspacing="1">
<%

			  set rs=server.CreateObject("ADODB.Recordset")
sqlstr="select a.vodname, b.id, b.filename from vod a, vodfile b where a.id="&vodid&" and b.vodid=" & vodid & " order by b.filename"

				rs.open sqlstr,conn,1,1
				if Err.number <> 0 then
				response.Write(Err.Description)
				response.end()
				end if
				if rs.recordcount <> 0 then
				while not rs.eof
				%>

      <tr style="cursor:hand" onmouseover="this.bgColor='#CAE4FF'" onmouseout="this.bgColor='<%if CInt(id) = CInt(rs("id")) then response.Write("#88C4FF") else response.Write("#ECF5FF") end if%>'" bgcolor="<%if CInt(id) = CInt(rs("id")) then response.Write("#88C4FF") else response.Write("#ECF5FF") end if%>" onclick="playdy(<%=rs("id")%>, <%=vodid%>)">
        <td>&nbsp;<%=rs("filename")%></td>
      </tr>
				<%
					rs.movenext
				wend
				else
					'response.Write("很抱歉！没找到与本片相关的文件！")
				end if
rs.close

%>

    </table></td>
  </tr>
</table>
<script language="javascript">

function playdy(id,vodid)
{
	parent.PlayMovie(id,vodid);
	parent.ShowTab(1);
}
</script>
</body>