328 lines
7.1 KiB
PHP
328 lines
7.1 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="#">Training & Wellness Program</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_training">
|
|
<div id="flex1" style="width:100%">
|
|
</div>
|
|
<input type="hidden" name="flex_checkup_id" id="flex_checkup_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: 'training_list_script.php',
|
|
dataType: 'json',
|
|
colModel: [
|
|
|
|
{
|
|
display: 'Sr',
|
|
name: '',
|
|
width: w * .04,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Program Name',
|
|
name: 'training_name',
|
|
width: w * .15,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Description of coverage',
|
|
name: 'durations',
|
|
width: w * .2,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Program Duration(in days)',
|
|
name: 'durations',
|
|
width: w * .2,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Program Mode ',
|
|
name: 'mode_of_training',
|
|
width: w * .19,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Program Type ',
|
|
name: 'type_of_training',
|
|
width: w * .19,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Key Health Param Sections',
|
|
name: 'key_health_param_sections',
|
|
width: w * .15,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: '',
|
|
name: '',
|
|
width: w * .1,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
|
|
],
|
|
buttons: [
|
|
|
|
|
|
{
|
|
name: 'Add New Training & Wellness Program Details',
|
|
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: 'training_name',
|
|
isdefault: true
|
|
},
|
|
{
|
|
display: 'Program Desc',
|
|
name: 'description'
|
|
},
|
|
{
|
|
display: 'Program Duration',
|
|
name: 'durations'
|
|
},
|
|
{
|
|
display: 'Program Mode',
|
|
name: 'training_mode_name'
|
|
},
|
|
],
|
|
sortname: "training_master_id",
|
|
sortorder: "asc",
|
|
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 pdf() {
|
|
window.open('pdf_traning_list.php');
|
|
}
|
|
|
|
function excel() {
|
|
window.location = 'excel_traning_list.php';
|
|
}
|
|
|
|
function add() {
|
|
$("#training_name").val("");
|
|
$("#training_description").val("");
|
|
$("#training_duration").val("");
|
|
$("#training_mode").val("");
|
|
$('#training_mode_id').val("");
|
|
$('#training_mode_id').trigger('chosen:updated');
|
|
$('#training_type_id').val("");
|
|
$('#training_type_id').trigger('chosen:updated');
|
|
$('#key_health_param_sections').val("");
|
|
$('#key_health_param_sections').trigger('chosen:updated');
|
|
$('#modal-add-training').modal("show");
|
|
}
|
|
|
|
function open_training(training_id, access) {
|
|
$("#training_name").val("");
|
|
$("#training_description").val("");
|
|
$("#training_duration").val("");
|
|
$("#training_mode").val("");
|
|
$('#training_mode_id').val("");
|
|
$('#training_mode_id').trigger('chosen:updated');
|
|
$('#training_type_id').val("");
|
|
$('#training_type_id').trigger('chosen:updated');
|
|
$('#key_health_param_sections').val("");
|
|
$('#key_health_param_sections').trigger('chosen:updated');
|
|
if (access == 'V') {
|
|
$(".save_button").hide();
|
|
} else {
|
|
$(".save_button").show();
|
|
}
|
|
|
|
$.ajax({
|
|
url: 'select_training_details.php',
|
|
data: {
|
|
training_id: training_id
|
|
},
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
|
|
|
|
$("#training_id").val(data.training_master_id);
|
|
$("#training_name").val(data.training_name);
|
|
$("#training_description").val(data.description);
|
|
$("#training_duration").val(data.durations);
|
|
|
|
$("#training_mode_id").val(data.mode_of_training);
|
|
$('#training_mode_id').trigger('chosen:updated');
|
|
$("#training_type_id").val(data.type_of_training);
|
|
$('#training_type_id').trigger('chosen:updated');
|
|
|
|
if (data.key_health_param_sections != null) {
|
|
var key_health_param_section = data.key_health_param_sections
|
|
dataarray = key_health_param_section.split(",");
|
|
$("#key_health_param_sections").val(dataarray);
|
|
$('#key_health_param_sections').trigger('chosen:updated');
|
|
}
|
|
|
|
$('#modal-add-training').modal("show");
|
|
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Populating Program Details');
|
|
return;
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
function delete_training(training_id) {
|
|
|
|
BootstrapDialog.confirm('Are you sure to delete Program Details?', function(result) {
|
|
if (result) {
|
|
$.ajax({
|
|
url: 'delete_training_details.php',
|
|
type: "POST",
|
|
data: {
|
|
training_id: training_id
|
|
},
|
|
success: function(data) {
|
|
if (data.indexOf("SUCCESS") != -1) {
|
|
BootstrapDialog.alert('Program Details Deleted Successfully.');
|
|
$("#flex1").flexReload();
|
|
|
|
} else {
|
|
BootstrapDialog.alert('Error Deleting Program Details');
|
|
}
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Deleting Program Details');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
function save_training() {
|
|
//alert(" gfgdgdg");
|
|
|
|
$.ajax({
|
|
url: 'training_form_script.php',
|
|
type: "POST",
|
|
data: $("#training_form").serialize(),
|
|
|
|
success: function(data) {
|
|
BootstrapDialog.alert('Program Saved Successfully.');
|
|
$("#flex1").flexReload();
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Saving Program Form');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
|
|
|
|
}
|
|
</script>
|
|
|
|
|
|
<?php include('form/training_form.php'); ?>
|
|
<?php include('common_ace.php'); ?>
|
|
<?php include('techsyn_footer.php'); ?>
|