mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-01-17 03:55:12 +00:00
File cleanup in progress 2
This commit is contained in:
parent
47aa830771
commit
41667bff0a
|
@ -12,7 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
include("../ui/header.php");
|
include("../ui/header.php");
|
||||||
include("../ui/conn.php");
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="account-root default-window">
|
<div class="account-root default-window">
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
include("../ui/header.php");
|
include("../ui/header.php");
|
||||||
require_once("../ui/conn.php");
|
|
||||||
|
|
||||||
// Initialize the session
|
// Initialize the session
|
||||||
session_start();
|
session_start();
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
include("../ui/header.php");
|
include("../ui/header.php");
|
||||||
include_once("../ui/conn.php");
|
|
||||||
|
|
||||||
// Initialize the session
|
// Initialize the session
|
||||||
session_start();
|
session_start();
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
include("../ui/header.php");
|
include("../ui/header.php");
|
||||||
include_once("../ui/conn.php");
|
|
||||||
|
|
||||||
// Validate susness of Username
|
// Validate susness of Username
|
||||||
if (isset($_POST['signup'])) {
|
if (isset($_POST['signup'])) {
|
||||||
|
|
|
@ -101,11 +101,6 @@ body {
|
||||||
|
|
||||||
border-radius: var(--rad);
|
border-radius: var(--rad);
|
||||||
box-shadow: var(--shadow);
|
box-shadow: var(--shadow);
|
||||||
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
word-wrap: break-word;
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.password-reset-root {
|
.password-reset-root {
|
||||||
|
|
13
image.php
13
image.php
|
@ -284,19 +284,24 @@
|
||||||
echo "<p>ID: ".$image['id']."</p>";
|
echo "<p>ID: ".$image['id']."</p>";
|
||||||
|
|
||||||
// File name
|
// File name
|
||||||
|
if (strlen($image['imagename']) > 30) {
|
||||||
|
echo "<p>File Name: ".trim(substr($image['imagename'], 0, 30))."...</p>";
|
||||||
|
} else {
|
||||||
echo "<p>File Name: ".$image['imagename']."</p>";
|
echo "<p>File Name: ".$image['imagename']."</p>";
|
||||||
|
}
|
||||||
|
|
||||||
// Image Upload date
|
// File extention
|
||||||
echo "<p>Last updated: ".$image['upload']." (+0)</p>";
|
echo "<p>File Type: ".pathinfo($image['imagename'], PATHINFO_EXTENSION)."</p>";
|
||||||
|
|
||||||
// Image resolution
|
// Image resolution
|
||||||
list($width, $height) = getimagesize($image_path);
|
list($width, $height) = getimagesize($image_path);
|
||||||
echo "<p>Image resolution: ".$width."x".$height."</p>";
|
echo "<p>Image resolution: ".$width."x".$height."</p>";
|
||||||
|
|
||||||
|
// Image Upload date
|
||||||
|
echo "<p>Last updated: ".$image['upload']." (+0)</p>";
|
||||||
|
|
||||||
// Image download
|
// 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>";
|
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>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,6 @@
|
||||||
|
|
||||||
<div class="gallery-root flex-left">
|
<div class="gallery-root flex-left">
|
||||||
<?php
|
<?php
|
||||||
include_once("ui/conn.php");
|
|
||||||
|
|
||||||
// Reading images from table
|
// Reading images from table
|
||||||
$image_request = mysqli_query($conn, "SELECT * FROM swag_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
|
<?php
|
||||||
// Include required files by every page on header
|
// Include required files and commands by every page on header
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
if (is_dir("ui/")) {
|
if (is_dir("ui/")) {
|
||||||
include("ui/conn.php");
|
|
||||||
include_once("ui/functions.php");
|
include_once("ui/functions.php");
|
||||||
} else {
|
} else {
|
||||||
include("../ui/conn.php");
|
|
||||||
include_once("../ui/functions.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
|
// Check which directory icons are in
|
||||||
if (is_dir("assets/icons/")) {
|
if (is_dir("assets/icons/")) {
|
||||||
$dir = "assets/icons/";
|
$dir = "assets/icons/";
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
include("ui/header.php");
|
include("ui/header.php");
|
||||||
include_once("ui/conn.php");
|
|
||||||
|
|
||||||
// Check if user is logged in
|
// Check if user is logged in
|
||||||
if (loggedin()) {
|
if (loggedin()) {
|
||||||
|
|
Loading…
Reference in a new issue