{*
  Template for the club detailview
  $Id: show_calendarteams.tpl,v 1.00 2007/09/21 18:44:00
*}
<br>
<!-- {$smarty.template} -->

<table border="0" cellpadding="0" cellspacing="0" width="90%">
	<tr>
		<td><h2>{$club.longname}</h2></td>
	</tr>
	<tr>
		<td class="title-classement" valign="middle">
		<form action="show_clubs.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<input type="hidden" name="action" value="card"/>
				<input class="button" type="submit" value="{$lang.card}" />
		</form>
		<form action="show_teams.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<input class="button" type="submit"  value="{$lang.teamplayers}" />
		</form>
		<form action="show_calendarteams.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<input class="button" type="submit"  value="{$lang.calendar}" />
		</form>
		{if $club.prev_id || $club.next_id}
			<form action="show_teams.php" name="prevform">
				<input type="hidden" name="id" value="{$club.prev_id}"/>
				<input class="button" type="submit"  value="<" {if !$club.prev_id}disabled="disabled"{/if} accesskey="," />
			</form>
			<form action="show_teams.php" name="nextform">
				<input type="hidden" name="id" value="{$club.next_id}"/>
				<input class="button" type="submit"  value=">" {if !$club.next_id}disabled="disabled"{/if} accesskey="." />
			</form>
		 {/if}
		 {if $seasonselect}
			<form action="show_calendarteams.php" name="seasonform">
			<input type="hidden" name="id" value="{$club.id}"/>
			<select class="title-classement" name="season" onchange="submit();">
				<option value="0">---{$lang.season}---</option>
			{foreach item=myseason from=$seasonselect}
			{assign var="nextyear" value="`$myseason.season+1`"}
				<option value="{$myseason.id}" {if $myseason.id == $season}Selected{/if}>{$myseason.season} / {$nextyear}</option>
			{/foreach}
			</select>
			</form>
		{/if}
		</td>
	</tr>

</table>


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

<div id="pagecontent"><br>
<!-- content begin -->

<table width="90%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td class="center" rowspan="2" width="125">
		{html_image file=$club.imgurl link=$link width="150"}
		</td>
	</tr>
	<tr>
		<td>
		{foreach item=compet from=$competitions}
		<table width="100%" border="0" cellspacing="0" cellpadding="0">	
			<tr>
				<td class="title-classement" align="center" colspan="2"><a href="show_competitions.php?id={$compet.id}">{$compet.shortname}</a></td>
			</tr>
			<tr>
				<td>
				  <table cellspacing="0" cellpadding="2" border="0" width="100%">
					{section name=cal loop=$calendar}
						{if $compet.id == $calendar[cal].id_compet}
						<tr>
							<td><a href="show_matchs.php?competition={$calendar[cal].id_compet}&season={$season}&day={$calendar[cal].day}">{$calendar[cal].day}</a></td>
							<td>{$calendar[cal].date_day}</td>
							<td>{$calendar[cal].date_hour|date_format:"%H:%M"}</td>
							<td{if $calendar[cal].buts_dom > $calendar[cal].buts_ext} class="winner"{/if}><a href="show_clubs.php?id={$calendar[cal].dom_id}">{$calendar[cal].domteam}</a></td>
							<td><a href="{if $calendar[cal].datediff > 0}show_match.php?id={$calendar[cal].id}{elseif $check == 0}show_stats.php?id={$calendar[cal].id} {assign var="check" value="1"}{else}#{/if}">{$calendar[cal].buts_dom} - {$calendar[cal].buts_ext}</a></td>
							<td{if $calendar[cal].buts_ext > $calendar[cal].buts_dom} class="winner"{/if}><a href="show_clubs.php?id={$calendar[cal].ext_id}">{$calendar[cal].extteam}</a></td>
						</tr>
						{/if}
					 {/section}
				  </table>
				</td>
			</tr>
		</table> 
		{/foreach}
		</td>
	</tr>
</table>
 

</div>
<!-- /showheader -->

</div>
<!-- /content -->
