<?
// ------------------------------------------------------------------------- //
// <G a n e s h a> - Free Web Based Training System                          //
// ------------------------------------------------------------------------- //
// <G a n e s h a> - Plate-forme de téléformation gratuite et en open source //
// ------------------------------------------------------------------------- //
// Copyright (C) 2001-2003  Anéma Formation  <http://www.anema.fr/>          //
// ------------------------------------------------------------------------- //
//            Developer : Georges CALDEIRA <gcaldeira@anemalab.org>          //
// ------------------------------------------------------------------------- //
//               Infos on project <http://anemalab.org/>                     //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------- //

/**
* Page inscription 2
*
* @author	Georges Caldeira <gcaldeira@anemalab.org>
* @package	GaneshaCommun
*/
	/**
	* include des fichiers PAS de verification de la cnx
	*/
	$verif_connexion = false	 ;
	include_once("anema.inc.php");

	if ( isset($HTTP_GET_VARS['code']) ) {
		$code = urldecode($HTTP_GET_VARS['code']) ;
	} else {
		location(HTTP_COMMUN.'p_inscr.php');
	}

	if ( isset($HTTP_GET_VARS['action']) && urldecode($HTTP_GET_VARS['action'])=='inscription') {
		//$ClsMail->SetSubject(MAIL_LOGIN_PASSWORD,"");
		if ( $ClsMembre->inscription(	$HTTP_POST_VARS['prenom'],$HTTP_POST_VARS['nom'],
										$HTTP_POST_VARS['email'],$HTTP_POST_VARS['adresse'],
										$HTTP_POST_VARS['cp'],$HTTP_POST_VARS['ville'],
										STAGIAIRE,$HTTP_GET_VARS['code']) ) {
			PageMessageErreur($st_texte['sendmailok']." : ".$email,HTTP_MAIN ) ;
		} else {
			PageMessageErreur($st_texte['errlogpwdmail']) ;
		}	
		exit();
	}

	$date = getdate() ;
	$date = date(FORMATDATE ,$date['0']);

	LoadSkin("default") ;
	InitPageHtml('Inscription');
?>
<table width="780" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="<?PHP echo HTTP_IMAGES?>inscr.jpg" width="780" height="83" usemap="#Map" border="0" alt="GANESHA"></td>
  </tr>
  <tr>
    <td align="center"><form action="p_inscr2.php?action=inscription&code=<?PHP echo $code?>" method="post" >
    <table width="300" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td colspan="2" class="s_titre"><?PHP echo $st_form['remplir']?></td>
      </tr>
      <tr> 
        <td width="50%" class="title3">&nbsp;</td>
        <td width="50%">&nbsp;</td>
      </tr>
      <tr> 
        <td width="50%" class="small"><?PHP echo $st_form['datecreat']?></td>
        <td width="50%" class="title4"><?PHP echo $date ?></td>
      </tr>
      <tr> 
        <td width="50%">&nbsp;</td>
        <td width="50%">&nbsp;</td>
      </tr>
      <tr> 
        <td width="50%" class="small"><?PHP echo $st_form['nom']?> *</td>
        <td width="50%"> <input name="nom" class="bouton" type="text" class="chps"></td>
      </tr>
      <tr> 
        <td width="50%">&nbsp;</td>
        <td width="50%">&nbsp;</td>
      </tr>
      <tr> 
        <td width="50%" class="small"><?PHP echo $st_form['prenom']?> *</td>
        <td width="50%"> <input name="prenom" class="bouton" type="text" class="chps"></td>
      </tr>
      <tr> 
        <td width="50%">&nbsp;</td>
        <td width="50%">&nbsp;</td>
      </tr>
      <tr> 
        <td width="50%" class="small"><?PHP echo $st_form['email']?> *</td>
        <td width="50%"> <input name="email" class="bouton" type="text" class="chps"></td>
      </tr>
      <tr> 
        <td width="50%">&nbsp;</td>
        <td width="50%">&nbsp;</td>
      </tr>
      <tr> 
        <td width="50%" class="small"><?PHP echo $st_form['adresse']?> *</td>
        <td width="50%"> <input name="adresse" class="bouton" type="text" class="chps"></td>
      </tr>
      <tr> 
        <td width="50%">&nbsp;</td>
        <td width="50%">&nbsp;</td>
      </tr>
      <tr> 
        <td width="50%" class="small"><?PHP echo $st_form['cp']?> *</td>
        <td width="50%"> <input name="cp" class="bouton" type="text" class="chps"></td>
      </tr>
      <tr> 
        <td width="50%">&nbsp;</td>
        <td width="50%">&nbsp;</td>
      </tr>
      <tr> 
        <td width="50%" class="small"><?PHP echo $st_form['ville']?> *</td>
        <td width="50%"><input name="ville" class="bouton" type="text" class="chps"></td>
      </tr>
      <tr> 
        <td width="50%">&nbsp;</td>
        <td width="50%">&nbsp;</td>
      </tr>
      <tr> 
        <td colspan="2" align="center"> <input type="button" value="<?PHP echo $st_form['valider']	?>" class="bouton" onClick="ValiderFormInscr(this.form);"> 
        </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr> 
        <td width="50%" class="title4">(*) <?PHP echo $st_texte['mobligatoire']?> </td>
        <td width="50%">&nbsp;</td>
      </tr>
    </table>
</form></td>
  </tr>
  <tr>
    <td><img src="<?PHP echo HTTP_IMAGES?>conception.gif" width="780" height="59" usemap="#Map2" border="0" alt="GANESHA"></td>
  </tr>
</table>



<map name="Map"> 
  <area shape="rect" coords="15,59,76,74" href="../../intro/index.php" target="_parent" alt="Accueil" title="Accueil">
  <area shape="rect" coords="485,59,639,75" href="http://www.anemalab.org" target="_blank" alt="Site support" title="Site support">
</map>
<map name="Map2"> 
  <area shape="rect" coords="550,4,768,57" href="http://www.anema-formation.fr" target="_blank" alt="Anema formation" title="Anema formation">
</map>
<?PHP
	ClosePageHtml();
?>