From c01e1e99636e90cf4d4afb349d702089c23e0918 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Fri, 20 Mar 2026 12:24:12 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E4=BF=AE=E5=A4=8D=E5=A5=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auth/forgot.php | 19 +++--- auth/register.php | 21 +++--- includes/header.php | 157 +++----------------------------------------- 3 files changed, 29 insertions(+), 168 deletions(-) diff --git a/auth/forgot.php b/auth/forgot.php index 0ba8ba0..cca6df5 100644 --- a/auth/forgot.php +++ b/auth/forgot.php @@ -162,24 +162,26 @@ include __DIR__ . '/../includes/header.php';
- +
- - + +
- +
@@ -253,7 +255,6 @@ function sendCode() { if (!res.ok) throw new Error('Network error: ' + res.status); return res.text().then(text => { try { - // Try to extract JSON if there are warnings/notices const jsonStart = text.indexOf('{'); const jsonEnd = text.lastIndexOf('}'); if (jsonStart !== -1 && jsonEnd !== -1) { @@ -261,8 +262,7 @@ function sendCode() { } return JSON.parse(text); } catch(e) { - console.error('Raw response:', text); - throw new Error('Invalid server response. Please check PHP 8.1 logs.'); + throw new Error('Invalid server response.'); } }); }) @@ -286,7 +286,6 @@ function sendCode() { } }) .catch(err => { - console.error(err); alert('Error: ' + err.message); btn.disabled = false; btn.innerText = oldText; @@ -294,4 +293,4 @@ function sendCode() { } - + \ No newline at end of file diff --git a/auth/register.php b/auth/register.php index 18fe9cc..7fde9ac 100644 --- a/auth/register.php +++ b/auth/register.php @@ -203,25 +203,27 @@ include __DIR__ . '/../includes/header.php'; - +
- - + +
-
+
- +
@@ -308,7 +310,6 @@ function sendCode() { if (!res.ok) throw new Error('Network error: ' + res.status); return res.text().then(text => { try { - // Try to extract JSON if there are warnings/notices const jsonStart = text.indexOf('{'); const jsonEnd = text.lastIndexOf('}'); if (jsonStart !== -1 && jsonEnd !== -1) { @@ -316,8 +317,7 @@ function sendCode() { } return JSON.parse(text); } catch(e) { - console.error('Raw response:', text); - throw new Error('Invalid server response. Please check PHP 8.1 logs.'); + throw new Error('Invalid server response.'); } }); }) @@ -341,7 +341,6 @@ function sendCode() { } }) .catch(err => { - console.error(err); alert('Error: ' + err.message); btn.disabled = false; btn.innerText = oldText; @@ -349,4 +348,4 @@ function sendCode() { } - + \ No newline at end of file diff --git a/includes/header.php b/includes/header.php index e22831f..afe9d79 100644 --- a/includes/header.php +++ b/includes/header.php @@ -49,10 +49,6 @@ if (isset($_SESSION['user_id'])) { }); }; window.APP_ROOT = ''; - // In case of subdirectory deployment, we can try to guess or let the user define it. - // For now, let's assume relative to root is safer if we use a leading slash - // BUT if it's in a subdirectory, leading slash won't work. - // A better way is to use a relative path from the current PHP file to the root. -
@@ -523,65 +446,5 @@ if (isset($_SESSION['user_id'])) {
- - -
- Preview -
- - + + \ No newline at end of file