Current File : /home/inlingua/public_html/faridabad/icentex/general_leave/leaves_non_teach.form.php
<?php
// Copyright, Panalink Infotech Limited. Created on: 17-03-2011

// Include header
include "header_leave.php";

?>
<h3>&nbsp;&nbsp;&nbsp;Apply Leaves</h3>

<div style="margin-left:10px;">
<?php
echo '<h4>'.$succFailMesg.'</h4>'; 


// Show result of a form submission?
if ($showResult == "Y")
{	//echo "<br><a href='leaves.select.php'>Back</a><br>";
	// Include footer'
/*	header("Location:leaves.select.php?st=".$st."&fromDate_search=".$_REQUEST['fromDate_search']."&toDate_search=".$_REQUEST['toDate_search']."");
*/
header("Location:leaves.select.php?st=".$st.""); 
	include "footer_leave.php";
	return; 
}
?>

<script language="javascript">
<!--
function validate(form) 
{	if (form.id.value=="")
	{	alert("id cannot be blank. Please enter it.");
		form.id.focus(); return false;
	}
	return true;
}
-->
</script>

<?php
if($numLWC['tot']<=0)
{
?>

<form method='post' action='leaves_non_teach.main.php' id="leaveForm" onsubmit="return validate(this)">
<input type='hidden' name='id' value="<?php echo $dbObject->getDbField('id');?>">
<input type='hidden' name='kV' value="<?php echo $_REQUEST['kV'];?>">
<input type="hidden" id="emergencyLeave" name='emergencyLeave' value="" />
<table boder='1' class='pa-nor' width="100%">
<!--<tr valign='top'><td width='50%'>Are you applying before actual leave start date?</td><td ><input type="radio" name='leaveAfterorBefore' value="Before" checked="checked" />Yes &nbsp;&nbsp;<input type="radio" name='leaveAfterorBefore' value="After" />No</td></tr>

<tr valign='top'><td width='50%'>Is this an emergency leave?</td><td ><input type="radio" name='emergencyLeave' value="No" checked="checked" />No &nbsp;&nbsp;<input type="radio" name='emergencyLeave' value="Yes" />Yes</td></tr>
-->

<tr valign='top'>
<td width="10%">Leave Type</td>
   <td width="20">
   <select name="type" id="type" style="width:90%">
      <option value="Weekoff">Weekoff</option>
      <option value="paid">Paid Leave</option>
       <option value="unpaid">Unpaid Leave</option>

   </select>
   </td>
   
<td width="10%">From Date <font color="#FF3366">*</font></td>
<td width="20%"><input type='text' name='fromDate' value="<?php echo $dbObject->getDbField('fromDate');?>" size='10' maxlength='10' style="width:100%" id='fromDate'>
<span id='fromPrevious' style="color:#006699; font-size:12px;display: block;"></span></td>
 

 <td width="10%">&nbsp;&nbsp;&nbsp;&nbsp;To Date <font color="#FF3366">*</font></td>
 <td width="30%"><input type='text' name='toDate' value="<?php echo $dbObject->getDbField('toDate');?>" size='10' maxlength='10' style="width:70%"  id='toDate'>
 <span id='fromNext' style="color:#006699; font-size:12px;display: block;"></span>
<font color="#FF6699" style="font-size:11px; display: block;">(For single day leave please put same date for both)</font>
</td>

</tr>


<tr valign='top'>
      <td></td>
    <td>
      <font color="#FF6699" style="font-size:11px;" id=""><span id="leave_find_error"></span></font>
    </td>
</tr>

<tr valign='top'>
        <td>No. of days</td>
        <td><div id='noofdays1' style="color:#CC6699;">Select from and to dates</div>
           <input type='hidden' name='noofdays' id='noofdays' value="<?php echo $dbObject->getDbField('noofdays');?>" size='10' maxlength='250' readonly="readonly">
        </td>
           <td>Reasons For Leave <font color="#FF3366">*</font></td>
        <td>
        <textarea wrap='virtual' rows='2' cols='30' name='reasons' id='reasons'><?php echo $dbObject->getDbField('reasons');?></textarea>
        </td>
</tr>



<tr valign='top'>
    
</tr>

  
     



<tr><td colspan='2'>
<input type="hidden" name="status" value="waiting" />
<div style="width:100%; float:left;"><div id='subsubmit' style="width:20%; float:left;"><input type='submit' name='aC' value='<?php echo $currentMode;?>' class="btnStyle1"></div><div id='subwait' ></div></div>
</td></tr>
  <tr><td style="color:#FF6699; font-weight:bold; " colspan='2' id="emergencylabel"></td></tr>
</table>
</form>
<?php
}
else
{
  echo"<font color='red'>Your One Applied leave is still under Waiting.You can apply for another after clearance of this.</font>";
}

?>

</div>
<div style="margin-top:100px">&nbsp;</div>

<?php
// Include footer
include "footer_leave.php";
?>
<script>
function getEmergencyDate(affectclass)
{
val= $('#fromDate').val();	
//alert(val);
current="<?php echo date('Y-m-d') ?>";
//alert(current);

//alert(datediff);
 datediff_15(current,val,affectclass);
}
</script>