720 lines
24 KiB
PHP
720 lines
24 KiB
PHP
<?php
|
|
$query = "SELECT * FROM sickness where emp_id='$flex_opd_id' AND doctor_last_attended='0'AND (sickness_date > DATE_SUB(NOW(), INTERVAL 24 HOUR))";
|
|
// echo $query;
|
|
$existingAilmentList ="";
|
|
$result = @mysqli_query($conn,$query);
|
|
while( $row = mysqli_fetch_assoc($result)){
|
|
$emp_id=$row['emp_id'];
|
|
$ticket_no = $row['ticket_no'];
|
|
$sickness_id=$row['sickness_id'];
|
|
$past_token_no = $row['token_no'];
|
|
$past_agency = $row['agency'];
|
|
$past_des = $row['des'];
|
|
$past_justifiable_from = $row['justifiable_from'];
|
|
$past_justifiable_to = $row['justifiable_to'];
|
|
$past_from_date = $row['from_date'];
|
|
$past_to_date = $row['to_date'];
|
|
$past_date_absent = $row['date_absent'];
|
|
$past_date_absent_to = $row['date_absent_to'];
|
|
$past_date_return = $row['date_return'];
|
|
$existingAilmentList= $row['ailment_name'];
|
|
|
|
}
|
|
?>
|
|
<form name="sickness_form_employee" id="sickness_form_employee" role="form-horizontal">
|
|
<div class="row">
|
|
<div class="col-xs-12 widget-container-col"
|
|
id="widget-container-col-1">
|
|
<div class="widget-box box box-warning" id="widget-box-1">
|
|
<div class="widget-header">
|
|
<h5 class="widget-title">Fitness form <?php echo $patient_name?> <a target="_blank" href="emp_dashboard.php?flex_patient_id=<?php echo $flex_opd_id?>"><i style="font-size: 17px;" class="glyphicon glyphicon-user"></i></a>
|
|
|
|
<div class="widget-toolbar">
|
|
|
|
<div class="clearfix">
|
|
<div class="pull-right tableTools-container">
|
|
<div class="dt-buttons btn-overlap btn-group">
|
|
<!-- <a -->
|
|
<!-- class="dt-button buttons-csv buttons-html5 btn btn-white btn-primary btn-bold" -->
|
|
<!-- id="forwardButton" tabindex="0" aria-controls="dynamic-table" -->
|
|
<!-- data-original-title="Send To Doctor" title="Save"><span><i -->
|
|
<!-- class="fa fa-save bigger-110 blue"></i> <span class="hidden">Save</span></span></a> -->
|
|
|
|
<a
|
|
class="dt-button buttons-print btn btn-white btn-primary btn-bold"
|
|
data-action="fullscreen" tabindex="0"
|
|
aria-controls="dynamic-table" data-original-title="Maximize"
|
|
title="Maximize"><span><i
|
|
class="fa fa fa-expand bigger-110 grey"></i> <span
|
|
class="hidden">Maximize</span></span></a> <input type="hidden" name="attendedStatus" id="attendedStatus"
|
|
<?php if ($rolecode == 'DOC'){ ?> value="<?php echo $__STATUS_DOCTOR_ATTENDED?>"<?php }?>
|
|
<?php if ($rolecode == 'RCP'){ ?> value="<?php echo $__STATUS_RECEPTIONIST_ATTENDED?>"<?php }?>
|
|
/>
|
|
<input type="hidden" name="doctor_last_attended" id="doctor_last_attended"
|
|
<?php if ($rolecode == 'DOC'){ ?> value="<?php echo $_SESSION['user_id']?>"<?php }else {?>
|
|
value="<?php echo $row['doctor_last_attended']?>"<?php }?>
|
|
/>
|
|
|
|
<!--<a class="dt-button buttons-print btn btn-white btn-primary btn-bold" data-action="fullscreen" tabindex="0" aria-controls="dynamic-table" data-original-title="" title=""><span><i class="fa fa fa-expand bigger-110 grey"></i> <span class="hidden">Maximize</span></span></a>-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-sm-4">
|
|
<label class="control-label" for="appointment_id"><strong
|
|
style="font-size: 11px">Fitness No.:</strong></label>
|
|
|
|
<input id="ticket_no" type="hidden"
|
|
name="ticket_no" value="<?php echo $ticket_no;?>" />
|
|
|
|
<div class="input-group">
|
|
<?php echo $ticket_no;?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- <div class="col-sm-3">
|
|
<label class="control-label" for="appointment_date"><strong
|
|
style="font-size: 11px">Token No</strong></label>
|
|
|
|
<div class="input-group">
|
|
<input id="token_no" name="token_no" type="text"
|
|
value="<?php echo $past_token_no;?>" />
|
|
</div>
|
|
|
|
</div> -->
|
|
<input type="hidden" name="emp_id" id="emp_id" value="<?php echo $flex_opd_id?>" >
|
|
|
|
<div class="col-sm-4">
|
|
<label class="control-label" for="sickness_date"><strong
|
|
style="font-size: 11px"> Date</strong></label>
|
|
|
|
<div class="input-group">
|
|
<span><?php echo date_format(date_create($row['sickness_date']),"d-M-Y h:i:sa")?> </span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class=" col-sm-4">
|
|
<label class="control-label" for="followup_to_opd"><strong
|
|
style="font-size: 11px">Followup to(if Applicable)</strong></label>
|
|
|
|
<div class="input-group">
|
|
<?php echo getFieldFromTable("CONCAT(ticket_no,' ',DATE_FORMAT(appointment_date,'%d-%b-%Y %l:%i %p ')) as nameCol,appointment_id from employee_appointment where appointment_type = 'I' and emp_id ='$flex_opd_id' order by appointment_date","","","")?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
<div class="space-6"></div>
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<label class="control-label" for="from_date"><strong
|
|
style="font-size: 11px">Treatment start Date</strong></label>
|
|
<div class="input-group">
|
|
<span><?php echo date_format(date_create($past_from_date),"d-M-Y h:i:sa ")?> </span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-4">
|
|
<label class="control-label" for="to_date"><strong
|
|
style="font-size: 11px">Treatment End Date</strong></label>
|
|
<div class="input-group">
|
|
<span><?php echo date_format(date_create($row['to_date']),"d-M-Y h:i:sa ")?> </span>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<label class="control-label" for="date_absent"><strong
|
|
style="font-size: 11px">Unfit From Date</strong></label>
|
|
|
|
<div class="input-group">
|
|
<span><?php echo date_format(date_create($row['date_absent']),"d-M-Y h:i:sa ")?> </span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-sm-3">
|
|
<label for="role">Unfit to Date</label>
|
|
|
|
<div class="input-group">
|
|
<span class="input-group-addon">
|
|
<?php echo date_format(date_create($row['date_absent']),"d-M-Y h:i:sa ")?>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="space-6"></div>
|
|
<!-- <div class="row"> -->
|
|
<div class="form-group col-sm-3 ">
|
|
<label for="role">Justifiable From Date</label>
|
|
|
|
|
|
<div class="input-group">
|
|
<span class="input-group-addon">
|
|
<?php echo date_format(date_create($row['date_absent']),"d-M-Y h:i:sa ")?>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="form-group col-sm-3">
|
|
<label for="role">Justifiable To Date </label>
|
|
<div class="input-group">
|
|
<span class="input-group-addon">
|
|
<?php echo date_format(date_create($row['date_absent']),"d-M-Y h:i:sa ")?>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group col-sm-3">
|
|
<label for="role">Not Justifiable From Date</label>
|
|
|
|
<div class="input-group">
|
|
<span class="input-group-addon">
|
|
<?php echo date_format(date_create($row['date_absent']),"d-M-Y h:i:sa ")?>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group col-sm-3">
|
|
|
|
<label for="sickness">Not Justifiable To Date</label>
|
|
|
|
<div class="input-group">
|
|
<span class="input-group-addon">
|
|
<?php echo date_format(date_create($row['date_absent']),"d-M-Y h:i:sa ")?>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="space-6"></div>
|
|
<div class="form-group col-sm-3">
|
|
<label for="sickness">Date of Rejoining</label>
|
|
|
|
<div class="input-group">
|
|
<input class="form-control" name="date_return" readOnly="readonly"
|
|
id="date_return" type="text" /> <span class="input-group-addon">
|
|
<i class="fa fa-calendar bigger-110"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="space-6"></div>
|
|
|
|
|
|
<div class="col-sm-4">
|
|
<label class="control-label " for="des_dis"><strong
|
|
style="font-size: 11px">you told the dispensary about the sickness</strong> </label>
|
|
|
|
<?php echo ($row['des_dis']=='Y')? "Yes":"No" ?>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-4">
|
|
<label class=" control-label " for="sickness"><strong
|
|
style="font-size: 11px">do you think you got sick because of work?<</strong> </label>
|
|
|
|
<?php echo ($row['des_sick']=='Y')? "Yes":"No" ?>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<label class=" control-label " for="sickness"><strong
|
|
style="font-size: 11px">what can be done to prevent it in future?</strong> </label>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="space-6"></div>
|
|
<div class="row">
|
|
<div class="form-group col-sm-3">
|
|
<label for="sickness">Treatment Given By</label> <input type="text"
|
|
class="form-control" name="agency" id="agency"
|
|
placeholder="Enter Agency" value="<?php echo $past_agency;?>" required />
|
|
</div>
|
|
|
|
|
|
<div class="form-group col-sm-3">
|
|
<label for="sickness">Health status</label>
|
|
<select
|
|
class="form-control" name="des" id="des"
|
|
placeholder="Remarks" value="" required />
|
|
|
|
<!-- <option value="" disabled selected>SELECT</option> -->
|
|
<option value="NORMAL">NORMAL</option>
|
|
<option value="WEAK">WEAK</option>
|
|
<option value="SICK">SICK</option>
|
|
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-sm-3">
|
|
<label class="control-label" for="ailment"><strong style="font-size:11px">Diagnosis</strong></label>
|
|
|
|
|
|
<input name="ailment_system[]" type="hidden" data-placeholder="Ailments" value="<?php echo $row['ailment_system_ids'] ?>" >
|
|
<input name="injury_part[]" type="hidden" data-placeholder="Ailments" value="<?php echo $row['injury_parts'] ?>" >
|
|
|
|
<input name="health_advice_name[]" type="hidden" data-placeholder="Ailments" value="<?php echo $row['health_advices'] ?>" >
|
|
|
|
<input name="isEmergency" type="hidden" data-placeholder="Ailments" value="<?php echo $row['IsEmergency'] ?>" >
|
|
|
|
|
|
<div class="input-group">
|
|
<input name="ailment[]" type="hidden"
|
|
data-placeholder="Ailments"
|
|
value="<?php echo $existingAilmentList;?>">
|
|
<input
|
|
type="text" class="form-control" id="ailment_new"
|
|
name="ailment_new" data-placeholder="Ailments">
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-sm-3">
|
|
|
|
<label class="control-label" for="ailment_system"><strong
|
|
style="font-size: 11px">Ailment System</strong></label>
|
|
|
|
<select class="chosen-select form-control"
|
|
id="ailment_system_new" name="ailment_system_new"
|
|
data-placeholder="Ailment System">
|
|
<option value="">Select Ailment System</option>
|
|
<?php echo generateOptionForMultiple('ailment_system','ailment_sys_name','ailment_sys_id',$row['ailment_system'],''); ?>
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<script>
|
|
jQuery(function($) {
|
|
<?php if ($_SESSION['RoleCode'] == $_SESSION['RoleCode']) { ?>
|
|
$("#forwardButton").on("click", function(){
|
|
|
|
BootstrapDialog.show({
|
|
title: 'Forward',
|
|
|
|
message: '<select class="form-control" id="forward_status" >'
|
|
+'<option value="<?php echo $__STATUS_RECEPTIONIST_ATTENDED?>">Save & Add Supporting Documents</option>'
|
|
+'<option value="<?php echo $__STATUS_DOCTOR_PENDING?>">Forward To Doctor</option>',
|
|
|
|
buttons: [{
|
|
label: 'OK',
|
|
action: function() {
|
|
$("#attendedStatus").val($("#forward_status").val());
|
|
validation($("#forward_status").val())
|
|
if($("#forward_status").val()=="<?php echo $__STATUS_RECEPTIONIST_ATTENDED?>"){
|
|
$("#upload_sickness_docs_label").text('Upload Supporting Documents');
|
|
$("#sickness_upload_btn").attr('disabled',false);
|
|
$(".close").click();
|
|
}else{
|
|
$("#attendedStatus").val($("#forward_status").val());
|
|
validation($("#forward_status").val())
|
|
BootstrapDialog.alert('Forwarded To Doctor');
|
|
location.href="home_receptionist.php";
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}]
|
|
});
|
|
});
|
|
<?php }else{ ?>
|
|
validation()
|
|
<?php }?>
|
|
|
|
if(!ace.vars['old_ie'])
|
|
$('#sickness_date').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A',//use this option to display seconds
|
|
defaultDate: new Date(),
|
|
maxDate: new Date(),
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
}).next().on(ace.click_event, function(){
|
|
$(this).prev().focus();
|
|
});
|
|
$('#from_date').datepicker({
|
|
format: 'dd/mm/yyyy',//use this option to display seconds
|
|
//'setDate': new Date(),
|
|
endDate: "+1d",
|
|
//minDate: new Date()-10,
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
<?php if(isset($past_from_date)){?>}).datepicker("setDate", new Date("<?php echo $past_from_date?>"));<?php }else{?>
|
|
}).datepicker("setDate", new Date());
|
|
<?php }?>
|
|
$('#to_date').datepicker({
|
|
format: 'dd/mm/yyyy',//use this option to display seconds
|
|
defaultDate:new Date("<?php echo $row['to_date']?>"),
|
|
endDate: "+1d",
|
|
//minDate: new Date()-10,
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
<?php if(isset($past_to_date)){?>}).datepicker("setDate", new Date("<?php echo $past_to_date?>"));<?php }else{?>
|
|
}).datepicker("setDate", new Date());
|
|
<?php }?>
|
|
|
|
$('#date_absent').datepicker({
|
|
format: 'dd/mm/yyyy',
|
|
endDate: "+1d"
|
|
|
|
<?php if(isset($past_date_absent)){?> }).datepicker("setDate", new Date("<?php echo $past_date_absent?>"));<?php }else{?>
|
|
}).datepicker("setDate", new Date());
|
|
<?php }?>
|
|
|
|
$('#date_absent_to').datepicker({
|
|
format: 'dd/mm/yyyy',
|
|
endDate: "+1d"
|
|
|
|
<?php if(isset($past_date_absent_to)){?> }).datepicker("setDate", new Date("<?php echo $past_date_absent_to?>"));<?php }else{?>
|
|
}).datepicker("setDate", new Date());
|
|
<?php }?>
|
|
|
|
$('#date_return').datepicker({
|
|
format: 'dd/mm/yyyy',//use this option to display seconds
|
|
defaultDate: new Date("<?php echo $row['date_return']?>"),
|
|
endDate: "+1d",
|
|
//minDate: new Date()-10,
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
<?php if(isset($past_date_return)){?> }).datepicker("setDate", new Date("<?php echo $past_date_return?>"));<?php }else{?>
|
|
}).datepicker("setDate", new Date());
|
|
<?php }?>
|
|
|
|
$('#date_not_just').datepicker({
|
|
format: 'dd/mm/yyyy',
|
|
endDate: new Date()
|
|
|
|
}).datepicker("setDate");
|
|
|
|
$('#date_not_just_to').datepicker({
|
|
format: 'dd/mm/yyyy',
|
|
endDate: new Date()
|
|
|
|
}).datepicker("setDate");
|
|
$('#justifiable_from').datepicker({
|
|
format: 'dd/mm/yyyy',
|
|
endDate: new Date()
|
|
|
|
}).datepicker("setDate");
|
|
$('#justifiable_to').datepicker({
|
|
format: 'dd/mm/yyyy',
|
|
endDate: new Date()
|
|
|
|
}).datepicker("setDate");
|
|
|
|
$('#approval_date').datepicker({
|
|
format: 'dd/mm/yyyy',//use this option to display seconds
|
|
defaultDate: new Date("<?php echo $row['approval_date']?>"),
|
|
endDate: "+1d",
|
|
//minDate: new Date()-10,
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
|
|
}).datepicker("setDate", new Date());
|
|
|
|
});
|
|
function validation(){
|
|
var date_absent = $('#date_absent').val();
|
|
if(date_absent == ''){
|
|
BootstrapDialog.alert('Please Enter Date Absent .!!!');
|
|
return false;
|
|
}
|
|
var date_return = $('#date_return').val();
|
|
if(date_return == ''){
|
|
BootstrapDialog.alert('Please Enter Date Return .!!!');
|
|
return false;
|
|
}
|
|
var agency = $('#agency').val();
|
|
if(agency == ''){
|
|
BootstrapDialog.alert('Please Enter TREATMENT GIVEN BY .!!!');
|
|
return false;
|
|
}
|
|
var name = $('#ailment').val();
|
|
if(name == ''){
|
|
BootstrapDialog.alert('Please Enter Ailment Name .!!!');
|
|
return false;
|
|
}
|
|
|
|
|
|
save();
|
|
}
|
|
|
|
$('#ailment_new').trigger('chosen:updated');
|
|
|
|
if($('#ailment_new')){
|
|
var ailments= new Array();
|
|
getAilments();
|
|
function getAilments(){
|
|
$.ajax({
|
|
url : 'select_ailments.php',
|
|
type : "GET",
|
|
success : function(data) {
|
|
ailments = $.parseJSON(data);
|
|
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error pulling Ailments');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
$( document ).ready(function() {
|
|
|
|
|
|
if($('#ailment_new')){
|
|
setTimeout(function () {
|
|
|
|
var tag_input_ailments = $('#ailment_new');
|
|
try{
|
|
tag_input_ailments.tag(
|
|
{
|
|
placeholder:tag_input_ailments.attr('placeholder'),
|
|
|
|
source:ailments
|
|
|
|
}
|
|
)
|
|
|
|
//programmatically add/remove a tag
|
|
var $tag_obj = $('#ailment_new').data('tag');
|
|
//$tag_obj.add('Programmatically Added');
|
|
var existingAilments = "<?php echo $existingAilmentList?>"
|
|
var existingAilments = "<?php echo getCommaSeperatedValuesForInClause('select ailment_name from ailment','ailment_id',$existingAilmentList)?>"
|
|
if(existingAilments!=undefined && existingAilments!=null && existingAilments!=''){
|
|
var existingAilmentsArr =existingAilments.split(",");
|
|
jQuery.each( existingAilmentsArr, function( i, val ) {
|
|
$tag_obj.add(val.toUpperCase());
|
|
});
|
|
}
|
|
//var index = $tag_obj.inValues('some tag');
|
|
// $tag_obj.remove(index);
|
|
}catch(e) {
|
|
//display a textarea for old IE, because it doesn't support this plugin or another one I tried!
|
|
tag_input_ailments.after('<textarea id="'+tag_input_ailments.attr('id')+'" name="'+tag_input_ailments.attr('name')+'" rows="3">'+tag_input_ailments.val()+'</textarea>').remove();
|
|
//autosize($('#form-field-tags'));
|
|
}
|
|
var x = $("#from_date").width();
|
|
$('.tags > input').css('width', x+30);
|
|
}, 500);
|
|
|
|
}//end Ailments*/
|
|
|
|
});
|
|
|
|
</script>
|
|
<script>
|
|
jQuery(function($) {
|
|
<?php if ($_SESSION['RoleCode'] == $_SESSION['RoleCode']) { ?>
|
|
$("#forwardButton").on("click", function(){
|
|
|
|
BootstrapDialog.show({
|
|
title: 'Forward',
|
|
|
|
message: '<select class="form-control" id="forward_status" >'
|
|
+'<option value="<?php echo $__STATUS_DOCTOR_PENDING?>">Forward To Doctor</option>',
|
|
|
|
buttons: [{
|
|
label: 'OK',
|
|
action: function() {
|
|
$("#attendedStatus").val($("#forward_status").val());
|
|
validation($("#forward_status").val())
|
|
$(".close").click();
|
|
}
|
|
}]
|
|
});
|
|
});
|
|
<?php }else{ ?>
|
|
validation()
|
|
<?php }?>
|
|
|
|
if(!ace.vars['old_ie'])
|
|
$('#sicknesss_date').datetimepicker({
|
|
format: 'DD/MM/YYYY h:mm A',//use this option to display seconds
|
|
defaultDate: new Date(),
|
|
maxDate: new Date(),
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
}).next().on(ace.click_event, function(){
|
|
$(this).prev().focus();
|
|
});
|
|
$('#from_dates').datepicker({
|
|
format: 'dd/mm/yyyy',//use this option to display seconds
|
|
//'setDate': new Date(),
|
|
maxDate: -0,
|
|
//minDate: new Date()-10,
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
<?php if(isset($row['from_dates'])){?> }).datepicker("setDate", new Date("<?php echo $row['from_date']?>"));<?php }else{?>
|
|
}).datepicker("setDate", new Date());
|
|
<?php }?>
|
|
$('#to_dates').datepicker({
|
|
format: 'dd/mm/yyyy',//use this option to display seconds
|
|
defaultDate:new Date("<?php echo $row['to_dates']?>"),
|
|
maxDate: -0,
|
|
//minDate: new Date()-10,
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
<?php if(isset($row['to_dates'])){?>}).datepicker("setDate", new Date("<?php echo $row['to_date']?>"));<?php }else{?>
|
|
}).datepicker("setDate", new Date());
|
|
<?php }?>
|
|
|
|
$('#date_absents').datepicker({
|
|
format: 'dd/mm/yyyy',
|
|
maxDate: new Date()
|
|
|
|
<?php if(isset($row['date_absentss'])){?> }).datepicker("setDate", new Date("<?php echo $row['date_absent']?>"));<?php }else{?>
|
|
}).datepicker("setDate", new Date());
|
|
<?php }?>
|
|
|
|
$('#date_returns').datepicker({
|
|
format: 'dd/mm/yyyy',//use this option to display seconds
|
|
defaultDate: new Date("<?php echo $row['date_returns']?>"),
|
|
maxDate: new Date(),
|
|
//minDate: new Date()-10,
|
|
icons: {
|
|
time: 'fa fa-clock-o',
|
|
date: 'fa fa-calendar',
|
|
up: 'fa fa-chevron-up',
|
|
down: 'fa fa-chevron-down',
|
|
previous: 'fa fa-chevron-left',
|
|
next: 'fa fa-chevron-right',
|
|
today: 'fa fa-arrows ',
|
|
clear: 'fa fa-trash',
|
|
close: 'fa fa-times'
|
|
}
|
|
<?php if(isset($row['date_returns'])){?> }).datepicker("setDate", new Date("<?php echo $row['date_return']?>"));<?php }else{?>
|
|
}).datepicker("setDate", new Date());
|
|
<?php }?>
|
|
|
|
});
|
|
function validation(){
|
|
var date_absent = $('#date_absent').val();
|
|
if(date_absent == ''){
|
|
BootstrapDialog.alert('Please Enter Date Absent .!!!');
|
|
return false;
|
|
}
|
|
var date_return = $('#date_return').val();
|
|
if(date_return == ''){
|
|
BootstrapDialog.alert('Please Enter Date Return .!!!');
|
|
return false;
|
|
}
|
|
var agency = $('#agency').val();
|
|
if(agency == ''){
|
|
BootstrapDialog.alert('Please Enter Agency .!!!');
|
|
return false;
|
|
}
|
|
var name = $('#ailment').val();
|
|
if(name == ''){
|
|
BootstrapDialog.alert('Please Enter Ailment Name .!!!');
|
|
return false;
|
|
}
|
|
var des = $('#des').val();
|
|
if(des == ''){
|
|
BootstrapDialog.alert('Please Enter Description.!!!');
|
|
return false;
|
|
}
|
|
|
|
save();
|
|
}
|
|
</script>
|
|
<?php include('common_ace.php'); ?>
|
|
|