<?php
$etapes = null;
$etapes_ok = false;
$html = '';
switch (v('TNS_TYPE')){
	case 1:
		$etapes = array(1,2,3,4,6,9);
		break;
	case 2:
		$etapes = array(1,2,3,5,8,6,9);
		break;
	case 3:
		$etapes = array(1,2,3,5,7,9);
		break;
	case 4:
		$etapes = array(1,2,3,5,7,6,9);
		break;
}

if ( $etapes != null){
	global $cfg_tEtatsTournoi;
	$html = '<ul id="etat_tournoi">';
	foreach ($etapes as $k=>$e){
		/* $etapes_ok = v('TNS_TYPE')==1?v('TNS_ETAT')>=$e:
		v('TNS_ETAT') >= 6; */
		$etapes_ok = v('TNS_ETAT')==$e;
		
		$html .= '<li class="etat_'.$e;
		$html .= $etapes_ok?' ok':'';
		$html .= '"><abbr title="'.__($cfg_tEtatsTournoi[$e]['nom']).'">&nbsp;</abbr></li>';
	}
	$html .= '<li class="info">'.zk_etat_tournoi(v('TNS_ETAT')).'</li>';
	$html .= '</ul>';
}
echo $html;
?>