{*
  modules/list_matchs page
  $Id: modules/list_matchs.tpl,v 1.0 2007/02/26 16:59:36
*}
{assign var=CELLWIDTH value="35"}
{assign var=CELLHEIGHT value="35"}

<!-- list_matchs -->
<div id="match-list-filters" style="width:100%;">
	<table width="100%" border="0" cellspacing="0" cellpadding="1" style="border-bottom:2px solid #FFFFFF;">
	<tr>
	<td id="preview" align="center">
	<a href="javascript:" onclick="blocking('match-list-result','yes', 'hidden'); blocking('match-list-preview','yes', 'block'); document.getElementById('preview').style.borderWidth='2px'; document.getElementById('result').style.borderWidth='0px'; return false;"><b>{$lang.preview}</b></a>
	</td>
	<td id="result" align="center">
	<a href="javascript:" onclick="blocking('match-list-result','yes', 'block'); blocking('match-list-preview','yes', 'hidden');  document.getElementById('preview').style.borderWidth='0px'; document.getElementById('result').style.borderWidth='2px'; return false;"><b>{$lang.results}</b></a>
	</td>
	</tr>
	</table>
</div>
<div style="overflow:auto; width:100%;">
<div id="match-list-preview" style="display:none;">
	<table width="100%" border="0" cellspacing="0" cellpadding="1">
	{foreach item=datep from=$dates_preview}
	{counter start=0 print=false name=matchscount assign=matchscount}
	


		{foreach item=compet from=$compet_preview}
		{counter start=0 print=false name=competcount assign=competcount}		
			{foreach item=match from=$matchs_preview}
			{cycle values="match-list" assign=CLASS print=false}
			{if $datep.day_date == $match.date_day|date_format:"%d-%m-%Y"}
				{if !$matchscount}
					<tr>
					<td class="compet-match-list" colspan="3"><b>{$match.date_day|date_format:"%d-%m-%Y"}</b></td>
					</tr>
				{counter assign=matchscount}
				{/if}

				{if $match.shortname eq $compet.shortname}
				
					{if !$competcount}
						<tr>
						<td class="{$CLASS}" colspan="3" align="center"><b>{$compet.shortname}</b></td>
						</tr>
					{counter assign=competcount}
					{/if}
					
					<tr>
						<td class="{$CLASS}" align="left">{$match.domclub}</td>
						<td class="{$CLASS}" align="center" valign="middle" nowrap><a href="show_stats.php?id={$match.id}"><img alt="{$lang.bmatch}" src="images/confrontation.gif" width="12" height="12" border="0"></a></td>
						<td class="{$CLASS}" align="right">{$match.extclub}</td>
					</tr>
					
				{/if}
			{/if}
			{/foreach}
		{/foreach}

	{/foreach}
	</table>
</div>
<div id="match-list-result" style="display:block;">
	<table width="100%" border="0" cellspacing="0" cellpadding="1">
	{foreach item=datep from=$dates_result}
	{counter start=0 print=false name=matchscount assign=matchscount}
	


		{foreach item=compet from=$compet_result}
		{counter start=0 print=false name=competcount assign=competcount}
			{foreach item=match from=$matchs_result}


			{cycle values="match-list" assign=CLASS print=false}
			{if $datep.day_date == $match.date_day|date_format:"%d-%m-%Y"}
				{if !$matchscount}
					<tr>
					<td class="compet-match-list" colspan="3"><b>{$match.date_day|date_format:"%d-%m-%Y"}</b></td>
					</tr>
				{counter assign=matchscount}
				{/if}

				{if $match.shortname eq $compet.shortname}
				
					{if !$competcount}
						<tr>
						<td class="{$CLASS}" colspan="3" align="center"><b>{$compet.shortname}</b></td>
						</tr>
					{counter assign=competcount}
					{/if}
					<tr>
						<td class="{$CLASS}" align="left">{$countmatch} {$match.domclub}</td>
						<td class="{$CLASS}" align="center" valign="middle" nowrap><a href="show_match.php?id={$match.id}">{$match.buts_dom} - {$match.buts_ext}</a></td>
						<td class="{$CLASS}" align="right">{$match.extclub}</td>
					</tr>

				{/if}
			{/if}
            
			{/foreach}
		{/foreach}

	{/foreach}
	</table>
</div>
</div>
<!-- /list_matchs -->
