<%@ page contentType="text/html; charset=gb2312"%>
<%@ page import="java.sql.*"%> 
<%@ page import="java.util.*"%>
<%@ page import="java.util.Date"%>
<%@ page import="java.text.*"%>
<%@ include file="../admin/checkmaster.jsp"%>
<%@ include file="../inc/conn.jsp"%>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/xmwy.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--
	function check(form)
		{
		if (form.content.value=="")
			{
			alert("请填写内容！");
			form.content.focus();
			return false;
			}
			return true;
		}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<%
String ope=request.getParameter("ope");
if(ope.equals("add")){
%>
<form name="form1" method="post" action="addarrestact.jsp?ope=add" onsubmit="return check(this)">
  <table width="70%" border="0" align="center" bgcolor="#333333" cellspacing="1" cellpadding="0">
    <tr bgcolor="#cccccc"> 
      <td colspan="2" height="20"> 
        <div align="center">关键词、IP限制</div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="30%" height="20"> 
        <div align="right">类别：</div>
      </td>
      <td>
        <select name="kind">
          <option value="Keyword">关键词</option>
          <option value="IP" selected>IP地址</option>
        </select>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="20"> 
        <div align="right">内容：</div>
      </td>
      <td>
        <input type="text" name="content">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="20" colspan="2"> 
        <div align="center"> 
          <input type="submit" name="Submit" value="提交">
          <input type="reset" name="Submit2" value="重置">
        </div>
      </td>
    </tr>
  </table>
</form>
<%}%>
<%
if(ope.equals("mod")){
String id=request.getParameter("id");
String sql="select * from bbs_arrest where id="+id;
ResultSet rs=stmt.executeQuery(sql);
rs.next();
%>
<form name="form1" method="post" action="addarrestact.jsp?ope=mod&id=<%=id%>" onsubmit="return check(this)">
  <table width="70%" border="0" align="center" bgcolor="#333333" cellspacing="1" cellpadding="0">
    <tr bgcolor="#cccccc"> 
      <td colspan="2" height="20"> 
        <div align="center">关键词、IP限制</div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="30%" height="20"> 
        <div align="right">类别：</div>
      </td>
      <td>
        <select name="kind">
          <option value="Keyword" <%if(rs.getString("Kind").equals("Keyword")){%>selected<%}%>>关键词</option>
          <option value="IP" <%if(rs.getString("Kind").equals("IP")){%>selected<%}%>>IP地址</option>
        </select>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="20"> 
        <div align="right">内容：</div>
      </td>
      <td>
        <input type="text" name="content" value="<%=rs.getString("content")%>">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="20" colspan="2"> 
        <div align="center"> 
          <input type="submit" name="Submit" value="提交">
          <input type="reset" name="Submit2" value="重置">
        </div>
      </td>
    </tr>
  </table>
</form>
<%}%>
<p>&nbsp;</p>
</body>
</html>