diff --git a/index.php b/index.php deleted file mode 100644 index 05023ba..0000000 --- a/index.php +++ /dev/null @@ -1,13 +0,0 @@ - - - - Login - - -
- Login:
- Pwd:
- -
- - \ No newline at end of file diff --git a/login.php b/login.php deleted file mode 100644 index 89c92d9..0000000 --- a/login.php +++ /dev/null @@ -1,26 +0,0 @@ -'; - } -} -else { - echo 'c vide'; -} -?> \ No newline at end of file diff --git a/login/cible.php b/login/cible.php new file mode 100644 index 0000000..75e943c --- /dev/null +++ b/login/cible.php @@ -0,0 +1,19 @@ +query("SELECT * FROM logins"); + + while ($line = $reponse->fetch()) { + if ($line[0] == $_POST['login'] && $line[1] == $_POST['pwd']) { + session_start(); + $_SESSION['login'] = $_POST['login']; + $_SESSION['pwd'] = $_POST['pwd']; + header('location: ../prof/index.php'); + } + } +} + +echo ''; + +?> \ No newline at end of file diff --git a/login/index.php b/login/index.php new file mode 100644 index 0000000..0986465 --- /dev/null +++ b/login/index.php @@ -0,0 +1,31 @@ + + + + Login + + + +
+
+

Login:

+
+ +
+
+
+

Pwd:

+
+ +
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/prof/index.php b/prof/index.php index f836164..b0bec53 100755 --- a/prof/index.php +++ b/prof/index.php @@ -7,7 +7,7 @@ include '../session.php'; Tickets de panne - + @@ -149,7 +149,7 @@ include '../session.php';

- +
diff --git a/prof/script.js b/prof/script.js index a7698fd..8ee62a2 100755 --- a/prof/script.js +++ b/prof/script.js @@ -1,4 +1,3 @@ -const button = document.getElementById('submit'); const page = document.getElementById('page'); const check = document.getElementsByClassName('check'); @@ -10,7 +9,6 @@ const help = document.getElementsByClassName('help'); document.getElementById("form").addEventListener('submit', function(e) { e.preventDefault(); if (checkInputs() == true) { - console.log('check'); var data = new FormData(this); var xhr = new XMLHttpRequest(); diff --git a/prof/stylepage.css b/prof/stylepage.css deleted file mode 100755 index a06a011..0000000 --- a/prof/stylepage.css +++ /dev/null @@ -1,146 +0,0 @@ -head{ - display: inline-table; -} - -a{ - color: #2ecc71; -} - -body{ - z-index: 1; - background-color: #e5e5e5; - margin: 20px; - text-align: center; -} - -.logo{ - display: block; -} - -h1{ - margin: 40px; - font-weight: bold; - color: #454545; -} - -p{ - font-weight: bold; - color: #454444; - font-size: 20px; - height: 20px; -} - -form{ - width: 400px; - position: relative; - background-color: #ffffff; - display: block; - margin: auto; - border-radius: 30px; - padding: 20px; -} - -.container-champ{ - position: relative; -} - -.container-champ small{ - display: none; - color: red; -} - -.champ{ - background-color: inherit; - display: flex; - position: relative; - text-decoration-line: none; - flex-direction: row-reverse; - text-align: center; - color: #454444; - display: block; - margin: 10px auto; - border: 4px solid #4e4d4d; - padding: 10px 10px; - width: 200px; - border-radius: 30px; - transition: 0.25s; -} - -.entry{ - border: none; - resize: none; - outline: none; - width: 100%; - text-align: inherit; - background-color: inherit; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -.champ:focus, .champ:hover{ - width: 300px; - border-color: #ac2a8d; - background-color: #dddddd; -} - -.champ img{ - display: none; - position: relative; - float: right; - width: 20px; - bottom: 20px; - right: 20px; -} - -.submit{ - background-color: inherit; - display: flex; - position: relative; - flex-direction: row-reverse; - text-align: center; - color: #454444; - display: block; - margin: 10px auto; - border: 4px solid #4e4d4d; - padding: 10px 10px; - width: 200px; - border-radius: 30px; - transition: 0.25s; -} - -.submit:hover{ - width: 250px; - background-color: #82E6AC; - border-color: #2ecc71; -} - -.help{ - display: none; - z-index: 2; - position: absolute; - width: 170px; - right: 0; - top: 30%; - border-radius: 30px; - padding: 15px; - margin: 0; - background-color: #dddddd; - -} - -.help * { - font-size: 14px; - width: 100%; -} - -.help p{ - position: relative; -} - -code { - background-color: #aaa; - border-radius: 5px; - font-family: courier, monospace; - padding: 3px 5px; -} \ No newline at end of file diff --git a/referant/include/menu.php b/referant/include/menu.php index 3791fc2..93f9ed2 100644 --- a/referant/include/menu.php +++ b/referant/include/menu.php @@ -1,4 +1,4 @@ Admin ticket - + diff --git a/referant/index.php b/referant/index.php index 8bf35dc..0bac5c7 100755 --- a/referant/index.php +++ b/referant/index.php @@ -9,7 +9,7 @@ include '../session_restraintes.php'; - client + client diff --git a/referant/search.php b/referant/search.php index 9c67147..ea95e73 100755 --- a/referant/search.php +++ b/referant/search.php @@ -13,7 +13,7 @@ include '../session_restraintes.php';
- +
diff --git a/session.php b/session.php index fc23366..af9cc03 100644 --- a/session.php +++ b/session.php @@ -1,10 +1,6 @@ \ No newline at end of file diff --git a/session_restraintes.php b/session_restraintes.php index 9611983..57c5f65 100644 --- a/session_restraintes.php +++ b/session_restraintes.php @@ -1,16 +1,6 @@ \ No newline at end of file diff --git a/referant/stylepage.css b/stylepage.css old mode 100755 new mode 100644 similarity index 70% rename from referant/stylepage.css rename to stylepage.css index e0e7951..4a45015 --- a/referant/stylepage.css +++ b/stylepage.css @@ -5,24 +5,154 @@ body{ text-align: center; } -#lien-client{ - text-decoration: none; +.logo{ display: block; - width: 10%; +} + +h1{ + margin: 40px; + font-weight: bold; + color: #454545; +} + +p{ + font-weight: bold; color: #454444; + font-size: 20px; + height: 20px; +} + + +/* Form */ + + +form{ + width: 400px; + position: relative; + background-color: #ffffff; + display: block; + margin: auto; + border-radius: 30px; + padding: 20px; +} + +.container-champ{ + position: relative; +} + +.container-champ small{ + display: none; + color: red; +} + +.champ{ + background-color: inherit; + position: relative; + display: block; + + text-decoration-line: none; + text-align: center; + color: #454444; + margin: 10px auto; border: 4px solid #4e4d4d; padding: 10px 10px; border-radius: 30px; + + width: 200px; + transition: 0.25s; } -#lien-client:hover{ - width: 20%; +.champ:focus, .champ:hover{ + width: 300px; border-color: #ac2a8d; background-color: #dddddd; } +.champ img{ + display: none; + position: relative; + float: right; + width: 20px; + bottom: 20px; + right: 20px; +} + +.entry{ + border: none; + resize: none; + outline: none; + width: 100%; + text-align: inherit; + background-color: inherit; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.submit{ + background-color: inherit; + position: relative; + display: block; + + text-align: center; + color: #454444; + + margin: 10px auto; + border: 4px solid #4e4d4d; + padding: 10px 10px; + border-radius: 30px; + + width: 200px; + + transition: 0.25s; +} + +.submit:hover{ + width: 250px; + background-color: #82E6AC; + border-color: #2ecc71; +} + + +/* Indice */ + + +.help{ + display: none; + z-index: 2; + position: absolute; + width: 170px; + right: 0; + top: 30%; + border-radius: 30px; + padding: 15px; + margin: 0; + background-color: #dddddd; + +} + +.help * { + font-size: 14px; + width: 100%; +} + +.help p{ + position: relative; +} + +code { + background-color: #aaa; + border-radius: 5px; + font-family: courier, monospace; + padding: 3px 5px; +} + + +/* Nav */ + + nav{ width: 80%; margin-left: 10%; @@ -66,6 +196,21 @@ nav a{ text-decoration: none; } +.menu:hover{ + background-color: #59184E; + transition: .5s; + border-radius: 10px; +} + +.menu:hover > a{ + color: #fff; + font-weight: bold; +} + + +/* Table */ + + #table-search{ display: none; } @@ -85,11 +230,14 @@ table{ } td { - border: 1px solid #84878C; background-color: #e5e5e5; + + border: 1px solid #84878C; border-radius: 5px; + text-align: center; color: #84878C; + width: 7%; } @@ -98,69 +246,8 @@ th{ } -.menu:hover{ - background-color: #59184E; - transition: .5s; - border-radius: 10px; -} - -.menu:hover > a{ - color: #fff; /*texte quand on passe la souris un bouton du menu*/ - font-weight: bold; -} - -.logo{ - display: block; -} +/* SWITCH */ -.champ{ - background-color: inherit; - position: relative; - text-align: center; - color: #454444; - display: block; - margin: 10px auto; - border: 4px solid #4e4d4d; - padding: 20px 40px; - width: 40%; - border-radius: 80px; - transition: 0.25s; -} - -.champ:focus, .champ:hover{ - border-color: #ac2a8d; - background-color: #dddddd; -} - -.champ input{ - border: none; - outline: none; - font-size: 3em; - color: #aaa; - width: 100%; - text-align: inherit; - background-color: inherit; -} - -.submit{ - background-color: inherit; - position: relative; - text-align: center; - color: #454444; - display: block; - margin: 10px auto; - border: 4px solid #4e4d4d; - padding: 10px 10px; - width: 200px; - border-radius: 30px; - transition: 0.25s; -} - -.submit:hover{ - width: 250px; - background-color: #82E6AC; - border-color: #2ecc71; -} .switch { position: relative; @@ -169,14 +256,12 @@ th{ height: 34px; } -/* Hide default HTML checkbox */ .switch input { opacity: 0; width: 0; height: 0; } -/* The slider */ .slider { position: absolute; cursor: pointer; diff --git a/ticket.sql b/ticket.sql index 2fd53c9..8c82af6 100644 --- a/ticket.sql +++ b/ticket.sql @@ -3,7 +3,7 @@ -- https://www.phpmyadmin.net/ -- -- Host: localhost --- Generation Time: Oct 28, 2021 at 06:44 PM +-- Generation Time: Oct 30, 2021 at 07:45 PM -- Server version: 10.4.21-MariaDB -- PHP Version: 8.0.10 @@ -23,6 +23,25 @@ SET time_zone = "+00:00"; -- -------------------------------------------------------- +-- +-- Table structure for table `logins` +-- + +CREATE TABLE `logins` ( + `login` varchar(255) NOT NULL, + `pwd` varchar(255) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Dumping data for table `logins` +-- + +INSERT INTO `logins` (`login`, `pwd`) VALUES +('prof', 'arthur'), +('referant', 'azerty'); + +-- -------------------------------------------------------- + -- -- Table structure for table `pannes` -- @@ -76,4 +95,4 @@ COMMIT; /*!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 */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; \ No newline at end of file