<?php foreach($kontak as $kontak) :   endforeach; ?>
<?php foreach($admin_login as $user) :   endforeach; ?> 
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0 text-dark"> 
            		 <?php echo $title1; ?>
            </h1>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">Home</a></li>
              <li class="breadcrumb-item active"><?php echo $title1; ?></li>
            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->
	    
          
    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
      	  <div class="card">
              <div class="card-header">
               Log User

              </div>
              <!-- /.card-header -->
              <div class="card-body">
              	<table id="example1" class="table table-bordered table-striped">
              		<thead>
              			<tr>
              				<th>No</th>
              				<th>Nama <?php echo $title4; ?></th>
              				<th>IP</th>
              				<th>Hostname</th>
              				<th>Status</th>
              			 
              				<th>Aksi</th>
              				
              			</tr>
              		</thead>
              		<tbody>
              			<?php $no=1; foreach($log as $rows) : ?> 
              				<tr>
												<td><?php echo $no; ?></td>
              					<td><?php echo $rows->username; ?></td>
              					<td><?php echo $rows->ip; ?></td>
              					<td><?php echo $rows->hostname; ?></td>
              					<td><?php echo $rows->status; ?></td>
              				 
              				 

              					<td>

              					 
              						<a href="" style="color: red;"  type="button"  data-toggle="modal" data-target="#modal-hapus<?php echo $rows->id; ?>"><i class="fa fa-trash"></i></a>

              					 

              						<form class="form-horizontal" action="<?php echo base_url('log_user/code_hapus'); ?>" method="POST" enctype="multipart/form-data" />  
              							<div class="modal fade" id="modal-hapus<?php echo $rows->id; ?>">
              								<div class="modal-dialog">
              									<div class="modal-content bg-danger">
              										<div class="modal-header">
              											<h4 class="modal-title">Hapus Data </h4>
              											<button type="button" class="close" data-dismiss="modal" aria-label="Close">
              												<span aria-hidden="true">&times;</span>
              											</button>
              										</div>
              										<div class="modal-body">
              											<h4>Apakah Yakin Menghapus Data Ini, <?php echo $rows->nama_log; ?> ?</h4>
              											<!-- id kirim -->
              											<input type="hidden" name="id" value="<?php echo $rows->id; ?>">


              										</div>
              										<div class="modal-footer justify-content-between">
              											<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
              											<button type="submit" class="btn btn-primary">Hapus</button>
              										</div>
              									</div>
              									<!-- /.modal-content -->
              								</div>
              								<!-- /.modal-dialog -->
              							</div>
              						</form>

              					</td>
              				</tr>
              			<?php $no++; endforeach; ?>

              		</tbody>

              	</table>
              </div>
              <!-- /.card-body -->
            </div>
      </div><!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

   