JezK
Edit File: quotelist.php
<?php include("app/checkSession.php"); include("header.php"); // include("app/adminObj.php"); if(!isset($_SESSION['customer_user_id'])){ $customerObj->redirect('login.php'); } // $quote_list=$customerObj->QuoteList(); if (isset($_POST['btn_submit'])) { $customerObj->db->query("UPDATE uflexit_request_quote SET expected_rate='".$_POST['expected_rate']."', whadmin_description='".$_POST['whadmin_description']."' WHERE quotation_id=".$_POST['quotation_id']); $customerObj->db->query("INSERT INTO uflexit_request_quote_track (quotation_id,admin_id,change_datetime,expected_rate,quotation_status,closed_status,whadmin_description,customer_description,whadmin_id) VALUES(".$_POST['quotation_id'].",".$_SESSION['customer_user_id'].",'".date("Y-m-d H:i:s")."',".$_POST['expected_rate'].",".$_POST['quotation_status'].",1,'".$_POST['whadmin_description']."','',".$_SESSION['customer_user_id'].")"); $customerObj->setFlashMessage('Status updated successfully!','success'); $customerObj->redirect('quotelist.php'); } // print_r($_SESSION); ?> <!-- <link href="css/simplePagination.css" type="text/css" rel="stylesheet"/> --> <style> /* body{ display:flex !important; flex-wrap:wrap !important; } */ .table thead th{ min-width: 138px; } /* aside.left-panel{ width: 20% !important; } .right-panel{ width: 80% !important; } */ #export{ margin-bottom: 0px !important; } td.sorting_1 a { color: #212529 !important; } table.dataTable tbody th, table.dataTable tbody td { padding: 15px 18px !important; } </style> <div class="container first-position"> <div class="container mt-3 position-2"> <div class="row px-md-4 px-0 "> <div class="tophead col-md-4"> <h6><?php echo $lang['QUOTATION_LIST'];?></h6> </div> <br/> <div class="col-md-4"> </div> <div class="col-md-4"> <!-- <div class="input-group search-button mb-2" style="margin-right:10px;"> <input class="form-control border-right-0 border align-self-right border-rad-left" type="text" value="" id="myInput"> <span class="input-group-append"> <button class="btn btn-outline-secondary border-left-0 border border-rad-right" type="button"> <i class="fa fa-search"></i> </button> </span> </div> --> </div> </div> </div> <div class="container "> <div class=" p-md-4 p-0 myquotation-table table-responsive"> <?php echo $customerObj->flashMessage();?> <table id="example" class="table table-borderless dataTable bg-white tbl-border" style="width:100%"> <thead> <tr> <!-- <th>Warehouse Name</th> <th>Warehouse ID</th> <th>Customer Name</th> <th>Customer Type</th> <th>Response status</th> <th>Response date</th> <th>Closed status</th> <th>Actions</th> --> <th><?php echo $lang['WAREHOUSE_NAME'];?></th> <th><?php echo $lang['QUOTATION_ID'];?></th> <th><?php echo $lang['CUSTOMER_NAME'];?></th> <th><?php echo $lang['CUSTOMER_TYPE'];?></th> <th> <?php echo $lang['STATUS'];?></th> <th><?php echo $lang['ACTION'];?></th> </tr> </thead> <tbody> </tbody> </table> </div> </div> <div class="container position-relative"> <div class="row export_csv button-alignment"> <div class="col-md-3 offset-md-11 button-alignment "> <a id="export" class="btn btn-primary" href="export_quotation_list.php?ExportToCSV=Yes"><i class="fa fa-download"></i><span class="pl-2"> <?php echo $lang['EXPORT_XLSX'];?></span></a> </div> </div> </div> </div> <!-- footer --> <?php include("footer.php"); ?> <script> let $ =jQuery; // $(document).ready(function() { // $('#example').DataTable( { // language: { search: '', searchPlaceholder: "Search", // paginate: {previous: 'Prev',next: 'Next'}, "sLengthMenu": "Show entries _MENU_" }, // "processing": true, // "dataSrc": "", // "sDom": 'Rfrtlip', // // "sDom": 'Rlfrtlip', // // "serverSide": true, // // dom: 'Bfrtip', // buttons: [ // { // extend: 'csvHtml5', // text: '<i class="fa fa-download p-1"></i>Export to csv', // titleAttr: 'CSV' // }, // ] // } ); // } ); jQuery(document).ready(function() { jQuery('#example').DataTable( { // language: { search: '', searchPlaceholder: "Search", // paginate: {previous: 'Prev',next: 'Next'}, // "processing": true, // "dataSrc": "", // // "sDom": 'Bfrtip', // "Dom": 'Rfrtlip', // // "serverSide": true, // // dom: 'Bfrtip', // buttons: [ // { // extend: 'csvHtml5', // text: '<i class="fa fa-download p-1"></i>Export to csv', // titleAttr: 'CSV' // }, // ] "processing": true, "dataSrc": "", "dom": 'Bfrtip', "dom": 'Rlfrtlip', language: { search: '', searchPlaceholder: "<?php echo $lang['SEARCH']?>", paginate: {previous: '<?php echo $lang['PREV'];?>',next:'<?php echo $lang['NEXT'];?>'}}, "pagingType": "full_numbers", "bProcessing": true, "bServerSide": true, "sAjaxSource": "app/myquotation-ajax.php", // "ordering": false, "fnDrawCallback": function( oSettings ) { rowCount=oSettings.json.iTotalRecords; if(rowCount<1){ $("#export").addClass("d-none") } }, "aoColumns": [{ mData: 'warehouse_name' } , { mData: 'quotation_id' } , { mData: 'customer_name' }, { mData: 'customer_type' }, { mData: 'closed_status' }, { mData: 'action' } ] } ); // jQuery('#quote_form').validate(); } ); </script> <style> button.dt-button.buttons-csv.buttons-html5 { border-radius: 7px !important; background-color: #3663c8 !important; border-color: #3663c8 !important; color: white !important; text-transform: uppercase; font-weight: bold; } </style>