<?php //Zend\Debug\Debug::dump($mvehicleList); ?>
<table id="myTable" class="table table-bordered table-striped">
    <thead>
        <tr role="">
            <th><input type="checkbox" class="selectall">All</th>
            <th>S.No</th>
            <th>User</th>
            <th>Package</th>
            <th>Option</th>
            <th>License Key</th>
            <th>Start Date</th>
            <th>End Date</th>
            <th>Created By</th>
            <th>Status</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        <?php
        if($uLicenseList!=""){
        if (count($uLicenseList) > 0) {
            $i = 1;
            foreach ($uLicenseList as $listing) {
                $userName   =   $this->mainMenu()->fetchUserName($listing['created_by']);
                if($listing['license_option']==1){
                    $licenseOption= "Lifetime";
                }else if($listing['license_option']==2){
                    $licenseOption= "Yearly";
                }else if($listing['license_option']==3){
                    $licenseOption= "Half Year";
                }else if($listing['license_option']==4){
                    $licenseOption= "Monthly";
                }
                ?>
                <tr>
                 <td><input type="checkbox" class="check" rel="<?php echo $listing['user_license_id']; ?>"></td>
                    <td><?php echo $i; ?></td>
                    <td>
                        <strong>First Name:</strong> <?php echo $listing['first_name']; ?><br/>
                        <strong>Last Name:</strong> <?php echo $listing['last_name']; ?><br/>
                        <strong>Email:</strong> <?php echo $listing['email']; ?><br/>
                        <strong>Mobile:</strong> <?php echo $listing['mobile']; ?><br/>
                    </td>
                    <td><?php echo $listing['package']; ?></td>
                    <td><?php echo $licenseOption; ?></td>
                    <td><?php echo $listing['license_key']; ?></td>
                    <td><?php echo date('d-m-Y',strtotime($listing['license_start_date'])); ?></td>
                    <td><?php echo date('d-m-Y',strtotime($listing['license_end_date'])); ?></td>
                    <td><?php echo $userName; ?></td>
                   <td><div id="changestatus-<?php echo $listing['user_license_id']; ?>" status="<?php echo $listing['status'];?>"  class="iconsize <?php echo ($listing['status'] == '1' ? 'aprovestatus' : 'unaprovestatus'); ?>" name="ChangeStatus" onclick="changeRecordStatus('<?php echo $listing['user_license_id']; ?>','license','change-record-status','<?php echo $listing['status'];?>')"> </div>
                </td>
                    <td>
                        <div class="hidden-sm hidden-xs action-buttons"> 
                            <a href="<?php echo $this->url('license', array('action' => 'edit-user-license'), array('query' => array('id' => $listing['user_license_id']))); ?>" class="red pointer edit-form" title="Edit Cab"> <i class="ace-icon fa fa-edit bigger-130"></i> </a>                            
                            <a class="red" href="<?php echo $this->url('license', array('action' => 'delete-license'), array('query' => array('data' => $listing['user_license_id']))); ?>" title="Delete"> <i class="ace-icon fa fa-trash-o bigger-130"></i> </a>
                            </div>
                    </td>
                </tr>
                <?php
                $i++;
            }
        } }else {
            ?>
            <tr>
                <td colspan="8" style="text-align: center;">No Records Found</td>
            </tr>
<?php } ?>
    </tbody>
</table>
