📄 myfav_list.asp
字号:
<!--#include file="header.asp"-->
<%
if request.QueryString("userid")="" then
response.write"<script language=javascript>alert('请先登陆');history.back();</Script>"
response.end
end if
%>
<script language="JavaScript">
function tourl(form1_url){
location=form1_url;
for(var i=0;i<document.form1.elements.length;i++){
document.form1.elements[i].options[0].selected=true
}
}
</script>
<table width="776" height="500" border="0" align="center" cellpadding="0" cellspacing="0" class="t1">
<tr>
<td width="9" rowspan="2" valign="top" background="images/img31.gif"><img src="images/img30.gif" width="9" height="15"></td>
<td height="15" align="center" background="images/img35.gif"> </td>
<td width="13" rowspan="2" align="center" valign="top" background="images/img36.gif"><img src="images/img34.gif" width="13" height="15"></td>
<td background="images/img37.gif"> </td>
<td width="9" rowspan="2" align="right" valign="top" background="images/img33.gif"><img src="images/img32.gif" width="9" height="15"></td>
</tr>
<tr>
<td width="200" align="center" valign="top"> </td>
<td width="543" align="center" valign="top">
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from film_fav where userid='"&request.cookies("userid")&"' order by id desc",conn,1,1
if rs.eof and rs.bof then
%>
<table width="500" height="100" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">您没有收藏任何影片</td>
</tr>
</table>
<%
else
maxpage=10 '每页最大显示数
dim totalhow '数据库中的总记录数
dim totalpage '总共页数
dim CurrentPage '当前处于的页数
currentPage=request.Querystring("page")
totalhow=rs.recordcount
if totalhow mod maxpage=0 then
totalpage= totalhow \ maxpage
else
totalpage = totalhow \ maxpage +1
end if
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPage>totalhow then
if (totalhow mod MaxPage)=0 then
currentpage= totalhow \ MaxPage
else
currentpage= totalhow \ MaxPage + 1
end if
end if
if (currentPage-1)*MaxPage<totalhow then
rs.move (currentPage-1)*MaxPage
else
currentPage=1
end if
%>
<table width="530" height="30" border="0" cellpadding="0" cellspacing="0">
<form name="form1" method="post">
<tr>
<td width="200"> 共有<span class="f3"><%=totalhow%></span>部影片 第<span class="f3"><%=currentPage%></span>页/共<span class="f3"><%=totalpage%></span>页 </td>
<td width="300" align="right"><font face="Webdings">7</font> <!--首页头--><%if currentpage>1 then%><a href="list.asp?listid=<%=request.querystring("listid")%>"><%end if%>首页<%if currentpage>1 then%></a><%end if%><!--首页尾--> <!--上一页头--><%if currentpage>1 then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=currentPage-1%>"><%end if%>上一页<%if currentpage>1 then%></a><%end if%><!--上一页尾--> <!--下一页头--><%if cint(currentpage)<totalpage then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=currentPage+1%>"><%end if%>下一页<%if cint(currentpage)<totalpage then%></a><%end if%><!--下一页尾--> <!--尾页头--><%if cint(currentpage)<totalpage then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=totalpage%>"><%end if%>尾页<%if cint(currentpage)<totalpage then%></a><%end if%><!--尾页尾--> <font face="Webdings">8</font>
<select name="topage" size="1" class="select1" onChange="JavaScript:tourl(document.form1.topage.options[document.form1.topage.selectedIndex].value)">
<%for j=1 to totalpage%>
<option value="list.asp?listid=<%=request.querystring("listid")%>&page=<%=j%>" <%if cint(request.Querystring("page"))=j then%>selected<%end if%>> 第<%=j%>页 </option>
<%next%>
</select>
</td>
</tr>
</form>
</table>
<table width="500" height="1" border="0" cellpadding="0" cellspacing="0" class="t2">
<tr>
<td></td>
</tr>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="530" height="160" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<%for i=1 to 10
if rs.eof then exit for%>
<td width="110" align="center"><a href="film.asp?id=<%=rs("id")%>"><img src="<%if isnull(rs("film_pic"))=true or rs("film_pic")="" then%>images/no_film_pic.jpg<%else%>filmpic/<%=rs("film_pic")%><%end if%>" width="100" height="135" border="1" class="img1"></a>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table></td>
<td width="155" align="left"><table width="145" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left"><strong><A class="f2" href="film.asp?id=<%=rs("id")%>" title="<%=rs("film_name")%>">
<%if len(rs("film_name"))>10 then%>
<%=left(rs("film_name"),10)%>...
<%else%>
<%=rs("film_name")%>
<%end if%>
</A></strong></td>
</tr>
</table>
<table width="145" height="120" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top"><a class="f6" href="film.asp?id=<%=rs("id")%>" title="[主要演员]:<%=rs("film_player")%>"><%=left(rs("film_gut"),80)%>......</a></td>
</tr>
</table>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table></td>
<%
if i mod 2=0 then
%>
</tr>
<tr>
<%
end if
rs.movenext
next
%>
</tr>
</table></td>
</tr>
</table>
<!-----分页------>
<table width="500" height="1" border="0" cellpadding="0" cellspacing="0" class="t2">
<tr>
<td></td>
</tr>
</table>
<table width="530" height="30" border="0" cellpadding="0" cellspacing="0">
<form name="form2" method="post">
<tr>
<td width="200"> 共有<span class="f3"><%=totalhow%></span>部影片 第<span class="f3"><%=currentPage%></span>页/共<span class="f3"><%=totalpage%></span>页 </td>
<td width="300" align="right"><font face="Webdings">7</font> <!--首页头--><%if currentpage>1 then%><a href="list.asp?listid=<%=request.querystring("listid")%>"><%end if%>首页<%if currentpage>1 then%></a><%end if%><!--首页尾--> <!--上一页头--><%if currentpage>1 then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=currentPage-1%>"><%end if%>上一页<%if currentpage>1 then%></a><%end if%><!--上一页尾--> <!--下一页头--><%if cint(currentpage)<totalpage then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=currentPage+1%>"><%end if%>下一页<%if cint(currentpage)<totalpage then%></a><%end if%><!--下一页尾--> <!--尾页头--><%if cint(currentpage)<totalpage then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=totalpage%>"><%end if%>尾页<%if cint(currentpage)<totalpage then%></a><%end if%><!--尾页尾--> <font face="Webdings">8</font>
<select name="topage2" size="1" class="select1" onChange="JavaScript:tourl(document.form2.topage2.options[document.form2.topage2.selectedIndex].value)">
<%for j=1 to totalpage%>
<option value="list.asp?listid=<%=request.querystring("listid")%>&page=<%=j%>" <%if cint(request.Querystring("page"))=j then%>selected<%end if%>> 第<%=j%>页 </option>
<%next%>
</select>
</td>
</tr>
</form>
</table>
<%
end if
rs.close
%>
<table width="100" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="footer.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -