⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myfavorite.asp

📁 购物系统时尚版.强大的后台文章编辑器的功能
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
dim key,toppath,dbpath
toppath=""
dbpath=""
%>
<!--#include file="chk.asp" -->
<!--#include file="db_conn.asp"-->
<!--#include file="my_lib/my_request.asp"-->
<!--#include file="my_lib/pages.asp"-->
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">
<title>会员控制面版-我的收藏</title>
</head>

<body topmargin="1">

<!--#include file="top.asp" -->

<div align="center">
	<table border="1" width="760" id="table1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#F47E36">
		<tr>
			<td valign="top">
			<table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0">
				<tr>
					<td height="25" bgcolor="#FFEEDD" colspan="2" style="border-top: 3px solid #F47E36">
					<p align="center">『会员控制中心』</td>
				</tr>
				<tr>
					<td width="23%" valign="top" bgcolor="#EEF7FF">
					<table border="0" width="100%" id="table3" cellspacing="1">
						<tr>
							<td bgcolor="#EEF7FF" height="18" class=smallfont><font color=#CC0000><%=session("chk_name")%></font>,您好&nbsp;状态:已登录</td>
						</tr>
						<tr>
							<td bgcolor="#EEF7FF" height="18" onmouseout="this.style.background='#EEF7FF'" 
onmouseover="this.style.background='#FF9900'" class=smallfont>
							<img height="11" src="images/dt3.gif" width="11" border="0">&nbsp; 
							<a href="UserModiInfo.asp">修改用户资料</a></td>
						</tr>
						<tr>
							<td bgcolor="#EEF7FF" height="18" onmouseout="this.style.background='#EEF7FF'" 
onmouseover="this.style.background='#FF9900'" class=smallfont>
							<img height="11" src="images/dt3.gif" width="11" border="0">&nbsp; 
							<a href="UserModiPass.asp">修改用户密码</a></td>
						</tr>
						<tr>
							<td bgcolor="#EEF7FF" height="18" onmouseout="this.style.background='#EEF7FF'" 
onmouseover="this.style.background='#FF9900'" class=smallfont>
							<img height="11" src="images/dt3.gif" width="11" border="0">&nbsp; 
							<a href="MessageBack.asp">留言反馈</a></td>
						</tr>
						<tr>
							<td bgcolor="#EEF7FF" height="18" onmouseout="this.style.background='#EEF7FF'" 
onmouseover="this.style.background='#FF9900'" class=smallfont>
							<img height="11" src="images/dt3.gif" width="11" border="0">&nbsp; 
							<a href="revert.asp">留言跟踪处理</a></td>
						</tr>
						<tr>
							<td bgcolor="#EEF7FF" height="18" onmouseout="this.style.background='#EEF7FF'" 
onmouseover="this.style.background='#FF9900'" class=smallfont>
							<img height="11" src="images/dt3.gif" width="11" border="0">&nbsp; 
							<a href="MyFavorite.asp">我的收藏夹</a></td>
						</tr>
						<tr>
							<td bgcolor="#EEF7FF" height="18" onmouseout="this.style.background='#EEF7FF'" 
onmouseover="this.style.background='#FF9900'" class=smallfont>
							<img height="11" src="images/dt3.gif" width="11" border="0">&nbsp; 
							<a href="MyHisoryCart.asp">查询历史订单</a></td>
						</tr>
						<tr>
							<td bgcolor="#EEF7FF" height="18" onmouseout="this.style.background='#EEF7FF'" 
onmouseover="this.style.background='#FF9900'" class=smallfont>
							<img height="11" src="images/dt3.gif" width="11" border="0">&nbsp; 
							<a target="_blank" href="my_cart_list.asp">我的购物车</a></td>
						</tr>
						<tr>
							<td bgcolor="#EEF7FF" height="18" onmouseout="this.style.background='#EEF7FF'" 
onmouseover="this.style.background='#FF9900'" class=smallfont>
							<img height="11" src="images/dt3.gif" width="11" border="0">&nbsp; 
							<a href="loginout.asp">退出登录</a></td>
						</tr>
						</table>
					</td>
					<td width="77%" valign="top">
					<table border="0" width="100%" id="table4" cellspacing="1" class=smallfont>
						<tr>
							<td colspan="5">
							<p align="center">收藏的商品列表</td>
						</tr>
						<tr>
							<td width="7%">序号</td>
							<td width="42%">商品名称</td>
							<td width="24%">收藏时间</td>
							<td width="24%" colspan="2">操作</td>
						</tr>
						
						<%
userid=cint(session("chk_id"))
set rs=server.CreateObject("adodb.recordset")
	sql="select id,pid,addtime from favorite where userid="&userid
	rs.open sql,conn,1,1
	if (rs.eof and rs.bof) then
	response.write "<tr>"
    response.write "<td width=500 colspan=4><font color=#FF0000>您还没有收藏的商品</font></td>"
    response.write "</tr>"
    else
    rs.PageSize =20 '每页记录条数
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.PageCount 
    		page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if

end if
						  ii=1
						  while not rs.eof and ii<=rs.pagesize
						  set id=rs("id")
						  set pid=rs("pid")
						  set addtime=rs("addtime")
						  sql2="select p_name from yqj_product where id="&pid
						  set rs2=conn.execute (sql2)
						  p_name=rs2("p_name")
						  rs2.close
						  set rs2=nothing 
						  %>
						<tr>
							<td width="7%"><%=(page-1)*19+ii%></td>
							<td width="42%"><a target=_blank href=product/product_list.asp?id=<%=pid%> title=查看详情><%=p_name%></a></td>
							<td width="24%"><%=addtime%></td>
							<td width="12%"><a target=_blank href=../buy.asp?id=<%=pid%> title=购买>购买</a></td>
							<td width="12%"><a href=SaveUserInfo.asp?action=favorite&id=<%=id%>&page=<%=page%> title=删除>删除</a></td>
						</tr>
<%
rs.movenext
ii=ii+1
wend
%>
						
						<tr>
							<td colspan="5"><%call PageControl(iCount,maxpage,page,"border=0 align=left","<p align=left>")%></td>
						</tr>
					</table>
					<%
rs.close
set rs=nothing%>
					</td>
				</tr>
				</table>
			</td>
		</tr>
	</table>
</div>
<!--#include file="end.asp" -->
</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -