43 lines
838 B
PHP
43 lines
838 B
PHP
<?php session_start() ?>
|
|
<html>
|
|
<head>
|
|
<title>Dendy\'s image gallery</title>
|
|
</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++){
|
|
if($exclude !== ""){
|
|
foreach($exclude as $excluded_tag){
|
|
if($excluded_tag == $output[$i]){
|
|
unset($output[$i]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
$tag_num = sizeof($output);
|
|
|
|
// Echo total tag count
|
|
echo "<p>There is a total of " . $tag_num . " tags</p>";
|
|
|
|
//tag list
|
|
foreach($output as $tag){
|
|
$count = "";
|
|
exec($tmsu . "files -c " . escape_cmd($tag) . $exclude_query, $count);
|
|
|
|
if($count[0] !== "0"){
|
|
echo("<a href='http://" . $_SERVER['HTTP_HOST'] . "/tag.php?t=" . $tag . "'>(" . $count[0] .") " . $tag ."</a>, ");
|
|
}
|
|
}
|
|
?>
|
|
|
|
</body>
|
|
</html>
|