diff --git a/admin/layout.php b/admin/layout.php
index 29d7797..4f00f33 100644
--- a/admin/layout.php
+++ b/admin/layout.php
@@ -3,9 +3,9 @@ require_once __DIR__ . '/../db/config.php';
require_once __DIR__ . '/../includes/lang.php';
if (session_status() === PHP_SESSION_NONE) session_start();
-// Forced simplified Chinese for admin
+// Force simplified Chinese for admin
$lang = 'zh';
-$_SESSION['lang'] = 'zh';
+// $_SESSION['lang'] = 'zh'; // Do not persist to session to avoid affecting front-end default language
// Admin check
$admin = null;
@@ -254,22 +254,20 @@ function renderAdminPage($content, $title = '后台管理') {
@@ -339,12 +337,12 @@ function renderAdminPage($content, $title = '后台管理') {
function speak(text) {
if ('speechSynthesis' in window) {
const utterance = new SpeechSynthesisUtterance(text);
- utterance.lang = '= $lang === 'zh' ? 'zh-CN' : 'en-US' ?>';
+ utterance.lang = 'zh-CN';
window.speechSynthesis.speak(utterance);
}
// Also try native notification
if (Notification.permission === "granted") {
- new Notification("= __('notification') ?>", { body: text, icon: '/assets/images/logo.png' });
+ new Notification("新消息提醒", { body: text, icon: '/assets/images/logo.png' });
}
}
diff --git a/app.php b/app.php
index f8faa83..f236c24 100644
--- a/app.php
+++ b/app.php
@@ -119,8 +119,8 @@ require_once __DIR__ . '/includes/header.php';
-
-
+
+
diff --git a/includes/footer.php b/includes/footer.php
index 2d7599a..b858ad1 100644
--- a/includes/footer.php
+++ b/includes/footer.php
@@ -17,32 +17,32 @@
@@ -67,19 +67,19 @@
@@ -262,7 +262,7 @@ if (csToggle) csToggle.addEventListener('click', () => {
csBox.classList.toggle('d-none');
if (!csBox.classList.contains('d-none')) {
const now = new Date();
- const timeStr = now.toLocaleTimeString('= $lang === 'zh' ? 'zh-CN' : ($lang === 'jp' ? 'ja-JP' : ($lang === 'kr' ? 'ko-KR' : 'en-US')) ?>', {hour: '2-digit', minute:'2-digit', second: '2-digit'});
+ const timeStr = now.toLocaleTimeString('zh-CN', {hour: '2-digit', minute:'2-digit', second: '2-digit'});
fetch(apiPath + '?action=ping&user_time=' + encodeURIComponent(timeStr));
scrollToBottom();
pollMessages();
@@ -312,8 +312,6 @@ function appendMessageHTML(m) {
}
if (!displayMsg.includes('chat-img-preview')) displayMsg = displayMsg.replace('