
 
 <div class="row">

  <div class="col-xs-12 col-sm-6 col-lg-8">
  
		<div class="panel panel-success" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				User Details
            	</div>
            </div>
			<div class="panel-body">

			
										
					<div class="row">
						<div class="col-md-12">
							
							<div class="panel-body">
							
					
	
				<?PHP
 echo $this->session->flashdata('msg'); 
		?>
		
		
			<?PHP
				$session_data = $this->session->userdata('adminlogged_in');


		
                 echo form_open('admin/updateuser' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
					
	


	<div class="form-group">
    <label for="inputfirstname" class="col-sm-2 control-label">	First Name</label>
    <div class="col-sm-10">
		  		<input type="text" name="id" value="<?php echo set_value('id',$admin[0]['id']); ?>"id="firstname" class="form-control" required placeholder="id">
		  		<input type="text" name="firstname" value="<?php echo set_value('firstname',$admin[0]['firstname']); ?>"id="firstname" class="form-control" required placeholder="Enter your First Name">
		 
				
		<span class="text-danger"> 	Enter firs two names  here..<?php echo form_error('firstname'); ?>
		
		</span>
	</div>
  </div>	

	<div class="form-group">
    <label for="inputsurname" class="col-sm-2 control-label">	 SurName</label>
    <div class="col-sm-10">
		
				<input type="text" name="surname" value="<?php echo set_value('surname',$admin[0]['surname']) ;?>" id="surname" class="form-control" required placeholder="Enter Your Surname">

		<span class="text-danger"> 	Enter   surName <?php echo form_error('surname'); ?>
		
		</span>
	</div>
  </div>	

  

	<div class="form-group">
    <label for="inputpfno" class="col-sm-2 control-label">	PF Number</label>
    <div class="col-sm-10">

				<input type="text" name="pfno" value="<?php echo set_value('pfno',$admin[0]['pfno']); ?>" id="pfno" class="form-control" required placeholder="e.g.  BIT-001-5020/2015">
			
		<span class="text-danger"> Enter PF  Number<?php echo form_error('pfno'); ?>
		
		</span>
	</div>
  </div>
  		<div class="form-group">
    <label for="inputphone" class="col-sm-2 control-label">	Phone Number</label>
    <div class="col-sm-10">

				<input type="text" name="idno" value="<?php echo set_value('phone',$admin[0]['phone']); ?>" id="phone" class="form-control" required placeholder="e.g.  072382345">
			
		<span class="text-danger"> Enter Correct phone Number<?php echo form_error('phone'); ?>
		
		</span>
	</div>
  </div>
	
	
	
	<div class="form-group">
    <label for="inputpfno" class="col-sm-2 control-label">	Id Number</label>
    <div class="col-sm-10">

				<input type="text" name="idno" value="<?php echo set_value('idno',$admin[0]['idno']); ?>" id="pfno" class="form-control" required placeholder="e.g.  45782345">
			
		<span class="text-danger"> Enter Correct National ID Number /Passport / Birth Certificate Number<?php echo form_error('pfno'); ?>
		
		</span>
	</div>
  </div>
	
	
		<div class="form-group">
    <label for="inputpfno" class="col-sm-2 control-label">	Email</label>
    <div class="col-sm-10">

				<input type="text" name="email" value="<?php echo set_value('email',$admin[0]['email']); ?>" id="email" class="form-control" required placeholder="e.g someone@jkuat.ac.ke">
			
		<span class="text-danger"> Enter Correct Email (Jkuat student Email is recommended)<?php echo form_error('email'); ?>
		
		</span>
	</div>
  </div>
	
	
		
     <div class="form-group">
    <label for="inputcampusname" class="col-sm-2 control-label">	Campus</label>
    <div class="col-sm-10">
	<select class="form-control" name="campusname">
	
	
	
	<?php 
					 
					 
					 	 $campusnamecode=$admin[0]['campus'];


$campus = $this->campusmodel->getcampusbycode($campusnamecode);


if(is_array($campus)) {

   foreach($campus as $campusrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $campusrow->code;   ?>"><?=  $campusrow->name; ?></option>



	<?php

}} else {
	
	
	$campus = $this->campusmodel->populatecampus();


if(is_array($campus)) {

   foreach($campus as $campusrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $campusrow->code;   ?>"><?=  $campusrow->name; ?></option>



	<?php

}} else {
    echo 'No Campus.';
}
	
	
	
	
	
	
	
	
	
	
	
	
    
}

?>
			 
			
				
				</select>
		
						<span class="text-danger"><?php echo form_error('campusname'); ?>

	</div>
  </div>
  
  
  
     <div class="form-group">
    <label for="inputcollagename" class="col-sm-2 control-label"> College/School</label>
    <div class="col-sm-10">
	<select class="form-control" name="collage">
	
	
	
	<?php 
					 
					 
					 	 $collagenamecode=$admin[0]['collage'];


$collage = $this->collagemodel->getcollegebycode($collagenamecode);


if(is_array($collage)) {

   foreach($collage as $collagerow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $collagerow->code;   ?>"><?=  $collagerow->name; ?></option>



	<?php

}} else {
	
	
	$collage = $this->collagemodel->populatecollage();


if(is_array($collage)) {

   foreach($collage as $collagerow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $collagerow->code;   ?>"><?=  $collagerow->name; ?></option>



	<?php

}} else {
    echo 'No collage.';
}
	
	
	
	
    
}

?>
			 
			
				
				</select>
		
						<span class="text-danger"><?php echo form_error('collagename'); ?>

	</div>
  </div>
  
  
  
  
  
  
  
  
  
  
  
  
  
  
   <div class="form-group">
    <label for="inputdepartment" class="col-sm-2 control-label">	Department</label>
    <div class="col-sm-10">
  <select name="department"  class="form-control" required >

		<?php 

$depcode=$admin[0]['department'];
$updatedepartment = $this->departmentmodel->populatedepartmentbyid($depcode);


if(is_array($updatedepartment)) {

   foreach($updatedepartment as $deprow){

    ?>
    <option value="<?php echo set_value($deprow->code, $deprow->code); ?> "><?=$deprow->name;?></option>
 
    <?php

}} else {
   
   $department = $this->departmentmodel->populatedepartment();


if(is_array($department)) {

   foreach($department as $departmentrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $departmentrow->code;   ?>"><?=  $departmentrow->name; ?></option>



	<?php

}} else {
    echo 'No Department.';
}
	
	
   
   
   
   
   
   
   
   
   
}

?>
	</select>

		
						<span class="text-danger"><?php echo form_error('department'); ?>

	</div>
  </div>
  
  
  
  
  
   <div class="form-group">
    <label for="inputcampusname" class="col-sm-2 control-label">	Campus</label>
    <div class="col-sm-10">
	<select class="form-control" name="campusname">
	
	
	
	<?php 
					 
					 
					 	 $campusnamecode=$admin[0]['campus'];


$campus = $this->campusmodel->getcampusbycode($campusnamecode);


if(is_array($campus)) {

   foreach($campus as $campusrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $campusrow->code;   ?>"><?=  $campusrow->name; ?></option>



	<?php

}} else {
	
	
	$campus = $this->campusmodel->populatecampus();


if(is_array($campus)) {

   foreach($campus as $campusrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $campusrow->code;   ?>"><?=  $campusrow->name; ?></option>



	<?php

}} else {
    echo 'No Campus.';
}
	
	
	
	
	
	
	
	
	
	
	
	
    
}

?>
			 
			
				
				</select>
		
						<span class="text-danger"><?php echo form_error('campusname'); ?>

	</div>
  </div>
  
  
  <? echo $admin[0]['status'] ; ?>
     <div class="form-group">
    <label for="inputstatus" class="col-sm-2 control-label"> Status</label>
    <div class="col-sm-10">
	<select class="form-control" name="status">
	
			 <option selected ="selected"value="<? echo $admin[0]['status'] ; ?>"><?echo  $admin[0]['status'] ;  ?></option>
				<option value="active">active</option>
				<option value="inactive" > inactive </option>
				<option value="Other" >Other</option>
				
				</select>
		
						<span class="text-danger"><?php echo form_error('status'); ?>

	</div>
  </div>
  
  
  	<div class="form-group">
    <label for="inputpassword" class="col-sm-2 control-label">	Password</label>
    <div class="col-sm-10">
	   <input type="hidden" name="pfno" value="<?php echo $pfno ;?>"id="password" class="form-field">
	<input type="hidden" name="id" value="<?php echo ($id) ;?>" > 
		  		<input type="password" name="password" value="<?php echo set_value('password',$admin[0]['password']); ?>"id="firstname" class="form-control" required placeholder="Update password">
		 
				
		<span class="text-danger"> You can update password  here..<?php echo form_error('password'); ?>
		
		</span>
	</div>
  </div>
  
  
  
  
  
  
  
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit" name="btn_adduser" value="user" class="btn btn-success"> Update/Save data  </button>

    </div>
  </div>
			</div>							   
									<?php echo form_close();?>
								
							
						</div>
					</div>

					
			
			</div>
		</div>
  
  </div>
  <div class="col-xs-12 col-sm-6 col-lg-4">
   <div class="panel panel-success" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title"  id="redcolor">
            		<i class="entypo-plus-circled"></i>
				Guidelines
            	</div>
            </div>
			<div class="panel-body">

				1.Change Your Details<br>
			
				
				2.Click update/save  to make changes.<br>
			</div>
		</div>
  
  </div>
</div>
</div>



















































