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

<!-- {$smarty.template} -->
<br>
<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.shortname|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>
		<form action="show_clubs.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<input type="hidden" name="action" value="card"/>
				<span class="{if $action=='card'}onglet-on{else}onglet{/if}">
				<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>
		<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 $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_clubs.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_clubs.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="0" cellpadding="0">
	
  <tr>
    <td class="center" rowspan="2" width="150">
    <div class="img-shadow">
		<a title="{$club.longname}" href="show_clubs.php?id={$club.id}">
		<img alt="{$club.longname}" src="{$club.imgurl}" border="0" hspace="5" vspace="5" width="150">
		</a>
	</div>
    </td>
	<td>
	{if $seasonselect}
		<form action="stats_clubs.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>
      <table cellspacing="0" cellpadding="2" border="0" width="100%">
	  		<tr class="lineodd">
			<td class="td-opt">{$lang.president}:</td><td class="td-value">{if $club.president}<a href="show_persons.php?id={$club.president_id}">{$club.president}</a>{/if}</td>
			</tr>		
            <tr class="lineeven">
			<td class="td-opt">{$lang.creation}:</td><td class="td-value">{$club.creation}</td>
			</tr>		
            <tr class="lineodd">
			<td class="td-opt">{$lang.country}:</td><td class="td-value">{$club.country}</td>
			</tr>		
            <tr class="lineeven">
			<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>		
            <tr class="lineodd">
			<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>
            <tr class="lineeven">
			<td class="td-opt">{$lang.tel}:</td><td class="td-value">{if $club.tel}{$club.tel}{/if}</td>
			</tr>		
            <tr class="lineodd">
			<td class="td-opt">{$lang.fax}:</td><td class="td-value">{if $club.fax}{$club.fax}{/if}</td>
			</tr>
            <tr class="lineeven">
			<td class="td-opt">{$lang.newspaper}:</td><td class="td-value">{$club.newspaper}</td>
			</tr>		
            <tr class="lineodd">
			<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>
			<tr class="lineeven">
			<td class="td-opt">{$lang.city}:</td><td class="td-value">{$club.city}</td>
			</tr>		
            <tr class="lineodd">
			<td class="td-opt">{$lang.aka}:</td><td class="td-value">{$club.aka}</td>
			</tr>
            <tr class="lineeven">
			<td class="td-opt">{$lang.adresse}:</td><td class="td-value">{if $club.adresse}{$club.adresse}{/if}</td>			
			</tr>
			
      </table>
    </td>	
  </tr>


{if $clubstats}
<tr>
	<td class="title-cat" colspan="2"><a href="javascript:" onclick="blocking('bloc2','yes', 'block'); return false;"><b>» {$lang.statistics} :</b></a></td>
</tr>
<tr>
	<td colspan="2">
		<div id="bloc2" style="display: block;">
		{foreach item=competition from=$competitions}
			<table width="100%" border="0" cellpadding="2" cellspacing="1">
			<tr>
				<td class="title-cat" colspan="6"><a href="show_competitions.php?id={$competition.id}"><b>»{if $competition.subshortname}{$competition.subshortname} - {/if} {$competition.shortname}</b></a></td>
			</tr>
			<tr>
				<td class="lineodd" nowrap><b>{$lang.nummatchs}</b></td><td class="lineeven" align="center">{$club.matchs[$competition.id].nummatchs}</td>
				<td class="lineodd" nowrap><b>{$lang.nummatchsplayed}</b></td><td class="lineeven" align="center">{$club.matchsplayed[$competition.id].nummatchs}</td>
				<td class="lineodd" nowrap><b>{$lang.nummatchstobeplayed}</b></td><td class="lineeven" align="center">{$club.matchstobeplayed[$competition.id].nummatchs}</td>
			</tr>
			<tr>
				<td class="lineeven"><b>{$lang.bestaffluence}</b></td>
				{if $club.bestaffluence[$competition.id].spectators}
				<td colspan="5" class="lineeven" align="center">
				<a href="show_matchs.php?competition={$club.id}&season={$season}&day={$club.bestaffluence[$competition.id].day}">{$lang.matchday} {$club.bestaffluence[$competition.id].day}</a> -
				{$club.bestaffluence[$competition.id].spectators} {$lang.spectators} <br /> <a href="show_match.php?id={$club.bestaffluence[$competition.id].id_match}">{$club.bestaffluence[$competition.id].domclub} {$club.bestaffluence[$competition.id].buts_dom} - {$club.bestaffluence[$competition.id].buts_ext} {$club.bestaffluence[$competition.id].extclub}</a>
				</td>
				{else}
				<td class="lineeven" colspan="5">{$lang.nostats}</td>
				{/if}
			</tr>
			<tr>
				<td class="lineodd"><b>{$lang.bestwindom}</b></td><td colspan="5" class="lineodd" align="center">
				{if $club.bestwindom[$competition.id].diff > 0}
				<a href="show_matchs.php?competition={$club.id}&season={$season}&day={$club.bestwindom[$competition.id].day}">{$lang.matchday} {$club.bestwindom[$competition.id].day}</a> - <a href="show_match.php?id={$club.bestwindom[$competition.id].id_match}">{$club.bestwindom[$competition.id].domclub} {$club.bestwindom[$competition.id].buts_dom} - {$club.bestwindom[$competition.id].buts_ext} {$club.bestwindom[$competition.id].extclub}</a>
				{/if}
				</td>
			</tr>
			<tr>
				<td class="lineeven"><b>{$lang.bestwinext}</b></td><td colspan="5" class="lineeven" align="center">
				{if $club.bestwinext[$competition.id].diff > 0}
				<a href="show_matchs.php?competition={$club.id}&season={$season}&day={$club.bestwinext[$competition.id].day}">{$lang.matchday} {$club.bestwinext[$competition.id].day}</a> - <a href="show_match.php?id={$club.bestwinext[$competition.id].id_match}">{$club.bestwinext[$competition.id].domclub} {$club.bestwinext[$competition.id].buts_dom} - {$club.bestwinext[$competition.id].buts_ext} {$club.bestwinext[$competition.id].extclub}</a>
				{/if}
				</td>
			</tr>
			<tr>
				<td class="lineodd" colspan="3">&nbsp;</td>
				<td class="lineodd" colspan="3"><b>{$lang.averagebymatch}</b></td>
			</tr>		
			<tr>
				<td class="lineeven"><b>{$lang.numpoints}</b></td>
				<td colspan="2" class="lineeven" align="center" width="10%">{$club.points[$competition.id].goals}</td>
				<td class="lineeven" colspan="3">{$club.points[$competition.id].averagegoalsbymatch}</td>
			</tr>
			<tr>
				<td class="lineodd"><b>{$lang.numpointsdom}</b></td>
				<td class="lineodd" align="center" colspan="2">{$club.points[$competition.id].goalsdom}</td>
				<td class="lineodd" colspan="3">{$club.points[$competition.id].averagedomgoalsbymatch}</td>
			</tr>
			<tr>
			<tr>
				<td class="lineeven"><b>{$lang.numpointsext}</b></td>
				<td class="lineeven" align="center" colspan="2">{$club.points[$competition.id].goalsext}</td>
				<td class="lineeven" colspan="3">{$club.points[$competition.id].averageextgoalsbymatch}</td>
			</tr>
			<tr>
				<td class="lineodd"><b>{$lang.numredcards}</b></td>
				{if $club.cards[$competition.id].redcards}
				<td class="lineodd" align="center" colspan="2">{$club.cards[$competition.id].redcards}</td>
				<td class="lineodd" colspan="3">{$club.cards[$competition.id].averageredcardsbymatch}</td>
				{else}
				<td class="lineodd" colspan="5">{$lang.nostats}</td>
				{/if}
			</tr>
			<tr>
			<tr>
				<td class="lineeven"><b>{$lang.numyellowcards}</b></td>
				{if $club.cards[$competition.id].yellowcards}
				<td class="lineeven" colspan="2" align="center">{$club.cards[$competition.id].yellowcards}</td>
				<td class="lineeven" colspan="3">{$club.cards[$competition.id].averageyellowcardsbymatch}</td>
				{else}
				<td class="lineeven" colspan="5">{$lang.nostats}</td>
				{/if}
			</tr>
			<tr>
				<td class="lineodd"><b>{$lang.numspectators}</b></td>
				{if $club.spectators[$competition.id].numspectators}
				<td class="lineodd" colspan="2" align="center">{$club.spectators[$competition.id].numspectators}</td>
				<td class="lineodd" colspan="3">{$club.spectators[$competition.id].averagespectatorsbymatch}</td>
				{else}
				<td class="lineodd" colspan="5">{$lang.nostats}</td>
				{/if}
			</tr>
			</table>
		{/foreach}
		</div>
	</td>
</tr>
{/if}


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