<?
include_once("../inc/config.php");
include_once("../inc/publicfun.php");
include_once("../inc/ftbbsdbclass.php");
include_once("../conn.php");
include_once("check_master.php");
?>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>">
<link href="../css/xmwuye.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">
<?
$ope=$_GET["ope"];
if ($ope=="add"){
?>
<form name="form1" method="post" action="bbs_arrest_ope_act.php?ope=add" onsubmit="return check(this)">
  <table width="98%" border="0" align="center" bgcolor="#cccccc" cellspacing="1" cellpadding="0">
    <tr bgcolor="#cccccc"> 
      <td colspan="2" height="25"> 
        <div align="center">关键词、IP限制</div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="30%" height="25"> 
        <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="25"> 
        <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=" 添 加 " <? if (false===strrpos($_SESSION["admin_qs"],"1")){?>disabled<? }?>>
        </div>
      </td>
    </tr>
  </table>
</form>
<?
}
elseif ($ope=="mod"){
$id=$_GET["id"];
$sql="select * from {$tablepre}bbs_arrest where ID=".$id;
$rs=mysql_query($sql);
$myrow = mysql_fetch_array($rs);
?>
<form name="form1" method="post" action="bbs_arrest_ope_act.php?ope=mod&id=<?=$id?>" onsubmit="return check(this)">
  <table width="98%" border="0" align="center" bgcolor="#cccccc" cellspacing="1" cellpadding="0">
    <tr bgcolor="#cccccc"> 
      <td colspan="2" height="25"> 
        <div align="center">关键词、IP限制</div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="30%" height="25"> 
        <div align="right">类别：</div>
      </td>
      <td>
        <select name="kind">
          <option value="Keyword" <? if ($myrow["Kind"]=="Keyword"){?> selected <? }?>>关键词</option>
          <option value="IP" <? if ($myrow["Kind"]=="IP"){?> selected <? }?>>IP地址</option>
        </select>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25"> 
        <div align="right">内容：</div>
      </td>
      <td>
        <input type="text" name="content" value="<?=$myrow["Content"]?>">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="30" colspan="2"> 
        <div align="center"> 
          <input type="submit" name="Submit" value=" 修 改 " <? if (false===strrpos($_SESSION["admin_qs"],"2")){?>disabled<? }?>>
        </div>
      </td>
    </tr>
  </table>
</form>
</body>
</html>
<?
}
$db->close(); 
?>
