2020-12-23 07:42:16 +00:00
|
|
|
<?php session_start() ?>
|
2020-05-09 18:53:47 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
2020-12-23 23:56:25 +00:00
|
|
|
<title>Dendy\'s image gallery</title>
|
2020-05-09 18:53:47 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<?php
|
|
|
|
include("include/header.php");
|
|
|
|
include("config.php");
|
|
|
|
|
|
|
|
echo "<h2>Tag list</h2>";
|
|
|
|
|
|
|
|
exec($tmsu . "tags", $output);
|
|
|
|
$tag_num = sizeof($output);
|
|
|
|
for($i = 0; $i < $tag_num; $i++){
|
2020-12-23 07:42:16 +00:00
|
|
|
if($exclude !== ""){
|
|
|
|
foreach($exclude as $excluded_tag){
|
|
|
|
if($excluded_tag == $output[$i]){
|
|
|
|
unset($output[$i]);
|
|
|
|
}
|
2020-05-09 18:53:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$tag_num = sizeof($output);
|
|
|
|
|
|
|
|
// Echo total tag count
|
|
|
|
echo "<p>There is a total of " . $tag_num . " tags</p>";
|
|
|
|
|
2020-12-24 23:59:54 +00:00
|
|
|
//tag list
|
2020-05-09 18:53:47 +00:00
|
|
|
foreach($output as $tag){
|
|
|
|
$count = "";
|
2020-12-24 23:59:54 +00:00
|
|
|
exec($tmsu . "files -c " . escape_cmd($tag) . $exclude_query, $count);
|
2020-12-24 13:36:28 +00:00
|
|
|
|
|
|
|
if($count[0] !== "0"){
|
|
|
|
echo("<a href='http://" . $_SERVER['HTTP_HOST'] . "/tag.php?t=" . $tag . "'>(" . $count[0] .") " . $tag ."</a>, ");
|
|
|
|
}
|
2020-05-09 18:53:47 +00:00
|
|
|
}
|
|
|
|
?>
|
2020-12-24 23:48:04 +00:00
|
|
|
|
2020-05-09 18:53:47 +00:00
|
|
|
</body>
|
|
|
|
</html>
|