ez-site/index.php
2024-10-19 21:33:47 +08:00

34 lines
795 B
PHP

<?php
include('config.php');
include 'core/db.php';
session_start();
include('core/safe/waf.php');
// 获取参数
$page = isset($_GET['page']) ? sanitizeInput($_GET['page']) : '';
$api = isset($_GET['api']) ? sanitizeInput($_GET['api']) : '';
if (empty($page) and empty($api)) {
$page = 'home';
include('includes/header.php');
include('includes/home.php');
include('includes/footer.php');
}
elseif ($page == 'article') {
include('includes/article.php');
}
elseif ($page == 'account') {
include('includes/header.php');
include('includes/account.php');
}
elseif (empty($page) and !empty($api)) {
include('apis/' . $api . '.php');
}
else {
include('includes/header.php');
include('includes/' . $page . '.php');
include('includes/footer.php');
}
?>