You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
980 B
45 lines
980 B
<?php
|
|
|
|
|
|
class Modele {
|
|
|
|
function afficherQuestions(){
|
|
$db = new SqliteDb();
|
|
//$db->createTable();
|
|
$qg = new QuestionsGateway($db);
|
|
|
|
$tabQuestions = $qg->afficherQuestions();
|
|
return $tabQuestions;
|
|
}
|
|
|
|
function afficherDemonstrations(){
|
|
$db = new SqliteDb();
|
|
//$db->createTable();
|
|
$qg = new QuestionsGateway($db);
|
|
|
|
$tabDemo = $qg->afficherDemonstrations();
|
|
return $tabDemo;
|
|
}
|
|
|
|
function afficherQCM(){
|
|
$db = new SqliteDb();
|
|
//$db->createTable();
|
|
$qg = new QCMGateway($db);
|
|
|
|
$tabQCM = $qg->afficherQCM();
|
|
//die(print_r($tabQCM, true ));
|
|
return $tabQCM;
|
|
}
|
|
|
|
function connection($id, $mdp){
|
|
$ug = new UserGateway(new SqliteDb());
|
|
$vraiMdp = $ug->getPassword($id);
|
|
if(!password_verify($mdp, $vraiMdp)){
|
|
return null;
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
}
|