setMetaTags("Items tagged with $tag", $tag);
$page->header();
if($tag == ""){
tagCloud();
} else {
if($mediaType == ""){
print "
All items tagged with
$tag
";
} else {
print "".ucfirst($mediaType)." tagged with
$tag
";
}
if(0This tag refers to an external website. You can leave doItLater.com and visit $tag
\n";
}
$queryString = "SELECT * FROM tags WHERE tag='$tag'";
if($mediaType != ""){
$queryString .= " AND mediaType='$mediaType'";
}
$db = dil_connect();
if($result = mysql_query($queryString,$db)){
if(($numRows = mysql_num_rows($result)) && ($numRows > 0)){
for($cnt=0; $cnt<$numRows; $cnt++){
$currType = mysql_result($result, $cnt, "mediaType");
$currId = mysql_result($result, $cnt, "id");
snapshot($currType, $currId);
}
}
}
}
$page->bottom();
/*convertTable("movies");
convertTable("pictures");
convertTable("games");
convertTable("flash");
bottom();
function convertTable($mediaType){
$db = dil_connect();
$queryString = "SELECT id,tags FROM $mediaType";
if($result = mysql_query($queryString,$db)){
if(($numRows = mysql_num_rows($result)) && ($numRows > 0)){
for($cnt=0; $cnt<$numRows; $cnt++){
$id = mysql_result($result, $cnt, "id");
$tags = mysql_result($result, $cnt, "tags");
$tags = preg_replace("/,,/", ",", $tags);
$tags = substr($tags, 1, strlen($tags)-2);
setTags($mediaType, $id, tagsFromString($tags));
}
}
}
}*/
?>