PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/productjuly1video/champdoms.click/admin-panel/pages/bank-receipts/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/productjuly1video/champdoms.click/admin-panel/pages/bank-receipts/content.html

<?php
$page           = (!empty($_GET['page-id']) && is_numeric($_GET['page-id'])) ? Secure($_GET['page-id']) : 1;
$filter_keyword = (!empty($_GET['query'])) ? Secure($_GET['query']) : '';
$db->pageLimit  = 20;

if(isset($_GET['approved'])){
    $db->where('approved',1);
}else{
    $db->where('approved',0);
}


if (!empty($filter_keyword)) {
    $sql   = "(
    `username`     LIKE '%$filter_keyword%' OR 
    `email`        LIKE '%$filter_keyword%' OR 
    `first_name`   LIKE '%$filter_keyword%' OR 
    `ip_address`   LIKE '%$filter_keyword%' OR 
    `phone_number` LIKE '%$filter_keyword%' OR 
    `last_name`    LIKE '%$filter_keyword%'
  )";

    $mediafiles = $db->orderBy('approved_at', 'DESC')->orderBy('id', 'DESC')->objectbuilder()->paginate('bank_receipts', $page);
}

else {
    $mediafiles = $db->objectbuilder()->orderBy('approved_at', 'DESC')->orderBy('id', 'DESC')->paginate('bank_receipts', $page);
}

if (($page > $db->totalPages) && !empty($_GET['page-id'])) {
    header("Location: " . PT_LoadAdminLinkSettings('bank-receipts'));
    exit();
}

$approved_count = $db->where('approved',1)->getValue('bank_receipts','count(id)');
$disapproved_count = $db->where('approved',0)->getValue('bank_receipts','count(id)');
?>
<div class="container-fluid">
    <div class="block-header">
        <h2>Earnings > Manage bank receipts</h2>
    </div>

    <div class="row clearfix">
        <div class="col-lg-3 col-md-3">
            <a href="<?php echo PT_LoadAdminLinkSettings('bank-receipts');?>?approved=true">
            <div class="info-box bg-light-green hover-expand-effect">
                <div class="icon">
                    <i class="material-icons">check</i>
                </div>
                <div class="content">
                    <div class="text">Approved</div>
                    <div class="number count-to" data-from="0" data-to="<?php echo $approved_count; ?>" data-speed="1000" data-fresh-interval="20"></div>
                </div>
            </div>
            </a>
        </div>
        <div class="col-lg-3 col-md-3 ">
            <a href="<?php echo PT_LoadAdminLinkSettings('bank-receipts');?>">
            <div class="info-box bg-red hover-expand-effect">
                <div class="icon">
                    <i class="material-icons">clear</i>
                </div>
                <div class="content">
                    <div class="text">Disapproved</div>
                    <div class="number count-to" data-from="0" data-to="<?php echo $disapproved_count; ?>" data-speed="1000" data-fresh-interval="20"></div>
                </div>
            </div>
            </a>
        </div>

    <!-- Vertical Layout -->
    <div class="row">
        <div class="col-lg-12 col-md-12">
            <div class="card">
                <div class="header">
                    <h2>Manage bank receipts</h2>
                </div>
                <div class="clearfix"></div>
                <div class="table-responsive1">
                    <table class="table table-bordered table-striped table-hover">
                        <tbody>
                            <?php
                        if( count($mediafiles) === 0 ){
                            echo '<tr><td style="padding: 200px;text-align: center;">No data available in table</td></tr>';
                        }else {
                            foreach ($mediafiles as $mediafilelist) {
                                $pt->mediafilelist = $mediafilelist;
                                $pt->mediafilelist->user = PT_UserData($mediafilelist->user_id);
                                echo PT_LoadAdminPage('bank-receipts/list');
                            }
                        }
                        ?>
                        </tbody>
                    </table>
                </div>
                <div class="wo-admincp-feturepager" style="width: 98%;margin: 0 auto;">
                    <div class="pull-left">
                        <span>
                          <?php echo "Showing $page out of " . $db->totalPages; ?>
                        </span>
                    </div>
                    <div class="pull-right">
                        <nav>
                            <ul class="pagination">
                                <li>
                                    <a href="<?php echo PT_LoadAdminLinkSettings('manage-photos?page-id=1'); ?>" class="waves-effect" title='First Page'>
                                        <i class="material-icons">first_page</i>
                                    </a>
                                </li>
                                <?php if ($page > 1) {  ?>
                                    <li>
                                        <a href="<?php echo PT_LoadAdminLinkSettings('manage-photos?page-id=' . ($page - 1)); ?>" class="waves-effect" title='Previous Page'>
                                            <i class="material-icons">chevron_left</i>
                                        </a>
                                    </li>
                                <?php  } ?>

                                <?php
                                $nums       = 0;
                                $nums_pages = ($page > 4) ? ($page - 4) : $page;

                                for ($i=$nums_pages; $i <= $db->totalPages; $i++) {
                                    if ($nums < 20) {
                                        ?>
                                        <li class="<?php echo ($page == $i) ? 'active' : ''; ?>">
                                            <a href="<?php echo PT_LoadAdminLinkSettings('manage-photos?page-id=' . ($i)); ?>" class="waves-effect">
                                                <?php echo $i ?>
                                            </a>
                                        </li>

                                    <?php } $nums++; }?>

                                <?php if ($db->totalPages > $page) { ?>
                                    <li>
                                        <a href="<?php echo PT_LoadAdminLinkSettings('manage-photos?page-id=' . ($page + 1)); ?>" class="waves-effect" title="Next Page">
                                            <i class="material-icons">chevron_right</i>
                                        </a>
                                    </li>
                                <?php } ?>
                                <li>
                                    <a href="<?php echo PT_LoadAdminLinkSettings('manage-photos?page-id=' . ($db->totalPages)); ?>" class="waves-effect" title='Last Page'>
                                        <i class="material-icons">last_page</i>
                                    </a>
                                </li>
                            </ul>
                        </nav>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
</div>
<script>

    function Wo_DeleteReceipt(receipt_id,user_id,photo_file) {
        if (confirm("Are you sure you want to delete this receipt?") == false) {
            return false;
        }

        $.get('{{LINK aj/ap/delete_receipt}}',{receipt_id: receipt_id, user_id: user_id, receipt_file: photo_file})
        .done(function( data ) {
            $('#ReceiptID_' + receipt_id).fadeOut(300, function() {
                $(this).remove();
            });
        });
    }

    function Wo_ApproveReceipt(receipt_id,photo_file) {
        if (confirm("Are you sure you want to approve this receipt?") == false) {
            return false;
        }
        $('#ReceiptID_' + receipt_id).fadeOut(300, function() {
            $(this).remove();
        });
        $.get('{{LINK aj/ap/approve_receipt}}',{receipt_id: receipt_id, receipt_file: photo_file})
        .done(function( data ) {
            //window.location = window.location.href;
        });

    }

</script>