Exemplo n.º 1
0
 public function inscrire(Membre $membre)
 {
     $bdd = $this->getBdd();
     $req = $bdd->prepare('INSERT INTO membre(nom, prenom, dateNaissance, email, tel, adresse, cp, ville, licenceId, crit) VALUES(:nom, :prenom, :dateNaissance, :email, :tel, :adresse, :cp, :ville, :licenceId, :crit)');
     $req->bindValue('nom', $membre->getNom(), PDO::PARAM_STR);
     $req->bindValue('prenom', $membre->getPrenom(), PDO::PARAM_STR);
     $req->bindValue('dateNaissance', $membre->getDateNaissance(), PDO::PARAM_STR);
     $req->bindValue('email', $membre->getEmail(), PDO::PARAM_STR);
     $req->bindValue('tel', $membre->getTel(), PDO::PARAM_INT);
     $req->bindValue('adresse', $membre->getAdresse(), PDO::PARAM_INT);
     $req->bindValue('cp', $membre->getCp(), PDO::PARAM_INT);
     $req->bindValue('ville', $membre->getVille(), PDO::PARAM_INT);
     $req->bindValue('licenceId', $membre->getLicenceId(), PDO::PARAM_INT);
     $req->bindValue('crit', $membre->getCrit(), PDO::PARAM_BOOL);
     if ($req->execute()) {
         $req->closeCursor();
         return TRUE;
     } else {
         $req->closeCursor();
         return FALSE;
     }
 }
Exemplo n.º 2
0
<?php

session_cache_expire(30);
session_start();
include 'functions.php';
include '../classes/membre.php';
if (isset($_REQUEST['fonction']) && $_REQUEST['fonction'] != '') {
    $_REQUEST['fonction']($_REQUEST);
}
if (isset($_POST['identifiant']) && $_POST['identifiant'] != "" && isset($_POST['mdp']) && $_POST['mdp'] != "") {
    $salarie = new Membre($_POST['identifiant'], $_POST['mdp']);
    if ($salarie->getNom() == null) {
        echo 'Erreur : les informations saisies sont incorrectes ( login : '******'identifiant'] . ' )' . $_POST['mdp'];
        // header('Location: ../index.php?Erreur=1');
    } else {
        header('Location: ../admin.php');
    }
} else {
    echo 'Erreur : les informations saisies sont incorrectes!';
}
Exemplo n.º 3
0
<?php

$donnees = $president->getMembre($_GET['id']);
$membre = new Membre($donnees);
$licence = $president->getMembreLicence($membre->getId());
?>
<div class="membre-container">
	<div class="membre-avatar"><span class="glyphicon glyphicon-user"></span></div>
	<div class="membre-etat-civil">
		<p><span class="membre-label">Nom :</span> <?php 
echo $membre->getNom();
?>
 <span class="membre-label">Prénom :</span> <?php 
echo $membre->getPrenom();
?>
 <span class="membre-label">Age :</span> <?php 
echo $membre->getAge();
?>
</p>
	</div>
</div>