<?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">
								<div class="row">
	              	<div class="col-md-10">
	              		<form class="form-inline"   action="<?php echo base_url('kantor/data_dropout'); ?>" method="POST" >
	              			<label>
	              				Tanggal awal &nbsp;:&nbsp;
	              			</label>
	              			<input type="date" name="tgl_awal" required="" class="form-control" placeholder="yyyy/mm/dd" />
	              			<label>
	              				&nbsp; Tanggal akhir &nbsp;:&nbsp;
	              			</label>
	              			<input  type="date" name="tgl_akhir" required="" class="form-control" placeholder="yyyy/mm/dd" />
	              			<label>
	              				&nbsp; Pilih Kantor &nbsp;:&nbsp;
	              			</label>
	              			<select name="id_kantor" class="form-control">
	              				<option value="semua"  >semua</option>
	              				<?php  foreach($kantor as $kantor) : ?> 
	              					<option value="<?php echo $kantor->id_kantor; ?>"><?php echo $kantor->nama_kantor; ?></option>
	              				<?php  	endforeach; ?>


	              			</select>
	              			<label>
	              				&nbsp; Status &nbsp;:&nbsp;
	              			</label>
	              			<select class="form-control" name="status">
	              						<option value="semua"  >semua</option>
	              						<option value="KELUAR">KELUAR</option></option>
              							<option value="HILANG">HILANG</option>
	              			 
	              			 
	              			</select>
	              			 
	              			&nbsp; <button  type="submit" class="btn btn-info btn-small">
	              				<i class="icon-search bigger-110"></i>
	              				Tampil
	              			</button>

	              		</form> 
	              	</div>  	
	              	<div class="col-md-2">
	              	  <a href="<?php echo base_url('kantor/dropout'); ?>"> <button    class="btn btn-warning btn-small">
	              		 
	              		 + Data Keluar
	              		</button></a>  
	                </div>     
                </div>                          
               

              </div>
              <!-- /.card-header -->
              <div class="card-body">
              	<table id="example1" class="table table-bordered table-striped">
              		<thead>
              			<tr>
              				<th>No</th>
                      <th>Date </th>
              				<th>ID Drop Out</th>
              				 
              				<th>Kantor</th>
              			 
              				 
              			 
              				<th>Status</th>
              			 
              				<th>Admin</th>
              				<th>Aksi</th>
              				
              			</tr>
              		</thead>
              		<tbody>
              			<?php $no=1; foreach($dropout as $rows) : ?> 
              				<tr>
												<td><?php echo $no; ?></td>
                         <td><?php echo $rows->date; ?></td>
              					<td><a href="<?php echo base_url('kantor/detail_dropout/'); ?><?php echo $rows->id_dropout; ?>" target="_blank"><?php echo $rows->id_dropout; ?></a></td>
              					 
              					<td>
              							<?php 
			              				$id_kantor = $rows->id_kantor; 
			              				$sql_menu = "SELECT * FROM tb_kantor WHERE  id_kantor = '$id_kantor' ";
			              				$main_menu = $this->db->query($sql_menu)->result();
			              				foreach ($main_menu as $maink) {
			              				echo  $maink->nama_kantor;

			              				}
			              				?>
              					</td>
              					 
              					 
              					<td><?php echo $rows->status; ?></td>
              				 
              					 
              					<td><?php 
			              				$id_admin = $rows->id_admin; 
			              				$sql_menu = "SELECT * FROM tb_admin WHERE  id = '$id_admin' ";
			              				$main_menu = $this->db->query($sql_menu)->result();
			              				foreach ($main_menu as $maink) {
			              				echo  $maink->nama_admin;

			              				}
			              				?>
			              					
			              				</td>
              				 

              					<td>
              				


              						<a href="<?php echo base_url('kantor/code_hapus_dropout'); ?>/<?php echo $rows->id_dropout;  ?>" onclick="return confirm('Apakah Anda Yakin Membatalkan Data Drop Out Barang ini, ? Klik Oke jika Lanjut')" type="button" alt="hapus" ><i class="fa fa-trash"></i></a>  
              					 
              					</td>
              				</tr>
              			<?php $no++; endforeach; ?>

              		</tbody>

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