JezK
Edit File: companies.php
<?php include_once("./app/checkSession.php"); if(empty($_SESSION['user_id'])&& $_SESSION['user_id']=='') { header("Location: ../owner_login.php"); } if($_SESSION['role'] != 1) { header("Location: dashboard.php"); } include("header.php"); ?> <div class="container px-md-5 px-4"> <div class="row px-2 px-md-2 align-items-center"> <div class="col-md-4"> <h5>Companies</h5> </div> </div> </div> <div class="container first-position"> <div class="container mt-2 px-md-5 px-3 position-2"> <div class="row px-0 align-items-center"> <div class="col-md-4"></div> <div class="col-md-4 text-md-right my-md-0 my-3 position-chnge z-in"> <a href="add-company.php"> <img src="images/add.png"> <span class="contact-txt"> Add New Company</span></a> </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" type="text" value="" id="myInput" style="border-top-left-radius:6px ;border-bottom-left-radius:6px"> <span class="input-group-append"> <button class="btn btn-outline-secondary border-left-0 border" type="button" style="border-top-right-radius: 6px;border-bottom-right-radius: 6px;"> <i class="fa fa-search"></i> </button> </span> </div> --> </div> </div> </div> <div class="container "> <div class="table-responsive p-md-4 p-0"> <table id="example" class="display bg-white tbl-border table-borderless" style="width:100%"> <thead> <tr> <th>Company Name</th> <th>CR Number</th> <th>CR Expire date</th> <th>Tax Registration Number</th> <th>Tax Registration Expire Date </th> <th>Country</th> <th>City</th> <th>Action</th> </tr> </thead> </table> </div> </div> <!-- <div class="container position-relative"> <div class="row export_csv"> <div class="col-md-3 offset-md-9 "> <button id="export" class="btn btn-primary"><i class="fa fa-download"></i><span class="pl-2">EXPORT.CSV</span></button> </div> </div> </div> --> </div> <!-- footer --> <?php include("footer.php"); ?> <!-- <script src="js/jquery.min.js"></script> --> <!-- <script src="js/jquery.pagination.min.js"></script> --> <!----> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('#example').DataTable( { language: { search: "" }, "processing": true, "dataSrc": "", "sDom": 'Rfrtlip', // "sDom": 'Rlfrtlip', // "serverSide": true, // dom: 'Bfrtip', // buttons: [ // { // extend: 'csvHtml5', // text: '<i class="fa fa-file-text-o"></i>Export to csv', // titleAttr: 'CSV' // }, // ], // "ajax":{ // "url":"app/companies-ajax.php", // "dataSrc": "", // } , // "columns": [ // { "data": "company_name" }, // // { "data": "CR Number" }, // // { "data": "CR Expire date" }, // // { "data": "Tax Registration Number" }, // // { "data": "Tax Registration Expire Date" }, // // { "data": "Country" }, // // { "data": "Country" } // ] "pagingType": "full_numbers", "bProcessing": true, "bServerSide": true, "sAjaxSource": "app/companies-ajax.php", "ordering": false, "aoColumns": [{ mData: 'company_name' } , { mData: 'cr_number' }, { mData: 'cr_exp_date' }, { mData: 'tax_reg_number' }, { mData: 'tax_exp_date' }, { mData: 'country' }, { mData: 'city_name' }, { mData: 'action' } ] } ); } ); </script>