🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:index.php
<?php include 'header.php'; ?> <div class="d-flex justify-content-between align-items-center mb-4"> <h2>Dashboard</h2> </div> <div class="row"> <div class="col-md-4"> <div class="card p-4 bg-primary text-white"> <h5>Total Products</h5> <?php $count = $conn->query("SELECT COUNT(*) as total FROM products")->fetch_assoc(); ?> <h2 class="mb-0"><?php echo $count['total']; ?></h2> </div> </div> <div class="col-md-4"> <div class="card p-4 bg-success text-white"> <h5>WhatsApp Clicks</h5> <h2 class="mb-0">--</h2> </div> </div> <div class="col-md-4"> <div class="card p-4 bg-info text-white"> <h5>Categories</h5> <?php $count = $conn->query("SELECT COUNT(*) as total FROM categories")->fetch_assoc(); ?> <h2 class="mb-0"><?php echo $count['total']; ?></h2> </div> </div> </div> <div class="mt-5"> <h4>Recent Products</h4> <div class="card"> <div class="table-responsive"> <table class="table table-hover mb-0"> <thead> <tr> <th>Image</th> <th>Name</th> <th>Category</th> <th>Price</th> <th>Action</th> </tr> </thead> <tbody> <?php $res = $conn->query("SELECT p.*, c.name as cat_name FROM products p JOIN categories c ON p.category_id = c.id ORDER BY p.id DESC LIMIT 5"); while($row = $res->fetch_assoc()): ?> <tr> <td><img src="../uploads/<?php echo $row['image']; ?>" height="40"></td> <td><?php echo $row['name']; ?></td> <td><?php echo $row['cat_name']; ?></td> <td>Rs. <?php echo number_format($row['price'], 2); ?></td> <td> <a href="products.php?edit=<?php echo $row['id']; ?>" class="btn btn-sm btn-outline-primary"><i class="fa fa-edit"></i></a> </td> </tr> <?php endwhile; ?> </tbody> </table> </div> </div> </div> <?php include 'footer.php'; ?>
Save Changes
Cancel
Create New File
Create New Folder