<table id="myTable" class="table table-bordered table-striped">
    <thead>
        <tr>
            <th>S.No</th>
            <th>Booking Reference</th>
            <th>Client</th>
            <th>Pickup Time</th>
            <th>Vehicle</th>
            <th>Booking Type</th>
            <th>Departure</th>
            <th>Drop Address</th>
            <th>Booking Auto Release Date</th>
            <th>Status</th>
            <th>Action</th>

        </tr>
    </thead>

    <tbody>
        <?php
        //echo '<pre>';print_r($cancellationListing);
        if ($cancellationListing>0) {
            $i = 1;
            foreach ($cancellationListing as $listing) {
                 $departure_address = substr($listing['departure'], 0, 30);
                $drop_area = substr($listing['drop_area'], 0, 30);
                ?>
                <tr>
                    <td><?php echo $i; ?></td>
                     <td><?php echo $listing['ref']; ?></td>
                    <td><a class="clientinfo pointer" data="<?php echo $listing['ref']; ?>"><?php echo $listing['clientname']; ?></a><br><small><?php echo $listing['client_mobile']; ?></small></td>
                    <td><?php echo $listing['ordertime']; ?></td>
                    <td width="10%"><img style="width:20px;" src="/images/vehicle.png"/><?php echo (isset($listing['vehicle_name'])) ? $listing['vehicle_name'] : ''; ?><br/>
                        <?php if ($listing['driver_name'] != "") { ?><small><a class="driver_click pointer" data="<?php echo $listing['ref']; ?>"><?php echo (isset($listing['driver_name'])) ? $listing['driver_name'] : ''; ?></a></small> <?php } ?>
                        <?php if ($listing['vehicle_no'] != "") { ?><small><?php echo (isset($listing['vehicle_no'])) ? $listing['vehicle_no'] : ''; ?></small><?php } ?>
                    </td>
                    <td width="10%"><img src="<?php echo $listing['booking_type_image']; ?>"> <?php echo $listing['booking_type']; ?> <br><small>(<?php echo (isset($listing['vehicle'])) ? $listing['vehicle'] : ''; ?>)</small><?php if ($listing['booking_type'] == "Outstation") { ?><br><small>(Multicity)</small><a class="trip-detail pointer" rel="<?php echo $listing['id']; ?>" ><small>Trip Detail</small></a><?php } ?></td>
                    <td>
                        <p>
                            <span class="departure-<?php echo $listing['id']; ?>"><?php echo $departure_address; ?></span>
                            <span style="display: none;" class="departure-more-<?php echo $listing['id']; ?>"><?php echo $listing['departure']; ?></span>
                            <?php if(strlen($listing['departure'])>30) {?><a  class="myBtn" rel="<?php echo $listing['id']; ?>" relclass="departure"> <small class="pointer">..more</small></a><?php }?>
                        </p>
                    </td>
                    <td>
                        <?php if($drop_area!="") {?>
                        <p>
                            <span class="droparea-<?php echo $listing['id']; ?>"><?php echo $drop_area; ?></span>
                            <span style="display: none;" class="droparea-more-<?php echo $listing['id']; ?>"><?php echo $listing['drop_area']; ?></span>
                            <?php if(strlen($listing['drop_area'])>30) {?><a  class="myBtn" rel="<?php echo $listing['id']; ?>" relclass="droparea"> <small class="pointer">..more</small></a><?php }?>
                        </p>
                        <?php }?>
                    </td>
                    <td><?php echo $listing['booking_release_date']; ?></td>
                    <td><?php echo $listing['status']; ?></td>
                    <td>
                            <ul class="icons-list margin-left0 no-padding" style="list-style:none;">
                                <li class="dropdown text-muted">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></a>
                                    <ul class="dropdown-menu dropdown-menu-right margin-left0">
                                        <li><a href="<?php echo $this->url('cancellationdeadline', array('action' => 'release-booking'),array('query' => array('booking_id' => $listing['booking_id']))) ?>" data-target="#ajax-modal" role="button"  data-toggle="modal" data-keyboard=""><i class="ace-icon fa fa-close bigger-130"></i>Release/Cancel Booking</a></li>
<!--                                        <li class="updatestatus" user_id="<?php echo $listing['user_id']; ?>" user_status="<?php echo $listing['driver_status_id']; ?>"><a href="#" data-toggle="modal" data-target="#statuspopup" ><i class="ace-icon fa fa-user bigger-130"></i>Booking Details</a></li>
                                        <li class="relationmanager" user_id="<?php echo $listing['user_id']; ?>" relation_id="<?php echo $listing['relation_manager_id']; ?>"><a href="#" data-toggle="modal" data-target="#relationpopup" ><i class="ace-icon fa fa-check-square  bigger-130"></i>Confirm/Payment</a></li>-->
                                    </ul>
                                </li>
                            </ul>
                        </td>

                </tr>
                <?php
                $i++;
            }
        } ?>
    </tbody>
</table>