<html>
<head>
<title>
Edit Leave
</title>
</head>

<body style="background-color: #ffffff;background-image:url(rail.jpg);background-repeat: repeat-y">
<center>

<?php include('link.php');?>
<h1 align=center>Admin View Edited Leave</h1>
<?php
$id = $_GET['id'];
 echo "<a href=lset.php?id=$id><img src=back.jpg width=40 height=40></a>"; ?>
<?php 
$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
mysql_selectDB("wauhaha_karaoke",$login);

if (isset($_GET["page"])) { $page  = $_GET["page"]; } else { $page=1; }; 
$start_from = ($page-1) * 5; 
$result = mysql_query("SELECT * FROM editedleave ORDER BY id ASC LIMIT $start_from,5");

$sql = mysql_query("select COUNT(*) From editedleave");  

$row=mysql_fetch_array($sql);
$total_records = $row[0];
$total_pages = ceil($total_records / 5);
echo "<center>";
for ($i=1; $i<=$total_pages; $i++) { 
	echo "<a href='editedlev.php?page=".$i."&id=$id' style='text-decoration:none'>&nbsp;" .$i. "&nbsp;</a>"; 
}; 
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 align=center>ID</th>
					<th align=center>Leave</th>
					<th align=center>Year</th>
					<th align=center>Edited Time</th>
					<th align=center>Edited By</th>
			
 </tr>";
 while($r=mysql_fetch_array($result)){
 $no = $r['no'];
 echo "<tr>
			<td align=center>".$r['id']."</td>
			<td align=center>".$r['l']."</td>
			<td align=center>".$r['y']."</td>
			<td align=center>".$r['ed']."</td>
			<td align=center>".$r['eb']."</td>

 </tr>";
 }













?>