<html>
<head>
<?php
$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);
	
	
$roomtype=$_GET['roomtype'];
	
	?>
</head>

<body style="background-color: #ffffff;background-image:url(rail.jpg);background-repeat: repeat-y">
<center>
<table>
	<tr>	
		<td><a href="http://www.wauhaha.com/karaoke/adminaccount.php"><img src=admin.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/adminviewmem.php"><img src=member.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/adminviewstaff.php"><img src=staff.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/dutytime.php"><img src=duty.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/salary.php"><img src=salary.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href=adminhistory.php><img src=leave.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href=adminhistory.php><img src=job.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href=adminhistory.php><img src=advertisement.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/room.php"><img src=room.gif width=140 height=140 border=0/><br/></a></td>
		
	</tr>
</table><h2>Book Room</h2>
</center>
<center><a href="http://www.wauhaha.com/karaoke/adminaccount.php">Back</a></center>
<?php echo "<form name=book method=post action='http://www.wauhaha.com/karaoke/bookroomaction.php?roomtype=$roomtype'>"; ?>
<center>
	<table border=1 style="font-size:20pt";>
		<tr>
			<td>Trans ID:</td>
			<td>
			<?php
		include('broomtran.php');
	
		?></td>
		</tr>
		<tr>
			<td>Room Type:</td>
			<td>
			<?php
		echo $roomtype;
	
		?></td>
		</tr>
		<tr>
			<td>Name:</td>
			<td><input type=text name=Name></td>
		</tr>
		<tr>
			<td>IC:</td>
			<td><input type=text name=IC></td>
		</tr>
		<tr>
			<td>Contact:</td>
			<td><input type=text name=contact></td>
		</tr>
		
		<tr>
			<td>Package:	<?php
				
			$result2 = mysql_query("SELECT * FROM roomtype where roomtype='$roomtype' ");
			 if($row2 = mysql_fetch_array($result2)){
			 
				echo "".$row2['Package1']." <input type='hidden' name=package1 value=".$row2['Package1']." >";
			 }
				?></td>
			<td style="font-size:14pt">
			
			
			
			
		        <select name=people1 >
				<option value=0>0</option>
				<option value=1>1</option>
				<option value=2>2</option>
				<option value=3>3</option>
				<option value=4>4</option>
				<option value=5>5</option>
				<option value=6>6</option>
				<option value=7>7</option>
				<option value=8>8</option>
				<option value=9>9</option>
				<option value=10>10</option>
				<option value=11>11</option>
				<option value=12>12</option>
				<option value=13>13</option>
				<option value=14>14</option>
				<option value=15>15</option>
			</select>
			<?php
				
			$result2 = mysql_query("SELECT * FROM roomtype where roomtype='$roomtype' ");
			 if($row2 = mysql_fetch_array($result2)){
			 
				echo "* RM".$row2['Price1']."";
			 }
				?>
				
			</td >
		</tr>
		<tr>
			<td>Package:	<?php
				
			$result2 = mysql_query("SELECT * FROM roomtype where roomtype='$roomtype' ");
			 while($row2 = mysql_fetch_array($result2)){
			 
				echo "".$row2['Package2']." <input type='hidden' name=package2 value=".$row2['Package2']." >";
			 }
				?></td>
			<td style="font-size:14pt">
			
			
		
			
		        <select name=people2 >
				<option value=0>0</option>
				<option value=1>1</option>
				<option value=2>2</option>
				<option value=3>3</option>
				<option value=4>4</option>
				<option value=5>5</option>
				<option value=6>6</option>
				<option value=7>7</option>
					<option value=8>8</option>
				<option value=9>9</option>
				<option value=10>10</option>
				<option value=11>11</option>
				<option value=12>12</option>
				<option value=13>13</option>
				<option value=14>14</option>
				<option value=15>15</option>
				</select>
						<?php
				
			$result2 = mysql_query("SELECT * FROM roomtype where roomtype='$roomtype' ");
			 if($row2 = mysql_fetch_array($result2)){
			 
				echo "* RM".$row2['Price2']."";
			 }
				?>
				
			</td>
		</tr><tr>
			<td>Package:		<?php
				
			$result2 = mysql_query("SELECT * FROM roomtype where roomtype='$roomtype' ");
			 while($row2 = mysql_fetch_array($result2)){
			 
				echo "".$row2['Package3']." <input type='hidden' name=package3 value=".$row2['Package3']." >";
			 }
				?></td>
			<td style="font-size:14pt">
		
			
		
			
		        <select name=people3 >
				<option value=0>0</option>
				<option value=1>1</option>
				<option value=2>2</option>
				<option value=3>3</option>
				<option value=4>4</option>
				<option value=5>5</option>
				<option value=6>6</option>
				<option value=7>7</option>
				<option value=8>8</option>
				<option value=9>9</option>
				<option value=10>10</option>
				<option value=11>11</option>
				<option value=12>12</option>
				<option value=13>13</option>
				<option value=14>14</option>
				<option value=15>15</option>
				</select>
			<?php
				
			$result2 = mysql_query("SELECT * FROM roomtype where roomtype='$roomtype' ");
			 if($row2 = mysql_fetch_array($result2)){
			 
				echo "* RM".$row2['Price3']."";
			 }
				?>
			</td>
		</tr>
		<tr>
			<td></td>
			<td><input type=submit value=ok style="width:50"></td>
		</tr>
	</table>
	</center>
<?php 	echo "</form>";?>
</body>
</html>