<html>
<head>
<title>
Leave Setting</title>
</head>
</html>
<body style="background-color: #ffffff;background-image:url(rail.jpg);background-repeat: repeat-y">
<center>
<?php include('link.php');?>
<h1 align=center>Leave Setting</h1>
<h3><a href='http://www.wauhaha.com/karaoke/leave.php?<?php $login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
mysql_selectDB("wauhaha_karaoke",$login);
$result = mysql_query("select * from admin");
$r = mysql_fetch_array($result);
$id = $r['Username'];
$id = $_GET['id'];  echo "id=$id";?>' title=Back><img src=back.jpg width=40 height=40></a></h3>
<?php echo "
<a href='http://www.wauhaha.com/karaoke/inlev.php?id=$id'>Insert Leave</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href='http://www.wauhaha.com/karaoke/editedlev.php?id=$id' >Edited Leave</a><br>"; ?>
<?php 


$result =mysql_query("select * from leave2 order by id");
echo "<br> <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 align=center>ID</th>
					<th align=center>Leave Remain</th>
					<th align=center>Year</th>
					<th align=center>Edit</th>
 </tr>";
 while($r=mysql_fetch_array($result)){
 $id1 = $r['id'];
 echo "<tr>
			<td align=center>".$r['id']."</td>
			<td align=center>".$r['l']."</td>
			<td align=center>".$r['year']."</td>
			<td align=center><a href='editleave.php?id=$id1'><img src=edit.jpg width=20 height=20></a></td>
 </tr>";
 }
 
 
 
 
 
 
 
 
 
 
 echo "</tr>";
 
 ?>

