denbooru-php/view.php

47 lines
907 B
PHP
Raw Permalink Normal View History

2020-12-24 13:32:40 +00:00
<?php session_start() ?>
2020-05-09 18:53:47 +00:00
<html>
<head>
2020-12-24 00:17:19 +00:00
<title>Dendy\'s image gallery</title>
2020-05-09 18:53:47 +00:00
<style>
#img{
2020-12-24 00:17:19 +00:00
max-height: 70vh;
2020-05-09 18:53:47 +00:00
float: right;
2020-12-24 00:17:19 +00:00
max-width: 100%;
2020-05-09 18:53:47 +00:00
}
</style>
</head>
<body>
<?php
2020-12-24 13:32:40 +00:00
include("config.php");
2020-05-09 18:53:47 +00:00
include("include/header.php");
exec($tmsu . "tags -1 \"" . $_GET["i"] . $excluded_query . "\"", $output);
// if($exclude !== ""){
// foreach($exclude as $excluded_tag){
//
// }
// }
2020-05-09 18:53:47 +00:00
echo "<img id=\"img\" src=\"/" . $_GET["i"] . "\">";
2020-12-24 13:32:40 +00:00
2020-05-09 18:53:47 +00:00
//Tag list
$num_tags = sizeof($output);
2020-12-24 13:32:40 +00:00
echo "<h2>Tag list (" . $num_tags . ")</h2>";
2020-12-24 00:17:19 +00:00
2020-12-24 13:32:40 +00:00
//echo "Tags(" . $num_tags . "):<br/>";
unset($output[0]);
foreach($output as $tag){
echo("<a href='http://" . $_SERVER['HTTP_HOST'] . "/tag.php?t=" . $tag . "'>" . $tag ."</a><br/>");
2020-05-09 18:53:47 +00:00
}
2020-12-24 00:17:19 +00:00
2020-12-24 13:32:40 +00:00
if($_IS_ADMIN){
echo("<h2>Admin</h2>");
echo("<a href='" . $BASE_PATH . "/admin.php?l=" . dirname($_GET["i"]) . "'>View folder</a>");
}
2020-05-09 18:53:47 +00:00
?>
</body>
</html>