<head>
 <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>AdminLTE 2 | Advanced form elements</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.6 -->
 
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
  
  
</head>

<?php
$mode		= $this->uri->segment(3);

if ($mode == "edt" || $mode == "act_edt") {
	$act		= "act_edt";
	$idp		= $datpil->id;
	$username	= $datpil->username;
	$password	= "-";
	$nama		= $datpil->nama;
	$nip		= $datpil->nip;
	$level		= $datpil->level;
	$detail_level		= $datpil->detail_level;
	
} else {
	$act		= "act_add";
	$idp		= "";
	$username	= "";
	$password	= "";
	$nama		= "";
	$nip		= "";
	$level		= "";
	$detail_level		= "";

}
?>
<body>
    <div class="modal-shiftfix">
      
      <div class="container-fluid main-content"><div class="page-title">
 
</div>
<div class="row">
  <div class="col-lg-12">
    <div class="widget-container fluid-height clearfix">
      <div class="heading">
      
      </div>
      <div class="widget-content padded">
       <form action="<?=base_URL()?>admin/manage_admin/<?php echo $act; ?>" method="post" accept-charset="utf-8" enctype="multipart/form-data"class="form-horizontal">
		<input type="hidden" name="idp" value="<?php echo $idp; ?>">
        <div class="form-group">
            <label class="control-label col-md-2">Username</label>
            <div class="col-md-7">
            <input style="width: 300px" class="form-control" type="text" name="username"   value="<?php echo $username; ?>">
            </div>
        </div>
        
        <div class="form-group">
            <label class="control-label col-md-2">Password</label>
            <div class="col-md-7">
            <input style="width: 300px" class="form-control" type="password" name="password"   value="<?php echo $password; ?>">                         
            </div>
        </div>
         
		<div class="form-group">
            <label class="control-label col-md-2">Nama</label>
            <div class="col-md-7">
            <input style="width: 300px" class="form-control" type="text" name="nama"   value="<?php echo $nama; ?>">
            </div>
        </div>
		
		<div class="form-group">
            <label class="control-label col-md-2">NIP</label>
            <div class="col-md-7">
             <input style="width: 300px" class="form-control" type="text" name="nip"  required value="<?php echo $nip; ?>">
            </div>
        </div>
       
       
         <div class="form-group">
            <label class="control-label col-md-2">Level</label>
            <div class="col-md-7">
              <select name="level" class="form-control" style="width: 200px" required><option value=""> - Level - </option>
												<?php
													$l_level	= array('Super Admin', 'OSM', 'KABALAI', 'KABID','KASIE',);
														for ($i = 0; $i < sizeof($l_level); $i++) {
															if ($l_level[$i] == $level) {
																echo "<option selected value='".$l_level[$i]."'>".$l_level[$i]."</option>";
																						} else {
																		echo "<option value='".$l_level[$i]."'>".$l_level[$i]."</option>";
																								}				
																									}			
												?>			
											</select>
            </div>
        </div> 
		<div class="form-group">
            <label class="control-label col-md-2">Detail Level</label>
            <div class="col-md-7">
              <select name="detail_level" class="form-control" style="width: 200px" required><option value=""> - Detail Level - </option>
												<?php
													$l_detail_level	= array('Super Admin', 'OSM', 'KABALAI', 'Kabid Pemeriksaan','Kabag Tata Usaha', 'Kabid Informasi dan Komunikasi','Kabid Penindakan','Kabid Pengujian','Kaloka Kobar','Kasubbag Umum','Kasubbag Program dan Evaluasi','Kepala Seksi Inspeksi','Kepala Seksi Sertifikasi','Kepala Seksi Pengujian Kimia','Kepala Seksi Pengujian Mikrobiologi',);
														for ($i = 0; $i < sizeof($l_detail_level); $i++) {
															if ($l_detail_level[$i] == $detail_level) {
																echo "<option selected value='".$l_detail_level[$i]."'>".$l_detail_level[$i]."</option>";
																						} else {
																		echo "<option value='".$l_detail_level[$i]."'>".$l_detail_level[$i]."</option>";
																								}				
																									}			
												?>			
											</select>
            </div>
        </div> 
        
         
          <div class="form-group">
            <label class="control-label col-md-2"></label>
            <div class="col-md-7">
              <button class="btn btn-primary" type="submit">Simpan</button>
			  
				<a href="<?=base_URL()?>admin/manage_admin" class="btn btn-primary">Kembali</a>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>










      </div>
    </div>
  </body>
		
		
