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

📄 search.asp

📁 紫碟轩留言本V2.0的简单原代码请 查阅
💻 ASP
字号:
<!--#include file="md5.asp" -->
<!--#include file="conn.asp" -->
<!--#include file="sub.asp" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=webname%></title>
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--页面头部-->
  <tr>
    <td height="30">
    <!--#include file="top.asp" -->    </td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--公告内容-->
  <tr>
    <td width="100%" height="20" valign="middle"></td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
  <!--签写留言,分类-->
<%
set rs1=server.createobject("adodb.recordset")
exec3="select * from zdfl   "
rs1.open exec3,conn,1,1
%>
  <tr valign="middle">
    <td width="14%" bgcolor="#FFCC99"><a href="index.asp">·返回首页</a></td>
    <td width="72%" bgcolor="#FFCC99"><span class="putongziti">留言分类:&nbsp;&nbsp; |
        <% do while not rs1.eof%>
        &nbsp; <a href="search.asp?sl=4&fl=<%=rs1("f_id")%>"><%=rs1("f_name")%></a>&nbsp; |
        <%rs1.movenext
	loop
	rs1.close
set rs1=nothing%>
    </span></td>
    <td width="14%" bgcolor="#FFCC99" class="putongziti"><b><a href="add.asp"><font color="#FF0000">·签写留言</font></a></b></td>
  </tr>
</table>
<br>
<table width="100%" height="72" border="0" align="center">
  <tr bgcolor="#0099CC">
    <td align="center" class="biaogebiankuang"><span class="dhzi">搜索留言</span></td>
  </tr>
  <tr>
  
  <td align="right">
  <form name="form2" method="get" action="">
      <table width="100%" border="0" align="center">
        <tr>
          <td width="38%" align="left">&nbsp; 输入查询关键字   
            <input name="s_id" type="text" id="s_id" value="" size="30"></td>
          <td width="19%"><select name="sl" id="sl">
            <option value="0">请选者搜索条件</option>
            <option value="1">按留言姓名搜索</option>
            <option value="2">按留言主题搜索</option>
            <option value="3">按留言内容搜索</option>
          </select>
            * </td>
          <td width="43%"><input name="Submit22" type="submit"  value="搜索"style="BACKGROUND-COLOR:   #2071a0;   BORDER-BOTTOM:   1px   double;   BORDER-LEFT:   1px   double;   BORDER-RIGHT:   1px   double;   BORDER-TOP:   1px   double;   COLOR:   #eeeeee;   TEXT-ALIGN:   center" onMouseOver="this.style.color='#ffff00'"onmouseout="this.style.color='#eeeeee'" />
          (支持通配符<font color="#FF0000">%</font>。例如:%ksmy%)</td>
        </tr>
      </table>
    </form></td>
  </tr>
</table>
<form action="admin_del.asp" method="post">
<table width="100%" align="center" cellpadding="0" cellspacing="1">
<%
set rsi=server.createobject("adodb.recordset")
zdfl=request.QueryString("fl")
s_id=request.QueryString("s_id")
sl=request.QueryString("sl")
if sl<>"" and  s_id="" and zdfl="" then
mgbox" 请输入搜索关键字"
response.End()
end if
select case sl
case ""
exec1="select * from zdi where m_con=0 order by m_ding desc,m_uptime desc"
case 0
mgbox"请选者搜索条件"
response.End()
case 1
exec1="select * from zdi where m_con=0 and m_user like '"&s_id&"' order by m_ding desc,m_time desc"
case 2
exec1="select * from zdi where m_con=0  and m_bt like '"&s_id&"' order by m_ding desc,m_time desc"
case 3
exec1="select * from zdi where m_con=0 and m_message like '%"&s_id&"%' order by m_ding desc,m_time desc"
case 4
exec1="select * from zdi where m_flid='"&zdfl&"'and m_con=0 order by m_ding desc,m_time desc"
end select
rsi.open exec1,conn,1,1
if not rsi.bof and not rsi.eof then
dim page
if request("page")="" then    
page=1  
else
page=cint(request("page"))      
end if
rsi.pagesize=webNum '每页显示N条记录
rsi.absolutepage=page
dim i
i=rsi.pagesize
end if
 %>
  <!--循环留言-->
  <tr>
    <td width="100%" align="center">
  <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" >
    <tr bordercolor="#0099CC" bgcolor="#0099CC">
      <td width="9%" align="center" class="dhzi">留言分类</td>
      <td width="47%" align="center" bordercolor="#0099CC" bgcolor="#0099CC" class="dhzi">留言标题</td>
      <td width="18%" align="center" bordercolor="#0099CC" bgcolor="#0099CC" class="dhzi">作者</td>
      <td width="8%" align="center" class="dhzi">回复/点击</td>
      <td width="18%" align="center" class="dhzi">最后更新</td>
    </tr>
    <%do while not rsi.eof and i>0
i=i-1
set rsfl=server.createobject("adodb.recordset")
exec2="select * from zdfl where f_id="&rsi("m_flid")
rsfl.open exec2,conn,1,1%>
    <tr bordercolor="#0099CC"   onmouseover="this.bgColor='#E1F8FF';" onMouseOut="this.bgColor='#ffffff';">
      <td align="center" class="biaogebiankuang"><a href="search.asp?sl=4&fl=<%=rsfl("f_id")%>">[<%=rsfl("f_name")%>]</a></td>
      <td align="left" bordercolor="#0099CC"  class="biaogebiankuang" ><%if session("zdqx")="alladmin" then%>
          <input name="del" type="checkbox" id="del" value="<%=rsi("m_id")%>" />
          <%end if%>
          <% if rsi("m_ding")="true" then response.Write("<font color='#FF0000'> [置定]</font>")
		 if rsi("m_jh")="true" then response.Write("<font color='#FF0000'> [精华]</font>")%>
          <a href="view.asp?id=<%=rsi("m_id")%>"><%=rsi("m_bt")%></a>
          <% if now-rsi("m_time")<0.5 then response.Write(" &nbsp;<img src='images/new.gif' width='30' height='10' />")%>
      </td>
      <td align="center" bordercolor="#0099CC"  class="biaogebiankuang" ><%=rsi("m_user")%><br />
          <%=rsi("m_time")%></td>
      <td align="center" class="biaogebiankuang"><%=rsi("m_re")%>/<%=rsi("m_view")%></td>
      <td align="center" class="biaogebiankuang"><%=rsi("m_upuser")%><br />
          <%=rsi("m_uptime")%></td>
    </tr>
    <% rsi.movenext
 loop
%>
  </table>
  <br />
  <% if rsi.recordcount=0 then response.Write("没有搜索到留言")%>
  </td>
  
  </tr>
  
  <tr>
    <td height="18" align="left" valign="middle" bgcolor="#FFCC99" class="putongziti">&nbsp;<a href="search.asp?page=1<%if request.QueryString("fl")<>"" then response.Write("&fl="&request.QueryString("fl")) 
	if request.QueryString("s_id")<>"" then response.Write("&s_id="&request.QueryString("s_id")) 
	if request.QueryString("sl")<>"" then response.Write("&sl="&request.QueryString("sl"))%>">首页</a>&nbsp;
        <%if not page="1" then%>
        <a href="search.asp?page=<%=page-1%><%if request.QueryString("fl")<>"" then response.Write("&fl="&request.QueryString("fl")) 
	if request.QueryString("s_id")<>"" then response.Write("&s_id="&request.QueryString("s_id")) 
	if request.QueryString("sl")<>"" then response.Write("&sl="&request.QueryString("sl"))%>">上一页</a>
        <%else response.Write("上一页") end if%>
      &nbsp;
      <%if not page=rsi.pagecount then%>
      <a href="search.asp?page=<%=page+1%><%if request.QueryString("fl")<>"" then response.Write("&fl="&request.QueryString("fl")) 
	if request.QueryString("s_id")<>"" then response.Write("&s_id="&request.QueryString("s_id")) 
	if request.QueryString("sl")<>"" then response.Write("&sl="&request.QueryString("sl"))%>">下一页</a>
      <% else response.Write("下一页") end if%>
      &nbsp; <a href="search.asp?page=<%=rsi.pagecount%><%if request.QueryString("fl")<>"" then response.Write("&fl="&request.QueryString("fl")) 
	if request.QueryString("s_id")<>"" then response.Write("&s_id="&request.QueryString("s_id")) 
	if request.QueryString("sl")<>"" then response.Write("&sl="&request.QueryString("sl"))%>">末页</a>&nbsp;&nbsp; <font color="#FF0000"><%=page%></font>/<%=rsi.pagecount%>
      <%if session("zdqx")="alladmin" then%>
      <input type="submit" name="Submit" style="BACKGROUND-COLOR:   #2071a0;   BORDER-BOTTOM:   1px   double;   BORDER-LEFT:   1px   double;   BORDER-RIGHT:   1px   double;   BORDER-TOP:   1px   double;   COLOR:   #eeeeee;   TEXT-ALIGN:   center" onMouseOver="this.style.color='#ffff00'"onmouseout="this.style.color='#eeeeee'" value="批量删除">
      <%end if%></td>
  </tr>
</table>
<%rsi.close
set rsi=nothing
rsfl.close
set rsfl=nothing%>
</form>
<br />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--版权-->
  <tr>
    <td width="100%" height="20" > <%call ksmyboot%> </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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