?? gb_view.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 guestbook where check=true 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">
<link rel="stylesheet" href="css/colorbird.css">
<style>
BODY {SCROLLBAR-FACE-COLOR: #D4D0C8; SCROLLBAR-HIGHLIGHT-COLOR: #999999; SCROLLBAR-SHADOW-COLOR: #999999; SCROLLBAR-3DLIGHT-COLOR: #FFFFFF; SCROLLBAR-ARROW-COLOR: #000000; SCROLLBAR-TRACK-COLOR: #E3E3E3; SCROLLBAR-DARKSHADOW-COLOR: #666666; }
</style>
<link href="../../css/css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<p align="center"></p>
<td></font>
<div align="right"></div></td>
<div align="center">
<center>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="50"><a href="gb_sign.asp"><img src="images/shop.gif" alt="簽寫留言" width="89" height="25" border="0"></a>
</td>
<td valign="middle">
<p align="center"><font color="#000000"><font face="Arial" size="1">共<font color="#ff0000"><%=GuestTotal%></font> 條信息, </font></font><font size="1"> 每頁<font face="Arial"><font color="#ff0000"><%=MyPageSize%></font> 條, 您瑞在在第</font></font><font color="#FF0000" size="1"><font face="Arial"><%=cint(Mypage)%></font> <%=Greeting%><font color="#000000">頁</font></font><font color="#FF0000">...
<font color="#000000">
<%PageLink%>
</font></font></p>
</td>
</tr>
</table>
<table width="600" height="197" border="1" cellpadding="0" cellspacing="0" bordercolor="#009933" style="border-collapse: collapse">
<tr>
<td align="center" height="197">
<table width="500" border="0" cellspacing="0" cellpadding="4" style="border-collapse: collapse" height="35" bgcolor="#F7F7F7">
<tr>
</tr>
<tr>
</tr>
</table>
<table width="600" height="23" border="0" cellpadding="0" cellspacing="1" bordercolorlight="#FFFFFF" bordercolordark="#000000" bgcolor="#FFFFFF" style="border-collapse: collapse">
<tr bgcolor="#009933">
<td width="130" height="23" align="right">
<p align="left"><b>
<font color="#FFFFFF"> 留言者 :</font></b></p>
</td>
<td width="445" height="23" align="right">
<p align="left"><b>
<font color="#FFFFFF"> 留言內容 :</font></b></p>
</td>
</tr>
</table>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<%
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>
<table width="100%" border="1" cellspacing="8" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
</tr>
</table>
<table width="600" border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" height="1">
<tr>
<td width="137" rowspan="3" height="1" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="99%" id="AutoNumber2" height="96">
<tr>
<td width="100%" align="center" height="12"><b><%=ASPBook("名字")%></b></td>
</tr>
<tr>
<td width="100%" align="center" height="54"><%if ASPBook("性別") = "boy" then%>
<br>
<img src="images/boy.gif" alt="英俊瀟灑的 <%=ASPBook("名字")%> 先生" align="middle" border="0">
<%elseif ASPBook("性別") = "girl" then%>
<img src="images/girl.gif" alt="美麗又溫柔的 <%=ASPBook("名字")%> 小姐" align="middle" border="0">
<br>
<%end if%></td>
</tr>
<tr>
<td width="100%" align="center" height="28">Form: <%=ASPBook("來自")%> </td>
</tr>
</table>
</td>
<td width="234" height="1"><font size="1">
<font color="#000000" class="littel">
<img src="./icons/em<%=ASPBook("表情")%>.gif" border="0" align="ABSCENTER"></font><font color="#0000FF" class="littel">On:
<%=ASPBook("留言日期")%></font></font><font size="1" color="#0000FF">
</font></td>
<td width="212" height="1"><%if ASPBook("郵件")<>"" then%>
<a href="mailto:<%=ASPBook("郵件")%>">
<img src="images/email.gif" ALIGN="absmiddle" border="0" width="15" height="16"></a>
<%end if%> <%if ASPBook("主頁")<>"" and ASPBook("主頁")<>"http://" then%>
<a href="<%=ASPBook("主頁")%>" Target="_blank">
<img src="images/home.gif" ALIGN="absmiddle" border="0"></a>
<%end if%> <%if ASPBook("ICQ")<>"" then%>
<img src="images/icq.gif" alt="ICQ:<%=ASPBook("ICQ")%>" align="absmiddle" border="0" width="15" height="16">
<%if ASPBook("OICQ")<>"" then%> <%end if%>
<a href="http://club3.tencent.com:81/cgi-bin/friend/show_info?ln=<%=ASPBook("OICQ")%>" target="_blank">
<img src="images/oicq.gif" alt="OICQ:<%=ASPBook("OICQ")%>" align="absmiddle" border="0" width="16" height="16"></a>
<%end if%>
<img src="images/ip.gif" alt="<%=ASPBook("IP")%>" align="absmiddle" border="0" width="13" height="16">
<img src="images/system.gif" alt="<%=ASPBook("系統")%>" align="absmiddle" border="0" width="15" height="16"></td>
</tr>
<tr>
<td width="450" height="14" colspan="2" valign="top"><%=ASPBook("留言")%> </td>
</tr>
<tr>
<%if ASPBook("Reply")<>"" then%>
<td width="450" height="17" colspan="2" valign="top"> <font color="#FF0000" size="1">版主回復</font><font color="#FF0000">
:<b> </b></font> <font color="#0000FF" class="littel" size="1">(<%=ASPBook("Reply_Date")%>)</font><br>
<img src="./icons/em<%=ASPBook("Reply_Icon")%>.gif" border="0" align="ABSCENTER"><%=ASPBook("Reply")%></font></td>
<%end if%></tr>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="137" rowspan="2"> </td>
<td width="450"></td>
</tr>
<tr>
<td width="450"> </td>
</tr>
</table>
</td>
</tr>
<%
ASPBook.MoveNext
i = i + 1
if i = 2 then i = 0
total = total + 1
loop
%> <%END IF%>
</table>
<%COPYRIGHT%>
<table border="0" cellpadding="2" cellspacing="0" width="600" height="1" bgcolor="#F7F7F7" style="border-collapse: collapse" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF">
<tr>
<td width="131" height="1">
<p align="center"></p>
</td>
<td align="right" width="448" height="1"><font color="#000000"><%PageLink%>
</font> </td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="600" id="AutoNumber1">
<tr>
<td width="100%">
<p align="center"><a href="gb_sign.asp"> </a><br>
</p>
</td>
</tr>
</table>
</center>
</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 + -