250 lines
7.7 KiB
PHP
250 lines
7.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'); ?>
|
||
|
|
|
||
|
|
<!--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 Management</li>
|
||
|
|
<li class="active">Yearly Budget Plan</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_activity_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: 'Year',
|
||
|
|
name: 'year',
|
||
|
|
width: w * .06,
|
||
|
|
sortable: true,
|
||
|
|
align: 'left'
|
||
|
|
},
|
||
|
|
// {
|
||
|
|
// display: 'Start Date',
|
||
|
|
// name: 'start_date_time',
|
||
|
|
// width: w * .1,
|
||
|
|
// sortable: true,
|
||
|
|
// align: 'left'
|
||
|
|
// },
|
||
|
|
// {
|
||
|
|
// display: 'End Date',
|
||
|
|
// name: 'end_date_time',
|
||
|
|
// width: w * .1,
|
||
|
|
// sortable: true,
|
||
|
|
// align: 'left'
|
||
|
|
// },
|
||
|
|
{
|
||
|
|
display: ' Total Budget',
|
||
|
|
name: 'total_budget',
|
||
|
|
width: w * .1,
|
||
|
|
sortable: true,
|
||
|
|
align: 'left'
|
||
|
|
},
|
||
|
|
|
||
|
|
{
|
||
|
|
display: 'Target Beneficiary Count',
|
||
|
|
name: 'target_beneficiary_count',
|
||
|
|
width: w * .2,
|
||
|
|
sortable: true,
|
||
|
|
align: 'left'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
display: 'Remarks',
|
||
|
|
name: 'remarks',
|
||
|
|
width: w * .1,
|
||
|
|
sortable: true,
|
||
|
|
align: 'left'
|
||
|
|
},
|
||
|
|
|
||
|
|
{
|
||
|
|
display: 'Status',
|
||
|
|
name: 'status',
|
||
|
|
width: w * .1,
|
||
|
|
sortable: true,
|
||
|
|
align: 'left'
|
||
|
|
},
|
||
|
|
|
||
|
|
|
||
|
|
{
|
||
|
|
display: 'Creater',
|
||
|
|
name: 'creater',
|
||
|
|
width: w * .2,
|
||
|
|
sortable: true,
|
||
|
|
align: 'left'
|
||
|
|
},
|
||
|
|
|
||
|
|
],
|
||
|
|
buttons: [
|
||
|
|
<?php if($_SESSION['RoleCode']=='CPU' || $_SESSION['RoleCode']=='AHEAD' ){?>
|
||
|
|
{
|
||
|
|
name: 'Add',
|
||
|
|
bclass: 'add',
|
||
|
|
onpress: add
|
||
|
|
},
|
||
|
|
|
||
|
|
{
|
||
|
|
separator: true
|
||
|
|
},
|
||
|
|
<?php }?>
|
||
|
|
{
|
||
|
|
name: 'PDF',
|
||
|
|
bclass: 'print',
|
||
|
|
onpress: pdf
|
||
|
|
},
|
||
|
|
{
|
||
|
|
separator: true
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: 'Excel',
|
||
|
|
bclass: 'print_excel',
|
||
|
|
onpress: excel
|
||
|
|
},
|
||
|
|
{
|
||
|
|
separator: true
|
||
|
|
}
|
||
|
|
],
|
||
|
|
searchitems: [{
|
||
|
|
display: 'Year',
|
||
|
|
name: 'year'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
display: 'Remarks',
|
||
|
|
name: 'remarks'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
display: 'Status',
|
||
|
|
name: 'status'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
display: 'Total Budget',
|
||
|
|
name: 'total_budget'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
display: 'Total Beneficiary Count',
|
||
|
|
name: 'target_beneficiary_count'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
display: 'Creater',
|
||
|
|
name: 'creater'
|
||
|
|
},
|
||
|
|
],
|
||
|
|
sortname: "year",
|
||
|
|
sortorder: "desc",
|
||
|
|
usepager: true, //pagination
|
||
|
|
useRp: true,
|
||
|
|
rp: 50, //records per page
|
||
|
|
showTableToggleBtn: false, //toggle button for the whole table
|
||
|
|
resizable: true,
|
||
|
|
height: h,
|
||
|
|
singleSelect: true
|
||
|
|
});
|
||
|
|
});
|
||
|
|
|
||
|
|
function download_template() {
|
||
|
|
window.location = 'templates/csr_activity_upload_template.xls';
|
||
|
|
}
|
||
|
|
|
||
|
|
function upload_excel() {
|
||
|
|
window.location = 'upload_excel_csr.php';
|
||
|
|
}
|
||
|
|
|
||
|
|
function add() {
|
||
|
|
window.location = 'program_target_setter.php';
|
||
|
|
}
|
||
|
|
|
||
|
|
function pdf() {
|
||
|
|
window.open('csr_pro_activity_pdf.php');
|
||
|
|
}
|
||
|
|
|
||
|
|
function excel() {
|
||
|
|
window.location = 'csr_pro_activity_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_activity_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 Plan?', function(result) {
|
||
|
|
if (result) {
|
||
|
|
$.ajax({
|
||
|
|
url: 'delete_activity_csr.php',
|
||
|
|
type: "POST",
|
||
|
|
data: $("#flex_form_csr").serialize(),
|
||
|
|
success: function(data) {
|
||
|
|
if (data.indexOf("SUCCESS") != -1) {
|
||
|
|
BootstrapDialog.alert('Plan Deleted Successfully.');
|
||
|
|
$("#flex1").flexReload();
|
||
|
|
} else {
|
||
|
|
BootstrapDialog.alert('Error Deleting Activity');
|
||
|
|
}
|
||
|
|
return;
|
||
|
|
},
|
||
|
|
error: function(data) {
|
||
|
|
BootstrapDialog.alert('Error Deleting Activity');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
var csr_id = "";
|
||
|
|
|
||
|
|
function open_csr(csr_id, action) {
|
||
|
|
window.location = 'program_target_setter.php?csr_id=' + csr_id + '';
|
||
|
|
}
|
||
|
|
function open_ach_csr(csr_id, action) {
|
||
|
|
window.location = 'program_achievement_setter.php?csr_id=' + csr_id + '';
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<?php include('techsyn_footer.php'); ?>
|