	<ul class="nav nav-tabs bordered">
			<li class="active">
            	<a href="#list" data-toggle="tab"><i class="entypo-menu"></i> 
					All Payment Section
                    	</a></li>
			<li>
            	<a href="#add" data-toggle="tab"><i class="entypo-plus-circled"></i>
					Add Payment Section
                    	</a></li>
		</ul>
    	<!------CONTROL TABS END------>
        
		<div class="tab-content">
            <!----TABLE LISTING STARTS-->
            <div class="tab-pane box active" id="list">
				
     


 <div class="panel panel-primary" data-collapsed="0">
	
 
<table id="example"  cellspacing="1" class="table  table" width="100%">
             <thead>
		
         <tr>
      <th>Method Name </th>
    <th>Section Name </th>

           
	<th>Description</th> 
	<th>Date created</th> 





                 </tr>
             </thead>
<?php
 if(!is_array($paymentsection)) 

 {


   echo "<tr  style='margin-bottom:0px;margin-top:0px;' '>";
      echo "<td colspan='1'>";
    
       echo '<div class="alert alert-warning text-center">There is no payment method found by now from system..</div>';
    echo "</td>";
   echo "</tr>";
    }else {
?>
    
             <?php 
  
  	foreach ($paymentsection as $c): 

		 

             ?>



             <tr>
                
            <?php 
		$id=$c->id;


?>

 
                          <td><?php 
$methodid=  $c->methodid ;
$methods = $this->adminusermodel->getpaymentmethodbyid($methodid);


if(is_array($methods)) {

   foreach($methods as $methodsrow){

 echo $methodsrow->method;
}} else {
      echo "No payment section";
}
	
 ?></td>
 
             <td><?php echo $c->name ; ?></td> 
				<td><?php echo $c->description ; ?></td> 

				
                     <td><?php echo $c->createdat; ?></td>   
            
             </tr>

             <?php endforeach; ?>

              <?php }?>

        </table>


</div>

</div>
<div class="tab-pane box" id="add" style="padding: 5px">



		
<div class="row">
	<div class="col-md-12">
		<div class="panel panel-primary" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" >
            		<i class="entypo-plus-circled"></i>
				Add new Payment name
            	</div>
            </div>
			<div class="panel-body">





				<?PHP
				echo $this->session->flashdata('msg'); 
		
                 echo form_open('addpaymentsection' , 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="inputname" class="col-sm-2 control-label">Payment Section Name</label>
    <div class="col-sm-7">
			  		<input type="hidden" name="methodid" value="<?php echo set_value('methodid',$methodid); ?>"id="name" class="form-control" required placeholder="Enter Payment methodid">

		  		<input type="text" name="name" value="<?php echo set_value('name'); ?>"id="name" class="form-control" required placeholder="Enter Payment Section">
     <span class="text-danger"><?php echo form_error('name'); ?></span>
   </div>
  </div>
   			
  
  
   <div class="form-group">
    <label for="inputphone3" class="col-sm-2 control-label">Description </label>
    <div class="col-sm-7">
	<textarea name="description" id="ttt" rows="5" placeholder="add Description" class="form-control"></textarea>
    <span class="text-danger"><?php echo form_error('description'); ?></span>
   </div>
  </div>
    
  
  
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-7">
     
	       <button type="submit" name="btn_paymentsection"value="paymentsection" class="btn btn-primary">Add Payment Section</button>

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


    </div>
</div>







