⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gbookindex.asp

📁 程序名称:酷虎网校友录 V1.0 (商业版)*(修改版) * 本软体为商业软件
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<script language="javascript">
function openScript(url){
	var Win = window.open(url);
}
</script>
<!--#include file="inc/css.asp"-->
<title><%=WebsiteName%></title>
</head>
<body topmargin="0" background="images/bg.gif">
<!--#include file="top.asp"-->
<div align="center">
  <center>
  <table border="0" width="755" cellspacing="0" cellpadding="0">
    <tr>
      <td width="189" style="background-color: #FFFFFF; border-left: 1 solid #000000; border-top: 1 solid #000000; border-bottom: 1 solid #000000" valign="top"> 
		<!--#include file="left.asp"-->
      </td>
      <td width="562" style="background-color: #FFFFFF; border: 1 solid #000000" valign="top">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
		<!--#include file="navigation.asp"-->
          <tr>
            <td width="27%" valign="top">
              <img border="0" src="images/guestbook.gif" width="150" height="124">
            </td>
        </center>
            <td width="73%" valign="top">
            <p style="line-height: 150%; margin-left: 50" align="left"><br>
            <font color="#990000">如果你对我们有什么意见或建议的话,请您在此留下您的意<br>
            见。我们的发展离不开您的参与。我仅代表我校全体师生祝<br>
            您身体健康、万事如意!<br>
            </font>[ <a href="gbookadd.asp">发布新的留言</a> ]&nbsp; [ <a href="gbookindex.asp">刷新留言本</a>                                                             
            ]                                                           
            </td>
          </tr>
  <center>
          <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 留言信息 Order by ID desc"
          Set RS=Server.CreateObject("ADODB.Recordset")
          RS.Open SQL,Connstr,1,1
dim currentpage '定义当前页的变量
dim totalput,n '定义变量  
CurrentPage=0
TotalPut=0:N=0
          IF Not RS.EOF Then
'const maxperpage=10 '定义每一页显示的数据记录的常量   
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  
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  
%>
                <tr>
                  <td width="100%">
                    <p style="margin-bottom: 4"><%k=currentpage                                
   	if k<>1 then%><a href="gbookindex.asp?pageid=1">第一页</a><font color="#990000">|</font><a href="gbookindex.asp?pageid=<%=k-1%>">上一页</a><%else%>第一页<font color="#990000">|</font>上一页<%end if%><font color="#990000">|</font><%if k<>n then%><a href="gbookindex.asp?pageid=<%=k+1%>">下一页</a><font color="#990000">|</font><a href="gbookindex.asp?pageid=<%=n%>">尾&nbsp;页</a><%else%>下一页<font color="#990000">|</font>尾&nbsp;页<%End IF%></p>
                  </td>
                </tr>
              </table>
            </div>
            </td>
          </tr>
          <%
		do while i< maxperpage and not rs.eof          
          'Do While Not RS.EOF
          %>
          <tr>
            <td width="100%" valign="top" colspan="2">
              <div align="center">
                <center>
                <table border="0" width="90%" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="25%" style="background-color: #EDEDED; border-bottom: 1 solid #990000; border-top: 1 solid #990000; border-left: 1 solid #990000;" valign="top">
                      <table border="0" width="100%" cellspacing="1">
                        <tr>
                          <td width="100%">
                            <p align="center">
                            <%IF RS("性别")="女" Then%>
                            <img border="0" src="images/face/girl.gif" width="74" height="80">
                            <%Else%>
                            <img border="0" src="images/face/boy.gif" width="74" height="80">
                            <%End IF%></td>
                        </tr>
                        <tr>
                          <td width="100%">&nbsp;姓名:<%=RS("姓名")%></td>
                        </tr>
                        <tr>
                          <td width="100%">&nbsp;来自:<%=RS("来自")%></td>
                        </tr>
                      </table>
                    </td>
                    <td width="75%" style="background-color: #EDEDED; border: 1 solid #990000" valign="top">
                      <table border="0" width="100%" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="100%" height="20" colspan="2" style="border-bottom: 1 solid #990000">
                            <p style="margin-top: 3">&nbsp;留言主题:<%=Server.HTMLEncode(RS("主题"))%></td>
                        </tr>
                        <tr>
                          <td width="100%" height="80" bgcolor="#FFFFFF" colspan="2">
                            <p style="line-height: 150%; margin-left: 5; margin-right: 5"><%=Replace(Server.HTMLEncode(RS("内容")),VBCrlf,"<BR>&nbsp;&nbsp;&nbsp;&nbsp;")%></td>
                        </tr>
                        <tr>
                          <td width="50%" height="20" style="border-top: 1 solid #990000;">
                            <p style="margin-top: 3">&nbsp;发表时间:<%=RS("发布时间")%></td>
                </center>
                        <td width="50%" height="20" style="border-top: 1 solid #990000;">
                          <p align="right" style="margin-top: 3"><a mailto:"<%=RS("电子邮箱")%>" href="mailto:<%=RS("电子邮箱")%>"><img border="0" src="images/email.gif"> 
                          </a>
                          <a href="JavaScript:openScript('http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=RS("OICQ")%>')"><img border="0" src="images/oicq.gif" width="50" height="18"></a>                                                         
                          <a href="JavaScript:openScript('<%=RS("主页")%>')">                                                 
                          <img border="0" src="images/homepage.gif" width="50" height="18"></a>&nbsp;</td>      
                      </tr>
                    </table>
                  </td>
                  </tr>
                </table>
              </div>
            </td>
          </tr>
          <tr>
            <td width="100%" valign="top" colspan="2" height="10">
            </td>
          </tr>

          <%
          RS.MoveNext
          I=I+1
          Loop
          Else
          %>  

          <%End IF%>          
          <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="gbookindex.asp?pageid=1">第一页</a><font color="#990000">|</font><a href="gbookindex.asp?pageid=<%=k-1%>">上一页</a><%else%>第一页<font color="#990000">|</font>上一页<%end if%><font color="#990000">|</font><%if k<>n then%><a href="gbookindex.asp?pageid=<%=k+1%>">下一页</a><font color="#990000">|</font><a href="gbookindex.asp?pageid=<%=n%>">尾&nbsp;页</a><%else%>下一页<font color="#990000">|</font>尾&nbsp;页<%End IF%></td>
                </tr>
              </table>
            </div>
            </td>
          </tr>
          <tr>
            <td width="100%" valign="top" colspan="2">
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</div>
<!--#include file="bottom.asp"-->
</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -