parent
5aab69905f
commit
70d60c77d6
@ -0,0 +1,161 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once('../BDD/SqliteDb.php');
|
||||||
|
$db = new SqliteDb('o');
|
||||||
|
|
||||||
|
if ($_GET['type']=='demo'){
|
||||||
|
$file = fopen('..\imports\demonstration\demo_exportes.txt', "a");
|
||||||
|
$matches = array();
|
||||||
|
$trouve = 0;
|
||||||
|
$reponseQuery = $db->prepare('SELECT * FROM demonstration');
|
||||||
|
$reponseResult = $reponseQuery->execute();
|
||||||
|
while ($r = $reponseResult->fetchArray()){
|
||||||
|
$ligne = $r['bddconcernee'].'**'.$r['chapitre'].'**'.$r['description'].'**'.$r['reponse'];
|
||||||
|
$handle = @fopen('..\imports\demonstration\demo_exportes.txt', "r");
|
||||||
|
if ($handle)
|
||||||
|
{
|
||||||
|
while (!feof($handle))
|
||||||
|
{
|
||||||
|
$buffer = fgets($handle);
|
||||||
|
if(strpos($buffer, $ligne) !== FALSE)
|
||||||
|
$trouve = 1;
|
||||||
|
}
|
||||||
|
fclose($handle);
|
||||||
|
}
|
||||||
|
if($trouve==0) fwrite($file, $ligne."\n");
|
||||||
|
$trouve = 0;
|
||||||
|
//fwrite($file, $ligne."\n");
|
||||||
|
}
|
||||||
|
fclose($file);
|
||||||
|
// file_put_contents('..\imports\demonstration\demo_exportes.txt', rtrim(file_get_contents('..\imports\demonstration\demo_exportes.txt')));
|
||||||
|
}
|
||||||
|
|
||||||
|
else if ($_GET['type']=='tp'){
|
||||||
|
$file = fopen('..\imports\tp\tpexportes.txt', "a");
|
||||||
|
$matches = array();
|
||||||
|
$trouve = 0;
|
||||||
|
$reponseQuery = $db->prepare('SELECT bddConcernee,numTp,numquestion,question,reponse,points FROM Correct UNION SELECT bddConcernee,numTp,numquestion,question,reponse,points FROM FunctionCorrect');
|
||||||
|
$reponseResult = $reponseQuery->execute();
|
||||||
|
while ($r = $reponseResult->fetchArray()){
|
||||||
|
$questionQuery = 'SELECT type FROM type WHERE numQuestion = ? AND numTp=? ';
|
||||||
|
$questionQuery = $db->prepare($questionQuery);
|
||||||
|
$questionQuery->bindParam(1, $r['numquestion']);
|
||||||
|
$questionQuery->bindParam(2, $r['numTp']);
|
||||||
|
$questionResult = $questionQuery->execute();
|
||||||
|
$typeRow = $questionResult->fetchArray();
|
||||||
|
$reponse = $r['reponse'];
|
||||||
|
if($typeRow['type'] == 'functionCorrect'){
|
||||||
|
$questionQuery = 'SELECT fonctionCorrect FROM functionCorrect WHERE numQuestion = ? AND numTp=? ';
|
||||||
|
$questionQuery = $db->prepare($questionQuery);
|
||||||
|
$questionQuery->bindParam(1, $r['numquestion']);
|
||||||
|
$questionQuery->bindParam(2, $r['numTp']);
|
||||||
|
$questionResult = $questionQuery->execute();
|
||||||
|
$fonctionRow = $questionResult->fetchArray();
|
||||||
|
$type='fonction';
|
||||||
|
|
||||||
|
|
||||||
|
$re = '/^\s*SELECT\s*([a-z0-9])/i';
|
||||||
|
preg_match($re, $reponse, $matches, PREG_OFFSET_CAPTURE);
|
||||||
|
$string = 'f'.$matches[1][0];
|
||||||
|
$freponse = str_replace($matches[1][0],'', $reponse);
|
||||||
|
|
||||||
|
$fonction = $fonctionRow['fonctionCorrect'];
|
||||||
|
$re = '/^\s*CREATE OR REPLACE FUNCTION\s*([a-z0-9])/i';
|
||||||
|
preg_match($re, $fonction, $matches2, PREG_OFFSET_CAPTURE);
|
||||||
|
|
||||||
|
$string2 = 'f'.$matches2[1][0];
|
||||||
|
$ffonction = str_replace($matches2[1][0],'', $fonction);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$freponse = $reponse;
|
||||||
|
$type='requete';
|
||||||
|
}
|
||||||
|
$ligne = $type.'**'.$r['bddConcernee'].'**'.$r['numTp'].'**'.$r['question'].'**'.$freponse.'**'.$r['points'].'**n';
|
||||||
|
|
||||||
|
if($typeRow['type'] == 'functionCorrect'){
|
||||||
|
$ligne = $ligne.'**'.$ffonction;
|
||||||
|
}
|
||||||
|
$handle = @fopen('..\imports\tp\tp_exportes.txt', "r");
|
||||||
|
if ($handle)
|
||||||
|
{
|
||||||
|
while (!feof($handle))
|
||||||
|
{
|
||||||
|
$buffer = fgets($handle);
|
||||||
|
if(strpos($buffer, $ligne) !== FALSE)
|
||||||
|
$trouve = 1;
|
||||||
|
}
|
||||||
|
fclose($handle);
|
||||||
|
}
|
||||||
|
if($trouve==0) fwrite($file, $ligne."\n");
|
||||||
|
$trouve = 0;
|
||||||
|
//fwrite($file, $ligne."\n");
|
||||||
|
}
|
||||||
|
fclose($file);
|
||||||
|
// file_put_contents('..\imports\demonstration\demo_exportes.txt', rtrim(file_get_contents('..\imports\demonstration\demo_exportes.txt')));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else if($_GET['type']=='qcm'){
|
||||||
|
$file = fopen('..\imports\qcm\qcm_exportes.txt', "a");
|
||||||
|
$matches = array();
|
||||||
|
$trouve = 0;
|
||||||
|
$reponseQuery = $db->prepare('SELECT * FROM Qcm ORDER By numQcm');
|
||||||
|
$reponseResult = $reponseQuery->execute();
|
||||||
|
while ($qcm = $reponseResult->fetchArray()){
|
||||||
|
$ligne = $qcm['numQcm'].'**'.$qcm['nom'].'**'.$qcm['type'];
|
||||||
|
$reponseQuery = $db->prepare('SELECT * FROM QcmQuestion WHERE numQcm=? ORDER By question');
|
||||||
|
$reponseQuery->bindParam(1, $qcm['numQcm']);
|
||||||
|
$questionResult = $reponseQuery->execute();
|
||||||
|
|
||||||
|
while ($question = $questionResult->fetchArray()){
|
||||||
|
$ligne = $qcm['numQcm'].'**'.$qcm['nom'].'**'.$qcm['type'];
|
||||||
|
$ligne = $ligne.'**'.$question['question'];
|
||||||
|
|
||||||
|
$reponseQuery = $db->prepare('SELECT * FROM QcmReponse WHERE numQcm=? AND numQuestion=? ORDER BY numReponse');
|
||||||
|
$reponseQuery->bindParam(1, $qcm['numQcm']);
|
||||||
|
$reponseQuery->bindParam(2, $question['numQuestion']);
|
||||||
|
$reponsResult = $reponseQuery->execute();
|
||||||
|
if($qcm['type'] == 'test'){
|
||||||
|
$ligne = $ligne.'**';
|
||||||
|
while ($reponseTest = $reponsResult->fetchArray()){
|
||||||
|
$ligne = $ligne.$reponseTest['reponse'].'---'.$reponseTest['points'].'+++';
|
||||||
|
}
|
||||||
|
$ligne = substr($ligne, 0, -3);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$ligne = $ligne.'**';
|
||||||
|
while ($reponseV = $reponsResult->fetchArray()){
|
||||||
|
$ligne = $ligne.$reponseV['reponse'].'+++';
|
||||||
|
}
|
||||||
|
$ligne = substr($ligne, 0, -3);
|
||||||
|
$ligne = $ligne.'**';
|
||||||
|
$reponseQuery = $db->prepare('SELECT * FROM QcmCorrection WHERE numQcm=? AND numQuestion=? ORDER BY numQcm,numQuestion');
|
||||||
|
$reponseQuery->bindParam(1, $qcm['numQcm']);
|
||||||
|
$reponseQuery->bindParam(2, $question['numQuestion']);
|
||||||
|
$reponsResult = $reponseQuery->execute();
|
||||||
|
while ($reponse = $reponsResult->fetchArray()){
|
||||||
|
$ligne = $ligne.$reponse['numReponse'].',,';
|
||||||
|
}
|
||||||
|
$ligne = substr($ligne, 0, -2);
|
||||||
|
|
||||||
|
}
|
||||||
|
$trouve = 0;
|
||||||
|
$handle = @fopen('..\imports\qcm\qcm_exportes.txt', "r");
|
||||||
|
if ($handle)
|
||||||
|
{
|
||||||
|
while (!feof($handle))
|
||||||
|
{
|
||||||
|
$buffer = fgets($handle);
|
||||||
|
if(strpos($buffer, $ligne) !== FALSE)
|
||||||
|
$trouve = 1;
|
||||||
|
}
|
||||||
|
fclose($handle);
|
||||||
|
}
|
||||||
|
if($trouve==0) fwrite($file, $ligne."\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose($file);
|
||||||
|
}
|
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
NBA**1**3**5 premières lignes de la table EQUIPE** SELECT * FROM EQUIPE WHERE rownum<6
|
|
||||||
NBA**1**4**5 premières lignes de la table GAME** SELECT * FROM GAME WHERE rownum<6
|
|
@ -0,0 +1,5 @@
|
|||||||
|
NBA**1**Exemple de requête pour selectionner les 2 premières lignes de la table JOUEUR**SELECT * FROM JOUEUR WHERE rownum<3
|
||||||
|
NBA**1**Exemple de requête pour selectionner les 2 premières lignes de la table STATS**SELECT * FROM STATS WHERE rownum<3
|
||||||
|
NBA**2**Exemple de requête pour selectionner ers lignes de la table GAME**SELECT * FROM GAME WHERE rownum<3
|
||||||
|
NBA**2**Exemple de requête pour selectionner les 2 )))))))) lignes de la table GAME**SELECT * FROM GAME WHERE rownum<3NBA**2**Exemple de requête pour selectionner les 2 premières lignes de la table GAME**SELECT * FROM GAME WHERE rownum<3
|
||||||
|
NBA**2**aaaaaaaaaaaaaaaaaa**aaaaaaaaaaaaaaaaaa
|
@ -0,0 +1,9 @@
|
|||||||
|
NBA**1**Exemple de requête pour selectionner les 2 premières lignes de la table JOUEUR**SELECT * FROM JOUEUR WHERE rownum<3
|
||||||
|
NBA**1**Exemple de requête pour selectionner les 2 premières lignes de la table STATS**SELECT * FROM STATS WHERE rownum<3
|
||||||
|
NBA**2**Exemple de requête pour selectionner ers lignes de la table GAME**SELECT * FROM GAME WHERE rownum<3
|
||||||
|
NBA**2**Exemple de requête pour selectionner les 2 premières lignes de la table GAME**SELECT * FROM GAME WHERE rownum<3
|
||||||
|
NBA**2**Exemple de requête pour selectionner les 2 )))))))) lignes de la table GAME**SELECT * FROM GAME WHERE rownum<3
|
||||||
|
NBA**2**aaaaaaaaaaaaaaaaaa**aaaaaaaaaaaaaaaaaa
|
||||||
|
NBA**2**sd**qsd
|
||||||
|
NBA**2**Exemple de requête pour selectionner les 2 )))))))) lignes de la table GAME**SELECT * FROM GAME WHERE rownum<3NBA
|
||||||
|
NBA**2**aaaaaaaaaaaaaaaaaa**aaaaaaaaaaaaaaaaaaNBA
|
@ -0,0 +1,4 @@
|
|||||||
|
1**sql**vraifaux**Ceci est la question 1**Ceci est la reponse 1 de la question 1(fausse)+++Ceci est la reponse 2 de la question 1(Vraie)+++Ceci est la reponse 3 de la question 1(Vraie)**2,,3
|
||||||
|
1**sql**vraifaux**Ceci est la question 2**Ceci est la reponse 1 de la question 2(Vraie)+++Ceci est la reponse 2 de la question 2(fausse)+++Ceci est la reponse 3 de la question 2(fausse)+++Ceci est la reponse 4 de la question 2(fausse)**1
|
||||||
|
2**EPSWORTH**test**Ceci est la question 1**Ceci est la reponse 1 de la question 1(5)---5+++Ceci est la reponse 2 de la question 1(11)---11+++Ceci est la reponse 3 de la question 1(12)---12
|
||||||
|
2**EPSWORTH**test**Ceci est la question 2**Ceci est la reponse 1 de la question 2(5)---5+++Ceci est la reponse 2 de la question 2(11)---11+++Ceci est la reponse 3 de la question 2(12)---12
|
@ -1,2 +1,3 @@
|
|||||||
requete**NBA**1**1**Lister les joueurs de la table Equipe**SELECT * FROM EQUIPE**10**o
|
requete**NBA**1**1**Lister les joueurs de la table Equipe**SELECT * FROM EQUIPE**10**o
|
||||||
requete**NBA**1**2**Lister les joueurs de la table JOUEUR**SELECT * FROM JOUEUR**10**o
|
requete**NBA**1**2**Lister les joueurs de la table JOUEUR**SELECT * FROM JOUEUR**10**o
|
||||||
|
fonction**NBA**1**2**Lister les jofsdfsdfsdf la table JOUEUR**SELECT * FROM JOUEUR**10**o**createfsdf
|
@ -1,45 +1,64 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description of QCM
|
||||||
|
*
|
||||||
|
* @author Mehdi
|
||||||
|
*/
|
||||||
class QCM {
|
class QCM {
|
||||||
|
private $num;
|
||||||
|
private $nom;
|
||||||
|
private $type;
|
||||||
|
private $questions = array();
|
||||||
|
|
||||||
private $numQuestion;
|
function __construct($numQuestion,$nom,$type,$questions){
|
||||||
private $question;
|
$this->num = $numQuestion;
|
||||||
private $reponse = array();
|
$this->nom = $nom;
|
||||||
|
$this->type = $type;
|
||||||
function __construct($numQuestion,$question,$reponse){
|
$this->questions = $questions;
|
||||||
$this->numQuestion = $numQuestion;
|
|
||||||
$this->question = $question;
|
|
||||||
$this->reponse = $reponse;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
function getNumQuestion() {
|
|
||||||
return $this->numQuestion;
|
function getNum() {
|
||||||
|
return $this->num;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getQuestion() {
|
function getNom() {
|
||||||
return $this->question;
|
return $this->nom;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getReponse() {
|
function getType() {
|
||||||
return $this->reponse;
|
return $this->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setters
|
function getQuestions() {
|
||||||
function setNumQuestion($numQuestion) {
|
return $this->questions;
|
||||||
$this->numQuestion = $numQuestion;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setQuestion($question) {
|
|
||||||
$this->question = $question;
|
// Setters
|
||||||
|
function setNum($num) {
|
||||||
|
$this->num = $num;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setReponse($reponse) {
|
function setNom($nom) {
|
||||||
$this->reponse = $reponse;
|
$this->nom = $nom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setType($type) {
|
||||||
}
|
$this->type = $type;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setQuestions($questions) {
|
||||||
|
$this->questions = $questions;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class QuestionQCM {
|
||||||
|
|
||||||
|
|
||||||
|
private $numQuestion;
|
||||||
|
private $question;
|
||||||
|
private $bareme;
|
||||||
|
private $reponse = array();
|
||||||
|
|
||||||
|
function __construct($numQuestion,$question,$reponse,$bareme){
|
||||||
|
$this->numQuestion = $numQuestion;
|
||||||
|
$this->question = $question;
|
||||||
|
$this->reponse = $reponse;
|
||||||
|
$this->bareme= $bareme;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Getters
|
||||||
|
function getNumQuestion() {
|
||||||
|
return $this->numQuestion;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getQuestion() {
|
||||||
|
return $this->question;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getReponse() {
|
||||||
|
return $this->reponse;
|
||||||
|
}
|
||||||
|
function getBareme() {
|
||||||
|
return $this->bareme;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Setters
|
||||||
|
function setNumQuestion($numQuestion) {
|
||||||
|
$this->numQuestion = $numQuestion;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setQuestion($question) {
|
||||||
|
$this->question = $question;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setReponse($reponse) {
|
||||||
|
$this->reponse = $reponse;
|
||||||
|
}
|
||||||
|
function setBareme($bareme) {
|
||||||
|
$this->bareme = $bareme;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
@ -1,64 +0,0 @@
|
|||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title></title>
|
|
||||||
<script src="css/jquery-3.5.1.js"></script>
|
|
||||||
<link rel="stylesheet" href="css/VueAdmin.css">
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<form style="border:1px solid #ccc" method="GET" action="../Traitement/AjoutQuestion.php">
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
|
|
||||||
<h1>Ajouter une question</h1>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<label><b>TP n° : </b></label>
|
|
||||||
<input type="text" placeholder="Numéro du TP " id="tp" name='tp' required>
|
|
||||||
|
|
||||||
<label><b>Date début de tp </b></label>
|
|
||||||
<input type="date" id="debut" name='debut' required><br/><br/>
|
|
||||||
|
|
||||||
<label><b>Date fin de tp </b></label>
|
|
||||||
<input type="date" id="fin" name='fin' required><br/><br/><br/>
|
|
||||||
|
|
||||||
<div >
|
|
||||||
<input type="button" value="Valider" onclick="SubmitAjoutDate()" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<div id="erreur">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form method="get">
|
|
||||||
<input id="inp-questions" class="bouton" type="submit" name="action" value="Afficher les questions" hidden>
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
function SubmitAjoutDate() {
|
|
||||||
var tp = $('#tp').val();
|
|
||||||
var debut = $('#debut').val();
|
|
||||||
var fin = $('#fin').val();
|
|
||||||
alert('ok');
|
|
||||||
//alert(debut+'____'+fin)
|
|
||||||
$.get("Traitement/DateTp.php", { debut : debut, fin : fin , tp :tp },
|
|
||||||
function(data) {
|
|
||||||
$('#erreur').html(data);
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</html>
|
|
@ -1,133 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title></title>
|
|
||||||
<link rel="stylesheet" href="css/bootstrap.min.css">
|
|
||||||
<link rel="stylesheet" href="css/VuePrincipale.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav">
|
|
||||||
<div class="container">
|
|
||||||
<a class="navbar-brand js-scroll-trigger" href="#page-top">TP de Base De Données</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
|
||||||
<ul class="navbar-nav ml-auto">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link js-scroll-trigger" href="#TP2">TP2</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link js-scroll-trigger" href="#TP3">TP3</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link js-scroll-trigger" href="#TP4">TP4</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link js-scroll-trigger" href="#TP5">TP5</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
<header class="bg-primary text-white">
|
|
||||||
<div class="container text-center">
|
|
||||||
<h1>test</h1>
|
|
||||||
<p class="lead">TEST</p>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div style="font-weight: bold" id="Temps-Restant"></div>
|
|
||||||
|
|
||||||
<section id="TP2">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-8 mx-auto">
|
|
||||||
<h2>TP 2</h2>
|
|
||||||
<form method="post" action="Correcteur.php" name="Exam">
|
|
||||||
<?php $i=0;
|
|
||||||
foreach ($dVueQuestions as $q) { ?>
|
|
||||||
<p><?php $i++; echo $q->getNumQuestion() .'.'.$q->getQuestion(); $_SESSION['num']=array(); $_SESSION['num'][$i] =$q->getNumQuestion(); ?> <br/>
|
|
||||||
<textarea rows="5" cols="70" name="textbox[]" >
|
|
||||||
<?php echo (isset($_SESSION['fi'][$i]) ? $_SESSION['fi'][$i] : '') ?>
|
|
||||||
</textarea>
|
|
||||||
<strong>TEST</strong>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<?php } //fin foreach ?>
|
|
||||||
<p><input type="submit" ></p>
|
|
||||||
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<form method="post" class="frm">
|
|
||||||
<input type="submit" name="test" id="test" value="Générer Base de données aléatoire" /><br/>
|
|
||||||
<input type="submit" name="regenerer" id="test" value="Réintiliser les questions" /><br/>
|
|
||||||
</form>
|
|
||||||
<a href="vues/VueAdmin.php"><button>Ajouter Une Question</button></a>
|
|
||||||
<a href="vues/VueLibre.php"><button>Creation table</button></a>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
if(array_key_exists('test',$_POST)){
|
|
||||||
$oraDb = new OracleDb;
|
|
||||||
}
|
|
||||||
if(array_key_exists('regenerer',$_POST)){
|
|
||||||
$db = new SqliteDb();
|
|
||||||
$db->createTable();
|
|
||||||
$URL="index.php";
|
|
||||||
echo '<META HTTP-EQUIV="refresh" content="0;URL=' . $URL . '">';
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
var tempsMin =50 ;
|
|
||||||
var total_secondes =60*tempsMin;
|
|
||||||
tempsMin = parseInt(total_secondes/60);
|
|
||||||
secondes = parseInt(total_secondes%60);
|
|
||||||
document.getElementById("Temps-Restant").innerHTML='Temps restant: ' + tempsMin + ' minutes ' + secondes + ' secondes';
|
|
||||||
function init(){
|
|
||||||
document.getElementById("Temps-Restant").innerHTML='Temps restant: ' + tempsMin + ' minutes ' + secondes + ' secondes';
|
|
||||||
setTimeout("TempsRestant()",999);
|
|
||||||
}
|
|
||||||
function TempsRestant(){
|
|
||||||
document.getElementById("Temps-Restant").innerHTML='Temps restant: ' + tempsMin + ' minutes ' + secondes + ' secondes' ;
|
|
||||||
if(total_secondes <=0){
|
|
||||||
setTimeout('document.Exam.submit()',1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
total_secondes = total_secondes -1;
|
|
||||||
tempsMin = parseInt(total_secondes/60);
|
|
||||||
secondes = parseInt(total_secondes%60);
|
|
||||||
setTimeout("TempsRestant()",999);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
init();
|
|
||||||
</script>
|
|
||||||
<!-- Footer -->
|
|
||||||
<footer class="py-5 bg-dark">
|
|
||||||
<div class="container">
|
|
||||||
<p class="m-0 text-center text-white">IUT Clermont-Ferrand 2020</p>
|
|
||||||
</div>
|
|
||||||
<!-- /.container -->
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<!-- Bootstrap core JavaScript -->
|
|
||||||
<script src="vendor/jquery/jquery.min.js"></script>
|
|
||||||
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
|
||||||
|
|
||||||
<!-- Plugin JavaScript -->
|
|
||||||
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
|
|
||||||
|
|
||||||
<!-- Custom JavaScript for this theme -->
|
|
||||||
<script src="js/scrolling-nav.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in new issue