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

<!-- {$smarty.template} -->
<div id="title">{if $stadium.id}<a href="show_stadiums.php?id=$stadium.id">{$stadium.q_longname}</a>{else}{$lang.newstadium}{/if}</div>
{if $stadium.id || $xmlimport}
<div id="actions">
    <div id="barre-onglet">
	{if $stadium.id}
		<form action="show_stadiums.php" method="get" name="show">
			<input type="hidden" name="id" value="{$stadium.id}" />
			<input type="submit" class="onglet" value="{$lang.view}" />
		</form>
	{else}
		<form action="edit_stadiums.php" method="get" name="import">
			<input type="hidden" name="import" value="xml" />
			<input type="submit" class="onglet" value="Import" />
		</form>
	{/if}
	{if $stadium.seegallery}
        <form action="gallery.php" name="galleryform">
            <input type="hidden" name="subcat" value="{$stadium.id}"/>
            <input type="hidden" name="cat" value="2" />
            <input type="submit" value="{$lang.gallery}" class="onglet"/>
        </form>
	{/if}
	{if $stadium.commentable}
			<form action="comments.php" name="mkcommentform">
				<input type="hidden" name="subcat" value="{$stadium.id}"/>
				<input type="hidden" name="cat" value="2" />
				<input type="submit" value="{$lang.comment}" class="onglet"/>
			</form>
	{/if}
	{if $stadium.prev_id || $stadium.next_id}
			<form action="show_stadiums.php" name="prevform">
				<input type="hidden" name="id" value="{$stadium.prev_id}"/>
				<input type="submit" class="onglet" value="<" {if !$stadium.prev_id}disabled="disabled"{/if} accesskey="," />
			</form>
			<form action="show_stadiums.php" name="nextform">
				<input type="hidden" name="id" value="{$stadium.next_id}"/>
				<input type="submit" class="onglet" value=">" {if !$stadium.next_id}disabled="disabled"{/if} accesskey="." />
			</form>
	{/if}
	</div>
	<!-- /actions -->
	<div id="barre-season">
		<form action="edit_stadiums.php" name="editform">
				<input type="submit" value="{$lang.newdata}" class="onglet"/>
		</form>
		<form action="edit_stadiums.php" name="editform">
				<input type="hidden" name="id" value="{$stadium.id}"/>
				<input type="submit" value="{$lang.edit}" class="onglet"/>
		</form>
		<form action="delete.php" name="deleteform">
				<input type="hidden" name="id" value="{$stadium.id}"/>
				<input type="hidden" name="cat" value="10"/>
				<input type="submit" value="{$lang.del}" onclick="return(confirm('{$stadium.q_longname|escape:javascript}: {$lang.msg_really_del}?'))" class="onglet"/>
		</form>
	</div>
</div>
{/if}
<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_stadiums.php" id="edi" name="edi" method="post" enctype="multipart/form-data">
<input type="hidden" name="id" id="id" value="{$stadium.id}" />
<input type="hidden" name="save" id="save" value="1" />
 
<table id="tableshow" width="100%" cellpadding="2" cellspacing="1" border="0">
	<tr>
      	<td class="td-value">
			  <table width="100%" cellpadding="2" cellspacing="1" border="0">
				<tr>
				  <td><h4>{$lang.name}:</h4></td>
				  <td>
					<input type="text" name="longname" id="longname" value="{$stadium.q_longname}"  size="40" maxlength="255" />
				  </td>
				</tr>		
				<tr>
				  <td><h4>{$lang.aka}:</h4></td>
				  <td>
					<input type="text" name="aka" id="aka" value="{$stadium.q_aka}"  size="40" maxlength="255" />
				  </td>
				</tr>
				<tr>
				  <td><h4>{$lang.country}:</h4></td>
				  <td>
					<select name="country">
					<option value="0">---{$lang.country}---</option>
					{foreach item=country from=$countryselect}
					<option value="{$country.id}" {if $country.id == $stadium.q_country}Selected{/if}>{$country.val}</option>
					{/foreach}
					</select>
				  </td>
				</tr>
			</table>
			<br>
			<table>
			<tr>
			  <td><h4>{$lang.creation}:</h4></td>
			  <td><input type="text" name="creation" id="creation" value="{$stadium.q_creation}" size="8" maxlength="4" />  (YYYY)</td>
			</tr>
			<tr>
			  <td><h4>{$lang.renovation}:</h4></td>
			  <td><input type="text" name="renovation" id="renovation" value="{$stadium.q_renovation}" size="8" maxlength="4" /></td>
			</tr>
			<tr>
			  <td><h4>{$lang.places}:</h4></td>
			  <td><input type="text" name="places" id="places" value="{$stadium.q_places}" size="8" maxlength="6" /></td>
			</tr>
			<tr>
			  <td><h4>{$lang.adresse}:</h4></td>
			  <td><textarea cols="30" rows="8" name="adresse" id="adresse" wrap="virtual">{$stadium.q_adresse}</textarea></td>
			</tr>		
		  </table>
      </td>
      <td class="td-value">
		  <table>
			<tr>
			  <td><h4>{$lang.logourl}:</h4></td>
			  <td>
				<input type="text" name="imgurl" id="imgurl" value="{$stadium.q_imgurl}"  size="40" maxlength="255" />
			  </td>
			</tr>		
			<tr>
			  <td><h4>{$lang.logoupload}:</h4></td>
			  <td><input type="file" name="coverupload" id="coverupload" size="35" /></td>
			</tr>
			
			{foreach from=$stadium.carac_ads item=option}
			<tr>
			  <td><h4>{$option.name}:</h4></td>
			  <td>
				{if $option.genre == 1}
					<input type="text" size="20" name="{$option.lib_key}" id="{$option.key_lib}" value="{$option.value}" class="center" />
				{/if}
				{if $option.genre == 2}
					<input type="text" size="8" name="{$option.lib_key}" id="{$option.key_lib}" value="{$option.value}" class="center" />
				{/if}
				{if $option.genre == 3}
					<input type="text" size="8" name="{$option.lib_key}" id="{$option.key_lib}" value="{$option.value}" class="center" />
				{/if}
				{if $option.genre == 4}
					<input type="text" size="15" name="{$option.lib_key}" id="{$option.key_lib}" value="{$option.value}" class="center" />
				{/if}
				{if $option.genre == 5}
					<textarea cols="40" rows="4" name="{$option.lib_key}" id="{$option.key_lib}" wrap="virtual">{$option.value}</textarea>
				{/if}
				{if $option.genre == 6}
					{html_checkbox name=$option.key_lib id=$option.lib_key value=1 checked=$option.set}
				{/if}
				{if $option.genre == 7}	
					<input type="file" name="{$option.lib_key}" id="{$option.lib_key}" size="35" />
				{/if}
			  </td>
			</tr>
			{/foreach}
			
			<tr>
			  <td><h4>{$lang.comments}:</h4></td>
			  <td><textarea cols="30" rows="8" name="plot" id="plot" wrap="virtual">{$stadium.q_plot}</textarea></td>
			</tr>
		  </table>
      </td>
    </tr>
	<tr>
	<td colspan="2">	
		<div id="barre-season">
		  <input style="width:100%;" type="submit" class="btn-search" value="{$lang.save}" id="savebutton" accesskey="s" />
		</div>
	</td>
	</tr>
  </table>
</form>

<script language="JavaScript" type="text/javascript">
	document.edi.name.focus();
</script>


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