Viewing File: /home/rareljzw/public_html/admin/transactions.php

<?php




$pageName  = "All Website Transactions";
include($_SERVER['DOCUMENT_ROOT']."/admin/layout/header.php");


//$balances = $row['acct_balance']->rowCount();

?>

<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
           All Website Transactions
        </h1>
        <ol class="breadcrumb">
            <li><a href="./dashboard"><i class="fa fa-dashboard"></i> Dashboard</a></li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    
                    <!-- /.box-header -->
                    <div class="box-body">
                    <div class="table-responsive">
                        <table id="example2" class="table table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th>No</th>
                                    <th>Username</th>
                                    <th>Amount</th>
                                    <th>Type</th>
                                    <th>Status</th>
                                    <th>Date</th>
                                    <th>Action</th>
                                </tr>
                            </thead>
                            <tbody>
                            <?php
                            $sql="SELECT * FROM wallet LEFT JOIN users ON wallet.username = users.username WHERE wallet.refrence_id order by wallet.refrence_id DESC";
                            $stmt = $conn->prepare($sql);
                            $stmt->execute();
                            $sn=1;
                            while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){
                                $transStatus = transStatus($row);
                                ?>
                                <tr>
                                    <td><?= $sn++ ?></td>
                                    <td><a href="./view-users.php?id=<?php echo $row['username']; ?>" target="_blank">@<?= $row['username'] ?></a></td>
                                    <td>$<?= $row['amount'] ?></td>
                                    <td><?= $transStatus ?></td>
                                    <td><?= $row['trans_type'] ?></td>
                                    <td><?= $row['createdAt'] ?></td>
                                    <td>
                                    <a href="./delete_transactions.php?id=<?= $row['refrence_id']; ?>" class="btn btn-danger">Del</a>
                                
                                
                                </td>
                                   
                                </tr>

                                <?php 
                                }
                                ?>
                                
                                
                            </tbody>
                            <tfoot>
                                <tr>
                                   <br>
                                </tr>
                            </tfoot>
                        </table>
                    </div>
                </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->

              
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->


<?php
include($_SERVER['DOCUMENT_ROOT']."/admin/layout/footer.php");

?>
Back to Directory File Manager
<