165 lines
4.8 KiB
PHP
165 lines
4.8 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'); ?>
|
||
|
|
||
|
<!--breadcrumb-->
|
||
|
<div class="main-content">
|
||
|
<div class="main-content-inner">
|
||
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
||
|
<ul class="breadcrumb">
|
||
|
|
||
|
<li class="active">HEALTH AUDIT 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_audit">
|
||
|
<div id="flex1" style="width:100%">
|
||
|
</div>
|
||
|
<input type="hidden" name="flex_audit_id" id="flex_audit_id"/>
|
||
|
</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: 'audit_list_script.php',
|
||
|
dataType: 'json',
|
||
|
colModel: [
|
||
|
{display: '', name: '', width: w*.1, sortable: false, align: 'left'},
|
||
|
{display: 'Sr', name: 'count', width: w*.04, sortable: false, align: 'left'},
|
||
|
{display: 'AUDIT NAME', name: 'audit_name', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'AUDIT DETAILS', name: 'audit_details', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'LOCATION', name: 'location', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'start date time', name: 'start_date_time', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'end date time', name: 'end_date_time', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'AUDITOR NAME', name: 'auditor_name', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'OHC REPRESENTATIVE NAME', name: 'representative_name', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'REMARKS', name: 'remarks', width: w*.2, sortable: true, 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: 'PROGRAM Name', name: 'program_name'},
|
||
|
{display: 'program location', name: 'location'},
|
||
|
{display: 'coordinator name', name: 'coordinator_name'},
|
||
|
],
|
||
|
sortname: "id",
|
||
|
sortorder: "desc",
|
||
|
usepager: true, //pagination
|
||
|
|
||
|
useRp: true,
|
||
|
rp: 50, //records per page
|
||
|
showTableToggleBtn: false, //toggle button for the whole table
|
||
|
resizable: true,
|
||
|
//width: w,
|
||
|
height: h,
|
||
|
singleSelect: true
|
||
|
});
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
function add(){
|
||
|
window.location = 'health_audit.php';
|
||
|
}
|
||
|
|
||
|
function pdf() {
|
||
|
window.open('audit_pdf.php');
|
||
|
}
|
||
|
|
||
|
function excel() {
|
||
|
window.location = 'audit_excel.php';
|
||
|
}
|
||
|
|
||
|
// function pdf_audit() {
|
||
|
// window.location = 'audit_p_pdf.php';
|
||
|
// }
|
||
|
|
||
|
function pdf_audit(audit_id) {
|
||
|
$("#flex_audit_id").val(audit_id);
|
||
|
$("#flex_form_audit").attr('method', 'POST');
|
||
|
$("#flex_form_audit").attr('target', '_blank');
|
||
|
$("#flex_form_audit").attr('action', 'audit_p_pdf.php');
|
||
|
$("#flex_form_audit").submit();
|
||
|
}
|
||
|
|
||
|
function delete_csr(audit_id){
|
||
|
$("#flex_audit_id").val(audit_id);
|
||
|
BootstrapDialog.confirm('Are you sure to delete the Audit Details?', function(result){
|
||
|
if(result) {
|
||
|
$.ajax({
|
||
|
url : 'delete_health_audit.php',
|
||
|
type : "POST",
|
||
|
data : $("#flex_form_audit").serialize(),
|
||
|
success : function(data) {
|
||
|
if(data.indexOf("SUCCESS")!=-1){
|
||
|
BootstrapDialog.alert('Audit Details Deleted Successfully.');
|
||
|
$("#flex1").flexReload();
|
||
|
|
||
|
}else{
|
||
|
BootstrapDialog.alert('Error Deleting Audit Details');
|
||
|
}
|
||
|
return;
|
||
|
},
|
||
|
error : function(data) {
|
||
|
BootstrapDialog.alert('Error Deleting Audit Details');
|
||
|
return;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
var audit_id = "";
|
||
|
function open_csr(audit_id, action) {
|
||
|
window.location = 'health_audit.php?audit_id='+audit_id+'';
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<?php include('techsyn_footer.php'); ?>
|
||
|
|