EVOLUTION-NINJA
Edit File: vendor_bidding_list.php
<?php $this->load->view('includes/iadmin_header');?> <!DOCTYPE html> <html> <head> <title>Total Bidding List</title> </head> <body> <div class="row justify-content-center mt-4"> <div class="col-lg-12 bidd"> <div class="card"> <!-- Wrap the table in a card --> <div class="card-body"> <!-- Add a card body --> <button type="button" style="float:right;margin-right: 1%;" onclick="doExport()" class="btn btn-primary btn-sm">Export</button> <h2 class="card-title">Total Bidding List</h2> <div class="table-responsive"> <table id="biddingTable" class="table prio_table dataTable no-footer" style="width:95%;margin-left:20px;"> <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 (is_array($total_bid) && count($total_bid) > 0): ?> <?php foreach ($total_bid as $key => $bid): ?> <tr> <td><?php echo $key + 1; ?></td> <td><?php echo isset($bid->bidding_title) ? $bid->bidding_title : ''; ?></td> <td><?php echo isset($bid->company_name)? $bid->company_name:'';?></td> <td><?php echo isset($bid->final_bidding_date) ? $bid->final_bidding_date : ''; ?></td> <td><?php echo isset($bid->bidding_time) ? $bid->bidding_time : ''; ?></td> <td><a href="<?php echo base_url('/vendor-item-description'); ?>/<?php echo $bid->bidding_session_id; ?>" class="btn btn-success btn-xs" role="button">View</a> </tr> <?php endforeach; ?> <?php else: ?> <tr> <td colspan="5">No bids 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> <style type="text/css"> .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; } } /* ---------------- */ .bidd{ background-color: white; margin: 10px 29px; width: 97%; border-radius: 20px; } .card-title{ border-bottom: 1px solid black; } </style> <script type="text/javascript" src="<?php echo base_url('assets/js/xlsx.full.min.js');?>"></script> <script> function doExport() { var elt = document.getElementById('biddingTable'); var wb = XLSX.utils.table_to_book(elt, {sheet:"Sheet JS"}); XLSX.writeFile(wb, 'total_bidding_list.xlsx'); } </script>