{*
  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>
		{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_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>    	
  </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}{if $club.complete} ({$lang.cessation} {$club.complete}){/if}</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>
			<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="title-cat" colspan="2"><a href="javascript:" onclick="blocking('bloc0','yes', 'block'); return false;"><b>» {$lang.additionalinfo}</b></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}

{if $club.plot}
  <tr>
	<td class="title-cat" colspan="2"><a href="javascript:" onclick="blocking('bloc1','yes', 'block'); return false;"><b>» {$lang.comment} :</b></a></td>
  </tr>
  <tr>
	<td colspan="2">
		<div id="bloc1" class="show_plot" style="display: block;">{$club.plot}</div>
	</td>
  </tr>
{/if}


{foreach from=$stadium.carac_ads item=option}
	{if $option.genre == 7 && $option.value}
	<tr>
		<td class="title-cat" colspan="2"><b>» {$option.name}:</b></td>
	</tr>
	<tr>
		<td colspan="2">
		<div class="img-shadow">
		<a title="{$stadium.longname}" href="javascript:void(PopupImage('{$option.value}'))">
			<img alt="{$stadium.longname}" src="{$option.value}" border="0" hspace="5" vspace="5" width="{$IMG2WIDTH}">
		</a>
		</div>
		</td>    	
	  </tr> 
	{/if}			
{/foreach}


{if $prizes}
<tr>
	<td class="title-cat" colspan="2"><a href="javascript:" onclick="blocking('bloc2','yes', 'block'); return false;"><b>» {$lang.prizelist} :</b></a></td>
</tr>
<tr>
	<td colspan="2">
		<div id="bloc2" class="show_plot" style="display: none;">
		<table width="100%" style="top:0px" border="0" cellpadding="0" 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}%">
					<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 && !$club.oneyear}
									{assign var="season" value="`$club.season+1`"}
									{$season},
									{elseif $club.range != 3 && $club.oneyear}
									{$club.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}
</table> 
</div>
<!-- /content -->
