<?php
session_start();
include "../conn.php";
include "../functions.php";

$userID = checkAdmin(session_id());
?>

<?php
include "fheader.php";
echo "<table width=80% align=center cellspacing=1 cellpadding=3><tr bgcolor=a0a0a0><td><b>Room</b></td><td colspan=2 width=1%><b>Options</b></td></tr>";

$res = mysql_query("select roomid, roomname from room order by roomname asc");
$tri = true;

while ($row = mysql_fetch_array($res))
{
	$roomid = $row[0];
	$roomname = $row[1];
	if ($tri = ! $tri)
	echo "<tr bgcolor=c9c9c9>";
	else
	echo "<tr bgcolor=e9e9e9>";
	echo "<td>$roomname</td>";
	echo "<form action=modf.php method=post><input type=hidden name=fid value=$roomid><td><input type=submit value=Modify></td></form>";
	echo "<form action=delf.php method=post><input type=hidden name=fid value=$roomid><td><input type=submit value=Delete></td></form>";
	echo "</tr>";
}
echo "</table>";
?>

<?php
include "adminFooter.php";
?>