<?php $this->load->view('admin/layout/meta'); ?>
<?php $this->load->view('admin/layout/header'); ?>
<?php $this->load->view('admin/layout/aside'); ?>

<?php
if($cek=='edit'){
 foreach($edit->result() as $row){ 
 $idasalinstansi = $row->idasalinstansi;
 $kode = $row->kode;
 $namaasalinstansi = $row->namaasalinstansi;

 }
}
?>
  <main id="main" class="main">
    <div class="pagetitle">
      <h1>Asalinstansi</h1>
      <nav>
        <ol class="breadcrumb">
          <li class="breadcrumb-item"><a href="#">Home</a></li>
          <li class="breadcrumb-item active">Asalinstansi</li>
        </ol>
      </nav>
    </div><!-- End Page Title -->
    <section class="section dashboard">
      <div class="row">
        <!-- Left side columns -->
        <div class="col-lg-12">
          <div class="row">
          <div class="card">
            <div class="card-body">
                  <h5 class="card-title">Asalinstansi<span></span></h5>
				  <?php 	
			$attribute = array('role' => 'form', 'class' => 'form-horizontal','enctype'=>'multipart/form-data','method'=>'post');
			echo form_open(base_url().'admin/asalinstansi/save', $attribute); 
			?>
			<input type="hidden" class="form-control" id="inputText" name="idasalinstansi" value="<?php if($cek=='edit'){ echo $idasalinstansi;}else{ echo '';}?>">
                <div class="row mb-3">
                  <label for="inputEmail3" class="col-sm-2 col-form-label">Kode</label>
                  <div class="col-sm-10">
                    <input type="text" class="form-control" id="inputText" name="kode" value="<?php if($cek=='edit'){ echo $kode;}?>">
                  </div>
                </div>		
                <div class="row mb-3">
                  <label for="inputEmail3" class="col-sm-2 col-form-label">Nama Asalinstansi</label>
                  <div class="col-sm-10">
                    <input type="text" class="form-control" id="inputText" name="namaasalinstansi" value="<?php if($cek=='edit'){ echo $namaasalinstansi;}?>">
                  </div>
                </div>					
                <div class="row mb-3">
                  <label for="inputEmail3" class="col-sm-2 col-form-label"></label>
                  <div class="col-sm-10">
                     <button type="submit" class="btn btn-primary" name="button">Simpan</button>
                  </div>
                </div>
             <?php echo form_close(); ?><!-- End Horizontal Form -->

                </div>
				</div>
              </div>
            </div><!-- End Recent Sales -->

          </div>
        </div><!-- End Left side columns -->
      </div>
    </section>
  </main><!-- End #main -->
<?php $this->load->view('admin/layout/foot'); ?> 