<!--#include file="inc/right.asp"--> 
<!--#include file="inc/conn.asp"-->
<%
cid=Request("cid")
keywords=Request("keywords")
%>
<%
IF Request("wor")="del" Then
sql="delete from result where id="&Request("id")
Conn.execute(sql)
Response.Redirect "result.asp?action=list"
End IF
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理</title>
<link href="images/main.css" rel="stylesheet" type="text/css">
<script language=JavaScript>
<!--
function DoEmpty(params)
{
if (confirm("真的要删除这条记录吗？删除后此记录里的所有内容都将被删除并且无法恢复！"))
window.location = params ;
}
//-->
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td bgcolor="#FFFFFF"><br>
      <table width="96%"  border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#aec3de">
		<tr align="center" bgcolor="#F2FDFF">
          <td class="optiontitle" colspan="9">查询报名信息</td>	
        </tr>
		<tr align='center' bgcolor="#ebf0f7">
          <td width="13%">报名信息</td>
		  <td width="13%">报名信息</td>
		  <td width="13%">报名信息</td>
		  <td width="15%">提交地址</td>
		  <td width="15%">提交时间</td>
          <td width="15%"><b>回复内容</b></td>
          <td width="15%">操作</td>
		</tr>
<%
if keywords="" then
%>
        <tr align="center" bgcolor="#F2FDFF">
          <form name="search" method="get" action="ResultSearch.asp">
           <td height="30" colspan="9"> <strong>查找类型：</strong>
		  <SELECT name='cid' id="cid">
<%
 sqlTopic="select * from Info order by id asc" 
 set rsTopic=server.createobject("adodb.recordset") 
 rsTopic.open sqlTopic,conn,1,1
 NumC=rsTopic.recordcount
 Do while not rsTopic.eof
 For i = 1 to NumC
%>
		    <option value="<%="topic"&i%>"><%=rsTopic("Topic")%></option>
<%
rsTopic.movenext 
Next
Loop
rsTopic.close
set rsTopic=nothing
%>
		  </SELECT>
			 <input name="keywords" type="text" id="keywords" > 
              <input name="Query" type="submit" id="Query" value="查 询"> &nbsp;&nbsp;</td>
          </form>
        </tr>
<%end if%>  
<%
if cid<>"" and keywords<>"" then
   sql="select * from result where "&cid&" like '%"&keywords&"%' order by id asc"
 set rs=server.createobject("adodb.recordset") 
 rs.open sql,conn,1,1
 if not rs.eof Then
    proCount=rs.recordcount
    For i = 1 to proCount
    if rs.EOF then     
    Exit For 
    end if
%>
		<tr align='center' bgcolor='#FFFFFF' onmouseover='this.style.background="#ebf0f7"' onmouseout='this.style.background="#FFFFFF"'>
          <td> <%=rs("topic1")%></td>
          <td> <%=rs("topic2")%></td>
          <td> <%=rs("topic3")%></td>
          <td> <%=rs("addip")%></td>
          <td> <%=rs("addtime")%></td>
          <td> <%=left(rs("comment"),15)%></td>
          <td><img src="images/view.gif" align="absmiddle"><a href="result.asp?action=edit&id=<%=rs("id")%>">查看</a> <img src="images/drop.gif" align="absmiddle"><a href="javascript:DoEmpty('?wor=del&id=<%=rs("id")%>')">删除</td>
<%
rs.MoveNext 
next
%>

		</tr>	
<%
else
%>
        <tr align="center" bgcolor="#FFFFFF">
          <td colspan="9">对不起！没有搜索到 <font color="#FF0000"><%=keywords%></font>信息！</td>
        </tr>
<%
end if
rs.close
set rs=nothing
end if
%>
      </table> 
    </td>
  </tr>
</table>
</body>
</html>