Server : Apache System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 User : vapecompany ( 2719) PHP Version : 7.4.33 Disable Function : NONE Directory : /home/vapecompany/demo.vapecompany.com.bd/storage/framework/views/ |
Upload File : |
<?php $__env->startSection('content'); ?> <style type="text/css"> .dataTables_length{ margin-top: 10px; } </style> <!-- ============================================================== --> <!-- Page wrapper --> <!-- ============================================================== --> <div class="page-wrapper"> <!-- ============================================================== --> <!-- Bread crumb and right sidebar toggle --> <!-- ============================================================== --> <div class="page-breadcrumb"> <div class="row"> <div class="col-5 align-self-center"> <h4 class="page-title">Category List</h4> <!-- <div class="d-flex align-items-center"> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">Home</a></li> <li class="breadcrumb-item active" aria-current="page">Library</li> </ol> </nav> </div> --> </div> </div> </div> <!-- ============================================================== --> <!-- End Bread crumb and right sidebar toggle --> <!-- ============================================================== --> <!-- ============================================================== --> <!-- Container fluid --> <!-- ============================================================== --> <div class="container-fluid"> <!-- ============================================================== --> <!-- Start Page Content --> <!-- ============================================================== --> <div class="row"> <div class="col-12"> <!-- Column --> <div class="card"> <div class="card-body table-responsive-sm table-responsive-md"> <!-- <h4 class="card-title">Table Responsive </h4> <h6 class="card-subtitle">Data table example</h6> --> <div class="row"> <div class="col-lg-3 mb-lg-0 mb-6"> <label>Category ID:</label> <input type="text" class="form-control datatable-input" placeholder="Enter Category ID" data-col-index="0" /> </div> <div class="col-lg-3 mb-lg-0 mb-6"> <label>Category Name:</label> <input type="text" class="form-control datatable-input" placeholder="Enter Category Name" data-col-index="1" /> </div> <div class="col-lg-3 mb-lg-0 mb-6"> <label>Status:</label> <select class="form-control datatable-input" data-col-index="2"> <option value="">Select</option> <option value="1">Active</option> <option value="0">In Active</option> </select> </div> </div> <div class="row mt-8" style="margin-top: 15px;text-align: center;"> <div class="col-lg-12"> <button class="btn btn-primary btn-primary--icon" id="kt_search"> <span> <i class="la la-search"></i> <span>Search</span> </span> </button> <button class="btn btn-secondary btn-secondary--icon" id="kt_reset"> <span> <i class="la la-close"></i> <span>Reset</span> </span> </button></div> </div> <table id="dtables" class="table table-striped table-bordered dt-responsive nowrap" style="width:100%"> <thead> <tr> <th>Category ID</th> <th>Category Name</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div> </div> <!-- ============================================================== --> <!-- End PAge Content --> <!-- ============================================================== --> <!-- ============================================================== --> <!-- Right sidebar --> <!-- ============================================================== --> <!-- .right-sidebar --> <!-- ============================================================== --> <!-- End Right sidebar --> <!-- ============================================================== --> </div> <!-- ============================================================== --> <!-- End Container fluid --> <?php $__env->stopSection(); ?> <?php $__env->startSection('script'); ?> <script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/1.10.22/js/dataTables.bootstrap4.min.js"></script> <script src="https://cdn.datatables.net/responsive/2.2.6/js/dataTables.responsive.min.js"></script> <script src="https://cdn.datatables.net/responsive/2.2.6/js/responsive.bootstrap4.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.bootstrap4.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.print.min.js"></script> <script src=" https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script> <script src="<?php echo e(url('public/backend/js/buttons.html5.js')); ?>"></script> <!--<script src="https://cdn.datatables.net/buttons/1.2.3/js/buttons.html5.js"></script>--> <script type="text/javascript"> $(document).ready(function() { var datas=""; $('#dtables tfoot th').each( function () { var title = $(this).text(); $(this).html( '<input type="text" placeholder="Search '+title+'" />' ); } ); var ts= $('#dtables').DataTable({ "lengthMenu": [[10, 50, 100,250,500,1000,-1], [10, 50, 100,250,500,1000,'All']], responsive: true, orderCellsTop: true, dom: 'Blfrtip', scrollX: true, buttons: [ { extend: 'excel', title: 'Category List', exportOptions: { columns: [ 0, 1, 2] } ,customize: function (xlsx) { var sheet = xlsx.xl.worksheets['sheet1.xml']; // console.log(sheet); var colRange = sheet.getElementsByTagName('col').length - 1; //var colRange = createCellPos( lastCol ) + '1'; var numrows = 5; var clR = $('row', sheet); //update Row clR.each(function () { var attr = $(this).attr('r'); var ind = parseInt(attr); ind = ind + numrows; $(this).attr("r",ind); }); // Create row before data $('row c ', sheet).each(function () { var attr = $(this).attr('r'); var pre = attr.substring(0, 1); var ind = parseInt(attr.substring(1, attr.length)); ind = ind + numrows; $(this).attr("r", pre + ind); }); function Addrow(index,data, colRange, sheet) { msg='<row r="'+index+'">' for(i=0;i<data.length;i++){ var key=data[i].key; var value=data[i].value; var style=data[i].style; mergeCells( index, colRange, sheet ); msg += '<c t="inlineStr" s="'+ style +'" r="' + key + index + '">'; msg += '<is>'; msg += '<t>'+value+'</t>'; msg+= '</is>'; msg+='</c>'; } msg += '</row>'; return msg; } var mergeCells = function ( row, colspan, sheet ) { //console.log(sheet); var mergeCells = $('mergeCells', sheet); //console.log(mergeCells); mergeCells[0].appendChild( _createNode( sheet, 'mergeCell', { attr: { ref: 'A'+row+':'+createCellPos(colspan)+row } } ) ); //mergeCells.attr( 'count', mergeCells.attr( 'count' )+1 ); //$('row:eq('+(row-1)+') c', sheet).attr( 's', '51' ); // centre }; function createCellPos( n ){ var ordA = 'A'.charCodeAt(0); var ordZ = 'Z'.charCodeAt(0); var len = ordZ - ordA + 1; var s = ""; while( n >= 0 ) { s = String.fromCharCode(n % len + ordA) + s; n = Math.floor(n / len) - 1; } return s; } function _createNode( doc, nodeName, opts ) { var tempNode = doc.createElement( nodeName ); if ( opts ) { if ( opts.attr ) { $(tempNode).attr( opts.attr ); } if ( opts.children ) { $.each( opts.children, function ( key, value ) { tempNode.appendChild( value ); } ); } if ( opts.text !== null && opts.text !== undefined ) { tempNode.appendChild( doc.createTextNode( opts.text ) ); } } return tempNode; } //insert var r1 = Addrow(1, [{ key: 'A', value: '<?php echo e($companyInfo ? $companyInfo->company_name: "MAKTEL LIMITED"); ?>', style: '51' }], colRange, sheet); var r2 = Addrow(2, [{ key: 'A', value: '<?php echo e($companyInfo ? $companyInfo->company_address : "House-277(Level-4),Lane-4,Baridhara DOHS,Dhaka-1206."); ?>', style: '51' }], colRange, sheet); var r3 = Addrow(3, [{ key: 'A', value: 'Hotline: +<?php echo e($companyInfo ? $companyInfo->company_phone: "88 01844241530"); ?>', style: '51' }], colRange, sheet); var r4 = Addrow(4, [{ key: 'A', value: 'Email: <?php echo e($companyInfo ? $companyInfo->company_email : "info@maktel.com.bd"); ?>', style: '51' }], colRange, sheet); var r5 = Addrow(5, [{ key: 'A', value: 'Web: <?php echo e($companyInfo ? $companyInfo->company_website : "www.maktel.com.bd"); ?>', style: '51' }], colRange, sheet); var mergeCells = $('mergeCells', sheet); //console.log(mergeCells); mergeCells[0].appendChild( _createNode( sheet, 'mergeCell', { attr: { ref: 'A6:D6' } } ) ); sheet.childNodes[0].childNodes[1].innerHTML = r1 + r2+ r3+ r4+ r5+ sheet.childNodes[0].childNodes[1].innerHTML; } }, { extend: 'print', exportOptions: { columns: [ 0, 1, 2], }, //autoPrint: false, title: '', customize: function (doc) { var now = new Date(); var jsDate = now.getDate()+'-'+(now.getMonth()+1)+'-'+now.getFullYear(); $(doc.document.body) .prepend('<img style="position:absolute; top:10; left:0;width:200px" src="http://localhost/maktel/public/images/text_logo.png">') .prepend('<div style="text-align:center"><h2 class="name"><?php echo e($companyInfo ? $companyInfo->company_name: "MAKTEL LIMITED"); ?></h2><div><?php echo e($companyInfo ? $companyInfo->company_address : "House-277(Level-4),Lane-4,Baridhara DOHS,Dhaka-1206."); ?></div><div>Hotline:+<?php echo e($companyInfo ? $companyInfo->company_phone: "88 01844241530"); ?></div><div>Email:<?php echo e($companyInfo ? $companyInfo->company_email : "info@maktel.com.bd"); ?></div><div>Web:<?php echo e($companyInfo ? $companyInfo->company_website : "www.maktel.com.bd"); ?></div><div>Title: Category List</div></div>') // .prepend('<div style="position:absolute; bottom:20; left:100;">Pagina '+page.toString()+' of '+pages.toString()+'</div>'); $(doc.document.body).find('table').css('text-align','center'); // .removeClass('dataTable') // .css('font-size','12px') // .css('margin-top','65px') // .css('margin-bottom','60px') $(doc.document.body).find('th').each(function(index){ $(this).css('font-size','18px'); $(this).css('color','#fff'); $(this).css('background-color','blue'); }); }, }, ], initComplete: function () { // Apply the search var ethis=this; $('#kt_search').on('click',function(){ event.preventDefault(); $( '.datatable-input').each(function(){ //if(this.value != ""){ var t=$(this).data("col-index"); var that = ethis.api().columns(t); if ( that.search() !== this.value ) { that .search( this.value ); } // } }); ethis.api().table().draw(); }); $('#kt_reset').on('click',function(){ event.preventDefault(); $( '.datatable-input').each(function(){ $(this).val(''); var t=$(this).data("col-index"); var that = ethis.api().columns(t); if ( that.search() !== this.value ) { that .search( ""); } }); ethis.api().table().draw(); }); }, processing: true, serverSide: true, ajax: { "url": "<?php echo e(route('admin/all_category')); ?>", "type": "POST", complete: function (data) { console.log(data); }, error: function (data) { //console.log(data); }, }, "pageLength": 10, columns: [ { data: 'category_id' }, { data: 'category_name' }, { data: 'status' }, { data: 'Action' }, ] }); function getBase64FromImageUrl(url) { var img = new Image(); img.crossOrigin = "anonymous"; img.src = "<?php echo e($companyInfo ? $companyInfo->company_logo ? url('public/images/company/'.$companyInfo->company_logo): url('/public/images/text_logo.png') : url('/public/images/text_logo.png')); ?>"; img.onload = function () { var canvas = document.createElement("canvas"); canvas.width =this.width; canvas.height =this.height; var ctx = canvas.getContext("2d"); ctx.drawImage(this, 0, 0); //console.log(this.src); var dataURL = canvas.toDataURL("image/png"); var res= dataURL.replace(/^data:image\/(png|jpg);base64,/, "data:image/jpeg;base64,/"); //console.log(dataURL); datas=dataURL; //resultTable(); return res; }; } getBase64FromImageUrl(''); }); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('backend.layout.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/vapecompany/Demo.vapecompany.com.bd/resources/views/backend/category/index.blade.php ENDPATH**/ ?>