Location: PHPKode > projects > Kwalbum > kwalbum/pages/TagsPage.php
<?php

/*
 * Created on Aug 24, 2008
 * 2.0
 */
require_once 'include/IPage.php';

class TagsPage implements IPage
{

	function GetHead(& $title)
	{
		global $URLP;
		$title = $URLP->GetTitle().': Tags';
		return '';
	}

	function ShowBody()
	{
		global $URLP, $DB;

		$tags = $URLP->GetTags();
		$tagQuery = '';
		foreach($tags as $tag)
		{
			$tagQuery .= " AND Tag!='$tag'";
		}
		$query = 'SELECT DISTINCT Tag FROM '.TAG_TABLE.', '.TAG_MAP_TABLE.', '.ITEM_TABLE." WHERE TagCount > 0 $tagQuery AND TagId=TagIdFk AND ItemIdFk=ItemId".($URLP->GetWhereQuery(false) ? ' AND '.$URLP->GetWhereQuery(false) : null).' ORDER BY Tag';
		$result = $DB->Query($query);
		$tags = $URLP->GetTagString();
		$tags .= ($tags ? ',' : null);

		require 'TagsPage.html.php';
	}
}
?>
Return current item: Kwalbum