<?php
/**
 * @property mysqli_connect $con
 */
?>
<?php
require("includes/logincheck.php");
require("config.php");
require("includes/functions.php");
require("includes/settings.php");

$titulo = "Minhas Transações";

// saldo pre pago revendas

$saldo_revenda_pre = saldo_subrevenda_pre($_SESSION['adminid'], true);

?>
<!-- topo -->
<?php require_once __DIR__ . '/includes/topo.php'; ?>
<!-- corpo -->
<div class="container">
    <!-- Menu -->
    <?php require_once __DIR__ . '/includes/menu.php'; ?>
    <!-- conteudo -->
    <h6>Cota Pré Paga Revendas</h6>
    <?php if (count($saldo_revenda_pre) > 0): ?>  
    <div class="table-responsive col-sm-5">
    <table class="table table-bordered" style="font-size: 8pt">
            <thead>
            <th>Revenda</th>
            <th>Saldo Disponivel</th>
            <th>Saldo Bloqueado</th>
            <th>Total</th>
            </thead>
            <?php 
            
            foreach ($saldo_revenda_pre as $revenda):   
                
                ?>

                <tr>
                    <td><?= $revenda['username']?></td>
                    <td><?= $revenda['saldo_real']?></td>
                    <td><?= $revenda['saldo_bloqueado']?></td>
                    <td><?= $revenda['saldo_atual'] ?></td>
                </tr>

            <?php endforeach; ?>
        </table>
    <?php else: ?>
        <div>Não existem revendas cadastradas</div>
    <?php endif; ?>
    </div>
</div>
<?php require_once __DIR__ . '/includes/rodape.php'; ?>



