<?php

/**
 *
 *  Display containers and categories 
 *
 * @author flabadens
 * @version 2.0 web
 * @see MyBets.functions
 * @todo
 * 
 *
 */
?>
<link rel="stylesheet" href="grille.css">

<table cellspacing="0" cellpadding="0" >
<?php

$temp='';

if (count($results)==0){
        echo "<tr>";
        echo "<td class='smallDark' >";
        echo "<br /><center>";
        echo "Aucune rencontre disponible.";
        echo "</center></td>";
        echo "</tr>";
        
}
else {
    
    

    foreach ($results as $result){

        if (!$result["FirstMatch"] == NULL){
            if ($temp != $result["ContainerId"]){
                $temp = $result["ContainerId"];
                echo "<tr>";
                echo "<td>";
                echo "<br />";
                echo "<table class='minibloc' id='black' style='width:260px;margin-left:5px'><th id='head1'></th><th id='head2'><span style='color:#f2c000;font-size:10px'>".formatString($result["ContainerName"])."</span></th><th id='head3'></th></table>";
                echo "</td>";
                echo "</tr>";
            }

            ?>
            <tr>
                <td >
                    <a class="liste-categories smallDarkLink" style="color:<?php echo $result['Color']; ?>" href='<?php echo $sess->link3($DISPLAY_GRID_OF_BETS,"sessid=".$sess->sessid."&containerId=".$result["ContainerId"]."&categoryId=".$result["CategoryId"]); ?>' ><img src="<?php echo $IMAGES_DIR.$result['ContainerImage']; ?>"> <?php echo formatString($result["CategoryName"]);?></a><br />
                </td>
                <td class="smallDark" style="color: <?php echo $result['Color']; ?>">
                    <?php echo "d&eacute;but le ".date("d/m", strtotime($result["FirstMatch"])).' &agrave; '.time_mysql($result["FirstMatch"]);?>
                </td>
            </tr>

            <?php
        
        }
    }
}
?>
</table>