mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-02 16:33:13 +00:00
Code cleany cleany
This commit is contained in:
parent
7308f669a5
commit
a9780f59e7
6 changed files with 48 additions and 20 deletions
|
@ -125,10 +125,10 @@ if (isset($_POST['submit_login'])) {
|
|||
// let the user know
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('O hi <?php echo $_SESSION["username"]; ?>', 'You are now logged in! You will be redirected in a few seconds', 'var(--green)', 'assets/icons/hand-waving.svg');
|
||||
setTimeout(function(){window.location.href = "index.php";}, 2000);
|
||||
window.location.href = "index.php";
|
||||
</script>
|
||||
<?php
|
||||
$_SESSION['welc'] = true;
|
||||
|
||||
mysqli_query($conn,"INSERT INTO logs (ipaddress, action) VALUES('$user_ip','New loggin to ".$_SESSION['username']."')");
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class Make {
|
|||
|
||||
$string = preg_replace('/ +/', ' ', $string);
|
||||
|
||||
$string = explode(" ", $string);
|
||||
$string = explode(' ', $string);
|
||||
$string_list = array();
|
||||
|
||||
foreach ($string as $i) {
|
||||
|
@ -46,9 +46,9 @@ class Make {
|
|||
}
|
||||
}
|
||||
|
||||
$string = implode(" ", $string_list);
|
||||
$string = implode(' ', $string_list);
|
||||
|
||||
return $string;
|
||||
return trim($string);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,12 +39,10 @@ if (isset($_POST['group_submit'])) {
|
|||
if (mysqli_stmt_execute($stmt)) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Success!!!', 'Updates the image group! Redirecting.... soon', 'var(--green)', 'assets/icons/check.svg');
|
||||
setTimeout(function() {
|
||||
window.location.href = "group.php?id=<?php echo $_POST['group_id']; ?>";
|
||||
}, 2000);
|
||||
window.location.href = "group.php?id=<?php echo $_POST['group_id']; ?>";
|
||||
</script>
|
||||
<?php
|
||||
$_SESSION['msg'] = "Updated the image group!";
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
|
@ -132,6 +130,7 @@ if (isset($_POST['new_group_submit'])) {
|
|||
window.location.href = "group.php?id=<?php echo $group_id; ?>";
|
||||
</script>
|
||||
<?php
|
||||
$_SESSION['msg'] = "New Group successfully made!";
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue