EVOLUTION-NINJA
Edit File: upcoming_bidding_list.php
<?php $this->load->view('includes/iadmin_header'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Upcoming Bidding List</title> <!-- Include necessary CSS styles --> <link rel="stylesheet" href="https://cdn.datatables.net/1.11.6/css/jquery.dataTables.min.css"> <style type="text/css"> /* Add custom styles here */ .bidd { background-color: white; margin: 10px 29px; width: 97%; border-radius: 20px; } .card-title { border-bottom: 1px solid black; margin-bottom: 15px; padding-bottom: 10px; } .export-btn { float: right; margin-right: 1%; } .ul_menu li { list-style: none; } .table-responsive { overflow-x: hidden !important; } .prio_table > thead > tr > th { background: #abf3ad !important; border-bottom: 1px solid #61b79c !important; border-top: 1px solid #61b79c !important; color: #000; } .prio_table > tbody > tr > td { background: #f0fffc; color: #000; } @media only screen and (min-width: 320px) and (max-width: 640px) { .table-responsive { overflow-x: auto !important; } } @media only screen and (min-width: 641px) and (max-width: 991px) { .table-responsive { overflow-x: auto !important; } } @media only screen and (min-width: 992px) and (max-width: 1258px) { .table-responsive { overflow-x: auto !important; } } </style> </head> <body> <div class="row justify-content-center mt-4"> <div class="col-lg-12 bidd"> <div class="card"> <div class="card-header"> <button type="button" style="float:right;margin-right: 1%;" onclick="doit('xlsx')"; class="btn btn-primary btn-sm">Export</button> <h2 class="card-title">Upcoming Bidding List</h2> </div> <div class="card-body"> <div class="table-responsive"> <table id="biddingTable" class="table prio_table dataTable no-footer"> <thead> <tr> <th>#</th> <th>Event Name</th> <th>Company Name</th> <th>Date</th> <th>Time</th> <th>Action</th> </tr> </thead> <tbody> <?php if (!empty($upcoming_biddings)): ?> <?php foreach ($upcoming_biddings as $index => $bidding): ?> <tr> <td><?php echo $index + 1; ?></td> <td><?php echo $bidding->bidding_title; ?></td> <td><?php echo $bidding->company_name;?></td> <td><?php echo $bidding->final_bidding_date; ?></td> <td><?php echo $bidding->bidding_time; ?></td> <td><a href="<?php echo base_url('/vendor-item-description'); ?>/<?php echo $bidding->bidding_session_id; ?>" class="btn btn-success btn-xs" role="button">View</a> </tr> <?php endforeach; ?> <?php else: ?> <tr> <td colspan="5">No upcoming biddings found.</td> </tr> <?php endif; ?> </tbody> </table> </div> </div> </div> </div> </div> </body> </html> <script type="text/javascript"> var datatable; var tbody = $('#table_body'); datatable = $('.table').DataTable({}); jQuery(document).ready(function($) { $('.ul_menu li.dropdown').hover(function() { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500); }, function() { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500); }); }); </script> <script type="text/javascript" src="<?php echo base_url('assets/js/shim.min.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('assets/js/xlsx.full.min.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('assets/js/Blob.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('assets/js/FileSaver.js');?>"></script> <script> function doit(type, fn, dl) { var elt = document.getElementById('biddingTable'); // Update ID to match your table ID var wb = XLSX.utils.table_to_book(elt, {sheet:"Sheet JS"}); return dl ? XLSX.write(wb, {bookType:type, bookSST:true, type: 'base64'}) : XLSX.writeFile(wb, fn || ('upcommingBidding.' + (type || 'xlsx'))); } </script>