<?php

if ($this->is_id()) {
	# empty
}

else {
	
	# TURNUS LISTA, LEGÖRDÜLŐ GYEREKEKKEL

	$camps_assoc_array = $sql->assoc_array("SELECT * FROM camp WHERE camp_deleted = 0 ORDER BY camp_from ASC;");
	$camps = array();
	foreach ($camps_assoc_array as $camp_array) {
		$new_camp = new camp();
		$new_camp->set_camp_data_by_id($camp_array['camp_id']);
		$camps[] = $new_camp;
	}
	
	$smarty->assign('camps', $camps);
	$smarty->display('camp_details.tpl');
}
?>
