<!--#include file="../conn.asp"-->
<!-- #include file="../admin/check_master.asp" -->
<!--#include file="../inc/publicfun.asp" -->
<link rel="stylesheet" href="../css/xmwuye.css">
<% 
dim sql
dim rs
seachstr=request("seachstr")
tyname1="seachstr"
tyvalue1=seachstr
tyname2="kind"
tyvalue2=request("kind")

sql="select * from ftbbs_ad where "&request("kind")&" like '%"&seachstr&"%' order by id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,3,1
wzrep =30
wzpage = clng(request.querystring("page"))
if len(wzpage) = 0 or wzpage = 0 then wzpage = 1
rs.PageSize=wzrep
rs.AbsolutePage=wzpage
wzpagecount=rs.PageCount
wzcount=rs.RecordCount
%>
<body leftmargin="0" topmargin="5">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <form name="form1" method="post" action="">
      <tr bgcolor="#d6dff7"> 
        <td height="30" align="right" bgcolor="#f4f4f4"><div align="center">搜索广告： 
            <input name="seachstr" type="text" id="seachstr" size="20">
            <select name="kind">
              <option value="adtitle" selected>广告标题</option>
              <option value="adurl" >广告链接</option>
            </select>
            <input type="submit" name="Submit" value=" 搜 索 ">
          &nbsp;&nbsp;&nbsp; <a href="addad.asp">添加广告</a></div></td>
      </tr>
    </form>
  </table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
      <td width="100%">    
       <table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#666666">
          <tr bgcolor="#f4f4f4" height=22> 
            <td width="5%" align="center" height="20"><strong>ID号</strong></td>
            <td width="13%" align="center"><strong>广告标题</strong></td>
            <td width="10%" align="center"><strong>广告链接</strong></td>
            <td  align="center"><strong>开始时间</strong></td>
            <td width="12%" align="center"><strong>结束时间</strong></td>
            <td width="5%" align="center"><strong>状态</strong></td>
            <td width="5%" align="center"><strong>修改</strong></td>
            <td width="5%" align="center"><strong>删除</strong></td>
          </tr>
<%
for i = 0 to wzrep-1
  if rs.eof then exit for
%>
          <tr bgcolor="#FFFFFF"> 
            <td align="center" height=25><%=rs("id")%></td>
			<td align="center"><%=rs("adtitle")%></td>
            <td align="center"><%=rs("adurl")%></td>
            <td align="center"><%=rs("begintime")%></td>
            <td align="center"><%=rs("endtime")%></td>
            <td align="center">
                <%if rs("flag")=1 then%>
                <a href="jfuser.asp?id=<%=rs("id")%>&jfm=0"><font color=red>隐藏</font></a> 
                <%else%>
                <a href="jfuser.asp?id=<%=rs("id")%>&jfm=1">显示</a> 
                <%end if%>
            </td>
            <td align="center">
                <%if instr(session("admin_qs"),2)>0 then%>
                <a href="user_edit.asp?id=<%=rs("id")%>">修改</a> 
                <%end if%>
            </td>
            <td align="center">
                <%if instr(session("admin_qs"),3)>0 then%>
                <a href="user_delete.asp?id=<%=rs("id")%>&m=2">删除</a> 
                <%end if%>
            </td>
          </tr>
        <%
 rs.movenext
 next
rs.close
set rs=nothing
%>
        <tr bgcolor="#f4f4f4" height=22> 
          <td height="25" colspan="15" align="right">&nbsp;共<font color=red><%= wzcount%></font>个用户<font color=red><%= wzrep%></font>/页 共<font color=red><%= wzpagecount%></font>页
		  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= FtbbsPage(wzpagecount,tyname1,tyvalue1,tyname2,tyvalue2)%>&nbsp;</td>
        </tr>
</table>
</td>
  </tr>
</table>
</body>
</html>
