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

<!-- {$smarty.template} -->
{assign var="namenextyear" value="`$res.season+1`"}
<div>
<br>
<table id="tableshow" border="0" cellspacing="0" cellpadding="2" width="100%">
	<tr>
		<td id="toppage"><a href="show_competitions.php?id={$competition}&season={$season}">{$res.longname}  - {$lang.season} {if $oneyear}{$res.season}{else}{$res.season} / {$namenextyear}{/if}</a></td>
	</tr>
	<tr>
		<td align="right"><b>{$lang.seasons} :</b> 
			<select id="season" name="season" onchange="if(this.options[this.selectedIndex].value) window.location.href='edit_matchs.php?competition={$competition}&season='+this.options[this.selectedIndex].value;">
			{foreach item=myseason from=$seasons}
			{assign var=nextyear value="`$myseason.season+1`"}
				{if $oneyear}
				<option value='{$myseason.id_season}'{if $season==$myseason.id_season}selected{/if}>{$myseason.season}</option>
				{else}
				<option value='{$myseason.id_season}'{if $season==$myseason.id_season}selected{/if}>{$myseason.season} / {$nextyear}</option>
				{/if}
			{/foreach}
			</select>
		</td>
	</tr>
{if $editable || $administrable}
	<tr>
		<td>
			{if $administrable}
			<form action="edit_competitions.php" name="editform">
				<span class="onglet-admin">
				<input type="submit" value="{$lang.newdata}" />
				</span>
			</form>
			<form action="edit_competitions.php" name="editform">
				<input type="hidden" name="id" value="{$competition}"/>
				<span class="onglet-admin">
				<input type="submit" value="{$lang.edit}" />
				</span>
			</form>
			<form action="delete.php" name="deleteform">
				<input type="hidden" name="id" value="{$mycompetition}"/>
				<input type="hidden" name="cat" value="3"/>
				<span class="onglet-admin">
				<input type="submit" value="{$lang.del}" onclick="return(confirm('{$competition.lastname|escape:javascript}: {$lang.really_del}?'))" />
				</span>
			</form>
			{/if}
			{if $editable || $administrable}
			<form action="edit_candidates.php" name="candidateform">
					<input type="hidden" name="competition" value="{$competition}"/>
					<input type="hidden" name="season" value="{$season}"/>				
					<span class="onglet-admin">
					<input type="submit" value="{$lang.editseason}" />
					</span>
			</form>
				{if $competdata.type != 1}
				<form action="edit_penalitys.php" name="penalityform">
						<input type="hidden" name="competition" value="{$competition}"/>
						<input type="hidden" name="season" value="{$season}"/>				
						<span class="onglet-admin">
						<input type="submit" value="{$lang.editpenality}" />
						</span>
				</form>
				{/if}
			<form action="edit_days.php" name="dayform">
					<input type="hidden" name="competition" value="{$competition}"/>
					<input type="hidden" name="season" value="{$season}"/>				
					<span class="onglet-admin">
					<input type="submit" value="{$lang.editday}" />
					</span>
			</form>
			<form action="edit_matchs.php" name="matchsform">
					<input type="hidden" name="competition" value="{$competition}"/>
					<input type="hidden" name="season" value="{$season}"/>				
					<span class="onglet-admin">
					<input type="submit" value="{$lang.editmatchs}" />
					</span>
			</form>
			<form action="edit_goals.php" name="matchsform">
					<input type="hidden" name="competition" value="{$competition}"/>
					<input type="hidden" name="season" value="{$season}"/>				
					<span class="onglet-admin">
					<input type="submit" value="{$lang.editgoals}" />
					</span>
			</form>
		   {/if}
		</td>
	</tr>
{/if}
	<tr>
		<td>
			<form action="show_competitions.php" name="editform">
					<input type="hidden" name="id" value="{$competition}"/>
					<input type="hidden" name="action" value="card"/>
					<span class="onglet">
					<input type="submit" value="{$lang.card}" />
					</span>
			</form>
			<form action="prizelist.php" name="tableform">
					<input type="hidden" name="competition" value="{$competition.id}"/>
					<span class="onglet">
					<input type="submit"  value="{$lang.prizelist}" {if !$competition.id}disabled="disabled"{/if} />
					</span>
			</form>
			{if $season}
				<form action="show_matchs.php" name="calendarform">
					<input type="hidden" name="competition" value="{$competition}"/>
					<input type="hidden" name="season" value="{$season}"/>
					<span class="onglet">
					<input type="submit"  value="{$lang.calendar}" {if !$competition}disabled="disabled"{/if} />
					</span>
				</form>
				{if $statsactive}
				<form action="stats_competitions.php" name="statsform">
						<input type="hidden" name="id" value="{$competition}"/>
						<input type="hidden" name="season" value="{$season}"/>
						<span class="onglet">
						<input type="submit" value="{$lang.statistics}" {if !$competition} disabled="disabled"{/if} />
						</span>
				</form>
				{/if}
				{if $competdata.type != 1}
				<form action="show_tables.php" name="tableform">
					<input type="hidden" name="competition" value="{$competition}"/>
					<input type="hidden" name="season" value="{$season}"/>
					<span class="onglet">
					<input type="submit"  value="{$lang.classement}" {if !$competition}disabled="disabled"{/if} />
					</span>
				</form>
				{/if}
			{/if}
			{if $seegallery}
				<form action="gallery.php" name="galleryform">
					<input type="hidden" name="subcat" value="{$competition}"/>
					<input type="hidden" name="cat" value="2" />
					<span class="onglet">
					<input type="submit" value="{$lang.gallery}" />
					</span>
				</form>
			{/if}
			{if $commentable}
					<form action="comments.php" name="mkcommentform">
						<input type="hidden" name="subcat" value="{$competition}"/>
						<input type="hidden" name="cat" value="2" />
						<span class="onglet">
						<input type="submit" value="{$lang.comments}" />
						</span>
					</form>
			{/if}
			{if $prev_id || $next_id}
					<form action="show_competitions.php" name="prevform">
						<input type="hidden" name="id" value="{$prev_id}"/>
						<span class="onglet">
						<input type="submit"  value="<" {if !$prev_id}disabled="disabled"{/if} accesskey="," />
						</span>
					</form>
					<form action="show_competitions.php" name="nextform">
						<input type="hidden" name="id" value="{$next_id}"/>
						<span class="onglet">
						<input type="submit"  value=">" {if !next_id}disabled="disabled"{/if} accesskey="." />
						</span>
					</form>			
			{/if}
	
    	</td>
	</tr>

	<tr><td id="bottompage">&nbsp;</td></tr>
</table>
</div>


<script language="JavaScript" type="text/javascript" src="javascript/look.js"></script>



<div id="pagecontent">
<table id="tableshow" width="100%" border="0" cellspacing="0" cellpadding="5">
<form action="edit_lineup.php" id="lineup" name="lineup" method="get">
<input type="hidden" name="match" id="match" value="{$match}" />
<input type="hidden" name="save" id="save" value="1" />
  	<tr>
  		<td id="toppage" colspan="5"><a href="#">{$lang.linesup}</a></td>
	</tr>

	{foreach item=club from=$clubs}
	<tr>
		<td colspan="4"><b>{$club.name}</b></td>
	</tr>
	<tr>
		<td><b>{$lang.player}</b></td>
		<td><b>{$lang.noconvocated_abr}</b></td>
		<td><b>{$lang.titular_abr}</b></td>
		<td><b>{$lang.substitute_abr}</b></td>
		<td><b>{$lang.captain_abr}</b></td>
	</tr>
		{foreach item=player from=$rooster}
		
		{if $club.id == $player.id_club}
		{cycle values="lineeven,lineodd" assign=CLASS print=false}
			<tr>
				<td class="{$CLASS}"><a href="show_persons.php?id={$player.id_person}">{$player.name}</a></td>
				<td class="{$CLASS}"><input type="radio" value="0" name="type_{$player.id}"{if !$player.type} checked{/if}></td>
				<td class="{$CLASS}"><input type="radio" value="2" name="type_{$player.id}"{if $player.type == 2} checked{/if}></td>
				<td class="{$CLASS}"><input type="radio" value="3" name="type_{$player.id}"{if $player.type == 3} checked{/if}></td>
				<td class="{$CLASS}"><input type="radio" value="{$player.id_person}" name="captain_{$club.id}"{if $player.captain == 1} checked{/if}></td>
			</tr>
		{/if}
		{/foreach}

	{/foreach}
	<tr>
		<td colspan="4">	
			<span class="onglet">
			<input style="width:100%;" type="submit" value="{$lang.save}" id="savebutton" accesskey="s" />
			</span>
			<span class="onglet">
			  <input style="width:100%;" type="button" value="{$lang.back}" id="backbutton" accesskey="b" onclick="javascript:history.go(-1);"/>
			</span>
		</td>
	</tr>
</form>
</table>


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