Bouton pour générer la base de données aléatoire

master
Mehdi 5 years ago
parent 3edf261a98
commit 7ba790ac6f

@ -1,14 +1,16 @@
<?php
session_start();
require_once('SqliteDb.php');
require_once('OracleDb.php');
header('Content-type: text/plain');
$db = new SqliteDb();
//$conn = oci_connect('u_prems', '123456','localhost/orcl');
$this->conn = oci_connect('meelaichao', 'meelaichao', 'kirov:1521/kirov');
$conn = oci_connect('u_prems', '123456','localhost/orcl');
//$conn = oci_connect('meelaichao', 'meelaichao', 'kirov:1521/kirov');
$_SESSION['fi'] = array();
$cmpt = 0;

@ -16,8 +16,8 @@ class OracleDb {
private $conn;
function __construct() {
// $this->conn = oci_connect('u_prems', '123456', 'localhost/orcl');
$this->conn = oci_connect('meelaichao', 'meelaichao', 'kirov:1521/kirov');
$this->conn = oci_connect('u_prems', '123456', 'localhost/orcl');
//$this->conn = oci_connect('meelaichao', 'meelaichao', 'kirov:1521/kirov');
$this->createRandomTables();
}

@ -21,6 +21,11 @@ class Controleur {
//$this->verificationConnexion();
require ($rep.$vues['vueLogin']);
break;
case 'Valider' :
//$this->verificationConnexion();
echo 'AAAAAAAAAAAA';
$this->Correction();
break;
default:
$dVueEreur[] ="Erreur d'appel php";
require ($rep.$vues['erreur']);
@ -60,5 +65,9 @@ class Controleur {
}
else $this->afficherQuestions();
}
function Correction(){
require('Correcteur.php');
}
}

@ -0,0 +1,14 @@
/*
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.
*/
/*
Created on : Jun 26, 2020, 10:36:40 AM
Author : Mehdi
*/
.frm{
text-align: right;
margin: 10px;
}

@ -18,7 +18,7 @@ and open the template in the editor.
require_once(__DIR__.'/config/Autoload.php');
Autoload::charger();
$oraDb = new OracleDb;
//$oraDb = new OracleDb;
$cont = new Controleur();
//phpinfo();

@ -3,6 +3,7 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/xampp/htdocs/BddCorrect/index.php</file>
<file>file:/C:/xampp/htdocs/BddCorrect/SqliteDb.php</file>
<file>file:/C:/xampp/htdocs/BddCorrect/vues/VuePrincipale.php</file>
<file>file:/C:/xampp/htdocs/BddCorrect/OracleDb.php</file>

Binary file not shown.

@ -5,6 +5,7 @@
<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">
@ -44,17 +45,33 @@
<div class="row">
<div class="col-lg-8 mx-auto">
<h2>TP 2</h2>
<form action="Correcteur.php" method="post">
<form method="post" action="Correcteur.php">
<?php $i=0;
foreach ($dVueQuestions as $q) { ?>
<p><?php $i++; echo $q->getQuestion(); ?> <br/> <textarea rows="5" cols="70" name="textbox[]" ><?php echo (isset($_SESSION['fi'][$i]) ? $_SESSION['fi'][$i] : '') ?></textarea></p><?php } //session_destroy(); ?>
<p><input type="submit" value="Valider"></p>
<p><?php $i++; echo $q->getQuestion(); ?> <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/>
</form>
<?php
if(array_key_exists('test',$_POST)){
$oraDb = new OracleDb;
}
?>
<!-- Footer -->
<footer class="py-5 bg-dark">

Loading…
Cancel
Save