📄 list.asp
字号:
<!--#include file="conn.asp" -->
<%
dim sortid,name,vodid
dim filename,download
vodid=request.item("vodid")
sortid = request.item("sortid")
filename = "list.asp"
name = request.item("name")
dim msearchword
msearchword=Request("search")
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
link=""
%>
<HTML><HEAD><TITLE>vodmenu</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type><META content="MSHTML 5.00.2920.0" name=GENERATOR>
<LINK href="css/list.css" rel=stylesheet type=text/css>
</HEAD>
<BODY aLink=white bgColor=#007eb9 leftMargin=0 link=white text=white topMargin=0
vLink=white>
<table width="83%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#549ada">
<tr>
<td>网络视频栏目:
<%
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from sort order by sortdate desc;"
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
%>
-<a href=list.asp?sortid=<%=rs("sortid")%>><%=rs("sortname")%></a>
<%
rs.movenext
loop
end if
rs.close
%>
-
</td>
</tr>
</table>
<br><%
if sortid<>"" then
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from sort where sortid="&sortid&" order by sortdate desc;"
rs.open sql,conn,1,1
if not rs.eof then%>
<table width="83%" border="1" cellspacing="0" align="center" bordercolor="#549ada">
<tr>
<td><img src="image/house_01.gif" width="32" height="32"><a href=default.htm> 网络视频点播</a> > <%=rs("sortname")%></td>
</tr>
<tr>
<td>本栏目介绍:<br><%=rs("sortmeno")%>
</td>
</tr>
</table>
<%
end if
rs.close
end if
%>
<br>
<table width="848" border="0" cellspacing="0" align="center">
<tr>
<td width="710" valign="bottom" height="37">
<form method="post" action="list.asp">
<div align="center">请输入查询关键字
<input type="text" name="name" maxlength="30" size="20">
<%if sortid<>"" then%>
本栏目内查找:<input type="radio" name="sortid" value="<%=sortid%>" checked>
所有视频查找:<input type="radio" name="sortid" value="">
<%end if%> <input type="submit" name="查找" value="查找">
</div>
</form>
</td>
<td width="134" height="37" valign="top"> </td>
</tr>
</table>
<br>
<%if vodid<>"" then
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from listvod where vodid="&vodid&";"
rs.open sql,conn,1,1
if not rs.eof then
%>
<table border=1 bordercolor=#549ada cellspacing=0 width="83%" align="center">
<tbody>
<tr>
<td width="25%">片名:<%=rs("vodname")%></td>
<td width="25%">点击数:<%=rs("voddian")%></td>
<td width="34%">更新时间:<%=rs("vodtime")%></td>
<td width="16%"><%
if rs("vodlei")="real" then
response.write"<a href=realplay.asp?realid="&rs("vodid")&" target=_blank>点 击 收 看</a>"
else
if rs("vodlei")="mvod" then
response.write"<a href=vodplay.asp?realid="&rs("vodid")&" target=_blank>点 击 收 看</a>"
end if
end if
%> </td>
</tr>
<tr valign="top">
<td colspan="4" height="148"><%
if rs("vodpic")<>"" then
%><img src="image/<%=rs("vodpic")%>" width="130" height="141" align="left" border="0"><%end if%><%
if rs("vodpic")<>"" then
%><%=rs("vodmeno")%><%end if%><br>
111<br>
</td>
</tr>
</tbody>
</table>
<%end if
rs.close
end if%>
<DIV align=left></DIV>
<TABLE border=0 cellSpacing=0 width="100%">
<TBODY>
<TR align=middle>
<TD height=19>
<TABLE border=1 borderColor=#549ada cellSpacing=0 width="83%" align="center">
<TBODY>
<TR>
<TD>
<TABLE border=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
<TR bgColor=#549ada>
<TD
colSpan=5></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE border=0 cellSpacing=0 width="100%">
<TBODY>
<TR align=middle valign="top">
<TD>
<TABLE border=1 borderColor=#549ada cellSpacing=0 width="83%" align="center">
<TBODY>
<TR valign="top">
<TD>
<%
const MaxPerPage=10
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
sql= "select * from listvod where vodid<>'' "
if sortid<>"" then
sql=sql&"and vodsortid="&sortid&" "
link=link&"&sortid="&sortid&""
end if
if name<>"" then
sql=sql&"and vodname='"&name&"' "
link=link&"&name="&name&""
end if
sql=sql&"order by vodtime desc"
Set rs= Server.CreateObject("ADODB.Recordset")
'response.Write sql
'Response.End
rs.open sql,conn,1,1
if rs.eof then
response.write "<p align='center'>还没有任何视频信息!</p>"
' Response.Write "<P align=center><A href=tzfabu.asp><IMG alt=fdc-infopost (1903 bytes) border=0 height=21 src=images/fdc-infopost.gif width=71></A></p>"
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
'showpage totalput,MaxPerPage,"list.asp"
showContent
showpage totalput,MaxPerPage,"list.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
'showpage totalput,MaxPerPage,"list.asp"
showContent
showpage totalput,MaxPerPage,"list.asp"
else
currentPage=1
'showpage totalput,MaxPerPage,"list.asp"
showContent
showpage totalput,MaxPerPage,"list.asp"
end if
end if
rs.close
end if
'end if
set rs=nothing
%> <%
sub showContent
%><TABLE border=0 cellSpacing=0 width="100%">
<TBODY>
<TR bgColor=#549ada>
<TD bgcolor="#549ada"><FONT color=#ffcc00>片名</FONT></TD>
<TD><FONT color=#ffcc00>播放</FONT></TD>
<TD><FONT color=#ffcc00>人气</FONT></TD>
<TD><FONT color=#ffcc00>更新日期</FONT></TD>
<TD><FONT color=#ffcc00>简介</FONT></TD>
</TR><% dim i
i=0
do while not rs.EOF and not rs.bof %>
<TR>
<TD><%=rs("vodname")%></TD>
<TD><%
if rs("vodlei")="real" then
response.write"<a href=realplay.asp?realid="&rs("vodid")&" target=_blank>点击收看</a>"
else
if rs("vodlei")="mvod" then
response.write"<a href=vodplay.asp?realid="&rs("vodid")&" target=_blank>点击收看</a>"
end if
end if
%> </TD>
<TD><%=rs("voddian")%></TD>
<TD><%=rs("vodtime")%></TD>
<TD><a href=list.asp?sortid=<%=rs("vodsortid")%>&vodid=<%=rs("vodid")%>>详情</a></TD>
</TR>
<%i=i+1
if i>=MaxPerPage then exit do
rs.MoveNext
if rs.eof then exit do
if not rs.eof and not rs.bof then
%>
<TR bgColor=#549ada>
<TD><%=rs("vodname")%></TD>
<TD><%
if rs("vodlei")="real" then
response.write"<a href=realplay.asp?realid="&rs("vodid")&" target=_blank>点击收看</a>"
else
if rs("vodlei")="mvod" then
response.write"<a href=vodplay.asp?realid="&rs("vodid")&" target=_blank>点击收看</a>"
end if
end if
%> </TD>
<TD><%=rs("voddian")%></TD>
<TD><%=rs("vodtime")%></TD>
<TD><a href=list.asp?sortid=<%=rs("vodsortid")%>&vodid=<%=rs("vodid")%>>详情</a></TD>
</TR>
<%
end if
i=i+1
if i>=MaxPerPage then exit do
rs.MoveNext
loop
%>
</TBODY>
</TABLE>
<%
end sub
%>
<%
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write"<p align=center>"
if CurrentPage<2 then
response.write "<IMG alt=firstpage.gif (2075 bytes) border=0 height=22 src=image/firstpage.gif> "
response.write "<IMG alt=prevpage.gif (1931 bytes) border=0 height=22 src=image/prevpage.gif> "
else
response.write "<a href="&filename&"?page=1"&link&"><IMG alt=firstpage.gif (2075 bytes) border=0 height=22 src=image/firstpage.gif></a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&""&link&"><IMG alt=prevpage.gif (1931 bytes) border=0 height=22 src=image/prevpage.gif></a> "
end if
if n-currentpage<1 then
response.write "<IMG alt=nextpage.gif (1903 bytes) border=0 height=22 src=image/nextpage.gif> "
response.write "<IMG alt=lastpage.gif (1950 bytes) border=0 height=22 src=image/lastpage.gif> "
else
response.write "<a href="&filename&"?page="&CurrentPage+1&""&link&">"
response.write "<IMG alt=nextpage.gif (1903 bytes) border=0 height=22 src=image/nextpage.gif> </a>"
response.write "<a href="&filename&"?page="&n&""&link&"><IMG alt=lastpage.gif (1950 bytes) border=0 height=22 src=image/lastpage.gif></a> "
end if
response.write"</p>"
end function
set rs=nothing
%>
</TD>
</TR></TBODY></TABLE>
</TD>
</TR></TBODY></TABLE>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -