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

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


<table id="actions" border="0" cellpadding="0" cellspacing="0" width="100%">
	<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"/>
				<input type="submit" class="{if $action=='card'}onglet-on{else}onglet{/if}" value="{$lang.card}" />
		</form>
		<form action="show_teams.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<input type="submit" class="onglet" value="{$lang.teamplayers}" />
		</form>
		<form action="show_calendarteams.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<input type="submit" class="onglet" value="{$lang.calendar}" />
		</form>
		{if $clubstats}
		<form action="stats_clubs.php" name="editform">
				<input type="hidden" name="id" value="{$club.id}"/>
				<input class="onglet" type="submit" value="{$lang.statistics}" />
		</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" />
				<input type="submit" value="{$lang.gallery}" class="onglet"/>
			</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" />
					<input type="submit" value="{$lang.comments}" class="onglet"/>
				</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}"/>
					<input type="submit" class="onglet" 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 type="submit" class="onglet" value=">" {if !$club.next_id}disabled="disabled"{/if} accesskey="." />
				</form>
			 {/if}
		</td>
	</tr>
{if $club.editable || $club.administrable}
	<tr>
		<td id="barre-season">
			{if $club.administrable}
			<form action="edit_clubs.php" name="editform">
					<input type="submit" value="{$lang.newdata}" class="onglet"/>
			</form>
			{/if}
			{if $club.editable || $club.administrable}
			<form action="edit_clubs.php" name="editform">
					<input type="hidden" name="id" value="{$club.id}"/>
					<input type="submit" value="{$lang.edit}" class="onglet"/>
			</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"/>
					<input type="submit" value="{$lang.del}" onclick="return(confirm('{$club.shortname|escape:javascript}: {$lang.msg_really_del}?'))" class="onglet"/>
			</form>
			{/if}
			{if $club.editable || $club.administrable}
			<form action="edit_teams.php" name="editform">
					<input type="hidden" name="id" value="{$club.id}"/>
					<input type="submit" value="{$lang.editteams}" class="onglet"/>
			</form>
			{/if}
		</td>
	</tr>
{/if}
</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="5">
	
  <tr>
    <td class="center" rowspan="2" width="160">
    <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>    	
  </tr>  
  <tr>
    <td>
      <table cellspacing="1" cellpadding="2" border="0" width="100%">
	  		<tr>
			<td class="td-opt" width="20%">{$lang.creation}:</td><td class="td-value" width="30%">{$club.creation}{if $club.complete} ({$lang.cessation} {$club.complete}){/if}</td>
			<td class="td-opt" width="20%">{$lang.president}:</td><td class="td-value" width="30%"><a href="show_persons.php?id={$club.president_id}">{$club.president}</a></td>
			</tr>		
            <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>
			<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>
			<td class="td-opt">{$lang.tel}:</td><td class="td-value">{if $club.tel}{$club.tel}{/if}</td>
			<td class="td-opt">{$lang.fax}:</td><td class="td-value">{if $club.fax}{$club.fax}{/if}</td>
			</tr>
            <tr>
			<td class="td-opt">{$lang.newspaper}:</td><td class="td-value">{$club.newspaper}</td>
			<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>
			<td class="td-opt">{$lang.city}:</td><td class="td-value">{$club.city}</td>
			<td class="td-opt">{$lang.aka}:</td><td class="td-value">{$club.aka}</td>
			</tr>
            <tr>
			<td class="td-opt">{$lang.adresse}:</td><td class="td-value">{if $club.adresse}{$club.adresse}{/if}</td>			
			<td class="td-opt" width="20%">{$lang.country}:</td><td class="td-value" width="30%">{$club.country}</td>
			</tr>
			<tr class="lineeven">
			<td class="td-opt">{$lang.admins}:</td>
			<td class="td-value">
				{section name=cal loop=$listadmin}
				<a href="show_members.php?id={$listadmin[cal].id}">{$listadmin[cal].name}</a>,
				{/section}
			</td>			
			</tr>
      </table>
    </td>	
  </tr>
  
  {if $club.carac_ads}
	<tr>
		<td class="td-opt" colspan="2"><a href="javascript:" onclick="blocking('bloc0','yes', 'block'); return false;">{$lang.additionalinfo}</a></td>
	</tr>
	<tr>
		<td colspan="2">
			<div id="bloc0" class="show_plot" style="display:none;">
			<table width="100%" style="top:0px" border="0" cellpadding="2" cellspacing="0">
			{counter start=0 print=false name=optcount}
			{foreach from=$club.carac_ads item=option}
			{if $option.genre != 7}
			{cycle values="lineeven,lineodd" assign=CLASS print=false}
				<tr class="{$CLASS}">
				  <td class="td-opt" width="40%"><b>{$option.name}:</b></td>
				  {if $option.genre == 3}
					<td class="td-value"><a href="{$option.value}" target="_blank">{$option.name}</a></td>			  
				  {elseif $option.genre == 4}
					<td class="td-value"><a href="mailto:{$option.value}" target="_blank">{$option.value}</a></td>			  
				  {else}
					<td class="td-value">{$option.value}</td>
				  {/if}
				</tr>
			{/if}
			{/foreach}
			</table>
			</div>
		</td>
	</tr>
	{/if}
  


<tr>
	<td colspan="2" class="td-opt"><a href="javascript:" onclick="blocking('bloc2','yes', 'block'); return false;"><h3>{$lang.prizelist} :</h3></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> 
			{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}
					{cycle values="listeven,listodd" assign=CLASS print=false}
					<div>
						<table width="100%" style="top:0px" border="0" cellpadding="0" cellspacing="5">
						<tr>
				{/if}
		
				<td width="{math equation="floor(100/x)" x=$prizelistcolumns}%">
					<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>&nbsp;</td>
				{/section}
				</tr>
				</table>
				</div>
			{/if}
			</td>
		</tr>
		</table> 
		</div> 
	</td>
</tr>
{if $club.plot}
<tr>
	<td>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
		<td align="left" class="td-opt">
		<a href="javascript:" onclick="blocking('bloc1','yes', 'block'); return false;"><h3>{$lang.comments}:</h3></a>
		<div id="bloc1" class="show_plot" style="display: block;">{$club.plot}</div>
		</td>
	  </tr>
	</table>
	</td>
</tr>
{/if}
</table> 
</div>
<!-- /content -->
