Location: PHPKode > projects > Kwalbum > kwalbum/pages/DatesPage.php
<?php
/**
 * @version 2.1.2
 * @since 2.0
 * @package kwalbum
 */
require_once 'include/IPage.php';

class DatesPage implements IPage
{

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

	function ShowBody()
	{
		global $URLP, $DB;
		$query = 'SELECT DateYear, DateMonth FROM '.DATE_TABLE.', '.ITEM_TABLE.'
			WHERE DateCount > 0 AND DateYear=YEAR(ItemDate) AND DateMonth=MONTH(ItemDate)'
			.($URLP->GetWhereQuery(false) ? ' AND '.$URLP->GetWhereQuery(false) : null).'
			GROUP BY DateYear,DateMonth
			ORDER BY DateYear DESC, DateMonth ASC';
		$result = $DB->Query($query);
		require 'DatesPage.html.php';
	}
}
?>
Return current item: Kwalbum