📄 user_filmfav.asp
字号:
<!--#include file="../chklogin.asp"-->
<%
'################登陆状态及网吧用户判断#########################
if request.cookies("userid")="" then '如果账号值为空,视为没登陆,转到登陆页
Response.Redirect ("login.asp")
else '否则视为已登陆
if request.cookies("u_type")=3 then '如果是网吧用户
if request.cookies("center")<>1 then '并且没有登陆管理中心
Response.Redirect ("login.asp?action=center") '转到网吧管理中心登陆
end if
end if
end if
'################登陆状态及网吧用户判断#########################
set rs=server.createobject("adodb.recordset")
rs.open "select * from setup where id=1",conn,1,1
website_name=rs("website_name")
rs.close
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=website_name%> - 用户管理中心</title>
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
a:link {
color: #000000;
}
a:visited {
color: #000000;
}
a:hover {
color: #FF6600;
}
-->
</style>
<link href="../images/style.css" rel="stylesheet" type="text/css">
<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>
</head>
<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<!--#include file="header.asp"-->
<table width="776" height="450" border="0" align="center" cellpadding="0" cellspacing="0" class="t1">
<tr>
<td width="260" height="36" rowspan="2" background="../images/img22.gif"><img src="../images/img29.gif" width="220" height="36"></td>
<td width="9" height="36" rowspan="2" valign="top"><img src="../images/1_04.jpg" width="9" height="36"></td>
<td height="11" background="../images/1_05.jpg"></td>
</tr>
<tr>
<td height="25"><a href="index.asp">用户管理中心</a> - <a href="user_msg.asp">影片收藏</a></td>
</tr>
<tr>
<td width="260" align="center" valign="top"><table width="240" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30" align="center"><img src="../images/img18.gif" width="23" height="21"></td>
<td align="left"><a href="index.asp"><strong>管理首页</strong></a></td>
</tr>
</table>
<table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30" align="center"><img src="../images/img25.gif" width="23" height="21"></td>
<td align="left"><strong><a href="user_data.asp">修改资料</a></strong></td>
</tr>
</table>
<table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30" align="center"><img src="../images/img26.gif" width="23" height="21"></td>
<td align="left"><a href="user_cz.asp"><strong>影卡充值</strong></a></td>
</tr>
</table>
<table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30" align="center"><img src="../images/img27.gif" width="23" height="21"></td>
<td align="left"><strong><a href="user_msg.asp">站内短信</a></strong></td>
</tr>
</table>
<table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30" align="center"><img src="../images/img28.gif" width="23" height="21"></td>
<td align="left"><strong>影片收藏</strong><strong>←</strong></td>
</tr>
</table>
<table width="120" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30" align="center"><img src="../images/img16.gif" width="23" height="21"></td>
<td align="left"><a href="login.asp?action=logout"><strong>退出登陆</strong></a></td></tr>
</table>
</td>
<td valign="top" background="../images/1_24.jpg"> </td>
<td align="center" valign="top">
<!--头-->
<table width="450" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20" align="center"></td>
</tr>
</table>
<%
action_e=request.Querystring("action")
Select Case action_e
Case ""
Call main()
Case "del_fav"
Call del_fav()
end select
%>
<%
sub main
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="450" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td height="100" align="center" bgcolor="#F7F7F7">您还没有收藏任何影片</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="450" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td height="25" align="center" bgcolor="#F7F7F7">影片名称</td>
<td align="center" bgcolor="#F7F7F7">收藏时间</td>
<td align="center" bgcolor="#F7F7F7"> 操作 </td>
</tr>
<%
i=0
do while not rs.eof
i=i+1
%>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF"><a href="../film.asp?id=<%=rs("film_id")%>" target="_blank"><%=rs("film_name")%></a></td>
<td height="25" align="center" bgcolor="#FFFFFF"><%=rs("add_time")%></td>
<td height="25" align="center" bgcolor="#FFFFFF"><a href="user_filmfav.asp?action=del_fav&id=<%=rs("id")%>" onclick="javascript:{if(confirm('确定要删除对该影片的收藏吗?')){return true;}return false;}">删除收藏</a></td>
</tr>
<%
if i>=maxpage then exit do
rs.movenext
loop
%>
</table>
<table width="450" height="40" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post">
<tr>
<td align="center"><font face="Webdings">7</font> <%if currentpage>1 then%><a href="user_filmfav.asp"><%end if%>首页<%if currentpage>1 then%></a><%end if%>
<%if currentpage>1 then%><a href="user_filmfav.asp?page=<%=currentPage-1%>"><%end if%>上一页<%if currentpage>1 then%></a><%end if%>
<%if cint(currentpage)<totalpage then%><a href="user_filmfav.asp?page=<%=currentPage+1%>"><%end if%>下一页<%if cint(currentpage)<totalpage then%></a><%end if%>
<%if cint(currentpage)<totalpage then%><a href="user_filmfav.asp?page=<%=totalpage%>"><%end if%>尾页<%if cint(currentpage)<totalpage then%></a><%end if%> <font face="Webdings">8</font> 共有<span class="f3"><%=totalhow%></span>条 <span class="f3"><%=currentPage%></span>/<span class="f3"><%=totalpage%></span>页
<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="user_filmfav.asp?page=<%=j%>" <%if cint(request.Querystring("page"))=j then%>selected<%end if%>> 第<%=j%>页 </option>
<%next%>
</select></td>
</tr>
</table>
<%
end if
%>
<%end sub%>
<%
sub del_fav()
conn.execute"delete From film_fav Where id="&request.QueryString("id")&""
response.write"<script language=javascript>alert('删除影片收藏成功');location.href = '"&filename&"';</Script>"
response.end
end sub
%>
</td>
</tr>
</table>
<!--#include file="footer.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -