{*
  Template for the edit interface
  $Id: edit_persons.tpl,v 1.00 2006/10/26 20:00:00
*}

<!-- {$smarty.template} -->
<br>
<table id="tableshow" border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr>
		<td id="toppage">{if $person.id}<a href="show_persons.php?id={$person.id}">{$person.lastname} {$person.firstname}</a>{else}<a href="#">{$lang.newperson}</a>{/if}</td>
	</tr>
{if $person.id || $xmlimport}
	<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>
	<tr>
		<td>
		{if $person.id}
			<form action="show_persons.php" method="get" name="show">
				<input type="hidden" name="id" value="{$person.id}" />
				<span class="onglet">
					<input type="submit"  value="{$lang.view}" />
				</span>
			</form>
		{else}
			<form action="edit_persons.php" method="get" name="import">
				<input type="hidden" name="import" value="xml" />
				<span class="onglet">
					<input type="submit"  value="Import" />
				</span>
			</form>
		{/if}
		{if $person.seegallery}
			<form action="gallery.php" name="galleryform">
				<input type="hidden" name="subcat" value="{$person.id}"/>
				<input type="hidden" name="cat" value="2" />
				<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="2" />
					<span class="onglet">
					<input type="submit" value="{$lang.comment}" />
					</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>
	
{/if}
</table>

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


{if $http_error}<div class="center">{$http_error}</div>{/if}

<div id="pagecontent">


<form action="edit_statspersons.php" id="effectif" name="effectif" method="post">
<input type="hidden" name="id" id="id" value="{$person.id}" />
<input type="hidden" name="save" id="save" value="1" />
<table id="tableshow" width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
		<td colspan="4" id="toppage"><a href="#">{$lang.careermanagement}</a></td>
</tr>
<!--
<tr>
	<td colspan="4">
		{if $pageno && $maxpageno}
			{if $pageno != 1}<a href="?pageno={$pageno-1}&id={$person.id}"><img src="templates/classic/images/back.gif" align="absmiddle" hspace="5" width="22" height="18"></a>{/if}Page {$pageno} sur {$maxpageno}
			{if $pageno != $maxpageno}<a href="?pageno={$pageno+1}&id={$person.id}"><img src="templates/classic/images/next.gif" align="absmiddle" hspace="5" width="22" height="18"></a>{/if}
			{$totalresults} {$lang.records}.
		{/if}
	</td>
</tr>
-->
{counter start=0 print=false name=tablecount}

{foreach item=stats from=$stats}
{cycle values="lineeven,lineodd" assign=CLASS print=false}
{assign var="nextyear" value="`$stats.season+1`"}
<tr>
	<td class="{$CLASS}">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td colspan="5" id="theme"><b>{$stats.season} / {$nextyear}</b> - {$stats.shortname}
			<input type="hidden" name="id_season_{$stats.id}" value="{$stats.id_season}" />
		    <input type="hidden" name="id_club_{$stats.id}" value="{$stats.id_club}" />
		    </td>
		</tr>
		<tr>
			<td colspan="2" class="td-opt"><b>{$lang.date_deb} :</b><input type="text" name="start_{$stats.id}" value="{$stats.start}" size="9" maxlenght="8"><small>(ddmmyyyy)</small></td>
			<td>&nbsp;</td>
			<td colspan="2" class="td-opt"><b>{$lang.date_fin} :</b><input type="text" name="end_{$stats.id}" value="{$stats.end}" size="9" maxlenght="8"><small>(ddmmyyyy)</small></td>
		</tr>
		<tr>
			<td width="20%" class="td-opt"><b>{$lang.played}</b></td>
			<td width="20%" class="td-opt"><b>{$lang.minutes}</b></td>
			<td width="20%" class="td-opt"><b>{$lang.goals}</b></td>
			<td width="20%" class="td-opt"><b>{$lang.yellowcard_abr}</b></td>
			<td width="20%" class="td-opt"><b>{$lang.redcard_abr}</b></td>	
		</tr>
		<tr>
			<td><input type="text" name="games_{$stats.id}" value="{$stats.games}" size="4" maxlenght="4"></td>
			<td><input type="text" name="minutes_{$stats.id}" value="{$stats.minutes}" size="6" maxlenght="6"></td>
			<td><input type="text" name="goals_{$stats.id}" value="{$stats.goals}" size="4" maxlenght="4"></td>
			<td><input type="text" name="ycards_{$stats.id}" value="{$stats.ycards}" size="4" maxlenght="4"></td>
			<td><input type="text" name="rcards_{$stats.id}" value="{$stats.rcards}" size="4" maxlenght="4"></td>	
		</tr>
	</table>
</tr>
{/foreach}

<tr>
	<td colspan="2">
		<span class="onglet">
		<input style="width:100%;" type="submit" value="{$lang.save}" id="savebutton" />
		</span>
		<span class="onglet">
		<input style="width:100%;" type="button" value="{$lang.back}" id="backbutton" onclick="javascript:history.go(-1);"/>
		</span>
	</td>
	</form>
	<form action="edit_statspersons.php" id="effectif" name="effectif" method="post">
    <input type="hidden" name="personid" id="personid" value="{$person.q_id}" />
	<td>
		{if $playerstats}
		<span class="onglet">
		<input style="width:100%;" type="submit" value="{$lang.stats}" id="statsbutton" />
		</span>
		{/if}
	</td>
	</form>
</tr>

</table>


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