diff --git a/admin.php b/admin.php index 9f2684a..6da70f3 100644 --- a/admin.php +++ b/admin.php @@ -4,13 +4,13 @@ require_once __DIR__ . '/db/config.php'; $pdo = db(); -if (!isset($_SESSION['user_id'])) { +if (!isset($_SESSION['admin_id'])) { header('Location: /admin_login.php'); exit; } $stmt = $pdo->prepare("SELECT * FROM admin_users WHERE id = ?"); -$stmt->execute([$_SESSION['user_id']]); +$stmt->execute([$_SESSION['admin_id']]); $admin = $stmt->fetch(); $user = $admin; $user["role"] = "admin"; @@ -135,7 +135,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($action === 'delete_user') { $id = $_POST['id']; - if ($id != $_SESSION['user_id']) { + if ($id != $_SESSION['admin_id']) { // Foreign keys are ON DELETE CASCADE, so this is safe $stmt = $pdo->prepare("DELETE FROM admin_users WHERE id = ?"); $stmt->execute([$id]); @@ -315,7 +315,7 @@ $stats = [ - +
diff --git a/assets/pasted-20260322-121536-04eb097b.png b/assets/pasted-20260322-121536-04eb097b.png new file mode 100644 index 0000000..9cd5ac7 Binary files /dev/null and b/assets/pasted-20260322-121536-04eb097b.png differ diff --git a/assets/pasted-20260322-123203-7abf0699.png b/assets/pasted-20260322-123203-7abf0699.png new file mode 100644 index 0000000..c63a11b Binary files /dev/null and b/assets/pasted-20260322-123203-7abf0699.png differ diff --git a/assets/pasted-20260322-123900-81d3c429.png b/assets/pasted-20260322-123900-81d3c429.png new file mode 100644 index 0000000..0f190d6 Binary files /dev/null and b/assets/pasted-20260322-123900-81d3c429.png differ diff --git a/dashboard.php b/dashboard.php index 9470fb9..ba0abda 100644 --- a/dashboard.php +++ b/dashboard.php @@ -171,7 +171,7 @@ $notice_text = $settings['notice_text'] ?? '欢迎使用全球接码平台!'; transition: all 0.2s; } .quotation-item:hover { background: #f8fafc; } - .quotation-item:last-child { border-bottom: none; border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); } + .quotation-item:last-child { border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); } .quotation-item:first-child { border-top-left-radius: var(--radius-lg); border-top-right-radius: var(--radius-lg); } .btn-get { @@ -237,6 +237,23 @@ $notice_text = $settings['notice_text'] ?? '欢迎使用全球接码平台!'; border-color: var(--primary); } + /* 提示框样式 */ + .toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; } + .custom-toast { background: white; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 16px 24px; border: 1px solid var(--border-color); margin-bottom: 10px; display: flex; align-items: center; gap: 12px; } + .custom-toast.error { border-left: 4px solid #ef4444; } + .custom-toast.success { border-left: 4px solid #22c55e; } + + /* Modal Custom Style */ + .modal-custom { + position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 3000; + display: none; align-items: center; justify-content: center; + background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); + } + .modal-content-custom { + background: white; width: 400px; border-radius: 20px; padding: 2rem; + box-shadow: var(--shadow-lg); text-align: center; + } + @media (max-width: 992px) { .main-content { margin-left: 0; padding: 1.5rem; } .search-grid { grid-template-columns: 1fr; gap: 1rem; } @@ -248,13 +265,27 @@ $notice_text = $settings['notice_text'] ?? '欢迎使用全球接码平台!'; +
+ + + +