{*
  Template for the club detailview
  $Id: show_stadiums.tpl,v 1.00 2006/10/25 20:14:18
*}

<script language="JavaScript" type="text/javascript" src="javascript/look.js"></script>

<div id="pagecontent">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
	<tr id="barre-classement">
		<td class="{if $clmt == general}onglet-on{else}onglet-off{/if}" align="center"><a href="show_tables.php?competition={$competition.id}&season={$season}&day={$day}&clmt=general">{$lang.general}</a></td>
		<td class="{if $clmt == domicile}onglet-on{else}onglet-off{/if}" align="center"><a href="show_tables.php?competition={$competition.id}&season={$season}&day={$day}&clmt=domicile">{$lang.dom}</a></td>
		<td class="{if $clmt == exterieur}onglet-on{else}onglet-off{/if}" align="center"><a href="show_tables.php?competition={$competition.id}&season={$season}&day={$day}&clmt=exterieur">{$lang.ext}</a></td>
		<td class="{if $clmt == attack}onglet-on{else}onglet-off{/if}" align="center"><a href="show_tables.php?competition={$competition.id}&season={$season}&day={$day}&clmt=attack">{$lang.attack}</a></td>
		<td class="{if $clmt == defense}onglet-on{else}onglet-off{/if}" align="center"><a href="show_tables.php?competition={$competition.id}&season={$season}&day={$day}&clmt=defense">{$lang.defense}</a></td>
		<form action="show_tables.php" id="edi" name="edi" method="post">
		<td class="onglet-off" align="center">
			<input type="hidden" name="competition" id="competition" value="{$competition.id}" />
			<input type="hidden" name="season" id="season" value="{$season}" />
			<input type="hidden" name="clmt" id="clmt" value="{$clmt}" />
			<select name="season" onchange="submit();">
				<option value="0">---{$lang.season}---</option>
				{foreach item=myseason from=$seasonselect}
				{assign var="nextyear" value="`$myseason.season+1`"}
				{if $competition.oneyear}
					<option value="{$myseason.id_season}" {if $myseason.id_season == $season}Selected{/if}>{$myseason.season}</option>
				{else}
					{if $competition.range == 3}
						<option value="{$myseason.id_season}" {if $myseason.id_season == $season}Selected{/if}>{$myseason.season}</option>
					{else}
						<option value="{$myseason.id_season}" {if $myseason.id_season == $season}Selected{/if}>{$myseason.season} / {$nextyear}</option>
					{/if}
				{/if}
				{/foreach}
			</select>
			<select name="day" onchange="submit();">
			{counter start=0 print=false name=daycount}
			{section name="loopday" start=0 loop=$maxday}
			{counter assign=count name=daycount}		
			<option value="{$count}"{if $count == $day} selected{/if}>{$lang.matchday} {$count}</option>
			{/section}		
			</select>
		
		</td>
	</tr>	
</table></form>

<!-- content begin -->
<table width="100%" border="0" cellspacing="0">
	<tr>
		<td class="title-classement">&nbsp;</td>
		<td class="title-classement">{$lang.teams}</td>
		<td class="title-classement" align="center">{$lang.points_abr}</td>
		<td class="title-classement" align="center">{$lang.played_abr}</td>
		<td class="title-classement" align="center">{$lang.victory_abr}</td>
		<td class="title-classement" align="center">{$lang.nul_abr}</td>
		<td class="title-classement" align="center">{$lang.defeat_abr}</td>
		<td class="title-classement" align="center">{$lang.scoredby_abr}</td>
		<td class="title-classement" align="center">{$lang.scoredagainst_abr}</td>
		<td class="title-classement" align="center">{$lang.goaldifference_abr}</td>
	</tr>
	{counter start=0 print=false name=matchcount}
	{foreach item=match from=$clubstats name=clubs}
	{counter assign=count name=matchcount}

	{if ($smarty.foreach.clubs.total - $params.relegation) < $count}
		{assign var="CLASS" value="td-classement-rel"}
	{elseif  $params.accession >= $count}
		{assign var="CLASS" value="td-classement-acc"}
	{elseif  ($params.accession + $params.barrage) >= $count}
		{assign var="CLASS" value="td-classement-bar"}
	{else}
		{assign var="CLASS" value="td-classement"}
	{/if}
	<tr>
		<td class="{$CLASS}" align="center">{$count}</td>
		<td class="{$CLASS}">{$match.name}</td>
		<td class="{$CLASS}" align="center">{if !$match.points}0{else}{$match.points}{/if}</td>
		<td class="{$CLASS}" align="center">{if !$match.nummatch}0{else}{$match.nummatch}{/if}</td>
		<td class="{$CLASS}" align="center">{if !$match.victory}0{else}{$match.victory}{/if}</td>
		<td class="{$CLASS}" align="center">{if !$match.nul}0{else}{$match.nul}{/if}</td>
		<td class="{$CLASS}" align="center">{if !$match.lost}0{else}{$match.lost}{/if}</td>
		<td class="{$CLASS}" align="center">{$match.bp}</td>
		<td class="{$CLASS}" align="center">{$match.bc}</td>
		<td class="{$CLASS}" align="center">{if $match.diff>0}+{/if}{$match.diff}</td>
	</tr>
	{/foreach}
</table>
</div>
<!-- /content -->
