<body style="background-color: #ffffff;background-image:url(rail.jpg);background-repeat: repeat-y">	
<?php
$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);
	$StaffID = $_GET["StaffID"];	

$result2 = mysql_query("SELECT * FROM dutytime Where StaffID = '$StaffID ' ");
$result4 = mysql_query("select * from staff where StaffID='$StaffID'");
$row2=mysql_fetch_array($result4);
$user= $row2['Username'];

echo "<table border='0' align=center>
<tr>
	<td><a href='http://www.wauhaha.com/karaoke/staffviewmem.php?StaffID=$StaffID'><img src=member_button.jpg width=110 height=110 border=0/><br/><h4 align='center'>Member</h4></a></td>
	<td><a href='http://www.wauhaha.com/karaoke/staffviewsalary.php?StaffID=$StaffID'><img src=money_button.jpg width=110 height=110 border=0/><br/><h4 align='center'>Salary</h4></a></td>
	<td><a href='http://www.wauhaha.com/karaoke/staffviewduty.php?StaffID=$StaffID'><img src=duty_button.jpg width=110 height=110 border=0/><br/><h4 align='center '>Duty Time</h4></a></td>
	<td><a href='room1.php?StaffID=$StaffID' target=_window><img src=room_button.jpg width=110 height=110 border=0/><br/><h4 align='center'>Room</h4></a></td>
	<td><a href='credit1.php?StaffID=$StaffID'.php><img src=Money.jpg width=110 height=110 border=0/><br/><h4 align='center'>Credit</h4></a></td>
	<td><a href='vleave.php?Username=$user' target=_window><img src=leave_button.jpg width=110 height=110 border=0/><br/><h4 align='center '>Leave</h4></a></td>
</tr>
</table>
<h2 align=center><i>Staff view Duty</i></h2>
";
echo "<center><a href=staffaccount.php?StaffID=$StaffID>Back&nbsp;Menu</a></center>";
echo "<table border=3 align=center style ='font-family:Arial, Helvetica, sans-serif;font-size:1em' color='blue' bordercolorlight='tan' cellspacing=0 cellpadding=4>
 <tr bgcolor=lightblue ><th>StaffID</th>
						<th>Username</th>
						<th>Monday</th>
						<th>Tuesday</th>
						<th>Wednesday</th>
						<th>Thursay</th>
						<th>Friday</th>
						<th>Saturday</th>
						<th>Sunday</th>
						</tr>";


while($row2 = mysql_fetch_array($result2)){
  $username=$row2['Username'];
  
  echo"<tr align='center' border=1>";
	
  echo "<td border=1>".$row2['StaffID']."</td>";
  echo "<td border=1>".$row2['Username']."</td>";
  echo "<td border=1>".$row2['Monday']."</td>";
  echo "<td border=1>".$row2['Tuesday']."</td>";
  echo "<td border=1>".$row2['Wednesday']."</td>";
  echo "<td border=1>".$row2['Thursday']."</td>";
  echo "<td border=1>".$row2['Friday']."</td>";
  echo "<td border=1>".$row2['Saturday']."</td>";
  echo "<td border=1>".$row2['Sunday']."</td>";

  
  echo "</tr>";
 
  }
  echo "</table>";

mysql_close($login);
?>
