<div class="table-responsive">
    <table data-sortable class="table table-hover table-striped table-bordered">
        <thead>
        <tr>
            <th style="text-align: center"><i class="fa fa-sort"></i></th>
            <th style="text-align: center">#ID</th>
            <th style="text-align: center">Resim Adı</th>
            <th style="text-align: center">Resim</th>
            <th style="text-align: center">Kapak Resmi</th>
            <th style="text-align: center">Aktif / Pasif</th>
            <th style="text-align: center">İşlem</th>
        </tr>
        </thead>

        <tbody class="sortable" data-url="<?php echo base_url("products/veriSirala");?>">
        <?php
        foreach ($image_item as $image)
        {
            ?>
            <tr style="cursor: move;">
                <td><i class="fa fa-sort-amount-asc"></i></td>
                <td class="w100 ortala" style="text-align: center;"><?php echo $image->id; ?></td>
                <td><?php echo $image->resim; ?></td>
                <td style="text-align: center;"><img
                        src="<?php echo base_url("uploads/{$viewFolder}/$image->resim"); ?>"
                        style="width: 100px; border-radius: 5px;">
                </td>
                <td class="w150 ortala" style="text-align: center;">
                    <input type="checkbox"
                           class="ios-switch ios-switch-success ios-switch-sm isCover"
                           data-url="<?php echo base_url("products/isCoverSetter/$image->id/$image->urunid"); ?>"
                           <?php echo ($image->isCover) ? "checked" : ""; ?>
                    />
                </td>
                <td class="w150 ortala" style="text-align: center;">
                    <input type="checkbox"
                           class="ios-switch ios-switch-primary ios-switch-sm isActive"
                           data-url="<?php echo base_url("products/resimAktifPasif/$image->id"); ?>"
                            <?php echo ($image->isactive) ? "checked" : ""; ?>
                    />
                </td>
                <td class="w100" style="text-align: center;">
                    <div class="btn-group btn-group-xs">
                        <button data-url="<?php echo base_url("products/fotoSil/$image->id/$item->id") ?>"
                                class="btn btn-danger btn-xs remove-btn">
                            <i class="fa fa-trash-o"></i> Sil
                        </button>
                    </div>
                </td>
            </tr>
            <?php
        }
        ?>
        </tbody>
    </table>
</div>