<?php
$T_TNS = v('T_TNS');

if ( sizeof($T_TNS) == 0 ) {
	?><h1><?php echo __('hist.index.vide'); ?></h1><?php
	return;
} else if ( sizeof($T_TNS) >= 1 ) {
	?><h1><?php echo __('hist.index.titre'); ?></h1><?php
	?><table width="80%" align="center" style="text-align: center">
		<tr>
			<th>#</th>
			<th><?php echo __('com.txt.jeu'); ?></th>
			<th><?php echo __('com.txt.nom'); ?></th>
			<th><?php echo __('com.txt.type'); ?></th>
			<th><?php echo __('com.txt.etat'); ?></th>
			<th><?php echo __('com.txt.reglement'); ?></th>
			
		</tr>
		<?php
		foreach ($T_TNS as $UN_TNS){
			if ( !isset($UN_TNS['TNS_CLE'])){ continue; }
			?>
		<tr>
			<td><?php echo $UN_TNS['TNS_CLE']; ?></td>
			<td><?php echo href(zk_jeu($UN_TNS['TNS_JEU'],false),array('controleur'=>'historique','action'=>'jeu','params'=>$UN_TNS['TNS_JEU'])); ?></td>
			<td><?php echo href($UN_TNS['TNS_NOM'],array('controleur'=>'Tournoi','action'=>'voir','params'=>$UN_TNS['TNS_CLE'])); ?></td>
			<td><?php echo zk_type_tournoi($UN_TNS['TNS_TYPE']); ?></td>
			<td><?php echo zk_etat_tournoi($UN_TNS['TNS_ETAT']); ?></td>
			<td><?php echo href(img('icons/report_go.png','Lire le reglement'),array('controleur'=>'Accueil','action'=>'Reglement','params'=>$UN_TNS['REG_CLE'])); ?></td>
		</tr>
			<?php
		}
		?>
	</table>
	<?php
}

?>
