<table id="myTable" class="table table-bordered table-striped">
    <thead>
        <tr>
            <th><input type="checkbox" class="selectall">All</th>
            <th>Id</th>
            <th>Code</th>
            <th>City</th>
            <th>Name</th>
            <th>Property Type</th>
            <th>Category</th>
            <th>Price</th>
            <th>Vendor Price</th>
            <th>Discount Price</th>
            <th>Child Price</th>
            <th>Child Discount</th>
            <th>Infant Price</th>
            <th>Infant Discount</th>
            <th>Preferred</th>
            <th>Created By</th>
            <th>Status</th>
            <th>Action</th>
        </tr>
    </thead>
    
    <tbody>
        <?php
        if ($packageListing) {
            $i = 1;
            foreach ($packageListing as $listing) {
                $userName = $this->mainMenu()->fetchUserName($listing['created_by']);
                ?>
        <tr>
            <td><input type="checkbox" class="check" rel="<?php echo $listing['id']; ?>"></td>
            <td><?php echo $i; ?></td>
            <td><?php echo $listing['code']; ?></td>
            <td><?php echo $listing['city_name']; ?></td>
            <td><?php echo $listing['name']; ?></td>
            <td><?php echo $listing['hotel_property_type']; ?> </td>
            <td><?php echo $listing['hotel_category_name']; ?> </td>
            <td><?php //echo $listing['price']; ?> </td>
            <td><?php //echo $listing['vendor_price']; ?> </td>
            <td><?php //echo $listing['discount_price']; ?></td>
            <td><?php //echo $listing['child_price']; ?></td>
            <td><?php //echo $listing['child_discount']; ?></td>            
            <td><?php //echo $listing['infant_price']; ?></td>
            <td><?php //echo $listing['infant_discount']; ?></td>
            <td>
            <div id="changestatus-<?php echo $listing['id']; ?>" status="<?php echo $listing['preferred']; ?>"  class="iconsize <?php echo ($listing['preferred'] == '1' ? 'aprovestatus' : 'unaprovestatus'); ?>" name="ChangeStatus" onclick="changeRecordStatus('<?php echo $listing['id']; ?>', 'hotel', 'change-preferred-status', '<?php echo $listing['preferred']; ?>')">
                </div>
                </td>
            <td><?php echo $userName; ?></td>
            <td>
                <div id="changestatus-<?php echo $listing['id']; ?>" status="<?php echo $listing['status']; ?>"  class="iconsize <?php echo ($listing['status'] == '1' ? 'aprovestatus' : 'unaprovestatus'); ?>" name="ChangeStatus" onclick="changeRecordStatus('<?php echo $listing['id']; ?>', 'hotel', 'change-record-status', '<?php echo $listing['status']; ?>')">
                </div>
                        </td>
            <td>
                <div class="hidden-sm hidden-xs action-buttons"> 
                    <a href="<?php echo $this->url('hotel', array('action' => 'edit-hotel'), array('query' => array('id' => $listing['id']))); ?>" class="red pointer edit-form" title="Edit Hotel Details"> <i class="ace-icon fa fa-edit bigger-130"></i> 
                    </a>  
                    <a class="red" href="#" title="Scheduler Detail" > <i class="ace-icon fa fa-calendar bigger-130"></i></a>
                    <a class="red" href="<?php echo $this->url('hotel', array('action' => 'delete-hotel-details'), array('query' => array('data' => $listing['id']))); ?>" title="Delete"> <i class="ace-icon fa fa-trash-o bigger-130"></i> </a>
                </div>
            </td>
        </tr>
        <?php $i++;
            }
        } else { ?>
            <tr></tr>                               
<?php } ?>
    </tbody>    
</table>