-
+
@@ -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 = '= (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]" ?>';
- // 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]()
-
-
-
+
+