<?php
	require_once("inc/page.inc.php");
	
	if($urlArgs['id'] == NULL) {
		htmlStart();
		$f = new Filter("latest_album");
		$objid = $f->apply();
		$album = new Object($objid[0]);
		
		newsitems();
		spacer();
		album($album, "NIEUW! ".$album->getName());
		spacer();
	} elseif($urlArgs['id'] == "alles") {
		htmlStart("Nieuwsoverzicht");
		$f = new Filter("news_all");
		foreach($f->apply() as $o) {
			$os[] = new Object($o);
		}
		otherNews($os, "Al het nieuws",  "Of ... <a href='nieuws'>terug naar het nieuwsoverzicht</a>");
	} else {
		$o = new Object($urlArgs['id']);
		if(!RedOne::isError($o)) {
			htmlStart("Nieuws - ". $o->getName());
			longNews($o);
		}
		spacer();
?>
<div class="header">
	<p><a href="nieuws">Terug naar het nieuwsoverzicht</a></p>
</div>
<?
	}
	
	htmlEnd();
?>