ESH/inter_list.php
2024-10-23 18:28:06 +05:30

191 lines
5.7 KiB
PHP

<?php include('techsyn_header.php'); ?>
<!-- Main Content Container for sid bar d 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">Interpretation</li>
</ul>
</div>
<!-- End of breadcrumb -->
<div class="page-content">
<form name="f1" method="post" action="" id="flex_interpretation_form">
<div id="flex1" style="width:100%">
</div>
<input type="hidden" name="id" id="id" />
</form>
<form name="export_form" method="post" id="export_form" action="">
<input type="hidden" name="pdf_action" id="pdf_action" value="pdf_procurement.php" />
<input type="hidden" name="excel_action" id="excel_action" value="excel_procurement.php" />
</form>
</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: 'interpretation_script.php',
dataType: 'json',
colModel: [{
display: '',
name: '',
width: w * .08,
sortable: false,
align: 'left'
},
{
display: 'Sr',
name: 'count',
width: w * .04,
sortable: false,
align: 'left'
},
{
display: 'Header',
name: 'interpretation_header',
width: w * .10,
sortable: true,
align: 'left'
},
{
display: 'Key',
name: 'interpretation_key',
width: w * .20,
sortable: true,
align: 'left'
},
{
display: 'Value',
name: 'interpretation_value',
width: w * .30,
sortable: true,
align: 'left'
},
],
buttons: [
{
name: 'Add',
bclass: 'add',
onpress: add
}
],
searchitems: [
// {display: 'Parent ID', name: 'parent_id', isdefault: true},
{
display: 'Header',
name: 'interpretation_header'
},
// {
// display: 'Procurement_date(d-m-y)',
// name: 'procurement_date'
// },
// {
// display: 'Item ',
// name: 'item'
// },
// {
// display: 'Expiry Date ',
// name: 'item'
// },
// {
// display: 'procurement Date Between (dd/mm/yyyy-dd/mm/yyyy)',
// name: 'procurement_date_between'
// }, {
// display: 'Item Remarks ',
// name: 'remarks'
// }
],
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 open_inter(id, action) {
if (action == "V") {
$(".save_button").hide();
} else {
$(".save_button").show();
}
$("#id").val(id);
$("#flex_interpretation_form").attr('method', 'POST');
$("#flex_interpretation_form").attr('action', 'inter.php');
$("#flex_interpretation_form").submit();
}
function add() {
location.href = "inter.php";
}
function delete_inter(id) {
$("#id").val(id);
BootstrapDialog.confirm('Are you sure to delete?', function(result) {
if (result) {
$.ajax({
url: 'delete_inter.php',
type: "POST",
data: $("#flex_interpretation_form").serialize(),
success: function(data) {
if (data.indexOf("SUCCESS") != -1) {
BootstrapDialog.alert('Deleted Successfully.');
$("#flex1").flexReload();
} else {
BootstrapDialog.alert('Error Deleting');
}
return;
},
error: function(data) {
BootstrapDialog.alert('Error Deleting');
return;
}
});
}
});
}
</script>
<?php include('techsyn_footer.php'); ?>