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

<!-- {$smarty.template} -->
<div id="toppage"><a href="show_clubs.php?id={$club.id}">{$club.longname}</a></div>

<table id="actions" border="0" cellpadding="0" cellspacing="0" width="100%">
{if $club.editable || $club.administrable}
	<tr>
		<td>
		{if $club.administrable}
		<form action="edit_clubs.php" name="editform">
				<span class="onglet-admin">
				<input type="submit" value="{$lang.newdata}"/>
				</span>
		</form>
		{/if}
		{if $club.editable || $club.administrable}
		<form action="edit_clubs.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<span class="onglet-admin">
				<input type="submit" value="{$lang.edit}"/>
				</span>
		</form>
		{/if}
		{if $club.administrable}
		<form action="delete.php" name="deleteform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<input type="hidden" name="cat" value="1"/>
				<span class="onglet-admin">
				<input type="submit" value="{$lang.del}" onclick="return(confirm('{$club.longname|escape:javascript}: {$lang.msg_really_del}?'))"/>
				</span>
		</form>
		{/if}
		{if $club.editable || $club.administrable}
		<form action="edit_teams.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<span class="onglet-admin">
				<input type="submit" value="{$lang.editteams}"/>
				</span>
		</form>
		{/if}
		</td>
	</tr>
{/if}	
	<tr>
		<td id="barre-onglet">
		<form action="show_clubs.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<input type="hidden" name="action" value="card"/>
				<span class="onglet">
				<input type="submit" value="{$lang.card}" />
				</span>
		</form>
		<form action="show_teams.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<span class="onglet">
				<input type="submit" value="{$lang.teamplayers}" />
				</span>
		</form>
		<form action="show_calendarteams.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<span class="onglet">
				<input type="submit" value="{$lang.calendar}" />
				</span>
		</form>
		{if $clubstats}
		<form action="stats_clubs.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<span class="onglet">
				<input type="submit" value="{$lang.statistics}" />
				</span>
		</form>
		{/if}
		{if $club.seegallery}
			<form action="gallery.php" name="galleryform">
				<input type="hidden" name="subcat" value="{$club.id}"/>
				<input type="hidden" name="cat" value="1" />
				<span class="onglet">
				<input type="submit" value="{$lang.gallery}"/>
				</span>
			</form>
		{/if}
		{if $club.commentable}
			<form action="comments.php" name="mkcommentform">
				<input type="hidden" name="subcat" value="{$club.id}"/>
				<input type="hidden" name="cat" value="1" />
			<span class="onglet">
			<input type="submit" value="{$lang.comments}"/>
			</span>
			</form>
		{/if}
			{if $club.prev_id || $club.next_id}
				<form action="show_teams.php" name="prevform">
					<input type="hidden" name="id" value="{$club.prev_id}"/>
					<span class="onglet">
					<input type="submit" value="<" {if !$club.prev_id}disabled="disabled"{/if} accesskey="," />
					</span>
				</form>
				<form action="show_teams.php" name="nextform">
					<input type="hidden" name="id" value="{$club.next_id}"/>
					<span class="onglet">
					<input type="submit" value=">" {if !$club.next_id}disabled="disabled"{/if} accesskey="." />
					</span>
				</form>
			 {/if}
			 
		</td>
	</tr>

</table>


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

<div id="pagecontent">
<!-- content begin -->
	<table id="tableshow" width="100%" 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>
		<td>
			{if $seasonselect}
				<form action="show_teams.php" name="seasonform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<b>{$lang.seasons} :</b> 
				<select 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>  
	  <tr>
		<td valign="top">
		  <table cellspacing="0" cellpadding="2" border="0" width="100%">
			<tr>
				<td colspan="4" class="lineodd"><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 colspan="4"><h3>{$postype[$position.id]} :</h3></td>
				</tr>
				{foreach item=teamplayer from=$teamplayers}
				{if $teamplayer.position == $position.id}
				{cycle values="lineeven,lineodd" assign=CLASS print=false}		
				{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 class="{$CLASS}">
				<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>
					<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>
		</td>	
	  </tr>  
	</table>
</div>
<!-- /showheader -->
</div>
<!-- /content -->
