   <div class="page-content" >                     


                        <div class="row">
                         <?php
                                $message = $this->session->userdata('message');
                                if (!empty($message)) {
                                    ?>
                                    <div class="alert alert-block alert-success">
                                        <h6 class="lighter arial green"  style="text-align:center;"><b>
                                                <?php echo $message;
                                                $this->session->unset_userdata('message');
                                                ?>
                                            </b></h6>
                                    </div>  
                                    <?php
                                }
                                $errormessage = $this->session->userdata('errormessage');
                                if (!empty($errormessage)) {
                                    ?>
                                    <div class="alert alert-block alert-danger"  style="text-align:center;">
                                        <h6 class="lighter arial red"><b>
                                                <?php echo $errormessage;
                                                $this->session->unset_userdata('errormessage');
                                                ?>
                                            </b></h6>
                                    </div> 
                                    <?php
                                }
                                ?>

                    <?php if(!empty($CommissionReferenceInfo)){?>
                            <div class="col-xs-12">
                                <!-- PAGE CONTENT BEGINS -->
                                
                                <?php $adminLebel=$this->session->userdata('admin_level');?>
                             

                                <div class="row">
                                    <div class="col-xs-12">
                                        

                                        <div class="clearfix">
                                            <div class="pull-right tableTools-container"></div>
                                        </div>
                                        <div class="table-header" style="height:60px;">
                                           <h3 style="text-align:center;">Commission Reference</h3>
                                        </div>

                                        <!-- div.table-responsive -->

                                        <!-- div.dataTables_borderWrap -->
                                        <div>
                                            <table id="dynamic-table" class="table table-striped table-bordered table-hover">
                                                <thead>
                                                    <tr>
                                                        
                                                        <th>Serial</th>
                                                        <th>Customer Id & Name </th>
                                                        <th>Reference Name </th>
                                                        <th>
                                                           Plot size
                                                        </th>
                                                        <th>
                                                            Price
                                                        </th>
                                                        <th>Total Commission</th>
                                                        <th >Date</th>
                                                        
                                                        <th>Action</th>
                                                    </tr>
                                                </thead>

                                                <tbody>
                                                    
                <?php 
                $i=0;
                foreach($CommissionReferenceInfo as $value){?>

                                                    <tr>
                                                        
                                                        <td>
                                                            <?php echo ++$i;?>
                                                        </td>
                                        <td style="color:red;">Id :<?php if(!empty($value['customerId'])){echo '&nbsp;&nbsp;'.$value['customerId'];?><br/> 
                                        Name :<?php $app_name=getlandCustomerNameById($value['customerId']); echo "&nbsp;&nbsp;".$app_name['applicant_name'];}?>
                                                        </td>
                                                        <td style="color:red;">
                                                             <?php if(!empty($value['reference_name'])){ $usrname=getEmployeeById($value['reference_name']); echo $usrname['userName'];}?>  
                                                        </td>
                                                        <td>
                                                            <?php  
                                                                if(!empty($value['plote_size'])){echo $value['plote_size'];}
                                                            ?>
                                                        </td>
                                                        <td><span class="label label-warning"><?php if(!empty($value['price'])){ echo $value['price'];}?></span></td>
                                                        <td><span class="label label-warning"><?php if(!empty($value['total_commission'])){ echo $value['total_commission'];}?></span></td>
                                                        <td><?php if(!empty($value['date'])){ echo $value['date'];}?></td>
                                                        

                                                        <td>
                                                            <div class="hidden-sm hidden-xs action-buttons">
                                                                
                                                                <?php if($adminLebel==1){?>
                                                                <a class="green" href="<?php echo admin_url()?>/commissionreferencesetup/edit_commissionreference/<?php echo $value['id'];?>">
                                                                    <i class="ace-icon fa fa-pencil bigger-130"></i>
                                                                </a>

                                                                <a class="red" href="<?php echo admin_url()?>/commissionreferencesetup/delete_commissionreference/<?php echo $value['id'];?>" onclick="return ConfirmDelete()">
                                                                    <i class="ace-icon fa fa-trash-o bigger-130"></i>
                                                                </a>
                                                                <?php }?>
                                                            </div>
                                                        </td>
                                                    </tr>

                   <?php }?>                             

                                                    
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>

                                
                                </div><!-- PAGE CONTENT ENDS -->
                                <?php }?>
                            </div><!-- /.col -->
                        </div><!-- /.row -->