Commit 1cf6bdc7 authored by VincentB's avatar VincentB

Upload

parent fdf432a2
Pipeline #16 failed with stages
# MineQuest
#Architecture du site
Contient la structure du site avec le code associé en fichiers :
HTML
PHP
CSS
JS
L'accès s'effectue depuis le fichier 'index.php'.
<?php
// Load my root class
require_once(__ROOT_DIR . '/classes/MyObject.class.php');
class AutoLoader extends MyObject {
public function __construct() {
spl_autoload_register(array($this, 'load'));
}
// This method will be automatically executed by PHP whenever it encounters
// an unknown class name in the source code
private function load($className) {
$repo = array ('/classes/','/model/','/controller/','/view/');
$fileToLoad = null;
$i =0;
do{
$fileToLoad =__ROOT_DIR . $repo[$i] . ucfirst($className . '.class.php');
$i++;
}while(! is_readable($fileToLoad) && $i< count($repo));
if(! is_readable($fileToLoad)){
throw new Exception('Unknown Class '. $className);
}
require_once($fileToLoad);
if (strlen(strstr($fileToLoad,'/model/'))>0){
$sqlfileToLoad = __ROOT_DIR . '/sql/' . ucfirst($className) . 'sql.php';
if(is_readable($sqlfileToLoad)){
require_once($sqlfileToLoad);
$this -> log(__CLASS__ . 'load: '. ucfirst($className) . 'sql.php');
}
}
}
}
$__LOADER = new AutoLoader();
?>
\ No newline at end of file
<?php
class Dispatcher extends MyObject{
private $controller;
private $controllerClass;
public static function dispatch($request){
$controller= $request->getController();
$controllerClass = ucfirst($controller). 'Controller';
if(!class_exists($controllerClass)){
throw new Exception('$ControllerName');
}
return new $controllerClass($request);
}
}
?>
\ No newline at end of file
<?php
/*
* Root class of all my classes
*/
class MyObject { }
?>
\ No newline at end of file
<?php
class Request extends MyObject {
private static $Request = null;
public static function getCurrentRequest() {
if(is_null(static::$Request)) {
static::$Request = new static();
}
return static::$Request;
}
public function getController(){
if (isset($_GET['controller'])){
return $_GET['controller'];
}
return 'Anonymous';
}
public function getAction(){
if (isset($_GET['action'])){
return $_GET['action'];
}
}
public function read($arg){
if (isset($_POST[$arg])){
return$_POST[$arg];
}
}
public function changeController($value){
$_GET['controller']=$value;
}
public function write($key,$value){
$_POST[$key]=$value;
}
public function nbrArg(){
return(count($_POST));
}
}
?>
\ No newline at end of file
<?php
class AnonymousController extends Controller {
public function __construct($currentRequest) {
parent::__construct($currentRequest);
if(! $currentRequest->nbrArg()== 0 ){
if($currentRequest->nbrArg()== 5)
$this -> validateInscription($currentRequest);
else if ($currentRequest->nbrArg()== 2)
$this -> Connect($currentRequest);
}
}
public function Connect($currentRequest){
$user = User::tryLogin($currentRequest->read('inscLogin'),$currentRequest->read('inscPassword'));
if(is_object($user)) {
$newRequest = new Request();
$newRequest->changeController('user');
$newRequest->write('user',$user->id());
//print_r($_POST);
//echo($user->id());
$controller = Dispatcher::dispatch($newRequest);
$controller -> execute();
}
else {
$view = new View($this,'signIn');
$view->setArg('inscErrorText','This login is already used');
$view->render();
echo("<script>alert('mauvais mot de passe ou login');</script>");
}
}
public function defaultAction($currentRequest){
$view1 = new AnonymousView($this,'head');
//$view2 = new AnonymousView($this,'content');
$view1->render();
//$view2->render();
}
public function inscription($currentRequest){
$view = new AnonymousView($this,'inscription');
$view->render();
}
public function signIn($currentRequest){
$view = new AnonymousView($this,'signIn');
$view->render();
}
public function validateInscription($request) {
$login = $request->read('inscLogin');
$mail =$request ->read('mail');
$password = $request -> read('inscPassword');
if ($login =='' || $password ==''){
$view = new View($this,'inscription');
$view->setArg('inscErrorText','This login is already used');
$view->render();
echo("");
echo("<script>alert('Veuillez renseigner un login et un mot de passe');</script>");
}
else if(User::isLoginUsed($login)) {
$view = new View($this,'inscription');
$view->setArg('inscErrorText','This login is already used');
$view->render();
echo("<script>alert('Ce login existe déjà');</script>");
}
else if(User::isMailUsed($mail)) {
$view = new View($this,'inscription');
$view->setArg('inscErrorText','This login is already used');
$view->render();
echo("");
echo("<script>alert('cette adresse mail existe déjà');</script>");
}
else {
$password = $request->read('inscPassword');
$nom = $request->read('nom');
$prenom = $request->read('prenom');
$mail = $request->read('mail');
$user = User::create($login, $password,$mail,$nom,$prenom);
if(!isset($user)) {
$view = new View($this,'inscription');
$view->setArg('inscErrorText', 'Cannot complete inscription');
$view->render();
}
else {
$newRequest = new Request();
$newRequest->changeController('user');
$newRequest->write('user',$user->id());
//print_r($_POST);
//echo($user->id());
$controller = Dispatcher::dispatch($newRequest);
$controller -> execute();
}
}
}
}
?>
<?php
abstract class Controller extends MyObject {
private $request;
private $action;
public function __construct($currentRequest) {
$this->request = $currentRequest;
}
Abstract function defaultAction($currentRequest);
public function execute(){
if(is_null($this->request->getAction())){
$this->defaultAction($this->request);
}
else {
$action = $this->request->getAction();
$this-> $action($this->request);
}
}
}
?>
\ No newline at end of file
<?php
class UserController extends Controller {
protected $user;
public function __construct($request) {
parent::__construct($request);
session_start();
$userId = NULL;
$userId = $request->read('user');
if(!is_null($userId))
$this->user = User::getWithId($userId);
}
public function defaultAction($currentRequest){
//if (is_null($this->user)){
// echo('user is null');}
$view = new UserView($this,'user');
$view ->setUser($this->user);
$view->render();
}
public function profile($args) {
$v = new UserView($this->user);
$v->render();
}
public function disconnect($args) {
if(isset($_SESSION))
session_destroy();
//echo "URL = " . __BA::SE_URL;
header("Location: /~vincent.belotti");
}
}
?>
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
}
[tabindex="-1"]:focus {
outline: 0 !important;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 0.5rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-original-title] {
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
border-bottom: 0;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
a {
color: #007bff;
text-decoration: none;
background-color: transparent;
}
a:hover {
color: #0056b3;
text-decoration: underline;
}
a:not([href]):not([tabindex]) {
color: inherit;
text-decoration: none;
}
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
color: inherit;
text-decoration: none;
}
a:not([href]):not([tabindex]):focus {
outline: 0;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
}
pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
}
figure {
margin: 0 0 1rem;
}
img {
vertical-align: middle;
border-style: none;
}
svg {
overflow: hidden;
vertical-align: middle;
}
table {
border-collapse: collapse;
}
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
th {
text-align: inherit;
}
label {
display: inline-block;
margin-bottom: 0.5rem;
}
button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
select {
word-wrap: normal;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
cursor: pointer;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
padding: 0;
border-style: none;
}
input[type="radio"],
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: .5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
progress {
vertical-align: baseline;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: none;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
cursor: pointer;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */
\ No newline at end of file
This diff is collapsed.
/*!
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
css/css.png

25.7 KB

This diff is collapsed.
css/git.png

8.36 KB

css/js.png

14.2 KB

css/php.png

5.95 KB

body {
font: 400 15px/1.8 Lato, sans-serif;
color: #777;
}
h3, h4 {
margin: 10px 0 30px 0;
letter-spacing: 10px;
font-size: 20px;
color: #111;
}
p{
color: #222;
}
.container {
padding: 80px 120px;
}
.fond{
background-image: url("css/fond4.png");
width: 100%;
height: auto;
background-repeat: no-repeat;
background-size: cover;
position:absolute;
bottom:0;
top:0;
}
.navbar {
font-family: Montserrat, sans-serif;
margin-bottom: 0;
background-color: #2d2d30;
border: 0;
font-size: 11px !important;
letter-spacing: 4px;
opacity: 1;
}
.navbar li a, .navbar .navbar-brand {
color: #d5d5d5 !important;
}
.navbar-nav li a:hover {
color: #fff !important;
}
.navbar-nav li.active a {
color: #fff !important;
background-color: #29292c !important;
}
.navbar-default .navbar-toggle {
border-color: transparent;
}
footer {
background-color: #2d2d30;
color: #f5f5f5;
padding: 32px;
right:0;
width: 100%;
position:absolute;
bottom:0;.
}
<?php
$rootDirectoryPath = realpath(dirname(__FILE__));
define ('__ROOT_DIR', $rootDirectoryPath );
$base_url = explode('/',$_SERVER['PHP_SELF']);
array_pop($base_url);
define ('__BASE_URL', implode('/',$base_url) );
require_once(__ROOT_DIR . '/classes/AutoLoader.class.php');
$request = Request::getCurrentRequest();
$i=0;
try {
$controller = Dispatcher::dispatch($request);
$controller->execute();
} catch (Exception $e) {
echo 'Error : ' . $e->getMessage() . "\n";
}
?>
</div>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php
class Model extends MyObject {
protected $props;
public function __construct($props = array()) {
$this->props = $props;
}
protected static function db(){
return DatabasePDO::getCurrentpdo();
}
// Exécute la requête $sql et retourne des objets modèles
protected static function query($sql){
$st = static::db()->query($sql) or die("sql query error ! request : " . $sql);
$st->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, get_called_class());
return $st;
}
public function __get($prop) {
return $this->props[$prop];
}
public function __set($prop, $val) {
$this->props[$prop] = $val;
}
}
?>
\ No newline at end of file
<?php
class User extends Model {
//protected static $currentUser;
/* public function __construct($user) {
static::$currentUser = $user;
}*/
/*public function getUser(){
return static::$currentUser;
}*/
protected $nom,$prenom,$mail,$id; protected $password; protected $ROLE;
protected $PROMO;protected $INE;protected $MATRICULE;protected $INTEXT;
protected $login;
protected static $table_name = 'USER';
public static function create($login, $pwd, $mail,$nom,$prenom) {
static::db()->exec("INSERT INTO users (login,password,mail,nom,prenom) VALUES('$login', '$pwd', '$mail','$nom','$prenom')");
return static::tryLogin($login, $pwd);
}
public static function tryLogin($login, $pwd){
$st = static::db()->query("select * from users where login='$login' and password='$pwd'");
$st ->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE, "user");
$user = $st->fetch();
return $user;
}
public function id(){
return $this ->id;
}
public static function isLoginUsed ($login){
$st = static::db()->query("select login from users where login='$login'");
// $a=$request->execute();
$st ->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE, "user");
$user = $st-> fetch();
return $user!=null;
}
public static function isMailUsed ($mail){
$st = static::db()->query("select mail from users where mail='$mail'");
// $a=$request->execute();
$st ->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE, "user");
$user = $st-> fetch();
return $user!=null;
}
public static function getWithId($userId){
$st = static::db()->query("select * from users where id ='$userId'");
$st ->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE, "user");
$user = $st-> fetch();
return $user;
}
public function login(){
return $this ->login;
}
public function mail(){
return $this ->mail;
}
public function prenom(){
return $this ->prenom;
}
public function nom(){
return $this ->nom;
}
}
?>
\ No newline at end of file
-- phpMyAdmin SQL Dump
-- version 4.6.6deb4
-- https://www.phpmyadmin.net/
--
-- Client : localhost:3306
-- Généré le : Jeu 07 Mars 2019 à 09:59
-- Version du serveur : 10.1.26-MariaDB-0+deb9u1
-- Version de PHP : 7.0.33-0+deb9u2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de données : `vincent_belotti`
--
--
-- Contenu de la table `ATTRIBUER`
--
INSERT INTO `ATTRIBUER` (`ID_REPONSE`, `ID_CHOIX`) VALUES
(2, 1),
(4, 1);
--
-- Contenu de la table `AVOIR`
--
INSERT INTO `AVOIR` (`ID_QUESTION`, `TAG`) VALUES
(1, 'magnetique '),
(2, '3D'),
(4, 'Algorithmes');
--
-- Contenu de la table `CHOIX`
--
INSERT INTO `CHOIX` (`ID_CHOIX`, `ID_QUESTION`, `TEXTE`, `COLONNE`) VALUES
(1, 2, '6', NULL),
(2, 2, '5', NULL),
(3, 2, '8', NULL),
(4, 2, '10', NULL),
(5, 4, 'Toutes les solutions à un problème', NULL),
(6, 4, 'Une solution optimale', NULL);
--
-- Contenu de la table `CREER_QUESTION`
--
INSERT INTO `CREER_QUESTION` (`MAIL`, `ID_QUESTION`) VALUES
('b.t@mines-douai.fr', 2),
('g.l@mines-douai.fr', 1);
--
-- Contenu de la table `ENSEIGNER`
--
INSERT INTO `ENSEIGNER` (`MAIL`, `ID_MATIERE`) VALUES
('b.t@mines-douai.fr', 2),
('g.l@mines-douai.fr', 1);
--
-- Contenu de la table `INVITER`
--
INSERT INTO `INVITER` (`ID_QUESTIONNAIRE`, `MAIL_USER`) VALUES
(1, 'v.b@mines-Douai.com'),
(1, 'y.j@mines-douai.fr'),
(2, 'v.b@mines-Douai.com'),
(2, 'y.j@mines-douai.fr');
--
-- Contenu de la table `MATIERE`
--
INSERT INTO `MATIERE` (`INTITULE`, `ID_MATIERE`) VALUES
('DAO', 1),
('Physique', 2);
--
-- Contenu de la table `NOTER`
--
INSERT INTO `NOTER` (`MAIL_ETUDIANT`, `ID_QUESTIONNAIRE`, `NOTE`, `STATUT`) VALUES
('v.b@mines-Douai.com', 1, '5', 1),
('y.j@mines-douai.fr', 1, '3', 1);
--
-- Contenu de la table `POSSEDER_QUESTION`
--
INSERT INTO `POSSEDER_QUESTION` (`ID_QUESTIONNAIRE`, `ID_QUESTION`) VALUES
(1, 1),
(1, 2),
(1, 4),
(2, 1),
(3, 4);
--
-- Contenu de la table `QUESTION`
--
INSERT INTO `QUESTION` (`ENONCER`, `TYPE`, `CORRECTION`, `ID_QUESTION`, `POINTS_MAX`) VALUES
('Énoncer la loi de Lenz', 'Texte', 'le courant induit s\'oppose par ses effets à la cause qui lui a donné naissance ', 1, 1),
('combien de faces existent-ils dans un cube?', 'QCM', '6', 2, 1),
('Un algorithme génétique recherche : \r\n - Toutes les solutions à un problème\r\n - Une solution optimale', 'QCM', 'Une solution optimale', 4, 2);
--
-- Contenu de la table `QUESTIONNAIRE`
--
INSERT INTO `QUESTIONNAIRE` (`MAIL`, `ID_QUESTIONNAIRE`, `TITRE`, `DATE_CREATION`, `DATE_FIN`, `DESCRIPTION`, `DATE_OUVERTURE`, `TYPE`) VALUES
('b.t@mines-douai.fr', 1, 'DAO ', '2019-03-04 00:00:00', '2019-03-31 00:00:00', 'questionnaire DAO', '2019-03-05 00:00:00', 'public'),
('g.l@mines-douai.fr', 2, 'Lenz', '2019-03-04 00:00:00', '2019-03-31 00:00:00', 'questionnaire physique', '2019-03-06 00:00:00', 'public'),
('g.l@mines-douai.fr', 3, 'QCM MAD', '2019-03-11 00:00:00', '2019-03-28 00:00:00', 'Questionnaire de MAD.', '2019-03-20 00:00:00', 'QCM');
--
-- Contenu de la table `REPONSE`
--
INSERT INTO `REPONSE` (`ID_QUESTIONNAIRE`, `ID_QUESTION`, `MAIL`, `ID_REPONSE`, `TEXTE`, `POINTS`, `DATE_PARTICIPATION`) VALUES
(1, 1, 'y.j@mines-douai.fr', 1, 'je sais pas', 0, '2019-03-12 11:00:00'),
(1, 2, 'y.j@mines-douai.fr', 2, '6', 1, '2019-03-12 11:10:00'),
(1, 1, 'v.b@mines-Douai.com', 3, 'le courant induit s\'oppose par ses effets à la cause qui lui a donné naissance ', 5, '2019-03-19 02:00:00'),
(2, 2, 'v.b@mines-Douai.com', 4, '6', 1, '2019-03-19 02:00:00'),
(1, 4, 'y.j@mines-douai.fr', 5, 'Une solution optimale', 1, '2019-03-20 06:18:00');
--
-- Contenu de la table `TAG`
--
INSERT INTO `TAG` (`TAG`) VALUES
('3D'),
('Algorithmes'),
('magnetique '),
('merise'),
('thermique');
--
-- Contenu de la table `USER`
--
INSERT INTO `USER` (`NOM`, `PRENOM`, `MAIL`, `MDP`, `ROLE`, `PROMO`, `INE`, `MATRICULE`, `INTEXT`) VALUES
('Thery', 'Bruno', 'b.t@mines-douai.fr', 'bruno', 'Enseignant ', NULL, NULL, '0002', 'interne'),
('Lozenguez', 'Guillaume', 'g.l@mines-douai.fr', 'guillaume', 'Enseignant ', NULL, NULL, '0001', 'interne'),
('Belotti', 'Vincent', 'v.b@mines-Douai.com', 'vincent', 'Etudiant', '2020', '123456789', NULL, NULL),
('Jaka', 'Yassir', 'y.j@mines-douai.fr', 'yassir', 'Etudiant', '2020', '123456788', NULL, NULL);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
<p style="margin-top:80px">Créer des Quiz en s'amusant...</p>
<div class="media">
<img src="css/HTML.png" alt="html" style="width: 140px; height: 150px; margin:10px"/>
<img src="css/css.png" alt="css" style="width: 126px; height: 165px;margin:10px"/>
<img src="css/php.png" alt="php" style="width: 100px; height: 150px;margin:30px"/>
<img src="css/js.png" alt="js" style="width: 100px; height: 150px;margin:20px"/>
</div>
<footer>
<a href="https://github.com/projet-web-imt/"><img src="css/git.png" alt="html" style="width: 30px; height: 30px; padding:0"/></a>
</footer>
</body>
</html>
<!doctype html>
<html>
<head>
<title>MineQuest</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<style>
body {
font: 400 15px/1.8 Lato, sans-serif;
color: #666;
}
h3, h4 {
margin: -3% 0 0% 0;
letter-spacing: 10px;
font-size: 20px;
color: #111;
}
p{
font-family: Montserrat, sans-serif;
color: #222;
font-size: 35px;
}
.cadre{
display: block;
border-bottom: #CCC 5px solid;
position: absolute;
left: 5%;
background: #2d2d30;
width: 30%;
padding: 4% 4% 2% 4% ;
opacity: 1;
overflow: hidden;
margin-left: 31%;
margin-top: 4%;
max-height: auto;
}
.container {
padding: 80px 120px;
}
.fond{
background-image: url("css/fond6.png");
width: 100%;
height: auto;
background-repeat: no-repeat;
background-size: cover;
position:absolute;
bottom:0;
top:0;
}
.navbar {
font-family: Montserrat, sans-serif;
margin-bottom: 0;
background-color: #2d2d30;
border: 0;
font-size: 11px !important;
letter-spacing: 4px;
opacity: 1;
}
.navbar li a, .navbar .navbar-brand {
color: #d5d5d5 !important;
}
.navbar-nav li a:hover {
color: #fff !important;
}
.navbar-nav li.active a {
color: #fff !important;
background-color: #29292c !important;
}
.navbar-default .navbar-toggle {
border-color: transparent;
}
footer {
background-color: #2d2d30;
color: #f5f5f5;
padding: 0.6%;
right:0;
width: 100%;
position:absolute;
bottom:0;
}
table{
color: #d5d5d5;
margin-left: 8%;
padding:10%;
}
.info{
margin-left: 150px;
}
input{
background-color: #DCDCDC;
border: 0;
color: #222;
margin: 2%;
width: 100%;
margin-left: 18%;
margin-bottom: 3%;
}
.bouton{
background-color: #2d2d30;
border: solid 1px;
border-color: white;
margin-top: 12%;
margin-left: 0%;
color:#DCDCDC;
width: auto;
padding: 2px 15px 2px 15px;
}
.media{
display: inline-block;
position:absolute;
bottom:100px;
left: 30%;
right: 34%;
width: 40%;
}
</style>
</head>
<body data-spy="scroll" data-target=".navbar" data-offset="50">
<div id="page">
<?php
if(isset($inscErrorText))
echo '<span class="error">' . $inscErrorText . '</span>';
?>
<form action="index.php" method="post" class="cadre">
<h3 style="margin-bottom:12%; color:#DCDCDC">INSCRIPTION</h3>
<table>
<tr>
<th>Login* :</th>
<td><input type="text" name="inscLogin"/></td>
</tr>
<tr>
<th>Mot de passe* :</th>
<td><input type="password" name="inscPassword"/></td>
</tr>
<tr>
<th>Mail :</th>
<td><input type="text" name="mail"/></td>
</tr>
<tr>
<th>Nom :</th>
<td><input type="text" name="nom"/></td>
</tr>
<tr>
<th>Prenom :</th>
<td><input type="text" name="prenom"/></td>
</tr>
</table>
<input class="bouton" type="submit" value="Creer mon compte..." />
</form>
<?php
if(isset($inscErrorText))
echo '<span class="error">' . $inscErrorText . '</span>';
?>
<form action="index.php" method="post" class="cadre">
<h3 style="margin-bottom:12%; color:#DCDCDC">CONNECTION</h3>
<table>
<tr>
<th>Login* :</th>
<td><input type="text" name="inscLogin"/></td>
</tr>
<tr>
<th>Mot de passe* :</th>
<td><input type="password" name="inscPassword"/></td>
</tr>
</table>
<input class="bouton" type="submit" value="Se connecter..." />
</form>
<body>
<div class="fond text-center container">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">MineQuest</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="index.php?action=inscription">INSCRIPTION</a></li>
<li><a href="index.php?action=signIn">CONNEXION</a></li>
</ul>
</div>
</div>
</nav>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment