

<?php

	$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);
?>
<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>
</center>
<h2 align=center><i>View Transaction</i></h2>

<center><a href='http://www.wauhaha.com/karaoke/room.php'>Back</a></center>

<?php
$user = $_GET['user'];
$result2 = mysql_query("SELECT * FROM onlineroomtrans ");

echo "<table border=1 align=center style ='font-family:Arial, Helvetica, sans-serif;font-size:1em' color='blue' bordercolorlight='tan' cellspacing=0 cellpadding=4>
 <tr bgcolor=lightblue ><th>OBroom ID</th>	
						<th>Username</th>
						<th>Name</th>
						<th>IC</th>
						<th>Contact</th>
						<th>Date</th>
						<th>Time</th>
						<th>Package1</th>
						<th>People1</th>
						<th>Price1</th>
						<th>Total1</th>
						<th>Package2</th>
						<th>People2</th>
						<th>Price2</th>
						<th>Total2</th>
						<th>Total</th>
						<th>Roomtype</th>
						<th>Booktime</th>
						<th>Credit</th>
						<th>Function</th>
						</tr>";


while($row2 = mysql_fetch_array($result2)){
$OBRoomID=$row2['OBRoomID'];
  
  echo"<tr align='center' border=1>";
	
  echo "<td border=1>".$row2['OBRoomID']." <input type=hidden name=OBRoomID   value=".$row2['OBRoomID']."></td>";
  echo "<td border=1>".$row2['Username']." <input type=hidden name=Username   value=".$row2['Username']."></td>";
  echo "<td border=1>".$row2['Name']." <input type=hidden name=Name   value=".$row2['Name']."></td>";
  echo "<td border=1>".$row2['IC']." <input type=hidden name=IC   value=".$row2['IC']."></td>";
  echo "<td border=1>".$row2['Contact']." <input type=hidden name=Contact   value=".$row2['Contact']."></td>";
  echo "<td border=1>".$row2['date']." <input type=hidden name=date   value=".$row2['date']."></td>";
  echo "<td border=1>".$row2['time']." <input type=hidden name=time   value=".$row2['time']."></td>";
  echo "<td border=1>".$row2['package1']." <input type=hidden name=package1   value=".$row2['package1']."></td>";
  echo "<td border=1>".$row2['people1']." <input type=hidden name=people1   value=".$row2['people1']."> </td>";
  echo "<td border=1>".$row2['price1']." <input type=hidden name=price1   value=".$row2['price1']."></td>";
  echo "<td border=1>".$row2['total1']." <input type=hidden name=total1   value=".$row2['total1']."></td>";
  echo "<td border=1>".$row2['package2']." <input type=hidden name=package2   value=".$row2['package2']."></td>";
  echo "<td border=1>".$row2['people2']." <input type=hidden name=people2   value=".$row2['people2']."></td>";
  echo "<td border=1>".$row2['price2']." <input type=hidden name=price2   value=".$row2['price2']."></td>";
  echo "<td border=1>".$row2['total2']." <input type=hidden name=total2   value=".$row2['total2']."></td>";

  echo "<td border=1>".$row2['Total']." <input type=hidden name=Total   value=".$row2['Total']."></td>";
  echo "<td border=1>".$row2['roomtype']." <input type=hidden name=roomtype   value=".$row2['roomtype']."></td>";
  echo "<td border=1>".$row2['booktime']." <input type=hidden name=booktime   value=".$row2['booktime']."></td>";
  echo "<td border=1>".$row2['credit']." <input type=hidden name=credit   value=".$row2['credit']."></td>";
echo "<td><a href=appob.php?OBRoomID=$OBRoomID>Ok</td>";
  
  
  echo "</tr>";
 
  }
  echo "</table>";

mysql_close($login);
?>

	</body>
</html>	

