From c2be33f1c129b023fe9663ffdbcbf363f042e384 Mon Sep 17 00:00:00 2001
From: Lucas <lucas.briffon@ensiie.fr>
Date: Wed, 27 Nov 2019 04:01:19 +0100
Subject: [PATCH] fix css and reset database

---
 htdocs/assets/css/main.css | 45 ++++++++++++++++++++++++++++++++------
 htdocs/data.php            |  4 +++-
 htdocs/header.php          | 15 ++++++++++++-
 3 files changed, 55 insertions(+), 9 deletions(-)

diff --git a/htdocs/assets/css/main.css b/htdocs/assets/css/main.css
index f6a8b8b..fcd66aa 100644
--- a/htdocs/assets/css/main.css
+++ b/htdocs/assets/css/main.css
@@ -137,13 +137,6 @@ html
 		padding: 0;
 	}
 
-	input, select, textarea {
-		-moz-appearance: none;
-		-webkit-appearance: none;
-		-ms-appearance: none;
-		appearance: none;
-	}
-
 /* Basic */
 
 	html {
@@ -3506,6 +3499,44 @@ html
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  */
 
+input,
+button,
+select,
+optgroup,
+textarea {
+  margin: 0;
+  font-family: inherit;
+  font-size: inherit;
+  line-height: inherit;
+}
+
+button,
+input {
+  overflow: visible;
+}
+
+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;
+}
+
+.btn-group-toggle > .btn input[type="radio"],
+.btn-group-toggle > .btn input[type="checkbox"],
+.btn-group-toggle > .btn-group > .btn input[type="radio"],
+.btn-group-toggle > .btn-group > .btn input[type="checkbox"] {
+  position: absolute;
+  clip: rect(0, 0, 0, 0);
+  pointer-events: none;
+}
+
 /* Form */
 
 	.form-control {
diff --git a/htdocs/data.php b/htdocs/data.php
index 8adab1a..7c17100 100644
--- a/htdocs/data.php
+++ b/htdocs/data.php
@@ -37,6 +37,8 @@ function fill_table($bdd){
     $sql = "CREATE TABLE requests (
         student int NOT NULL,
         teacher int NOT NULL,
+        dispo varchar(20) NOT NULL,
+        subject varchar(20) NOT NULL,
         accepted int NOT NULL
     )";
     $bdd->query($sql);
@@ -118,7 +120,7 @@ function fill_table($bdd){
     $bdd->prepare($sql)->execute([14,'Chimie']);
 
     #Remplissage de REQUESTS
-    $sql = "INSERT INTO requests(student, teacher, dispo, subject, accepted) values (?, ?, ?)";
+    $sql = "INSERT INTO requests(student, teacher, dispo, subject, accepted) values (?, ?, ?, ?, ?)";
     $bdd->prepare($sql)->execute([1, 8, 'Lundi', 'Math', 0]);
 }
 
diff --git a/htdocs/header.php b/htdocs/header.php
index 2cdfaef..3857429 100644
--- a/htdocs/header.php
+++ b/htdocs/header.php
@@ -51,7 +51,20 @@
                     }
 
                     if ($_SESSION['connected'] ==  true) {
-                        ?>
+
+                        if ($_SESSION['currentType'] == 'Student') {
+                            ?>
+
+                            <li
+                            
+                            <?php
+                            if (basename(getcwd()) == 'student')
+                            echo 'class="current"';
+                            ?> >
+                                <a href="/pima/student/matchs.php">Mes matchs</a>
+                            </li>
+
+                        <?php } ?>
 
                         <li
 
-- 
GitLab