MINI
C:
/
xampp
/
htdocs
/
hnj
/
htdocs
/
htdocs
/
.backend
/
master
/
Upload File:
files >> C:/xampp/htdocs/hnj/htdocs/htdocs/.backend/master/aplikasi.php
<?php defined( '_LANGSUNG' ) or die(''); CekAkses('master'); CekAkses('aplikasi'); function MainContent () { ?> <table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%"> <thead> <tr> <th align="center"><strong>ID</strong></th> <th align="center"><strong>WAKTU BACKUP</strong></th> <th align="center"><strong>NAMA FILE</strong></th> <th align="center"><strong>OPERATOR</strong></th> </tr> </thead> <tbody> </tbody> <tfoot> <tr> <th><input name="search_0" type="text" class="search_init" value="ID" size="10" /></th> <th><input name="search_1" type="text" class="search_init" value="Username" size="10" /></th> <th><input name="search_2" type="text" class="search_init" value="Name" size="10" /></th> <th><input name="search_3" type="text" class="search_init" value="Level" size="10" /></th> </tr> </tfoot> </table> <?php } function TCss(){ ?> <link rel="stylesheet" type="text/css" href="/component/validationEngine/validationEngine.jquery.css"/> <link rel="stylesheet" type="text/css" href="/component/DataTables/datatables.css"/> <?php } function Fjs(){ ?> <script src="/component/DataTables/dataTables.js" type="text/javascript"></script> <script src="/component/accounting/accounting.js" type="text/javascript"></script> <script src="/component/jquery-ui/jquery.ui.min.js" type="text/javascript"></script> <script src="/component/chained/jquery.chained.js" type="text/javascript"></script> <script src="/component/validationEngine/jquery.validationEngine.js"></script> <script src="/component/validationEngine/jquery.validationEngine-id.js"></script> <script type="text/javascript" src="/component/js/notify.js"></script> <?php } function FScript() { ?> <script type="text/javascript" language="javascript" class="init"> var hPop = 350, wPop = 450, ModName = 'aplikasi'; $(document).ready(function() { $('#example tfoot th').each( function () { var title = $(this).text(); $(this).html( '<input type="text" placeholder="'+title+'" />' ); }); var oTable = $('#example').DataTable({ "paging":true, //10 "pagingType": "full_numbers", //10 stateSave: true, //10 "processing": true, //10 select: { style: 'single' }, "serverSide": true, "ajax": { "url": "/index.php?jsonsources=master&subsources="+ModName+"-crud", "type": "POST", "data": { "act":"read-data" } }, "scrollX": false, // "scrollY": 400, "columnDefs": [ {className: "sembunyi", "targets": [0]}, // {className: "tengah", "targets": [2,3,7,8]} ], lengthMenu: [ [ 5, 10, 25, 50, -1 ], [ '5 rows','10 rows', '25 rows', '50 rows', 'Show all' ] ], dom: '<"pull-left"B><"pull-right"l>tr<"pull-left"i><"pull-right"p>', buttons: [ //ADD DATA { text: '<i class="fa fa-plus"></i> <u>A</u>DD NEW BACKUP', className: 'btn-sm btn-success', key: { altKey: false, key: 'a', }, action: function ( e, dt, node, config ){ $.ajax({ type:"POST", url:"/index.php?jsonsources=master&subsources="+ModName+"-crud", data: "act=backup-cek", success: function(data){ if(data == 'sukses'){ var datasave = $("#add").serializeArray(); datasave.push({name: 'act', value: 'backup'}); $.ajax({ type:"POST", url:"/index.php?jsonsources=master&subsources="+ModName+"-crud", data: datasave, success: function(data){ if (data==="sukses"){ oTable.draw(false); $.notify({ message: "<strong>Success add new data!</strong>", status: "success", timeout: 1000, pos: 'center-center', zIndex: 10400, }); } else{ $.notify({ message: "<strong>"+data+"</strong>", status: "error", timeout: 1000, pos: 'center-center', zIndex: 10400, }); } } }); } else{ $.notify({ message: "<strong>"+data+"</strong>", status: "error", timeout: 1000, pos: 'center-center', zIndex: 10400, }); } }, }); }, enabled: true }, //DOWNLOAD { text: '<i class="fa fa-download"></i> <u>D</u>OWNLOAD', className: 'btn-sm btn-success', key: { altKey: false, key: 'd', }, action: function ( e, dt, node, config ){ var yData = dt.row({selected: true}).data(); $.ajax({ type:"POST", url:"/index.php?jsonsources=master&subsources="+ModName+"-crud", data: "act=download-cek&id="+yData[0], success: function(data){ if(data == 'sukses'){ $.ajax({ type:"POST", url:"/index.php?jsonsources=master&subsources="+ModName+"-crud", data: "act=download", success: function(data){ var json = $.parseJSON(data); if(json.respon == 'sukses') { window.location=json.linkdownload; } else { $.notify( { message: "<strong>"+data+"</strong>", status: "error", timeout: 1000, pos: 'center-center', zIndex: 10400, }); } } }); } else{ $.notify( { message: "<strong>"+data+"</strong>", status: "error", timeout: 1000, pos: 'center-center', zIndex: 10400, }); } } }); }, enabled: true }, //RESET FILTER { text: '<i class="fa fa-refresh"></i>', className: 'btn-sm btn-info', key: { altKey: false, key: 'r', }, action: function ( e, dt, node, config ) { function fnResetAllFilters() { oTable.columns().eq( 0 ).each( function ( colIdx ) { $( 'input', oTable.column( colIdx ).footer() ).val(''); oTable.columns(colIdx).search( '', true ); } ) oTable.search( '', true ).draw(); } fnResetAllFilters(); } }, ], language: { buttons: { colvis: 'Atur Kolom' } } }); oTable.columns().every( function () { var that = this; $( 'input', this.footer() ).on( 'keyup change', function (e) { if ( that.search() !== this.value && e.keyCode == 13) { that .search( this.value ) .draw(); } }); }); }); </script> <?php } ?>
Copyright ©2021 || Defacer Indonesia