{*
  Template for the club detailview
  $Id: show_clubs.tpl,v 1.00 2006/10/25 20:14:18
*}
{assign var=IMGWIDTH value="150"}
{assign var=IMGHEIGHT value="150"}

<!-- {$smarty.template} -->
<br>
<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_clubs.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_clubs.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}
		</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="0" cellpadding="5">
	
  <tr>
    <td align="center" valign="top" rowspan="2" width="150">
		{html_image alt="$club.longname" file=$club.imgurl max_width="$IMGWIDTH" max_height="$IMGHEIGHT" border="0"}
    </td>    	
  </tr>  
  <tr>
    <td align="left">
      <table cellspacing="0" cellpadding="2" border="0" width="100%">
		{if $club.president}
	  		<tr>
			<td class="td-opt">{$lang.president}:</td>
			<td class="td-value" width="80%">{if $club.president}<a href="show_persons.php?id={$club.president_id}">{$club.president}</a>{/if}</td>
			</tr>
		{/if}
		{if $club.creation}		
            <tr>
			<td class="td-opt">{$lang.creation}:</td>
			<td class="td-value">{$club.creation}</td>
			</tr>
		{/if}
		{if $club.country}		
            <tr>
			<td class="td-opt">{$lang.country}:</td>
			<td class="td-value">{$club.country}</td>
			</tr>
		{/if}
		{if $club.website}		
            <tr>
			<td class="td-opt">{$lang.website}:</td>
			<td class="td-value">{if $club.website}<a href="{$club.website}" target="_blank">{$club.website}</a>{/if}</td>
			</tr>
		{/if}
		{if $club.email}		
            <tr>
			<td class="td-opt">{$lang.email}:</td>
			<td class="td-value">{if $club.email}<a href="mailto:{$club.email}">{$club.email}</a>{/if}</td>
			</tr>
		{/if}
		{if $club.tel}
            <tr>
			<td class="td-opt">{$lang.tel}:</td>
			<td class="td-value">{if $club.tel}{$club.tel}{/if}</td>
			</tr>
		{/if}
		{if $club.fax}		
            <tr>
			<td class="td-opt">{$lang.fax}:</td>
			<td class="td-value">{if $club.fax}{$club.fax}{/if}</td>
			</tr>
		{/if}
		{if $club.newspaper}
            <tr>
			<td class="td-opt">{$lang.newspaper}:</td>
			<td class="td-value">{$club.newspaper}</td>
			</tr>
		{/if}
		{if $club.stadium_id}		
            <tr>
			<td class="td-opt">{$lang.stadium}:</td>
			<td class="td-value"><a href="show_stadiums.php?id={$club.stadium_id}">{$club.stadium}</a></td>
			</tr>
		{/if}
		{if $club.city}
			<tr>
			<td class="td-opt">{$lang.city}:</td>
			<td class="td-value">{$club.city}</td>
			</tr>
		{/if}
		{if $club.aka}		
            <tr>
			<td class="td-opt">{$lang.aka}:</td>
			<td class="td-value">{$club.aka}</td>
			</tr>
		{/if}
		{if $club.adresse}
            <tr>
			<td class="td-opt">{$lang.adresse}:</td>
			<td class="td-value">{if $club.adresse}{$club.adresse}{/if}</td>			
			</tr>
		{/if}			
      </table>
    </td>	
  </tr>
{if $club.plot}
  <tr>
	<td class="title-classement" colspan="2"><a href="javascript:" onclick="blocking('bloc1','yes', 'block'); return false;">» {$lang.comment} :</a></td>
  </tr>
  <tr>
	<td colspan="2">
		<div id="bloc1" class="show_plot" style="display: block;">{$club.plot}</div>
	</td>
  </tr>
{/if}
{if $prizes}
<tr>
	<td class="title-classement" colspan="2"><a href="javascript:" onclick="blocking('bloc2','yes', 'block'); return false;">» {$lang.prizelist} :</a></td>
</tr>
<tr>
	<td colspan="2">
		<div id="bloc2" class="show_plot" style="display: block;">
		<table width="100%" style="top:0px" border="0" cellpadding="2" cellspacing="1">
		 <tr>
			<td valign="top"> 
			{counter start=0 print=false name=competitioncount}
			{counter start=0 print=false name=countseason}
			{assign var="countseason" value="0"}
			{foreach item=prize from=$prizes}
			{assign var="nextyear" value="`$season.season+1`"}
				{if $count == 0}
					<div>
						<table width="100%" style="top:0px" border="0" cellpadding="0" cellspacing="5">
						<tr>
				{/if}
		
				<td width="{math equation="floor(100/x)" x=$prizelistcolumns}%" valign="top">
					<table width="100%" style="top:0px" border="0" cellpadding="0" cellspacing="1">
						<tr>
							<td class="td-opt"><a href="show_competitions.php?id={$prize.id_compet}">{$prize.shortname}</a></td>
						</tr>
						<tr>
							<td class="td-value">
								{foreach item=club from=$prizelist}
								{if $club.id_compet == $prize.id_compet}
									{if $club.range != 3}
									{assign var="season" value="`$club.season+1`"}
									{$season},
									{else}
									{$club.season}, 
									{/if}
								{/if}
								{/foreach}
							</td>
						</tr>
					</table>
				</td>
				{counter assign=countseason name=countseason}
				{counter assign=count name=competitioncount}
				{if $count == $prizelistcolumns}
					{counter start=0 print=false name=competitioncount}
					</tr>
					</table>
					</div>
				{/if}
				{php}flush();{/php}
			{/foreach}
			
			{if $count != 0}
				{section name="columnLoop" start=$count loop=$prizelistcolumns}
					<td width="{math equation="floor(100/x)" x=$prizelistcolumns}%">&nbsp;</td>
				{/section}
				</tr>
				</table>
				</div>
			{/if}
			</td>
		</tr>
		</table>
		</div>  
	</td>
</tr>
{/if}
</table> 
</div>
<!-- /content -->
