From a2b08e1000643197be12fb80c86b773eb9bf2b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=B2sweg?= Date: Wed, 23 Dec 2020 08:42:16 +0100 Subject: [PATCH] Commit after ages. A lot of changes lol --- admin.php | 16 ++++++++++------ config.php | 2 ++ include/header.php | 17 ++++++++++++++--- index.php | 9 ++++++--- login.php | 12 ++++++++---- logout.php | 2 +- tag.php | 5 +++-- view.php | 17 +++++++++++++---- 8 files changed, 57 insertions(+), 23 deletions(-) diff --git a/admin.php b/admin.php index f407306..15681dc 100644 --- a/admin.php +++ b/admin.php @@ -20,8 +20,8 @@ if(!isset($_SESSION["login"])) header("Location: /img/login.php"); if ($handle = opendir($dir)) { while (false !== ($entry = readdir($handle))) { $x = pathinfo($entry,PATHINFO_EXTENSION); - if ($x == "" && $entry != ".") { - echo("$entry
\n"); + if ($x == "" && $entry != "." && $entry != "..") { + echo("$entry
\n"); } else if($x == "jpg" || $x == "jpeg" || $x == "png"){ array_push($images, $entry); @@ -35,10 +35,14 @@ if(!isset($_SESSION["login"])) header("Location: /img/login.php"); exec($tmsu . "tags -1 '$dir/$img'", $output); $num_tags = sizeof($output); echo("
"); - echo(""); - echo("
"); + echo(""); + echo("
"); + echo(""); + + echo(""); + echo("
"); echo("
"); } ?> diff --git a/config.php b/config.php index 2be7d0c..2902239 100644 --- a/config.php +++ b/config.php @@ -2,6 +2,8 @@ $tmsu = "tmsu -D drw/.tmsu/db "; +$BASE_ROUTE = ""; + /* Exclude */ $exclude = ""; diff --git a/include/header.php b/include/header.php index f5b9e01..c0101a0 100644 --- a/include/header.php +++ b/include/header.php @@ -1,4 +1,3 @@ -