示例#1
0
<?php

include_once "C:\\wamp\\www\\CMPJ\\Vendors\\Entity\\adherent.php";
include_once "C:\\wamp\\www\\CMPJ\\Controleurs\\HTTPRequest.php";
include_once "C:\\wamp\\www\\CMPJ\\Controleurs\\HTTPResponse.php";
include_once "C:\\wamp\\www\\CMPJ\\Model\\AdherentManagerPDO.php";
include_once "C:\\wamp\\www\\CMPJ\\Model\\PDOFactory.php";
$manager = new AdherentManagerPDO(PDOFactory::getPdoInstance());
?>
<!DOCTYPE html>
<html>
	<head>
		<title>Formulaire d'inscription CMPJ MAYO-LOUTI</title>
		<meta charset="utf-8" content="text/html">
		<link rel="stylesheet" href="css/Envision.css" >
	</head>
	<body>
		<div id="wrap">	
			<header>
				<h1><a href="./">FICHE D'INSCRIPTION  </a></h1>
				 <p>CMPJ du Mayo-louti</p>
				
			</header>
				<nav>
					<ul>
						<li>
			  <?php 
$liens = ['Accueil' => 'bootstrap.php', 'Liste des adhérents' => 'listeAdherent.php'];
foreach ($liens as $k => $v) {
    if ($_SERVER['REQUEST_URI'] == $k) {
        echo '<a href="' . $v . '" class="active">' . $k . '</a>';
示例#2
0
文件: modifier.php 项目: sdmg15/cmpj
<?php

include_once "C:\\wamp\\www\\CMPJ\\Vendors\\Entity\\adherent.php";
include_once "C:\\wamp\\www\\CMPJ\\Controleurs\\HTTPRequest.php";
include_once "C:\\wamp\\www\\CMPJ\\Controleurs\\HTTPResponse.php";
include_once "C:\\wamp\\www\\CMPJ\\Model\\AdherentManagerPDO.php";
include_once "C:\\wamp\\www\\CMPJ\\Model\\PDOFactory.php";
$request = new HTTPRequest();
$manager = new AdherentManagerPDO(PDOFactory::getPdoInstance());
if (isset($_GET['modifier'])) {
    if (!$manager->Exists((int) $_GET['modifier'])) {
        $message = 'NOT FOUND.';
    } else {
        $adherent = $manager->getUnique((int) $_GET['modifier']);
    }
}
if ($request->postExists('nom')) {
    //on hydrate les  données
    $adherent = new Adherent(['nom' => $request->postData('nom'), 'prenom' => $request->postData('prenom'), 'dateNaissance' => $request->postData('date'), 'lieu' => $request->postData('lieuNaissance'), 'sexe' => $request->postData('sexe'), 'region' => $request->postData('region'), 'departement' => $request->postData('departement'), 'ethnie' => $request->postData('ethnie'), 'nationalite' => $request->postData('nationalite'), 'profession_mere_parrain' => $request->postData('profession'), 'situationMatrimoniale' => $request->postData('situation'), 'lieuResidence' => $request->postData('lieuResidence'), 'adresse' => $request->postData('addr'), 'telPerso' => $request->postData('telPerso'), 'sosTel' => $request->postData('sosTel'), 'sosName' => $request->postData('sosName'), 'diplomeEleve' => $request->postData('diplome'), 'dateObtentionPlace' => $request->postData('dateObtention'), 'speakLanguage' => $request->postData('speakLanguage'), 'filiere' => $request->postData('option')]);
    $adherent->setId((int) $_GET['modifier']);
    if ($adherent->isvalid()) {
        $manager->update($adherent);
        $message = 'Informations bien modifiées ';
    } else {
        $erreurs = $adherent->getErreurs();
    }
}
?>
<!DOCTYPE html>
<html>
	<head>
示例#3
0
文件: index.php 项目: sdmg15/cmpj
````<?php 
include_once "C:\\wamp\\www\\CMPJ\\Vendors\\Entity\\adherent.php";
include_once "C:\\wamp\\www\\CMPJ\\Controleurs\\HTTPRequest.php";
include_once "C:\\wamp\\www\\CMPJ\\Controleurs\\HTTPResponse.php";
include_once "C:\\wamp\\www\\CMPJ\\Model\\AdherentManagerPDO.php";
include_once "C:\\wamp\\www\\CMPJ\\Model\\PDOFactory.php";
$request = new HTTPRequest();
$manager = new AdherentManagerPDO(PDOFactory::getPdoInstance());
if ($request->postExists('nom')) {
    //on hydrate les  données
    $adherent = new Adherent(['nom' => $request->postData('nom'), 'prenom' => $request->postData('prenom'), 'dateNaissance' => $request->postData('date'), 'lieu' => $request->postData('lieuNaissance'), 'sexe' => $request->postData('sexe'), 'region' => $request->postData('region'), 'departement' => $request->postData('departement'), 'ethnie' => $request->postData('ethnie'), 'nationalite' => $request->postData('nationalite'), 'profession_mere_parrain' => $request->postData('profession'), 'situationMatrimoniale' => $request->postData('situation'), 'lieuResidence' => $request->postData('lieuResidence'), 'adresse' => $request->postData('addr'), 'telPerso' => $request->postData('telPerso'), 'sosTel' => $request->postData('sosTel'), 'sosName' => $request->postData('sosName'), 'diplomeEleve' => $request->postData('diplome'), 'dateObtentionPlace' => $request->postData('dateObtention'), 'speakLanguage' => $request->postData('speakLanguage'), 'filiere' => $request->postData('option')]);
    if ($adherent->isvalid()) {
        $manager->add($adherent);
        $message = 'Adhérent bien ajouté! ';
    } else {
        $erreurs = $adherent->getErreurs();
    }
}
?>
<!DOCTYPE html>
<html>
	<head>
		<title>Formulaire d'inscription CMPJ MAYO-LOUTI</title>
		<meta charset="utf-8" content="text/html">
		<link rel="stylesheet" href="css/Envision.css" >
	</head>
	<body>
		<div id="wrap">	
			<header>
				<h1><a href="./">FICHE D'INSCRIPTION  </a></h1>
				 <p>CMPJ du Mayo-louti</p>