You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 lines
801 B

<?php
if (!isset($seo[1]) || !is_numeric($seo[1])) redirect();
$tagged = $_sql->query("SELECT tagName FROM tags WHERE tagId = $seo[1]");
$entries = $_sql->query("SELECT entrySlug, entryTitle, entryPublished, entryBy FROM entries INNER JOIN tagged ON taggedEntry = entryId WHERE taggedTag = $seo[1] AND entryHidden IS NULL ORDER BY entryPublished DESC");
if (theme_component('tag'))
include theme_component('tag');
else
{
if ($tagged->num_rows)
{
$tag = $tagged->fetch_assoc();
addTitle($tag['tagName']);
echo "<h1>$tag[tagName]</h1>";
if ($entries->num_rows)
{
echo "<ul>";
while ($data = $entries->fetch_assoc())
echo "<li><a href='".get_entry_link($data['entrySlug'])."'>$data[entryTitle]</a></li>";
echo "</ul>";
}
}
}
unset($tag);
unset($tagged);
unset($entries);