Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
wobblies
/
admin
:
users.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php include 'head.php'; include 'header.php'; ?> <body class="skin-default fixed-layout"> <div id="main-wrapper"> <?php include 'sidebar.php'; ?> <div class="page-wrapper"> <section> <div class=""> <?php include 'nav1.php'; ?> <div class="container-fluid"> <div class="card"> <div class="card-header"> <?php echo isset($_SESSION['mgs']) ? $_SESSION['mgs'] : "" ?> </div> <div class="card-body"> <div class="table-responsive"> <table class="table"> <thead> <th>#</th> <th>UserID</th> <th>Fullname</th> <th>Email</th> <th>Profit Balance</th> <th>Balance</th> <th>Status</th> <th>Actions</th> </thead> <tbody> <?php // Include your database connection file include_once ("../_db.php"); // Query to fetch data from user_login table $result = $conn->query("SELECT * FROM user_login"); if ($result !== false && $result->num_rows > 0) { $num = 1; while ($row = $result->fetch_assoc()) { ?> <tr> <td><?php echo $num++; ?></td> <td><?php echo $row['userid']; ?></td> <td><?php echo $row['full_name']; ?></td> <td><?php echo $row['email']; ?></td> <td>$<?php echo number_format($row['profit_balance'], 2); ?></td> <td>$<?php echo number_format($row['account_balance'], 2); ?></td> <td><?php echo $row['status']; ?></td> <td> <?php if ($row['status'] == 'pending') : ?> <a href="user_controller.php?id=<?php echo $row['userid']; ?>&status=verify" class="btn btn-primary btn-sm my-2">Verify User</a> <?php else : ?> <span class="btn btn-success btn-sm">Verified</span> <?php endif; ?> </td> <!-- Inside your while loop where you display users --> <!-- Inside your while loop where you display users --> <td> <a href="update_balance.php?id=<?php echo $row['id']; ?>" class="btn btn-info btn-sm">Edit</a> <a href="controller.php?userid=<?php echo $row['userid']; ?>&status=delete" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to delete this account?');"> Delete </a> </td> </tr> <?php } } else { echo "<tr><td colspan='7'>No users found.</td></tr>"; } ?> </tbody> </table> </div> </div> </div> </div> </div> </section> </div> </div> <?php include 'footer.php'; ?> </body> </html>