From b35d95df7685d74a2614bb44f074e6cc857f4726 Mon Sep 17 00:00:00 2001 From: xiaomlove <353856593@qq.com> Date: Wed, 3 Feb 2021 18:41:53 +0800 Subject: [PATCH] Added: guest login and secret login --- _db/dbstructure_v1.6.sql | 2 +- include/bittorrent.php | 2 - include/core.php | 4 +- include/functions.php | 130 ++++++++++++++++-- include/globalfunctions.php | 4 +- lang/chs/lang_settings.php | 12 ++ lang/cht/lang_settings.php | 12 ++ lang/en/lang_settings.php | 30 ++-- nexus/Install/install/install.php | 2 +- nexus/Install/update/update.php | 2 +- public/login.php | 1 + public/settings.php | 29 +++- resources/static-pages/beian-aliyun2.html | 94 ------------- .../templates/guest-visit-custom-content.php | 14 ++ 14 files changed, 211 insertions(+), 127 deletions(-) delete mode 100644 resources/static-pages/beian-aliyun2.html create mode 100644 resources/templates/guest-visit-custom-content.php diff --git a/_db/dbstructure_v1.6.sql b/_db/dbstructure_v1.6.sql index 3b32b213..10c07ec4 100644 --- a/_db/dbstructure_v1.6.sql +++ b/_db/dbstructure_v1.6.sql @@ -2324,4 +2324,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2021-02-01 20:09:25 +-- Dump completed on 2021-02-03 18:34:39 diff --git a/include/bittorrent.php b/include/bittorrent.php index d3838022..02b9690d 100644 --- a/include/bittorrent.php +++ b/include/bittorrent.php @@ -13,5 +13,3 @@ $rootpath .= "/"; require $rootpath . 'include/functions.php'; require $rootpath . 'include/globalfunctions.php'; require $rootpath . 'include/core.php'; - - diff --git a/include/core.php b/include/core.php index 589f794a..9cc7bd0c 100644 --- a/include/core.php +++ b/include/core.php @@ -4,7 +4,8 @@ if(!defined('IN_TRACKER')) { } define('ROOT_PATH', $rootpath); define('VERSION_NUMBER', '1.6.0'); -define('IS_ANNOUNCE', (basename($_SERVER['SCRIPT_FILENAME']) == 'announce.php')); +define('CURRENT_SCRIPT', strstr(basename($_SERVER['SCRIPT_FILENAME']), '.', true)); +define('IS_ANNOUNCE', CURRENT_SCRIPT == 'announce'); if (!empty($_SERVER['HTTP_X_REQUEST_ID'])) { define('REQUEST_ID', $_SERVER['HTTP_X_REQUEST_ID']); } else { @@ -29,6 +30,7 @@ require $rootpath . 'classes/class_cache_redis.php'; require $rootpath . 'include/config.php'; if (!IS_ANNOUNCE) { require $rootpath . get_langfile_path("functions.php"); + checkGuestVisit(); } $Cache = new class_cache_redis(); //Load the caching class $Cache->setLanguageFolderArray(get_langfolder_list()); diff --git a/include/functions.php b/include/functions.php index 8cae2981..1ddd7f2a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1610,7 +1610,7 @@ function show_image_code () { unset($imagehash); $imagehash = image_code () ; print ("