File manager - Edit - /home/webapp69.cm.in.th/u69319090039/Shop39/public/app/Views/admin/dashboard.php
Back
<h4 class="fw-bold mb-4"><i class="bi bi-speedometer2 text-danger me-2"></i>Platform Admin Dashboard</h4> <!-- Critical Store Alert (avg < 2.0) --> <?php if (!empty($criticalStores)): ?> <div class="alert alert-danger border-0 shadow-sm mb-4" role="alert"> <div class="d-flex align-items-center mb-2"> <i class="bi bi-exclamation-triangle-fill fs-4 me-2"></i> <h6 class="fw-bold m-0">⚠️ แจ้งเตือน: มีร้านค้าที่ต้องตรวจสอบ (คะแนนเฉลี่ยต่ำกว่า 2.0 ดาว)</h6> </div> <ul class="mb-2 ps-3"> <?php foreach ($criticalStores as $cs): ?> <li> <strong><?= Security::e($cs['shop_name']) ?></strong> — <span class="text-danger fw-bold"><?= number_format($cs['avg_rating'], 1) ?> ⭐</span> (<?= $cs['review_count'] ?> รีวิว) <a href="<?= APP_URL ?>/admin/stores/detail/<?= $cs['id'] ?>" class="btn btn-sm btn-outline-danger ms-2 rounded-pill px-3">ตรวจสอบ</a> </li> <?php endforeach; ?> </ul> </div> <?php endif; ?> <!-- Low Rating Warning (avg < 2.5) --> <?php if (!empty($lowRatingStores) && empty($criticalStores)): ?> <div class="alert alert-warning border-0 shadow-sm mb-4" role="alert"> <i class="bi bi-exclamation-circle-fill me-2"></i> มีร้านค้า <?= count($lowRatingStores) ?> ร้านที่คะแนนรีวิวเฉลี่ยต่ำกว่า 2.5 ดาว <a href="<?= APP_URL ?>/admin/stores?status=approved" class="btn btn-sm btn-warning ms-2 rounded-pill px-3">ดูรายการ</a> </div> <?php endif; ?> <!-- Main Stats Row --> <div class="row g-4 mb-4"> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-3 p-4 bg-danger text-white"> <h6 class="text-white-50 fw-bold mb-2">ยอดขายรวมทั้งแพลตฟอร์ม</h6> <h3 class="fw-bold m-0">฿<?= number_format($totalSales, 2) ?></h3> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-3 p-4 bg-primary text-white"> <h6 class="text-white-50 fw-bold mb-2">จำนวนสมาชิกทั้งหมด</h6> <h3 class="fw-bold m-0"><?= number_format($totalUsers) ?> คน</h3> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-3 p-4 bg-success text-white"> <h6 class="text-white-50 fw-bold mb-2">ร้านค้าที่อนุมัติแล้ว</h6> <h3 class="fw-bold m-0"><?= number_format($totalSellers) ?> ร้าน</h3> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-3 p-4 bg-warning text-dark"> <h6 class="text-dark-50 fw-bold mb-2">คำขอเปิดร้านค้ารออนุมัติ</h6> <h3 class="fw-bold m-0"><?= number_format($pendingSellers) ?> คำขอ</h3> </div> </div> </div> <!-- Store Management Widgets Row --> <div class="row g-4 mb-4"> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-3 p-4" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white;"> <h6 class="fw-bold mb-2" style="color: rgba(255,255,255,0.7);">ร้านค้าทั้งหมด</h6> <h3 class="fw-bold m-0"><?= number_format($totalSellers) ?> ร้าน</h3> <a href="<?= APP_URL ?>/admin/stores" class="text-white-50 small mt-2 d-block">ดูทั้งหมด →</a> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-3 p-4" style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white;"> <h6 class="fw-bold mb-2" style="color: rgba(255,255,255,0.7);">ร้านค้าที่ถูกระงับ</h6> <h3 class="fw-bold m-0"><?= number_format($suspendedStores) ?> ร้าน</h3> <a href="<?= APP_URL ?>/admin/stores?status=suspended" class="text-white-50 small mt-2 d-block">ดูรายการ →</a> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-3 p-4" style="background: linear-gradient(135deg, #1e1e2f 0%, #3d3d5c 100%); color: white;"> <h6 class="fw-bold mb-2" style="color: rgba(255,255,255,0.7);">ร้านค้าที่ถูกแบน</h6> <h3 class="fw-bold m-0"><?= number_format($bannedStores) ?> ร้าน</h3> <a href="<?= APP_URL ?>/admin/stores?status=banned" class="text-white-50 small mt-2 d-block">ดูรายการ →</a> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-3 p-4" style="background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%); color: #721c24;"> <h6 class="fw-bold mb-2" style="color: rgba(114,28,36,0.7);">คะแนนต่ำกว่า 2.5 ดาว</h6> <h3 class="fw-bold m-0"><?= number_format($lowRatingCount) ?> ร้าน</h3> <a href="<?= APP_URL ?>/admin/stores" class="small mt-2 d-block" style="color: rgba(114,28,36,0.5);">ตรวจสอบ →</a> </div> </div> </div> <div class="card border-0 shadow-sm rounded-3 p-4"> <h5 class="fw-bold mb-3">การจัดการแพลตฟอร์ม</h5> <p class="text-muted">ตรวจสอบอนุมัติคำขอเปิดร้านค้าจากผู้ใช้งาน กำหนดหมวดหมู่สินค้าหลัก และกำกับดูแลภาพรวมของตลาดออนไลน์</p> <a href="<?= APP_URL ?>/admin/sellers" class="btn btn-warning fw-bold text-dark rounded-pill me-2 px-4">ดูคำขอเปิดร้านค้ารออนุมัติ</a> <a href="<?= APP_URL ?>/admin/stores" class="btn btn-primary fw-bold rounded-pill me-2 px-4">จัดการร้านค้า</a> </div>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.23 |
proxy
|
phpinfo
|
Settings