EVOLUTION-NINJA
Edit File: bidding_table.php
<?php $this->load->view('includes/client_header');?> <section class="mid_work_one"> <div class="container"> <!-- <div class="row mid_container"> <form class="form-horizontal"> <div class="list_table"> <div class="table-responsive"> <table class="table"> <thead> <tr> <th>Sl No</th> <th>Bidding Title</th> <th>Date</th> <th>Time</th> <th>Action</th> </tr> </thead> <tbody> <?php foreach ($bidding as $key => $value) { ?> <tr class="row<?php echo $value->bidding_session_id; ?>"> <td><?php echo $key+1;?></td> <td><a href="<?php echo base_url('/edit-session'); ?>/<?php echo $value->bidding_session_id; ?>"><?php echo $value->bidding_title; ?></a></td> <?php if($value->final_bidding_date!='0000-00-00'){ ?> <td><?php echo Date('d M Y', strtotime($value->final_bidding_date)); ?></td> <?php } else { ?> <td></td> <?php } ?> <td><?php echo $value->bidding_time; ?></td> <td><span class="fa fa-trash" onclick="delete_iadmin(<?php echo $value->bidding_session_id;?>);" aria-hidden="true"></span>  </td> </tr> <?php } ?> </tbody> </table> </div> </div> </form> </div> --> <div class="row row_no"> <h4 class="info_text">Events</h4> <form class="form-horizontal"> <div class="table-responsive"> <table class="table prio_table text-nowrap"> <thead> <tr> <th>#</th> <th>Event Name</th> <th>Time Limit Per Item</th> <th>Date</th> <th>Time</th> <th>Participants</th> <th>Bidding</th> <th>Action</th> </tr> </thead> <tbody> <?php foreach($bidding as $key => $value) { $vendor = $this->db->where('bidding_id', $value->bidding_session_id)->get('vendor_bidding_table')->result(); ?> <tr class="row<?php echo $value->bidding_session_id; ?>"> <td><?php echo $key+1;?></td> <td><?php echo $value->bidding_title; ?></td> <td><?php echo $value->bidding_limit_time; ?> Sec</td> <?php if($value->final_bidding_date!='0000-00-00'){ ?> <td><?php echo Date('d-m-Y', strtotime($value->final_bidding_date)); ?></td> <?php } else { ?> <td></td> <?php } ?> <td><?php echo $value->bidding_time; ?></td> <td><?php echo count($vendor);?></td> <td><a href="<?php echo base_url('/bidding-event');?>/<?php echo $value->bidding_session_id; ?>" class="btn btn-success btn-xs" role="button">Start</a></td> <td><a href="<?php echo base_url('/edit-session'); ?>/<?php echo $value->bidding_session_id; ?>" class="btn btn-primary btn-xs" role="button">Manage</a> <button type="button" class="btn btn-danger btn-xs"><span class="fa fa-trash" onclick="delete_iadmin(<?php echo $value->bidding_session_id;?>);" aria-hidden="true"></span></button> </td> </tr> <?php } ?> </tbody> </table> </div> </form> </div> </section> </body> </html> <script type="text/javascript"> var datatable; // var tbody = $('#table_body'); // datatable = $('.table').DataTable({ // }); function delete_iadmin(id) { var id = id; swal({ title: "Are you sure?", text: "You will not be able to recover this data!", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Yes, delete it!", cancelButtonText: "No, cancel plz!", closeOnConfirm: false, closeOnCancel: false }, function(isConfirm){ if (isConfirm) { $(".sweet-alert").hide(); $(".sweet-overlay").hide(); $.ajax({ url:"<?php echo site_url("delete-procurement")?>", type:"POST", data:{id:id}, success:function(response) { response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { toastr["success"]("Deleted successfully"); $('.row'+id).hide(); } } }); } else { $(".sweet-alert").hide(); $(".sweet-overlay").hide(); } }); } </script> <style type="text/css"> .row { margin-right: 0px !important; margin-left: 0px !important; } </style>