File manager - Edit - /home/webapp69.cm.in.th/u69319090028/Shop/views/admin/settings/index.php
Back
<div class="d-flex flex-column flex-md-row justify-content-between align-items-md-center gap-2 mb-4"> <div> <h4 class="fw-bold mb-1 text-dark">ตั้งค่าระบบแพลตฟอร์ม (Platform Settings)</h4> <p class="text-muted small mb-0">กำหนดค่าการทำงาน กฎเกณฑ์มาร์เก็ตเพลส ช่องทางการชำระเงิน และการเปิด-ปิดระบบ</p> </div> </div> <form action="<?= url('/admin/settings') ?>" method="POST"> <?= Security::csrfField() ?> <?php $groupMeta = [ 'general' => ['bi-sliders', 'การตั้งค่าทั่วไป (General Platform Settings)', 'ชื่อระบบ ภาษาหลัก และการเปิด-ปิดโหมดปิดปรับปรุงระบบ'], 'marketplace' => ['bi-shop', 'กฎเกณฑ์มาร์เก็ตเพลส (Marketplace Rules)', 'อัตราค่าคอมมิชชันเริ่มต้น การรับสมัครผู้ขาย และการอนุมัติสินค้า'], 'payment' => ['bi-credit-card', 'ช่องทางการชำระเงิน (Payment Options)', 'การเปิดรับการชำระเงินประเภทต่าง ๆ บนระบบ'], 'notification' => ['bi-bell', 'การแจ้งเตือนและการสื่อสาร (Notification Events)', 'เหตุการณ์ที่จะส่งการแจ้งเตือนไปยังผู้ใช้และผู้ขาย'], 'security' => ['bi-shield-check', 'ความปลอดภัย (Security & Compliance)', 'นโยบายรหัสผ่านและการจัดการสิทธิ์การเข้าถึง'], ]; foreach ($settings as $group => $items): [$icon, $title, $subtitle] = $groupMeta[$group] ?? ['bi-gear', ucfirst($group), '']; ?> <div class="admin-setting-section mb-4"> <div class="admin-detail-card-header"> <div> <div class="fw-bold text-dark"><i class="bi <?= $icon ?> text-primary me-2"></i><?= e($title) ?></div> <?php if ($subtitle): ?> <div class="text-muted small fw-normal"><?= e($subtitle) ?></div> <?php endif; ?> </div> </div> <div> <?php foreach ($items as $setting): $key = $setting['setting_key']; $val = $setting['setting_value']; $desc = $setting['description'] ?? ''; $isBool = in_array($key, ['maintenance_mode','allow_seller_registration','cod_enabled','bank_transfer_enabled','notify_new_order','notify_order_shipped'], true); $isCritical = in_array($key, ['maintenance_mode', 'allow_seller_registration'], true); ?> <div class="admin-setting-row"> <div class="admin-setting-info"> <div class="d-flex align-items-center gap-2"> <span class="admin-setting-title"><?= e($key) ?></span> <?php if ($isCritical): ?> <span class="badge bg-danger bg-opacity-10 text-danger border border-danger border-opacity-25" style="font-size: 0.65rem;">Critical Impact</span> <?php endif; ?> </div> <?php if ($desc): ?> <p class="admin-setting-desc"><?= e($desc) ?></p> <?php endif; ?> </div> <div class="admin-setting-control"> <?php if ($isBool): ?> <div class="form-check form-switch d-flex align-items-center gap-2 m-0"> <input class="form-check-input fs-5 m-0" type="checkbox" role="switch" name="<?= e($key) ?>" id="setting_<?= e($key) ?>" value="1" <?= $val == '1' ? 'checked' : '' ?>> <label class="form-check-label small fw-medium text-dark cursor-pointer" for="setting_<?= e($key) ?>"> <?= $val == '1' ? '<span class="text-success fw-semibold">เปิดใช้งาน (Enabled)</span>' : '<span class="text-muted">ปิดใช้งาน (Disabled)</span>' ?> </label> </div> <?php else: ?> <input type="text" name="<?= e($key) ?>" value="<?= e($val) ?>" class="form-control form-control-sm font-monospace text-dark"> <?php endif; ?> </div> </div> <?php endforeach; ?> </div> </div> <?php endforeach; ?> <div class="d-flex justify-content-end align-items-center gap-3 mt-4 mb-5 p-3 bg-white border rounded-3 shadow-xs"> <span class="text-muted small"><i class="bi bi-info-circle me-1"></i>การเปลี่ยนแปลงจะมีผลต่อระบบทันทีที่บันทึก</span> <button type="submit" class="btn btn-primary px-4 py-2"> <i class="bi bi-check2-circle me-1"></i>บันทึกการตั้งค่าทั้งหมด </button> </div> </form>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.24 |
proxy
|
phpinfo
|
Settings