

 
 <div class="row">
  
   	

   	<div class="col-md-12">

  
		

			
			
		

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Update  Your company details </h4>
      </div>
      <div class="modal-body">
      
	  	

				<?PHP
//$session_data = $this->session->userdata('logged_in');


				echo $this->session->flashdata('msg'); 
		
                 echo form_open('admin/updatemodule' , 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;?>

<input type="hidden" name="myid" value="<?php echo $userid; ?>"  id="myid" class="form-control" required placeholder="Enter 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" required>
		<option selected="selectted" value="<?php echo $module[0]['status']?>"  ><?php $mymodule=$module[0]['status']; if($mymodule=="1"){echo "active";}else if($mymodule=="0"){ echo "inactive";} ?></option>
	<option value=""  >---Select status---</option>
	<option value="1"  >active</option>
		<option value="0"  >inactive</option>
	</select>		 
				
		<span class="text-danger"> <?php echo form_error('status'); ?>
		
		</span>
	</div>
  </div>
		
<div class="form-group">
    <label for="inputmenu" class="col-sm-2 control-label">	Menu	 </label>
    <div class="col-sm-10">
	
	<select class="form-control" name="menu" required>
		<option selected="selectted" value="<?php echo $module[0]['menu']?>"  ><?php echo $module[0]['menu']?></option>
	<option value=""  >---Select Main Menu---</option>

	<?php 
					 

								 $Menu= $this->usermodel->populateall('mainmenu','status ',1);
		 


if(is_array($Menu)) {

   foreach($Menu as $Menurow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $Menurow->id;   ?>"><?=  $Menurow->name; ?></option>



	<?php

}} else {
    echo 'No branch available.';
}
	
?>
</select>
	</select>		 
				
		<span class="text-danger"> <?php echo form_error('menu'); ?>
		
		</span>
	</div>
  </div>
		<div class="form-group">
    <label for="inputname" class="col-sm-2 control-label">	Module Name</label>
    <div class="col-sm-10">

		  		<input type="text" name="name" value="<?php echo set_value('name',$module[0]['name']); ?>"id="name" class="form-control"  placeholder="Enter module Name">
		 
				
		<span class="text-danger"> 	<?php echo form_error('name'); ?>
		
		</span>
	</div>
  </div>					
	<div class="form-group">
    <label for="inputcode" class="col-sm-2 control-label">	module Code</label>
    <div class="col-sm-10">

		  		<input type="text" name="code" readonly value="<?php echo set_value('code',$module[0]['id']); ?>"id="code" class="form-control"  placeholder="Enter module code">
		 
				
		<span class="text-danger"> 	<?php echo form_error('code'); ?>
		
		</span>
	</div>
  </div>	



	

	<div class="form-group">
    <label for="inputurl" class="col-sm-2 control-label">	module URL</label>
    <div class="col-sm-10">

		  		<input type="text" name="url" value="<?php echo set_value('url',$module[0]['url']); ?>"id="url" class="form-control"  placeholder="Enter module URL">
		 
				
		<span class="text-danger"> 	<?php echo form_error('url'); ?>
		
		</span>
	</div>
  </div>	
	<div class="form-group">
    <label for="inputicon" class="col-sm-2 control-label">	module icon</label>
    <div class="col-sm-10">

		  		<input type="text" name="icon" value="<?php echo set_value('icon',$module[0]['icon']); ?>"id="url" class="form-control"  placeholder="Enter module icon">
		 
				
		<span class="text-danger"> 	<?php echo form_error('icon'); ?>
		
		</span>
	</div>
  </div>	

	<div class="form-group">
    <label for="inputsort" class="col-sm-2 control-label">	module Sorting</label>
    <div class="col-sm-10">

		  		<input type="text" name="sort" value="<?php echo set_value('sort',$module[0]['sort']); ?>"id="sort" class="form-control"  placeholder="Enter module sort">
		 
				
		<span class="text-danger"> 	<?php echo form_error('sort'); ?>
		
		</span>
	</div>
  </div>	


  

<div class="form-group">
    <label for="inputtype" class="col-sm-2 control-label">	module Type</label>
    <div class="col-sm-10">

		  		<input type="text" name="type" value="<?php echo set_value('type',$module[0]['type']); ?>"id="type" class="form-control"  placeholder="Enter module type">
		 
				
		<span class="text-danger"> 	<?php echo form_error('type'); ?>
		
		</span>
	</div>
  </div>
		
		
		
	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="module" name="btn_updatemodule" class="btn btn-primary"> Update Modules   </button>

    </div>
  </div>
  					<?php echo form_close();?>
			</div>							   
				
									
							
								
			<div class="modal-footer">

    

				</div>

		</div>
	  						
									
									
									
									
							
						</div>
				

			
			</div>



















