<?
	require("config.inc");
	$AdminID = $_SESSION['AdminID'];
?>

<html>
	<head>
		<title>Android System</title>
	</head>
	
	<body>
	<center>
		<a href="http:www.tnchemie.com.my"><img src="pic/projectTitle.JPG" border="0px"></a>
		</center>
	<table width="100%" height="5px" bgcolor="#66FF66">
	<tr><td align="left">Welcome, <a href="editAdmin.php?adminID=<?echo "$AdminID"; ?>"><?echo "$AdminID"; ?></a>, <a href="logout.php">Logout</a></td></tr>
	</table><br/><br/>
		
		<table align="left" height="25%" width="200px">
			<tr height="1px" valign="top"><td align="center">
			</td></tr>
			<tr><td valign="center" align="center" height="100%">
				<table border="1" bordercolor="green" rules="none">
				<tr><td><a href="checkProduct.php"><img src="pic/productBtn.png" width="140" height="40" border=0px></a></td></tr>
				<tr><td><a href="checkStock.php?changeID=ProID"><img src="pic/stockBtn.png" width="140" height="40" border=0px></a></td></tr>
				<tr><td><a href="checkStaff.php"><img src="pic/staffBtn.png" width="140" height="40" border=0px></a></td></tr>
				<tr><td><a href="checkOwner.php"><img src="pic/ownerBtn.png" width="140" height="40" border=0px></a></td></tr>
				<tr><td><a href="checkAction.php?changeID=AdminID"><img src="pic/actionBtn.png" width="140" height="40" border=0px></a></td></tr>
				<tr><td><a href="checkNotice.php?changeID=AdminID"><img src="pic/noticeBtn.png" width="140" height="40" border=0px></a></td></tr>
				<tr><td><a href="checkHistory.php?changeID=product"><img src="pic/historyBtn.png" width="140" height="40" border=0px></a></td></tr>
				<tr><td><a href="index.php"><img src="pic/qrCode.png" width="140" height="40" border=0px></a></td></tr>
				</table>
			</td></tr>
		</table>
		<?
		$query1 = mysql_query("select * from tbl_notice");
		$i = 1;
		?>
		<table align="left" height="25%" width="300px">
			<tr height="1px" valign="top"><td align="center">
			</td></tr>
			<tr><td valign="center" align="center" height="100%">
				<table  rules="none">
				<tr><th colspan=2 bgcolor="green">Notice</th></tr>
				<tr><td></td></tr>
				<?
				while ($row=mysql_fetch_array($query1))
				{
					echo "<tr><td><form method='POST' action='notice.php?adminID=".$AdminID."&noticeID=".$i."'><input type='text' name='content' value='".$row['content']."' size='130'>";
					if($row['content'] == ''){
					echo "<input type='submit' name='value' value='POST'>";
					}
					else{
					echo "<input type='submit' name='value' value='DELETE'>";
					}
					echo "</form></td></tr>";
					
					$i = $i + 1;
				}
				?>
				</table>
			</td></tr>
		</table>
	</body>
</html>