📄 user.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%if request.cookies("cnhww")("username")="" then
response.write "<script language=javascript>alert('您还没有登陆,请登陆!');window.location.href='default.asp';</script>"
response.End
end if
%>
<head>
<title><%=webname%>--用户中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="webtop.asp"-->
<table width="770" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#EDECEC">
<tr>
<td width="178" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<!--#include file="info_user1.asp"-->
</td>
<td width="1" valign="top" background="images/bj_x.gif"></td>
<td width="590" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/bj_x.gif" height="1"></td>
</tr>
<tr>
<td height="34" background="images/main/th_bg.gif">
<div align="center">
<!--#include file="info.asp"-->
</div>
</td>
</tr>
<tr>
<td background="images/bj_x.gif" height="1"></td>
</tr>
</table>
<table width="100" border="0" cellspacing="0" cellpadding="4" align="center">
<%xAction=lcase(request("action"))
select case xAction
case "myinfo"
%>
<tr>
<td colspan="4"><font color="#009933">我的信息</font></td>
</tr>
<%
case "mydata"
%>
<tr>
<td colspan="4"><font color="#009933">个人资料</font></td>
</tr>
<%
case "savepass"
%>
<tr>
<td colspan="4"><font color="#009933">修改密码</font></td>
</tr>
<%
case "myorder"
%>
<tr>
<td colspan="4"><font color="#009933">我的订单</font></td>
</tr>
<%
case "favorites"
%>
<tr>
<td colspan="4"><font color="#009933">我的收藏</font></td>
</tr>
<%
case "point"
%>
<tr>
<td colspan="4"><font color="#009933">我的积分</font></td>
</tr>
<%
case "sqvip"
%>
<tr>
<td colspan="4"><font color="#009933">申请VIP会员</font></td>
</tr>
<%
case "activity"
%>
<tr>
<td colspan="4"><font color="#009933">VIP 活动</font></td>
</tr>
<%
case else
%>
<tr>
<td colspan="4"><font color="#009933">推荐精品</font></td>
</tr>
<%end select%>
</table>
<br><!--#include file=user_inc.asp-->
<%xAction=lcase(request("action"))
select case xAction
case "myinfo"
call myinfo()
case "mydata"
call mydata()
case "savepass"
call savepass()
case "myorder"
call myorder()
case "favorites"
call favorites()
case "point"
call point()
case "activity"
call activity()
case "sqvip"
call sqvip()
case else
%>
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from wq_books where bestbook=1 order by bookid desc",conn,1,1
if rs.recordcount=0 then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td align=center>暂无推荐精品</td>
</tr>
</table>
<%
else
rs.PageSize =4 '每页记录条数
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
For i=1 To x
%>
<!--#include file="info_prime.asp"-->
<%rs.movenext
next
call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
end if
rs.close
set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
Dim query, a, x, temp
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
Response.Write("<table " & Table_style & ">" & vbCrLf )
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
Response.Write("<TD align=right>" & vbCrLf )
Response.Write(font_style & vbCrLf )
if page<=1 then
Response.Write ("首页 " & vbCrLf)
Response.Write ("上页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
end if
if page>=pagecount then
Response.Write ("下页 " & vbCrLf)
Response.Write ("尾页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)
end if
Response.Write(" 页次:" & page & "/" & pageCount & "页" & vbCrLf)
Response.Write(" 共有" & iCount & "种商品" & vbCrLf)
Response.Write(" 转到" & "<INPUT TYEP=TEXT NAME=page SIZE=1 Maxlength=5 VALUE=" & page & ">" & "页" & vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=b2>")
Response.Write("</TD>" & vbCrLf )
Response.Write("</TR></form>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub
end select%>
</div>
</td>
</tr>
</table>
<!--#include file="webfoot.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -