diff --git a/account/login.php b/account/login.php index cb36f97..8046253 100644 --- a/account/login.php +++ b/account/login.php @@ -91,6 +91,18 @@ } ?> +
+Passwords are important to keep safe. Don't tell anyone your password, not even Fluffy!
@@ -99,14 +111,6 @@ - ".$error.""; - } - if (isset($success)) { - echo "".$success."
"; - } - ?>After reset, you will be kicked out to login again
@@ -82,11 +91,6 @@ - ".$error.""; - } - ?>And amazing things happened here...
@@ -164,14 +176,6 @@ - ".$error.""; - } - if (isset($success)) { - echo "".$success."
"; - } - ?>Something went fuckywucky, please try later
"; - } - // If ID present pull all image data if (isset($_GET['id'])) { $image = get_image_info($conn, $_GET['id']); @@ -107,7 +115,7 @@ } header("Location:index.php?del=true&id=".$image['id']); } else { - $error = "Could not delete image"; + header("Location: image.php?id=".$image['id']."&del=fail>"); } } @@ -184,7 +192,7 @@ } // Clean input - $tags_string = clean(trim($_POST['add_tags'])); + $tags_string = tag_clean(trim($_POST['add_tags'])); // getting ready forSQL asky asky $sql = "UPDATE swag_table SET tags=? WHERE id=?"; diff --git a/index.php b/index.php index 360bfe5..c343143 100644 --- a/index.php +++ b/index.php @@ -10,19 +10,27 @@ + + + + Successfully deleted image: ".$_GET['id'].""; - } - - // Account toast - if ($_GET["login"] == "success") { - echo "O hi ".$_SESSION['username']."
"; - } - // Show search if ($_GET["srch"] == "show") { $header = "Search for a tags!"; @@ -42,12 +50,12 @@ unset($header, $content, $action); // Clean input - $tags_string = clean(trim($_POST['search'])); + $tags_string = tag_clean(trim($_POST['search'])); header("Location:https://superdupersecteteuploadtest.fluffybean.gay?q=".$tags_string); } if (isset($_GET["q"])) { - echo "Search results for: ".$_GET['q']."
"; + echo "Search results for: ".$_GET['q']."
"; } ?> diff --git a/scripts/alert.js b/scripts/alert.js new file mode 100644 index 0000000..c801f24 --- /dev/null +++ b/scripts/alert.js @@ -0,0 +1,5 @@ +let alertClose = document.querySelectorAll(".alert"); + +function closeAlert(aaaa) { + aaaa.closest(".alert").style.display="none"; +}; diff --git a/ui/functions.php b/ui/functions.php index 8cb251d..f5a341a 100644 --- a/ui/functions.php +++ b/ui/functions.php @@ -151,4 +151,38 @@ function flyout($header, $content, $action) { echo " "; } + + +/* + Notification of an action done, takes in min 3 inputs: + + Text is the text that shows up on the notification + Takes in string input + + Level is the level of the notification + high is a good response or the colour green + low is a bad response or the colour red + default is a neutral response or the colour black/gray + + returns notification html including classes + + ===== Editors note ================================== + I made this so I didn't have to remake the html + portion of the notification, it was annoying. + This also allows for expanding the system later on! + ===================================================== +*/ +function notify($text, $level) { + if ($level == "high") { + $text_string = "".$text."
"; + } elseif ($level == "low") { + $text_string = "".$text."
"; + } elseif ($level == "default") { + $text_string = "".$text."
"; + } else { + $text_string = "".$text."
"; + } + + return $text_string; +} ?> diff --git a/upload.php b/upload.php index d98df5c..741beb6 100644 --- a/upload.php +++ b/upload.php @@ -69,6 +69,18 @@ } ?> + +In this world you have 2 choices, to upload a really cute picture of an animal or fursuit, or something other than those 2 things.
@@ -77,14 +89,6 @@ - ".$error.""; - } - if (isset($success)) { - echo "".$success."
"; - } - ?>