<?php
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<table class="table table-bordered table-condensed"  style="font-size: 8pt">
    <thead>
    <th>Data Cadastro</th>
    <th>#ID</th>
    <th>Login</th>
    <th>Forma Pagamento</th>
    <th>Valor Pagamento</th>
    <th>Detalhes</th>
    <th>Status</th>
    <th>&nbsp;</th>
</thead>
<tbody>
    <?php foreach ($transacoes_login as $tl): ?>
        <tr>
            <td><?= date('d/m/Y', strtotime($tl['data_cad'])); ?></td>
            <td>#<?= $tl['id'] ?></td>
            <td><?= ($tl['name'] != "") ? $tl['name'] : '<span style="color: red">Login Removida</span>'; ?></td>
            <td><?= $pagamento[$tl['tipo']]; ?></td>
            <td>R$ <?= $tl['valor_total']; ?></td>
            <td><?= $tl['detalhes']; ?></td>
            <td><?= $status[$tl['status']]; ?></td>
            <td><?php if ($tl['status'] != "0" && $tl['status'] != "3") { ?>[<a href="transacoes.alterar_status.php?trans=login&id=<?= $tl['id'] ?>" class="altera_status_login">Alterar Status</a>]<?php } ?>&nbsp;[<a href="transacoes.php?remove_trans_login&id=<?= $tl['id'] ?>" class="remover_login">Remover</a>]</td>
        </tr>
    <?php endforeach; ?>
</tbody>
</table>
<script>
    $(document).ready(function () {

        $('.mostra-comprovante').janelaCentro({
            w: 800,
            h: 600
        });

        $('.altera_status_login').janelaCentro({
            w: 400,
            h: 300
        });

        $('.remover_login').janelaCentro({
            w: 400,
            h: 250,
            confirma: function () {
                return window.confirm('Deseja Mesmo Remover Este Registro?');
            }
        });
        
    });
</script>

