<?php

if ($this->is_id()) {

	# TÁBORVEZETŐ SZERKESZTÉSE

	$ucl = new user_camp_leader();
	$ucl->set_user_data_by_id($this->get_id());

	$smarty->assign('user', $ucl);
	$smarty->display('user_camp_leader_data_edit.tpl');
}

else {
	
	# TÁBORVEZETŐ LISTA

	$ucl_assoc_array = $sql->assoc_array("SELECT * FROM user_camp_leader WHERE ucl_deleted = 0 ORDER BY ucl_name ASC;");
	$ucl_array = array();
	foreach ($ucl_assoc_array as $ucl) {
		$new_ucl = new user_camp_leader();
		$new_ucl->set_user_data_by_id($ucl['ucl_id']);
		$ucl_array[] = $new_ucl;
	}

	$smarty->assign('ucl_array', $ucl_array);
	$smarty->display('user_camp_leader_list.tpl');	
}

?>