From 7c144fec1d93ad7c95e1d508d842a40f02efc31c Mon Sep 17 00:00:00 2001 From: SovereigntyIsNotFreedom Date: Mon, 9 Jun 2025 07:30:42 +0100 Subject: [PATCH] issue 83: submission status is centered in the middle on submission --- www/header.php | 2 +- www/index.php | 6 +++--- www/style.css | 7 +++++++ www/submit.php | 17 ++++++++++++----- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/www/header.php b/www/header.php index 0073bf1..a6a949c 100644 --- a/www/header.php +++ b/www/header.php @@ -204,7 +204,7 @@ function DisplayCategories($instancename, $path) { - +
Submit a link

Update Frequency: every 3 hours


diff --git a/www/index.php b/www/index.php index f147029..85dcbc4 100644 --- a/www/index.php +++ b/www/index.php @@ -23,6 +23,7 @@
CSV LINES: " . $lines_uv . " " . $lines_v . "

"; - ?> +

@@ -99,7 +100,6 @@ require("header.php"); ?>
-
Submit a new link
'],'', $_POST['link']); - // Clear user input + // Clear user input + $success_message = null; + $error_message = null; $link = htmlspecialchars($link); $name = htmlspecialchars($_POST['name']); $description = htmlspecialchars($_POST['description']); @@ -12,13 +14,13 @@ if (isset($_POST['submit'])){ $captcha = htmlspecialchars($_POST['captcha']); // Captcha Auth check if ($captcha != htmlspecialchars($_SESSION['secure'])){ - echo "Captcha Failed"; + $error_message = "Captcha Failed"; }else{ if (empty($link) or empty($name) or empty($description)){ - echo "All of the fields must not be empty"; + $error_message = "All of the fields must not be empty"; }else{ if (strlen($link) > 512 or strlen($name) > 64 or strlen($description) > 256 or strlen($sensitive) > 1 or strlen($category) > 64){ - echo "Don't excede the limit"; + $error_message = "Don't excede the limit"; }else{ // Open the file once before the loop @@ -37,7 +39,7 @@ if (isset($_POST['submit'])){ // Handle error opening the file error_log("Error opening the file."); } - echo "Link Successfully Submitted"; + $success_message = "Link Successfully Submitted"; } } } @@ -68,6 +70,11 @@ if (isset($_POST['submit'])){
+ +

+ +

+

Character Limits

Link should be 354