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("