<?
@require_once('../inc/fun.inc.php');
@require_once('../inc/config.db.php');
@require_once('cookie.php');
?>
<?
$id = $_GET["id"];
$sql = "select * from news where id='$id'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="admin.php?main=news_up_act&id=<?=$id?>">
  <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#000000">
    <tr>
      <td colspan="2" align="center" bgcolor="#000000" style="color:#FFF; font-size:16px; font-weight:bold">新闻修改</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">新闻标题:</td>
      <td bgcolor="#FFFFFF"><label for="title"></label>
      <input name="title" type="text" id="title" value="<?=$row["title"]?>" maxlength="50" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">新闻类别:</td>
      <td bgcolor="#FFFFFF"><label for="newslb"></label>
        <select name="newslb" id="newslb" style="width:100px">
        <?
		$sql="select * from lb order by id";
		$result=mysql_query($sql);   
		while($rows=mysql_fetch_array($result)){
		?>
        	<option value="<?=$rows["id"]?>" <? if($rows["id"]==$row["newsid"]){?>selected="selected"<? }?>><?=$rows["name"]?></option>  
        <?
		}
		?>
      	</select>
      </td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">作者:</td>
      <td bgcolor="#FFFFFF"><label for="ze"></label>
      <input name="ze" type="text" id="ze" value="<?=$row["author"]?>" size="10" maxlength="30" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">来源:</td>
      <td bgcolor="#FFFFFF"><label for="ly"></label>
      <input name="ly" type="text" id="ly" value="<?=$row["source"]?>" size="10" maxlength="50" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">新闻内容:</td>
      <td bgcolor="#FFFFFF">
      	<? require("FCKeditor/fckeditor.php");             //调用文件
			$sBasePath = "FCKeditor/" ;                       //根目录
			$oFCKeditor = new FCKeditor('content') ;  //设定name字段
			$oFCKeditor->BasePath	= $sBasePath ;
			$oFCKeditor->Value		= $row["content"];       //默认值
			$oFCKeditor->Height='400px';                 //高
			$oFCKeditor->Width='100%';                   //宽
			$oFCKeditor->Create() ;
		?>
      </td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><input type="submit" name="button" id="button" value="修改" /></td>
    </tr>
  </table>
</form>
</body>
</html>