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

<!-- {$smarty.template} -->
<br>
<div id="toppage"><a href="show_persons.php?id={$person.id}">{$person.lastname} {$person.firstname}</a></div>

<table id="tableshow" border="0" cellpadding="0" cellspacing="0" width="100%">
{if $person.editable}
	<tr>
		<td>
		<form action="edit_persons.php" name="editform">
				<span class="onglet-admin">
				<input type="submit" value="{$lang.newdata}"/>
				</span>
		</form>
		<form action="edit_persons.php" name="editform">
				<input type="hidden" name="id" value="{$person.id}"/>
				<span class="onglet-admin">
				<input type="submit" value="{$lang.edit}"/>
				</span>
		</form>
		<form action="delete.php" name="deleteform">
				<input type="hidden" name="id" value="{$person.id}"/>
				<input type="hidden" name="cat" value="8"/>
				<span class="onglet-admin">
				<input type="submit" value="{$lang.del}" onclick="return(confirm('{$person.lastname|escape:javascript}: {$lang.msg_really_del}?'))"/>
				</span>
		</form>
	</td>
	</tr>
{/if}
	<tr>
		<td id="barre-onglet">
		<form action="show_persons.php" name="editform">
				<input type="hidden" name="id" value="{$person.id}"/>
				<input type="hidden" name="action" value="card"/>
				<span class="onglet">
				<input type="submit" value="{$lang.card}" />
				</span>
		</form>
		{if $person.seegallery}
			<form action="gallery.php" name="galleryform">
				<input type="hidden" name="subcat" value="{$person.id}"/>
				<input type="hidden" name="cat" value="4" />
				<span class="onglet">
				<input type="submit" value="{$lang.gallery}"/>
				</span>
			</form>
		{/if}
		{if $person.commentable}
				<form action="comments.php" name="mkcommentform">
					<input type="hidden" name="subcat" value="{$person.id}"/>
					<input type="hidden" name="cat" value="4" />
					<span class="onglet">
					<input type="submit" value="{$lang.comments}"/>
					</span>
				</form>
		{/if}
		{if $person.prev_id || $person.next_id}
			<form action="show_persons.php" name="prevform">
				<input type="hidden" name="id" value="{$person.prev_id}"/>
				<span class="onglet">
				<input type="submit" value="&laquo;" {if !$person.prev_id}disabled="disabled"{/if} accesskey="," />
				</span>
			</form>
			<form action="show_persons.php" name="nextform">
				<input type="hidden" name="id" value="{$person.next_id}"/>
				<span class="onglet">
				<input type="submit" value="&raquo;" {if !$person.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>
	<table width="100%" border="0" cellspacing="1" cellpadding="5">
	  <tr>
		<tr>
		<td width="{$IMGWIDTH}" rowspan="3">
		<div class="img-shadow">
		<a title="{$person.lastname} {$person.firstname}" href="{$link}">
			<img alt="{$person.lastname} {$person.firstname}" src="{$person.imgurl}" border="0" hspace="5" vspace="5" width="{$IMGWIDTH}">
		</a>
		</div>
		</td>    	
	  </tr>  
	  <tr>
		<td valign="top">
		  <table cellspacing="0" cellpadding="2" border="0" width="100%">
		  		{if $person.type == 1 && $person.clubname}
				<tr>
					<td class="lineeven"><b>» {$lang.actualclub} :</b></td>
					<td class="lineeven" nowrap><a href="show_clubs.php?id={$person.id_club}">{$person.clubname}</a></td>
				</tr>
				{/if}
				{if $person.aka}
				<tr>
					<td class="lineodd"><b>» {$lang.aka} :</b></td>
					<td class="lineodd" nowrap>{$person.aka}</td>
				</tr>
				{/if}
				<tr>
					<td class="lineodd"><b>» {$lang.birthday} :</b></td>
					<td class="lineodd" nowrap>{$person.birthday}</td>
				</tr>
				<tr>
					<td class="lineeven"><b>» {$lang.birthcity} :</b></td>
					<td class="lineeven">{$person.birthcity}</td>			
				</tr>
				{if $person.deathday > 0}
				<tr>
					<td class="lineodd"><b>» {$lang.deathday} :</b></td>
					<td class="lineodd" nowrap>{$person.deathday}</td>
				</tr>
				{/if}
				<tr>
					<td class="lineodd"><b>» {$lang.astrosign} :</b></td>
					<td class="lineodd">{$person.astrosign}</td>			
				</tr>
				<tr>
					<td class="lineeven"><b>» {$lang.country} :</b></td>
					<td class="lineeven">{$person.country}</td>
				</tr>
						
				<tr>
					<td class="lineodd"><b>» {$lang.height} :</b></td>
					<td class="lineodd">{if $person.height}{$person.height} cm{/if}</td>			
				</tr>
				<tr>
					<td class="lineeven"><b>» {$lang.weight} :</b></td>
					<td class="lineeven">{if $person.weight}{$person.weight} Kg{/if}</td>
				</tr>
				{if $person.type == 1 && $person.position}
				<tr>
					<td class="lineodd"><b>» {$lang.position} :</b></td>
					<td class="lineodd">{$postype[$person.position]}</td>
				</tr>
				{/if}
				<tr>
					<td class="lineodd"><b>» {$lang.international} :</b></td>
					<td class="lineodd">{if $person.international}{$lang.yes}{else}{$lang.no}{/if}</td>
				</tr>
				<tr>
					<td class="lineeven"><b>» {$lang.website} :</b></td>
					<td class="lineeven">{if $person.website}<a href="{$person.website}" target="_blank">{$person.website}</a>{/if}</td>			
				</tr>

				{counter start=0 print=false name=optcount}
				{foreach from=$person.carac_ads item=option}
				{if $option.genre != 7}
				{cycle values="lineeven,lineodd" assign=CLASS print=false}
				<tr>
				  <td class="{$CLASS}"><b>» {$option.name}:</b></td>
				  {if $option.genre == 3}
					<td class="{$CLASS}"><a href="{$option.value}" target="_blank">{$option.name}</a></td>			  
				  {elseif $option.genre == 4}
					<td class="{$CLASS}"><a href="mailto:{$option.value}" target="_blank">{$option.value}</a></td>			  
				  {else}
					<td class="{$CLASS}">{$option.value}</td>
				  {/if}
				</tr>
				{/if}			
				{/foreach}

		  </table>
		</td>	
	  </tr>

	</table> 
 	</td>
  </tr>
{if $person.editable}
  <tr>
	<td class="title-cat"><a href="javascript:" onclick="blocking('addinfo','yes', 'block'); return false;"><b>» {$lang.additionalinfo}</b></a></td>
  </tr>
  <tr>
	<td valign="top">
		  <div id="addinfo" style="display:none;">
		  <table cellspacing="0" cellpadding="2" border="0" width="100%">
				<tr>
					<td class="lineeven"><b>» {$lang.email} :</b></td>
					<td class="lineeven" nowrap><a href="mailto:{$person.email}">{$person.email}</a></td>
					<td class="lineeven"><b>» {$lang.stop_mail} :</b></td>
					<td class="lineeven">{if $person.stop_mail}{$lang.yes}{else}{$lang.no}{/if}</td>			
				</tr>
				<tr>
					<td class="lineodd"><b>» {$lang.phone} 1 :</b></td>
					<td class="lineodd" nowrap>{$person.tel1}</td>
					<td class="lineodd"><b>» {$lang.phone} 2 :</b></td>
					<td class="lineodd" nowrap>{$person.tel2}</td>
				</tr>
				<tr>
					<td class="lineeven"><b>» {$lang.license} :</b></td>
					<td class="lineeven" nowrap>{$person.license}</td>
					<td class="lineeven"><b>» {$lang.contribution} :</b></td>
					<td class="lineeven">{if $person.contribution}{$lang.yes}{else}{$lang.no}{/if}</td>
				</tr>
				<tr>
					<td class="lineodd"><b>» {$lang.adresse} :</b></td>
					<td class="lineodd" nowrap>{$person.address}</td>
					<td class="lineodd" colspan="2">&nbsp;</td>
				</tr>
		</table>
		</div>
	</td>
  </tr>
{/if}

{if $person.plot}
  <tr>
  	<td class="title-cat"><a href="javascript:" onclick="blocking('bloc1','yes', 'block'); return false;">» {$lang.comments} :</a></td>
  </tr>
  <tr>
  	<td>
		<div id="bloc1" class="show_plot" style="display:none;">{$person.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 $person.type == 1 || $person.type == 3}


	{if $playerstats}
	<tr>
		<td class="title-cat"><a href="javascript:" onclick="blocking('bloc2','yes', 'block'); return false;"><b>» {$lang.statistics} :</b></a></td>
	  </tr>

	  <tr>
		<td>
			<div id="bloc2" class="show_plot" style="display:none;">
			{if $person.competition}
			<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
				<td width="20%" nowrap>
					<table border="0" width="100%" cellpadding="2" cellspacing="1">
						<tr><td class="lineeven">&nbsp;</td></tr>
						<tr><td class="lineodd"><b>{$lang.titular}</b></td></tr>
						{if $person.type == 1}
							<tr><td class="lineeven"><b>{$lang.substitute}</b></td></tr>
						{/if}
						<tr><td class="lineodd"><b>{$lang.playtime}</b></td></tr>
						<tr><td class="lineeven"><b>{$lang.goals}</b></td></tr>
						<tr><td class="lineodd"><b>{$lang.yellowcards}</b></td></tr>
						<tr><td class="lineeven"><b>{$lang.redcards}</b></td></tr>
					</table>
				</td>
				
				{counter start=0 print=false name=competcount}
				{foreach item=compet from=$person.competition}
					
					<td>
						<table border="0" width="100%" cellpadding="2" cellspacing="1">
							<tr><td class="lineeven"><a href="show_competitions.php?id={$compet.id}"><b>{if $compet.subshortname}{$compet.subshortname}{else}{$compet.shortname}{/if}</b></a></td></tr>
							<tr><td class="lineodd">
								{if $person.lineup[$compet.id].titular}{$person.lineup[$compet.id].titular}{else}0{/if}
							</td></tr>
							{if $person.type == 1}
								<tr><td class="lineeven">
									{if $person.lineup[$compet.id].substitute}{$person.lineup[$compet.id].substitute}{else}0{/if}
								</td></tr>
							{/if}
							<tr><td class="lineodd">
								{if $person.lineup[$compet.id].playtime}{$person.lineup[$compet.id].playtime} mn{else}0 mn{/if}
							</td></tr>
							<tr><td class="lineeven">
								{if !$count}{if $person.goals[0].goals}{$person.goals[0].goals}{else}0{/if}
								{else}{if $person.goals[$count].goals}{$person.goals[$count].goals}{else}0{/if}
								{/if}
							</td></tr>
							<tr><td class="lineodd">
								{if !$count}{if $person.cards[0].yellowcards}{$person.cards[0].yellowcards}{else}0{/if}
								{else}{if $person.goals[$count].yellowcards}{$person.goals[$count].yellowcards}{else}0{/if}
								{/if}
							</td></tr>
							<tr><td class="lineeven">
								{if !$count}{if $person.cards[0].redcards}{$person.cards[0].redcards}{else}0{/if}
								{else}{if $person.goals[$count].redcards}{$person.goals[$count].redcards}{else}0{/if}
								{/if}
							</td></tr>
						</table>
					</td>
					
				{counter assign=count name=competcount}
				{/foreach}
			</table>
		  {/if}
		  </div>
		</td>
	  </tr>
	  {if $person.type == 1}
	  <tr>
		<td class="title-cat"><a href="javascript:" onclick="blocking('bloc3','yes', 'block'); return false;">» {$lang.career} :</a></td>
	  </tr>

	  <tr>
		<td>
			<div id="bloc3" class="show_plot" style="display:none;">

			<table width="100%" border="0" cellspacing="0" cellpadding="2">
				<tr>
					<td class="td-opt"><b>{$lang.seasons}</b></td>
					<td class="td-opt"><b>{$lang.club}</b></td>
					<td class="td-opt"><b>{$lang.played}</b></td>
					<td class="td-opt"><b>{$lang.minutes}</b></td>
					<td class="td-opt"><b>{$lang.goals}</b></td>
					<td class="td-opt"><b>{$lang.yellowcard_abr}</b></td>
					<td class="td-opt"><b>{$lang.redcard_abr}</b></td>	
				</tr>
			{foreach item=club from=$carrier}
			{cycle values="lineeven,lineodd" assign=CLASS print=false}
				{assign var="nextyear" value="`$club.season+1`"}
				
					<tr class="{$CLASS}">
						<td class="td-value">{$club.season} / {$nextyear}</td>
						<td class="td-value"><a title="{$club.shortname}" href="show_clubs.php?id={$club.id}">{$club.shortname}</a></td>
						{if $club.games || $club.minutes}
							<td class="td-value">{$club.games}</td>
							<td class="td-value">{$club.minutes}</td>
							<td class="td-value">{$club.goals}</td>
							<td class="td-value">{$club.ycards}</td>
							<td class="td-value">{$club.rcards}</td>
						{else}
							<td class="td-value" colspan="5" align="center"><i>{$lang.nostats}<i/></td>
						{/if}
					</tr>
					
				
			{/foreach}
			</table>
			</div>
		</td>
	  </tr>
	  {/if}
{else}
	  <tr>
		<td class="title-cat"><a href="javascript:" onclick="blocking('bloc4','yes', 'block'); return false;">» {$lang.career} :</a></td>
	  </tr>
	  <tr>
		<td>
			<div id="bloc4" class="show_plot" style="display:none;">
			{counter start=0 print=false name=clubcount}
			<table width="100%" border="0" cellspacing="0" cellpadding="2">
				<tr>
				{foreach item=club from=$carrier}
				{cycle values="lineeven,lineodd" assign=CLASS print=false}
				
				{assign var="nextyear" value="`$club.season+1`"}
					<td class="{$CLASS}" align="center" width="{math equation="floor(100/x)" x=$clubslistcolumns}%">
					<div id="theme">{$club.season} / {$nextyear}</div>
					<a title="{$club.shortname}" href="show_clubs.php?id={$club.id}">
					<img alt="{$club.shortname}" src="{$club.imgurl}" border="0" hspace="5" vspace="5" width="{$CLUBWIDTH}">
					</a>
					</td>
					{counter assign=count name=clubcount}
					{if $count == $clubslistcolumns}
					{counter start=0 print=false name=clubcount}
					</tr><tr>
					{/if}
				{/foreach}
				
				{if $count != 0}
					{section name="columnLoop" start=$count loop=$clubslistcolumns}
					<td>&nbsp;</td>
					{/section}
					</tr>
				{/if}
			</table>
			</div>
		</td>
	  </tr>
	{/if}
	
{/if}
</table>


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