<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://cdn.datatables.net/2.1.3/js/dataTables.js"></script>
<script src="https://cdn.datatables.net/2.1.3/js/dataTables.bootstrap5.js"></script>
<style>
td img {
  width: 20px;
  height: 20px;
  border-radius: 100%;
}
</style>
<div class="main-panel">
	<div class="content-wrapper">
			<div class="row purchace-popup">
              <div class="col-12 stretch-card grid-margin">
                <div class="card card-secondary">
                  <span class="card-body d-lg-flex align-items-center">
                    <p class="mb-lg-0">System Logs</p>
                    </span>
                </div>
              </div>
            </div>
			<div class="col-lg-12 grid-margin stretch-card">
                <div class="card">
                  <div class="card-body">
				  <?php if($this->session->flashdata('message_name') !='') { ?>
					<div class="page-header card" id="flash_data">
						<div class="row align-items-end">
							<div class="col-lg-12">
								<div class="page-header-title">
									<div class="d-inline">
										<h4><font color="red"><center><?php echo $this->session->flashdata('message_name');?></center></font></h4>
									</div>
								</div>
							</div>
						</div>
					</div>
					<?php } ?>
                    <table class="table table-bordered" id="table">
                      <thead>
						<tr>
							<th>Sr.no</th>
							<th>Username</th>
							<th>Description</th>
							<th>Created Date</th>
							
						</tr>
                      </thead>
                      <tbody>
							<?php $i=1;?>
							<?php foreach($log_data as $item) {  ?>
							<tr>
								<td><?php echo $i;?></td>
								<td><?php echo $item['first_name'].' '.$item['last_name'];?></td>
								<td><?php echo $item['description'];?></td>
								<td><?php echo $item['created_time'];?></td>
								
							</tr><?php $i++; } ?>
						</tbody>
                    </table>
                  </div>
                </div>
              </div>
             
		</div>
<script>
setTimeout(function() {
	$('#flash_data').fadeOut('slow');
}, 5000);
</script>

<script>
new DataTable('#table');
</script>