?? admin.asp
字號:
<%@ Language=VBScript %>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="guest_lib.asp" -->
<%
dim ASPBook
dim StrSQL
if not isempty(request("page")) then
Mypage=cint(Request("page"))
else
Mypage=1
end if
set ASPBook = Server.CreateObject("ADODB.Recordset")
StrSQL = "Select * from guest order by ID desc"
ASPBook.open StrSQL,conn,1,1
ASPBook.pagesize=Mypagesize
maxpages=cint(ASPBook.pagecount)
totalsize=cint(Mypagesize)
ASPBook.absolutepage=Mypage
GuestTotal=ASPBook.RecordCount
if cint(Mypage) >1 then
if cint(Mypage) > maxpages then
MESSAGE("<li>沒有你所想去的頁數!</li>")
Response.End
end if
end if
HEADER "顯示留言"
MyMenu
%>
<html>
<head><title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body topmargin="0">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="777" height="148">
<tr>
<td align="center" height="148" width="777">
<table width="777" border="0" cellspacing="0" cellpadding="4" bgcolor="#ffffff" style="border-collapse: collapse" bordercolor="#111111" height="37">
</table>
<table cellspacing=0 border=0 width=777 height="1">
<tr>
<td align="right" width="777" height="1">
<p align="center"><img border="0" src="top.gif"></TD>
</TR>
<tr>
<td align="right" width="777" height="1">
<p align="center">目前共有<font color="#FF0000"><b><%=GuestTotal%></b></font>條學生咨詢或報名信息</TD>
</TR>
<tr>
<td align="right" width="777" height="1">
<p align="left"><%=Greeting%>
<center>
<font color=#000000>
<%PageLink%>
</font></TD>
</TR>
</table>
<table width="777" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000" bordercolorlight="#FFFFFF">
<%
If ASPBook.Eof or ASPBook.Bof then
Response.Write "<TR>"
Response.Write "<TD bgcolor=" & Color1 & " align=center colspan=6><FONT STYLE=font-size:9pt>對不起,目前還沒有任何報名信息!</FONT></TD>"
else
i = 0
total = 0
do until ASPBook.Eof or total = totalsize
if i = 0 then
CColor = Color1
else
CColor = Color2
end if
%>
<tr bgcolor=<%=CColor%>>
<td width="777" bordercolor="#808080" bordercolorlight="#FFFFFF">
<table width="777" border="0" cellpadding="2">
<tr>
<td width="777" bgcolor="#F5F5F5"><font color=black>
姓名:<b><font color="#FF0000"><%=ASPBook("名字")%></font></b> |性別: <%if ASPBook("性別") = "boy" then%>
男
<%elseif ASPBook("性別") = "girl" then%>
女
<%else%>
不男不女
<%end if%> | 年齡:<font color="#0000FF"><%=ASPBook("年齡")%></font>| 來自:<font color="#0000FF"><%=ASPBook("來自")%></font> 郵編:<font color="#0000FF"><%=ASPBook("郵編")%></font>
</font>
</td>
<td align="right" width="193" bgcolor="#F5F5F5">
<img src="ip.gif" alt="IP地址:<%=ASPBook("IP")%>" align=absmiddle border=0 width=13 height=16> <img src="system.gif" alt="操作系統:<%=ASPBook("系統")%>" align=absmiddle border=0 width=15 height=16>
</td>
</tr>
</table>
<table width="777" border="0" cellpadding="4" height="77" cellspacing="0">
<tr>
<td width="777" colspan="2" height="4">報名時間:<font color="#0000FF"><%=ASPBook("留言日期")%></font> </td>
</tr>
<tr>
<td width="777" colspan="2" height="21">聯系電話:<%=ASPBook("ICQ")%> OICQ:<%=ASPBook("OICQ")%> 聯系信箱:<%=ASPBook("郵件")%> 學歷:<%=ASPBook("主頁")%></td>
</tr>
<tr>
<td width="14" height="34">
<p align="center"></p>
</td>
<td width="795" height="34">所報專業:<%=ASPBook("專業")%><br>報名留言:<%=ASPBook("留言")%></td>
</tr>
</table>
<table width="777" border="0" cellpadding="2" height="17">
<tr>
<td align="right" width="818" bgcolor="#F5F5F5" height="11"> </td>
</tr>
</table>
</td>
</tr><%
ASPBook.MoveNext
i = i + 1
if i = 2 then i = 0
total = total + 1
loop
%>
<%END IF%>
</table>
<%COPYRIGHT%>
</td>
</tr>
</table>
</div>
</BODY>
</HTML><%
function PageLink
PageShowSize = 10
Scriptname=Request.Servervariables("script_name")
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((GuestTotal-1)/MyPageSize)+1
if Maxpages > 1 then
if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a href='" & Scriptname & "?page=" & PagePrev & "'>[<<]</a>-"
end if
if Mypage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a href='" & Scriptname & "?page=" & Prev_Page & "'>[<]</a> "
end if
if maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
end if
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*10)-10
if PageLink <> cint(Mypage) then
Response.write "<a href='" & Scriptname & "?page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write PageLink & " "
end if
next
if Mypage+1 <=Pagetpage then
Next_Page = MyPage + 1
Response.write "<a href='" & Scriptname & "?page=" & Next_Page & "'>[>]</a>"
end if
if maxpages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write "-<a href='" & Scriptname & "?page=" & PageNext & "'>[>>]</a>"
end if
else
Response.write "[1]"
end if
END function
set ASPBook=nothing
conn.Close
set conn = nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -