JezK
Edit File: testimonial.php
<?php include("./app/checkSession.php"); if(empty($_SESSION['admin_name'])&&$_SESSION['admin_name']==""){ echo "<script>window.location.href='index.php'</script>"; } include("header.php"); include_once("../master_admin/app/adminObj.php"); $testimonial_list=$adminObj->getTestimonial(); ?> <style> #example_length { display: none; } .text-danger{ color:red !important; } a#export1{ margin-right:0px !important; } .row.export_csv.buttonAlignment { position: absolute; right: 36px !important; bottom: 25px !important; } @media(max-width:767px){ /* #example_filter label:after{ right: 22px !important; top: 74px !important; } */ } </style> <div class="container"> <div class="container mt-3"> <div class="row px-md-4 px-0"> <div class="tophead col-md-4"> <h6><?php echo $lang['TESTIMONIAL']; ?></h6> </div> <div class="col-md-4"> </div> <!-- <div class="col-md-4 text-md-right my-3 mt-md-0"> <a href="add-newsletter.php"><button class="add_user_btn"><img src="images/addwarehouse_selected.png"></button><span class="addusertext pl-2">Create News letter</span> </a> </div> --> </div> </div> <div class="container "> <div class="table-responsive p-4 myquotation-table"> <table id="example" class="display bg-white tbl-border table-borderless" style="width:100%"> <thead> <tr> <th><?php echo $lang['SNO'];?></th> <th><?php echo $lang['USER_NAME']; ?></th> <th><?php echo $lang['ACTION']; ?></th> </tr> </thead> <tbody> <?php if($testimonial_list>0){ $Sno = 0; foreach($testimonial_list as $val) { ?> <tr> <td><?php echo ++$Sno; ?></td> <td><?php echo $val['user_name'] ?></td> <td><a href="app/deleteTestimonial.php?id=<?php echo $val['testimonial_id']; ?>"><img src="images/delete.svg" alt="delete" height="22px" onclick="return confirmDelete();"></td> </tr> <?php } } ?> </tbody> </table> </div> </div> <!-- <div class="container position-relative"> <div class="row export_csv buttonAlignment"> <div class="col-md-3 pl-2"> <?php if(count($testimonial_list)>0){?> <a href="export-newsLetter.php" id="export1" class="btn btn-primary"><i class="fa fa-download"></i><span class="pl-0"> <?php echo $lang['EXPORT.XLSX']; ?></span></a> <?php }?> </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> $(document).ready(function() { $('#example').DataTable({ language: { search: '', searchPlaceholder: "<?php echo $lang['SEARCH'];?>", paginate: {previous: '<?php echo $lang['PREV']; ?>',next:'<?php echo $lang['NEXT'];?>'}, }, "processing": true, "dataSrc": "", // "dom": 'Bfrtip', "dom": 'Rlfrtlip', buttons: [ { extend: 'csvHtml5', text: '<i class="fa fa-download p-1"></i>Export to csv', titleAttr: 'CSV' }, ] }); $("#example_filter").before("<div class='col-md-9 text-md-right my-3 mt-md-0 butRes'><a href='addtestimonial.php'><button class='add_user_btn'><img src='images/add-white.png'><span class='addusertext pl-2'><?php echo $lang['ADD_TESTIMONIAL'];?></span> </button></a></div>"); } ); function confirmDelete() { var x = confirm("Are you sure you want to delete?"); if (x) { return true; } else { return false; } } </script>