240 lines
6.7 KiB
PHP
240 lines
6.7 KiB
PHP
<?php include('techsyn_header.php'); ?>
|
|
<!-- Main Content Container for side bar and body-->
|
|
<div class="main-container ace-save-state" id="main-container">
|
|
<script type="text/javascript">
|
|
try{ace.settings.loadState('main-container')}catch(e){}
|
|
</script>
|
|
<?php include('techsyn_sidebar.php');
|
|
error_reporting(E_ERROR | E_PARSE);
|
|
?>
|
|
|
|
<?php
|
|
|
|
$id = $_POST['flex_opd_id'];
|
|
$query = "select * from patient_master where id = '".$id."' ";
|
|
//echo $query;
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
exit(mysqli_error($conn));
|
|
|
|
} else{
|
|
$row=@mysqli_fetch_array($result);
|
|
@extract($row);
|
|
}
|
|
?>
|
|
|
|
<!--breadcrumb-->
|
|
<div class="main-content">
|
|
<div class="main-content-inner">
|
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
|
|
<li class="#">Data Setup</li> <li class="#">Organizational Event</li> <li class="#"> Checkup Mgmt List</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
<!-- End of breadcrumb -->
|
|
|
|
<div class="page-content">
|
|
<div id="flexigridDiv" class="table-responsive">
|
|
|
|
<form name="f1" method="post" action="" id="flex_form_checkup_mgmt_list">
|
|
<div id="flex1" style="width:100%">
|
|
</div>
|
|
<input type="hidden" name="flex_checkup_mgmt_list_id" id="flex_checkup_mgmt_list_id"/>
|
|
<input type="hidden" name="emp_id_history" id="emp_id_history"/>
|
|
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div><!-- /.page-content -->
|
|
</div>
|
|
</div><!-- /.main-content -->
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
var w=screen.width*.90;
|
|
var h =0;
|
|
h =(window.innerHeight-($("#navbar").height()+$(".breadcrumbs").height()))*.75;
|
|
$("#flex1").flexigrid({
|
|
url: ' checkup_list_mgmt_script.php',
|
|
dataType: 'json',
|
|
colModel: [
|
|
|
|
{display: 'Sr', name: '', width: w*.04, sortable: false, align: 'left'},
|
|
{display: ' Checkup Mgmt Name ', name: 'checkup_mgmt_name', width: w*.15, sortable: true, align: 'left'},
|
|
{display: ' From Date', name: 'from_date', width: w*.2, sortable: true, align: 'left'},
|
|
{display: ' To Date', name: 'to_date', width: w*.15, sortable: true, align: 'left'},
|
|
{display: ' Checkup Location ', name: 'checkup_location', width: w*.15, sortable: true, align: 'left'},
|
|
{display: ' Remarks', name: 'remarks', width: w*.15, sortable: true, align: 'left'},
|
|
{display: '', name: '', width: w*.1, sortable: false, align: 'left'},
|
|
|
|
],
|
|
buttons: [
|
|
|
|
|
|
{name: 'Add', bclass: 'add', onpress : add},
|
|
{separator: true},
|
|
{name: 'PDF', bclass: 'print', onpress : pdf},
|
|
{separator: true},
|
|
{name: 'Excel', bclass: 'print_excel', onpress : excel},
|
|
{separator: true}
|
|
|
|
|
|
],
|
|
searchitems: [
|
|
|
|
{display: ' Checkup Type', name: 'checkup_type_name', isdefault: true},
|
|
{display: ' From Date(dd/mm/yyyy)', name: 'from_date'},
|
|
{display: ' To Date(dd/mm/yyyy)', name: 'to_date'},
|
|
{display: 'Location', name: 'checkup_location'},
|
|
|
|
],
|
|
sortname: " checkup_mgmt_id",
|
|
sortorder: "asc",
|
|
usepager: true, //pagination
|
|
|
|
useRp: true,
|
|
rp: 20, //records per page
|
|
showTableToggleBtn: false, //toggle button for the whole table
|
|
resizable: true,
|
|
//width: w,
|
|
height: h,
|
|
singleSelect: true
|
|
});
|
|
});
|
|
|
|
|
|
|
|
function add(){
|
|
$("#checkup_mgmt_id").val("");
|
|
$("#checkup_mgmt_name").val("");
|
|
$("#from_date").val("");
|
|
$("#to_date").val("");
|
|
$("#checkup_by").val("");
|
|
$('#checkup_location').val("");
|
|
$("#remarks").val("");
|
|
// $('#training_mode_id').trigger('chosen:updated');
|
|
$('#modal-add-checkup-mgmt').modal("show");
|
|
}
|
|
|
|
|
|
|
|
function open_checkup_Mgmt(checkup_mgmt_id,access){
|
|
|
|
|
|
if(access=='V'){
|
|
$(".save_button").hide();
|
|
}else{
|
|
$(".save_button").show();
|
|
}
|
|
|
|
$.ajax({
|
|
url : 'select_checkup_list_mgmt.php?checkup_mgmt_id='+checkup_mgmt_id+'',
|
|
// data: { checkup_mgmt_id : checkup_mgmt_id},
|
|
type : 'POST',
|
|
success : function(data) {
|
|
var data = $.parseJSON(data);
|
|
|
|
$("#checkup_mgmt_id").val(data.checkup_mgmt_id);
|
|
$("#checkup_mgmt_name").val(data.checkup_mgmt_name);
|
|
$("#from_date").val( myDateFormater(data.from_date));
|
|
$("#to_date").val(myDateFormater(data.to_date));
|
|
$("#checkup_by").val(data.checkup_by);
|
|
$("#checkup_location").val(data.checkup_location);
|
|
$("#remarks").val(data.remarks);
|
|
// $('#checkup_mgmt_mode_id').trigger('chosen:updated');
|
|
$('#modal-add-checkup-mgmt').modal("show");
|
|
$("#flex1").flexReload();
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error Populating Checkup Mgmt Details');
|
|
return;
|
|
}
|
|
});
|
|
|
|
}
|
|
function myDateFormater(myDate){
|
|
var d=new Date(myDate);
|
|
var m=d.getMonth()+1;
|
|
var y=d.getFullYear();
|
|
var date=d.getDate();
|
|
// alert(date+"/"+m+"/"+y);
|
|
return date+"/"+m+"/"+y;
|
|
|
|
|
|
}
|
|
|
|
function pdf(){
|
|
window.open('pdf_checkup_mgmt.php');
|
|
}
|
|
function excel(){
|
|
window.location = 'excel_checkup_mgmt.php';
|
|
}
|
|
function delete_checkup_mgmt(checkup_mgmt_id){
|
|
|
|
BootstrapDialog.confirm('Are you sure to delete Checkup Mgmt Details?', function(result){
|
|
if(result) {
|
|
$.ajax({
|
|
url : 'delete_checkup_mgmt.php',
|
|
type : "POST",
|
|
data : { checkup_mgmt_id : checkup_mgmt_id},
|
|
success : function(data) {
|
|
if(data.indexOf("SUCCESS")!=-1){
|
|
BootstrapDialog.alert(' Checkup Mgmt Details Deleted Successfully.');
|
|
$("#flex1").flexReload();
|
|
|
|
}else{
|
|
BootstrapDialog.alert('Error Deleting Checkup Mgmt Details');
|
|
}
|
|
return;
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error Deleting Checkup Mgmt Details');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
function save_checkup_mgmt(){
|
|
//alert(" gfgdgdg");
|
|
|
|
$.ajax({
|
|
url : 'save_checkup_mgmt.php',
|
|
type : "POST",
|
|
data : $("#checkup_mgmt_form").serialize(),
|
|
|
|
success : function(data) {
|
|
BootstrapDialog.alert(' Checkup Mgmt Form Saved Successfully.');
|
|
$("#flex1").flexReload();
|
|
return;
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error Saving Checkup Mgmt Form');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<?php include('form/checkup_mgmt_form.php'); ?>
|
|
<?php include('common_ace.php'); ?>
|
|
<?php include('techsyn_footer.php'); ?>
|
|
|
|
|