diff --git a/admin/planning.php b/admin/planning.php index 4875e85..fd6ea74 100644 --- a/admin/planning.php +++ b/admin/planning.php @@ -43,7 +43,7 @@ if(isset($_POST['send'])) { $color = htmlspecialchars($_POST['color']); $opacity = (float) htmlspecialchars($_POST['opacity']); $order_start = (int) htmlspecialchars($_POST['order_start']); - $len = (float) (100/20)*htmlspecialchars($_POST['length']); + $len = (float) (4.1)*htmlspecialchars($_POST['length']); $num_planning = (int) htmlspecialchars($_POST['num_planning']); diff --git a/assets/css/page/planning.css b/assets/css/page/planning.css index 9d9e4a7..1aa8da3 100644 --- a/assets/css/page/planning.css +++ b/assets/css/page/planning.css @@ -5,72 +5,178 @@ main { width: 100%; } -section { - display: block; +.planning-container { + height: 82vh; + width: 100%; background-color: rgba(255,255,255,0.5); - width: 80%; - max-width: 800px; - margin-left: auto; - margin-right: auto; - padding: 50px; - font-size: 1.2rem; + color: white; margin-top: 40px; } -table { - margin: 50px; - border-collapse: collapse; - height: 80vh; - margin-left: auto; - margin-right: auto; +.column { + width: 13%; + height: 82vh; + float: left; + background-image: linear-gradient(rgba(0,0,0,.08) 50%, transparent 50%); + background-size: 1px 10%; } -table th, td { - border: 0; - margin: 0; - padding: 0; +.column.time { + width: 9%; } -table td { - vertical-align: top; +.column.days { + width: 16%; + background-color: #34495e; + background-image: none; + display: none; } -.tr-th { - background-color: rgba(255, 255, 255, 0.5); +.day_title { + height: 5%; + background-color: #34495e; + font-size: 0.8em; + font-weight: 600; + text-transform: uppercase; + text-align: center; + line-height: 4.1vh; } -.tr-th th { - padding: 20px; - color: black; - font-size: 1.2rem; +.hour { + height: 5%; + background-color: rgba(52, 73, 94,0.9); + font-size: 1em; + text-align: center; + line-height: 4.1vh; } -.tr-td { - height: 100%; +.day { + border-radius: 2.5vh; + background: #6b83db; + height: 5vh; + line-height: 5vh; + margin: 5px 5px 12px; + cursor: pointer; } -div.hours { - background-color: rgba(255, 255, 255, 0.7); - border-top: 2px solid black; - color: black; - border-right:2px solid black; +.hour:after { + content: ":00"; } -div.content { - display : flex; - align-items : center; - justify-content : center; - border: 2px solid black; +.class { + display: flex; + align-content: center; + width: 100%; + height: 4.1vh; + background-color: transparent; + font-size: 2vmin; + font-weight: 300; + padding-left: 10px; + align-items: center; } -@media (max-width: 1020px) { - table { - width: 100%; +.lundi .day_title:after, +.day0:after { + content: "undi"; +} + +.mardi .day_title:after, +.day1:after { + content: "rdi"; +} + +.mercredi .day_title:after, +.day2:after { + content: "rcrdi"; +} + +.jeudi .day_title:after, +.day3:after { + content: "eudi"; +} + +.vendredi .day_title:after, +.day4:after { + content: "endredi"; +} + +.samedi .day_title:after, +.day5:after { + content: "amedi"; +} + +.dimanche .day_title:after, +.day6:after { + content: "imanche"; +} + +@media (min-width: 701px) and (max-width: 950px) { + .hour:after { + content: "h"; } - .tr-th th { - height: width; - padding: 5px; - font-size: 0.5rem; + .column div.day_title:after { + content: none; + } +} + +@media (max-width: 700px) { + + .column { + width: 50%; + } + + .column.days { + display: block; + width: 30%; + } + + .column.time { + width: 20%; + } + + .lundi, + .mardi, + .mercredi, + .jeudi, + .vendredi, + .samedi, + .dimanche { + display: none; + } + + .planning-container[selected$="0"] .lundi { + display: block; + } + + .planning-container[selected$="1"] .mardi { + display: block; + } + + .planning-container[selected$="2"] .mercredi { + display: block; + } + + .planning-container[selected$="3"] .jeudi { + display: block; + } + + .planning-container[selected$="4"] .vendredi { + display: block; + } + + .planning-container[selected$="5"] .samedi { + display: block; + } + + .planning-container[selected$="6"] .dimanche { + display: block; + } +} + +@media (max-width: 400px) { + + .column div.day:after { + content: none; } } \ No newline at end of file diff --git a/planning.php b/planning.php index d7c86bc..db0a91b 100755 --- a/planning.php +++ b/planning.php @@ -9,6 +9,7 @@ if(isset($_GET['planning']) AND !empty(['planning'])) } else { header('Location: planning.php?planning=1'); } + ?>
@@ -22,67 +23,199 @@ if(isset($_GET['planning']) AND !empty(['planning'])) - - - - - - - - - - - - - - - "; - $req1 = $db->prepare('SELECT title, description, color, length FROM planning_insa WHERE day = ? AND num_planning = ? ORDER BY order_start ASC'); - $req1->execute(array($day, $planning)); - while($r1 = $req1->fetch()) { - ?> -
- -
- + +
+ +
+
Jour
+ +
L
+
Ma
+
Me
+
J
+
V
+
S
+
D
+ + +
+ +
+ +
Heure
+
07
+
08
+
09
+
10
+ +
11
+
12
+
13
+
14
+
15
+ +
16
+
17
+
18
+
19
+
20
+ +
21
+
22
+
23
+
00
+
01
+ +
+ +
+
L
+ + prepare('SELECT title, description, color, length FROM planning_insa WHERE day = 0 AND num_planning = ? ORDER BY order_start ASC'); + $req1->execute(array($day, $planning)); + while($r1 = $req1->fetch()) { + ?> +
+ +
+ + +
+ +
+
Ma
+ + prepare('SELECT title, description, color, length FROM planning_insa WHERE day = 1 AND num_planning = ? ORDER BY order_start ASC'); + $req1->execute(array($day, $planning)); + while($r1 = $req1->fetch()) { + ?> +
+ +
+ +
+ +
+
Me
+ + prepare('SELECT title, description, color, length FROM planning_insa WHERE day = 2 AND num_planning = ? ORDER BY order_start ASC'); + $req1->execute(array($day, $planning)); + while($r1 = $req1->fetch()) { + ?> +
+ +
+ +
+ +
+
J
+ + prepare('SELECT title, description, color, length FROM planning_insa WHERE day = 3 AND num_planning = ? ORDER BY order_start ASC'); + $req1->execute(array($day, $planning)); + while($r1 = $req1->fetch()) { + ?> +
+ +
+ +
+ +
+
V
+ + prepare('SELECT title, description, color, length FROM planning_insa WHERE day = 4 AND num_planning = ? ORDER BY order_start ASC'); + $req1->execute(array($day, $planning)); + while($r1 = $req1->fetch()) { + ?> +
+ +
+ +
+ +
+
S
+ prepare('SELECT title, description, color, length FROM planning_insa WHERE day = 5 AND num_planning = ? ORDER BY order_start ASC'); + $req1->execute(array($day, $planning)); + while($r1 = $req1->fetch()) { + ?> +
+ +
+ +
+ +
+
D
+ + prepare('SELECT title, description, color, length FROM planning_insa WHERE day = 6 AND num_planning = ? ORDER BY order_start ASC'); + $req1->execute(array($day, $planning)); + while($r1 = $req1->fetch()) { + ?> +
+ +
+ +
+ +
+ + + +
+ Clique sur le planning que tu souhaites visionner :
+ On les a pas encore en fait +
+ + - echo ""; - } - ?> - -
HeuresLundiMardiMercrediJeudiVendrediSamediDimanche
- 23) { - ?> -
- -
- -
- -
- -
- -
- Clique sur le planning que tu souhaites visionner :
- On les a pas encore en fait -
-
+