diff options
| author | ilotterytea <iltsu@alright.party> | 2025-12-09 01:43:12 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-12-09 01:43:12 +0500 |
| commit | 29477e67ede12347b153e2255325327374e1b073 (patch) | |
| tree | be9170a20d332eab1fcc8b380f70f231921aac45 /captcha.php | |
| parent | 28bb4f3618e2e947d14a05a24e99d826c26c0ce3 (diff) | |
feat: new configuration
Diffstat (limited to 'captcha.php')
| -rw-r--r-- | captcha.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/captcha.php b/captcha.php index 0b85bf8..3629cd0 100644 --- a/captcha.php +++ b/captcha.php @@ -26,7 +26,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["answer"])) { $file_folder = $_SERVER["DOCUMENT_ROOT"] . '/static/img/captcha'; -if (!CAPTCHA_ENABLE || ($_SESSION["captcha_solved"] ?? false) || !is_dir($file_folder)) { +if (!CONFIG['captcha']['enable'] || ($_SESSION["captcha_solved"] ?? false) || !is_dir($file_folder)) { $_SESSION["captcha_solved"] = true; echo json_response([ "status_code" => 200, @@ -45,8 +45,8 @@ $filename = basename($filename, ".png"); $_SESSION["captcha_word"] = $filename; $image = generate_image_captcha( - CAPTCHA_SIZE[0], - CAPTCHA_SIZE[1], + CONFIG['captcha']['x'], + CONFIG['captcha']['y'], random_int(1, 3), $filename, $file_folder |
