      <script type="text/javascript">
  
		
		 $(document).on("click", "#managebtndelete", function()
        {
          var itemid = $(this).data('id');
		  $("#itemid1").val(itemid); 
		  
		  
		   
        });
		
		
		
    </script> 

	<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>
			
		</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>Section Name </th>

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



                 </tr>
             </thead><?PHP

 echo $this->session->flashdata('imagemsg1'); 
		 
		    
$session_data = $this->session->userdata('logged_in');
 $data['usertype'] = $session_data['usertype'];
	 $usertype = $data['usertype'];	
$data['smstype'] = $session_data['smstype'];
	 $smstype = $data['smstype'];	
$data['surname'] = $session_data['surname'];
$data['id'] = $session_data['id'];
 $data['companyid'] = $session_data['companyid'];
	 $companyid = $data['companyid'];
$surname=$data['surname'];
   $userid=$data['id'];


echo $this->session->flashdata('msg'); 
 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 echo $c->name ; ?></td> 
				<td><?php echo $c->description ; ?></td> 

				
                     <td><?php echo $c->createdat; ?></td>  
 <td>
		
					<div class="btn-group">
                                    <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown">
                                        More <span class="caret"></span>
                                    </button>
									<?php
										if($usertype=="admin"){
											
											?>
                                    <ul class="dropdown-menu dropdown-primary pull-right" role="menu">
                                        
                                        <!-- teacher EDITING LINK -->
                                      
										
											  <li> 
										 <a class="btn btn-danger managebtn" id="managebtndelete"		 data-id='<?php echo  $c->id;?>'     data-toggle='modal' data-target='#myModal<?php  $c->id; ?>'>	 


                                                <i class="glyphicon glyphicon-pencil"></i>
																Delete
                                                </a>
                                                        </li>
									
									
                                        <li class="divider"></li>
                                        
                                        <!-- teacher DELETION LINK -->
                                        
                                    </ul>
											<?php
										}
										?>
                                </div>
		 
		 </td>					 
             
             </tr>

             <?php endforeach; ?>

              <?php }?>

        </table>
  <div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Delete</h4>
      </div>
      <div class="modal-body">
        <h3>Are you sure you want to delete this item? </h3>
      </div>
      <div class="modal-footer">
	  	

     
		<?PHP
				$session_data = $this->session->userdata('adminlogged_in');
 echo $this->session->flashdata('deletemsg'); 

		
                 echo form_open('user/deletebyid' , array('class' => 'form-horizontal ', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
 <input type="hidden" id="table"name="table" class="table" placeholder="view" value="paymentsection">

 <input type="hidden" id="view"name="view" class="view" placeholder="view" value="admin/viewallpaymentsection">
 <input type="hidden" id="itemid1"name="itemid" class="itemid" placeholder="itemid" value=""><br>
          <input type="hidden" id="plotno1"name="plotno" class="form-control" placeholder="plotno"  value="">
 <button type="button" class="btn btn-success" data-dismiss="modal">No</button>
 		  	         <button type="submit" name="btn_delete" value="deletebyid" class="btn btn-danger"> Delete  </button>

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

  </div>

  </div>

</div>

</div>

</div>







