49 lines
1.9 KiB
PHP
49 lines
1.9 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
require_once __DIR__ . '/includes/bootstrap.php';
|
|
require_once __DIR__ . '/includes/twilio.php';
|
|
|
|
if (!check_admin_auth()) {
|
|
header('Location: admin/login.php');
|
|
exit;
|
|
}
|
|
|
|
$pdo = db();
|
|
$tab = $_GET['tab'] ?? 'dashboard';
|
|
?>
|
|
<!doctype html>
|
|
<html lang="zh">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>后台管理 - Twilio Console</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<style>
|
|
.admin-layout { display: flex; min-height: 100vh; }
|
|
.sidebar { width: 250px; background: #212529; color: #fff; padding: 20px; flex-shrink: 0; }
|
|
.sidebar a { color: #adb5bd; display: block; padding: 12px 15px; text-decoration: none; border-radius: 4px; margin-bottom: 5px; transition: 0.3s; }
|
|
.sidebar a:hover, .sidebar a.active { color: #fff; background: #0d6efd; }
|
|
.content { flex: 1; padding: 30px; background: #f8f9fa; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="admin-layout">
|
|
<nav class="sidebar">
|
|
<h5 class="mb-4 text-center">管理控制台</h5>
|
|
<a class="<?= $tab === 'dashboard' ? 'active' : '' ?>" href="admin.php?tab=dashboard">仪表盘</a>
|
|
<a class="<?= $tab === 'twilio' ? 'active' : '' ?>" href="admin.php?tab=twilio">Twilio 配置</a>
|
|
<a class="<?= $tab === 'messages' ? 'active' : '' ?>" href="admin.php?tab=messages">消息日志</a>
|
|
<a class="<?= $tab === 'billing' ? 'active' : '' ?>" href="admin.php?tab=billing">计费报表</a>
|
|
<hr>
|
|
<a href="admin.php?logout=1" class="text-danger">退出登录</a>
|
|
</nav>
|
|
|
|
<main class="content">
|
|
<div class="card p-4 shadow-sm">
|
|
<h1 class="h4 mb-4">当前模块:<?= ucfirst($tab) ?></h1>
|
|
<p>系统已就绪,正在进行双向通信管理。</p>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</body>
|
|
</html>
|