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

📄 result.asp

📁 本系统由齐齐哈尔职业学院计算机软件052班 袁利峰 开发, 版权属于 袁利峰 所有,本作品仅作为网友学习使用, 如果您需要本系统或者需要在本系统基础上进行二次开发,请与我联系 QQ:20893918
💻 ASP
字号:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%@ CODEPAGE = "936" %>
<!--#include file="Connections.asp" -->
<!--#include file="ubb.asp" -->
<style type="text/css">
<!--
.style1 {	color: #FF6600;
	font-weight: bold;
}
.style10 {color: #FF9900}
-->
</style>
<!--#include file="top.asp" -->

<table width=760 align="center" bordercolor="<%=bgcolor%>" style="border-collapse: collapse">
     
     <TR ><TD  class=tdc1 width=20%> <center>
    <table width="760" border="1" cellspacing="0" cellpadding="4" style="border-collapse: collapse" bordercolor="<%=bgcolor%>">
      <tr align="center"> 
                 <td width="20%" height="22" class=tdc1 <%=hColor%>><strong>
       留言作者</strong></td>
                 <td height="22" class=tdc1 <%=hColor%>><strong>
       留言信息</strong></td>
          </tr>
    </table>
  </center></td>
            
  <tr> <td>
		  	 <% title=request("title")
key=request("key")
if key<>"" then
page=request.querystring("page")
  if page="" then
  page=1
  end if 
  pages=pages
set rstopic2 = server.createobject("adodb.recordset") 
if title=0 then
sql = "select * from guestbook where username like '%"&key&"%' order by time desc"
elseif title=1 then
sql = "select * from guestbook where title like '%"&key&"%' order by time desc"
else
sql = "select * from guestbook where content like '%"&key&"%' order by time desc"
end if
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" style="border-collapse: collapse"  bordercolor="<%=bgcolor%>">
       
      <tr bgcolor=<%=bgcolor1%>> 
        <td width="20%" rowspan="3" align="center"  class=tdc><strong>NO:</strong><%=r-((page-1)* pages)-rcount%><BR>          <br>
          <a href="mailto:<%=rstopic2("email")%>">MAILTO:<br>
         <%=rstopic2("username")%> </a>
		  <br>          
		  <br>            来自:
                     <% if rstopic2("occation")<>"" then%>
                     <%=rstopic2("occation")%>
                     <%else%>
中国
<%end if%><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  class=tdc height="100" valign=top 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
          %>
          <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><img src="images/a4.gif" width="9" height="9"><strong><span class="style10">  </span></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"> 
          <br>
          找不到你要的留言,<a href="index.asp">返回</a><br>
          <br>

        </td>
     
      </tr>
            <%end if%>
<%else%>
              <tr>
              
 <td colspan="2" bgcolor=<%=tColor2%> class=tdc height=35> 
          <p align="center"> 
          <br>
          请输入关键字,<a href="index.asp">返回</a><br>
          <br>

        </td>
     
      </tr>
            <%end if%>
</table>
  </tr>
</table>
  <div align="center">  <table width=760 border=0 align="center" cellpadding=0 cellspacing=0 bordercolor="<%=bgcolor%>">
<tr class=tdc> 
<form name="form1" method="post" action="result.asp">
      <td   width=35% height=49  <%=tColor%>> 
            关键字: 
            <input type="text" name="key" class=tdc size="15"> <select size="1" name="title" class=tdc>
            <option selected value="0">作者</option>
            <option value="1">标题</option>
            <option value="2">内容</option>
            </select>
        <input type="submit" name="Submit" value="搜 索" class=bdtj></td>
         </form>


      <td width="58%"   height=49 <%=tColor%>> 
               <a href=result.asp?title=<%=title%>&key=<%=key%>&page=1><<</a>
            <% for i=pagestart to pageend
            if i=0 then 
            i=1
            end if
            strurl="<a href=result.asp?title="&title&"&key="&key&"&page="&i&">["&i&"]</a>"
response.write strurl
response.write " "
 next
%><a href=result.asp?title=<%=title%>&key=<%=key%>&page=<%=maxpagecount%>>>></a> 页次:<%=page%>/<%=maxpagecount%>页   每页:<%=pages%> 
            留言数:<%=r%>
			</td>
	</tr>
</table>

⌨️ 快捷键说明

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