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

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

class ContributorsPage implements IPage
{
	function GetHead(& $title)
	{
		global $URLP;
		$title = $URLP->GetTitle().': Contributors and Favorites';
		return '';
	}

	function ShowBody()
	{
		global $URLP, $DB;
		$query = 'SELECT DISTINCT UserTitle FROM '.USER_TABLE.', '.ITEM_TABLE.' WHERE (UserCanAdd=1 OR UserIsAdmin=1) AND UserId=ItemUserIdFk'.($URLP->GetWhereQuery(false) ? ' AND '.$URLP->GetWhereQuery(false) : null) .
			' ORDER BY UserTitle ASC';
		$result = $DB->Query($query);
		$query = 'SELECT DISTINCT UserTitle FROM '.USER_TABLE.', '.FAVORITE_TABLE.', '.ITEM_TABLE.
			' WHERE UserId=FavoriteUserIdFk AND FavoriteItemIdFk=ItemId' .($URLP->GetWhereQuery(false) ? ' AND '.$URLP->GetWhereQuery(false) : null).
			' GROUP BY UserTitle' .
			' ORDER BY UserTitle ASC';
		$favResult = $DB->Query($query);
		require 'ContributorsPage.html.php';
	}
}
?>
Return current item: Kwalbum