<?php


# HA NINCS ID, AKKOR PÓLÓLISTA

if ($this->is_id()) {

	# PÓLÓ SZERKESZTÉSE
	$shirt_query = "SELECT * FROM shirt WHERE shirt_id = " . $this->get_id();
	$shirt_assoc_array = $sql->assoc_array($shirt_query);

	$smarty->assign('shirt_array',$shirt_assoc_array[0]);
	$smarty->display('shirt_data_edit.tpl');
}

else {
	
	# PÓLÓ LISTA

	$shirt_query = "SELECT * FROM shirt WHERE shirt_deleted = 0 ORDER BY shirt_name ASC";
	$shirt_assoc_array = $sql->assoc_array($shirt_query);

	$smarty->assign('shirt_assoc_array',$shirt_assoc_array);
	$smarty->display('shirt_list.tpl');

	
}





?>