<?
	include('check_admin.php');
	$no = $_POST['no'];
	$mId = $_SESSION["mId"];
	
	require_once('link.php');
	mysql_select_db($database,$connect);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>管理者-修改公告</title>

<style>
.style1 {font-size: 13px; color: #FFFFFF; }
BODY {
	SCROLLBAR-FACE-COLOR: #D4D0C8;
	SCROLLBAR-HIGHLIGHT-COLOR: #D4D0C8;
	SCROLLBAR-SHADOW-COLOR: #999999;
	SCROLLBAR-3DLIGHT-COLOR: #FFFFFF;
	SCROLLBAR-ARROW-COLOR:  #000000;
	SCROLLBAR-TRACK-COLOR: #E3E3E3;
	SCROLLBAR-DARKSHADOW-COLOR: #666666;
	background-color: #000000;
	background-image: url(img/bg6.png);
	background-attachment: fixed;
}
a:link {
	color: white;
	text-decoration: none;
}
a:visited {
	color: white;
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	color: #FFFFFF;
}
</style>

</head>
<script  language="JavaScript">
function check()
{
	var r=confirm("是否修改此文章?");
	if(r==true)
		return true;
	if(r==false);
		return false;
	
}
</script>

<body leftmargin=0 topmargin=0 bgproperties="fixed" rightmargin=0  bottommargin=0 marginwidth=0 marginheight=0>
<div align = "right">
</div>
<center>
<?
	$query = "SELECT * FROM `Notice` WHERE `no` = '$no'";
	$result = mysql_query($query,$connect);
	$row = mysql_fetch_object($result);
?>
<form action = "mnotice_act.php" method = "post" name = "modify" onSubmit = "return check()">
  <p>&nbsp;</p>
  <p><a href="admin_link.htm"><strong>管理者功能列表</strong></a> </p>
  <table width="416" border="0" cellpadding="1" cellspacing="0" align="center" class="style1">
	<tr bgcolor="#2D0D32">
		<td colspan="3"><div align = "center">公告修改<br>(不更動的選項，請不要修改)</div></td>
	</tr>
	<tr><td colspan = "3"></td></tr>
	<tr>
		<td width="111" bgcolor="#513550"><div align = "center">發表人</div></td>
		<td width="0"></td>
		<td width="299"  bgcolor="#513550"><div align="left">
		  <input type = "text" name = "mId" value = "<? echo $mId;?>" size = "40">
		  </div></td>
	</tr>
	<tr><td colspan = "3"></td></tr>
	<tr>
		<td bgcolor="#75606A"><div align = "center">發表日期</div></td>
		<td></td>
		<td  bgcolor="#75606A"><? echo $row->dateTime;?>
		    <div align="left"></div></td></tr>
	<tr><td colspan = "3"></td></tr>
	<tr>
		<td bgcolor="#583C40"><div align = "center">標題</div></td>
		<td></td>
		<td  bgcolor="#583C40"><div align="left">
		  <input type = "text" name = "title" value = "<? echo $row->title;?>" size = "40">
		  </div></td>
	</tr>
	<tr><td colspan = "3"></td></tr>
	<tr bgcolor="#47393B">
		<td colspan = "3"><div align = "center">
	      <textarea cols = "46" name = "content" rows = "12"><? echo $row->content;?></textarea></div></td>
	</tr>
	<tr><td colspan = "3"></td></tr>
	<tr bgcolor="#544C4C">
		<td colspan = "3"><div align = "center">
		  <input type = "hidden" value="<? echo $row->no;?>" name="no">
		<input type = "submit" value = "修改" name="msgmodify"> </div></td>
	</tr>
</table>

</form>
</center>
</body>
</html>
