WOW !! MUCH LOVE ! SO WORLD PEACE !
Fond bitcoin pour l'amélioration du site: 1memzGeKS7CB3ECNkzSn2qHwxU6NZoJ8o
  Dogecoin (tips/pourboires): DCLoo9Dd4qECqpMLurdgGnaoqbftj16Nvp


Home | Publier un mémoire | Une page au hasard

 > 

Analyse et conception par la méthode UP7 d'une application web de réservation des titres de voyage par voie ferroviaire: cas de la SNCC


par Daniel MBAYA MUSAKA
Université protestante de Lubumbashi - Licence 2021
  

précédent sommaire suivant

Bitcoin is a swarm of cyber hornets serving the goddess of wisdom, feeding on the fire of truth, exponentially growing ever smarter, faster, and stronger behind a wall of encrypted energy

1.1. 4.3. PRESERNTATION DES IHMs

Dans cette partie nous allons présenter les interfaces hommes-machines des quelques cas d'utilisation ci-dessous :

· Cas d'utilisation s'authentifier

· Cas d'utilisation créer compte

· Cas d'utilisation conclure contrat

4.3.1. Cas d'utilisation s'authentifier

Figure 4. 1 IHM du cas d'utilisation s'authentifier

<?php

session_start();

if(isset($_POST['myMail']) &&isset($_POST['myPass']))

{

// connexion à la base de données

include('../Data/DBConnect.php');

// importation de la classe abonne

include('../Metier/abonnes.php');

$mail_user = htmlspecialchars($_POST['myMail']);

$pass_user = htmlspecialchars($_POST['myPass']);

if($mail_user !== ""&&$pass_user !== "")

{

$user = newabonnes();

$count = $user->selectAllItem($mail_user,$pass_user);

if($count!=0) // nom d'utilisateur et mot de passe correctes

{

$data_user = $user->selectAll_data_by_Item($mail_user);

$data_user = $data_user->fetch();

$username = $data_user["username"];

$pseudo = $data_user["pseudo"];

$mail = $data_user["mail"];

$_SESSION['username'] = $username;

$_SESSION['pseudo'] = $pseudo;

$_SESSION['mail'] = $mail;

header('Location:reservation.identification.php');

}

else

{

echo'identifiants incorrect';

}

}

else

{

echo'Veuillez remplir tous les champs';

}

}

else

{

echo'eurreur';

}

?>

Figure 4. 2 Code d'authentification

4.3.2. Cas d'utilisation créer compte

Figure 4. 3 IHM du cas d'utilisation créer compte

<?php

include('../Metier/abonnes.php');

if (isset($_POST['nom']) &&isset($_POST['pseudo']) &&isset($_POST['mail']) &&isset($_POST['mdp']) &&isset($_POST['confir_mdp'])) {

if(!empty($_POST['nom']) && !empty($_POST['pseudo']) && !empty($_POST['mail']) && !empty($_POST['mdp']) && !empty($_POST['confir_mdp']))

//les variables

$nom = htmlspecialchars($_POST['nom']);

$pseudo = htmlspecialchars($_POST['pseudo']);

$mail = htmlspecialchars($_POST['mail']);

$mdp = htmlspecialchars($_POST['mdp']);

$conf_mdp = htmlspecialchars($_POST['confir_mdp']);

$max_size = 255;

$max_size_pass = 8;

if (mb_strlen($nom) <= $max_size) {

if (mb_strlen($pseudo) <= $max_size) {

if (mb_strlen($mdp) <= $max_size_pass&&mb_strlen($conf_mdp) <= $max_size_pass) {

if (filter_var($mail, FILTER_VALIDATE_EMAIL)) {

if ($mdp == $conf_mdp) {

$user1 = newabonnes();

$recove_mail = $user1->selectItem($mail);

if ($recove_mail == 0) {

$hash_mdp = sha1($mdp);

$user1->addUser($nom,$pseudo,$mail,$mdp);

$recove_name = $user1->selectItem($nom);

echo$recove_name;

// header('location:login.php');

} else {

$msg_mail = "Cette adresse est deja utilisé";

}

} else {

$msg_mdp = "Les mots de passe ne sont pas identiques";

}

} else {

$msg_email = "Votre email n'est pas valide!!";

}

} else {

$msg_size_mdp = "Le mot de passe ne peut pas depasser 8 caractères";

}

} else {

$msg_size = "Les caractères nes doivent pas depasser 255";

}

} else {

$msg_size = "Les caractères nes doivent pas depasser 255";

}

}

// else {

// $msg = "Veuillez remplir tous les champs";

// }

?>

<!DOCTYPEhtml>

<htmllang="en"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8">

<metaname="viewport"content="width=device-width, initial-scale=1, shrink-to-fit=no">

<metaname="description"content="">

<metaname="author"content="">

<linkrel="icon"href="../icon/n.png">

<linkhref="../style1/bootstrap.min.css"rel="stylesheet">

<linkrel="stylesheet"href="../style1/style_login.css">

<title>Nouveau compte</title>

<linkhref="../style1/signin.css"rel="stylesheet">

</head>

<style>

.msg_erro{

color: red;

}

</style>

<bodyclass="text-center">

<formclass="form-signin"method="POST"action="">

<imgsrc="../icon/n.png"alt=""class="rounded-circle"width="72"height="72"autofocus="">

<!-- <img class="mb-4" src="style1/bootstrap-solid.svg" alt="" width="72" height="72"> -->

<h1class="h3 mb-3 font-weight-normal">Créer votre compte</h1>

<?phpif (isset($msg_mdp)) { echo"<p class='msg_erro'>".$msg_mdp."</p>";}?>

<divclass="row">

<divclass="col-md-6 mb-3">

<labelfor="firstName">Nom</label>

<inputtype="text"class="form-control"id="firstName"placeholder="Nom"name="nom"value="<?phpif(isset($msg_size)){echo$nom;} ?>"required="">

<divclass="invalid-feedback">

<?phpif (isset($msg_size)) { echo"<p class='msg_erro'>".$msg_size."</p>";}

elseif (isset($msg_caract)) { echo"<p class='msg_erro'>".$msg_size."</p>";}

?>

</div>

</div>

<divclass="col-md-6 mb-3">

<labelfor="lastName">Pseudo</label>

<inputtype="text"class="form-control"id="lastName"placeholder="Pseudo"name="pseudo"value="<?phpif(isset($msg_size)){echo$pseudo;} ?>"required="">

<divclass="invalid-feedback">

<?phpif (isset($msg_size)) { echo"<p class='msg_erro'>".$msg_size."</p>";}

elseif (isset($msg_caract)) { echo"<p class='msg_erro'>".$msg_size."</p>";}

?>

</div>

</div>

</div>

<divclass="input-mb2">

<labelfor="inputEmail"class="sr-only">Adresse mail</label>

<inputtype="email"id="inputEmail"class="form-control"placeholder="Email address"name="mail"required=""value="<?phpif(isset($msg_mail)){echo$mail;} ?>">

<?phpif (isset($msg_mail)) { echo"<p class='msg_erro'>".$msg_mail."</p>";}?>

</div>

<divclass="input-mb2">

<labelfor="inputPassword"class="sr-only">Mot de passe</label>

<inputtype="password"id="inputPassword"class="form-control"name="mdp"placeholder="Password"required="">

<?phpif (isset($msg_size_mdp)) { echo"<p class='msg_erro'>".$msg_size_mdp."</p>";}?>

</div>

<divclass="input-mb2">

<labelfor="inputPassword"class="sr-only">Confimation mot de passe</label>

<inputtype="password"id="inputPassword"class="form-control"name="confir_mdp"placeholder="Password"required="">

<?phpif (isset($msg_size_mdp)) { echo"<p class='msg_erro'>".$msg_size_mdp."</p>";}?>

</div>

<buttonclass="btn btn-lg btn-primary btn-block"type="submit">Connexion</button>

<pclass="mt-5 mb-3 text-muted">(c) 2020-2021</p>

</form>

</body>

</html>

Figure 4. 4 Codes source créer compte

4.3.3. Cas d'utilisation conclure contrat

Figure 4. 5 IHM du cas d'utilisation gérer réservation place (identification)

<?php

session_start();

if($_SESSION['username'] !== ""){

$user = $_SESSION['username'];

// afficher un message

require_once('../Metier/Reservation.php');

require_once('../Metier/Client.php');

require_once('../Metier/trajet.php');

require_once('../Metier/Train.php');

if (isset($_POST['nomClient']) &&isset($_POST['postnomClient']) &&isset($_POST['sexeClient'])

&&isset($_POST['mailClient']) &&isset($_POST['telClient']) &&isset($_POST['adClient'])

&&isset($_POST['numCarteClient']) &&isset($_POST['numInrbClient'])) {

$nom_c = htmlspecialchars($_POST['nomClient']);

$prenom_c = htmlspecialchars($_POST['postnomClient']);

$sexe_c = htmlspecialchars($_POST['sexeClient']);

$mail_c = htmlspecialchars($_POST['mailClient']);

$tel_c = htmlspecialchars($_POST['telClient']);

$ad_c = htmlspecialchars($_POST['adClient']);

$numCarte_c = htmlspecialchars($_POST['numCarteClient']);

$numInrb_c = htmlspecialchars($_POST['numInrbClient']);

$max_size = 255;

$max_size_num = 10;

$max_size_tel = 20;

if (mb_strlen($nom_c) <= $max_size) {

if (mb_strlen($prenom_c) <= $max_size) {

if (mb_strlen($numCarte_c) <= $max_size_num&&mb_strlen($numInrb_c) <= $max_size_num) {

if (filter_var($mail_c, FILTER_VALIDATE_EMAIL)) {

if (mb_strlen($tel_c) <= $max_size_tel) {

$user1 = newClient();

$recove_mail = $user1->selectItem($mail_c);

$custom = newClient();

$custom->addClient($nom_c,$prenom_c,$sexe_c,$numCarte_c,$tel_c,$mail_c,$ad_c,$numInrb_c);

$recove_elements = $custom->selectAll_by_Item($mail_c);

// echo count($recove_elements);

// print_r($recove_elements);

for ($i=0; $i<count($recove_elements) ; $i++) {

$id = $recove_elements[$i]['Id'];

}

$_SESSION['ID'] = $id;

header("location:reservation.info.php");

} else {

echo"Le numero ne doit pas depasser ".$max_size_tel." caractères";

}

} else {

echo"Votre email n'est pas valide!!";

}

} else {

echo"Le mot de passe ne peut pas depasser ".$max_size_num." caractères";

}

} else {

echo"Les caractères nes doivent pas depasser ".$max_size;

}

} else {

echo"Les caractères nes doivent pas depasser ".$max_size;

}

}

}

?>

Figure 4. 6 Codes source gérer réservation place (identification)

Figure 4. 7 IHM du cas d'utilisation gérer réservation place (réservation)

<?php

session_start();

if(isset($_SESSION['username'])){

if($_SESSION['username'] !== ""){

$user = $_SESSION['username'];

require_once('../Metier/Reservation.php');

require_once('../Metier/Client.php');

require_once('../Metier/trajet.php');

require_once('../Metier/Train.php');


if (isset($_POST['ville']) &&isset($_POST['classe']) &&isset($_POST['nbPass'])

&&isset($_POST['nbEnfant']) &&isset($_POST['idreserv']) &&isset($_POST['depart'])) {

$idreserv = htmlspecialchars(isset($_POST['idreserv']));

$depart = htmlspecialchars($_POST['depart']);

$ville = htmlspecialchars($_POST['ville']);

$class = htmlspecialchars($_POST['classe']);

$nbpass = htmlspecialchars($_POST['nbPass']);

$nbenf = htmlspecialchars($_POST['nbEnfant']);

$reserv = newReservation();

if (isset($_SESSION['ID'])) {

$id_user_reserv = $_SESSION['ID'];

// include('reservation.identification.php');

$reserv->insertItem($depart,$ville,$class,$nbpass,$nbenf,$id_user_reserv);

header('location:Result.reservation.php');

}

}

}

}

?>

<!DOCTYPEhtml>

<!-- saved from url=(0052)https://getbootstrap.com/docs/4.0/examples/checkout/ -->

<htmllang="en"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8">

<metaname="viewport"content="width=device-width, initial-scale=1, shrink-to-fit=no">

<metaname="description"content="">

<metaname="author"content="">

<linkrel="icon"href="https://getbootstrap.com/docs/4.0/assets/img/favicons/favicon.ico" rel="nofollow">

<title>Reservation</title>

<linkrel="canonical"href="https://getbootstrap.com/docs/4.0/examples/checkout/" rel="nofollow">

<!-- Bootstrap core CSS -->

<linkhref="../style1/bootstrap.min.css"rel="stylesheet">

<!-- Custom styles for this template -->

<linkhref="../style1/form-validation.css"rel="stylesheet">

</head>

<style>.a-width{width:60%; margin-left:20%;}.py-5{margin-top:2%;margin-bottom:2%;background:url("../img/home-bg.jpg"); border-radius:5px}</style>

<bodyclass="bg-light">

<navclass="navbar navbar-expand-lg navbar-dark bg-dark">

<divclass="container-fluid">

<aclass="navbar-brand"href="#"><iclass="fa fa-train"aria-hidden="true"></i><spanclass="logo"> Safari.net</span></a>

<buttonclass="navbar-toggler"type="button"data-bs-toggle="collapse"data-bs-target="#navbarSupportedContent"aria-controls="navbarSupportedContent"aria-expanded="false"aria-label="Toggle navigation">

<spanclass="navbar-toggler-icon"></span>

</button>

<divclass="collapse navbar-collapse"id="navbarSupportedContent">

<ulclass="navbar-nav me-auto mb-2 mb-lg-0">

<liclass="nav-item">

<aclass="nav-link active"aria-current="page"href="#">Accueil</a>

</li>

<liclass="nav-item dropdown">

<aclass="nav-link dropdown-toggle"href="#"id="navbarDropdown"role="button"data-bs-toggle="dropdown"aria-expanded="false">

Destination

</a>

<ulclass="dropdown-menu"aria-labelledby="navbarDropdown">

<li><aclass="dropdown-item"href="#">Action</a></li>

<li><aclass="dropdown-item"href="#">Another action</a></li>

<li><hrclass="dropdown-divider"></li>

<li><aclass="dropdown-item"href="#">Something else here</a></li>

</ul>

</li>

<liclass="nav-item">

<aclass="nav-link"href="#">Horaire de Train</a>

</li>

<liclass="nav-item">

<aclass="nav-link"href="interfaces/reservation.identification.php">Reservation en ligne</a>

</li>

<liclass="nav-item">

<aclass="nav-link"href="interfaces/login.php">Accès agents</a>

</li>

<!-- <li class="nav-item">

<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>

</li> -->

</ul>

<aclass="nav-link"href="interfaces/login.php"><inputclass="col-btn-sbm"type="submit"value="Login"></a>

<divstyle="margin-left:30%">

<?php

if (isset($user)) {

echo'<span style="color: white; font-familly: maiandra">'.$user.' Connecté</span>';

}

?>

</div>

</div>

</div>

</nav>

<divclass="container">

<divclass="py-5 text-center">

<!-- <img class="d-block mx-auto mb-4" src="../img/home-bg.jpg" alt="" width="1000" height="200"> -->

<h2>Reserver en ligne</h2>

<pclass="lead"style="color:white">reserver vos places a bord de nos train selon vos choix.</p>

</div>

<?php

?>

<!-- Updating -->

<divclass="col-md-12 order-md-1 sized">

<formmethod="POST"action="">

<divclass=" a-width">

<h4class="mb-3">Reservation</h4>

<divclass="row">

<divclass="col-md-6 mb-3">

<inputtype="hidden"name="idreserv">

<labelfor="firstName">Train</label>

<selectid="disabledSelect"name="depart"class="form-control">

<?php

$trajet = newTrain();

$data = $trajet->selectTrain();

for ($i=0; $i<count($data) ; $i++) {

$id = $data[$i]['id'];

$nom = $data[$i]['nom'];

$desc = $data[$i]['description'];

$cat = $data[$i]['categorie'];

$icon = $data[$i]['icon'];

echo"<option value='".$nom."'>??".$nom." / ".$cat."</option>";

}

?>

</select>

<divclass="invalid-feedback">

</div>

</div>

<divclass="col-md-6 mb-3">

<inputtype="hidden"name="idreserv">

<labelfor="firstName">Depart</label>

<selectid="disabledSelect"name="depart"class="form-control">

<?php

$trajet = newtrajet();

$data = $trajet->selectGare();

for ($i=0; $i<count($data) ; $i++) {

$id = $data[$i]['id'];

$ville = $data[$i]['ville'];

$titre = $data[$i]['gare'];

echo"<option value='".$ville."'><b>".$ville."</b> / ".$titre."</option>";

}

?>

</select>

<divclass="invalid-feedback">

</div>

</div>

<divclass="col-md-6 mb-3">

<labelfor="firstName">Destination</label>

<selectid="disabledSelect"name="ville"class="form-control">

<?php

$trajet = newtrajet();

$data = $trajet->selectGare();

for ($i=0; $i<count($data) ; $i++) {

$id = $data[$i]['id'];

$ville = $data[$i]['ville'];

$titre = $data[$i]['gare'];

echo"<option value='".$ville."'><b>".$ville."</b> / ".$titre."</option>";

}

?>

</select>

<divclass="invalid-feedback">

</div>

</div>

<divclass="col-md-6 mb-3">

<labelfor="lastName">Classe</label>

<selectid="disabledSelect"name="classe"class="form-control">

<optionvalue="1er classe de luxe">1er classe de luxe</option>

<optionvalue="1er classe ordinaire">1er classe ordinaire</option>

<optionvalue="2eme classe">2eme classe</option>

<optionvalue="3eme classe">3eme classe</option>

<optionvalue="4eme classe">4eme classe</option>

</select>

<divclass="invalid-feedback">

</div>

</div>

<divclass="col-md-6 mb-3">

<labelfor="lastName">Nombre des passagers</label>

<selectid="disabledSelect"name="nbPass"class="form-control">

<optionvalue="1">1</option>

<optionvalue="2">2</option>

<optionvalue="3">3</option>

<optionvalue="3">+3</option>

</select>

<divclass="invalid-feedback">

</div>

</div>

<divclass="col-md-6 mb-3">

<labelfor="lastName">Nombre d'enfants</label>

<selectid="disabledSelect"name="nbEnfant"class="form-control">

<optionvalue="0">0</option>

<optionvalue="1">1</option>

<optionvalue="2">2</option>

<optionvalue="+2">+2</option>

</select>

<divclass="invalid-feedback">

</div>

</div>

</div>

<hrclass="mb-4">

<buttonclass="btn btn-primary btn-lg btn-block"type="submit">Valider</button>

</form>

</div>

</div>

<footerclass="my-5 pt-5 text-muted text-center text-small">

<pclass="mb-1">(c) 2017-2018 Company Name</p>

<ulclass="list-inline">

<liclass="list-inline-item"><ahref="https://getbootstrap.com/docs/4.0/examples/checkout/#" rel="nofollow">Privacy</a></li>

<liclass="list-inline-item"><ahref="https://getbootstrap.com/docs/4.0/examples/checkout/#" rel="nofollow">Terms</a></li>

<liclass="list-inline-item"><ahref="https://getbootstrap.com/docs/4.0/examples/checkout/#" rel="nofollow">Support</a></li>

</ul>

</footer>

</div>

</form>

<!-- Bootstrap core JavaScript

================================================== -->

<!-- Placed at the end of the document so the pages load faster -->

<scriptsrc="../style1/jquery-3.2.1.slim.min.js.télécharger"integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"crossorigin="anonymous"></script>

<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery-slim.min.js"><\/script>')</script>

<scriptsrc="../style1/popper.min.js.télécharger"></script>

<scriptsrc="../style1/bootstrap.min.js.télécharger"></script>

<scriptsrc="../style1/holder.min.js.télécharger"></script>

<script>

// Example starter JavaScript for disabling form submissions if there are invalid fields

(function() {

'use strict';

window.addEventListener('load', function() {

// Fetch all the forms we want to apply custom Bootstrap validation styles to

varforms = document.getElementsByClassName('needs-validation');

// Loop over them and prevent submission

varvalidation = Array.prototype.filter.call(forms, function(form) {

form.addEventListener('submit', function(event) {

if (form.checkValidity() === false) {

event.preventDefault();

event.stopPropagation();

}

form.classList.add('was-validated');

}, false);

});

}, false);

})();

</script>

</body></html>

Figure 4. 8 Codes source gérer réservation place (réservation)

précédent sommaire suivant






Bitcoin is a swarm of cyber hornets serving the goddess of wisdom, feeding on the fire of truth, exponentially growing ever smarter, faster, and stronger behind a wall of encrypted energy








"Soit réservé sans ostentation pour éviter de t'attirer l'incompréhension haineuse des ignorants"   Pythagore