










 <div class="row">

   	<div class="col-md-9">  
		<div class="panel panel-default" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				Profile Details
				
					

            	</div>
            </div>
			<div class="panel-body">

			
				    
			<ul class="nav nav-tabs bordered">
			<li class="active">
            	<a href="#add" data-toggle="tab"><i class="entypo-menu"></i> 
						Your photo
                    	</a></li>
			<li>
            	<a href="#list" data-toggle="tab"><i class="entypo-plus-circled"></i>
					Update photo
                    	</a></li>
			</ul>
    	<!------CONTROL TABS END------>
        
		<div class="tab-content">
            <!----TABLE LISTING STARTS-->
			
			
			<div class="tab-pane box active" id="add" style="padding: 5px">
			

    <div class="form-group">
    <label for="inputcollage" class="col-sm-2 control-label">	</label>
    <div class="col-sm-10">
	
				<?PHP
		 echo $this->session->flashdata('msg'); 

				$session_data = $this->session->userdata('logged_in');
$data['id'] = $session_data['id'];

$id=$data['id'];

//$img= $images[0]->photo;

$img1='uploads/';
  $url = base_url().$img1.$img;

		?>

		
		
		
<?PHP

if (($img!="") ||($img!=null))//active user record is present

{
?>
<img src="<?php echo $url ?>"     width="100%" align="middle"  alignment="center">

<?PHP

}else{

echo "You have not uploade your photo..........Please do so";

}
?>




  
	</div>
  </div>
	
	
			</div>
			
            <div class="tab-pane box" id="list">


	<div class="row">
						<div class="col-md-12">
							
							<div class="panel-body">

				<?PHP
								



		
		 echo $this->session->flashdata('msg'); 
		
                 echo form_open('user/updateprofile' , 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="inputcollage" class="col-sm-2 control-label">	</label>
    <div class="col-sm-10">
	
	<img src="<?php echo base_url(); ?>images/img/photo.jpg"  width="100%"  align="middle">
  
	</div>
  </div>
  
  
    
    <div class="form-group">
    <label for="inputphoto" class="col-sm-2 control-label">	Select your photo </label>
    <div class="col-sm-10">
		<input type="file" name="photo" width="400" required value="<?php echo set_value('photo') ;?>" placeholder="Select Image"  class="form-control"  >

						<span class="text-danger">Kindly upload clear image here..<?php echo form_error('photo'); ?>

	</div>
  </div>
  
  

	
		

		<input type="hidden" name="id" value="<?php echo ($id) ;?>" > 

  
  
  

	<div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"name="btn_upload" class="btn  btn-primary" value="upload"> Upload Image   </button>

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


				</div>


		<!----CREATION FORM STARTS---->
	
			
		
  
		
  </div>
  
  </div>
  
  

































