<?php   session_start();

if ( $_SESSION[ invcox ] == "" ) { header( "location:login.php?action=need" );} else { include( "config.php" );
   	?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <meta http-equiv="Content-Type" content="text/html;
 charset=iso-8859-1"/>
      <title>Room Entry</title>
      <link href="style.css" rel="stylesheet" type="text/css"/>
      <?php include("calendar.php");
?>   
   </head>
   <body>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="box-wrap">
         <tr>
            <td>   <?php include("top.php");
?></td>
         </tr>
         <tr>
            <td>
               <table width="100%" border="0" cellspacing="1" cellpadding="0">
                  <tr>
                     <td align="left" class="link2">&nbsp;
</td>
                  </tr>
            
                  <tr>
                     <td align="center">&nbsp;
</td>
                  </tr>
                  <tr>
                     <td>
                        <form action="update_leave.php" method="post" enctype="multipart/form-data" name="form1" class="round_box" id="form1">
                           <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
                              <tr>
                                 <td height="40" colspan="2" align="center" bgcolor="#466c74">Edit Leave</td>
                              </tr>
                              <?php if($_GET[info]!=""){?>
                              <tr>
                                 <td height="40" colspan="2" align="center" bgcolor="#80E8F4"><?php echo $_GET[info];
 ?>   </td>
                              </tr>
                              <?php }
							   

$result=mysql_query("select * from hr_leave  where id='$_GET[id]' limit 1");
$row=mysql_fetch_array($result);
																					  
$aresult=mysql_query("select * from hr_employee  where id='$row[employee]' limit 1");
$arow=mysql_fetch_array($aresult);																					  
							   ?>
                              <tr>
                                <td width="14%" bordercolor="#CCCCCC"> Employee :</td>
                                <td width="86%" bordercolor="#CCCCCC" class="input200"><?php echo $arow[customer_name];?></td>
                              </tr>
                              <tr>
                                <td> Date from*</td>
                                <td class="input200"><table width="180" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="70%"><input name="cdate" type="text" id="cdate" size="15"  value="<?php echo dtformat($row[cdate]);?>" required="required"/></td>
                                    <td width="30%" align="center"><a title="Calendar" onclick="displayDatePicker('cdate', this);" href="javascript:;"><img src="images/calendar.gif" width="20" height="20" border="0" /></a></td>
                                  </tr>
                                </table></td>
                              </tr>
                              <tr>
                                <td> Date to*</td>
                                <td class="input200"><table width="180" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="70%"><input name="cdate2" type="text" id="cdate2" size="15"  value="<?php echo dtformat($row[cdate2]);?>" required="required"/></td>
                                    <td width="30%" align="center"><a title="Calendar" onclick="displayDatePicker('cdate2', this);" href="javascript:;"><img src="images/calendar.gif" width="20" height="20" border="0" /></a></td>
                                  </tr>
                                </table></td>
                              </tr>
                              <tr>
                                <td>Comments :<span class="red">*<span class="input200">
                                  <input name="id" type="hidden" id="id" value="<?php echo $_GET[id];?>"/>
                                </span></span></td>
                                <td class="input200"><input name="commentx" type="text" id="commentx" value="<?php echo $row[commentx];?>" /></td>
                              </tr>
                              <tr>
                                 <td height="50" align="center">&nbsp;
</td>
                                 <td height="50" align="left"><input type="submit" name="Submit23" value="Submit"/>   </td>
                              </tr>
                           </table>
                        </form>
                     </td>
                  </tr>
                 
                 
               </table>
            </td>
         </tr>
         <tr>
            <td height="28" align="center">&nbsp;</td>
         </tr>
         <tr>
            <td height="28"><?php include("bot.php");
?></td>
         </tr>
      </table>
   </body>
</html>
<?php }?>