Location: PHPKode > projects > Kwalbum > kwalbum/pages/DatesPage.html.php
<?php
/**
 * @version 2.1.1
 * @since 2.0
 * @package kwalbum
 */
 $oldYear = '';
 $oldMonth = '';
 $monthNames = array('???', 'January', 'February', 'March', 'April', 'May', 'June',
 	'July', 'August', 'September', 'October', 'November', 'December');
?>
<big><b><a href="<?=$URLP->GetExtendedURL('Dates')?>"><?=$URLP->GetTitle()?>:</a> Dates</b></big>
<p>
<ul>
<li><a href="<?=$URLP->GetExtendedURL('Dates')?>date=0">View items from all dates</a></li>
</ul>
<?
while ($row = $result->fetch_array())
{
	$year = $row[0];
	$month = $monthNames[$row[1]];
	if (0 == $year)
		$year = '???';
	if ($year != $oldYear)
	{
		if ($oldYear != '')
			echo '</ul></ul>';
		echo '<ul><li><a href="'.$URLP->GetExtendedURL('Dates')."date=$row[0]\">$year</a><ul>";
 		$oldMonth = '';
	}
	$oldMonth = $month;
	$oldYear = $year;

?>
<li>
<a href="<?=$URLP->GetExtendedURL('Dates')."date=$row[0]-$row[1]"?>"><?=$month?></a>
</li>
<?
}
?>
</ul></ul>
</p>
Return current item: Kwalbum