<?PHP
/************************************************************************/
/* SFORM Extender for NPDS SABLE Contact Example .                      */
/* ===========================                                          */
/*                                                                      */
/* P. Brunier 2002 - 2007                                               */
/*                                                                      */
/* 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.       */
/************************************************************************/
/* Dont modify this file is you dont know what you make                 */
/************************************************************************/

global $ModPath, $ModStart;
$sform_path="modules/sform/";
include_once($sform_path."sform.php");

global $m;
$m=new form_handler();
//********************
$m->add_form_title("CONTACT");
$m->add_form_method("post");
$m->add_form_check("true");
$m->add_mess("[french] * désigne un champ obligatoire [/french][english] * indicate an obligatory field [/english]");
$m->add_submit_value("ok");
$m->add_url("modules.php");
$m->add_field("ModStart","",$ModStart,'hidden',false);
$m->add_field("ModPath","",$ModPath,'hidden',false);

/************************************************/
include($sform_path."contact/formulaire.php");
/************************************************/
// Manage the <form>
switch($ok) {

   case 'Soumettre':
   case 'Submit':
      if (!$sformret) {
         $m->make_response();
         $message=$m->aff_response("class=\"ligna\"","not_echo","");
         global $notify_email;
         $message="<html><body>".aff_langue($message)."</body></html>";
         send_email($notify_email, $m->title,$message,"","","html");
         opentable();
         echo "<p align=\"center\">".aff_langue("[french]Votre demande est prise en compte. Nous y répondrons au plus vite[/french][english]Your request is taken into account. We will answer it as fast as possible.[/english]")."</p>";
         closetable();
         break;
      } else {
         $ok="";
      }

   default:
      echo aff_langue($m->print_form("class=\"ligna\""));
      break;
}
?>