Preview: timesheet_report.php
Size: 5.25 KB
/home/jambtst2015/public_html/giraffeng.com/admin/timesheet_report.php
<?php include("includes/head.php");?>
<?php include("includes/header.php");
include ("includes/libmail.php"); ?>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
jQuery(document).ready(function(){
jQuery("#report_form").validationEngine();
});
</script>
<script>
$(document).ready(function(){
setTimeout(function(){
$(".mydiv").fadeOut("slow", function () {
$(".mydiv").slideUp("slow");
});
}, 4000);
});
</script>
<script>
$( document ).ready(function() {
var enq_dat = new Date();
$(window).on('load',function() {
$('#end_date').datepicker('option', 'minDate', enq_dat);
});
});
$(function()
{
$('#start_date').datepicker({
changeMonth: true,
changeYear: true,
dateFormat:"mm-dd-yy",
onSelect: function(dateStr) {
var date = $(this).datepicker('getDate');
if (date) {
date.setDate(date.getDate());
}
$('#end_date').datepicker('option', 'minDate', date);
},
beforeShowDay: function(date){
if(date.getDay() == 0){
return [true];
} else {
return [false];
}
}
});
$('#end_date').datepicker({
changeMonth: true,
changeYear: true,
dateFormat:"mm-dd-yy",
onSelect: function (selectedDate) {
var date = $(this).datepicker('getDate');
if (date) {
date.setDate(date.getDate());
}
$('#end_date').datepicker('option', 'maxDate', date || 0);
},
beforeShowDay: function(date){
if(date.getDay() == 6){
return [true];
} else {
return [false];
}
}
});
});
function check_period()
{
var oneDay = 24*60*60*1000; // hours*minutes*seconds*milliseconds
start_date = $("#start_date").val();
end_date = $("#end_date").val();
new_start_date = start_date.split('-');
new_end_date = end_date.split('-');
var firstDate = new Date(new_start_date[2],new_start_date[0],new_start_date[1]);
var secondDate = new Date(new_end_date[2],new_end_date[0],new_end_date[1]);
var diffDays = Math.round(Math.abs((firstDate.getTime() - secondDate.getTime())/(oneDay)));
if(diffDays!=6)
{
alert("You cannot select a Timesheet Period More than a Week.");
return false;
}
else
{
return true;
}
}
</script>
<form action="export_excel.php" method="post" id="report_form">
<table width="100%" border="0" class="tmtbl">
<tr>
<td colspan="2" align="center">
<table width="100%" border="0" class="tmfrm">
<tr>
<td width="100">Start Date : </td>
<td width="200">
<input type="text" name="start_date" id="start_date" autocomplete="off" readonly="readonly" class="validate[required]" />
</td>
<td width="100">End Date : </td>
<td width="200">
<input type="text" name="end_date" id="end_date" autocomplete="off" readonly="readonly" class="validate[required]" />
</td>
</tr>
<tr>
<td valign="top">Associate Type</td>
<td colspan="3">
<input type="checkbox" name="associate_type[]" id="associate_type" value="W2S" /> W2S
<input type="checkbox" name="associate_type[]" id="associate_type" value="W2H" /> W2H
<input type="checkbox" name="associate_type[]" id="associate_type" value="1099" /> 1099
<input type="checkbox" name="associate_type[]" id="associate_type" value="C2C" /> C2C
<input type="checkbox" name="associate_type[]" id="associate_type" value="Future H1B" /> Future H1B
<input type="checkbox" name="associate_type[]" id="associate_type" value="Prospect" /> Prospect
<input type="checkbox" name="associate_type[]" id="associate_type" value="EX" /> EX
</td>
</tr>
<?php /*?><tr>
<td align="right" valign="top">Visa Status</td>
<td colspan="3">
<input type="checkbox" name="visa_status" id="visa_status[]" value="H1B" /> H1B
<input type="checkbox" name="visa_status[]" id="visa_status" value="US Citizen" /> US Citizen
<input type="checkbox" name="visa_status[]" id="visa_status" value="GC" /> GC
<input type="checkbox" name="visa_status[]" id="visa_status" value="EAD" /> EAD
<input type="checkbox" name="visa_status[]" id="visa_status" value="OPT" /> OPT
<input type="checkbox" name="visa_status[]" id="visa_status" value="TN" /> TN
</td>
</tr><?php */?>
<tr>
<td colspan="4" align="center"><input type="submit" name="future_date" value="Submit" class="require float-none" onclick="return check_period();"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<?php include("includes/footer.php"); ?>
Directory Contents
Dirs: 17 × Files: 180