From 21a56df14c0c9268c9cdba0e418bf2665bd80752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E9=92=B0=E8=B1=86=E8=B1=86?= Date: Sun, 18 Aug 2019 22:59:36 +0800 Subject: [PATCH] update --- core/controllers/about.php | 14 +++++++------- core/controllers/news.php | 2 +- .../views/{about_crogram.php => about/crogram.php} | 0 .../{about_ifastnet.php => about/ifastnet.php} | 0 core/views/{about_uiisc.php => about/uiisc.php} | 0 core/views/{news_details.php => news/details.php} | 0 core/views/{news.php => news/list.php} | 0 7 files changed, 8 insertions(+), 8 deletions(-) rename core/views/{about_crogram.php => about/crogram.php} (100%) rename core/views/{about_ifastnet.php => about/ifastnet.php} (100%) rename core/views/{about_uiisc.php => about/uiisc.php} (100%) rename core/views/{news_details.php => news/details.php} (100%) rename core/views/{news.php => news/list.php} (100%) diff --git a/core/controllers/about.php b/core/controllers/about.php index 9c97d36..6b9c975 100644 --- a/core/controllers/about.php +++ b/core/controllers/about.php @@ -6,17 +6,17 @@ if (!defined('IN_SYS')) { } $section = empty($_GET["s"]) ? "uiisc" : $_GET["s"]; -$enable_section = [ - "crogram" => ["title" => "Crogram"], - "ifastnet" => ["title" => "iFastNet"], - "uiisc" => ["title" => "UIISC"] -]; +$enable_section = array( + "crogram" => array("title" => "Crogram"), + "ifastnet" => array("title" => "iFastNet"), + "uiisc" => array("title" => "UIISC") +); -$section_page = "{$ROOT}/core/views/about_{$section}.php"; +$section_page = "{$ROOT}/core/views/about/{$section}.php"; if (is_file(($section_page))) { $title = $title . ' - ' . $lang->I18N('about') . ' ' . $enable_section[$section]['title']; } else { $title = $title . ' - ' . $lang->I18N('about'); - $section_page = "{$ROOT}/core/views/about_uiisc.php"; + $section_page = "{$ROOT}/core/views/about/uiisc.php"; } diff --git a/core/controllers/news.php b/core/controllers/news.php index 5827297..86300b1 100644 --- a/core/controllers/news.php +++ b/core/controllers/news.php @@ -8,7 +8,7 @@ if (!defined('IN_SYS')) { $title = $title . ' - ' . $lang->I18N('news'); $news_id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING); -$section_page = empty($news_id) ? "{$ROOT}/core/views/news.php" : "{$ROOT}/core/views/news_details.php"; +$section_page = empty($news_id) ? "{$ROOT}/core/views/news/list.php" : "{$ROOT}/core/views/news/details.php"; if (!is_file($section_page)) { header("HTTP/1.1 404 Not Found"); diff --git a/core/views/about_crogram.php b/core/views/about/crogram.php similarity index 100% rename from core/views/about_crogram.php rename to core/views/about/crogram.php diff --git a/core/views/about_ifastnet.php b/core/views/about/ifastnet.php similarity index 100% rename from core/views/about_ifastnet.php rename to core/views/about/ifastnet.php diff --git a/core/views/about_uiisc.php b/core/views/about/uiisc.php similarity index 100% rename from core/views/about_uiisc.php rename to core/views/about/uiisc.php diff --git a/core/views/news_details.php b/core/views/news/details.php similarity index 100% rename from core/views/news_details.php rename to core/views/news/details.php diff --git a/core/views/news.php b/core/views/news/list.php similarity index 100% rename from core/views/news.php rename to core/views/news/list.php