269 lines
7.8 KiB
PHP
269 lines
7.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">CSR PROGRAM's 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_csr">
|
||
|
<div id="flex1" style="width:100%">
|
||
|
</div>
|
||
|
<input type="hidden" name="flex_csr_id" id="flex_csr_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: 'csr_pro_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: 'PROGRAM Name',
|
||
|
name: 'program_name',
|
||
|
width: w * .2,
|
||
|
sortable: true,
|
||
|
align: 'left'
|
||
|
},
|
||
|
{
|
||
|
display: 'program details',
|
||
|
name: 'program_details',
|
||
|
width: w * .2,
|
||
|
sortable: true,
|
||
|
align: 'left'
|
||
|
},
|
||
|
{
|
||
|
display: 'program 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: 'coordinator name',
|
||
|
name: 'coordinator_name',
|
||
|
width: w * .2,
|
||
|
sortable: true,
|
||
|
align: 'left'
|
||
|
},
|
||
|
{
|
||
|
display: 'sub coordinator name',
|
||
|
name: 'sub_coordinator_name',
|
||
|
width: w * .2,
|
||
|
sortable: true,
|
||
|
align: 'left'
|
||
|
},
|
||
|
{
|
||
|
display: 'total participate',
|
||
|
name: 'total_participate',
|
||
|
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
|
||
|
},
|
||
|
{
|
||
|
separator: true
|
||
|
},
|
||
|
{
|
||
|
name: 'PDF',
|
||
|
bclass: 'print',
|
||
|
onpress: pdf
|
||
|
},
|
||
|
{
|
||
|
separator: true
|
||
|
},
|
||
|
{
|
||
|
name: 'Excel',
|
||
|
bclass: 'print_excel',
|
||
|
onpress: excel
|
||
|
},
|
||
|
{
|
||
|
separator: true
|
||
|
},
|
||
|
{
|
||
|
name: 'Download Template',
|
||
|
bclass: 'print_excel',
|
||
|
onpress: download_template
|
||
|
},
|
||
|
{
|
||
|
separator: true
|
||
|
},
|
||
|
{
|
||
|
name: 'Upload Excel',
|
||
|
bclass: 'print_excel',
|
||
|
onpress: upload_excel
|
||
|
},
|
||
|
{
|
||
|
separator: true
|
||
|
}
|
||
|
|
||
|
],
|
||
|
searchitems: [{
|
||
|
display: 'PROGRAM Name',
|
||
|
name: 'program_name'
|
||
|
},
|
||
|
{
|
||
|
display: 'program location',
|
||
|
name: 'location'
|
||
|
},
|
||
|
{
|
||
|
display: 'coordinator name',
|
||
|
name: 'coordinator_name'
|
||
|
},
|
||
|
],
|
||
|
sortname: "csr_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 download_template() {
|
||
|
window.location = 'templates/csr pro upload template.xls';
|
||
|
}
|
||
|
|
||
|
|
||
|
function upload_excel() {
|
||
|
window.location = 'upload_excel_csr.php';
|
||
|
}
|
||
|
|
||
|
function add() {
|
||
|
window.location = 'csr_form.php';
|
||
|
}
|
||
|
|
||
|
function pdf() {
|
||
|
window.open('csr_pdf.php');
|
||
|
}
|
||
|
|
||
|
function excel() {
|
||
|
window.location = 'csr_excel.php';
|
||
|
}
|
||
|
|
||
|
|
||
|
function pdf_csr(csr_id) {
|
||
|
$("#flex_csr_id").val(csr_id);
|
||
|
$("#flex_form_csr").attr('method', 'POST');
|
||
|
$("#flex_form_csr").attr('target', '_blank');
|
||
|
$("#flex_form_csr").attr('action', 'csr_program_pdf.php');
|
||
|
$("#flex_form_csr").submit();
|
||
|
}
|
||
|
|
||
|
|
||
|
function delete_csr(csr_id) {
|
||
|
$("#flex_csr_id").val(csr_id);
|
||
|
BootstrapDialog.confirm('Are you sure to delete the Csr Program?', function(result) {
|
||
|
if (result) {
|
||
|
$.ajax({
|
||
|
url: 'delete_csr.php',
|
||
|
type: "POST",
|
||
|
data: $("#flex_form_csr").serialize(),
|
||
|
success: function(data) {
|
||
|
if (data.indexOf("SUCCESS") != -1) {
|
||
|
BootstrapDialog.alert('Csr Program Deleted Successfully.');
|
||
|
$("#flex1").flexReload();
|
||
|
|
||
|
} else {
|
||
|
BootstrapDialog.alert('Error Deleting Csr Program');
|
||
|
}
|
||
|
return;
|
||
|
},
|
||
|
error: function(data) {
|
||
|
BootstrapDialog.alert('Error Deleting Csr Program');
|
||
|
return;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
var csr_id = "";
|
||
|
|
||
|
function open_csr(csr_id, action) {
|
||
|
window.location = 'csr_form.php?csr_id=' + csr_id + '';
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<?php include('techsyn_footer.php'); ?>
|