File manager - Edit - /home/webapp69.cm.in.th/u69319090039/Shop39/app/Views/admin/stores/detail.php
Back
<div class="mb-4"> <a href="<?= APP_URL ?>/admin/stores" class="btn btn-outline-secondary btn-sm rounded-pill"><i class="bi bi-arrow-left me-1"></i>กลับไปหน้าร้านค้า</a> </div> <div class="row g-4"> <!-- Store Info Card --> <div class="col-lg-4"> <div class="card border-0 shadow-sm rounded-3 p-4 bg-white text-center"> <img src="<?= APP_URL ?>/public/uploads/<?= Security::e($store['logo'] ?? 'default-shop-logo.png') ?>" alt="logo" class="rounded-circle mx-auto mb-3" style="width: 120px; height: 120px; object-fit: cover; border: 3px solid #dee2e6;"> <h4 class="fw-bold text-dark mb-1"><?= Security::e($store['shop_name']) ?></h4> <p class="text-muted small mb-3">@<?= Security::e($store['slug']) ?></p> <?php if ($store['status'] === 'approved') { $badge = 'bg-success'; $lbl = 'Active'; } elseif ($store['status'] === 'suspended') { $badge = 'bg-warning text-dark'; $lbl = 'Suspended'; } elseif ($store['status'] === 'banned') { $badge = 'bg-danger'; $lbl = 'Banned'; } elseif ($store['status'] === 'rejected') { $badge = 'bg-secondary'; $lbl = 'Rejected'; } else { $badge = 'bg-light text-dark'; $lbl = 'Pending'; } ?> <div> <span class="badge <?= $badge ?> px-3 py-2 rounded-pill fs-6"><?= $lbl ?></span> </div> <?php if ($store['status'] === 'suspended' && !empty($store['suspended_reason'])): ?> <div class="alert alert-warning border-0 mt-3 mb-0 small"> <strong>ระงับเนื่องจาก:</strong><br> <?= Security::e($store['suspended_reason']) ?><br> <span class="text-muted text-xs">เมื่อ: <?= date('d/m/Y H:i', strtotime($store['suspended_at'])) ?></span> </div> <?php endif; ?> <hr class="my-4"> <div class="text-start"> <h6 class="fw-bold text-muted mb-3">ข้อมูลการติดต่อ</h6> <p class="mb-2"><strong>เจ้าของร้าน:</strong> <?= Security::e($store['full_name']) ?></p> <p class="mb-2"><strong>อีเมล:</strong> <?= Security::e($store['email']) ?></p> <p class="mb-2"><strong>เบอร์โทรศัพท์:</strong> <?= Security::e($store['phone']) ?></p> <p class="mb-2"><strong>ที่อยู่ร้าน:</strong><br><span class="text-muted small"><?= nl2br(Security::e($store['address'])) ?></span></p> <p class="mb-2"><strong>PromptPay:</strong> <?= Security::e($store['promptpay_number'] ?? '-') ?></p> <p class="mb-0"><strong>บัญชีธนาคาร:</strong> <?= Security::e($store['bank_account'] ?? '-') ?></p> </div> </div> </div> <!-- Store Statistics & Lists --> <div class="col-lg-8"> <!-- Stats Widgets --> <div class="row g-3 mb-4"> <div class="col-md-3"> <div class="card border-0 shadow-sm p-3 bg-white text-center"> <div class="text-muted small mb-1">ยอดขายสะสม</div> <h5 class="fw-bold text-success m-0">฿<?= number_format($store['total_sales'], 2) ?></h5> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm p-3 bg-white text-center"> <div class="text-muted small mb-1">จำนวนสินค้า</div> <h5 class="fw-bold m-0"><?= number_format($store['product_count']) ?> ชิ้น</h5> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm p-3 bg-white text-center"> <div class="text-muted small mb-1">ออเดอร์ทั้งหมด</div> <h5 class="fw-bold m-0"><?= number_format($store['order_count']) ?> รายการ</h5> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm p-3 bg-white text-center"> <div class="text-muted small mb-1">คะแนนรีวิวเฉลี่ย</div> <h5 class="fw-bold m-0"><?= number_format($store['avg_rating'], 1) ?> ⭐</h5> </div> </div> </div> <!-- Recent Products --> <div class="card border-0 shadow-sm rounded-3 mb-4 p-4"> <h5 class="fw-bold mb-3"><i class="bi bi-box-seam me-2"></i>สินค้าล่าสุด (10 ชิ้นล่าสุด)</h5> <div class="table-responsive"> <table class="table table-hover align-middle mb-0"> <thead class="table-light"> <tr> <th>สินค้า</th> <th>ราคา</th> <th>สต๊อก</th> <th>สถานะ</th> </tr> </thead> <tbody> <?php if (empty($recentProducts)): ?> <tr> <td colspan="4" class="text-center text-muted py-3">ไม่มีข้อมูลสินค้า</td> </tr> <?php endif; ?> <?php foreach ($recentProducts as $p): ?> <tr> <td> <div class="d-flex align-items-center"> <img src="<?= APP_URL ?>/public/<?= Security::e($p['primary_image'] ?? 'assets/images/placeholder.jpg') ?>" class="rounded me-2" style="width: 40px; height: 40px; object-fit: cover;"> <div> <div class="fw-semibold small text-dark"><?= Security::e($p['title']) ?></div> <div class="text-xs text-muted">SKU: <?= Security::e($p['sku']) ?></div> </div> </div> </td> <td>฿<?= number_format($p['price'], 2) ?></td> <td><?= number_format($p['stock_quantity']) ?> ชิ้น</td> <td> <span class="badge bg-<?= $p['status'] === 'active' ? 'success' : 'secondary' ?>"><?= $p['status'] ?></span> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> </div> <!-- Recent Orders --> <div class="card border-0 shadow-sm rounded-3 p-4"> <h5 class="fw-bold mb-3"><i class="bi bi-receipt me-2"></i>ออเดอร์ล่าสุด (10 รายการล่าสุด)</h5> <div class="table-responsive"> <table class="table table-hover align-middle mb-0"> <thead class="table-light"> <tr> <th>เลขที่ออเดอร์</th> <th>ลูกค้า</th> <th>ยอดรวม</th> <th>สถานะ</th> <th>วันที่สั่งซื้อ</th> </tr> </thead> <tbody> <?php if (empty($recentOrders)): ?> <tr> <td colspan="5" class="text-center text-muted py-3">ไม่มีข้อมูลคำสั่งซื้อ</td> </tr> <?php endif; ?> <?php foreach ($recentOrders as $o): ?> <tr> <td class="fw-bold text-primary"><?= Security::e($o['order_number']) ?></td> <td><?= Security::e($o['customer_name']) ?></td> <td>฿<?= number_format($o['total_amount'], 2) ?></td> <td> <span class="badge bg-secondary"><?= Security::e($o['status']) ?></span> </td> <td><?= date('d/m/Y H:i', strtotime($o['created_at'])) ?></td> </tr> <?php endforeach; ?> </tbody> </table> </div> </div> </div> </div>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.24 |
proxy
|
phpinfo
|
Settings