Updating naming of alert variables

This commit is contained in:
Michał Gdula 2022-09-27 21:39:02 +00:00
parent e4c59ba7f0
commit 0e23bfffb6
12 changed files with 147 additions and 109 deletions

View file

@ -46,7 +46,7 @@ if (isset($_POST['group_submit'])) {
} else {
?>
<script>
sniffleAdd('Oopsie....', 'An error occured on the servers', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Oopsie....', 'An error occured on the servers', 'var(--warning)', 'assets/icons/cross.svg');
</script>
<?php
}
@ -54,7 +54,7 @@ if (isset($_POST['group_submit'])) {
} else {
?>
<script>
sniffleAdd('Gwa Gwa', 'You\'re not privilaged enough to do thissss!', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Gwa Gwa', 'You\'re not privilaged enough to do thissss!', 'var(--warning)', 'assets/icons/cross.svg');
</script>
<?php
}
@ -86,14 +86,14 @@ if (isset($_POST['title_submit'])) {
if (mysqli_stmt_execute($stmt)) {
?>
<script>
sniffleAdd('Success!!!', 'The title has been updated successfully! You may need to refresh the page to see the new information.', 'var(--green)', 'assets/icons/check.svg');
sniffleAdd('Success!!!', 'The title has been updated successfully! You may need to refresh the page to see the new information.', 'var(--success)', 'assets/icons/check.svg');
flyoutClose();
</script>
<?php
} else {
?>
<script>
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -101,7 +101,7 @@ if (isset($_POST['title_submit'])) {
} else {
?>
<script>
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -109,7 +109,7 @@ if (isset($_POST['title_submit'])) {
} else {
?>
<script>
sniffleAdd('Denied', 'It seems that you do not have the right permitions to edit this image.', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Denied', 'It seems that you do not have the right permitions to edit this image.', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -141,7 +141,7 @@ if (isset($_POST['new_group_submit'])) {
} else {
?>
<script>
sniffleAdd('Denied', 'You must have an account to preform this action!', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Denied', 'You must have an account to preform this action!', 'var(--warning)', 'assets/icons/cross.svg');
</script>
<?php
}
@ -175,7 +175,7 @@ if (isset($_POST['group_delete'])) {
} else {
?>
<script>
sniffleAdd('Ouchie', 'Something went wrong while deleting the group', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Ouchie', 'Something went wrong while deleting the group', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -183,7 +183,7 @@ if (isset($_POST['group_delete'])) {
} else {
?>
<script>
sniffleAdd('Ouchie', 'Something went wrong while deleting the image group', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Ouchie', 'Something went wrong while deleting the image group', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -191,7 +191,7 @@ if (isset($_POST['group_delete'])) {
} else {
?>
<script>
sniffleAdd('Denied!!!', 'You do not have the right permitions to delete this group', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Denied!!!', 'You do not have the right permitions to delete this group', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php

View file

@ -58,7 +58,7 @@ if (isset($_POST['submit_delete'])) {
} else {
?>
<script>
sniffleAdd('Oopsie', 'The image failed to delete off of the servers, contact Fluffy about his terrible programming', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Oopsie', 'The image failed to delete off of the servers, contact Fluffy about his terrible programming', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -66,7 +66,7 @@ if (isset($_POST['submit_delete'])) {
} else {
?>
<script>
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -74,7 +74,7 @@ if (isset($_POST['submit_delete'])) {
} else {
?>
<script>
sniffleAdd('Denied', 'It seems that you do not have the right permitions to edit this image.', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Denied', 'It seems that you do not have the right permitions to edit this image.', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -115,14 +115,14 @@ if (isset($_POST['submit_description'])) {
if (mysqli_stmt_execute($stmt)) {
?>
<script>
sniffleAdd('Success!!!', 'Description has been updated successfully! You may need to refresh the page to see the new information.', 'var(--green)', 'assets/icons/check.svg');
sniffleAdd('Success!!!', 'Description has been updated successfully! You may need to refresh the page to see the new information.', 'var(--success)', 'assets/icons/check.svg');
flyoutClose();
</script>
<?php
} else {
?>
<script>
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -130,7 +130,7 @@ if (isset($_POST['submit_description'])) {
} else {
?>
<script>
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -138,7 +138,7 @@ if (isset($_POST['submit_description'])) {
} else {
?>
<script>
sniffleAdd('Denied', 'It seems that you do not have the right permitions to edit this image.', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Denied', 'It seems that you do not have the right permitions to edit this image.', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -176,14 +176,14 @@ if (isset($_POST['submit_tags'])) {
if (mysqli_stmt_execute($stmt)) {
?>
<script>
sniffleAdd('Success!!!', 'Tags have been modified successfully! You may need to refresh the page to see the new information.', 'var(--green)', 'assets/icons/check.svg');
sniffleAdd('Success!!!', 'Tags have been modified successfully! You may need to refresh the page to see the new information.', 'var(--success)', 'assets/icons/check.svg');
flyoutClose();
</script>
<?php
} else {
?>
<script>
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -191,7 +191,7 @@ if (isset($_POST['submit_tags'])) {
} else {
?>
<script>
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Error :c', 'An error occured on the servers', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -199,7 +199,7 @@ if (isset($_POST['submit_tags'])) {
} else {
?>
<script>
sniffleAdd('Denied', 'It seems that you do not have the right permitions to modify tags here.', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Denied', 'It seems that you do not have the right permitions to modify tags here.', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -232,14 +232,14 @@ if (isset($_POST['submit_author'])) {
if (mysqli_stmt_execute($stmt)) {
?>
<script>
sniffleAdd('Success!!!', 'The Author has been updated successfully! You may need to refresh the page to see the new information.', 'var(--green)', 'assets/icons/check.svg');
sniffleAdd('Success!!!', 'The Author has been updated successfully! You may need to refresh the page to see the new information.', 'var(--success)', 'assets/icons/check.svg');
flyoutClose();
</script>
<?php
} else {
?>
<script>
sniffleAdd('Oopsie....', 'An error occured on the servers', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Oopsie....', 'An error occured on the servers', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php
@ -248,7 +248,7 @@ if (isset($_POST['submit_author'])) {
} else {
?>
<script>
sniffleAdd('Denied', 'Sussy wussy.', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Denied', 'Sussy wussy.', 'var(--warning)', 'assets/icons/cross.svg');
flyoutClose();
</script>
<?php

View file

@ -34,7 +34,7 @@ if (isset($_POST['submit'])) {
if (!in_array($file_type, $allowed_types)) {
?>
<script>
sniffleAdd('Woopsie', 'The file type you are trying to upload is not supported. Supported files include: JPEG, JPG, PNG and WEBP', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Woopsie', 'The file type you are trying to upload is not supported. Supported files include: JPEG, JPG, PNG and WEBP', 'var(--warning)', 'assets/icons/cross.svg');
</script>
<?php
$error += 1;
@ -85,7 +85,7 @@ if (isset($_POST['submit'])) {
if (is_file($image_path)) {
?>
<script>
sniffleAdd('Woopsie', 'There was an error in your manifest.json and cause filename errors, please setup a name with a unique template', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Woopsie', 'There was an error in your manifest.json and cause filename errors, please setup a name with a unique template', 'var(--warning)', 'assets/icons/cross.svg');
</script>
<?php
$error += 1;
@ -98,7 +98,7 @@ if (isset($_POST['submit'])) {
if (is_file($image_path)) {
?>
<script>
sniffleAdd('Woopsie', 'A file under that name already exists!', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Woopsie', 'A file under that name already exists!', 'var(--warning)', 'assets/icons/cross.svg');
</script>
<?php
$error += 1;
@ -114,7 +114,7 @@ if (isset($_POST['submit'])) {
if ($make_stuff->thumbnail($image_path, $thumb_dir.$image_newname, 300) != "success") {
?>
<script>
sniffleAdd('Gwha!', 'We hit a small roadbump during making of the thumbail. We will continue anyway! \n Full Error: <?php echo $make_thumbnail; ?>', 'var(--black)', 'assets/icons/bug.svg');
sniffleAdd('Gwha!', 'We hit a small roadbump during making of the thumbail. We will continue anyway! \n Full Error: <?php echo $make_thumbnail; ?>', 'var(--allert)', 'assets/icons/bug.svg');
</script>
<?php
}
@ -123,7 +123,7 @@ if (isset($_POST['submit'])) {
if ($make_stuff->thumbnail($image_path, $preview_dir.$image_newname, 900) != "success") {
?>
<script>
sniffleAdd('Gwha!', 'We hit a small roadbump during making of the preview. We will continue anyway! \n Full Error: <?php echo $make_preview; ?>', 'var(--black)', 'assets/icons/bug.svg');
sniffleAdd('Gwha!', 'We hit a small roadbump during making of the preview. We will continue anyway! \n Full Error: <?php echo $make_preview; ?>', 'var(--allert)', 'assets/icons/bug.svg');
</script>
<?php
}
@ -146,13 +146,13 @@ if (isset($_POST['submit'])) {
if (mysqli_stmt_execute($stmt)) {
?>
<script>
sniffleAdd(':3', 'Your Image uploaded successfully!', 'var(--green)', 'assets/icons/check.svg');
sniffleAdd(':3', 'Your Image uploaded successfully!', 'var(--success)', 'assets/icons/check.svg');
</script>
<?php
} else {
?>
<script>
sniffleAdd(':c', 'Something went fuckywucky, please try later', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd(':c', 'Something went fuckywucky, please try later', 'var(--warning)', 'assets/icons/cross.svg');
</script>
<?php
}
@ -160,7 +160,7 @@ if (isset($_POST['submit'])) {
} else {
?>
<script>
sniffleAdd('Hmmff', 'Something happened when moving the file to the server. This may just been a 1-off so try again', 'var(--red)', 'assets/icons/bug.svg');
sniffleAdd('Hmmff', 'Something happened when moving the file to the server. This may just been a 1-off so try again', 'var(--warning)', 'assets/icons/bug.svg');
</script>
<?php
}
@ -168,7 +168,7 @@ if (isset($_POST['submit'])) {
} else {
?>
<script>
sniffleAdd('Denied!!!', 'As you are not loggedin, your upload has been stopped, L', 'var(--red)', 'assets/icons/cross.svg');
sniffleAdd('Denied!!!', 'As you are not loggedin, your upload has been stopped, L', 'var(--warning)', 'assets/icons/cross.svg');
</script>
<?php
}