<?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		= "";

}
?>

	<input type="hidden" name="idp" value="<?php echo $idp; ?>">
<div class="span9" id="content">
                      <!-- morris stacked chart -->
                    <div class="row-fluid">
                        <!-- block -->
                        <div class="block">
                            <div class="navbar navbar-inner block-header">
                                <div class="muted pull-left">Form User</div>
                            </div>
                            <div class="block-content collapse in">
                                <div class="span12">
                                     <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; ?>">
									  <fieldset>
                                        <legend>Manage User</legend>
                                       <div class="control-group">
                                        <label class="control-label" for="focusedInput">Username</label>
											<div class="controls">
												<input class="input-xlarge focused" id="focusedInput" type="text" name="username"   value="<?php echo $username; ?>">
                                             </div>
                                        </div>
									  <div class="control-group">
                                        <label class="control-label" for="focusedInput">Password</label>
											<div class="controls">
												<input class="input-xlarge focused" id="focusedInput" type="password" name="password"   value="<?php echo $password; ?>">
                                             </div>
                                        </div>
									   
									   
									   <div class="control-group">
                                        <label class="control-label" for="focusedInput">Nama</label>
											<div class="controls">
												<input class="input-xlarge focused" id="focusedInput" type="text" name="nama"   value="<?php echo $nama; ?>">
                                             </div>
                                        </div>
                                         <div class="control-group">
                                        <label class="control-label" for="focusedInput">NIP</label>
											<div class="controls">
												<input class="input-xlarge focused" id="focusedInput" type="text" name="nip"   value="<?php echo $nip; ?>">
                                             </div>
                                        </div>
                                        
                                        
                                        
                                        
                                        <div class="control-group">
                                          <label name="level" class="control-label" for="select01">level</label>
                                          <div class="controls">
                                            <select name="level" class="form-control" style="width: 200px" required><option value=""> - Level - </option>
												<?php
													$l_sifat	= array('Operator','Super Admin',);
														for ($i = 0; $i < sizeof($l_sifat); $i++) {
															if ($l_sifat[$i] == $level) {
																echo "<option selected value='".$l_sifat[$i]."'>".$l_sifat[$i]."</option>";
																						} else {
																		echo "<option value='".$l_sifat[$i]."'>".$l_sifat[$i]."</option>";
																								}				
																									}			
												?>			
			</select>
                                            
                                          </div>
                                        </div>
										
										
										
										
										<div class="control-group">
                                          <label name="jenis" class="control-label" for="select01">jenis</label>
                                          <div class="controls">
                                            <select name="jenis" class="form-control" style="width: 200px"><option value=""> - Level - </option>
                                             
											 
											 
											 
											 <?php
												$l_jenis	= array('Kosmetik','Pangan','Obat','PK','OT','Mikro',);
													for ($i = 0; $i < sizeof($l_jenis); $i++) {
														if ($l_jenis[$i] == $jenis) {
															echo "<option selected value='".$l_jenis[$i]."'>".$l_jenis[$i]."</option>";
																} else {
																	echo "<option value='".$l_jenis[$i]."'>".$l_jenis[$i]."</option>";
																		}				
																					}			
											?>			
                                            </select>
                                            
                                          </div>
                                        </div>
										
										
                                        <div class="form-actions">
                                          <button type="submit" class="btn btn-primary">Save changes</button>
                                          <a href="<?=base_URL()?>admin/manage_admin" class="btn btn-success">Kembali</a>
                                        </div>
                                      </fieldset>
                                    </form>

                                </div>
                            </div>
                        </div>
                        <!-- /block -->
                    </div>

                     

                     <!-- wizard -->
                    
	            <!-- /wizard -->

                     <!-- validation -->
                    
                     <!-- /validation -->


                </div>