mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-01-28 17:08:23 +00:00
Remove pointless error.php and fix image.php
This commit is contained in:
parent
2b6347da1b
commit
9187164582
|
@ -14,7 +14,7 @@ $conn_database = "gallery";
|
|||
try {
|
||||
$conn = @mysqli_connect($conn_ip, $conn_username, $conn_password , $conn_database);
|
||||
} catch (Exception $e) {
|
||||
header("location: error.php?e=conn");
|
||||
die("Unable to connect to the database");
|
||||
}
|
||||
|
||||
session_start();
|
||||
|
|
|
@ -361,6 +361,7 @@ nav .btn {
|
|||
.fullscreen-image button:hover {
|
||||
outline: #E8E3E3 0.2rem solid;
|
||||
color: #E8E3E3;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.image-container {
|
||||
|
@ -419,6 +420,7 @@ nav .btn {
|
|||
.preview-button:hover {
|
||||
outline: #E8E3E3 0.2rem solid;
|
||||
color: #E8E3E3;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.image-description {
|
||||
|
|
|
@ -243,6 +243,8 @@
|
|||
&:hover {
|
||||
outline: $white 0.2rem solid;
|
||||
color: $fg;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -323,6 +325,8 @@
|
|||
&:hover {
|
||||
outline: $white 0.2rem solid;
|
||||
color: $fg;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
26
error.php
26
error.php
|
@ -1,26 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<?php require_once __DIR__."/assets/ui/header.php"; ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div></div>
|
||||
|
||||
<div class="error-root">
|
||||
<h2>Woops...</h2>
|
||||
<?php
|
||||
if ($_GET["e"] == "conn") {
|
||||
echo "<p>An error occured while connecting to the server. If you're an admin, check the database configuration and/or make sure the database is alive</p>";
|
||||
} else {
|
||||
echo "<p>An error occured! But no description was provided.</p>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php require_once __DIR__."/assets/ui/footer.php"; ?>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -143,6 +143,7 @@
|
|||
<script>
|
||||
function fullScreen() {
|
||||
document.querySelector(".preview-button").style.display = "none";
|
||||
document.querySelector("html").style.overflow = "hidden";
|
||||
|
||||
document.querySelector(".fullscreen-image").style.display = "block";
|
||||
document.querySelector(".fullscreen-image > img").src = "<?php echo $image_path;?>";
|
||||
|
@ -153,6 +154,7 @@
|
|||
|
||||
function closeFullScreen() {
|
||||
document.querySelector(".preview-button").style.display = "block";
|
||||
document.querySelector("html").style.overflow = "auto";
|
||||
|
||||
document.querySelector(".fullscreen-image").style.opacity = 0;
|
||||
setTimeout(function(){
|
||||
|
|
Loading…
Reference in a new issue