<!--#include file="../conn.asp"-->
<!-- #include file="../admin/check_master.asp" -->
<!--#include file="../inc/publicfun.asp" -->
<link href="../css/xmwuye.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
function nohtml(str)
    dim re
    Set re=new RegExp
    re.IgnoreCase =true
    re.Global=True
    re.Pattern="(\<.[^\<]*\>)"
    str=re.replace(str,"")
    re.Pattern="(\<\/[^\<]*\>)"
    str=re.replace(str,"")
    nohtml=str
    set re=nothing
end function

searchcontent=trim(request("searchcontent"))
searchkind=request("searchkind")
tyname1="searchcontent"
tyvalue1=searchcontent
tyname2="searchkind"
tyvalue2=request("searchkind")
if searchkind="" then
	sql="select * from bbsmenu order by id desc"
else
	select case searchkind
		case "id"
			sql="select * from bbsmenu where id="&searchcontent&" order by id desc"
		case "user_id"
			sql="select * from bbsmenu where user_id='"&searchcontent&"' order by id desc"
		case "pid"
			sql="select * from bbsmenu where pid="&searchcontent&" order by id desc"
		case "deleted"
			sql="select * from bbsmenu where deleted=1 order by id desc"
		case "ip"
			sql="select * from bbsmenu where reip ='"&searchcontent&"' order by id desc"
		case "bbs_img"
			sql="select * from bbsmenu where bbs_img<>'' order by id desc"
		case "img_url"
			sql="select * from bbsmenu where img_url<>'' order by id desc"

	end select
end if
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,3,1
%>
<table width="99%" border="0" align="center">
  <TR align=center>
<FORM METHOD=POST ACTION="<%=request.servervariables("script_name")%>" >
	  <TD height="25"> 搜索： 
        <INPUT TYPE="text" NAME="searchcontent" size=20>
        <select name="searchkind">
          <option value="id">ID号</option>
          <option value="user_id">用户名</option>
          <option value="pid">主题ID</option>
          <option value="ip">IP地址</option>
        </select>
        <INPUT TYPE="submit" value="搜索" name="">
      </TD>
</FORM>
</TR>
</TABLE>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
        <td width="100%"> 
                <table border="0" cellspacing="1" width="100%" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0" bgcolor="#6D6576">
        <tr bgcolor="#f8f8f8"> 
          <td width="5%" height="25" align="center"><strong>ID号</strong></td>
                    
          <td width="5%" align="center"><strong>主题</strong></td>
                    
                
          <td width="10%" align="center"><strong>作者</strong></td>
                    
                
          <td width="30%" align="center"><strong>内容</strong></td>
                    
          <td width="12%" align="center"><strong>IP</strong></td>
                    
