Add go to admin from view

This commit is contained in:
Dendy 2020-12-24 14:32:40 +01:00
parent 4fd150c79d
commit 44d7e6f8a4
Signed by: dendy
GPG Key ID: 0168B35FFD7F608F
2 changed files with 11 additions and 4 deletions

View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<?php $thumb_size = 150; ?> <?php $thumb_size = 150; ?>
<title>Pòsweg\'s image gallery</title> <title>Dendy\'s image gallery</title>
<style> <style>
.title{ .title{
text-align: left; text-align: left;

View File

@ -1,3 +1,4 @@
<?php session_start() ?>
<html> <html>
<head> <head>
<title>Dendy\'s image gallery</title> <title>Dendy\'s image gallery</title>
@ -11,8 +12,8 @@
</head> </head>
<body> <body>
<?php <?php
include("include/header.php");
include("config.php"); include("config.php");
include("include/header.php");
exec($tmsu . "tags -1 \"" . $_GET["i"] . $excluded_query . "\"", $output); exec($tmsu . "tags -1 \"" . $_GET["i"] . $excluded_query . "\"", $output);
@ -22,18 +23,24 @@
// } // }
// } // }
echo "<h1>Tag list</h1>";
echo "<img id=\"img\" src=\"/" . $_GET["i"] . "\">"; echo "<img id=\"img\" src=\"/" . $_GET["i"] . "\">";
//Tag list //Tag list
$num_tags = sizeof($output); $num_tags = sizeof($output);
echo "<h2>Tag list (" . $num_tags . ")</h2>";
echo "Tags(" . $num_tags . "):<br/>"; //echo "Tags(" . $num_tags . "):<br/>";
unset($output[0]); unset($output[0]);
foreach($output as $tag){ foreach($output as $tag){
echo("<a href='http://" . $_SERVER['HTTP_HOST'] . "/tag.php?t=" . $tag . "'>" . $tag ."</a><br/>"); echo("<a href='http://" . $_SERVER['HTTP_HOST'] . "/tag.php?t=" . $tag . "'>" . $tag ."</a><br/>");
} }
if($_IS_ADMIN){
echo("<h2>Admin</h2>");
echo("<a href='" . $BASE_PATH . "/admin.php?l=" . dirname($_GET["i"]) . "'>View folder</a>");
}
?> ?>
</body> </body>
</html> </html>