mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2024-12-29 10:56:12 +00:00
File cleanup in progress 2
This commit is contained in:
parent
47aa830771
commit
41667bff0a
|
@ -12,7 +12,6 @@
|
|||
<body>
|
||||
<?php
|
||||
include("../ui/header.php");
|
||||
include("../ui/conn.php");
|
||||
?>
|
||||
|
||||
<div class="account-root default-window">
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
<body>
|
||||
<?php
|
||||
include("../ui/header.php");
|
||||
require_once("../ui/conn.php");
|
||||
|
||||
// Initialize the session
|
||||
session_start();
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
<body>
|
||||
<?php
|
||||
include("../ui/header.php");
|
||||
include_once("../ui/conn.php");
|
||||
|
||||
// Initialize the session
|
||||
session_start();
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
<body>
|
||||
<?php
|
||||
include("../ui/header.php");
|
||||
include_once("../ui/conn.php");
|
||||
|
||||
// Validate susness of Username
|
||||
if (isset($_POST['signup'])) {
|
||||
|
|
|
@ -101,11 +101,6 @@ body {
|
|||
|
||||
border-radius: var(--rad);
|
||||
box-shadow: var(--shadow);
|
||||
|
||||
text-overflow: ellipsis;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.password-reset-root {
|
||||
|
|
15
image.php
15
image.php
|
@ -284,19 +284,24 @@
|
|||
echo "<p>ID: ".$image['id']."</p>";
|
||||
|
||||
// File name
|
||||
echo "<p>File Name: ".$image['imagename']."</p>";
|
||||
if (strlen($image['imagename']) > 30) {
|
||||
echo "<p>File Name: ".trim(substr($image['imagename'], 0, 30))."...</p>";
|
||||
} else {
|
||||
echo "<p>File Name: ".$image['imagename']."</p>";
|
||||
}
|
||||
|
||||
// Image Upload date
|
||||
echo "<p>Last updated: ".$image['upload']." (+0)</p>";
|
||||
// File extention
|
||||
echo "<p>File Type: ".pathinfo($image['imagename'], PATHINFO_EXTENSION)."</p>";
|
||||
|
||||
// Image resolution
|
||||
list($width, $height) = getimagesize($image_path);
|
||||
echo "<p>Image resolution: ".$width."x".$height."</p>";
|
||||
|
||||
// Image Upload date
|
||||
echo "<p>Last updated: ".$image['upload']." (+0)</p>";
|
||||
|
||||
// Image download
|
||||
echo "<a class='btn alert-high space-top' href='images/".$image['imagename']."' download='".$image['imagename']."'><img class='svg' src='assets/icons/download.svg'>Download image</a>";
|
||||
|
||||
// Flyout test button
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -68,8 +68,6 @@
|
|||
|
||||
<div class="gallery-root flex-left">
|
||||
<?php
|
||||
include_once("ui/conn.php");
|
||||
|
||||
// Reading images from table
|
||||
$image_request = mysqli_query($conn, "SELECT * FROM swag_table");
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<?php
|
||||
// Attempt database connection
|
||||
$conn = mysqli_connect("localhost", "uwu", "fennec621", "swag");
|
||||
// If connecton failed, notify user
|
||||
if ($conn->connect_error) {
|
||||
echo "<p class='alert alert-low'>Could not connect to database</p>";
|
||||
}
|
||||
?>
|
|
@ -1,14 +1,18 @@
|
|||
<?php
|
||||
// Include required files by every page on header
|
||||
// Include required files and commands by every page on header
|
||||
session_start();
|
||||
|
||||
if (is_dir("ui/")) {
|
||||
include("ui/conn.php");
|
||||
include_once("ui/functions.php");
|
||||
} else {
|
||||
include("../ui/conn.php");
|
||||
include_once("../ui/functions.php");
|
||||
}
|
||||
|
||||
$conn = mysqli_connect("localhost", "uwu", "fennec621", "swag");
|
||||
if ($conn->connect_error) {
|
||||
echo "<p class='alert alert-low'>Could not connect to database</p>";
|
||||
}
|
||||
|
||||
// Check which directory icons are in
|
||||
if (is_dir("assets/icons/")) {
|
||||
$dir = "assets/icons/";
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
<body>
|
||||
<?php
|
||||
include("ui/header.php");
|
||||
include_once("ui/conn.php");
|
||||
|
||||
// Check if user is logged in
|
||||
if (loggedin()) {
|
||||
|
|
Loading…
Reference in a new issue