예제 #1
0
 $pseudo_autres = mysql_prep($_POST["name"]);
 $nom_patient = mysql_prep($_POST["Nom_Patient"]);
 $heure_aller = mysql_prep($_POST["Heure"]);
 $aller_retour = mysql_prep($_POST["AllerRetour"]);
 if (isset($_POST['HeureRetour'])) {
     $heure_retour = mysql_prep($_POST["HeureRetour"]);
 } else {
     $heure_retour = "";
 }
 if ($heure_retour == "NA") {
     $heure_retour = "";
 }
 $type_transport = type_transport($pseudo);
 validate_pseudo($pseudo, $pseudo_autres, $nom_patient);
 validate_heure($heure_aller, $aller_retour, $heure_retour);
 validate_chauffeur_by_name($chauffeur);
 validation_pseudo_clients($pseudo);
 if (empty($errors)) {
     $to = '*****@*****.**';
     $subject = 'EDITION Detail de la course par ' . $_POST["Chauffeur"] . " saisie " . $todaytime;
     $message = "Subject:   {$subject}\r\n";
     $message .= "Date Course:  {$_POST['DateCourse']}\r\n\r\n";
     $message .= "Nom Client:   {$_POST['Pseudo']}\r\n";
     $message .= "Départ de:   {$_POST['Depart']}\r\n";
     $message .= "Arrivée à:   {$_POST['Arrivee']}\r\n";
     $message .= "Aller Retour:   {$_POST['AllerRetour']}\r\n";
     $message .= "Heure:  {$_POST['Heure']}\r\n\r\n";
     $message .= "Heure Retour:  {$_POST['HeureRetour']}\r\n\r\n";
     $message .= "Nom (autres):  {$_POST['name']}\r\n\r\n";
     $message .= "Nom Patient Tour:  {$_POST['Nom_Patient']}\r\n\r\n";
     $message .= "Bon No:  {$_POST['Bon_No']}\r\n\r\n";
예제 #2
0
파일: 10_modele.php 프로젝트: kamy333/kamy
 if (isset($chauffeur)) {
     validate_chauffeur_by_name($chauffeur);
 }
 if (isset($pseudo)) {
     validation_pseudo_clients($pseudo);
 }
 if (isset($pseudo) && isset($pseudo_autres) && isset($nom_patient)) {
     validate_pseudo($pseudo, $pseudo_autres, $nom_patient, true);
 }
 if (isset($pseudo) && isset($bon_no)) {
     validate_pseudo_bon_no($pseudo, $bon_no, true);
 }
 if (isset($pseudo) && isset($pseudo_autres) && isset($nom_patient) && isset($bon_no) && isset($chauffeur)) {
     list($msg_pseudo_autres, $msg_nom_patient) = validate_pseudo($pseudo, $pseudo_autres, $nom_patient, true);
     $msg_bon_no = validate_pseudo_bon_no($pseudo, $bon_no, true);
     $msg_chauffeur = validate_chauffeur_by_name($chauffeur, false);
     $msg_pseudo = validation_pseudo_clients($pseudo);
     $msg_pseudo_autres = get_warning_error_p($msg_pseudo_autres, true);
     $msg_nom_patient = get_warning_error_p($msg_nom_patient, true);
     $msg_bon_no = get_warning_error_p($msg_bon_no, true);
     $msg_chauffeur = get_warning_error_p($msg_chauffeur, false);
     $msg_pseudo = get_warning_error_p($msg_pseudo, false);
     $client = find_client_from_pseudo($pseudo);
 }
 // non post from GET
 $missing = validate_presences_non_post($required_fields, $_POST, false);
 foreach ($_POST as $key => $val) {
     $msg_key = "msg_presence_error_" . $key;
     //  var_dump($msg_key);
     $text = "<strong>&nbsp;&nbsp;  " . ucfirst($key) . "</strong> est à compléter impérativement";
     ${$msg_key} = array_key_exists($key, $missing) ? get_warning_error_p($text, false) : "";