<?
include_once("../inc/config.php");
include_once("../inc/publicfun.php");
include_once("../inc/ftbbsdbclass.php");
include_once("../conn.php");
include_once("../admin/check_master.php");

$id=$_GET["id"];
if ($_POST["act"]=="y"){
   $id=intval($_POST["id"]);
   $url=$_POST["url"];
   $netname=$_POST["netname"];
   $plnl=$_POST["menu"];
   $sql="update {$tablepre}ftblog_pl set netname='".$netname."',plcontent='".$plnl."' where id=".$id;
   mysql_query($sql);
   header("Location:".$url);
}
?>
<html><head><meta http-equiv=content-type content="text/html; charset=utf-8>">
<link href="../css/xmwuye.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr valign="middle"> 
                  <td height="50" colspan="2" bgcolor="#FFFFFF" class=new14> 
                    <div align="center">修改评论</div></td>
                </tr>
                <tr> 
                  <td height="1" colspan="2" bgcolor="#336699" class=new14><spacer height="1" type="block"></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td height="15" colspan="2" class=new14></td>
                </tr>
<?
$sql="select * from {$tablepre}ftblog_pl where id=".$id;
$rs=mysql_query($sql);
$myrow = mysql_fetch_array($rs);
?>
                <form action="" method="post" name="myform" onsubmit="return CheckReForm(this)">
                  <tr bgcolor="#FFFFFF"> 
                    <td width="11%" height="28"> 
                      <div align="center">网名:</div></td>
                    <td width="89%"> 
                      <input name="netname" type="text" id="netname" value="<?=$myrow["netname"]?>" maxlength="29"></td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="28"> 
                      <div align="center">内容:</div></td>
                    <td height="300"> 
<TEXTAREA type="hidden" rows=1 cols=1 name="menu" style="position:absolute;left:0;visibility:hidden;"><?=$myrow["plcontent"]?></textarea>
<script type="text/javascript" src="../fteditor/editor.js"></script> 
<script type="text/javascript">
var editor = new FtEditor("editor");
editor.hiddenName = "menu";
editor.editorWidth = "600px";
editor.editorHeight = "250px";
editor.show();
</script>
					  </td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="28">&nbsp;</td>
                    <td height="28"> 
                      <input type="submit" name="submit1" value=" 修 改 " class="button"> 
                      <input name="act" type="hidden" id="act" value="y"> <input name="id" type="hidden" id="id" value="<?=$id?>">
                      <input name="url" type="hidden" id="url" value="<?=$_SERVER["HTTP_REFERER"]?>"></td>
                  </tr>
                </form>
<?
$db->close();
?>
</table>
</body>
</html>