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

📄 index.asp

📁 本系统由齐齐哈尔职业学院计算机软件052班 袁利峰 开发, 版权属于 袁利峰 所有,本作品仅作为网友学习使用, 如果您需要本系统或者需要在本系统基础上进行二次开发,请与我联系 QQ:20893918
💻 ASP
字号:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%@ CODEPAGE = "936" %>

<!--#include file="ubb.asp" -->
<!--#include file="top.asp" -->
  <center>
    <table width=760 align="center" bordercolor="<%=bgcolor%>">
     
     <TR ><TD  class=tdc1 width=20%> <center>
    <table width="760" border="1" cellspacing="0" cellpadding="0" bordercolor="<%=bgcolor%>">
      <tr align="center"> 
                 <td width="20%"class=tdc1   <%=hColor%>>
       留言作者</span></td>
                 <td height="22" class=tdc1 <%=hColor%>>
       留言信息</span></td>
            </tr>
    </table>
  </center></td>
            
      <tr> <td>

<% page=request.querystring("page")
  if page="" then
  page=1
  end if 
  pages = pages
set rstopic2 = server.createobject("adodb.recordset") 
sql = "select * from guestbook  order by id desc"

rstopic2.open sql,conn,1,3
if not(rstopic2.BOF or rstopic2.EOF) then
rstopic2.pagesize = pages 
maxpagecount=rstopic2.pagecount
r=cint(rstopic2.RecordCount)'记录总数
rstopic2.absolutepage = page '当前页数
rcount=0
pagestart=page-3
pageend=page+3
if pagestart<1 then
pagestart=1
end if
if pageend>maxpagecount then
pageend=maxpagecount
end if
do while not rstopic2.eof and rcount <rstopic2.pagesize

%>
<%
    
        if trcolor="" then
        bgcolor1=""&tColor2&""
       bgcolor2=""&tColor1&""  
        trcolor=1
    else
        bgcolor1=""&tColor1&""
         bgcolor2=""&tColor2&"" 
        trcolor=""
    end if
%>
    
      <table width=760 cellspacing="0" cellpadding="4" border="1" bordercolor="<%=bgcolor%>">
        <tr bgcolor=<%=bgcolor1%>>
          <td width="20%" rowspan="3" align="center"  class=tdc><strong>NO:</strong><%=r-((page-1)* pages)-rcount%><br><a href="<%=rstopic2("home")%>"><img src="images/homepage.gif" width="16" height="16" border="0"></a><a href="mailto:<%=rstopic2("email")%>"><img src="images/email.gif" width="16" height="16" border="0"></a><br>                        <%=rstopic2("username")%>   
            <br>
      来自:
      <% if rstopic2("occation")<>"" then%>
      <%=rstopic2("occation")%>
      <%else%>
      中国
      <%end if%>
      <br>
      <br>
          </td>
          <td bgcolor=<%=bgcolor1%> class=tdc height="22" style="Word-Break:Break-all"><span class="style1">标题:</span>            <% if rstopic2("laccess")="1" and Session("25175guestbook") = "" then%>
            此留言只有管理员看            <%else%>
      <%=ubbcode(rstopic2("title"))%>
      <%end if%>
      <span class="style1">时间:</span><%=rstopic2("time")%>


	  </td>
        </tr>
        <tr bgcolor=<%=bgcolor1%>>
          <td height="50" valign=top bgcolor="<%=bgcolor1%>"  class=tdc style="Word-Break:Break-all">
            <% if rstopic2("laccess")="1" and Session("25175guestbook") = "" then%>
      此留言只有管理员看
      <%else%>
      <%=ubbcode(rstopic2("content"))%>
      <%end if%>
      <br>
      <% sqlr="select * from reply where t_id="&rstopic2("id")&""
          set rsr=conn.execute(sqlr)
        ii=0
          if not (rsr.eof or rsr.bof) then
          do while not rsr.eof  
          if ii mod 3=1 then
           response.write("<div align=center>")
           elseif ii mod 3=2 then
           response.write("<div align=right>")
          else 
          response.write("<div align=left>")
          end if
%>
      <br>      
      <table width="500" border="0" cellspacing="0" cellpadding="1" style="border-collapse: collapse">
        <tr>
          <td height="22" bgcolor=<%=bgcolor2%> class=tdc style="Word-Break:Break-all"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="8"><div align="center">
                <table width="98%"  border="0" align="left" cellpadding="0" cellspacing="0">
                  <tr>
                    <td height="1" valign="top" bgcolor="#FF6600"><div align="center"></div></td>
                  </tr>
                </table>
              </div></td>
            </tr>
          </table>
            <strong><strong><img src="images/a4.gif" width="9" height="9"><strong><span class="style10">  </span></strong></strong></strong><%=ubbcode(rsr("r_content"))%>
			<strong>            </strong>
              <% If Session("25175guestbook") <> "" Then %>
              <a href="del.asp?r_id=<%=rsr("r_id")%>" onClick="{if(confirm('确定要删除该回复吗?')){return true;}return false;}">删除回复</a>
              <% end if%>              </td>
        </tr>
        <tr>

        </tr>
      </table>
      <%  
	 rsr.movenext
     ii=ii+1
     loop
     set rsr=nothing
     end if
%></td>
        </tr>
        <tr bgcolor=<%=bgcolor1%>>
          <td  class=tdc>
            <% If Session("25175guestbook") <> "" Then %>
            <a href="del.asp?l_id=<%=rstopic2("id")%>" onClick="{if(confirm('确定要删除该留言以及所有属于此留言的回复吗?')){return true;}return false;}">删除留言</a>
            <a href="reply.asp?l_id=<%=rstopic2("id")%>">回复留言</a>
            <% end if%>	</td>
        </tr>
        <% 
               rstopic2.movenext
               rcount=rcount+1
               loop
               set  rstopic2=nothing
              %>
        <%else%>
        <tr>
          <td colspan="2" bgcolor=<%=tColor2%> class=tdc height=35>
            <p align="center">
        暂时还无留言,<a href="write.asp">前往留言给斑竹</a><br>
            </td>
        </tr>
        <%end if%>
      </table>
      </tr>
</table>
  </center>
  <table width=760 align="center" bordercolor="<%=bgcolor%>">
<tr class=tdc>

<form name="form1" method="post" action="result.asp">
      <td width=35% height=23  <%=tColor%>>关键字:
        <input type="text" name="key" class=tdc size="12">
		 <select size="1" name="title" class=tdc>
            <option value="0">作者</option>
            <option value="1" selected>标题</option>
            <option value="2">内容</option>
        </select>
      <input type="submit" name="Submit" value="搜 索" class=bdtj>	  </td> 
      <td width="63%"   height=23 class=tdc <%=tColor%>><a href=index.asp?page=1>首</a>
            <% for i=pagestart to pageend
            if i=0 then 
            i=1
            end if
            strurl="<a href=index.asp?page="&i&">["&i&"]</a>"
response.write strurl
response.write " "
next

%>
            <a href=index.asp?page=<%=maxpagecount%>>未</a> 页次:<%=page%>/<%=maxpagecount%>页   每页:<%=pages%> 
            留言数:<%=r%>
      <input name="textfield" type="text" size="2"> 页</td>
    </form>
    </tr>
</table>

  <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="40"><div align="center"><a href="http://www.25175.com" class=tdc1>powered by 25175.com</a> &nbsp;
 

</div>
</td>
    </tr>
  </table>

  
</body>
</html>

⌨️ 快捷键说明

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