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

<!-- {$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}
		<form action="show_teams.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>
		</td>
	</tr>

</table>


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

<div id="pagecontent">
<!-- content begin -->
	<table width="90%" border=0 cellspacing="5" cellpadding="5">
		
	  <tr>
		<td class="center" rowspan="2" width="125">
		<span class="img-shadow">{html_image file=$club.imgurl link=$link width="150"}</span>
		</td>
	  </tr>  
	  <tr>
		<td valign="top">
		  {if $teamplayers}
		  <table cellspacing="0" cellpadding="2" border="0" width="100%">
			<tr>
				<td colspan="4"><h3>{$personstype[2]} : </h3> <a href="show_persons.php?id={$teamcoach.id}">{$teamcoach.lastname} {$teamcoach.firstname}</a></td>
			<tr>
			{assign var='thisyear' value=$smarty.now|date_format:"%Y"}
			{foreach item=position from=$positions}
					
								
						<tr>
						<td class="title-classement" colspan="4" align="left"><h3>{$postype[$position.id]} :</h3></td>
						</tr>
						{foreach item=teamplayer from=$teamplayers}
						{if $teamplayer.position == $position.id}
						{assign var='birthyear' value=$teamplayer.birthday|date_format:"%Y"}
						{assign var="month1" value=$teamplayer.birthday|date_format:"%m"} {assign var="month" value='month'|cat:$month1}
						<tr>
						<td width="5%" nowrap><img alt="{$countrylng[$teamplayer.country]}" src="images/flags/{$teamplayer.country}.png" hspace="2" vspace="2" width="18" height="12" border="0"></td>
						<td align="left">
							<a href="show_persons.php?id={$teamplayer.id}">{$teamplayer.lastname} {$teamplayer.firstname}</a>
						</td>
						<td>{$teamplayer.birthday|date_format:"%d"} {$lang[$month]} {$teamplayer.birthday|date_format:"%Y"}</td>
						<td width="10%" nowrap>{if $teamplayer.birthday != "0000-00-00"}{math equation="x - y" x=$thisyear y=$birthyear} {$lang.yearsold} ({math equation="x - y" x=$nameseason.season y=$birthyear} {$lang.yearsold}){/if}</td>
						</tr>	
						{/if}
						{/foreach}
						
					 {/foreach}    
			<tr>
				<td colspan="4" align="left">({$lang.age} {$lang.duringseason} {$nameseason.season})</td>
			</tr> 	
		  </table>
		  {else}
		  <b>{$lang.noteamsknown}</b>
		  {/if}
		</td>	
	  </tr>  
	</table>
</div>
<!-- /showheader -->
</div>
<!-- /content -->
