<?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 class="table table-striped" align="center" style="text-align: center">
    <thead>
    <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.reglement'); ?></th>
    </tr>
    </thead>
    <?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 href(img('icons/report_go.png', 'Lire le reglement'), array('controleur' => 'Accueil', 'action' => 'Reglement', 'params' => $UN_TNS['REG_CLE'])); ?></td>
        </tr>
        <?php
    }
    ?>
</table>
<?php
}

?>
