
<table id="myTable" class="table table-bordered table-striped">
    <thead>
        <tr>
            <th><input type="checkbox" class="selectall">All</th>
            <th>ID</th>
            <th width="20%">Name</th>
            <th width="20%">Type</th>
            <th>Img</th>
            <th>Header Text</th>      
            <th>Footer Text</th>
            <th>Created By</th>
            <th>Status</th>
            <th width="10%">Action</th>
        </tr>
    </thead>
    <tbody>
        
        
        
        <?php if($mailList){
           // echo'<pre>';print_r($mailList);die();
                $i=1;
        foreach($mailList as $listing){ 
            $userName   =   $this->mainMenu()->fetchUserName($listing['created_by']);
            ?>
        <tr>
            <td class="center"><label class="pos-rel">
                        <input type="checkbox" rel="<?php echo $listing['id']; ?>" class="ace list-checkbox check" />
                            <span class="lbl"></span> </label>
                    </td>
            <td><?php echo $i;?></td>
            <td><?php echo $listing['name'];?></td>
            <td><?php echo $listing['type'];?></td>
            <td><?php echo $listing['img'];?></td>
            <td><a class="red" href="javascript:void(0);"  onclick="getDescView('<?php echo $listing['id']; ?>','header')" title="View Header Template"><i class="ace-icon fa fa-eye bigger-130" ></i> </a></td>
            <td><a class="red" href="javascript:void(0);"  onclick="getDescView('<?php echo $listing['id']; ?>','footer')" title="View Footer Template"><i class="ace-icon fa fa-eye bigger-130" ></i> </a></td>
            <td><?php echo $userName;?></td>
            <td><div id="changestatus1" class="<?php if($listing['is_active']==1){ echo "aprovestatus";}else{ echo "unaprovestatus";} ?> iconsize" name="ChangeStatus" onclick="changeRecordStatus('<?php echo $listing['id']; ?>','templatesettings','change-record-status','<?php echo $listing['is_active'];?>')"> </div></td>
            <td>
    <div class="hidden-sm hidden-xs action-buttons43"> 
        <a class="red " title="Edit" href="<?php echo $this->url('templatesettings', array('action'=>'edit-mail'),
                ['query'=>['id'=>$listing['id']]]);?>"> <i class="ace-icon fa fa-edit bigger-130"></i> </a> 
            
     <a class="red" href="<?php echo $this->url('templatesettings', array('action' => 'delete-mail'), array('query' => array('data' => $listing['id']))); ?>" title="Delete"> <i class="ace-icon fa fa-trash-o bigger-130"></i> </a>           
                    
    <a class="red" href="javascript:void(0);"  onclick="getDescView('<?php echo $listing['id']; ?>','template')" title="View Template"> 
        <i class="ace-icon fa fa-eye bigger-130" ></i> </a>
        
        
       
                </div></td>
        </tr>
        <?php $i++;} }else{?>
                <tr><td colspan="7" style="text-align: center;">No Records Found</td></tr>                       
        <?php }?>
     

    </tbody>
    
</table>
  <div id="voucherModal" class="modal fade" role="dialog">
  <div class="modal-dialog widthpersent50">
    <!-- Modal content-->
    <div class="modal-content voucherModal"></div>
  </div>
</div>     