<?php echo form('form',array('method'=>"post",'legend'=>__('em.insc.titre'),"class"=>"tabEdition"));
echo ZAuth::get_fingerprint();
echo do_action('vue.front.joueur.inscription');
?>
<table>
<?php
if ( v('erreur') ){ ?>
<tr>
	<td colspan="2" class="erreurs text-error"><?php echo display_erreurs(); ?></td>
</tr>
<?php } ?>
<?php if ( v('erreurMail') != 1 ){ ?>
<tr>
	<td class="g"><label for="JOU_LOGIN"><?php echo __('com.txt.login'); ?> <font style="color:red">*</font></label></td>
	<td class="d"><?php echo form('input',array('type'=>'text','maxlength'=>40,'name'=>'JOU_LOGIN')); ?></td>
</tr>
<tr>
	<td class="g"><label for="JOU_PASS"><?php echo __('com.txt.mdp'); ?> <font style="color:red">*</font></label></td>
	<td class="d"><?php echo form('input',array('type'=>'password','maxlength'=>32,'name'=>'JOU_PASS')); ?></td>
</tr>
<tr>
	<td class="g"><label for="JOU_PASS2"><?php echo __('com.txt.confirm'); ?> <font style="color:red">*</font></label></td>
	<td class="d"><?php echo form('input',array('type'=>'password','maxlength'=>32,'name'=>'JOU_PASS2')); ?></td>
</tr>
<tr>
	<td class="g"><label for="JOU_MAIL"><?php echo __('com.txt.mail'); ?> <font style="color:red">*</font></label></td>
	<td class="d"><?php echo form('input',array('type'=>'text','maxlength'=>100,'name'=>'JOU_MAIL')); ?></td>
</tr>
<tr>
	<td colspan="2"><?php echo __('em.insc.fac'); ?></td>
</tr>
<tr>
	<td class="g"><label for="JOU_PAYS"><?php echo __('com.txt.licence'); ?></label></td>
	<td class="d"><?php echo form('input',array('type'=>'text','maxlength'=>50,'name'=>'JOU_LIC')); ?></td>
</tr>
<tr>
	<td class="g"><label for="JOU_NOM"><?php echo __('com.txt.nom'); ?></label></td>
	<td class="d"><?php echo form('input',array('type'=>'text','maxlength'=>40,'name'=>'JOU_NOM')); ?></td>
</tr>
<tr>
	<td class="g"><label for="JOU_PRE"><?php echo __('com.txt.prenom'); ?></label></td>
	<td class="d"><?php echo form('input',array('type'=>'text','maxlength'=>50,'name'=>'JOU_PRE')); ?></td>
</tr>
<tr>
	<td class="g"><label for="JOU_DATE_NAI"><?php echo __('com.txt.date_nai'); ?> <?php echo __('com.txt.date_format'); ?></label></td>
	<td class="d"><?php echo form('input',array('type'=>'text','maxlength'=>10,'name'=>'JOU_DATE_NAI')); ?></td>
</tr>
<tr>
	<td class="g"><label for="JOU_SEXE"><?php echo __('com.txt.sexe'); ?></label></td>
	<td class="d"><?php echo formSelect('JOU_SEXE',array(),v('tSexe'),true); ?></td>
</tr>
<tr>
	<td class="g"><label for="JOU_LOC"><?php echo __('com.txt.localisation'); ?></label></td>
	<td class="d"><?php echo form('input',array('type'=>'text','maxlength'=>30,'name'=>'JOU_LOC')); ?></td>
</tr>
<tr>
	<td class="g"><label for="JOU_PAYS"><?php echo __('com.txt.pays'); ?></label></td>
	<td class="d"><?php echo do_action('liste_pays'); ?></td>
</tr>
<?php foreach((array)v('Champs') as $champ){
    $value = isset($_POST['ATTRIBUTS']) && isset($_POST['ATTRIBUTS']['CHA_'.$champ->get_CHA_CLE()])?$_POST['ATTRIBUTS']['CHA_'.$champ->get_CHA_CLE()]:null;
    $attributes = array('type'=>'text','name' => 'ATTRIBUTS[CHA_'.$champ->get_CHA_CLE().']', 'id' => 'CHA_'.$champ->get_CHA_CLE(),'value'=>$value, 'class'=>'w100');
    if ( trim($value) != '' && !$champ->get_CHA_MOD() ){
        $attributes['disabled'] = 'disabled';
    }
    ?>

<tr>
    <td class="g"><label for="CHA_<?php echo $champ->get_CHA_CLE(); ?>"><?php echo $champ->get_CHA_NOM();echo $champ->get_CHA_REQ()?'<b style="color: red; font-size: 1.3em"> *</b>':''; ?></label></td>
    <td class="d"><?php echo form('input', $attributes); ?></td>
</tr>

<?php } ?>
<tr valign="top">
 	<td class="validation" colspan="2"><?php echo formSubmit('Ajouter'); ?></td>
</tr>


<?php } ?>
</table>
<?php echo formClose('form'); ?>