<h1>Cr&eacute;ation de ladder</h1>

<form method="post" action="<?php echo href('',array('controleur'=>'ladder','action'=>'creation',''),false,true); ?>">

<table class="table-css table-css-noborder">
	<?php
	if ( v('erreur') ){ ?>
	<tr>
		<td colspan="2" class="erreurs"><?php echo display_erreurs(); ?></td>
	</tr>
	<?php } ?>

	
	<tr>
		<td class="g"><?php echo __('adm.ta.comp.nom'); ?></td>
		<td class="d"><?php echo form('input',array('type'=>'text','maxlength'=>30,'name'=>'TNS_NOM')); ?>
		</td>
	</tr>
	
	<tr>
		<td class="g"><?php echo __('adm.ta.comp.nb_j'); ?></td>
		<td class="d">
		<select name="TNS_NB_J">
			<?php
			for($i=1;$i<=__TNS_NB_J_MAX;++$i){
				?><option value="<?php echo $i; ?>" <?php echo $i==p('TNS_NB_J')?'selected="selected"':''; ?>><?php echo $i; ?></option><?php
			}
			?>
		</select>
		</td>
	</tr>
	
	<?php $disabled = p('go') === null ?null:array('disabled'=>'disabled'); ?>
	<tr>
		<td class="g"><?php echo __('com.txt.jeu'); ?></td>
		<td class="d"><?php echo formSelect('TNS_JEU',$disabled,v('tJeux'),false,true); 
		if ( $disabled !== null ) { ?>
			<input type="hidden" name="TNS_JEU" value="<?php echo p('TNS_JEU'); ?>" />
		<?php } ?></td>
	</tr>
	<?php if (p('go') !== null ){ ?>
	<tr>
		<td class="g"><?php echo __('adm.ta.comp.nb_t'); ?></td>
		<td class="d"><?php echo formSelect('TNS_NB_T',null,getListeNombre(1,3)); ?></td>
	</tr>
	
	<tr>
		<td class="g"><?php echo __('adm.ta.comp.nb_m'); ?></td>
		<td class="d"><?php echo formSelect('TNS_NB_M',null,getListeNombre(1,10));	?></td>
	</tr>
	
	<tr>
		<td class="g"><?php echo __('com.txt.reglement'); ?></td>
		<td class="d"><?php echo formSelect('REG_CLE',null,v('ttab_reglements')); ?></td>
	</tr>
	
	<tr>
		<td class="g"><?php echo __('adm.ta.comp.pts.g'); ?></td>
		<td class="d"><?php echo form('input',array('type'=>'text','name'=>'TNS_G')); ?>
		</td>
	</tr>
	
	<tr>
		<td class="g"><?php echo __('adm.ta.comp.pts.n'); ?></td>
		<td class="d"><?php echo form('input',array('type'=>'text','name'=>'TNS_N')); ?>
		</td>
	</tr>
	
	<tr>
		<td class="g"><?php echo __('adm.ta.comp.pts.d'); ?></td>
		<td class="d"><?php echo form('input',array('type'=>'text','name'=>'TNS_D')); ?>
		</td>
	</tr>
	
	<tr>
		<td class="g">Points à l'inscription</td>
		<td class="d"><?php echo form('input',array('type'=>'text','name'=>'TNS_DIR')); ?>
		</td>
	</tr>
	
	<tr>
		<td colspan="2" align="center" style="padding: 15px 0px">
		<input type="submit" name="submit" value="<?php echo __('com.action.aj'); ?>" />
		</td>
	</tr>
	<?php } else { ?>
	<tr>
		<td colspan="2" align="center" style="padding: 15px 0px">
		<input type="submit" name="go" value="<?php echo __('com.action.val'); ?>" />
		</td>
	</tr>
	<?php } ?>
</table>
<p style="text-align: center"><?php echo __('adm.ta.txt'); ?></p>

<h2><?php echo __('adm.ta.comp.desc'); ?></h2>
<?php echo runFCKeditor('TNS_DESC',p('TNS_DESC',true),400); ?>



<input type="submit" name="submit" value="<?php echo __('com.action.aj'); ?>" />
</form>