Current File : /home/inlingua/public_html/noida/icentex/leave_tracker/leaves.form.php |
<?php
// Copyright, Panalink Infotech Limited. Created on: 17-03-2011
// Include header
include "header_leave.php";
?>
<h3> 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.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 <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 <input type="radio" name='emergencyLeave' value="Yes" />Yes</td></tr>
-->
<tr valign='top'><td width="34%">From Date <font color="#FF3366">*</font></td>
<td width="66%"><input type='text' name='fromDate' value="<?php echo $dbObject->getDbField('fromDate');?>" size='10' maxlength='10' id='fromDate' autocomplete="off" ><span id='fromPrevious' style="color:#006699; font-size:12px;display: block;"></span></td></tr>
<tr valign='top'><td>To Date <font color="#FF3366">*</font></td><td><input type='text' name='toDate' value="<?php echo $dbObject->getDbField('toDate');?>" autocomplete="off" size='10' maxlength='10' 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></tr>
<tr valign='top'><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'><td>Classes getting affected?</td><td><div id="classAffected1" style="color:#CC6699;">Select from and to dates</div></td></tr>
<input type='hidden' name='classAffected' id='classAffected' value="<?php echo $dbObject->getDbField('classAffected');?>" size='10' maxlength='2000' >
<tr style="display:none" id="substituted1" valign='top'>
<td>Is it compensated or substituted ?</td>
<td><input onclick="showhidesubstitute(this.value)" type="radio" name='IsclassesSubstituted' value="Yes" id="radio1" />Substituted <input onclick="showhidesubstitute(this.value)" type="radio" name='IsclassesSubstituted' id="radio2" value="No" />Compensated <input onclick="showhidesubstitute(this.value)" type="radio" name='IsclassesSubstituted' id="radio3" value="Other" checked="checked"/>Other</td></tr>
<tr style="display:none" id="substituted2" valign='top'><td>Substituted by Whom? <font color="#FF3366">*</font></td><td><textarea wrap='virtual' rows='2' cols='30' name='subByWhom' ><?php echo $dbObject->getDbField('subByWhom');?></textarea></td></tr>
<tr style="display:none" id="substituted3" valign='top' ><td>When and how will the classes be compensated? <font color="#FF3366">*</font></td><td><textarea wrap='virtual' rows='2' cols='30' name='compensated' ><?php echo $dbObject->getDbField('compensated');?></textarea></td></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"> </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>