📄 wishindex.asp
字号:
<!--#include file="head.asp"-->
<TABLE style="BORDER-RIGHT: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid"
cellSpacing=0 cellPadding=0 width=778 align=center bgColor=#ffffff>
<TBODY>
<TR vAlign=top>
<TD bgColor=#cccccc><IMG height=1 alt="" src="image/stu.htm" width=1
name=""></TD>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center
bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD height=8 bgColor=#f4f4f4></TD></TR>
<TD>
<TABLE id=AutoNumber3 style="BORDER-COLLAPSE: collapse"
cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top height=52>
<TABLE id=AutoNumber5 style="BORDER-COLLAPSE: collapse"
borderColor=#111111 cellSpacing=0 cellPadding=3 width="100%"
border=0>
<TBODY>
<TR>
<TD class=6 width=495 background=image/type_bg.gif
height=30><IMG height=12 src="image/type01.gif" width=12
align=absMiddle> <span class="style5"><span style="color: #CC3300">当前位置:</span> <a href="index.asp"><font color="#FF6699">网站首页</font></a> -<span style="color: #FF99CC">许愿板</span></TD>
<TD width=100 background=image/type_bg.gif>
<DIV align=center><IMG
src="image/more.gif"
border=0></DIV></TD></TR>
<TR>
<TD colSpan=2>
<DIV align=center> <table border="0" width="755" cellspacing="0" cellpadding="0">
<tr>
<td width="751" style="background-color: #FFFFFF; border: 1 solid #000000" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="27%" valign="top"><div align="center"><img src="image/no.gif" width="105" height="105">
</div></td>
<td width="73%" valign="top">
<p style="line-height: 150%; margin-left: 40"><br>
<font color="#990000">2005年3月1日我来到了连云港市振云高级中学实习,我实习<br>
的班级是高一五。学生都挺顽皮的,希望以后他们都能考上<br>
理想的大学......<br>
</font>[ <a href="wishnew.asp">我要留下心愿</a> ] [ <a href="wishindex.asp">刷新祈愿本</a>
]
</td>
</tr>
<tr>
<td width="100%" valign="top" colspan="2" height="10">
<div align="right">
<table border="0" width="38%" cellspacing="0" cellpadding="0">
<%
SQL="Select * From wish Order by ID desc"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,Conn,1,1
IF Not RS.EOF Then
const WishMaxperpage=24 '定义每一页显示的数据记录的常量
dim currentpage '定义当前页的变量
rs.pagesize=WishMaxperpage
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 WishMaxperpage=0 then
n=totalput\WishMaxperpage
else
n=totalput\WishMaxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*WishMaxperpage
i=1
%>
<tr>
<td width="100%">
<p style="margin-bottom: 4">
<%k=currentpage
if k<>1 then%>
<a href="wishindex.asp?pageid=1">第一页</a><font color="#990000">|</font><a href="wishindex.asp?pageid=<%=k-1%>">上一</a>
<%else%>
第一页<font color="#990000">|</font>上一页
<%end if%>
<font color="#990000">|</font>
<%if k<>n then%>
<a href="wishindex.asp?pageid=<%=k+1%>">下一</a><font color="#990000">|</font><a href="wishindex.asp?pageid=<%=n%>">尾 页</a>
<%else%>
下一页<font color="#990000">|</font>尾 页
<%End IF%>
</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="100%" valign="top" colspan="2">
<div align="center">
<center>
<table border="0" width="90%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" bgcolor="#990000" height="1"></td>
</tr>
<tr>
<td width="100%">
<div align="left">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<%
Do While I< WishMaxperpage+1 And Not RS.EOF
'Do While Not RS.EOF
%>
<td width="85">
<p align="center"><a href="wishdisplay.asp?id=<%=RS("ID")%>"><img src="image/i225.gif" width="25" height="25" border="0" title="许 愿 者:<%=RS("姓名")%><BR>性 别:<%IF RS("性别")="女" Then%>女孩<%Else%>男孩<%End IF%><BR>愿望类型:<%IF RS("类型")="family" Then%>家庭<%ElseIF RS("类型")="school" Then%>学校<%ElseIF RS("类型")="life" Then%>生活<%ElseIF RS("类型")="health" Then%>健康<%ElseIF RS("类型")="career" Then%>事业<%ElseIF RS("类型")="future" Then%>未来<%ElseIF RS("类型")="love" Then%>恋爱<%ElseIF RS("类型")="riches" Then%>财富<%End IF%><BR>许愿时间:<%Date1=RS("发布时间")
Date2=Year(Date1)&"-"&Month(Date1)&"-"&Day(Date1)
Response.Write Date2%><BR>"></a><span style="color: #FF99CC">心愿</span></td>
<%
IF I Mod 8=0 Then
Response.Write "</tr><tr><td height=10></td></tr><tr>"
End IF
RS.MoveNext
I=I+1
Loop
%>
</tr>
</table>
</div>
</td>
</tr>
<%
Else
%>
<%End IF%>
<tr>
<td width="100%" bgcolor="#990000" height="1"></td>
</tr>
<tr>
<td width="100%" height="1"></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td width="100%" valign="top" colspan="2">
<div align="right">
<table border="0" width="38%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<p style="margin-top: 5">
<%k=currentpage
if k<>1 then%>
<a href="wishindex.asp?pageid=1">第一页</a><font color="#990000">|</font><a href="wishindex.asp?pageid=<%=k-1%>">上一</a>
<%else%>
第一页<font color="#990000">|</font>上一页
<%end if%>
<font color="#990000">|</font>
<%if k<>n then%>
<a href="wishindex.asp?pageid=<%=k+1%>">下一</a><font color="#990000">|</font><a href="wishindex.asp?pageid=<%=n%>">尾 页</a>
<%else%>
下一页<font color="#990000">|</font>尾 页
<%End IF%></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="100%" valign="top" colspan="2">
</td>
</tr>
</table>
</td>
</tr>
</table> </DIV>
</TR></TBODY></TABLE>
</TD></TR></TBODY></TABLE></TD></TR></TABLE></TD></TR></TBODY></TABLE>
<!--#include file="bottom.asp"-->
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -