📄 my_emoney.asp
字号:
<!-- #include file="conn.asp" -->
<!--#include file="webconfig.asp"-->
<%
'url=request.servervariables("HTTP_REFERER")
if session("userid")="" then
//response.write "<script>alert('你还未登陆,或登陆已超时,请重新登陆!!');</script>"
response.write "<script>this.location.href='login_window.asp';</script>"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=webname%></title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="include/top.asp" -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="1" bgcolor="#cccccc"></td>
<td width="160" height="100">
<!--#include file="include/left1.asp" -->
</td>
<td width="1" bgcolor="cccccc"></td>
<td align="center">
<!--#include file="include/search.asp" -->
<%
if session("userid")="" then
response.redirect "login_window.asp"
else
sql="select * from Net008_emoney where userid='"&session("userid")&"' order by adddate desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,2
%>
<table width="98%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="center"><b><font color=ff0000> <%=session("userid")%> </font></b>,您好!您的积分列表如下</td>
</tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td><b><font color=ff0000> </font></b>你的积分详细列表:</td>
</tr>
</table>
<table width="98%"
border=0 cellpadding=3 cellspacing=1 class="table_front">
<tbody>
<tr class="th_front1">
<td width="55" align="center"><b>订单号</b></td>
<td width="55" align="center"><strong>订单总额</strong></td>
<td width="40" align="center"><b>积分值</b></td>
<td align="center"><b>备 注</b></td>
<td width=70 align="center"><b>加减分日期</b></td>
<td width=30 align="center"><b>状态</b></td>
</tr>
<%
sum_emoney=0
if rs.recordcount<1 then
sum_emoney=0
else
for aa=1 to rs.recordcount
'enddate=rs("adddate")+rs("limitdate")
if rs("useyn")=1 then '判断是否已使用该积分,1代表没使用,2代表已使用
if rs("addsub")="+" then
sum_emoney=sum_emoney+rs("emoney")
elseif rs("addsub")="-" then
sum_emoney=sum_emoney-rs("emoney")
end if
end if
'response.write aa&"---"&sum_emoney&"<br>"
rs.movenext
next
end if
'response.end
rs.movefirst
const maxperpage=30 '定义每一页显示的数据记录的常量
dim currentpage '定义当前页的变量
rs.pagesize=maxperpage
currentpage=request.querystring("pageid")
if currentpage="" then
currentpage=1
elseif currentpage<1 then
currentpage=1
else
currentpage=clng(currentpage)
if currentpage > rs.pagecount then
currentpage=rs.pagecount
end if
end if
'如果变量currentpage的数据类型不是数值型
'就1赋给变量currentpage
if not isnumeric(currentpage) then
currentpage=1
end if
dim totalput,n '定义变量
totalput=rs.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*maxperpage
i=0
sum_emoney=0
do while i< maxperpage and not rs.eof
%>
<tr class="th_front2">
<td width="55" align="center"><%=rs("orderid")%></td>
<td width="55" align="center"><%=rs("sum_price")%></td>
<td width="40" align="center">
<%
response.write rs("addsub")
response.write rs("emoney")
%> </td>
<td><%=rs("content")%></td>
<td width="70" align="center">
<%
response.write FormatDateTime(rs("adddate"),2)
%> </td>
<td width="30" align="center">
<%
if rs("useyn")=2 then
response.write "<font color=ff0000>已使用</font>"
else
response.write "<font color=0000ff>可以使用</font>"
end if
%> </td>
</tr>
<%
i=i+1
rs.movenext
loop
%>
</tbody>
</table>
<br>
<table class=table_front cellspacing=1 cellpadding=0 width="98%" border=0>
<tbody>
<tr>
<td
height=22 colspan=3 align=middle class="th_front1">页数:<%=currentpage%>/
<% =n%>
<%k=currentpage
if k<>1 then%>
[<a href="my_emoney.asp?pageid=1" class="LeftTypeLinkU">首页</a>]
[<a href="my_emoney.asp?pageid=<%=k-1%>" class="LeftTypeLinkU">上一页</a>]
<%else%>
[首页] [上一页]
<%end if%>
<%if k<>n then%>
[<a href="my_emoney.asp?pageid=<%=k+1%>" class="LeftTypeLinkU">下一页</a>]
[<a href="my_emoney.asp?pageid=<%=n%>" class="LeftTypeLinkU">尾页</a>]
<%else%>
[下一页] [尾页]
<%end if%>
共有<font color="red"><%=totalput%></font>个消息</td>
</tr>
</tbody>
</table>
<table cellspacing=0 cellpadding=5 width="98%" border=0>
<tbody>
<tr>
<td bgcolor=#FFFFFF height=20><font color="#FF0000" size="4"><strong>你的总积分是:<%=sum_emoney%>个<font size="6">e</font>币</strong></font>(如有误请以每条积分里的备注说明为核对依据)</td>
</tr>
<tr>
<td bgcolor=#FFFFFF height=20><font color="#FF0000">喜讯:购物送积分( 即:<font size="3">e</font>币)<br>
注意:1.积分( 即:<font size="3">e</font>币)只能在有效期内使用,过期失效不可以使用,请大家注意;<br>
2.如果你的积分是用现金(即有时商品缺货和多汇的款)换取的,有效期是无限的.</font><br>
<font color="#0000FF" size="4">e</font><font color="#0000FF">币的用途:<br>
</font><font size="4">e</font>币可以在本站购物,充当人民币使用,1<font size="4">e</font>币=1元人民币<br>
<font color="#0000FF" size="4">e</font><font color="#0000FF">币的来源:<br>
</font>1.每次购物满100元(附加费不计)可得1个<font size="4">e</font>币,购物满200元可得2个<font size="4">e</font>币,以此类推...<br>
2.其它一些促销活动。 </td>
</tr>
<tr>
<td bgcolor=#FFFFFF height=20 align="center"> </td>
</tr>
<tr>
<td bgcolor=#FFFFFF height=20 align="center">
<input type="button" name="Submit2" value="继续购物" onClick="javascript:window.location.href='../index.asp'" class="sinput">
<input type="button" name="Submit2" value="返回首页" onClick="javascript:window.location.href='../index.asp'" class="sinput">
</td>
</tr>
</tbody>
</table>
<%end if%>
</td>
<td width="1" bgcolor="cccccc"></td>
</tr>
</table>
<!-- #include file="include/bottom.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -