<div style="/*max-height: 465px; overflow: scroll*/">
    <table class="table table-striped table-bordered table-hover">
        <thead>
        <tr>
            <th style="text-align: center">TT</th>
            <th style="text-align: center">Ảnh</th>
            <th style="text-align: center">Tên bài hát</th>
            <th style="text-align: center">Nghệ sĩ</th>
            <th style="text-align: center; width: 215px">Ngày bắt đầu quét</th>
            <th style="text-align: center">Trang không lấy<br>lượt nghe</th>
            <th style="text-align: center; width: 100px">BXH<br>quá 6 tháng</th>
            <th style="text-align: center">Xử lý</th>
        </tr>
        </thead>
        <tbody>
        <?php if(count($listData) > 0): foreach($listData as $key => $data): ?>
            <?php $ago = time() - strtotime($data['track_created_at']) ?>
            <tr>
                <td style="text-align: center"><?php echo ($key+1+$offset); ?></td>
                <td style="text-align: center">
                    <img style="max-width: 50px" src="<?php echo MyHelper::getArtByTrack($data['art'], false, $data['art_type']) ?>">
                </td>
                <td style="text-align: left">
                    <?php echo $data['title']; ?>
                    <br>
                    <?php echo MyHelper::getSourceIcon($data['id_zing'], $data['id_nct'], $data['id_keeng']) ?>
                    <br>
                    <?php echo 'ID: ' . $data['id']; ?>
                </td>
                <td style="text-align: left">
                    Ca sĩ: <span style="font-weight: bold"><?php echo $data['singer_list']; ?></span>
                    <br>
                    Sáng tác: <span style="font-weight: bold"><?php echo $data['composer_list']; ?></span>
                </td>
                <td style="text-align: center">
                    <?php echo MyHelper::reFormatDate($data['track_created_at'], 'd/m/Y'); ?>
                    <br>
                    <?php echo 'Cách đây: ' . gmdate('m', $ago) . ' tháng, ' . gmdate('d', $ago) . ' ngày' ?>
                </td>
                <td style="text-align: left"><?php echo strtoupper($data['blacklist_listen']); ?></td>
                <td style="text-align: center">
                    <?php if($data['is_remove_from_ranking']): ?>
                        <input type="checkbox" disabled checked="checked">
                    <?php else: ?>
                        <?php if ($this->session->userdata('group_id') == 2): ?>
                        <input type="checkbox" id="chk_<?php echo $data['id']; ?>"
                               onclick="updateBlacklistMore6MonthsByAjax(<?php echo $data['id']?>, '<?php echo $data['title']?>', 'all_6months')">
                        <?php else: ?>
                            <span></span>
                        <?php endif; ?>
                    <?php endif; ?>
                </td>
                <td style="text-align: center">
                    <a href="<?php echo base_url('backend/cmsTrack/showTrack/'.$data['id']); ?>" title="Xem chi tiết">
                        <i class="ace-icon fa fa-eye bigger-130"></i>
                    </a>
                </td>
            </tr>
        <?php endforeach; ?>
        <?php else: ?>
            <tr>
                <td colspan="10" style="color: red; font-style: italic">Không có dữ liệu nào!</td>
            </tr>
        <?php endif; ?>
        </tbody>
    </table>
</div>
<!-- /.row -->
<div style="text-align: center;"><?php echo $pagination; ?></div>