Browse Source

Mise a jour 2020

Cyprien Heusse 3 years ago
parent
commit
fc39a3611c
100 changed files with 25895 additions and 11721 deletions
  1. 3
    3
      README.md
  2. BIN
      admin/.DS_Store
  3. 24
    24
      admin/admin/ajax.php
  4. 59
    59
      admin/admin/planning.php
  5. 24
    24
      admin/gda/ajax.php
  6. 61
    63
      admin/gda/scores.php
  7. 62
    62
      admin/index.php
  8. 47
    47
      admin/webmaster/ajax.php
  9. 57
    57
      admin/webmaster/map.php
  10. 57
    57
      admin/webmaster/update.php
  11. 5
    0
      ajax/admin/.htaccess
  12. 5
    0
      ajax/admin/admin/.htaccess
  13. 24
    0
      ajax/admin/admin/ajax.php
  14. 59
    0
      ajax/admin/admin/planning.php
  15. 24
    0
      ajax/admin/gda/ajax.php
  16. 61
    0
      ajax/admin/gda/scores.php
  17. 62
    0
      ajax/admin/index.php
  18. 5
    0
      ajax/admin/webmaster/.htaccess
  19. 47
    0
      ajax/admin/webmaster/ajax.php
  20. 57
    0
      ajax/admin/webmaster/map.php
  21. 57
    0
      ajax/admin/webmaster/update.php
  22. 51
    51
      ajax/read/index.php
  23. 16
    0
      ajax/write/.htaccess
  24. BIN
      assets/.DS_Store
  25. 222
    222
      assets/css/adminEdit.css
  26. 97
    97
      assets/css/baguette.css
  27. 81
    81
      assets/css/enigma.css
  28. 297
    297
      assets/css/photos.css
  29. 66
    66
      assets/css/planningEvents.css
  30. 106
    118
      assets/css/score.css
  31. 87
    87
      assets/css/sidenav.css
  32. 67
    103
      assets/css/stats.css
  33. 662
    666
      assets/css/style.css
  34. BIN
      assets/fonts/kohlanta.ttf
  35. BIN
      assets/images/backgrounds/bg_pek.jpg
  36. BIN
      assets/images/backgrounds/bg_tam.jpg
  37. BIN
      assets/images/backgrounds/bg_tam.psd
  38. BIN
      assets/images/backgrounds/bg_up.png
  39. BIN
      assets/images/blouse/blouse_derriere_elsa.jpg
  40. BIN
      assets/images/blouse/blouse_derriere_matthieu.jpg
  41. BIN
      assets/images/blouse/blouse_devant_elsa.jpg
  42. BIN
      assets/images/blouse/blouse_devant_matthieu.jpg
  43. BIN
      assets/images/blouse/blouse_exemple.png
  44. BIN
      assets/images/blouse/derrière.png
  45. BIN
      assets/images/blouse/devant.png
  46. BIN
      assets/images/logos/Logo_Principal.png
  47. 14081
    98
      assets/images/logos/logo-site-accueil.svg
  48. BIN
      assets/images/logos/logo-texture.png
  49. BIN
      assets/images/logos/pek_logo.png
  50. BIN
      assets/images/logos/tam_logo.png
  51. BIN
      assets/images/logos/titre-site-accueil.png
  52. 1
    96
      assets/images/logos/titre-site-accueil.svg
  53. 7726
    7726
      assets/images/map.svg
  54. BIN
      assets/images/teams/pekstanas.jpg
  55. BIN
      assets/images/teams/tamboom.jpg
  56. 44
    44
      assets/js/admin/mapManager.js
  57. 167
    167
      assets/js/admin/planningManager.js
  58. 93
    93
      assets/js/admin/statsManager.js
  59. 26
    26
      assets/js/admin/updateManager.js
  60. 55
    55
      assets/js/init.js
  61. 7
    7
      assets/js/jquery.mousewheel.min.js
  62. 45
    45
      assets/js/map.js
  63. 276
    276
      assets/js/photos.js
  64. 98
    98
      assets/js/planning.js
  65. 48
    55
      assets/js/sidenav.js
  66. 47
    52
      assets/js/statsDisplay.js
  67. 28
    28
      assets/js/timer.js
  68. BIN
      assets/pdf/Charte-GB.pdf
  69. BIN
      assets/pdf/Fiche-Autorisation-Droit-Image.pdf
  70. BIN
      assets/pdf/Fiche-Parrainge.pdf
  71. BIN
      assets/pdf/Mots-croises-plaquette.pdf
  72. BIN
      assets/pdf/Paroles.pdf
  73. BIN
      assets/pdf/Plaquette-INSA-2020-Promo-58.pdf.pdf
  74. 95
    134
      blouse.php
  75. 0
    29
      boomsouffle.php
  76. 24
    0
      chansons.php
  77. 97
    98
      classes/dao.php
  78. 13
    0
      clubs.php
  79. 0
    12
      computerorder.php
  80. 119
    106
      coms.php
  81. 28
    31
      downloads.php
  82. 0
    1
      enigma.php
  83. 25
    25
      errors/401.php
  84. 21
    21
      errors/404.php
  85. BIN
      favicon.ico
  86. 0
    29
      glissefondor.php
  87. BIN
      includes/.DS_Store
  88. 38
    38
      includes/com_template.php
  89. 19
    19
      includes/copyright.php
  90. 8
    8
      includes/main_button_template.php
  91. 2
    2
      includes/pass/.htpass_admin
  92. 3
    3
      includes/pass/.htpass_gda
  93. 1
    1
      includes/pass/.htpass_webmaster
  94. 18
    18
      includes/photos/folder_template.php
  95. 1
    1
      includes/photos/path_template.php
  96. 1
    1
      includes/photos/photo_template.php
  97. 15
    23
      includes/score_counter.php
  98. 14
    16
      includes/score_functions.php
  99. 59
    55
      includes/sidenav.php
  100. 0
    0
      includes/template.php

+ 3
- 3
README.md View File

@@ -2,9 +2,9 @@
2 2
 
3 3
 Ce site, dont le but est d'accompagner les PPA, a été créé en 2017.
4 4
 
5
-Version actuellement en ligne : **2019**.
5
+Version actuellement en ligne : **2020**.
6 6
 
7
-**Si vous êtes intéressés par le projet, merci de [lire le wiki.](https://git.srv-falcon.etud.insa-toulouse.fr/vergnet/site-accueil-insa/wiki/Accueil)**
7
+**Si vous êtes intéressés par le projet, merci de [lire le wiki.](https://git.etud.insa-toulouse.fr/vergnet/site-accueil-insa/wiki/Accueil)**
8 8
 
9 9
 ## Contribuer
10 10
 
@@ -20,5 +20,5 @@ Arnaud Vergnet (vergnet@etud.insa-toulouse.fr)
20 20
 ## Développeurs Actifs
21 21
 
22 22
 - Arthur BOIVERT (boivert@etud.insa-toulouse.fr)
23
-- Arnaud VERGNET (vergnet@etud.insa-toulouse.fr)
23
+- Cyprien HEUSSE (heusse@etud.insa-toulouse.fr)
24 24
 

BIN
admin/.DS_Store View File


+ 24
- 24
admin/admin/ajax.php View File

@@ -1,24 +1,24 @@
1
-<?php
2
-require_once '../../classes/dao.php';
3
-
4
-
5
-if (isset($_GET['function'])) {
6
-    if ($_GET['function'] == "save_day_activities")
7
-        save_day_activities();
8
-} else
9
-    show_error();
10
-
11
-function save_day_activities() {
12
-    if (isset($_GET['day']) && isset($_GET['entries'])) {
13
-        $dao = new Dao();
14
-        $dao->save_day_activities($_GET['day'], $_GET['entries']);
15
-        echo "Réussite";
16
-    } else {
17
-        show_error();
18
-    }
19
-}
20
-
21
-function show_error() {
22
-    echo "Échec : ";
23
-    var_dump($_GET);
24
-}
1
+<?php
2
+require_once '../../classes/dao.php';
3
+
4
+
5
+if (isset($_GET['function'])) {
6
+    if ($_GET['function'] == "save_day_activities")
7
+        save_day_activities();
8
+} else
9
+    show_error();
10
+
11
+function save_day_activities() {
12
+    if (isset($_GET['day']) && isset($_GET['entries'])) {
13
+        $dao = new Dao();
14
+        $dao->save_day_activities($_GET['day'], $_GET['entries']);
15
+        echo "Réussite";
16
+    } else {
17
+        show_error();
18
+    }
19
+}
20
+
21
+function show_error() {
22
+    echo "Échec : ";
23
+    var_dump($_GET);
24
+}

+ 59
- 59
admin/admin/planning.php View File

@@ -1,59 +1,59 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-$relativePath = "../../";
4
-?>
5
-    <div class="inner">
6
-        <h1>ADMIN</h1>
7
-        <h2>Edition du planning</h2>
8
-
9
-
10
-        <select id="daySelect">
11
-            <option value="1">Lundi</option>
12
-            <option value="2">Mardi</option>
13
-            <option value="3">Mercredi</option>
14
-            <option value="4">Jeudi</option>
15
-            <option value="5">Vendredi</option>
16
-            <option value="6">Samedi</option>
17
-            <option value="7">Dimanche</option>
18
-        </select>
19
-
20
-        <br>
21
-        <div class="add-line">
22
-            <i class="fas fa-plus"></i>
23
-        </div>
24
-        <div class="edit-header">
25
-            <div class="planning-start">Début</div>
26
-            <div class="planning-length">Durée</div>
27
-            <div class="planning-name">Nom</div>
28
-            <div class="planning-trash"><i class='fas fa-trash'></i></div>
29
-        </div>
30
-        <table id="activityTable">
31
-        </table>
32
-
33
-        <div class="save">
34
-            <i class="fas fa-save"></i> Enregistrer
35
-        </div>
36
-        <br>
37
-        <div class="buttons-container">
38
-            <a href="../index.php" class="admin-back-button">
39
-                <i class="fas fa-chevron-left"></i>
40
-                Retour sur la page admin
41
-            </a>
42
-            <a href="<?= $relativePath ?>planning.php" class="website-back-button">
43
-                Voir sur le site
44
-            </a>
45
-        </div>
46
-    </div>
47
-
48
-
49
-    <link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
50
-
51
-<?php
52
-$pageContent = ob_get_clean(); // Store html content in variable
53
-$pageTitle = "Édition planning";
54
-
55
-$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/planningManager.js\"></script>";
56
-
57
-include($relativePath . "includes/template.php"); // Display template with variable content
58
-
59
-?>
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../../";
4
+?>
5
+    <div class="inner">
6
+        <h1>ADMIN</h1>
7
+        <h2>Edition du planning</h2>
8
+
9
+
10
+        <select id="daySelect">
11
+            <option value="1">Lundi</option>
12
+            <option value="2">Mardi</option>
13
+            <option value="3">Mercredi</option>
14
+            <option value="4">Jeudi</option>
15
+            <option value="5">Vendredi</option>
16
+            <option value="6">Samedi</option>
17
+            <option value="7">Dimanche</option>
18
+        </select>
19
+
20
+        <br>
21
+        <div class="add-line">
22
+            <i class="fas fa-plus"></i>
23
+        </div>
24
+        <div class="edit-header">
25
+            <div class="planning-start">Début</div>
26
+            <div class="planning-length">Durée</div>
27
+            <div class="planning-name">Nom</div>
28
+            <div class="planning-trash"><i class='fas fa-trash'></i></div>
29
+        </div>
30
+        <table id="activityTable">
31
+        </table>
32
+
33
+        <div class="save">
34
+            <i class="fas fa-save"></i> Enregistrer
35
+        </div>
36
+        <br>
37
+        <div class="buttons-container">
38
+            <a href="../index.php" class="admin-back-button">
39
+                <i class="fas fa-chevron-left"></i>
40
+                Retour sur la page admin
41
+            </a>
42
+            <a href="<?= $relativePath ?>planning.php" class="website-back-button">
43
+                Voir sur le site
44
+            </a>
45
+        </div>
46
+    </div>
47
+
48
+
49
+    <link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
50
+
51
+<?php
52
+$pageContent = ob_get_clean(); // Store html content in variable
53
+$pageTitle = "Édition planning";
54
+
55
+$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/planningManager.js\"></script>";
56
+
57
+include($relativePath . "includes/template.php"); // Display template with variable content
58
+
59
+?>

+ 24
- 24
admin/gda/ajax.php View File

@@ -1,24 +1,24 @@
1
-<?php
2
-require_once '../../classes/dao.php';
3
-
4
-
5
-if (isset($_GET['function'])) {
6
-    if ($_GET['function'] == "save_scores")
7
-        save_scores();
8
-} else
9
-    show_error();
10
-
11
-function save_scores()
12
-{
13
-    if (isset($_GET['lines']) && isset($_GET['team'])) {
14
-        $dao = new Dao();
15
-        $dao->save_scores($_GET['lines'], $_GET['team']);
16
-        echo "Réussite";
17
-    } else
18
-        show_error();
19
-}
20
-
21
-function show_error() {
22
-    echo "Échec : ";
23
-    var_dump($_GET);
24
-}
1
+<?php
2
+require_once '../../classes/dao.php';
3
+
4
+
5
+if (isset($_GET['function'])) {
6
+    if ($_GET['function'] == "save_scores")
7
+        save_scores();
8
+} else
9
+    show_error();
10
+
11
+function save_scores()
12
+{
13
+    if (isset($_GET['lines']) && isset($_GET['team'])) {
14
+        $dao = new Dao();
15
+        $dao->save_scores($_GET['lines'], $_GET['team']);
16
+        echo "Réussite";
17
+    } else
18
+        show_error();
19
+}
20
+
21
+function show_error() {
22
+    echo "Échec : ";
23
+    var_dump($_GET);
24
+}

+ 61
- 63
admin/gda/scores.php View File

@@ -1,63 +1,61 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-$relativePath = "../../";
4
-?>
5
-    <div class="inner">
6
-        <h1>ADMIN</h1>
7
-        <h2>Edition des scores</h2>
8
-        <ul>
9
-            <strong style="color: #ee293d">Quelques règles pour les scores</strong>
10
-            <li>Pas de score total négatif pour une équipe</li>
11
-            <li>A priori les scores supérieurs à 1000 marchent, mais au cas où restez à
12
-                moins de 1000 (comme l'année dernière quoi)</li>
13
-        </ul>
14
-        Si jamais y'a un quelconque problème, envoyez-moi un message.
15
-<br>
16
-        <br>
17
-
18
-
19
-        <select id="teamSelect">
20
-            <option value="gli">Glissefondor</option>
21
-            <option value="pek">Peksentard</option>
22
-            <option value="boo">Boomsouffle</option>
23
-            <option value="ver">Verredaigle</option>
24
-        </select>
25
-
26
-        <div class="add-line">
27
-            <i class="fas fa-plus"></i>
28
-        </div>
29
-        <div class="edit-header">
30
-            <div class="stat-log">Log</div>
31
-            <div class="stat-points">Points</div>
32
-            <div class="stat-trash"><i class='fas fa-trash'></i></div>
33
-        </div>
34
-        <table class="stats-table edit-stats">
35
-        </table>
36
-
37
-        <div class="save">
38
-            <i class="fas fa-save"></i> Enregistrer
39
-        </div>
40
-        <br>
41
-        <div class="buttons-container">
42
-            <a href="../index.php" class="admin-back-button">
43
-                <i class="fas fa-chevron-left"></i>
44
-                Retour sur la page admin
45
-            </a>
46
-            <a href="<?= $relativePath ?>stats.php" class="website-back-button">
47
-                Voir sur le site
48
-            </a>
49
-        </div>
50
-    </div>
51
-
52
-
53
-    <link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
54
-
55
-<?php
56
-$pageContent = ob_get_clean(); // Store html content in variable
57
-$pageTitle = "Édition scores";
58
-
59
-$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/statsManager.js\"></script>";
60
-
61
-include($relativePath . "includes/template.php"); // Display template with variable content
62
-
63
-?>
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../../";
4
+?>
5
+    <div class="inner">
6
+        <h1>ADMIN</h1>
7
+        <h2>Edition des scores</h2>
8
+        <ul>
9
+            <strong style="color: #ee293d">Quelques règles pour les scores</strong>
10
+            <li>Pas de score total négatif pour une équipe</li>
11
+            <li>A priori les scores supérieurs à 1000 marchent, mais au cas où restez à
12
+                moins de 1000 (comme l'année dernière quoi)</li>
13
+        </ul>
14
+        Si jamais y'a un quelconque problème, envoyez-moi un message.
15
+		<br>
16
+        <br>
17
+
18
+
19
+        <select id="teamSelect">
20
+            <option value="tam">Tamboom</option>
21
+            <option value="pek">Pekstanas</option>
22
+        </select>
23
+
24
+        <div class="add-line">
25
+            <i class="fas fa-plus"></i>
26
+        </div>
27
+        <div class="edit-header">
28
+            <div class="stat-log">Log</div>
29
+            <div class="stat-points">Points</div>
30
+            <div class="stat-trash"><i class='fas fa-trash'></i></div>
31
+        </div>
32
+        <table class="stats-table edit-stats">
33
+        </table>
34
+
35
+        <div class="save">
36
+            <i class="fas fa-save"></i> Enregistrer
37
+        </div>
38
+        <br>
39
+        <div class="buttons-container">
40
+            <a href="../index.php" class="admin-back-button">
41
+                <i class="fas fa-chevron-left"></i>
42
+                Retour sur la page admin
43
+            </a>
44
+            <a href="<?= $relativePath ?>stats.php" class="website-back-button">
45
+                Voir sur le site
46
+            </a>
47
+        </div>
48
+    </div>
49
+
50
+
51
+    <link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
52
+
53
+<?php
54
+$pageContent = ob_get_clean(); // Store html content in variable
55
+$pageTitle = "Édition scores";
56
+
57
+$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/statsManager.js\"></script>";
58
+
59
+include($relativePath . "includes/template.php"); // Display template with variable content
60
+
61
+?>

+ 62
- 62
admin/index.php View File

@@ -1,62 +1,62 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-$relativePath = "../";
4
-?>
5
-<div class="inner">
6
-    <h1>ADMIN</h1>
7
-    <h2>Bienvenue sur la page d'administration</h2>
8
-
9
-    <p>
10
-        Sur cette page, tu vas pouvoir animer le site en changeant les scores, le planning ou les informations de la
11
-        carte.
12
-        <br/>
13
-        Attention, tu dois avoir le compte approprié pour pouvoir modifier ces informations.
14
-        <br/>
15
-        Les comptes sont les suivants (le numéro indique le niveau de privilèges) :
16
-    </p>
17
-    <ol>
18
-        <li>
19
-            GDA
20
-        </li>
21
-        <li>
22
-            Admin
23
-        </li>
24
-        <li>
25
-            Webmaster
26
-        </li>
27
-    </ol>
28
-    <p>
29
-        Un compte hérite des privilèges de tous ceux ayant un niveau inférieur.
30
-        <br/>
31
-        Donc ici, Webmaster les possède tous.
32
-    </p>
33
-    <div class="admin-container">
34
-        <h4>
35
-            Action des GDA
36
-        </h4>
37
-        <a href="gda/scores.php">Editer les scores</a>
38
-    </div>
39
-    <div class="admin-container">
40
-        <h4>
41
-            Action des admins
42
-        </h4>
43
-        <a href="admin/planning.php">Editer le planning</a>
44
-    </div>
45
-    <div class="admin-container">
46
-        <h4>
47
-            Action des webmasters
48
-        </h4>
49
-        <a href="webmaster/map.php">Editer le texte de la carte</a>
50
-        <br/>
51
-        <a href="webmaster/update.php">Mises à jour</a>
52
-    </div>
53
-</div>
54
-
55
-<link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
56
-
57
-<?php
58
-$pageContent = ob_get_clean(); // Store html content in variable
59
-$pageTitle = "ADMIN";
60
-
61
-include($relativePath . "includes/template.php"); // Display template with variable content
62
-?>
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../";
4
+?>
5
+<div class="inner">
6
+    <h1>ADMIN</h1>
7
+    <h2>Bienvenue sur la page d'administration</h2>
8
+
9
+    <p>
10
+        Sur cette page, tu vas pouvoir animer le site en changeant les scores, le planning ou les informations de la
11
+        carte.
12
+        <br/>
13
+        Attention, tu dois avoir le compte approprié pour pouvoir modifier ces informations.
14
+        <br/>
15
+        Les comptes sont les suivants (le numéro indique le niveau de privilèges) :
16
+    </p>
17
+    <ol>
18
+        <li>
19
+            GDA
20
+        </li>
21
+        <li>
22
+            Admin
23
+        </li>
24
+        <li>
25
+            Webmaster
26
+        </li>
27
+    </ol>
28
+    <p>
29
+        Un compte hérite des privilèges de tous ceux ayant un niveau inférieur.
30
+        <br/>
31
+        Donc ici, Webmaster les possède tous.
32
+    </p>
33
+    <div class="admin-container">
34
+        <h4>
35
+            Action des GDA
36
+        </h4>
37
+        <a href="gda/scores.php">Editer les scores</a>
38
+    </div>
39
+    <div class="admin-container">
40
+        <h4>
41
+            Action des admins
42
+        </h4>
43
+        <a href="admin/planning.php">Editer le planning</a>
44
+    </div>
45
+    <div class="admin-container">
46
+        <h4>
47
+            Action des webmasters
48
+        </h4>
49
+        <a href="webmaster/map.php">Editer le texte de la carte</a>
50
+        <br/>
51
+        <a href="webmaster/update.php">Mises à jour</a>
52
+    </div>
53
+</div>
54
+
55
+<link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
56
+
57
+<?php
58
+$pageContent = ob_get_clean(); // Store html content in variable
59
+$pageTitle = "ADMIN";
60
+
61
+include($relativePath . "includes/template.php"); // Display template with variable content
62
+?>

+ 47
- 47
admin/webmaster/ajax.php View File

@@ -1,47 +1,47 @@
1
-<?php
2
-require_once '../../classes/dao.php';
3
-
4
-$rest_json = file_get_contents("php://input");
5
-$_POST = json_decode($rest_json, true);
6
-//var_dump($_POST);
7
-
8
-if (isset($_GET['function']) || isset($_POST['function'])) {
9
-    if ($_GET['function'] == "save_map_info")
10
-        save_map_info();
11
-    elseif ($_POST['function'] == "update_website")
12
-        update_website();
13
-} else
14
-    show_error();
15
-
16
-function save_map_info() {
17
-    if (isset($_GET['selector']) && isset($_GET['info'])) {
18
-        $dao = new Dao();
19
-        $dao->save_map_info($_GET['selector'], $_GET['info']);
20
-        echo "Réussite";
21
-    } else {
22
-        show_error();
23
-    }
24
-}
25
-
26
-function update_website() {
27
-//    if (isset($_POST['login']) && isset($_POST['password'])) {
28
-//        $login = $_POST['login'];
29
-//        $password = $_POST['password'];
30
-//        echo $login . ":" . $password."\n";
31
-//        // Cannot write because php cannot write as user www-data
32
-//        // be sure to escape characters
33
-//        // Do not remove the space before the command (prevent command from being saved in history)
34
-////            system(" git pull https://".$login.":".$password."@git.srv-falcon.etud.insa-toulouse.fr/vergnet/site-accueil-insa.git");
35
-//    } else {
36
-//        show_error();
37
-//    }
38
-}
39
-
40
-
41
-function show_error() {
42
-    echo "Échec :\n";
43
-    echo "GET\n";
44
-    var_dump($_GET);
45
-    echo "POST\n";
46
-    var_dump($_POST);
47
-}
1
+<?php
2
+require_once '../../classes/dao.php';
3
+
4
+$rest_json = file_get_contents("php://input");
5
+$_POST = json_decode($rest_json, true);
6
+//var_dump($_POST);
7
+
8
+if (isset($_GET['function']) || isset($_POST['function'])) {
9
+    if ($_GET['function'] == "save_map_info")
10
+        save_map_info();
11
+    elseif ($_POST['function'] == "update_website")
12
+        update_website();
13
+} else
14
+    show_error();
15
+
16
+function save_map_info() {
17
+    if (isset($_GET['selector']) && isset($_GET['info'])) {
18
+        $dao = new Dao();
19
+        $dao->save_map_info($_GET['selector'], $_GET['info']);
20
+        echo "Réussite";
21
+    } else {
22
+        show_error();
23
+    }
24
+}
25
+
26
+function update_website() {
27
+//    if (isset($_POST['login']) && isset($_POST['password'])) {
28
+//        $login = $_POST['login'];
29
+//        $password = $_POST['password'];
30
+//        echo $login . ":" . $password."\n";
31
+//        // Cannot write because php cannot write as user www-data
32
+//        // be sure to escape characters
33
+//        // Do not remove the space before the command (prevent command from being saved in history)
34
+////            system(" git pull https://".$login.":".$password."@git.srv-falcon.etud.insa-toulouse.fr/vergnet/site-accueil-insa.git");
35
+//    } else {
36
+//        show_error();
37
+//    }
38
+}
39
+
40
+
41
+function show_error() {
42
+    echo "Échec :\n";
43
+    echo "GET\n";
44
+    var_dump($_GET);
45
+    echo "POST\n";
46
+    var_dump($_POST);
47
+}

+ 57
- 57
admin/webmaster/map.php View File

@@ -1,57 +1,57 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-$relativePath = "../../";
4
-require_once $relativePath . 'classes/dao.php';
5
-?>
6
-    <div class="inner">
7
-        <h1>ADMIN</h1>
8
-        <h2>Edition de la carte</h2>
9
-
10
-
11
-        <select id="mapSelect">
12
-            <?php setup_map_dropdown() ?>
13
-        </select>
14
-
15
-        <br>
16
-
17
-        <label for="titleInput">Titre</label>
18
-        <input type="text" id="titleInput">
19
-
20
-        <label for="descriptionInput">Description</label>
21
-        <textarea rows="15" id="descriptionInput"></textarea>
22
-
23
-        <div class="save">
24
-            <i class="fas fa-save"></i> Enregistrer
25
-        </div>
26
-        <br>
27
-        <div class="buttons-container">
28
-            <a href="../index.php" class="admin-back-button">
29
-                <i class="fas fa-chevron-left"></i>
30
-                Retour sur la page admin
31
-            </a>
32
-            <a href="<?= $relativePath ?>map.php" class="website-back-button">
33
-                Voir sur le site
34
-            </a>
35
-        </div>
36
-    </div>
37
-
38
-
39
-    <link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
40
-
41
-<?php
42
-$pageContent = ob_get_clean(); // Store html content in variable
43
-$pageTitle = "Édition carte";
44
-
45
-$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/mapManager.js\"></script>";
46
-
47
-include($relativePath . "includes/template.php"); // Display template with variable content
48
-
49
-function setup_map_dropdown()
50
-{
51
-    $dao = new Dao();
52
-    foreach ($dao->get_map_selectors() as $row) {
53
-        echo "<option value='" . $row['selector'] . "'>" . $row['selector'] . "</option>";
54
-    }
55
-}
56
-
57
-?>
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../../";
4
+require_once $relativePath . 'classes/dao.php';
5
+?>
6
+    <div class="inner">
7
+        <h1>ADMIN</h1>
8
+        <h2>Edition de la carte</h2>
9
+
10
+
11
+        <select id="mapSelect">
12
+            <?php setup_map_dropdown() ?>
13
+        </select>
14
+
15
+        <br>
16
+
17
+        <label for="titleInput">Titre</label>
18
+        <input type="text" id="titleInput">
19
+
20
+        <label for="descriptionInput">Description</label>
21
+        <textarea rows="15" id="descriptionInput"></textarea>
22
+
23
+        <div class="save">
24
+            <i class="fas fa-save"></i> Enregistrer
25
+        </div>
26
+        <br>
27
+        <div class="buttons-container">
28
+            <a href="../index.php" class="admin-back-button">
29
+                <i class="fas fa-chevron-left"></i>
30
+                Retour sur la page admin
31
+            </a>
32
+            <a href="<?= $relativePath ?>map.php" class="website-back-button">
33
+                Voir sur le site
34
+            </a>
35
+        </div>
36
+    </div>
37
+
38
+
39
+    <link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
40
+
41
+<?php
42
+$pageContent = ob_get_clean(); // Store html content in variable
43
+$pageTitle = "Édition carte";
44
+
45
+$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/mapManager.js\"></script>";
46
+
47
+include($relativePath . "includes/template.php"); // Display template with variable content
48
+
49
+function setup_map_dropdown()
50
+{
51
+    $dao = new Dao();
52
+    foreach ($dao->get_map_selectors() as $row) {
53
+        echo "<option value='" . $row['selector'] . "'>" . $row['selector'] . "</option>";
54
+    }
55
+}
56
+
57
+?>

+ 57
- 57
admin/webmaster/update.php View File

@@ -1,57 +1,57 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-$relativePath = "../../";
4
-require_once $relativePath . 'classes/dao.php';
5
-
6
-$log = shell_exec("git log | head -50"); // Show the first few commits
7
-
8
-?>
9
-<div class="inner">
10
-    <h1>ADMIN</h1>
11
-    <h2>Mise a jour du site</h2>
12
-
13
-<!--        <label for="usernameInput">Login</label>-->
14
-<!--        <input type="text" id="usernameInput">-->
15
-<!---->
16
-<!--        <label for="passwordInput">Password</label>-->
17
-<!--        <input type="password" id="passwordInput">-->
18
-<!---->
19
-<!--        <div class="save">-->
20
-<!--            <i class="fas fa-save"></i> Mettre à Jour-->
21
-<!--        </div>-->
22
-
23
-    <div id="gitButton">
24
-        <a href="https://git.srv-falcon.etud.insa-toulouse.fr/vergnet/site-accueil-insa" target="_blank">
25
-            Voir sur Gitea
26
-        </a>
27
-    </div>
28
-    <h3>Log</h3>
29
-    <p>
30
-        <?php
31
-        echo nl2br($log)
32
-        ?>
33
-    </p>
34
-
35
-    <div class="buttons-container">
36
-        <a href="../index.php" class="admin-back-button">
37
-            <i class="fas fa-chevron-left"></i>
38
-            Retour sur la page admin
39
-        </a>
40
-        <a href="<?= $relativePath ?>index.php" class="website-back-button">
41
-            Voir sur le site
42
-        </a>
43
-    </div>
44
-</div>
45
-
46
-
47
-<link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
48
-
49
-<?php
50
-$pageContent = ob_get_clean(); // Store html content in variable
51
-$pageTitle = "Mise à jour";
52
-
53
-$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/updateManager.js\"></script>";
54
-
55
-include($relativePath . "includes/template.php"); // Display template with variable content
56
-
57
-?>
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../../";
4
+require_once $relativePath . 'classes/dao.php';
5
+
6
+$log = shell_exec("git log | head -50"); // Show the first few commits
7
+
8
+?>
9
+<div class="inner">
10
+    <h1>ADMIN</h1>
11
+    <h2>Mise a jour du site</h2>
12
+
13
+<!--        <label for="usernameInput">Login</label>-->
14
+<!--        <input type="text" id="usernameInput">-->
15
+<!---->
16
+<!--        <label for="passwordInput">Password</label>-->
17
+<!--        <input type="password" id="passwordInput">-->
18
+<!---->
19
+<!--        <div class="save">-->
20
+<!--            <i class="fas fa-save"></i> Mettre à Jour-->
21
+<!--        </div>-->
22
+
23
+    <div id="gitButton">
24
+        <a href="https://git.srv-falcon.etud.insa-toulouse.fr/vergnet/site-accueil-insa" target="_blank">
25
+            Voir sur Gitea
26
+        </a>
27
+    </div>
28
+    <h3>Log</h3>
29
+    <p>
30
+        <?php
31
+        echo nl2br($log)
32
+        ?>
33
+    </p>
34
+
35
+    <div class="buttons-container">
36
+        <a href="../index.php" class="admin-back-button">
37
+            <i class="fas fa-chevron-left"></i>
38
+            Retour sur la page admin
39
+        </a>
40
+        <a href="<?= $relativePath ?>index.php" class="website-back-button">
41
+            Voir sur le site
42
+        </a>
43
+    </div>
44
+</div>
45
+
46
+
47
+<link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
48
+
49
+<?php
50
+$pageContent = ob_get_clean(); // Store html content in variable
51
+$pageTitle = "Mise à jour";
52
+
53
+$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/updateManager.js\"></script>";
54
+
55
+include($relativePath . "includes/template.php"); // Display template with variable content
56
+
57
+?>

+ 5
- 0
ajax/admin/.htaccess View File

@@ -0,0 +1,5 @@
1
+AuthName "MDP ?"
2
+AuthType Basic
3
+AuthUserFile /home_clubs/accueil_insa/public_html/includes/pass/.htpass_gda
4
+require valid-user
5
+

+ 5
- 0
ajax/admin/admin/.htaccess View File

@@ -0,0 +1,5 @@
1
+AuthName "MDP ?"
2
+AuthType Basic
3
+AuthUserFile /home_clubs/accueil_insa/public_html/includes/pass/.htpass_admin
4
+require valid-user
5
+

+ 24
- 0
ajax/admin/admin/ajax.php View File

@@ -0,0 +1,24 @@
1
+<?php
2
+require_once '../../classes/dao.php';
3
+
4
+
5
+if (isset($_GET['function'])) {
6
+    if ($_GET['function'] == "save_day_activities")
7
+        save_day_activities();
8
+} else
9
+    show_error();
10
+
11
+function save_day_activities() {
12
+    if (isset($_GET['day']) && isset($_GET['entries'])) {
13
+        $dao = new Dao();
14
+        $dao->save_day_activities($_GET['day'], $_GET['entries']);
15
+        echo "Réussite";
16
+    } else {
17
+        show_error();
18
+    }
19
+}
20
+
21
+function show_error() {
22
+    echo "Échec : ";
23
+    var_dump($_GET);
24
+}

+ 59
- 0
ajax/admin/admin/planning.php View File

@@ -0,0 +1,59 @@
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../../";
4
+?>
5
+    <div class="inner">
6
+        <h1>ADMIN</h1>
7
+        <h2>Edition du planning</h2>
8
+
9
+
10
+        <select id="daySelect">
11
+            <option value="1">Lundi</option>
12
+            <option value="2">Mardi</option>
13
+            <option value="3">Mercredi</option>
14
+            <option value="4">Jeudi</option>
15
+            <option value="5">Vendredi</option>
16
+            <option value="6">Samedi</option>
17
+            <option value="7">Dimanche</option>
18
+        </select>
19
+
20
+        <br>
21
+        <div class="add-line">
22
+            <i class="fas fa-plus"></i>
23
+        </div>
24
+        <div class="edit-header">
25
+            <div class="planning-start">Début</div>
26
+            <div class="planning-length">Durée</div>
27
+            <div class="planning-name">Nom</div>
28
+            <div class="planning-trash"><i class='fas fa-trash'></i></div>
29
+        </div>
30
+        <table id="activityTable">
31
+        </table>
32
+
33
+        <div class="save">
34
+            <i class="fas fa-save"></i> Enregistrer
35
+        </div>
36
+        <br>
37
+        <div class="buttons-container">
38
+            <a href="../index.php" class="admin-back-button">
39
+                <i class="fas fa-chevron-left"></i>
40
+                Retour sur la page admin
41
+            </a>
42
+            <a href="<?= $relativePath ?>planning.php" class="website-back-button">
43
+                Voir sur le site
44
+            </a>
45
+        </div>
46
+    </div>
47
+
48
+
49
+    <link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
50
+
51
+<?php
52
+$pageContent = ob_get_clean(); // Store html content in variable
53
+$pageTitle = "Édition planning";
54
+
55
+$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/planningManager.js\"></script>";
56
+
57
+include($relativePath . "includes/template.php"); // Display template with variable content
58
+
59
+?>

+ 24
- 0
ajax/admin/gda/ajax.php View File

@@ -0,0 +1,24 @@
1
+<?php
2
+require_once '../../classes/dao.php';
3
+
4
+
5
+if (isset($_GET['function'])) {
6
+    if ($_GET['function'] == "save_scores")
7
+        save_scores();
8
+} else
9
+    show_error();
10
+
11
+function save_scores()
12
+{
13
+    if (isset($_GET['lines']) && isset($_GET['team'])) {
14
+        $dao = new Dao();
15
+        $dao->save_scores($_GET['lines'], $_GET['team']);
16
+        echo "Réussite";
17
+    } else
18
+        show_error();
19
+}
20
+
21
+function show_error() {
22
+    echo "Échec : ";
23
+    var_dump($_GET);
24
+}

+ 61
- 0
ajax/admin/gda/scores.php View File

@@ -0,0 +1,61 @@
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../../";
4
+?>
5
+    <div class="inner">
6
+        <h1>ADMIN</h1>
7
+        <h2>Edition des scores</h2>
8
+        <ul>
9
+            <strong style="color: #ee293d">Quelques règles pour les scores</strong>
10
+            <li>Pas de score total négatif pour une équipe</li>
11
+            <li>A priori les scores supérieurs à 1000 marchent, mais au cas où restez à
12
+                moins de 1000 (comme l'année dernière quoi)</li>
13
+        </ul>
14
+        Si jamais y'a un quelconque problème, envoyez-moi un message.
15
+		<br>
16
+        <br>
17
+
18
+
19
+        <select id="teamSelect">
20
+            <option value="tam">Tamboom</option>
21
+            <option value="pek">Pekstanas</option>
22
+        </select>
23
+
24
+        <div class="add-line">
25
+            <i class="fas fa-plus"></i>
26
+        </div>
27
+        <div class="edit-header">
28
+            <div class="stat-log">Log</div>
29
+            <div class="stat-points">Points</div>
30
+            <div class="stat-trash"><i class='fas fa-trash'></i></div>
31
+        </div>
32
+        <table class="stats-table edit-stats">
33
+        </table>
34
+
35
+        <div class="save">
36
+            <i class="fas fa-save"></i> Enregistrer
37
+        </div>
38
+        <br>
39
+        <div class="buttons-container">
40
+            <a href="../index.php" class="admin-back-button">
41
+                <i class="fas fa-chevron-left"></i>
42
+                Retour sur la page admin
43
+            </a>
44
+            <a href="<?= $relativePath ?>stats.php" class="website-back-button">
45
+                Voir sur le site
46
+            </a>
47
+        </div>
48
+    </div>
49
+
50
+
51
+    <link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
52
+
53
+<?php
54
+$pageContent = ob_get_clean(); // Store html content in variable
55
+$pageTitle = "Édition scores";
56
+
57
+$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/statsManager.js\"></script>";
58
+
59
+include($relativePath . "includes/template.php"); // Display template with variable content
60
+
61
+?>

+ 62
- 0
ajax/admin/index.php View File

@@ -0,0 +1,62 @@
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../";
4
+?>
5
+<div class="inner">
6
+    <h1>ADMIN</h1>
7
+    <h2>Bienvenue sur la page d'administration</h2>
8
+
9
+    <p>
10
+        Sur cette page, tu vas pouvoir animer le site en changeant les scores, le planning ou les informations de la
11
+        carte.
12
+        <br/>
13
+        Attention, tu dois avoir le compte approprié pour pouvoir modifier ces informations.
14
+        <br/>
15
+        Les comptes sont les suivants (le numéro indique le niveau de privilèges) :
16
+    </p>
17
+    <ol>
18
+        <li>
19
+            GDA
20
+        </li>
21
+        <li>
22
+            Admin
23
+        </li>
24
+        <li>
25
+            Webmaster
26
+        </li>
27
+    </ol>
28
+    <p>
29
+        Un compte hérite des privilèges de tous ceux ayant un niveau inférieur.
30
+        <br/>
31
+        Donc ici, Webmaster les possède tous.
32
+    </p>
33
+    <div class="admin-container">
34
+        <h4>
35
+            Action des GDA
36
+        </h4>
37
+        <a href="gda/scores.php">Editer les scores</a>
38
+    </div>
39
+    <div class="admin-container">
40
+        <h4>
41
+            Action des admins
42
+        </h4>
43
+        <a href="admin/planning.php">Editer le planning</a>
44
+    </div>
45
+    <div class="admin-container">
46
+        <h4>
47
+            Action des webmasters
48
+        </h4>
49
+        <a href="webmaster/map.php">Editer le texte de la carte</a>
50
+        <br/>
51
+        <a href="webmaster/update.php">Mises à jour</a>
52
+    </div>
53
+</div>
54
+
55
+<link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
56
+
57
+<?php
58
+$pageContent = ob_get_clean(); // Store html content in variable
59
+$pageTitle = "ADMIN";
60
+
61
+include($relativePath . "includes/template.php"); // Display template with variable content
62
+?>

+ 5
- 0
ajax/admin/webmaster/.htaccess View File

@@ -0,0 +1,5 @@
1
+AuthName "MDP ?"
2
+AuthType Basic
3
+AuthUserFile /home_clubs/accueil_insa/public_html/includes/pass/.htpass_webmaster
4
+require valid-user
5
+

+ 47
- 0
ajax/admin/webmaster/ajax.php View File

@@ -0,0 +1,47 @@
1
+<?php
2
+require_once '../../classes/dao.php';
3
+
4
+$rest_json = file_get_contents("php://input");
5
+$_POST = json_decode($rest_json, true);
6
+//var_dump($_POST);
7
+
8
+if (isset($_GET['function']) || isset($_POST['function'])) {
9
+    if ($_GET['function'] == "save_map_info")
10
+        save_map_info();
11
+    elseif ($_POST['function'] == "update_website")
12
+        update_website();
13
+} else
14
+    show_error();
15
+
16
+function save_map_info() {
17
+    if (isset($_GET['selector']) && isset($_GET['info'])) {
18
+        $dao = new Dao();
19
+        $dao->save_map_info($_GET['selector'], $_GET['info']);
20
+        echo "Réussite";
21
+    } else {
22
+        show_error();
23
+    }
24
+}
25
+
26
+function update_website() {
27
+//    if (isset($_POST['login']) && isset($_POST['password'])) {
28
+//        $login = $_POST['login'];
29
+//        $password = $_POST['password'];
30
+//        echo $login . ":" . $password."\n";
31
+//        // Cannot write because php cannot write as user www-data
32
+//        // be sure to escape characters
33
+//        // Do not remove the space before the command (prevent command from being saved in history)
34
+////            system(" git pull https://".$login.":".$password."@git.srv-falcon.etud.insa-toulouse.fr/vergnet/site-accueil-insa.git");
35
+//    } else {
36
+//        show_error();
37
+//    }
38
+}
39
+
40
+
41
+function show_error() {
42
+    echo "Échec :\n";
43
+    echo "GET\n";
44
+    var_dump($_GET);
45
+    echo "POST\n";
46
+    var_dump($_POST);
47
+}

+ 57
- 0
ajax/admin/webmaster/map.php View File

@@ -0,0 +1,57 @@
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../../";
4
+require_once $relativePath . 'classes/dao.php';
5
+?>
6
+    <div class="inner">
7
+        <h1>ADMIN</h1>
8
+        <h2>Edition de la carte</h2>
9
+
10
+
11
+        <select id="mapSelect">
12
+            <?php setup_map_dropdown() ?>
13
+        </select>
14
+
15
+        <br>
16
+
17
+        <label for="titleInput">Titre</label>
18
+        <input type="text" id="titleInput">
19
+
20
+        <label for="descriptionInput">Description</label>
21
+        <textarea rows="15" id="descriptionInput"></textarea>
22
+
23
+        <div class="save">
24
+            <i class="fas fa-save"></i> Enregistrer
25
+        </div>
26
+        <br>
27
+        <div class="buttons-container">
28
+            <a href="../index.php" class="admin-back-button">
29
+                <i class="fas fa-chevron-left"></i>
30
+                Retour sur la page admin
31
+            </a>
32
+            <a href="<?= $relativePath ?>map.php" class="website-back-button">
33
+                Voir sur le site
34
+            </a>
35
+        </div>
36
+    </div>
37
+
38
+
39
+    <link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
40
+
41
+<?php
42
+$pageContent = ob_get_clean(); // Store html content in variable
43
+$pageTitle = "Édition carte";
44
+
45
+$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/mapManager.js\"></script>";
46
+
47
+include($relativePath . "includes/template.php"); // Display template with variable content
48
+
49
+function setup_map_dropdown()
50
+{
51
+    $dao = new Dao();
52
+    foreach ($dao->get_map_selectors() as $row) {
53
+        echo "<option value='" . $row['selector'] . "'>" . $row['selector'] . "</option>";
54
+    }
55
+}
56
+
57
+?>

+ 57
- 0
ajax/admin/webmaster/update.php View File

@@ -0,0 +1,57 @@
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../../";
4
+require_once $relativePath . 'classes/dao.php';
5
+
6
+$log = shell_exec("git log | head -50"); // Show the first few commits
7
+
8
+?>
9
+<div class="inner">
10
+    <h1>ADMIN</h1>
11
+    <h2>Mise a jour du site</h2>
12
+
13
+<!--        <label for="usernameInput">Login</label>-->
14
+<!--        <input type="text" id="usernameInput">-->
15
+<!---->
16
+<!--        <label for="passwordInput">Password</label>-->
17
+<!--        <input type="password" id="passwordInput">-->
18
+<!---->
19
+<!--        <div class="save">-->
20
+<!--            <i class="fas fa-save"></i> Mettre à Jour-->
21
+<!--        </div>-->
22
+
23
+    <div id="gitButton">
24
+        <a href="https://git.srv-falcon.etud.insa-toulouse.fr/vergnet/site-accueil-insa" target="_blank">
25
+            Voir sur Gitea
26
+        </a>
27
+    </div>
28
+    <h3>Log</h3>
29
+    <p>
30
+        <?php
31
+        echo nl2br($log)
32
+        ?>
33
+    </p>
34
+
35
+    <div class="buttons-container">
36
+        <a href="../index.php" class="admin-back-button">
37
+            <i class="fas fa-chevron-left"></i>
38
+            Retour sur la page admin
39
+        </a>
40
+        <a href="<?= $relativePath ?>index.php" class="website-back-button">
41
+            Voir sur le site
42
+        </a>
43
+    </div>
44
+</div>
45
+
46
+
47
+<link rel="stylesheet" type="text/css" media="screen" href="<?= $relativePath ?>assets/css/adminEdit.css"/>
48
+
49
+<?php
50
+$pageContent = ob_get_clean(); // Store html content in variable
51
+$pageTitle = "Mise à jour";
52
+
53
+$pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/updateManager.js\"></script>";
54
+
55
+include($relativePath . "includes/template.php"); // Display template with variable content
56
+
57
+?>

+ 51
- 51
ajax/read/index.php View File

@@ -1,51 +1,51 @@
1
-<?php
2
-require_once '../../classes/dao.php';
3
-
4
-
5
-if (isset($_GET['function'])) {
6
-    if ($_GET['function'] == "get_scores")
7
-        get_scores();
8
-    elseif ($_GET['function'] == "get_map_info")
9
-        get_map_info();
10
-    elseif ($_GET['function'] == "get_activities_of_day")
11
-        get_activities_of_day();
12
-} else
13
-    show_error();
14
-
15
-function get_scores() {
16
-    if (isset($_GET['team'])) {
17
-        header('Content-Type: application/json');
18
-        $dao = new Dao();
19
-        echo json_encode($dao->get_score_team($_GET['team']));
20
-    } else {
21
-        show_error();
22
-    }
23
-}
24
-
25
-function get_map_info() {
26
-    if (isset($_GET['selector'])) {
27
-        header('Content-Type: application/json');
28
-        $dao = new Dao();
29
-        echo json_encode($dao->get_map_info($_GET['selector']));
30
-    } else {
31
-        show_error();
32
-    }
33
-}
34
-
35
-
36
-function get_activities_of_day() {
37
-    if (isset($_GET['day'])) {
38
-        header('Content-Type: application/json');
39
-        $dao = new Dao();
40
-        echo json_encode($dao->get_activities_of_day($_GET['day']));
41
-    } else {
42
-        show_error();
43
-    }
44
-}
45
-
46
-
47
-
48
-function show_error() {
49
-    echo "Échec : ";
50
-    var_dump($_GET);
51
-}
1
+<?php
2
+require_once '../../classes/dao.php';
3
+
4
+
5
+if (isset($_GET['function'])) {
6
+    if ($_GET['function'] == "get_scores")
7
+        get_scores();
8
+    elseif ($_GET['function'] == "get_map_info")
9
+        get_map_info();
10
+    elseif ($_GET['function'] == "get_activities_of_day")
11
+        get_activities_of_day();
12
+} else
13
+    show_error();
14
+
15
+function get_scores() {
16
+    if (isset($_GET['team'])) {
17
+        header('Content-Type: application/json');
18
+        $dao = new Dao();
19
+        echo json_encode($dao->get_score_team($_GET['team']));
20
+    } else {
21
+        show_error();
22
+    }
23
+}
24
+
25
+function get_map_info() {
26
+    if (isset($_GET['selector'])) {
27
+        header('Content-Type: application/json');
28
+        $dao = new Dao();
29
+        echo json_encode($dao->get_map_info($_GET['selector']));
30
+    } else {
31
+        show_error();
32
+    }
33
+}
34
+
35
+
36
+function get_activities_of_day() {
37
+    if (isset($_GET['day'])) {
38
+        header('Content-Type: application/json');
39
+        $dao = new Dao();
40
+        echo json_encode($dao->get_activities_of_day($_GET['day']));
41
+    } else {
42
+        show_error();
43
+    }
44
+}
45
+
46
+
47
+
48
+function show_error() {
49
+    echo "Échec : ";
50
+    var_dump($_GET);
51
+}

+ 16
- 0
ajax/write/.htaccess View File

@@ -0,0 +1,16 @@
1
+AuthName "MDP ?"
2
+AuthType Basic
3
+AuthUserFile /home_clubs/accueil_insa/public_html/includes/pass/.htpass_scores
4
+require valid-user
5
+<Files "planning.php">
6
+	AuthName "MDP ?"
7
+	AuthType Basic
8
+	AuthUserFile /home_clubs/accueil_insa/public_html/includes/pass/.htpass_planning
9
+	require valid-user
10
+</Files>
11
+<Files "master.php">
12
+	AuthName "MDP ?"
13
+	AuthType Basic
14
+	AuthUserFile /home_clubs/accueil_insa/public_html/includes/pass/.htpass_master
15
+	require valid-user
16
+</Files>

BIN
assets/.DS_Store View File


+ 222
- 222
assets/css/adminEdit.css View File

@@ -1,222 +1,222 @@
1
-.admin-container {
2
-    border: 1px solid #5a5a5a;
3
-    margin-bottom: 20px;
4
-}
5
-
6
-
7
-.edit-header .stat-log {
8
-    width: 70%;
9
-}
10
-
11
-.stat-points {
12
-    width: 20%;
13
-}
14
-
15
-.edit-header .stat-points {
16
-    width: 20%;
17
-}
18
-
19
-.edit-button-container {
20
-    border: none;
21
-    margin: 10px;
22
-}
23
-
24
-.edit-header {
25
-    display: flex;
26
-    text-align: center;
27
-    background-color: #61605e;
28
-    color: #fefefe;
29
-    font-weight: bold;
30
-}
31
-
32
-.edit-header .stat-trash {
33
-    margin: auto;
34
-}
35
-
36
-.edit-text {
37
-    width: 70%;
38
-}
39
-
40
-.edit-points{
41
-    width: 20%;
42
-}
43
-
44
-
45
-.buttons-container {
46
-    display: inline-flex;
47
-}
48
-
49
-.admin-back-button {
50
-    width: auto;
51
-    background: #fafafa;
52
-    color: #000;
53
-    border-radius: 5px;
54
-    padding: 15px;
55
-    margin: 5px;
56
-    box-shadow: 0 0 5px #000000;
57
-}
58
-
59
-.admin-back-button:hover {
60
-    color: #fafafa;
61
-    background: #1a1a1a;
62
-}
63
-
64
-.website-back-button {
65
-    width: auto;
66
-    background: #fafafa;
67
-    color: #000;
68
-    border-radius: 5px;
69
-    padding: 15px;
70
-    margin: 5px;
71
-    box-shadow: 0 0 5px #000000;
72
-}
73
-
74
-.website-back-button:hover {
75
-    color: #fafafa;
76
-    background: #1a1a1a;
77
-}
78
-
79
-
80
-.edit-stats {
81
-    width: 100%;
82
-}
83
-
84
-input, textarea {
85
-    text-align: center;
86
-    background: #484848;
87
-    color: #fafafa;
88
-    width: 100%;
89
-    border: none;
90
-    font-family: inherit;
91
-    font-size: inherit;
92
-}
93
-
94
-.remove-line {
95
-    color: #ff1200;
96
-    cursor: pointer;
97
-    transition: 0.3s;
98
-}
99
-
100
-.remove-line svg {
101
-    pointer-events: none;
102
-}
103
-
104
-.remove-line:hover {
105
-    color: #ff5e00;
106
-    text-shadow: 0 0 5px #ff4000;
107
-}
108
-
109
-.add-line{
110
-    font-size: 30px;
111
-    background: #ab1d00;
112
-    color: #fafafa;
113
-    cursor: pointer;
114
-    transition: 0.3s;
115
-    width: 100%;
116
-    border-radius: 5px;
117
-    margin: 30px 0 20px 0;
118
-}
119
-
120
-#addLine_gli {
121
-    background: #ff5f5f;
122
-}
123
-
124
-#addLine_pek {
125
-    background: #7ffd78;
126
-}
127
-
128
-#addLine_boo {
129
-    background: #fafd78;
130
-}
131
-
132
-#addLine_ver {
133
-    background: #60bdff;
134
-}
135
-
136
-
137
-#editHeader_gli {
138
-    background: #9c1a00;
139
-}
140
-
141
-#editHeader_pek {
142
-    background: #138a14;
143
-}
144
-
145
-#editHeader_boo {
146
-    background: #6b5300;
147
-}
148
-
149
-#editHeader_ver {
150
-    background: #264565;
151
-}
152
-
153
-
154
-.save {
155
-    background: #21aa08;
156
-    font-size: 30px;
157
-    color: #fafafa;
158
-    cursor: pointer;
159
-    transition: 0.3s;
160
-    margin: 40px 0 0 0;
161
-    width: 100%;
162
-    border-radius: 5px;
163
-}
164
-
165
-.save:hover {
166
-    background: #2ce20b;
167
-    box-shadow: 0 0 5px #2ce20b;
168
-}
169
-
170
-#activityTable {
171
-    width: 100%;
172
-}
173
-
174
-#activityTable tr {
175
-    transition: 0.2s;
176
-}
177
-
178
-#activityTable tr:hover {
179
-    cursor: pointer;
180
-    background-color: #62010e;
181
-}
182
-
183
-
184
-.planning-start {
185
-    width: 10%;
186
-}
187
-.planning-length {
188
-    width: 10%;
189
-}
190
-.planning-name {
191
-    width: 70%;
192
-}
193
-.planning-trash {
194
-    width: 10%;
195
-}
196
-
197
-#noUpdateNeeded {
198
-    font-size: 2rem;
199
-    color: #2ce20b;
200
-}
201
-
202
-#UpdateNeeded {
203
-    font-size: 2rem;
204
-    color: #c53422;
205
-}
206
-
207
-#gitButton {
208
-    font-size: 1.5rem;
209
-    display: flex;
210
-    margin: 20px;
211
-}
212
-
213
-
214
-#gitButton a {
215
-    padding: 10px;
216
-    background-color: white;
217
-    color: #052700;
218
-    margin: auto;
219
-    width: 200px;
220
-    cursor: pointer;
221
-    border-radius: 0.5rem;
222
-}
1
+.admin-container {
2
+    border: 1px solid #5a5a5a;
3
+    margin-bottom: 20px;
4
+}
5
+
6
+
7
+.edit-header .stat-log {
8
+    width: 70%;
9
+}
10
+
11
+.stat-points {
12
+    width: 20%;
13
+}
14
+
15
+.edit-header .stat-points {
16
+    width: 20%;
17
+}
18
+
19
+.edit-button-container {
20
+    border: none;
21
+    margin: 10px;
22
+}
23
+
24
+.edit-header {
25
+    display: flex;
26
+    text-align: center;
27
+    background-color: #61605e;
28
+    color: #fefefe;
29
+    font-weight: bold;
30
+}
31
+
32
+.edit-header .stat-trash {
33
+    margin: auto;
34
+}
35
+
36
+.edit-text {
37
+    width: 70%;
38
+}
39
+
40
+.edit-points{
41
+    width: 20%;
42
+}
43
+
44
+
45
+.buttons-container {
46
+    display: inline-flex;
47
+}
48
+
49
+.admin-back-button {
50
+    width: auto;
51
+    background: #fafafa;
52
+    color: #000;
53
+    border-radius: 5px;
54
+    padding: 15px;
55
+    margin: 5px;
56
+    box-shadow: 0 0 5px #000000;
57
+}
58
+
59
+.admin-back-button:hover {
60
+    color: #fafafa;
61
+    background: #1a1a1a;
62
+}
63
+
64
+.website-back-button {
65
+    width: auto;
66
+    background: #fafafa;
67
+    color: #000;
68
+    border-radius: 5px;
69
+    padding: 15px;
70
+    margin: 5px;
71
+    box-shadow: 0 0 5px #000000;
72
+}
73
+
74
+.website-back-button:hover {
75
+    color: #fafafa;
76
+    background: #1a1a1a;
77
+}
78
+
79
+
80
+.edit-stats {
81
+    width: 100%;
82
+}
83
+
84
+input, textarea {
85
+    text-align: center;
86
+    background: #484848;
87
+    color: #fafafa;
88
+    width: 100%;
89
+    border: none;
90
+    font-family: inherit;
91
+    font-size: inherit;
92
+}
93
+
94
+.remove-line {
95
+    color: #ff1200;
96
+    cursor: pointer;
97
+    transition: 0.3s;
98
+}
99
+
100
+.remove-line svg {
101
+    pointer-events: none;
102
+}
103
+
104
+.remove-line:hover {
105
+    color: #ff5e00;
106
+    text-shadow: 0 0 5px #ff4000;
107
+}
108
+
109
+.add-line{
110
+    font-size: 30px;
111
+    background: #ab1d00;
112
+    color: #fafafa;
113
+    cursor: pointer;
114
+    transition: 0.3s;
115
+    width: 100%;
116
+    border-radius: 5px;
117
+    margin: 30px 0 20px 0;
118
+}
119
+
120
+#addLine_gli {
121
+    background: #ff5f5f;
122
+}
123
+
124
+#addLine_pek {
125
+    background: #7ffd78;
126
+}
127
+
128
+#addLine_boo {
129
+    background: #fafd78;
130
+}
131
+
132
+#addLine_ver {
133
+    background: #60bdff;
134
+}
135
+
136
+
137
+#editHeader_gli {
138
+    background: #9c1a00;
139
+}
140
+
141
+#editHeader_pek {
142
+    background: #138a14;
143
+}
144
+
145
+#editHeader_boo {
146
+    background: #6b5300;
147
+}
148
+
149
+#editHeader_ver {
150
+    background: #264565;
151
+}
152
+
153
+
154
+.save {
155
+    background: #21aa08;
156
+    font-size: 30px;
157
+    color: #fafafa;
158
+    cursor: pointer;
159
+    transition: 0.3s;
160
+    margin: 40px 0 0 0;
161
+    width: 100%;
162
+    border-radius: 5px;
163
+}
164
+
165
+.save:hover {
166
+    background: #2ce20b;
167
+    box-shadow: 0 0 5px #2ce20b;
168
+}
169
+
170
+#activityTable {
171
+    width: 100%;
172
+}
173
+
174
+#activityTable tr {
175
+    transition: 0.2s;
176
+}
177
+
178
+#activityTable tr:hover {
179
+    cursor: pointer;
180
+    background-color: #62010e;
181
+}
182
+
183
+
184
+.planning-start {
185
+    width: 10%;
186
+}
187
+.planning-length {
188
+    width: 10%;
189
+}
190
+.planning-name {
191
+    width: 70%;
192
+}
193
+.planning-trash {
194
+    width: 10%;
195
+}
196
+
197
+#noUpdateNeeded {
198
+    font-size: 2rem;
199
+    color: #2ce20b;
200
+}
201
+
202
+#UpdateNeeded {
203
+    font-size: 2rem;
204
+    color: #c53422;
205
+}
206
+
207
+#gitButton {
208
+    font-size: 1.5rem;
209
+    display: flex;
210
+    margin: 20px;
211
+}
212
+
213
+
214
+#gitButton a {
215
+    padding: 10px;
216
+    background-color: white;
217
+    color: #052700;
218
+    margin: auto;
219
+    width: 200px;
220
+    cursor: pointer;
221
+    border-radius: 0.5rem;
222
+}

+ 97
- 97
assets/css/baguette.css View File

@@ -1,97 +1,97 @@
1
-#baguette {
2
-    display: inline-block;
3
-    position: relative;
4
-    cursor: pointer;
5
-    font-size: 32px;
6
-    margin: 5px;
7
-    height: 40px;
8
-    width: 40px;
9
-    pointer-events: auto;
10
-}
11
-
12
-
13
-#shaft, #star1, #star2, #star3, #star4 {
14
-    position: absolute;
15
-    width: 100%;
16
-    height: 5px;
17
-    background-color: #fff;
18
-    margin: 5px 0;
19
-    transition: 0.3s;
20
-}
21
-
22
-#shaft {
23
-    margin: 0;
24
-    top: 50%;
25
-    transform: translateY(-50%);
26
-}
27
-
28
-#star1, #star2 {
29
-    width: 20px;
30
-    top: 0;
31
-}
32
-
33
-#star3, #star4 {
34
-    width: 20px;
35
-    bottom: 0;
36
-}
37
-
38
-#star1, #star3 {
39
-    left: 0;
40
-}
41
-
42
-#star2, #star4 {
43
-    right: 0;
44
-}
45
-
46
-
47
-/* Mouse hovers the baguette */
48
-
49
-.change-hover #shaft {
50
-    background-color: #e9b82f;
51
-    transform: translateY(1px) rotate(-45deg);
52
-    height:5px;
53
-
54
-}
55
-
56
-.change-hover #star1, .change-hover #star2, .change-hover #star3, .change-hover #star4 {
57
-    width: 5px;
58
-    border-radius: 100%;
59
-}
60
-
61
-.change-hover #star1 {
62
-    background-color: #ff5f5f;
63
-    transform: translate(19px,-2px);
64
-
65
-}
66
-
67
-.change-hover #star2 {
68
-    background-color: #7ffd78;
69
-    transform: translate(-3px, -6px);
70
-}
71
-
72
-.change-hover #star3 {
73
-    background-color: #fafd78;
74
-    transform: translate(36px, -10px);
75
-}
76
-
77
-.change-hover #star4 {
78
-    background-color: #60bdff;
79
-    transform: translate(5px, -22px);
80
-}
81
-
82
-/* Mouse clics the baguette */
83
-
84
-.change-clic #shaft {
85
-    transform: translateY(-50%) rotate(-135deg);
86
-    background-color: #b0120b;
87
-}
88
-
89
-.change-clic #star1, .change-clic #star2, .change-clic #star3, .change-clic #star4 {
90
-    left: 0;
91
-    width: 100%;
92
-    border-radius: 0;
93
-    margin: 0;
94
-    top: 50%;
95
-    transform: translateY(-50%) rotate(-45deg);
96
-    background-color: #b0120b;
97
-}
1
+#baguette {
2
+    display: inline-block;
3
+    position: relative;
4
+    cursor: pointer;
5
+    font-size: 32px;
6
+    margin: 5px;
7
+    height: 40px;
8
+    width: 40px;
9
+    pointer-events: auto;
10
+}
11
+
12
+
13
+#shaft, #star1, #star2, #star3, #star4 {
14
+    position: absolute;
15
+    width: 100%;
16
+    height: 5px;
17
+    background-color: #fff;
18
+    margin: 5px 0;
19
+    transition: 0.3s;
20
+}
21
+
22
+#shaft {
23
+    margin: 0;
24
+    top: 50%;
25
+    transform: translateY(-50%);
26
+}
27
+
28
+#star1, #star2 {
29
+    width: 20px;
30
+    top: 0;
31
+}
32
+
33
+#star3, #star4 {
34
+    width: 20px;
35
+    bottom: 0;
36
+}
37
+
38
+#star1, #star3 {
39
+    left: 0;
40
+}
41
+
42
+#star2, #star4 {
43
+    right: 0;
44
+}
45
+
46
+
47
+/* Mouse hovers the baguette */
48
+
49
+.change-hover #shaft {
50
+    background-color: #e9b82f;
51
+    transform: translateY(1px) rotate(-45deg);
52
+    height:5px;
53
+
54
+}
55
+
56
+.change-hover #star1, .change-hover #star2, .change-hover #star3, .change-hover #star4 {
57
+    width: 5px;
58
+    border-radius: 100%;
59
+}
60
+
61
+.change-hover #star1 {
62
+    background-color: #ff5f5f;
63
+    transform: translate(19px,-2px);
64
+
65
+}
66
+
67
+.change-hover #star2 {
68
+    background-color: #7ffd78;
69
+    transform: translate(-3px, -6px);
70
+}
71
+
72
+.change-hover #star3 {
73
+    background-color: #fafd78;
74
+    transform: translate(36px, -10px);
75
+}
76
+
77
+.change-hover #star4 {
78
+    background-color: #60bdff;
79
+    transform: translate(5px, -22px);
80
+}
81
+
82
+/* Mouse clics the baguette */
83
+
84
+.change-clic #shaft {
85
+    transform: translateY(-50%) rotate(-135deg);
86
+    background-color: #b0120b;
87
+}
88
+
89
+.change-clic #star1, .change-clic #star2, .change-clic #star3, .change-clic #star4 {
90
+    left: 0;
91
+    width: 100%;
92
+    border-radius: 0;
93
+    margin: 0;
94
+    top: 50%;
95
+    transform: translateY(-50%) rotate(-45deg);
96
+    background-color: #b0120b;
97
+}

+ 81
- 81
assets/css/enigma.css View File

@@ -1,81 +1,81 @@
1
-
2
-body {
3
-    color: #1a1a1a;
4
-}
5
-
6
-.inner {
7
-    background-color: rgba(28, 28, 28, 0.2);
8
-    box-shadow: 0 0 50px #1c1c1c;
9
-
10
-}
11
-
12
-#poemeRimbaud, #citationGary{
13
-    font-family: manuscrit, cursive;
14
-    font-size: 3rem;
15
-}
16
-
17
-
18
-#finNormalEnigme{
19
-    font-size: 1.1rem;
20
-    text-align: right;
21
-    margin-right: 20px;
22
-    font-style: italic;
23
-}
24
-
25
-#petiteFinCitationGary{
26
-    text-align: right;
27
-    font-size: 0.8rem;
28
-    margin-right: 20px;
29
-}
30
-
31
-#codeAda{
32
-    font-family:'Cutive Mono', monospace;
33
-    font-size: 1.8rem;
34
-    text-align: left;
35
-}
36
-
37
-#pekHint {
38
-    text-align: center;
39
-}
40
-
41
-#creditBg{
42
-    text-align: right;
43
-    font-size: 10px;
44
-    margin-right: 8px;
45
-}
46
-
47
-#hideb {
48
-    color: #C3A67A;
49
-}
50
-
51
-@media screen and (max-width: 768px) {
52
-    #poemeRimbaud, #citationGary{
53
-        font-family: manuscrit, cursive;
54
-        font-size: 2rem;
55
-    }
56
-
57
-    #codeAda{
58
-        font-size: 1.5rem;
59
-    }
60
-}
61
-
62
-@media screen and (max-width: 576px) {
63
-    #poemeRimbaud, #citationGary{
64
-        font-family: manuscrit, cursive;
65
-        font-size: 1.3rem;
66
-    }
67
-
68
-    #codeAda{
69
-        font-size: 1.2rem;
70
-    }
71
-
72
-    #finNormalEnigme{
73
-        font-size: 0.9rem;
74
-    }
75
-
76
-    #petiteFinCitationGary{
77
-        text-align: right;
78
-        font-size: 0.6rem;
79
-        margin-right: 20px;
80
-    }
81
-}
1
+
2
+body {
3
+    color: #1a1a1a;
4
+}
5
+
6
+.inner {
7
+    background-color: rgba(28, 28, 28, 0.2);
8
+    box-shadow: 0 0 50px #1c1c1c;
9
+
10
+}
11
+
12
+#poemeRimbaud, #citationGary{
13
+    font-family: manuscrit, cursive;
14
+    font-size: 3rem;
15
+}
16
+
17
+
18
+#finNormalEnigme{
19
+    font-size: 1.1rem;
20
+    text-align: right;
21
+    margin-right: 20px;
22
+    font-style: italic;
23
+}
24
+
25
+#petiteFinCitationGary{
26
+    text-align: right;
27
+    font-size: 0.8rem;
28
+    margin-right: 20px;
29
+}
30
+
31
+#codeAda{
32
+    font-family:'Cutive Mono', monospace;
33
+    font-size: 1.8rem;
34
+    text-align: left;
35
+}
36
+
37
+#pekHint {
38
+    text-align: center;
39
+}
40
+
41
+#creditBg{
42
+    text-align: right;
43
+    font-size: 10px;
44
+    margin-right: 8px;
45
+}
46
+
47
+#hideb {
48
+    color: #C3A67A;
49
+}
50
+
51
+@media screen and (max-width: 768px) {
52
+    #poemeRimbaud, #citationGary{
53
+        font-family: manuscrit, cursive;
54
+        font-size: 2rem;
55
+    }
56
+
57
+    #codeAda{
58
+        font-size: 1.5rem;
59
+    }
60
+}
61
+
62
+@media screen and (max-width: 576px) {
63
+    #poemeRimbaud, #citationGary{
64
+        font-family: manuscrit, cursive;
65
+        font-size: 1.3rem;
66
+    }
67
+
68
+    #codeAda{
69
+        font-size: 1.2rem;
70
+    }
71
+
72
+    #finNormalEnigme{
73
+        font-size: 0.9rem;
74
+    }
75
+
76
+    #petiteFinCitationGary{
77
+        text-align: right;
78
+        font-size: 0.6rem;
79
+        margin-right: 20px;
80
+    }
81
+}

+ 297
- 297
assets/css/photos.css View File

@@ -1,297 +1,297 @@
1
-#photoContainer {
2
-    margin: 0 5%;
3
-}
4
-
5
-.photos-folder-container {
6
-    width: 100%;
7
-    border: 1px solid #5a5a5a;
8
-    border-radius: 5px;
9
-}
10
-
11
-.photos-folder-container a:hover, .photos-path a:hover, #downloadAlbum:hover {
12
-    box-shadow: 0 0 10px #000;
13
-    background-color: #635247;
14
-}
15
-
16
-.photos-folder-container a {
17
-    text-decoration: none;
18
-    border-radius: 5px;
19
-    width: 200px;
20
-    height: 120px;
21
-    padding: 10px;
22
-    margin: 5px;
23
-    position: relative;
24
-    display: inline-flex;
25
-    align-items: center;
26
-    justify-content: center;
27
-    background-color: #1a1a1a;
28
-    box-shadow: 0 0 4px #000;
29
-    transition: 0.3s;
30
-}
31
-
32
-#folderTitle {
33
-    position: absolute;
34
-    top: 10px;
35
-    color: #73b795;
36
-    font-size: 25px;
37
-    text-shadow: 0 0 5px #1c1c1c;
38
-}
39
-
40
-#folderPhotos, #folderAlbums {
41
-    color: #808080;
42
-    font-size: 18px;
43
-    text-shadow: 0 0 5px #1c1c1c;
44
-}
45
-
46
-#folderPhotos {
47
-    position: absolute;
48
-    bottom: 30px;
49
-}
50
-
51
-#folderAlbums {
52
-    position: absolute;
53
-    bottom: 0;
54
-}
55
-
56
-.photos img {
57
-    display: inline-flex;
58
-    width: 200px;
59
-    opacity: 1;
60
-    cursor: pointer;
61
-    transition: 0.3s;
62
-    padding: 0;
63
-    margin: 10px 2px 0 2px;
64
-    border-radius: 0.5rem;
65
-}
66
-
67
-.photos img:hover {
68
-    box-shadow: 0 0 5px #000;
69
-    -webkit-filter: blur(1px); /* Safari 6.0 - 9.0 */
70
-    filter: blur(1px);
71
-    opacity: 0.5;
72
-    border-radius: 1rem;
73
-}
74
-
75
-.photos img:active {
76
-    box-shadow: 0 0 10px #000;
77
-}
78
-
79
-.photos-path {
80
-    width: 100%;
81
-    display: flex;
82
-    list-style: none;
83
-    padding: 0;
84
-    line-height: 15px;
85
-}
86
-
87
-.photos-path a {
88
-    font-size: 15px;
89
-    text-decoration: none;
90
-    border-radius: 2px;
91
-    padding: 5px;
92
-    margin: 5px;
93
-    display: inline-flex;
94
-    align-items: center;
95
-    justify-content: center;
96
-    background-color: #1a1a1a;
97
-    box-shadow: 0 0 4px #000;
98
-    text-shadow: 0 0 5px #1c1c1c;
99
-    transition: 0.3s;
100
-    color: #e0e0e0;
101
-}
102
-
103
-#imgBig {
104
-    margin: 0;
105
-    padding: 0;
106
-    position: fixed;
107
-    z-index: 6;
108
-    left: 50%;
109
-    top: 50%;
110
-    max-width: none;
111
-    max-height: none;
112
-    transform: translate(-50%, -50%);
113
-    box-shadow: 0 0 5px #000;
114
-}
115
-
116
-#photoButtonsContainer {
117
-    position: fixed;
118
-    display: block;
119
-    z-index: 10;
120
-    /* Block selection of buttons (useful for mobile devices) */
121
-    -webkit-user-select: none; /* Chrome all / Safari all */
122
-    -moz-user-select: none; /* Firefox all */
123
-    -ms-user-select: none; /* IE 10+ */
124
-}
125
-
126
-#rightButton, #leftButton {
127
-    transition: 0.2s;
128
-    position: fixed;
129
-    top: 0;
130
-    width: 10%;
131
-    background-color: rgba(255, 255, 255, 0.05);
132
-    height: 100%;
133
-    display: flex;
134
-    font-size: 5rem;
135
-    cursor: pointer;
136
-}
137
-
138
-#rightButton {
139
-    right: 0;
140
-}
141
-
142
-#leftButton {
143
-    left: 0;
144
-}
145
-
146
-#closeButton, #downloadButton {
147
-    transition: 0.2s;
148
-    position: fixed;
149
-    color: white;
150
-    display: flex;
151
-    font-size: 3rem;
152
-    top: 0;
153
-    width: 80px;
154
-    height: 80px;
155
-    background-color: rgba(255, 255, 255, 0.05);
156
-    cursor: pointer;
157
-}
158
-
159
-#closeButton {
160
-    right: 10%;
161
-}
162
-
163
-#downloadButton {
164
-    right: calc(10% + 80px);
165
-}
166
-
167
-#rightButton:hover, #leftButton:hover, #closeButton:hover, #downloadButton:hover {
168
-    background-color: rgba(255, 255, 255, 0.2);
169
-}
170
-
171
-#rightButton i, #leftButton i, #closeButton i, #downloadButton i {
172
-    margin: auto;
173
-}
174
-
175
-#rightButton:active, #leftButton:active, #closeButton:active, #downloadButton:active {
176
-    background-color: rgba(255, 255, 255, 0.4);
177
-}
178
-
179
-
180
-#loadingIconContainer {
181
-    color: white;
182
-    width: 100%;
183
-    height: 100%;
184
-    z-index: 8;
185
-    position: fixed;
186
-    display: flex;
187
-    font-size: 5rem;
188
-}
189
-
190
-#loadingIconContainer i {
191
-    margin: auto;
192
-}
193
-
194
-
195
-#closeBack {
196
-    position: fixed;
197
-    width: 100%;
198
-    height: 100%;
199
-    background-color: #1c1c1c;
200
-}
201
-
202
-#photoOverlay {
203
-    top: 0;
204
-    left: 0;
205
-    position: fixed;
206
-    width: 100%;
207
-    height: 100%;
208
-    z-index: 5;
209
-}
210
-
211
-#downloadAlbum {
212
-    height: 70px;
213
-    width: 200px;
214
-    display: inline-flex;
215
-    position: relative;
216
-    align-items: center;
217
-    justify-content: center;
218
-    background-color: #1a1a1a;
219
-    box-shadow: 0 0 4px #000;
220
-    text-shadow: 0 0 5px #1c1c1c;
221
-    transition: 0.3s;
222
-    color: #28ca2a;
223
-    cursor: pointer;
224
-    margin: 5px;
225
-}
226
-
227
-#downloadText {
228
-    margin-top: 5px;
229
-    position: absolute;
230
-    top: 0;
231
-}
232
-
233
-#albumPhotoCount {
234
-    color: #929ba8;
235
-    margin-bottom: 5px;
236
-    position: absolute;
237
-    bottom: 0;
238
-}
239
-
240
-#downloadText svg {
241
-    width: 24px;
242
-    height: 24px;
243
-    margin-right: 5px;
244
-}
245
-
246
-
247
-@media screen and (max-width: 768px) {
248
-    #rightButton, #leftButton {
249
-        width: 80px;
250
-        font-size: 3rem;
251
-    }
252
-
253
-    #closeButton {
254
-        right: 50%;
255
-        transform: translateX(100%);
256
-    }
257
-
258
-    #downloadButton {
259
-        right: 50%;
260
-    }
261
-
262
-
263
-}
264
-
265
-@media screen and (max-width: 576px) {
266
-    .photos-folder-container a {
267
-        min-width: 100px;
268
-        height: 70px;
269
-    }
270
-    #folderTitle {
271
-        position: absolute;
272
-        top: 5px;
273
-        color: #73b795;
274
-        font-size: 15px;
275
-        text-shadow: 0 0 5px #1c1c1c;
276
-    }
277
-
278
-    #folderPhotos, #folderAlbums {
279
-        color: #808080;
280
-        font-size: 10px;
281
-    }
282
-
283
-    #folderPhotos {
284
-        position: absolute;
285
-        bottom: 20px;
286
-    }
287
-
288
-    #folderAlbums {
289
-        position: absolute;
290
-        bottom: 0;
291
-    }
292
-
293
-    .photos img {
294
-        width: 140px;
295
-    }
296
-
297
-}
1
+#photoContainer {
2
+    margin: 0 5%;
3
+}
4
+
5
+.photos-folder-container {
6
+    width: 100%;
7
+    border: 1px solid #5a5a5a;
8
+    border-radius: 5px;
9
+}
10
+
11
+.photos-folder-container a:hover, .photos-path a:hover, #downloadAlbum:hover {
12
+    box-shadow: 0 0 10px #000;
13
+    background-color: #635247;
14
+}
15
+
16
+.photos-folder-container a {
17
+    text-decoration: none;
18
+    border-radius: 5px;
19
+    width: 200px;
20
+    height: 120px;
21
+    padding: 10px;
22
+    margin: 5px;
23
+    position: relative;
24
+    display: inline-flex;
25
+    align-items: center;
26
+    justify-content: center;
27
+    background-color: #1a1a1a;
28
+    box-shadow: 0 0 4px #000;
29
+    transition: 0.3s;
30
+}
31
+
32
+#folderTitle {
33
+    position: absolute;
34
+    top: 10px;
35
+    color: #73b795;
36
+    font-size: 25px;
37
+    text-shadow: 0 0 5px #1c1c1c;
38
+}
39
+
40
+#folderPhotos, #folderAlbums {
41
+    color: #808080;
42
+    font-size: 18px;
43
+    text-shadow: 0 0 5px #1c1c1c;
44
+}
45
+
46
+#folderPhotos {
47
+    position: absolute;
48
+    bottom: 30px;
49
+}
50
+
51
+#folderAlbums {
52
+    position: absolute;
53
+    bottom: 0;
54
+}
55
+
56
+.photos img {
57
+    display: inline-flex;
58
+    width: 200px;
59
+    opacity: 1;
60
+    cursor: pointer;
61
+    transition: 0.3s;
62
+    padding: 0;
63
+    margin: 10px 2px 0 2px;
64
+    border-radius: 0.5rem;
65
+}
66
+
67
+.photos img:hover {
68
+    box-shadow: 0 0 5px #000;
69
+    -webkit-filter: blur(1px); /* Safari 6.0 - 9.0 */
70
+    filter: blur(1px);
71
+    opacity: 0.5;
72
+    border-radius: 1rem;
73
+}
74
+
75
+.photos img:active {
76
+    box-shadow: 0 0 10px #000;
77
+}
78
+
79
+.photos-path {
80
+    width: 100%;
81
+    display: flex;
82
+    list-style: none;
83
+    padding: 0;
84
+    line-height: 15px;
85
+}
86
+
87
+.photos-path a {
88
+    font-size: 15px;
89
+    text-decoration: none;
90
+    border-radius: 2px;
91
+    padding: 5px;
92
+    margin: 5px;
93
+    display: inline-flex;
94
+    align-items: center;
95
+    justify-content: center;
96
+    background-color: #1a1a1a;
97
+    box-shadow: 0 0 4px #000;
98
+    text-shadow: 0 0 5px #1c1c1c;
99
+    transition: 0.3s;
100
+    color: #e0e0e0;
101
+}
102
+
103
+#imgBig {
104
+    margin: 0;
105
+    padding: 0;
106
+    position: fixed;
107
+    z-index: 6;
108
+    left: 50%;
109
+    top: 50%;
110
+    max-width: none;
111
+    max-height: none;
112
+    transform: translate(-50%, -50%);
113
+    box-shadow: 0 0 5px #000;
114
+}
115
+
116
+#photoButtonsContainer {
117
+    position: fixed;
118
+    display: block;
119
+    z-index: 10;
120
+    /* Block selection of buttons (useful for mobile devices) */
121
+    -webkit-user-select: none; /* Chrome all / Safari all */
122
+    -moz-user-select: none; /* Firefox all */
123
+    -ms-user-select: none; /* IE 10+ */
124
+}
125
+
126
+#rightButton, #leftButton {
127
+    transition: 0.2s;
128
+    position: fixed;
129
+    top: 0;
130
+    width: 10%;
131
+    background-color: rgba(255, 255, 255, 0.05);
132
+    height: 100%;
133
+    display: flex;
134
+    font-size: 5rem;
135
+    cursor: pointer;
136
+}
137
+
138
+#rightButton {
139
+    right: 0;
140
+}
141
+
142
+#leftButton {
143
+    left: 0;
144
+}
145
+
146
+#closeButton, #downloadButton {
147
+    transition: 0.2s;
148
+    position: fixed;
149
+    color: white;
150
+    display: flex;
151
+    font-size: 3rem;
152
+    top: 0;
153
+    width: 80px;
154
+    height: 80px;
155
+    background-color: rgba(255, 255, 255, 0.05);
156
+    cursor: pointer;
157
+}
158
+
159
+#closeButton {
160
+    right: 10%;
161
+}
162
+
163
+#downloadButton {
164
+    right: calc(10% + 80px);
165
+}
166
+
167
+#rightButton:hover, #leftButton:hover, #closeButton:hover, #downloadButton:hover {
168
+    background-color: rgba(255, 255, 255, 0.2);
169
+}
170
+
171
+#rightButton i, #leftButton i, #closeButton i, #downloadButton i {
172
+    margin: auto;
173
+}
174
+
175
+#rightButton:active, #leftButton:active, #closeButton:active, #downloadButton:active {
176
+    background-color: rgba(255, 255, 255, 0.4);
177
+}
178
+
179
+
180
+#loadingIconContainer {
181
+    color: white;
182
+    width: 100%;
183
+    height: 100%;
184
+    z-index: 8;
185
+    position: fixed;
186
+    display: flex;
187
+    font-size: 5rem;
188
+}
189
+
190
+#loadingIconContainer i {
191
+    margin: auto;
192
+}
193
+
194
+
195
+#closeBack {
196
+    position: fixed;
197
+    width: 100%;
198
+    height: 100%;
199
+    background-color: #1c1c1c;
200
+}
201
+
202
+#photoOverlay {
203
+    top: 0;
204
+    left: 0;
205
+    position: fixed;
206
+    width: 100%;
207
+    height: 100%;
208
+    z-index: 5;
209
+}
210
+
211
+#downloadAlbum {
212
+    height: 70px;
213
+    width: 200px;
214
+    display: inline-flex;
215
+    position: relative;
216
+    align-items: center;
217
+    justify-content: center;
218
+    background-color: #1a1a1a;
219
+    box-shadow: 0 0 4px #000;
220
+    text-shadow: 0 0 5px #1c1c1c;
221
+    transition: 0.3s;
222
+    color: #28ca2a;
223
+    cursor: pointer;
224
+    margin: 5px;
225
+}
226
+
227
+#downloadText {
228
+    margin-top: 5px;
229
+    position: absolute;
230
+    top: 0;
231
+}
232
+
233
+#albumPhotoCount {
234
+    color: #929ba8;
235
+    margin-bottom: 5px;
236
+    position: absolute;
237
+    bottom: 0;
238
+}
239
+
240
+#downloadText svg {
241
+    width: 24px;
242
+    height: 24px;
243
+    margin-right: 5px;
244
+}
245
+
246
+
247
+@media screen and (max-width: 768px) {
248
+    #rightButton, #leftButton {
249
+        width: 80px;
250
+        font-size: 3rem;
251
+    }
252
+
253
+    #closeButton {
254
+        right: 50%;
255
+        transform: translateX(100%);
256
+    }
257
+
258
+    #downloadButton {
259
+        right: 50%;
260
+    }
261
+
262
+
263
+}
264
+
265
+@media screen and (max-width: 576px) {
266
+    .photos-folder-container a {
267
+        min-width: 100px;
268
+        height: 70px;
269
+    }
270
+    #folderTitle {
271
+        position: absolute;
272
+        top: 5px;
273
+        color: #73b795;
274
+        font-size: 15px;
275
+        text-shadow: 0 0 5px #1c1c1c;
276
+    }
277
+
278
+    #folderPhotos, #folderAlbums {
279
+        color: #808080;
280
+        font-size: 10px;
281
+    }
282
+
283
+    #folderPhotos {
284
+        position: absolute;
285
+        bottom: 20px;
286
+    }
287
+
288
+    #folderAlbums {
289
+        position: absolute;
290
+        bottom: 0;
291
+    }
292
+
293
+    .photos img {
294
+        width: 140px;
295
+    }
296
+
297
+}

+ 66
- 66
assets/css/planningEvents.css View File

@@ -1,66 +1,66 @@
1
-#tableWrapper {
2
-    width: 100%;
3
-    overflow: auto;
4
-    display: flex;
5
-}
6
-
7
-#tablePlanning {
8
-    margin: auto auto 20px auto;
9
-    display: flex;
10
-
11
-}
12
-
13
-.planning-header {
14
-    font-family: Harry-P, fantasy;
15
-    border: none;
16
-    border-radius: 0.2rem;
17
-    background: #414141;
18
-    font-size: 2rem;
19
-    padding: 5px;
20
-    margin: 5px 0;
21
-    height: 50px;
22
-}
23
-
24
-.horaires {
25
-    background: none;
26
-    border: none;
27
-    border-top: 1px solid #ccc;
28
-    text-align: right;
29
-    vertical-align: top;
30
-    margin-top: -1px; /* negate the border  to prevent offsest with events */
31
-}
32
-
33
-.event {
34
-    background: none;
35
-    border: none;
36
-    color: white;
37
-    transition: 0.3s;
38
-    cursor: pointer;
39
-    position: absolute;
40
-    width: 100%;
41
-    display: flex;
42
-}
43
-
44
-.event-color {
45
-    border-radius: 0.2rem;
46
-    transition: 0.2s;
47
-    border: none;
48
-    margin: 5px 0;
49
-    display: flex;
50
-    width: 100%;
51
-}
52
-
53
-.event-color:hover {
54
-    border-radius: 1rem;
55
-    transform: scale(1.05);
56
-}
57
-
58
-.event-text {
59
-    margin: auto;
60
-}
61
-
62
-.day-column {
63
-    position: relative;
64
-    min-width: 150px;
65
-    margin: 0 5px;
66
-}
1
+#tableWrapper {
2
+    width: 100%;
3
+    overflow: auto;
4
+    display: flex;
5
+}
6
+
7
+#tablePlanning {
8
+    margin: auto auto 20px auto;
9
+    display: flex;
10
+
11
+}
12
+
13
+.planning-header {
14
+    font-family: Harry-P, fantasy;
15
+    border: none;
16
+    border-radius: 0.2rem;
17
+    background: #414141;
18
+    font-size: 2rem;
19
+    padding: 5px;
20
+    margin: 5px 0;
21
+    height: 50px;
22
+}
23
+
24
+.horaires {
25
+    background: none;
26
+    border: none;
27
+    border-top: 1px solid #ccc;
28
+    text-align: right;
29
+    vertical-align: top;
30
+    margin-top: -1px; /* negate the border  to prevent offsest with events */
31
+}
32
+
33
+.event {
34
+    background: none;
35
+    border: none;
36
+    color: white;
37
+    transition: 0.3s;
38
+    cursor: pointer;
39
+    position: absolute;
40
+    width: 100%;
41
+    display: flex;
42
+}
43
+
44
+.event-color {
45
+    border-radius: 0.2rem;
46
+    transition: 0.2s;
47
+    border: none;
48
+    margin: 5px 0;
49
+    display: flex;
50
+    width: 100%;
51
+}
52
+
53
+.event-color:hover {
54
+    border-radius: 1rem;
55
+    transform: scale(1.05);
56
+}
57
+
58
+.event-text {
59
+    margin: auto;
60
+}
61
+
62
+.day-column {
63
+    position: relative;
64
+    min-width: 150px;
65
+    margin: 0 5px;
66
+}

+ 106
- 118
assets/css/score.css View File

@@ -1,118 +1,106 @@
1
-
2
-#mobile-score {
3
-    display: none;
4
-    height: auto;
5
-}
6
-
7
-#mobile-score .title-image {
8
-    height: 80px;
9
-    margin: 0 auto 0 auto;
10
-    display: block;
11
-    position: relative;
12
-    bottom: -100px;
13
-}
14
-
15
-#mobile-score .score-container {
16
-    margin: 0 auto 0 auto;
17
-    display: block;
18
-    bottom: -85px;
19
-    position: relative;
20
-}
21
-
22
-#top-bar-score {
23
-    display: inline-flex;
24
-    position: fixed;
25
-    right: 0;
26
-}
27
-
28
-#top-bar-score .title-image {
29
-    height: 40px;
30
-    margin: 0;
31
-}
32
-
33
-#main-score {
34
-    display: block;
35
-}
36
-
37
-#main-score .title-image {
38
-    display: none;
39
-}
40
-
41
-.score-container {
42
-    background: none;
43
-    border-radius: 10px;
44
-    display: inline-flex;
45
-    vertical-align: center;
46
-    font-family: Harry-P, sans-serif;
47
-    font-size: 50px;
48
-    margin: 0;
49
-}
50
-
51
-.score-container a {
52
-    display: inline-flex;
53
-    vertical-align: middle;
54
-    align-items: center;
55
-    text-shadow: -1px 1px 2px #000,
56
-    1px 1px 2px #000,
57
-    1px -1px 0 #000,
58
-    -1px -1px 0 #000;
59
-}
60
-
61
-.score-container a:hover {
62
-    text-shadow: 0 0 10px #bd8a39;
63
-}
64
-
65
-.winning {
66
-    font-size: 23px;
67
-}
68
-
69
-.score-gli {
70
-    color: #ff5f5f;
71
-    background-size: auto 100%;
72
-    margin: 0 10px;
73
-}
74
-
75
-.score-pek {
76
-    color: #7ffd78;
77
-    background-size: auto 100%;
78
-    margin: 0 10px;
79
-}
80
-
81
-.score-boo {
82
-    color: #fafd78;
83
-    background-size: auto 100%;
84
-    margin: 0 10px;
85
-}
86
-
87
-.score-ver {
88
-    color: #60bdff;
89
-    background-size: auto 100%;
90
-    margin: 0 10px;
91
-}
92
-
93
-
94
-.score-separator {
95
-    background-color: #d9d9d9;
96
-    width: 5px;
97
-    height: 5px;
98
-}
99
-
100
-#main-score .score-logo {
101
-    height: 60px;
102
-    margin: 0 5px 0 5px;
103
-}
104
-
105
-
106
-@media screen and (max-width: 768px) {
107
-    #top-bar-score {
108
-        display: none;
109
-    }
110
-
111
-    #mobile-score {
112
-        display: block;
113
-    }
114
-
115
-    #main-score .score-container {
116
-        display: block;
117
-    }
118
-}
1
+
2
+#mobile-score {
3
+    display: none;
4
+    height: auto;
5
+}
6
+
7
+#mobile-score .title-image {
8
+    height: 80px;
9
+    margin: 0 auto 0 auto;
10
+    display: block;
11
+    position: relative;
12
+    bottom: -100px;
13
+}
14
+
15
+#mobile-score .score-container {
16
+    margin: 0 auto 0 auto;
17
+    display: block;
18
+    bottom: -85px;
19
+    position: relative;
20
+}
21
+
22
+#top-bar-score {
23
+    display: inline-flex;
24
+    position: fixed;
25
+    right: 0;
26
+}
27
+
28
+#top-bar-score .title-image {
29
+    height: 40px;
30
+    margin: 0;
31
+}
32
+
33
+#main-score {
34
+    display: block;
35
+}
36
+
37
+#main-score .title-image {
38
+    display: none;
39
+}
40
+
41
+.score-container {
42
+    background: none;
43
+    border-radius: 10px;
44
+    display: inline-flex;
45
+    vertical-align: center;
46
+    font-family: Harry-P, sans-serif;
47
+    font-size: 50px;
48
+    margin: 0;
49
+}
50
+
51
+.score-container a {
52
+    display: inline-flex;
53
+    vertical-align: middle;
54
+    align-items: center;
55
+    text-shadow: -1px 1px 2px #000,
56
+    1px 1px 2px #000,
57
+    1px -1px 0 #000,
58
+    -1px -1px 0 #000;
59
+}
60
+
61
+.score-container a:hover {
62
+    text-shadow: 0 0 10px #bd8a39;
63
+}
64
+
65
+.winning {
66
+    font-size: 23px;
67
+}
68
+
69
+.score-tam {
70
+    color: #ff5f5f;
71
+    background-size: auto 100%;
72
+    margin: 0 10px;
73
+}
74
+
75
+.score-pek {
76
+    color: #fafd78;
77
+    background-size: auto 100%;
78
+    margin: 0 10px;
79
+}
80
+
81
+
82
+.score-separator {
83
+    background-color: #d9d9d9;
84
+    width: 5px;
85
+    height: 5px;
86
+}
87
+
88
+#main-score .score-logo {
89
+    height: 60px;
90
+    margin: 0 5px 0 5px;
91
+}
92
+
93
+
94
+@media screen and (max-width: 768px) {
95
+    #top-bar-score {
96
+        display: none;
97
+    }
98
+
99
+    #mobile-score {
100
+        display: block;
101
+    }
102
+
103
+    #main-score .score-container {
104
+        display: block;
105
+    }
106
+}

+ 87
- 87
assets/css/sidenav.css View File

@@ -1,87 +1,87 @@
1
-/* The side navigation menu */
2
-
3
-.sidenav {
4
-    height: 100%;
5
-    overflow-y: hidden;
6
-    width: 300px;
7
-    transform: translateX(-270px); /* change margin with JavaScript */
8
-    position: fixed; /* Stay in place */
9
-    z-index: 1000;
10
-    top: 0;
11
-    left: 0;
12
-    transition: 0.5s; /* 0.5 second transition effect to slide in the sidenav */
13
-    text-align: left;
14
-    background: linear-gradient(to right, #1c1c1c, transparent 90%);
15
-}
16
-
17
-.sidenav.sidenav-open {
18
-    transform: translateX(0);
19
-    overflow-y: auto;
20
-}
21
-
22
-
23
-#sidenav-scroll {
24
-    position: absolute;
25
-    padding: 80px 0 50px 0;
26
-    width: 100%;
27
-}
28
-
29
-/* The navigation menu links */
30
-
31
-.sidenav a {
32
-    padding: 0;
33
-    margin: 0;
34
-    text-decoration: none;
35
-    font-size: 20px;
36
-    color: #f0f0f0;
37
-    display: inline-flex;
38
-    transition: 0.3s;
39
-    height: 40px;
40
-    width: 270px;
41
-}
42
-
43
-.sidenav a .sidenav-content {
44
-    margin: 0;
45
-    padding-left: 20px;
46
-    width: 100%;
47
-    height: 100%;
48
-    display: inline-flex;
49
-    transition: 0.3s;
50
-}
51
-
52
-.sidenav-icon, .sidenav-image {
53
-    left: 0;
54
-    margin-right: 5px;
55
-    -webkit-transform: translateY(5px);
56
-    transform: translateY(5px);
57
-    height: 20px;
58
-    width: 20px !important;
59
-}
60
-
61
-.sidenav-image {
62
-    margin: 0 5px 0 0;
63
-    padding: 0;
64
-}
65
-
66
-.sidenav a .sidenav-content:hover {
67
-    color: #e9b82f;
68
-    padding-left: 40px;
69
-}
70
-
71
-.sidenav .separator {
72
-    height: 20px;
73
-}
74
-
75
-/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
76
-
77
-#main {
78
-    transition: margin-left .5s;
79
-}
80
-
81
-/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
82
-
83
-@media screen and (max-height: 450px) {
84
-    .sidenav a {
85
-        font-size: 18px;
86
-    }
87
-}
1
+/* The side navigation menu */
2
+
3
+.sidenav {
4
+    height: 100%;
5
+    overflow-y: hidden;
6
+    width: 300px;
7
+    transform: translateX(-270px); /* change margin with JavaScript */
8
+    position: fixed; /* Stay in place */
9
+    z-index: 1000;
10
+    top: 0;
11
+    left: 0;
12
+    transition: 0.5s; /* 0.5 second transition effect to slide in the sidenav */
13
+    text-align: left;
14
+    background: linear-gradient(to right, #1c1c1c, transparent 90%);
15
+}
16
+
17
+.sidenav.sidenav-open {
18
+    transform: translateX(0);
19
+    overflow-y: auto;
20
+}
21
+
22
+
23
+#sidenav-scroll {
24
+    position: absolute;
25
+    padding: 80px 0 50px 0;
26
+    width: 100%;
27
+}
28
+
29
+/* The navigation menu links */
30
+
31
+.sidenav a {
32
+    padding: 0;
33
+    margin: 0;
34
+    text-decoration: none;
35
+    font-size: 20px;
36
+    color: #f0f0f0;
37
+    display: inline-flex;
38
+    transition: 0.3s;
39
+    height: 40px;
40
+    width: 270px;
41
+}
42
+
43
+.sidenav a .sidenav-content {
44
+    margin: 0;
45
+    padding-left: 20px;
46
+    width: 100%;
47
+    height: 100%;
48
+    display: inline-flex;
49
+    transition: 0.3s;
50
+}
51
+
52
+.sidenav-icon, .sidenav-image {
53
+    left: 0;
54
+    margin-right: 5px;
55
+    -webkit-transform: translateY(5px);
56
+    transform: translateY(5px);
57
+    height: 20px;
58
+    width: 20px !important;
59
+}
60
+
61
+.sidenav-image {
62
+    margin: 0 5px 0 0;
63
+    padding: 0;
64
+}
65
+
66
+.sidenav a .sidenav-content:hover {
67
+    color: #e9b82f;
68
+    padding-left: 40px;
69
+}
70
+
71
+.sidenav .separator {
72
+    height: 20px;
73
+}
74
+
75
+/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
76
+
77
+#main {
78
+    transition: margin-left .5s;
79
+}
80
+
81
+/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
82
+
83
+@media screen and (max-height: 450px) {
84
+    .sidenav a {
85
+        font-size: 18px;
86
+    }
87
+}

+ 67
- 103
assets/css/stats.css View File

@@ -1,103 +1,67 @@
1
-
2
-#teamButtonContainer {
3
-    display: block;
4
-    line-height: 2.2;
5
-}
6
-
7
-.team-button {
8
-    border-radius: 0.2rem;
9
-    font-size: 2.5rem;
10
-    font-family: Harry-P, fantasy;
11
-    cursor: pointer;
12
-    padding: 15px 20px;
13
-    margin: 10px;
14
-    width: 200px;
15
-    transition: 0.2s;
16
-    border: none;
17
-}
18
-
19
-#title_gli {
20
-    color: #FF5F5F;
21
-}
22
-
23
-#title_pek {
24
-    color: #7ffd78;
25
-}
26
-
27
-#title_boo {
28
-    color: #fafd78;
29
-}
30
-
31
-#title_ver {
32
-    color: #60bdff;
33
-}
34
-
35
-.team-button#buttonGli {
36
-    color: #FF5F5F;
37
-    background-color: #4b1f1f;
38
-}
39
-
40
-.team-button#buttonPek {
41
-    color: #7ffd78;
42
-    background-color: #1b4b1b;
43
-}
44
-
45
-.team-button#buttonBoo {
46
-    color: #fafd78;
47
-    background-color: #484b25;
48
-}
49
-
50
-.team-button#buttonVer {
51
-    color: #60bdff;
52
-    background-color: #1e384b;
53
-}
54
-
55
-
56
-
57
-.team-button#buttonGli:hover {
58
-    color: #b30006;
59
-    background-color: #ff7d7f;
60
-    box-shadow: 0 0 10px #ff506d;
61
-}
62
-
63
-.team-button#buttonBoo:hover {
64
-    color: #a28100;
65
-    background-color: #f7fd51;
66
-    box-shadow: 0 0 10px #fdf71e;
67
-}
68
-
69
-.team-button#buttonPek:hover {
70
-    color: #0c5700;
71
-    background-color: #6bfd5f;
72
-    box-shadow: 0 0 10px #7efd34;
73
-}
74
-
75
-.team-button#buttonVer:hover {
76
-    color: #0008a5;
77
-    background-color: #48a7ff;
78
-    box-shadow: 0 0 10px #2060ff;
79
-}
80
-
81
-
82
-
83
-
84
-
85
-.score-entry {
86
-    width: 100%;
87
-}
88
-
89
-.score-entry-text {
90
-    margin-right: 20px;
91
-}
92
-
93
-.score-entry-points {
94
-    margin-left: 20px;
95
-}
96
-
97
-.positive {
98
-    color: white;
99
-}
100
-
101
-.negative {
102
-    color: #bf021c;
103
-}
1
+
2
+#teamButtonContainer {
3
+    display: block;
4
+    line-height: 2.2;
5
+}
6
+
7
+.team-button {
8
+    border-radius: 0.2rem;
9
+    font-size: 2.5rem;
10
+    font-family: Harry-P, fantasy;
11
+    cursor: pointer;
12
+    padding: 15px 20px;
13
+    margin: 10px;
14
+    width: 200px;
15
+    transition: 0.2s;
16
+    border: none;
17
+}
18
+
19
+#title_tam {
20
+    color: #FF5F5F;
21
+}
22
+
23
+#title_pek {
24
+    color: #fafd78;
25
+}
26
+
27
+.team-button#buttonTam {
28
+    color: #FF5F5F;
29
+    background-color: #4b1f1f;
30
+}
31
+
32
+.team-button#buttonPek {
33
+    color: #fafd78;
34
+    background-color: #484b25;
35
+}
36
+
37
+.team-button#buttonTam:hover {
38
+    color: #b30006;
39
+    background-color: #ff7d7f;
40
+    box-shadow: 0 0 10px #ff506d;
41
+}
42
+
43
+.team-button#buttonPek:hover {
44
+    color: #a28100;
45
+    background-color: #f7fd51;
46
+    box-shadow: 0 0 10px #fdf71e;
47
+}
48
+
49
+.score-entry {
50
+    width: 100%;
51
+}
52
+
53
+.score-entry-text {
54
+    margin-right: 20px;
55
+}
56
+
57
+.score-entry-points {
58
+    margin-left: 20px;
59
+}
60
+
61
+.positive {
62
+    color: white;
63
+}
64
+
65
+.negative {
66
+    color: #bf021c;
67
+}

+ 662
- 666
assets/css/style.css
File diff suppressed because it is too large
View File


BIN
assets/fonts/kohlanta.ttf View File


BIN
assets/images/backgrounds/bg_pek.jpg View File


BIN
assets/images/backgrounds/bg_tam.jpg View File


BIN
assets/images/backgrounds/bg_tam.psd View File


BIN
assets/images/backgrounds/bg_up.png View File


BIN
assets/images/blouse/blouse_derriere_elsa.jpg View File


BIN
assets/images/blouse/blouse_derriere_matthieu.jpg View File


BIN
assets/images/blouse/blouse_devant_elsa.jpg View File


BIN
assets/images/blouse/blouse_devant_matthieu.jpg View File


BIN
assets/images/blouse/blouse_exemple.png View File


BIN
assets/images/blouse/derrière.png View File


BIN
assets/images/blouse/devant.png View File


BIN
assets/images/logos/Logo_Principal.png View File


+ 14081
- 98
assets/images/logos/logo-site-accueil.svg
File diff suppressed because it is too large
View File


BIN
assets/images/logos/logo-texture.png View File


BIN
assets/images/logos/pek_logo.png View File


BIN
assets/images/logos/tam_logo.png View File


BIN
assets/images/logos/titre-site-accueil.png View File


+ 1
- 96
assets/images/logos/titre-site-accueil.svg
File diff suppressed because it is too large
View File


+ 7726
- 7726
assets/images/map.svg
File diff suppressed because it is too large
View File


BIN
assets/images/teams/pekstanas.jpg View File


BIN
assets/images/teams/tamboom.jpg View File


+ 44
- 44
assets/js/admin/mapManager.js View File

@@ -1,44 +1,44 @@
1
-
2
-$(document).ready(function () {
3
-    getMapInfo(getSelectedMap());
4
-    $(".save").click(function () {
5
-        let info = {};
6
-        info['title'] = $('#titleInput').val();
7
-        info['description'] = $('#descriptionInput').val();
8
-        let object = {
9
-            "function": 'save_map_info',
10
-            'selector': getSelectedMap(),
11
-            'info': info,
12
-        };
13
-        $.get(
14
-            "ajax.php",
15
-            object,
16
-            function (data) {
17
-                alert(data);
18
-            }
19
-        );
20
-    });
21
-    $('#mapSelect').on('change', function () {
22
-        getMapInfo(getSelectedMap());
23
-    });
24
-});
25
-
26
-function getSelectedMap() {
27
-    return $('#mapSelect').val();
28
-}
29
-
30
-function getMapInfo(selector) {
31
-    let object = {
32
-        "function": 'get_map_info',
33
-        'selector': selector,
34
-    };
35
-    $.get(
36
-        "../../ajax/read",
37
-        object,
38
-        function (data) {
39
-            console.log(data);
40
-            $('#titleInput').val(data[0]['title']);
41
-            $('#descriptionInput').val(data[0]['description']);
42
-        }
43
-    );
44
-}
1
+
2
+$(document).ready(function () {
3
+    getMapInfo(getSelectedMap());
4
+    $(".save").click(function () {
5
+        let info = {};
6
+        info['title'] = $('#titleInput').val();
7
+        info['description'] = $('#descriptionInput').val();
8
+        let object = {
9
+            "function": 'save_map_info',
10
+            'selector': getSelectedMap(),
11
+            'info': info,
12
+        };
13
+        $.get(
14
+            "ajax.php",
15
+            object,
16
+            function (data) {
17
+                alert(data);
18
+            }
19
+        );
20
+    });
21
+    $('#mapSelect').on('change', function () {
22
+        getMapInfo(getSelectedMap());
23
+    });
24
+});
25
+
26
+function getSelectedMap() {
27
+    return $('#mapSelect').val();
28
+}
29
+
30
+function getMapInfo(selector) {
31
+    let object = {
32
+        "function": 'get_map_info',
33
+        'selector': selector,
34
+    };
35
+    $.get(
36
+        "../../ajax/read",
37
+        object,
38
+        function (data) {
39
+            console.log(data);
40
+            $('#titleInput').val(data[0]['title']);
41
+            $('#descriptionInput').val(data[0]['description']);
42
+        }
43
+    );
44
+}

+ 167
- 167
assets/js/admin/planningManager.js View File

@@ -1,167 +1,167 @@
1
-let uniqueID = 0;
2
-
3
-let currentActivities = [];
4
-
5
-let entryTemplate =
6
-    '<tr class="entry">' +
7
-    '<td class="planning-start"></td>' +
8
-    '<td class="planning-length"></td>' +
9
-    '<td class="planning-name"></td>' +
10
-    '<td class="remove-line">' +
11
-    '<i class="fas fa-trash"></i>' +
12
-    '</td>' +
13
-    '</tr>';
14
-
15
-let editEntryTemplate =
16
-    '<label for="startTimeInput">Heure de début</label>\n' +
17
-    '<input type="number" id="startTimeInput">\n' +
18
-    '<label for="lengthTimeInput">Durée</label>\n' +
19
-    '<input type="number" id="lengthTimeInput">\n' +
20
-    '' +
21
-    '<label for="smallTitleInput">Titre dans le planning</label>\n' +
22
-    '<input type="text" id="smallTitleInput">\n' +
23
-    '<label for="fullTitleInput">Titre dans la description</label>\n' +
24
-    '<input type="text" id="fullTitleInput">\n' +
25
-    '' +
26
-    '<label for="descriptionInput">Description</label>\n' +
27
-    '<textarea rows="10" id="descriptionInput"></textarea>' +
28
-    '' +
29
-    '<label for="colorInput">Couleur (hexadécimal)</label>\n' +
30
-    '<input type="text" id="colorInput">\n';
31
-
32
-$(document).ready(function () {
33
-    getDayActivities(getSelectedDay());
34
-    $('#daySelect').on('change', function () {
35
-        getDayActivities(getSelectedDay());
36
-    });
37
-    $(".save").click(function () {
38
-        saveDayActivities();
39
-    });
40
-    $('.add-line').on('click', function () {
41
-        let newElem = {};
42
-        uniqueID += 1;
43
-        newElem['ID'] = 'new_'+ uniqueID;
44
-        newElem['day'] = getSelectedDay();
45
-        newElem['start'] = '';
46
-        newElem['length'] = '';
47
-        newElem['small_title'] = '';
48
-        newElem['full_title'] = '';
49
-        newElem['description'] = '';
50
-        currentActivities.push(newElem);
51
-        showInfo(newElem);
52
-        addLine(newElem['ID'], '', '', '');
53
-    });
54
-});
55
-
56
-function getSelectedDay() {
57
-    return $('#daySelect').val();
58
-}
59
-
60
-function getRealId(id) {
61
-    return id.replace('entry_', '');
62
-}
63
-
64
-function findActivityOfId(id) {
65
-    let match = undefined;
66
-    for (let i = 0; i < currentActivities.length; i++) {
67
-        if (currentActivities[i]['ID'] === id) {
68
-            match = currentActivities[i];
69
-            break;
70
-        }
71
-    }
72
-    return match;
73
-}
74
-
75
-function removeActivityOfId(id) {
76
-    for (let i = 0; i < currentActivities.length; i++) {
77
-        if (currentActivities[i]['ID'] === id) {
78
-            currentActivities.splice(i, 1);
79
-            break;
80
-        }
81
-    }
82
-}
83
-
84
-function updateListEntry(entry) {
85
-    let $listEntry = $('#entry_' + entry['ID']);
86
-    if ($listEntry !== undefined) {
87
-        $listEntry.find('.planning-start').text(entry['start']);
88
-        $listEntry.find('.planning-length').text(entry['length']);
89
-        $listEntry.find('.planning-name').text(entry['small_title']);
90
-    }
91
-}
92
-
93
-function addLine(id, start, length, name) {
94
-    let $entry = $(entryTemplate);
95
-    $entry.attr('id', 'entry_' + id);
96
-    $entry.find('.remove-line').attr('id', 'removeEntry_' + id);
97
-    $("#activityTable").prepend($entry);
98
-    $entry.find('.planning-start').text(start);
99
-    $entry.find('.planning-length').text(length);
100
-    $entry.find('.planning-name').text(name);
101
-    $("#removeEntry_" + id).on("click", function () {
102
-        removeActivityOfId(getRealId($entry.attr('id')));
103
-        $entry.remove();
104
-    });
105
-    $entry.on("click", function () {
106
-        showInfo(findActivityOfId(getRealId($entry.attr('id'))));
107
-    });
108
-}
109
-
110
-function showInfo(entry) {
111
-    if (entry !== undefined) {
112
-        $.alert({
113
-            title: 'Edition du planning',
114
-            content: editEntryTemplate,
115
-            onOpenBefore: function () {
116
-                $('#startTimeInput').val(entry['start']);
117
-                $('#lengthTimeInput').val(entry['length']);
118
-                $('#smallTitleInput').val(entry['small_title']);
119
-                $('#fullTitleInput').val(entry['full_title']);
120
-                $('#descriptionInput').val(entry['description']);
121
-                $('#colorInput').val(entry['color']);
122
-            },
123
-            onClose: function () {
124
-                entry['start'] =$('#startTimeInput').val();
125
-                entry['length'] = $('#lengthTimeInput').val();
126
-                entry['small_title'] = $('#smallTitleInput').val();
127
-                entry['full_title'] = $('#fullTitleInput').val();
128
-                entry['description'] = $('#descriptionInput').val();
129
-                entry['color'] = $('#colorInput').val();
130
-                updateListEntry(entry);
131
-            },
132
-        });
133
-    } else
134
-        alert('Une erreur est survenue');
135
-}
136
-
137
-function saveDayActivities() {
138
-    let object = {
139
-        "function": 'save_day_activities',
140
-        "day": getSelectedDay(),
141
-        "entries": currentActivities,
142
-    };
143
-    $.get(
144
-        "ajax.php",
145
-        object,
146
-        function (data) {
147
-            alert(data);
148
-        });
149
-}
150
-
151
-function getDayActivities(day) {
152
-    $('#activityTable').html('');
153
-    let object = {
154
-        "function": 'get_activities_of_day',
155
-        'day': day,
156
-    };
157
-    $.get(
158
-        "../../ajax/read",
159
-        object,
160
-        function (data) {
161
-            currentActivities = data;
162
-            for (let i = 0; i < data.length; i++) {
163
-                addLine(data[i]['ID'], data[i]['start'], data[i]['length'], data[i]['small_title']);
164
-            }
165
-        }
166
-    );
167
-}
1
+let uniqueID = 0;
2
+
3
+let currentActivities = [];
4
+
5
+let entryTemplate =
6
+    '<tr class="entry">' +
7
+    '<td class="planning-start"></td>' +
8
+    '<td class="planning-length"></td>' +
9
+    '<td class="planning-name"></td>' +
10
+    '<td class="remove-line">' +
11
+    '<i class="fas fa-trash"></i>' +
12
+    '</td>' +
13
+    '</tr>';
14
+
15
+let editEntryTemplate =
16
+    '<label for="startTimeInput">Heure de début</label>\n' +
17
+    '<input type="number" id="startTimeInput">\n' +
18
+    '<label for="lengthTimeInput">Durée</label>\n' +
19
+    '<input type="number" id="lengthTimeInput">\n' +
20
+    '' +
21
+    '<label for="smallTitleInput">Titre dans le planning</label>\n' +
22
+    '<input type="text" id="smallTitleInput">\n' +
23
+    '<label for="fullTitleInput">Titre dans la description</label>\n' +
24
+    '<input type="text" id="fullTitleInput">\n' +
25
+    '' +
26
+    '<label for="descriptionInput">Description</label>\n' +
27
+    '<textarea rows="10" id="descriptionInput"></textarea>' +
28
+    '' +
29
+    '<label for="colorInput">Couleur (hexadécimal)</label>\n' +
30
+    '<input type="text" id="colorInput">\n';
31
+
32
+$(document).ready(function () {
33
+    getDayActivities(getSelectedDay());
34
+    $('#daySelect').on('change', function () {
35
+        getDayActivities(getSelectedDay());
36
+    });
37
+    $(".save").click(function () {
38
+        saveDayActivities();
39
+    });
40
+    $('.add-line').on('click', function () {
41
+        let newElem = {};
42
+        uniqueID += 1;
43
+        newElem['ID'] = 'new_'+ uniqueID;
44
+        newElem['day'] = getSelectedDay();
45
+        newElem['start'] = '';
46
+        newElem['length'] = '';
47
+        newElem['small_title'] = '';
48
+        newElem['full_title'] = '';
49
+        newElem['description'] = '';
50
+        currentActivities.push(newElem);
51
+        showInfo(newElem);
52
+        addLine(newElem['ID'], '', '', '');
53
+    });
54
+});
55
+
56
+function getSelectedDay() {
57
+    return $('#daySelect').val();
58
+}
59
+
60
+function getRealId(id) {
61
+    return id.replace('entry_', '');
62
+}
63
+
64
+function findActivityOfId(id) {
65
+    let match = undefined;
66
+    for (let i = 0; i < currentActivities.length; i++) {
67
+        if (currentActivities[i]['ID'] === id) {
68
+            match = currentActivities[i];
69
+            break;
70
+        }
71
+    }
72
+    return match;
73
+}
74
+
75
+function removeActivityOfId(id) {
76
+    for (let i = 0; i < currentActivities.length; i++) {
77
+        if (currentActivities[i]['ID'] === id) {
78
+            currentActivities.splice(i, 1);
79
+            break;
80
+        }
81
+    }
82
+}
83
+
84
+function updateListEntry(entry) {
85
+    let $listEntry = $('#entry_' + entry['ID']);
86
+    if ($listEntry !== undefined) {
87
+        $listEntry.find('.planning-start').text(entry['start']);
88
+        $listEntry.find('.planning-length').text(entry['length']);
89
+        $listEntry.find('.planning-name').text(entry['small_title']);
90
+    }
91
+}
92
+
93
+function addLine(id, start, length, name) {
94
+    let $entry = $(entryTemplate);
95
+    $entry.attr('id', 'entry_' + id);
96
+    $entry.find('.remove-line').attr('id', 'removeEntry_' + id);
97
+    $("#activityTable").prepend($entry);
98
+    $entry.find('.planning-start').text(start);
99
+    $entry.find('.planning-length').text(length);
100
+    $entry.find('.planning-name').text(name);
101
+    $("#removeEntry_" + id).on("click", function () {
102
+        removeActivityOfId(getRealId($entry.attr('id')));
103
+        $entry.remove();
104
+    });
105
+    $entry.on("click", function () {
106
+        showInfo(findActivityOfId(getRealId($entry.attr('id'))));
107
+    });
108
+}
109
+
110
+function showInfo(entry) {
111
+    if (entry !== undefined) {
112
+        $.alert({
113
+            title: 'Edition du planning',
114
+            content: editEntryTemplate,
115
+            onOpenBefore: function () {
116
+                $('#startTimeInput').val(entry['start']);
117
+                $('#lengthTimeInput').val(entry['length']);
118
+                $('#smallTitleInput').val(entry['small_title']);
119
+                $('#fullTitleInput').val(entry['full_title']);
120
+                $('#descriptionInput').val(entry['description']);
121
+                $('#colorInput').val(entry['color']);
122
+            },
123
+            onClose: function () {
124
+                entry['start'] =$('#startTimeInput').val();
125
+                entry['length'] = $('#lengthTimeInput').val();
126
+                entry['small_title'] = $('#smallTitleInput').val();
127
+                entry['full_title'] = $('#fullTitleInput').val();
128
+                entry['description'] = $('#descriptionInput').val();
129
+                entry['color'] = $('#colorInput').val();
130
+                updateListEntry(entry);
131
+            },
132
+        });
133
+    } else
134
+        alert('Une erreur est survenue');
135
+}
136
+
137
+function saveDayActivities() {
138
+    let object = {
139
+        "function": 'save_day_activities',
140
+        "day": getSelectedDay(),
141
+        "entries": currentActivities,
142
+    };
143
+    $.get(
144
+        "ajax.php",
145
+        object,
146
+        function (data) {
147
+            alert(data);
148
+        });
149
+}
150
+
151
+function getDayActivities(day) {
152
+    $('#activityTable').html('');
153
+    let object = {
154
+        "function": 'get_activities_of_day',
155
+        'day': day,
156
+    };
157
+    $.get(
158
+        "../../ajax/read",
159
+        object,
160
+        function (data) {
161
+            currentActivities = data;
162
+            for (let i = 0; i < data.length; i++) {
163
+                addLine(data[i]['ID'], data[i]['start'], data[i]['length'], data[i]['small_title']);
164
+            }
165
+        }
166
+    );
167
+}

+ 93
- 93
assets/js/admin/statsManager.js View File

@@ -1,93 +1,93 @@
1
-let uniqueID = 0;
2
-
3
-let entryTemplate =
4
-    '<tr class="entry">' +
5
-    '<td class="edit-text"><input class="edit-text-input" type="text" placeholder="Entrez le texte ici"></td>' +
6
-    '<td class="edit-points"><input class="edit-value-input" type="number" value="0"></td>' +
7
-    '<td class="remove-line">' +
8
-    '<i class="fas fa-trash"></i>' +
9
-    '</td>' +
10
-    '</tr>';
11
-
12
-$(document).ready(function () {
13
-    getScores(getSelectedTeam());
14
-    setTeamColors(getSelectedTeam());
15
-    $(".add-line").click(function () {
16
-        addLine();
17
-    });
18
-    $(".save").click(function () {
19
-        let lines = getLine();
20
-        let object = {
21
-            "function": 'save_scores',
22
-            "team": getSelectedTeam(),
23
-            "lines": lines,
24
-        };
25
-        $.get(
26
-            'ajax.php',
27
-            object,
28
-            function (data) {
29
-                alert(data);
30
-                window.location.reload();
31
-            });
32
-    });
33
-    $('#teamSelect').on('change', function () {
34
-        getScores(getSelectedTeam());
35
-        setTeamColors(getSelectedTeam());
36
-    });
37
-});
38
-
39
-function setTeamColors(team) {
40
-    $('.add-line').attr('id', 'addLine_' + team);
41
-    $('.edit-header').attr('id', 'editHeader_' + team);
42
-}
43
-
44
-function getSelectedTeam() {
45
-    return $('#teamSelect').val();
46
-}
47
-
48
-function addLine(text, value) {
49
-    uniqueID += 1;
50
-    let $entry = $(entryTemplate);
51
-    $entry.attr('id', 'entry_' + uniqueID);
52
-    $entry.find('.remove-line').attr('id', 'removeEntry_'+uniqueID);
53
-    $(".stats-table").prepend(
54
-        $entry
55
-    );
56
-    $entry.find('.edit-text-input').val(text);
57
-    $entry.find('.edit-value-input').val(value);
58
-    $("#removeEntry_" + uniqueID).on("click", function () {
59
-        $entry.remove();
60
-    });
61
-}
62
-
63
-function getLine() {
64
-    let elements = $(".entry").map(function () {
65
-        return this;
66
-    }).get();
67
-    let array = [];
68
-    for (let i = 0; i < elements.length; i++) {
69
-        let values = {
70
-            "text": $(elements[i]).find('.edit-text-input').val(),
71
-            "points": parseInt($(elements[i]).find('.edit-value-input').val())
72
-        };
73
-        array.push(values);
74
-    }
75
-    return array;
76
-}
77
-
78
-function getScores(team) {
79
-    $('.stats-table').html('');
80
-    let object = {
81
-        "function": 'get_scores',
82
-        'team': team,
83
-    };
84
-    $.get(
85
-        "../../ajax/read",
86
-        object,
87
-        function (data) {
88
-            for (let i = 0; i < data.length; i++) {
89
-                addLine(data[i]['text'], data[i]['points']);
90
-            }
91
-        }
92
-    );
93
-}
1
+let uniqueID = 0;
2
+
3
+let entryTemplate =
4
+    '<tr class="entry">' +
5
+    '<td class="edit-text"><input class="edit-text-input" type="text" placeholder="Entrez le texte ici"></td>' +
6
+    '<td class="edit-points"><input class="edit-value-input" type="number" value="0"></td>' +
7
+    '<td class="remove-line">' +
8
+    '<i class="fas fa-trash"></i>' +
9
+    '</td>' +
10
+    '</tr>';
11
+
12
+$(document).ready(function () {
13
+    getScores(getSelectedTeam());
14
+    setTeamColors(getSelectedTeam());
15
+    $(".add-line").click(function () {
16
+        addLine();
17
+    });
18
+    $(".save").click(function () {
19
+        let lines = getLine();
20
+        let object = {
21
+            "function": 'save_scores',
22
+            "team": getSelectedTeam(),
23
+            "lines": lines,
24
+        };
25
+        $.get(
26
+            'ajax.php',
27
+            object,
28
+            function (data) {
29
+                alert(data);
30
+                window.location.reload();
31
+            });
32
+    });
33
+    $('#teamSelect').on('change', function () {
34
+        getScores(getSelectedTeam());
35
+        setTeamColors(getSelectedTeam());
36
+    });
37
+});
38
+
39
+function setTeamColors(team) {
40
+    $('.add-line').attr('id', 'addLine_' + team);
41
+    $('.edit-header').attr('id', 'editHeader_' + team);
42
+}
43
+
44
+function getSelectedTeam() {
45
+    return $('#teamSelect').val();
46
+}
47
+
48
+function addLine(text, value) {
49
+    uniqueID += 1;
50
+    let $entry = $(entryTemplate);
51
+    $entry.attr('id', 'entry_' + uniqueID);
52
+    $entry.find('.remove-line').attr('id', 'removeEntry_'+uniqueID);
53
+    $(".stats-table").prepend(
54
+        $entry
55
+    );
56
+    $entry.find('.edit-text-input').val(text);
57
+    $entry.find('.edit-value-input').val(value);
58
+    $("#removeEntry_" + uniqueID).on("click", function () {
59
+        $entry.remove();
60
+    });
61
+}
62
+
63
+function getLine() {
64
+    let elements = $(".entry").map(function () {
65
+        return this;
66
+    }).get();
67
+    let array = [];
68
+    for (let i = 0; i < elements.length; i++) {
69
+        let values = {
70
+            "text": $(elements[i]).find('.edit-text-input').val(),
71
+            "points": parseInt($(elements[i]).find('.edit-value-input').val())
72
+        };
73
+        array.push(values);
74
+    }
75
+    return array;
76
+}
77
+
78
+function getScores(team) {
79
+    $('.stats-table').html('');
80
+    let object = {
81
+        "function": 'get_scores',
82
+        'team': team,
83
+    };
84
+    $.get(
85
+        "../../ajax/read",
86
+        object,
87
+        function (data) {
88
+            for (let i = 0; i < data.length; i++) {
89
+                addLine(data[i]['text'], data[i]['points']);
90
+            }
91
+        }
92
+    );
93
+}

+ 26
- 26
assets/js/admin/updateManager.js View File

@@ -1,26 +1,26 @@
1
-$(document).ready(function () {
2
-    $(".save").click(function () {
3
-        sendLogin($('#usernameInput').val(), $('#passwordInput').val());
4
-    });
5
-});
6
-
7
-function sendLogin(login, password) {
8
-    let object = {
9
-        "function": 'update_website',
10
-        "login": login,
11
-        "password": password,
12
-    };
13
-    console.log(JSON.stringify(object));
14
-    // Do not put .php in the url, otherwise the POST request will transformed in GET when server rewrites the url
15
-    $.ajax({
16
-        type: "POST",
17
-        url: "../ajax/write/master",
18
-        data: JSON.stringify(object),
19
-        dataType: "json",
20
-        contentType: "application/json; charset=utf-8",
21
-        complete: function (data) {
22
-            alert(data.responseText);
23
-            console.log(data);
24
-        },
25
-    });
26
-}
1
+$(document).ready(function () {
2
+    $(".save").click(function () {
3
+        sendLogin($('#usernameInput').val(), $('#passwordInput').val());
4
+    });
5
+});
6
+
7
+function sendLogin(login, password) {
8
+    let object = {
9
+        "function": 'update_website',
10
+        "login": login,
11
+        "password": password,
12
+    };
13
+    console.log(JSON.stringify(object));
14
+    // Do not put .php in the url, otherwise the POST request will transformed in GET when server rewrites the url
15
+    $.ajax({
16
+        type: "POST",
17
+        url: "../ajax/write/master",
18
+        data: JSON.stringify(object),
19
+        dataType: "json",
20
+        contentType: "application/json; charset=utf-8",
21
+        complete: function (data) {
22
+            alert(data.responseText);
23
+            console.log(data);
24
+        },
25
+    });
26
+}

+ 55
- 55
assets/js/init.js View File

@@ -1,56 +1,56 @@
1
-jconfirm.defaults = {
2
-    title: '',
3
-    titleClass: '',
4
-    type: 'default',
5
-    typeAnimated: true,
6
-    draggable: false,
7
-    animateFromElement: true,
8
-    smoothContent: true,
9
-    content: '',
10
-    buttons: {},
11
-    defaultButtons: {
12
-        ok: {
13
-            text: 'OK',
14
-            action: function () {
15
-            }
16
-        },
17
-    },
18
-    contentLoaded: function(data, status, xhr){
19
-    },
20
-    icon: '',
21
-    lazyOpen: false,
22
-    bgOpacity: null,
23
-    theme: 'supervan',
24
-    animation: 'scale',
25
-    closeAnimation: 'scale',
26
-    animationSpeed: 400,
27
-    animationBounce: 1,
28
-    rtl: false,
29
-    container: 'body',
30
-    containerFluid: false,
31
-    escapeKey: 'ok',
32
-    backgroundDismiss: true,
33
-    backgroundDismissAnimation: 'shake',
34
-    autoClose: false,
35
-    closeIcon: null,
36
-    closeIconClass: false,
37
-    watchInterval: 100,
38
-    columnClass: 'col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1',
39
-    boxWidth: '50%',
40
-    scrollToPreviousElement: true,
41
-    scrollToPreviousElementAnimate: true,
42
-    useBootstrap: true,
43
-    offsetTop: 40,
44
-    offsetBottom: 40,
45
-    bootstrapClasses: {
46
-        container: 'container',
47
-        containerFluid: 'container-fluid',
48
-        row: 'row',
49
-    },
50
-    onContentReady: function () {},
51
-    onOpenBefore: function () {},
52
-    onOpen: function () {},
53
-    onClose: function () {},
54
-    onDestroy: function () {},
55
-    onAction: function () {}
1
+jconfirm.defaults = {
2
+    title: '',
3
+    titleClass: '',
4
+    type: 'default',
5
+    typeAnimated: true,
6
+    draggable: false,
7
+    animateFromElement: true,
8
+    smoothContent: true,
9
+    content: '',
10
+    buttons: {},
11
+    defaultButtons: {
12
+        ok: {
13
+            text: 'OK',
14
+            action: function () {
15
+            }
16
+        },
17
+    },
18
+    contentLoaded: function(data, status, xhr){
19
+    },
20
+    icon: '',
21
+    lazyOpen: false,
22
+    bgOpacity: null,
23
+    theme: 'supervan',
24
+    animation: 'scale',
25
+    closeAnimation: 'scale',
26
+    animationSpeed: 400,
27
+    animationBounce: 1,
28
+    rtl: false,
29
+    container: 'body',
30
+    containerFluid: false,
31
+    escapeKey: 'ok',
32
+    backgroundDismiss: true,
33
+    backgroundDismissAnimation: 'shake',
34
+    autoClose: false,
35
+    closeIcon: null,
36
+    closeIconClass: false,
37
+    watchInterval: 100,
38
+    columnClass: 'col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1',
39
+    boxWidth: '50%',
40
+    scrollToPreviousElement: true,
41
+    scrollToPreviousElementAnimate: true,
42
+    useBootstrap: true,
43
+    offsetTop: 40,
44
+    offsetBottom: 40,
45
+    bootstrapClasses: {
46
+        container: 'container',
47
+        containerFluid: 'container-fluid',
48
+        row: 'row',
49
+    },
50
+    onContentReady: function () {},
51
+    onOpenBefore: function () {},
52
+    onOpen: function () {},
53
+    onClose: function () {},
54
+    onDestroy: function () {},
55
+    onAction: function () {}
56 56
 };

+ 7
- 7
assets/js/jquery.mousewheel.min.js View File

@@ -1,8 +1,8 @@
1
-/*!
2
- * jQuery Mousewheel 3.1.13
3
- *
4
- * Copyright 2015 jQuery Foundation and other contributors
5
- * Released under the MIT license.
6
- * http://jquery.org/license
7
- */
1
+/*!
2
+ * jQuery Mousewheel 3.1.13
3
+ *
4
+ * Copyright 2015 jQuery Foundation and other contributors
5
+ * Released under the MIT license.
6
+ * http://jquery.org/license
7
+ */
8 8
 !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});

+ 45
- 45
assets/js/map.js View File

@@ -1,46 +1,46 @@
1
-
2
-let hoverColor = "#e9b82f";
3
-let normalColor = "#efbd95";
4
-
5
-function get_name(id){
6
-    return id.replace("map-", "");
7
-}
8
-
9
-function clicked(elem){
10
-    $.alert({
11
-        title: 'Chargement...',
12
-        content: function () {
13
-            let self = this;
14
-            let object = {
15
-                "function": 'get_map_info',
16
-                'selector': get_name(elem.id),
17
-            };
18
-            return $.ajax({
19
-                url: 'ajax/read',
20
-                data: object,
21
-                method: 'get'
22
-            }).done(function (data) {
23
-                if (data.length > 0) {
24
-                    self.setTitle(data[0]['title']);
25
-                    self.setContent(data[0]['description']);
26
-                } else {
27
-                    self.setTitle('Erreur');
28
-                    self.setContent('Une erreur est survenue')
29
-                }
30
-            }).fail(function(){
31
-                self.setContent('Something went wrong.');
32
-            });
33
-        },
34
-    });
35
-}
36
-
37
-function hover_in(elem){
38
-    $(elem).css({
39
-        "fill": hoverColor,
40
-        'cursor': 'pointer',
41
-    });
42
-}
43
-
44
-function hover_out(elem){
45
-    $(elem).css("fill", normalColor);
1
+
2
+let hoverColor = "#e9b82f";
3
+let normalColor = "#efbd95";
4
+
5
+function get_name(id){
6
+    return id.replace("map-", "");
7
+}
8
+
9
+function clicked(elem){
10
+    $.alert({
11
+        title: 'Chargement...',
12
+        content: function () {
13
+            let self = this;
14
+            let object = {
15
+                "function": 'get_map_info',
16
+                'selector': get_name(elem.id),
17
+            };
18
+            return $.ajax({
19
+                url: 'ajax/read',
20
+                data: object,
21
+                method: 'get'
22
+            }).done(function (data) {
23
+                if (data.length > 0) {
24
+                    self.setTitle(data[0]['title']);
25
+                    self.setContent(data[0]['description']);
26
+                } else {
27
+                    self.setTitle('Erreur');
28
+                    self.setContent('Une erreur est survenue')
29
+                }
30
+            }).fail(function(){
31
+                self.setContent('Something went wrong.');
32
+            });
33
+        },
34
+    });
35
+}
36
+
37
+function hover_in(elem){
38
+    $(elem).css({
39
+        "fill": hoverColor,
40
+        'cursor': 'pointer',
41
+    });
42
+}
43
+
44
+function hover_out(elem){
45
+    $(elem).css("fill", normalColor);
46 46
 }

+ 276
- 276
assets/js/photos.js View File

@@ -1,276 +1,276 @@
1
-let showcase = $("#imgBig");
2
-let showcaseButtonContainer = $("#photoButtonsContainer");
3
-let showcaseDownload = $("#downloadButton");
4
-let photoOverlay = $("#photoOverlay");
5
-let headerTop = $("#header-top");
6
-let sideNav = $("#menuSidenav");
7
-let loading = $("#loadingIconContainer");
8
-let move_photo = false;
9
-let grab_offsetX = 0;
10
-let grab_offsetY = 0;
11
-
12
-let idle_time = 0;
13
-let isMobile = window.matchMedia("only screen and (max-width: 480px)").matches;
14
-let isMouseOverButtons = false;
15
-
16
-$(document).ready(
17
-    function () {
18
-        showcase.bind("mousewheel", function(event, delta) {
19
-            let min_width = $(window).width() / 5;
20
-            let min_height = $(window).height() / 5;
21
-            let max_width = $(window).width() * 5;
22
-            let max_height = $(window).height() * 5;
23
-
24
-            let scale = 150 / 100;
25
-            if (delta < 0)
26
-               scale = 1/scale;
27
-            let cursorY = event.pageY - $(window).scrollTop();
28
-            let offsetX = event.pageX - (showcase.position().left + showcase.width()/2);
29
-            let offsetY = cursorY - (showcase.position().top + showcase.height()/2);
30
-
31
-            let new_width = showcase.width() * scale;
32
-            let new_height = showcase.height() * scale;
33
-            if (new_width > max_width || new_width < min_width)
34
-                new_width = 0;
35
-            if (new_height > max_height || new_height < min_height)
36
-                new_height = 0;
37
-
38
-            if (new_width !== 0 && new_height !== 0){
39
-                let new_left = event.pageX - (offsetX * scale);
40
-                let new_top = cursorY - (offsetY * scale);
41
-
42
-                showcase.width(new_width);
43
-                showcase.height(new_height);
44
-
45
-                if (new_height > $(window).height() || new_width > $(window).width()){
46
-                    showcase.css('left', new_left +'px');
47
-                    showcase.css('top', new_top +'px');
48
-                    showcase.css('cursor', 'move');
49
-                }
50
-                else{
51
-                    showcase.css('left', $(window).width()/2 +'px');
52
-                    showcase.css('top', $(window).height()/2 +'px');
53
-                    showcase.css('cursor', 'default');
54
-                }
55
-            }
56
-            return false;
57
-        });
58
-        document.getElementById("photosTitle").scrollIntoView();
59
-        showcase.on('dragstart', function(event) { event.preventDefault(); }); // Stop image drag out of page
60
-        if (!isMobile)
61
-            setInterval(timerIncrement, 100);
62
-    }
63
-);
64
-
65
-$(document).mousemove(function (event) {
66
-    let cursorY = event.pageY - $(window).scrollTop();
67
-    let elem = document.elementFromPoint(event.pageX, cursorY);
68
-    isMouseOverButtons = !(elem.id === "closeBack" || elem.id === "loadingIconContainer" || elem.id === showcase.attr('id')); // Prevent entering fullscreen when cursor on control buttons
69
-    idle_time = 0;
70
-});
71
-
72
-showcase.mousemove(function(event){
73
-    if (showcase.height() > $(window).height() || showcase.width() > $(window).width) {
74
-        showcase.css('cursor', 'move');
75
-        if (move_photo){
76
-            let cursorY = event.pageY - $(window).scrollTop();
77
-            let offsetX = event.pageX - (showcase.position().left + showcase.width()/2);
78
-            let offsetY = cursorY - (showcase.position().top + showcase.height()/2);
79
-
80
-            let new_left = showcase.position().left + showcase.width()/2 + offsetX - grab_offsetX;
81
-            let new_top = showcase.position().top + showcase.height()/2 + offsetY - grab_offsetY;
82
-
83
-            showcase.css('left', new_left +'px');
84
-            showcase.css('top', new_top +'px');
85
-        }
86
-    }
87
-    else{
88
-        showcase.css('cursor', 'default');
89
-    }
90
-});
91
-
92
-showcase.mousedown(function(event){
93
-    move_photo = true;
94
-    let cursorY = event.pageY - $(window).scrollTop();
95
-    grab_offsetX = event.pageX - (showcase.position().left + showcase.width()/2);
96
-    grab_offsetY = cursorY - (showcase.position().top + showcase.height()/2);
97
-
98
-    if (isMobile)
99
-        toggleFullscreen();
100
-});
101
-
102
-showcase.mouseup(function(){
103
-    move_photo = false;
104
-});
105
-
106
-showcase.mouseleave(function(){
107
-    move_photo = false;
108
-});
109
-
110
-
111
-/*
112
- * Display selected image in showcase
113
- * When clicked, display image in full size
114
- */
115
-function displayBig(elem) {
116
-    isMouseOverButtons = false; // Allow fullscreen when clicking on an image without mouving the mouse
117
-    changeImage($(elem).attr('src'));
118
-    hideTopBar();
119
-    disableFullscreen();
120
-    photoOverlay.fadeIn(500);
121
-    $('body').css('overflow', 'hidden');
122
-}
123
-
124
-function getSourceFromThumbnail(source) {
125
-    return source.replace("photos_thumb/", "photos/");
126
-}
127
-
128
-function getThumbnailFromSource(source) {
129
-    return source.replace("photos/", "photos_thumb/");
130
-}
131
-
132
-/*
133
- * Hide showcase image
134
- */
135
-function closeBig() {
136
-    showTopBar();
137
-    disableFullscreen();
138
-    photoOverlay.fadeOut(500);
139
-    $('body').css('overflow', 'auto');
140
-    scrollToShowcaseImage();
141
-}
142
-
143
-
144
-function scrollToShowcaseImage() {
145
-    let source = showcase.attr('src');
146
-    let image = $("img[src$='" + getThumbnailFromSource(source) + "']");
147
-    if (image !== undefined) {
148
-        image.get(0).scrollIntoView();
149
-    }
150
-}
151
-
152
-
153
-function enableFullscreen() {
154
-    showcaseButtonContainer.fadeOut(500);
155
-}
156
-
157
-function disableFullscreen() {
158
-    showcaseButtonContainer.fadeIn(500);
159
-}
160
-
161
-function toggleFullscreen() {
162
-    if (isFullscreen())
163
-        disableFullscreen();
164
-    else
165
-        enableFullscreen();
166
-}
167
-
168
-function hideTopBar() {
169
-    headerTop.fadeOut(500);
170
-    sideNav.fadeOut(500);
171
-}
172
-
173
-function showTopBar() {
174
-    headerTop.fadeIn(500);
175
-    sideNav.fadeIn(500);
176
-}
177
-
178
-function isFullscreen(){
179
-    return showcaseButtonContainer.css("display") === "none";
180
-}
181
-
182
-
183
-function timerIncrement() {
184
-    if (isMouseOverButtons)
185
-        idle_time = 0;
186
-    else
187
-        idle_time = idle_time+ 1;
188
-    if (idle_time > 10 && !isFullscreen()) { // 1 second
189
-        enableFullscreen();
190
-    } else if (idle_time <= 10 && isFullscreen()){
191
-        disableFullscreen();
192
-    }
193
-}
194
-
195
-/*
196
- * Control images with keyboard arrows
197
- */
198
-$(document).keydown(function (e) {
199
-    switch (e.keyCode) {
200
-        case 37: // left
201
-            displayNext(-1);
202
-            break;
203
-        case 39: // right
204
-            displayNext(1);
205
-            break;
206
-        case 27: // escape
207
-            closeBig();
208
-            break;
209
-        default:
210
-            return; // exit this handler for other keys
211
-    }
212
-    e.preventDefault(); // prevent the default action (scroll / move caret)
213
-});
214
-
215
-
216
-/*
217
- * Display next/last image in showcase. When reaching end/start, loop back to start/end
218
- */
219
-function displayNext(direction) {
220
-    let currentSrc = showcase.attr('src');
221
-    let photos = document.getElementsByClassName("photo");
222
-    let current = 0;
223
-    for (let i = 0; i < photos.length; i++) {
224
-        if (getSourceFromThumbnail($(photos[i]).attr('src')) === currentSrc) {
225
-            current = i;
226
-        }
227
-    }
228
-    let next = current + direction;
229
-    let nextId = "";
230
-    if (direction > 0) {
231
-        nextId = "#photo-0";
232
-    } else {
233
-        nextId = "#photo-" + (photos.length - 1);
234
-    }
235
-    if (document.getElementById("photo-" + next) != null) {
236
-        nextId = "#photo-" + next;
237
-    }
238
-    let nextSrc = $(nextId).attr('src');
239
-    changeImage(nextSrc);
240
-}
241
-
242
-/*
243
- * Change image source, link and download
244
- */
245
-function changeImage(thumb) {
246
-    displayLoading();
247
-    showcase.css('display', 'none');
248
-    showcase.on('load', function () {
249
-        hideLoading();
250
-        showcase.css('display', 'block');
251
-        if ($(showcase).width() > $(window).width()){ // prevent display problems on portait devices
252
-            let scale = $(window).width() * 0.9 / $(showcase).width();
253
-            $(showcase).width(scale*$(showcase).width());
254
-            $(showcase).height(scale*$(showcase).height());
255
-        }
256
-    });
257
-    let source = getSourceFromThumbnail(thumb);
258
-    showcase.attr("src", source);
259
-    showcase.css({
260
-        width: 'auto',
261
-        height: '90%',
262
-    });
263
-    showcase.css('left', $(window).width()/2 +'px');
264
-    showcase.css('top', $(window).height()/2 +'px');
265
-    showcaseDownload.attr("href", source);
266
-
267
-}
268
-
269
-
270
-function displayLoading() {
271
-    loading.show();
272
-}
273
-
274
-function hideLoading() {
275
-    loading.fadeOut(200);
276
-}
1
+let showcase = $("#imgBig");
2
+let showcaseButtonContainer = $("#photoButtonsContainer");
3
+let showcaseDownload = $("#downloadButton");
4
+let photoOverlay = $("#photoOverlay");
5
+let headerTop = $("#header-top");
6
+let sideNav = $("#menuSidenav");
7
+let loading = $("#loadingIconContainer");
8
+let move_photo = false;
9
+let grab_offsetX = 0;
10
+let grab_offsetY = 0;
11
+
12
+let idle_time = 0;
13
+let isMobile = window.matchMedia("only screen and (max-width: 480px)").matches;
14
+let isMouseOverButtons = false;
15
+
16
+$(document).ready(
17
+    function () {
18
+        showcase.bind("mousewheel", function(event, delta) {
19
+            let min_width = $(window).width() / 5;
20
+            let min_height = $(window).height() / 5;
21
+            let max_width = $(window).width() * 5;
22
+            let max_height = $(window).height() * 5;
23
+
24
+            let scale = 150 / 100;
25
+            if (delta < 0)
26
+               scale = 1/scale;
27
+            let cursorY = event.pageY - $(window).scrollTop();
28
+            let offsetX = event.pageX - (showcase.position().left + showcase.width()/2);
29
+            let offsetY = cursorY - (showcase.position().top + showcase.height()/2);
30
+
31
+            let new_width = showcase.width() * scale;
32
+            let new_height = showcase.height() * scale;
33
+            if (new_width > max_width || new_width < min_width)
34
+                new_width = 0;
35
+            if (new_height > max_height || new_height < min_height)
36
+                new_height = 0;
37
+
38
+            if (new_width !== 0 && new_height !== 0){
39
+                let new_left = event.pageX - (offsetX * scale);
40
+                let new_top = cursorY - (offsetY * scale);
41
+
42
+                showcase.width(new_width);
43
+                showcase.height(new_height);
44
+
45
+                if (new_height > $(window).height() || new_width > $(window).width()){
46
+                    showcase.css('left', new_left +'px');
47
+                    showcase.css('top', new_top +'px');
48
+                    showcase.css('cursor', 'move');
49
+                }
50
+                else{
51
+                    showcase.css('left', $(window).width()/2 +'px');
52
+                    showcase.css('top', $(window).height()/2 +'px');
53
+                    showcase.css('cursor', 'default');
54
+                }
55
+            }
56
+            return false;
57
+        });
58
+        document.getElementById("photosTitle").scrollIntoView();
59
+        showcase.on('dragstart', function(event) { event.preventDefault(); }); // Stop image drag out of page
60
+        if (!isMobile)
61
+            setInterval(timerIncrement, 100);
62
+    }
63
+);
64
+
65
+$(document).mousemove(function (event) {
66
+    let cursorY = event.pageY - $(window).scrollTop();
67
+    let elem = document.elementFromPoint(event.pageX, cursorY);
68
+    isMouseOverButtons = !(elem.id === "closeBack" || elem.id === "loadingIconContainer" || elem.id === showcase.attr('id')); // Prevent entering fullscreen when cursor on control buttons
69
+    idle_time = 0;
70
+});
71
+
72
+showcase.mousemove(function(event){
73
+    if (showcase.height() > $(window).height() || showcase.width() > $(window).width) {
74
+        showcase.css('cursor', 'move');
75
+        if (move_photo){
76
+            let cursorY = event.pageY - $(window).scrollTop();
77
+            let offsetX = event.pageX - (showcase.position().left + showcase.width()/2);
78
+            let offsetY = cursorY - (showcase.position().top + showcase.height()/2);
79
+
80
+            let new_left = showcase.position().left + showcase.width()/2 + offsetX - grab_offsetX;
81
+            let new_top = showcase.position().top + showcase.height()/2 + offsetY - grab_offsetY;
82
+
83
+            showcase.css('left', new_left +'px');
84
+            showcase.css('top', new_top +'px');
85
+        }
86
+    }
87
+    else{
88
+        showcase.css('cursor', 'default');
89
+    }
90
+});
91
+
92
+showcase.mousedown(function(event){
93
+    move_photo = true;
94
+    let cursorY = event.pageY - $(window).scrollTop();
95
+    grab_offsetX = event.pageX - (showcase.position().left + showcase.width()/2);
96
+    grab_offsetY = cursorY - (showcase.position().top + showcase.height()/2);
97
+
98
+    if (isMobile)
99
+        toggleFullscreen();
100
+});
101
+
102
+showcase.mouseup(function(){
103
+    move_photo = false;
104
+});
105
+
106
+showcase.mouseleave(function(){
107
+    move_photo = false;
108
+});
109
+
110
+
111
+/*
112
+ * Display selected image in showcase
113
+ * When clicked, display image in full size
114
+ */
115
+function displayBig(elem) {
116
+    isMouseOverButtons = false; // Allow fullscreen when clicking on an image without mouving the mouse
117
+    changeImage($(elem).attr('src'));
118
+    hideTopBar();
119
+    disableFullscreen();
120
+    photoOverlay.fadeIn(500);
121
+    $('body').css('overflow', 'hidden');
122
+}
123
+
124
+function getSourceFromThumbnail(source) {
125
+    return source.replace("photos_thumb/", "photos/");
126
+}
127
+
128
+function getThumbnailFromSource(source) {
129
+    return source.replace("photos/", "photos_thumb/");
130
+}
131
+
132
+/*
133
+ * Hide showcase image
134
+ */
135
+function closeBig() {
136
+    showTopBar();
137
+    disableFullscreen();
138
+    photoOverlay.fadeOut(500);
139
+    $('body').css('overflow', 'auto');
140
+    scrollToShowcaseImage();
141
+}
142
+
143
+
144
+function scrollToShowcaseImage() {
145
+    let source = showcase.attr('src');
146
+    let image = $("img[src$='" + getThumbnailFromSource(source) + "']");
147
+    if (image !== undefined) {
148
+        image.get(0).scrollIntoView();
149
+    }
150
+}
151
+
152
+
153
+function enableFullscreen() {
154
+    showcaseButtonContainer.fadeOut(500);
155
+}
156
+
157
+function disableFullscreen() {
158
+    showcaseButtonContainer.fadeIn(500);
159
+}
160
+
161
+function toggleFullscreen() {
162
+    if (isFullscreen())
163
+        disableFullscreen();
164
+    else
165
+        enableFullscreen();
166
+}
167
+
168
+function hideTopBar() {
169
+    headerTop.fadeOut(500);
170
+    sideNav.fadeOut(500);
171
+}
172
+
173
+function showTopBar() {
174
+    headerTop.fadeIn(500);
175
+    sideNav.fadeIn(500);
176
+}
177
+
178
+function isFullscreen(){
179
+    return showcaseButtonContainer.css("display") === "none";
180
+}
181
+
182
+
183
+function timerIncrement() {
184
+    if (isMouseOverButtons)
185
+        idle_time = 0;
186
+    else
187
+        idle_time = idle_time+ 1;
188
+    if (idle_time > 10 && !isFullscreen()) { // 1 second
189
+        enableFullscreen();
190
+    } else if (idle_time <= 10 && isFullscreen()){
191
+        disableFullscreen();
192
+    }
193
+}
194
+
195
+/*
196
+ * Control images with keyboard arrows
197
+ */
198
+$(document).keydown(function (e) {
199
+    switch (e.keyCode) {
200
+        case 37: // left
201
+            displayNext(-1);
202
+            break;
203
+        case 39: // right
204
+            displayNext(1);
205
+            break;
206
+        case 27: // escape
207
+            closeBig();
208
+            break;
209
+        default:
210
+            return; // exit this handler for other keys
211
+    }
212
+    e.preventDefault(); // prevent the default action (scroll / move caret)
213
+});
214
+
215
+
216
+/*
217
+ * Display next/last image in showcase. When reaching end/start, loop back to start/end
218
+ */
219
+function displayNext(direction) {
220
+    let currentSrc = showcase.attr('src');
221
+    let photos = document.getElementsByClassName("photo");
222
+    let current = 0;
223
+    for (let i = 0; i < photos.length; i++) {
224
+        if (getSourceFromThumbnail($(photos[i]).attr('src')) === currentSrc) {
225
+            current = i;
226
+        }
227
+    }
228
+    let next = current + direction;
229
+    let nextId = "";
230
+    if (direction > 0) {
231
+        nextId = "#photo-0";
232
+    } else {
233
+        nextId = "#photo-" + (photos.length - 1);
234
+    }
235
+    if (document.getElementById("photo-" + next) != null) {
236
+        nextId = "#photo-" + next;
237
+    }
238
+    let nextSrc = $(nextId).attr('src');
239
+    changeImage(nextSrc);
240
+}
241
+
242
+/*
243
+ * Change image source, link and download
244
+ */
245
+function changeImage(thumb) {
246
+    displayLoading();
247
+    showcase.css('display', 'none');
248
+    showcase.on('load', function () {
249
+        hideLoading();
250
+        showcase.css('display', 'block');
251
+        if ($(showcase).width() > $(window).width()){ // prevent display problems on portait devices
252
+            let scale = $(window).width() * 0.9 / $(showcase).width();
253
+            $(showcase).width(scale*$(showcase).width());
254
+            $(showcase).height(scale*$(showcase).height());
255
+        }
256
+    });
257
+    let source = getSourceFromThumbnail(thumb);
258
+    showcase.attr("src", source);
259
+    showcase.css({
260
+        width: 'auto',
261
+        height: '90%',
262
+    });
263
+    showcase.css('left', $(window).width()/2 +'px');
264
+    showcase.css('top', $(window).height()/2 +'px');
265
+    showcaseDownload.attr("href", source);
266
+
267
+}
268
+
269
+
270
+function displayLoading() {
271
+    loading.show();
272
+}
273
+
274
+function hideLoading() {
275
+    loading.fadeOut(200);
276
+}

+ 98
- 98
assets/js/planning.js View File

@@ -1,98 +1,98 @@
1
-let ajaxurl = 'ajax/read';
2
-
3
-
4
-let tableWrapper = $('#tablePlanning');
5
-let cellHeight = 50;
6
-let startHour = 8;
7
-
8
-let activityList = [];
9
-
10
-let dayNames =
11
-    ['Horaires',
12
-    'Lundi',
13
-    'Mardi',
14
-    'Mercredi',
15
-    'Jeudi',
16
-    'Vendredi',
17
-    'Weekend',];
18
-
19
-$(document).ready(function () {
20
-    generateTable();
21
-});
22
-
23
-function getDayActivities(day, callback) {
24
-    let object = {
25
-        "function": 'get_activities_of_day',
26
-        'day': day,
27
-    };
28
-    $.get(
29
-        ajaxurl,
30
-        object,
31
-        callback,
32
-    );
33
-}
34
-
35
-function getDataOfElement($elem) {
36
-    let id = $elem.attr('id');
37
-    let day = $elem.parent().attr('id').replace('day_', '');
38
-    let data = undefined;
39
-    for (let i = 0; i < activityList[day].length; i++) {
40
-        if (activityList[day][i]['ID'] === id) {
41
-            data = activityList[day][i];
42
-            break;
43
-        }
44
-    }
45
-    return data;
46
-}
47
-
48
-function clicked($elem){
49
-    let data = getDataOfElement($elem);
50
-    console.log(data);
51
-    $.alert({
52
-        title: data['full_title'],
53
-        content: data['description'],
54
-    });
55
-}
56
-
57
-
58
-function generateTable() {
59
-    tableWrapper.html(''); // Reset the table
60
-    generateHours();
61
-    for (let i = 1; i <= 6; i++) { // Iterate over the days
62
-        tableWrapper.append('<div class="day-column" id="day_' + i + '"><div class="planning-header">' + dayNames[i] + '</div></div>');
63
-        let $dayColumn = $('#day_'+i);
64
-        getDayActivities(i, function (data) {
65
-            activityList[i] = data;
66
-            for (let j = 0; j < data.length; j++) {
67
-                addActivityToColumn($dayColumn, data[j]);
68
-            }
69
-        });
70
-    }
71
-}
72
-
73
-function addActivityToColumn($col, act) {
74
-    let offsetTop = $col.find('.planning-header').outerHeight(true);
75
-    $col.append('<div class="event ' + act['small_title'] +'" + id="' + act['ID'] +'">' +
76
-        '<div class="event-color">' +
77
-        '<div class="event-text">' +
78
-        act['small_title'] +
79
-        '</div>' +
80
-        '</div>' +
81
-        '</div>');
82
-    let position = (act['start'] - startHour);
83
-    $('#' + act['ID']).css('top', offsetTop +  position * cellHeight);
84
-    $('#' + act['ID']).css('height', act['length'] * cellHeight);
85
-    $('#' + act['ID']).find('.event-color').css('background-color', act['color']);
86
-    $('#' + act['ID']).on('click', function () {
87
-        clicked($(this));
88
-    });
89
-}
90
-
91
-
92
-function generateHours() {
93
-    tableWrapper.append('<div id="hoursColumn"><div class="planning-header">Horaires</div></div>')
94
-    for (let i = startHour; i < 24; i++) {
95
-        tableWrapper.find('#hoursColumn').append('<div class="horaires">' + i + 'h</div>')
96
-    }
97
-    tableWrapper.find('.horaires').css('height', cellHeight);
98
-}
1
+let ajaxurl = 'ajax/read';
2
+
3
+
4
+let tableWrapper = $('#tablePlanning');
5
+let cellHeight = 50;
6
+let startHour = 8;
7
+
8
+let activityList = [];
9
+
10
+let dayNames =
11
+    ['Horaires',
12
+    'Lundi',
13
+    'Mardi',
14
+    'Mercredi',
15
+    'Jeudi',
16
+    'Vendredi',
17
+    'Weekend',];
18
+
19
+$(document).ready(function () {
20
+    generateTable();
21
+});
22
+
23
+function getDayActivities(day, callback) {
24
+    let object = {
25
+        "function": 'get_activities_of_day',
26
+        'day': day,
27
+    };
28
+    $.get(
29
+        ajaxurl,
30
+        object,
31
+        callback,
32
+    );
33
+}
34
+
35
+function getDataOfElement($elem) {
36
+    let id = $elem.attr('id');
37
+    let day = $elem.parent().attr('id').replace('day_', '');
38
+    let data = undefined;
39
+    for (let i = 0; i < activityList[day].length; i++) {
40
+        if (activityList[day][i]['ID'] === id) {
41
+            data = activityList[day][i];
42
+            break;
43
+        }
44
+    }
45
+    return data;
46
+}
47
+
48
+function clicked($elem){
49
+    let data = getDataOfElement($elem);
50
+    console.log(data);
51
+    $.alert({
52
+        title: data['full_title'],
53
+        content: data['description'],
54
+    });
55
+}
56
+
57
+
58
+function generateTable() {
59
+    tableWrapper.html(''); // Reset the table
60
+    generateHours();
61
+    for (let i = 1; i <= 6; i++) { // Iterate over the days
62
+        tableWrapper.append('<div class="day-column" id="day_' + i + '"><div class="planning-header">' + dayNames[i] + '</div></div>');
63
+        let $dayColumn = $('#day_'+i);
64
+        getDayActivities(i, function (data) {
65
+            activityList[i] = data;
66
+            for (let j = 0; j < data.length; j++) {
67
+                addActivityToColumn($dayColumn, data[j]);
68
+            }
69
+        });
70
+    }
71
+}
72
+
73
+function addActivityToColumn($col, act) {
74
+    let offsetTop = $col.find('.planning-header').outerHeight(true);
75
+    $col.append('<div class="event ' + act['small_title'] +'" + id="' + act['ID'] +'">' +
76
+        '<div class="event-color">' +
77
+        '<div class="event-text">' +
78
+        act['small_title'] +
79
+        '</div>' +
80
+        '</div>' +
81
+        '</div>');
82
+    let position = (act['start'] - startHour);
83
+    $('#' + act['ID']).css('top', offsetTop +  position * cellHeight);
84
+    $('#' + act['ID']).css('height', act['length'] * cellHeight);
85
+    $('#' + act['ID']).find('.event-color').css('background-color', act['color']);
86
+    $('#' + act['ID']).on('click', function () {
87
+        clicked($(this));
88
+    });
89
+}
90
+
91
+
92
+function generateHours() {
93
+    tableWrapper.append('<div id="hoursColumn"><div class="planning-header">Horaires</div></div>')
94
+    for (let i = startHour; i < 24; i++) {
95
+        tableWrapper.find('#hoursColumn').append('<div class="horaires">' + i + 'h</div>')
96
+    }
97
+    tableWrapper.find('.horaires').css('height', cellHeight);
98
+}

+ 48
- 55
assets/js/sidenav.js View File

@@ -1,55 +1,48 @@
1
-let sidenav = $("#menuSidenav");
2
-let baguette = $("#baguette");
3
-let backButton = $("#back-button");
4
-
5
-let openedSidenavClass = 'sidenav-open';
6
-let activeBackgroundClass = 'active-background';
7
-
8
-/*
9
- * Open navigation menu, change Baguette icon to selected state
10
- * and display the back button overlay over the page
11
- */
12
-
13
-function openNav() {
14
-    sidenav.addClass(openedSidenavClass);
15
-    backButton.addClass(activeBackgroundClass);
16
-    enableBaguette();
17
-}
18
-
19
-
20
-/*
21
- * Close navigation menu, change Baguette icon back to default state
22
- * and hide the back button overlay
23
- */
24
-function closeNav() {
25
-    sidenav.removeClass(openedSidenavClass);
26
-    backButton.removeClass(activeBackgroundClass);
27
-    disableBaguette();
28
-}
29
-
30
-
31
-/*
32
- * Toggle the navigation bar
33
- */
34
-function toggleNav() {
35
-    if (sidenav.hasClass(openedSidenavClass)) {
36
-        closeNav();
37
-    } else {
38
-        openNav();
39
-    }
40
-}
41
-
42
-function disableBaguette() {
43
-    baguette.removeClass("change-clic");
44
-}
45
-
46
-function enableBaguette() {
47
-    baguette.addClass("change-clic");
48
-}
49
-
50
-// Animate baguette on hover
51
-baguette.hover(function(){
52
-    baguette.addClass("change-hover");
53
-}, function(){
54
-    baguette.removeClass("change-hover");
55
-});
1
+let sidenav = $("#menuSidenav");
2
+let baguette = $("#baguette");
3
+let backButton = $("#back-button");
4
+
5
+let openedSidenavClass = 'sidenav-open';
6
+let activeBackgroundClass = 'active-background';
7
+
8
+/*
9
+ * Open navigation menu, change Baguette icon to selected state
10
+ * and display the back button overlay over the page
11
+ */
12
+
13
+function openNav() {
14
+    sidenav.addClass(openedSidenavClass);
15
+    backButton.addClass(activeBackgroundClass);
16
+    enableBaguette();
17
+}
18
+
19
+
20
+/*
21
+ * Close navigation menu, change Baguette icon back to default state
22
+ * and hide the back button overlay
23
+ */
24
+function closeNav() {
25
+    sidenav.removeClass(openedSidenavClass);
26
+    backButton.removeClass(activeBackgroundClass);
27
+    disableBaguette();
28
+}
29
+
30
+
31
+/*
32
+ * Toggle the navigation bar
33
+ */
34
+function toggleNav() {
35
+    if (sidenav.hasClass(openedSidenavClass)) {
36
+        closeNav();
37
+    } else {
38
+        openNav();
39
+    }
40
+}
41
+
42
+function disableBaguette() {
43
+    baguette.removeClass("change-clic");
44
+}
45
+
46
+function enableBaguette() {
47
+    baguette.addClass("change-clic");
48
+}

+ 47
- 52
assets/js/statsDisplay.js View File

@@ -1,52 +1,47 @@
1
-
2
-let entryTemplate =
3
-    '<div class="score-entry">' +
4
-    '<span class="score-entry-text"></span>' +
5
-    '<span class="score-entry-points"></span>' +
6
-    '</div>';
7
-
8
-function nameTeam(team){
9
-    if (team==='gli')
10
-    return "Glissefondor";
11
-    else if (team==='pek')
12
-        return "Peksentard";
13
-    else if (team==='boo')
14
-        return "Boomsouffle";
15
-    else
16
-        return "Verredaigle";
17
-
18
-}
19
-function showScores(team) {
20
-    console.log(team);
21
-    $.alert({
22
-        title: "<span id='title_" + team + "'>" + nameTeam(team) + "</span>",
23
-        content: function () {
24
-            let self = this;
25
-            let object = {
26
-                "function": 'get_scores',
27
-                'team': team,
28
-            };
29
-            return $.ajax({
30
-                url: "ajax/read",
31
-                data: object,
32
-                method: 'get'
33
-            }).done(function (data) {
34
-                for (let i = 0; i < data.length; i++) {
35
-                    let $entry = $(entryTemplate);
36
-                    $entry.attr('id', 'entry_' + i);
37
-                    $entry.find('.score-entry-text').text(data[i]['text']);
38
-                    $entry.find('.score-entry-points').text(data[i]['points']);
39
-                    if (parseInt(data[i]['points']) > 0)
40
-                        $entry.addClass('positive');
41
-                    else
42
-                        $entry.addClass('negative');
43
-                    self.setContentAppend($entry);
44
-                }
45
-            }).fail(function(){
46
-                self.setContent('Something went wrong.');
47
-            });
48
-        }
49
-    });
50
-}
51
-
52
-
1
+
2
+let entryTemplate =
3
+    '<div class="score-entry">' +
4
+    '<span class="score-entry-text"></span>' +
5
+    '<span class="score-entry-points"></span>' +
6
+    '</div>';
7
+
8
+function nameTeam(team){
9
+    if (team==='pek')
10
+    return "Pekstanas";
11
+    else if (team==='tam')
12
+        return "Tamboom";
13
+}
14
+function showScores(team) {
15
+    console.log(team);
16
+    $.alert({
17
+        title: "<span id='title_" + team + "'>" + nameTeam(team) + "</span>",
18
+        content: function () {
19
+            let self = this;
20
+            let object = {
21
+                "function": 'get_scores',
22
+                'team': team,
23
+            };
24
+            return $.ajax({
25
+                url: "ajax/read",
26
+                data: object,
27
+                method: 'get'
28
+            }).done(function (data) {
29
+                for (let i = 0; i < data.length; i++) {
30
+                    let $entry = $(entryTemplate);
31
+                    $entry.attr('id', 'entry_' + i);
32
+                    $entry.find('.score-entry-text').text(data[i]['text']);
33
+                    $entry.find('.score-entry-points').text(data[i]['points']);
34
+                    if (parseInt(data[i]['points']) > 0)
35
+                        $entry.addClass('positive');
36
+                    else
37
+                        $entry.addClass('negative');
38
+                    self.setContentAppend($entry);
39
+                }
40
+            }).fail(function(){
41
+                self.setContent('Something went wrong.');
42
+            });
43
+        }
44
+    });
45
+}
46
+
47
+

+ 28
- 28
assets/js/timer.js View File

@@ -1,28 +1,28 @@
1
-// Set the date we're counting down to
2
-var countDownDate = new Date("Sep 2, 2019 8:00:00").getTime();
3
-
4
-// Update the count down every 1 second
5
-var x = setInterval(function () {
6
-
7
-    // Get todays date and time
8
-    var now = new Date().getTime();
9
-
10
-    // Find the distance between now an the count down date
11
-    var distance = countDownDate - now;
12
-
13
-    // Time calculations for days, hours, minutes and seconds
14
-    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
15
-    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
16
-    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
17
-    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
18
-
19
-    // Output the result in an element with id="demo"
20
-    document.getElementById("timer").innerHTML = "Plus que <strong>" + days + "</strong> jours, <strong>" + hours + "</strong> heures, <strong>"
21
-        + minutes + "</strong> minutes et <strong>" + seconds + "</strong> dans le monde des Moldus...";
22
-
23
-    // If the count down is over, write some text
24
-    if (distance < 0) {
25
-        clearInterval(x);
26
-        document.getElementById("timer").innerHTML = "Bienvenue dans le monde des Sorciers !";
27
-    }
28
-}, 1000);
1
+// Set the date we're counting down to
2
+var countDownDate = new Date("Aug 31, 2020 8:00:00").getTime();
3
+
4
+// Update the count down every 1 second
5
+var x = setInterval(function () {
6
+
7
+    // Get todays date and time
8
+    var now = new Date().getTime();
9
+
10
+    // Find the distance between now an the count down date
11
+    var distance = countDownDate - now;
12
+
13
+    // Time calculations for days, hours, minutes and seconds
14
+    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
15
+    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
16
+    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
17
+    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
18
+
19
+    // Output the result in an element with id="demo"
20
+    document.getElementById("timer").innerHTML = "Plus que <strong id='timer-space'>" + days + "</strong> jours, <strong id='timer-space'>" + hours + "</strong> heures, <strong id='timer-space'>"
21
+        + minutes + "</strong> minutes et <strong id='timer-space'>" + seconds + "</strong> dans la civilisation...";
22
+
23
+    // If the count down is over, write some text
24
+    if (distance < 0) {
25
+        clearInterval(x);
26
+        document.getElementById("timer").innerHTML = "Bienvenue dans l'aventure !";
27
+    }
28
+}, 1000);

BIN
assets/pdf/Charte-GB.pdf View File


BIN
assets/pdf/Fiche-Autorisation-Droit-Image.pdf View File


BIN
assets/pdf/Fiche-Parrainge.pdf View File


BIN
assets/pdf/Mots-croises-plaquette.pdf View File


BIN
assets/pdf/Paroles.pdf View File


BIN
assets/pdf/Plaquette-INSA-2020-Promo-58.pdf.pdf View File


+ 95
- 134
blouse.php View File

@@ -1,134 +1,95 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-?>
4
-<div class="inner">
5
-    <h1>La Blouse</h1>
6
-    <p>Salut à toi PPA !</p>
7
-    <p>Tu te demandes sûrement pourquoi un article entier est dédié́ à la blouse. À l’INSARD, la blouse, et je dis
8
-        bien LA blouse, ce n’est pas du bizutage loin de là, c’est une tradition ancestrale que les Moldus ne
9
-        peuvent pas comprendre. Mais toi, par contre, il va vite falloir que tu t’y habitues.
10
-        Attention Potionniste Pauvrement Accoutré ! Il ne s’agit pas seulement d’un Tablier de protection lors de
11
-        tes cours de potions mais plutôt d’une sorte de cape d’invisibilité qui te suivra tout au long de ton aventure.
12
-    </p>
13
-    <p> Il faut savoir que chaque promotion est caractérisée par des couleurs de blouses. Et chaque blouse
14
-        <strong>doit être teintée et décorée </strong> d’après le thème de ta promo. </p>
15
-    <p>
16
-    <p>Par exemple, les autres promotions étaient : </p>
17
-    <ul id="list-blouse">
18
-        <li> En <strong style="color: #1a5dad">Bleu Galactique</strong> et
19
-            <strong style="color: #ee293d">Rouge Intersidéral</strong> (c’est nous, les Généreux Démons Attirants qui
20
-            vous ont
21
-            concocté une semaine d’accueil mémorable !) comme les soldats de la Guerre Froide que nous
22
-            représentons
23
-        </li>
24
-        <li> Tout en <strong style="color: #ee78d8">Rose</strong> comme les petits cochons de la ferme
25
-            (pour nos parrains et marraines)
26
-        </li>
27
-    </ul>
28
-    <p> Comme tu as été accepté à l’INSA, le Choixpeau t’a attribué une Maison, ceci étant, cette robe,
29
-        que dis-je ? Cette toge, cette ma-gni-fi-que Blouse est essentielle pour déterminer ton acceptation finale
30
-        à l’INSARD, l’Institut Novateur des Sorciers Apprentis Roguiens ou Dumbledoriens.
31
-        <br>
32
-        Cette année, tu vas devoir faire tes preuves dès la rentrée en customisant toi-même l’uniforme scolaire aux
33
-        couleurs de ta famille, et te surpasser ! C’est hyper-méga-supra important que tu l’aie, elle te sera
34
-        indispensable pendant la semaine d’accueil, et obligatoire pour les joyeux TP qui t’attendent...
35
-        Alors hop hop hop, on se retrousse les manches, on prend un fil une aiguille et on lit attentivement les
36
-        lignes qui suivent car elles vont déterminer tes chances de devenir Miss ou Mister Blouse !
37
-    </p>
38
-
39
-    <P>
40
-        Cette année le thème c’est <strong> Harry Potter</strong> donc en gros la magie et tout ça au cas où
41
-        tu n’aurais toujours pas compris… Les vacances sont terminées, tu as une tâche bien plus importante
42
-        désormais, donc au boulot !
43
-    </P>
44
-    <p> Comment s’y prendre ? Voici nos explications pour résoudre ce mystère : </p>
45
-    <ul id="list-blouse">
46
-        <li>Achète ou récupère une blouse de chimie tout ce qu’il y a de plus classique
47
-            (pour l’instant…). Bon, tu suis toujours ? Alors on monte dans la difficulté
48
-        </li>
49
-        <li>Teints ta blouse avec une teinture <strong style="color: #60bdff">Bleu envoûtant</strong> si tu es un
50
-            Verredaigle,
51
-            en un <strong style="color: #fafd78">Jaune Magnétique</strong> si tu représentes les Boomsouffles, si tu es
52
-            un Glissfondor prends
53
-            du <strong style="color: #FF5F5F">Rouge Surnaturel</strong> et enfin pour les Peksentards ce sera du
54
-            <strong style="color: #7FFD78">Vert Subjuguant</strong>.
55
-            <br> <strong style="color: #ff000f"> C’est la couleur de ta plaquette qui définit ta maison.</strong></li>
56
-        <li>Décore ta blouse en brodant et cousant selon le thème et ton équipe. Mais attention, tu ne
57
-            peux pas faire n’importe quoi, il y a des règles strictes à l’INSARD (on ne rigole pas ici).
58
-        </li>
59
-    </ul>
60
-    <h3>
61
-        Voici donc un petit recap’ des regles si tu
62
-        veux etre aussi style(e) que Fleur Delacour !
63
-
64
-    </h3>
65
-    <h2>Les 5 commandements de la blouse :</h2>
66
-    <ul id="list-blouse">
67
-        <li>
68
-            Uniquement fils et aiguilles tu utiliseras.
69
-        </li>
70
-        <li>
71
-            Par toi-même décorer ta blouse tu devras, l’aide de maman et mamie tu ne demanderas donc pas. Il est aussi
72
-            interdit d’utiliser n’importe quel type de magie : potions ou sortilèges. (Et oui, on y est tous passé, à
73
-            ton tour maintenant)
74
-        </li>
75
-        <li>
76
-            Pas de marqueurs ou de feutres, ils sont réservés aux Géniaux Druides Autoritaires que nous sommes pour
77
-            t’octroyer bonus ou malus ainsi que des tags comme se veut la tradition.
78
-        </li>
79
-        <li>
80
-            Comme sur le schéma qui suit, et avec les consignes qui suivent; tu devras décorer ta blouse :
81
-            <ul>
82
-                <li>
83
-                    On veut voir sur le devant de ta blouse, ton prénom, le blason et le nom de ton bled d’origine.
84
-                </li>
85
-                <li>
86
-                    A l’arrière de ta blouse, il est indispensable de mettre ton surnom (en gros et bien visible) et
87
-                    “INSA 57” en très gros, car tu aimes ta promo.
88
-                </li>
89
-                <li>
90
-                    Quant aux espaces vides, aux poches et aux manches, il faudra les combler de broderies et fantaisies
91
-                    sur le thème magique d’Harry Potter aux couleurs DE TA MAISON ! On doit pouvoir reconnaître si tu es
92
-                    un vicieux Peksentard, un Verredaigle éclairé, un valeureux Glissefondor ou un chaleureux
93
-                    Boomsouffle !
94
-                </li>
95
-            </ul>
96
-        </li>
97
-
98
-        <li>
99
-            Sois créatif et original, des bonus sont à la clé. Et n’oublies pas de faire preuve d’humour ! Et on ne le
100
-            dira jamais assez … GARE AUX TRICHEURS !
101
-        </li>
102
-    </ul>
103
-    <p>Applique-toi bien car qui sait, tu seras peut-être élu Miss ou Mister Blouse pendant la COM Nimbus 2001.</p>
104
-    <p>Ci-dessous, un exemple illustratif de ta blouse après customisation pour la team Peksentard, le but étant de s’en
105
-        inspirer mais pas de la reproduire…</p>
106
-    <p>
107
-        <img src="assets/images/blouse/blouse_exemple.jpg" alt="exemple blouse">
108
-    <h3>
109
-        Pour te motiver, voici ce que notre Miss Blouse avait fait l'annee derniere :
110
-    </h3>
111
-
112
-    <img src="assets/images/blouse/blouse_devant_sarah.jpg" alt="blouse sarah devant">
113
-    <img src="assets/images/blouse/blouse_dos_sarah.jpg" alt="blouse sarah dos">
114
-
115
-    <h3>
116
-        Et voici la blouse de notre Mister Blouse :
117
-    </h3>
118
-
119
-    <img src="assets/images/blouse/blouse_devant_maxime.jpg" alt="blouse maxime devant">
120
-    <img src="assets/images/blouse/blouse_dos_maxime.jpg" alt="blouse maxime dos">
121
-
122
-    <p>
123
-        <span class="quote">“ Ce qu’il nous faudrait, poursuivit lentement Dumbledore, c’est un peu plus de temps…”</span><br>
124
-        Harry Potter et le prisonnier d’Azkaban.
125
-
126
-    </p>
127
-</div>
128
-
129
-
130
-<?php
131
-$pageContent = ob_get_clean(); // Store html content in variable
132
-$pageTitle = "Blouse";
133
-include("includes/template.php"); // Display template with variable content
134
-?>
1
+<?php
2
+ob_start(); // Start reading html
3
+?>
4
+<div class="inner">
5
+    <h1>La Blouse</h1>
6
+
7
+    <p>Salut à toi Prétendant aux Poteaux Abominables !</p>
8
+    <p>Te voilà arrivé à la partie la plus importante de la plaquette. Et oui, même s’il ne
9
+    t’arrive pas par la mer, ce mot est bien le parchemin te donnant les règles de ta toute
10
+    première épreuve : la Blouse… que dis-je ? TA Blouse ! Ce que tu vas lire dans les prochains
11
+    paragraphes va t’expliquer comment confectionner ta pièce d'identité Insaïenne pour les 5
12
+    années à venir (voire plus si affinité…).
13
+    En tant que bon aventurier, tu ne viendras pas vêtu d’un simple maillot de bain, bah
14
+    ouais, les coups de soleil ça ne pardonne pas ! Heureusement pour toi, il est à l’INSA une
15
+    tradition ancestrale à laquelle tu n’échapperas pas : la Blouse. En plus de te protéger, elle
16
+    sera l'accessoire qui TE représente toi et ta promo.</p>
17
+    <p>Ainsi sur l’Île Nicoya Sauvage et Aride toulousaine tu pourras croiser différents spécimens :
18
+    <ul id="list-blouse">
19
+        <li>Les sorciers que nous sommes aux couleurs des 4 maisons d’Harry Potter.</li>
20
+        <li>Les soldats de la Guerre froide de la promo 56 en Bleu Galactique et en Rouge
21
+    Intersidéral.</li>
22
+        <li>Et toutes les autres tribus que nous te laisserons découvrir.
23
+    A ton tour, tu vas devoir créer ton passeport d’aventurier pour te lancer dans ces
24
+    grandes péripéties. Il est primordial que tu arrives avec ta blouse décorée à la rentrée. Tu la
25
+    porteras durant toute la semaine d’accueil ainsi que lors de tous tes futurs TPs. Mais pas de
26
+    panique ! C’est trivial, Miss et Mister Blouse 2019 vont tout t’expliquer, et à la fin, tu adoreras
27
+    Lacouture.
28
+    Maintenant que tu as été accepté à l’INSA, Denis t’a attribué une équipe.</li>
29
+        <li>Si ta plaquette est jaune comme le soleil du Costa Rica, tu appartiens à l’équipe des
30
+    Pekstanas.</li>
31
+        <li>Si par contre elle est rouge comme le corail des mers tropicales, alors tu fais partie
32
+    de l’équipe des Tamboom.
33
+    Fort de cette information, voilà ce que tu dois faire.</li>
34
+        <li>Récupère ta blouse blanche de chimie du lycée ou procures-en toi une nouvelle.</li>
35
+        <li>Teins ton vêtement aux couleurs de ton équipe : jaune flamboyant pour les
36
+    Pekstanas, rouge écarlate pour les Tamboom.</li>
37
+        <li>Décore ta blouse sur le thème de Koh-Lanta, donc en rapport avec l’émission, les
38
+    tropiques, l’aventure, Denis Brogniart... Tu as compris l’idée.</li>
39
+    </ul></b>
40
+    <b><strong>Mais attention ! Tu ne peux pas faire n’importe quoi, il y a des règles à respecter si tu
41
+    ne veux pas rester coincé à l’aéroport !</strong></p>
42
+
43
+    <h3>Les 5 commandements de la Blouse :</h3>
44
+    <p><ul id="list-blouse">
45
+        <li>Uniquement de fils et d’aiguilles tu t’armeras.</li>
46
+        <li>Par toi-même orner ta blouse tu devras, l’aide de maman, papa, mamie ou papi tu ne
47
+        demanderas donc pas. Eh oui, on y est tous passés, à ton tour maintenant !</li>
48
+        <li>Pas de marqueurs ou de feutres tu n’utiliseras, ils sont réservés aux Grands Denis
49
+        Avertis que nous sommes, pour t’octroyer bonus ou malus ainsi que des tags,
50
+        comme le veut la tradition !</li>
51
+        <li>Comme sur le schéma qui suit, et avec ces consignes, ta blouse tu décoreras :<br>
52
+        - Sur le devant on veut voir ton prénom, le blason et le nom de ton bled
53
+        d’origine.<br>
54
+        - À l’arrière, tu mettras ton surnom (en gros et bien visible) et “INSA 58” en
55
+        TRÈS gros, car tu aimes ta promo.<br>
56
+        - Quant aux espaces vides, aux poches et aux manches, il faudra les combler
57
+        de broderies et fantaisies, cousues sur le thème de Koh-Lanta et de ton
58
+        équipe.</li>
59
+        <li>Créatif et original tu seras, des bonus à la clé il y aura. Et bien-sûr, faire preuve
60
+        d’humour tu n’oublieras pas ! Et on ne le dira jamais assez …. GARE AUX
61
+        TRICHEURS !
62
+        Voilà un exemple illustratif de ta blouse après customisation, le but étant de s’en inspirer
63
+        mais pas de la reproduire…</li>
64
+        <img src="assets/images/blouse/blouse_exemple.png" alt="Exemple blouse">
65
+    </ul></p>
66
+
67
+    <p>Tu sais désormais tout sur cette première épreuve. Alors, comme dirait Denis,
68
+    « L’AVENTURE COMMENCE MAINTENANT ! » Applique-toi bien ! Car qui sait ? Tu seras
69
+    peut-être élu Miss ou Mister Blouse, au terme d’un concours épique entre les meilleurs
70
+    couturiers de l’île !
71
+    “À la fin il n’en restera qu’un !” (Je sais Jim… Tu n’as pas fait de faux départ, mais
72
+    l’histoire devait s’écrire ainsi.)</p>
73
+    <p>
74
+        
75
+    <h3>
76
+        Pour te motiver, voici ce que notre Miss Blouse avait fait l'annee derniere :
77
+    </h3>
78
+
79
+    <img src="assets/images/blouse/blouse_devant_elsa.jpg" alt="Blouse Elsa devant">
80
+    <img src="assets/images/blouse/blouse_derriere_elsa.jpg" alt="Blouse Elsa dos">
81
+
82
+    <h3>
83
+        Et voici la blouse de notre Mister Blouse :
84
+    </h3>
85
+
86
+    <img src="assets/images/blouse/blouse_devant_matthieu.jpg" alt="Blouse Matthieu devant">
87
+    <img src="assets/images/blouse/blouse_derriere_matthieu.jpg" alt="Blouse Matthieu dos">
88
+</div>
89
+
90
+
91
+<?php
92
+$pageContent = ob_get_clean(); // Store html content in variable
93
+$pageTitle = "Blouse";
94
+include("includes/template.php"); // Display template with variable content
95
+?>

+ 0
- 29
boomsouffle.php View File

@@ -1,29 +0,0 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-?>
4
-<div class="inner">
5
-    <h1>Boomsouffle</h1>
6
-
7
-    <p>
8
-        Bienvenue dans la plus belle des maisons ! A contrario des autres, nos valeurs sont les plus belles
9
-        : loyauté, sincérité, persévérance... La liste est encore
10
-        bien longue... Comme à ton habitude, tu te donneras à fond pour que l'on remporte cette Coupe !
11
-        Et je ne doute aucunement de tes capacités ! Alors je compte sur toi et ton gaz, et te donne rendez-vous
12
-        très vite, pour montrer aux autres qu'on est absolument indispensables et pour rentrer dans la légende !
13
-    </p>
14
-
15
-    <p>
16
-        N'oublie pas de rejoindre ton groupe <a href="https://www.facebook.com/groups/608536079623052/"> Facebook</a>
17
-        et de colorer ta blouse en un <strong style="color: #fafd78">Jaune Magnétique</strong> !
18
-    </p>
19
-    <br/>
20
-    Signé Sarah Diggouni
21
-    <br/>
22
-    <img style="max-width: 300px" src="assets/images/teams/diggouni.jpg"></div>
23
-
24
-<?php
25
-$pageContent = ob_get_clean(); // Store html content in variable
26
-$customBackgroundId = "bg_boo";
27
-$pageTitle = "Boomsouffle";
28
-include("includes/template.php"); // Display template with variable content
29
-?>

+ 24
- 0
chansons.php View File

@@ -0,0 +1,24 @@
1
+<?php

2
+ob_start(); // Start reading html

3
+?>

4
+    <div class="inner">

5
+        <h1>Les chansons</h1>

6
+		A l'INSA, Toulouse, les chansons sont très importantes, vous allez en chanter beaucoup et très fort pendant votre semaine d'intégration.

7
+		Pour que tu sois prêt pour cette semaine et pour l'entièreté de ta vie étudiante, on pense que c'est important que tu connaisses les chansons suivantes:

8
+        <br><br>

9
+        <iframe width="560" height="315" src="https://www.youtube.com/embed/gEPCrrLNfoI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

10
+        <br><br>

11
+		<iframe width="560" height="315" src="https://www.youtube.com/embed/FU-9kt-qi1g" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

12
+        <br><br>

13
+		<iframe width="560" height="315" src="https://www.youtube.com/embed/PnFNYo9VHAM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

14
+        <br><br>

15
+		<iframe width="560" height="315" src="https://www.youtube.com/embed/_YXjuDdcH3g" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

16
+        <br><br>

17
+    </div>

18
+

19
+

20
+<?php

21
+$pageContent = ob_get_clean(); // Store html content in variable

22
+$pageTitle = "Les chansons";

23
+include("includes/template.php"); // Display template with variable content

24
+?>

+ 97
- 98
classes/dao.php View File

@@ -1,98 +1,97 @@
1
-<?php
2
-
3
-class Dao
4
-{
5
-
6
-    private $conn;
7
-
8
-    public function __construct()
9
-    {
10
-        $username = 'accueil_insa';
11
-        $password = $this->read_password();
12
-        $dsn = 'mysql:dbname=accueil_insa;host=127.0.0.1';
13
-        try {
14
-            $this->conn = new PDO($dsn, $username, $password, [PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8']);
15
-        } catch (PDOException $e) {
16
-            echo $e;
17
-        }
18
-    }
19
-
20
-    private function read_password()
21
-    {
22
-        $real_path = __DIR__.DIRECTORY_SEPARATOR.".htpassdb";
23
-        $file = fopen($real_path, "r") or die("Unable to open DB password file!");;
24
-        $password = fgets($file);
25
-        fclose($file);
26
-        return trim($password);
27
-    }
28
-
29
-    public function get_score_team($team)
30
-    {
31
-        $sql = 'SELECT text, points FROM scores WHERE team = ?';
32
-        $cursor = $this->conn->prepare($sql);
33
-        $cursor->execute([$team]);
34
-        return $cursor->fetchAll(PDO::FETCH_ASSOC);
35
-    }
36
-
37
-    public function save_scores($scores_json, $team)
38
-    {
39
-        $sql = 'DELETE FROM scores WHERE team = ?';
40
-        $cursor = $this->conn->prepare($sql);
41
-        $cursor->execute([$team]);
42
-        foreach ($scores_json as $value) {
43
-            $sql = 'INSERT INTO scores (text, points, team) VALUES (?, ?, ?)';
44
-            $cursor = $this->conn->prepare($sql);
45
-            $cursor->execute([$value['text'], $value['points'], $team]);
46
-        }
47
-    }
48
-
49
-    public function get_map_info($selector)
50
-    {
51
-        $sql = 'SELECT title, description FROM map_insa WHERE selector = ?';
52
-        $cursor = $this->conn->prepare($sql);
53
-        $cursor->execute([$selector]);
54
-        return $cursor->fetchAll(PDO::FETCH_ASSOC);
55
-    }
56
-
57
-    public function get_map_selectors()
58
-    {
59
-        $sql = 'SELECT selector FROM map_insa';
60
-        $cursor = $this->conn->prepare($sql);
61
-        $cursor->execute();
62
-        return $cursor->fetchAll(PDO::FETCH_ASSOC);
63
-    }
64
-
65
-    public function save_map_info($selector, $info_json)
66
-    {
67
-        $sql = 'DELETE FROM map_insa WHERE selector = ?';
68
-        $cursor = $this->conn->prepare($sql);
69
-        $cursor->execute([$selector]);
70
-        $sql = 'INSERT INTO map_insa (title, description, selector) VALUES (?, ?, ?)';
71
-        $cursor = $this->conn->prepare($sql);
72
-        $cursor->execute([$info_json['title'], $info_json['description'], $selector]);
73
-    }
74
-
75
-    public function get_activities_of_day($day)
76
-    {
77
-        $sql = 'SELECT * FROM planning_insa WHERE day = ?';
78
-        $cursor = $this->conn->prepare($sql);
79
-        $cursor->execute([$day]);
80
-        return $cursor->fetchAll(PDO::FETCH_ASSOC);
81
-    }
82
-
83
-    public function save_day_activities($day, $info_json)
84
-    {
85
-        $sql = 'DELETE FROM planning_insa WHERE day = ?';
86
-        $cursor = $this->conn->prepare($sql);
87
-        $cursor->execute([$day]);
88
-
89
-        foreach ($info_json as $value) {
90
-            $sql = 'INSERT INTO planning_insa (day, small_title, full_title, description, color, start, length) VALUES (?, ?, ?, ?, ?, ?, ?)';
91
-            $cursor = $this->conn->prepare($sql);
92
-            $cursor->execute([$value['day'], $value['small_title'], $value['full_title'], $value['description'], $value['color'], $value['start'], $value['length']]);
93
-        }
94
-    }
95
-}
96
-
97
-
98
-
1
+<?php
2
+
3
+class Dao
4
+{
5
+
6
+    private $conn;
7
+
8
+    public function __construct()
9
+    {
10
+        $username = 'accueil_insa';
11
+        $password = $this->read_password();
12
+        $dsn = 'mysql:dbname=accueil_insa;host=127.0.0.1';
13
+        try {
14
+            $this->conn = new PDO($dsn, $username, $password, [PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8']);
15
+        } catch (PDOException $e) {
16
+            echo $e;
17
+        }
18
+    }
19
+
20
+    private function read_password()
21
+    {
22
+        $real_path = __DIR__.DIRECTORY_SEPARATOR.".htpassdb";
23
+        $file = fopen($real_path, "r") or die("Unable to open DB password file!");;
24
+        $password = fgets($file);
25
+        fclose($file);
26
+        return trim($password);
27
+    }
28
+
29
+    public function get_score_team($team)
30
+    {
31
+        $sql = 'SELECT text, points FROM scores WHERE team = ?';
32
+        $cursor = $this->conn->prepare($sql);
33
+        $cursor->execute([$team]);
34
+        return $cursor->fetchAll(PDO::FETCH_ASSOC);
35
+    }
36
+
37
+    public function save_scores($scores_json, $team)
38
+    {
39
+        $sql = 'DELETE FROM scores WHERE team = ?';
40
+        $cursor = $this->conn->prepare($sql);
41
+        $cursor->execute([$team]);
42
+        foreach ($scores_json as $value) {
43
+            $sql = 'INSERT INTO scores (text, points, team) VALUES (?, ?, ?)';
44
+            $cursor = $this->conn->prepare($sql);
45
+            $cursor->execute([$value['text'], $value['points'], $team]);
46
+        }
47
+    }
48
+
49
+    public function get_map_info($selector)
50
+    {
51
+        $sql = 'SELECT title, description FROM map_insa WHERE selector = ?';
52
+        $cursor = $this->conn->prepare($sql);
53
+        $cursor->execute([$selector]);
54
+        return $cursor->fetchAll(PDO::FETCH_ASSOC);
55
+    }
56
+
57
+    public function get_map_selectors()
58
+    {
59
+        $sql = 'SELECT selector FROM map_insa';
60
+        $cursor = $this->conn->prepare($sql);
61
+        $cursor->execute();
62
+        return $cursor->fetchAll(PDO::FETCH_ASSOC);
63
+    }
64
+
65
+    public function save_map_info($selector, $info_json)
66
+    {
67
+        $sql = 'DELETE FROM map_insa WHERE selector = ?';
68
+        $cursor = $this->conn->prepare($sql);
69
+        $cursor->execute([$selector]);
70
+        $sql = 'INSERT INTO map_insa (title, description, selector) VALUES (?, ?, ?)';
71
+        $cursor = $this->conn->prepare($sql);
72
+        $cursor->execute([$info_json['title'], $info_json['description'], $selector]);
73
+    }
74
+
75
+    public function get_activities_of_day($day)
76
+    {
77
+        $sql = 'SELECT * FROM planning_insa WHERE day = ?';
78
+        $cursor = $this->conn->prepare($sql);
79
+        $cursor->execute([$day]);
80
+        return $cursor->fetchAll(PDO::FETCH_ASSOC);
81
+    }
82
+
83
+    public function save_day_activities($day, $info_json)
84
+    {
85
+        $sql = 'DELETE FROM planning_insa WHERE day = ?';
86
+        $cursor = $this->conn->prepare($sql);
87
+        $cursor->execute([$day]);
88
+
89
+        foreach ($info_json as $value) {
90
+            $sql = 'INSERT INTO planning_insa (day, small_title, full_title, description, color, start, length) VALUES (?, ?, ?, ?, ?, ?, ?)';
91
+            $cursor = $this->conn->prepare($sql);
92
+            $cursor->execute([$value['day'], $value['small_title'], $value['full_title'], $value['description'], $value['color'], $value['start'], $value['length']]);
93
+        }
94
+    }
95
+}
96
+
97
+

+ 13
- 0
clubs.php View File

@@ -0,0 +1,13 @@
1
+<?php

2
+ob_start(); // Start reading html

3
+?>

4
+    <div class="inner">

5
+        <h1>Page en construction, repassez plus tard !</h1>

6
+    </div>

7
+

8
+

9
+<?php

10
+$pageContent = ob_get_clean(); // Store html content in variable

11
+$pageTitle = "Les clubs";

12
+include("includes/template.php"); // Display template with variable content

13
+?>

+ 0
- 12
computerorder.php View File

@@ -1,12 +0,0 @@
1
-<div><p>Remplis ce formulaire pour commander tes photos ! Surtout, n'oublie pas de noter le numéro de la photo que tu souhaites
2
-    suivie entre parenthèses du format ((P) ou (N) selon la taille), et ce pour toutes les photos que tu vas commander ! Et
3
-    ne te trompe pas non plus sur le jour des photos ! (Petite précision, le numéro de la photo est écrit en bas à gauche sur la photo
4
-    !) Si jamais tu as un problème au niveau de ta commande ou avec le formulaire, envoie un mail à cette
5
-        adresse : photos.semaine.accueil.2019@gmail.com .</p></div><br>
6
-<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSeO6bMXq2AHBkel6tFxsyzYpnkNU5AMbLMO9_MkQs02OyIMKA/viewform?embedded=true" width="750" height="1290" frameborder="0" marginheight="0" marginwidth="0">Chargement…</iframe>
7
-
8
-<?php
9
-$pageContent = ob_get_clean(); // Store html content in variable
10
-$pageTitle = "Commande";
11
-include("includes/template.php"); // Display template with variable content
12
-?>

+ 119
- 106
coms.php View File

@@ -1,107 +1,120 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-?>
4
-    <div class="inner">
5
-        <h1>Les Com's</h1>
6
-        <p>La liste de toutes les com's de ta semaine d'accueil, avec les contacts des responsables.</p>
7
-    </div>
8
-<?php
9
-$comId = "";
10
-$comTitle = "La Respo des Com's";
11
-$comDescription = "Prête à tous les possibles pendant cette semaine inténsement gazive !";
12
-$comRespo = "Léa Raucroy";
13
-$comRespoId = "lraucroy@etud.insa-toulouse.fr";
14
-$comRespo2 = "";
15
-$comRespo2Id = "";
16
-include("includes/com_template.php");
17
-
18
-
19
-$comId = "ComSiriusBlack";
20
-$comTitle = "Com Sirius Black";
21
-$comDescription = "Presque prêts pour vous accueillir !!!";
22
-$comRespo = "Christine Berho";
23
-$comRespoId = "berho@etud.insa-toulouse.fr";
24
-$comRespo2 = "Renaud Kempf";
25
-$comRespo2Id = "rkempf@etud.insa-toulouse.fr";
26
-include("includes/com_template.php");
27
-
28
-$comId = "";
29
-$comTitle = "Com Animagus";
30
-$comDescription = "Mot d'ordre : Incendio";
31
-$comRespo = "Célestine Paillé";
32
-$comRespoId = "";
33
-$comRespo2 = "Gaston Opler";
34
-$comRespo2Id = "opler@etud.insa-toulouse.fr";
35
-include("includes/com_template.php");
36
-
37
-$comId = "ComPatronus";
38
-$comTitle = "Com Patronus";
39
-$comDescription = "Là pour sauver des vies";
40
-$comRespo = "Yann Tremblay";
41
-$comRespoId = "tremblay@etud.insa-toulouse.fr";
42
-$comRespo2 = "Florian Hoorelbeke";
43
-$comRespo2Id = "hoorelbe@etud.insa-toulouse.fr";
44
-include("includes/com_template.php");
45
-
46
-$comId = "";
47
-$comTitle = "Com Stupefix";
48
-$comDescription = "Toujours là pour capturer vos moments magiques";
49
-$comRespo = "Shivaree Pimenta";
50
-$comRespoId = "pimenta@etud.insa-toulouse.fr";
51
-$comRespo2 = "";
52
-$comRespo2Id = "";
53
-include("includes/com_template.php");
54
-
55
-$comId = "";
56
-$comTitle = "Com Maraudeur";
57
-$comDescription = "A la recherche du vif d'or !";
58
-$comRespo = "Louis Roasio";
59
-$comRespoId = "roasio@etud.insa-toulouse.fr";
60
-$comRespo2 = "Nicolas Julia";
61
-$comRespo2Id = "njulia@etud.insa-toulouse.fr";
62
-include("includes/com_template.php");
63
-
64
-$comId = "";
65
-$comTitle = "Com Pre-au-Lard";
66
-$comDescription = "Prêts pour te faire découvrir les secrets de la ville rose";
67
-$comRespo = "Mathis Ribette";
68
-$comRespoId = "ribette@etud.insa-toulouse.fr";
69
-$comRespo2 = "Lucas Marchant";
70
-$comRespo2Id = "marchant@etud.insa-toulouse.fr";
71
-include("includes/com_template.php");
72
-
73
-$comId = "";
74
-$comTitle = "Com Ravitaillement";
75
-$comDescription = "Ici, c'est la <a id=hideenigma href=\"enigma.php\">Compote</a> qui vous ravit !";
76
-$comRespo = "Hugo Franceschi";
77
-$comRespoId = "francesc@etud.insa-toulouse.fr";
78
-$comRespo2 = "Abdessalem Guedouar";
79
-$comRespo2Id = "guedouar@etud.insa-toulouse.fr";
80
-include("includes/com_template.php");
81
-
82
-$comId = "";
83
-$comTitle = "Spe'Bar";
84
-$comDescription = "Des potions pour en voir de toutes les couleurs";
85
-$comRespo = "Alban Charonnat";
86
-$comRespoId = "charonna@etud.insa-toulouse.fr";
87
-$comRespo2 = "";
88
-$comRespo2Id = "";
89
-include("includes/com_template.php");
90
-
91
-$comId = "";
92
-$comTitle = "Com Nimbus 2001";
93
-$comDescription = "Et si la Com Nimbus réveillait votre Patronus ?";
94
-$comRespo = "Benjamin Fol";
95
-$comRespoId = "fol@etud.insa-toulouse.fr";
96
-$comRespo2 = "Clément Paillet";
97
-$comRespo2Id = "cpaillet@etud.insa-toulouse.fr";
98
-include("includes/com_template.php");
99
-
100
-?>
101
-    <div class="inner"></div>
102
-
103
-<?php
104
-$pageContent = ob_get_clean(); // Store html content in variable
105
-$pageTitle = "Com's";
106
-include("includes/template.php"); // Display template with variable content
1
+<?php
2
+ob_start(); // Start reading html
3
+?>
4
+    <div class="inner">
5
+        <h1>Les Com's</h1>
6
+        <p>La liste de toutes les com's de ta semaine d'accueil, avec les contacts des responsables.</p>
7
+    </div>
8
+<?php
9
+$comId = "";
10
+$comTitle = "Le Prez et la Vice Prez";
11
+$comRespo = "Maixent Cassagne";
12
+$comRespoId = "mcassagn@etud.insa-toulouse.fr";
13
+$comRespo2 = "Axelle Robillard";
14
+$comRespo2Id = "robillar@etud.insa-toulouse.fr";
15
+include("includes/com_template.php");
16
+
17
+$comId = "Bureau1";
18
+$comTitle = "Le Bureau pt.1";
19
+$comRespo = "Nicolas Birkeland<br>Secrétaire";
20
+$comRespoId = "birkelan@etud.insa-toulouse.fr";
21
+$comRespo2 = "Lea Steyer<br>Trésorière";
22
+$comRespo2Id = "steyer@etud.insa-toulouse.fr";
23
+include("includes/com_template.php");
24
+
25
+$comId = "Bureau2";
26
+$comTitle = "Le Bureau (la suite)";
27
+$comRespo = "Matthieu Tavernier<br>Responsable WINI";
28
+$comRespoId = "m_tavern@etud.insa-toulouse.fr";
29
+$comRespo2 = "Lou Ann Lacassagne<br>Responsable Communication";
30
+$comRespo2Id = "lalacass@etud.insa-toulouse.fr";
31
+include("includes/com_template.php");
32
+
33
+$comId = "ComAnimaventure";
34
+$comTitle = "Com Animaventure";
35
+$comRespo = "Lea Pleynet";
36
+$comRespoId = "pleynet@etud.insa-toulouse.fr";
37
+$comRespo2 = "Cyril Moquay";
38
+$comRespo2Id = "moquay@etud.insa-toulouse.fr";
39
+include("includes/com_template.php");
40
+
41
+$comId = "Com Immunité";
42
+$comTitle = "Com Immunité";
43
+$comRespo = "Solène Bourguet";
44
+$comRespoId = "sbourguet@laposte.net";
45
+$comRespo2 = "Ayoub Bahi";
46
+$comRespo2Id = "bahi@etud.insa-toulouse.fr";
47
+include("includes/com_template.php");
48
+
49
+$comId = "Kohmvile";
50
+$comTitle = "Kohm’v’ile";
51
+$comRespo = "Loann Valton";
52
+$comRespoId = "loann.valton@sfr.fr";
53
+$comRespo2 = "Elorri Laxague";
54
+$comRespo2Id = "elaxague@etud.insa-toulouse.fr";
55
+include("includes/com_template.php");
56
+
57
+$comId = "KohmBene";
58
+$comTitle = "Kohm Béné";
59
+$comRespo = "Clément Guichard";
60
+$comRespoId = "guichardclement@outlook.fr";
61
+$comRespo2 = "Eliot Drou";
62
+$comRespo2Id = "eliotd33wxcvbn@gmail.com";
63
+include("includes/com_template.php");
64
+
65
+$comId = "ComOrientINSA";
66
+$comTitle = "Com Orient’INSA";
67
+$comRespo = "Solène Delran";
68
+$comRespoId = "delran@etud.insa-toulouse.fr";
69
+$comRespo2 = "Antonin Lezat";
70
+$comRespo2Id = "lezat@etud.insa-toulouse.fr";
71
+include("includes/com_template.php");
72
+
73
+$comId = "ComRavitaillement";
74
+$comTitle = "Com Ravitaillement";
75
+$comRespo = "Zazie Gardeau";
76
+$comRespoId = "zazie.gardeau@hotmail.fr";
77
+$comRespo2 = "Justin Lombard";
78
+$comRespo2Id = "jlombard@etud.insa-toulouse.fr";
79
+include("includes/com_template.php");
80
+
81
+$comId = "ComMoundir";
82
+$comTitle = "Com Moundir";
83
+$comRespo = "Jim Noirbuisson";
84
+$comRespoId = "jim.noirbusson@gmail.com";
85
+$comRespo2 = "Liloï Lourde Rocheblave";
86
+$comRespo2Id = "liloilourderocheblave@gmail.com";
87
+include("includes/com_template.php");
88
+
89
+$comId = "ComPhoto";
90
+$comTitle = "Com Photo";
91
+$comRespo = "Pauline Dupuy";
92
+$comRespoId = "dupuypauline38@gmail.com";
93
+$comRespo2 = "";
94
+$comRespo2Id = "";
95
+include("includes/com_template.php");
96
+
97
+$comId = "ComGraphisme";
98
+$comTitle = "Com Graphisme";
99
+$comRespo = "Cyprien Heusse";
100
+$comRespoId = "cyprien@heusse.com";
101
+$comRespo2 = "Naïs Pistre";
102
+$comRespo2Id = "pistre@etud.insa-toulouse.fr";
103
+include("includes/com_template.php");
104
+
105
+$comId = "ComPlaquette";
106
+$comTitle = "Com Plaquette";
107
+$comRespo = "Lucie Blosse";
108
+$comRespoId = "lucie.blosse@gmail.com";
109
+$comRespo2 = "Sarah Bobillot";
110
+$comRespo2Id = "sarahbobillot04@gmail.com";
111
+include("includes/com_template.php");
112
+
113
+?>
114
+    <div class="inner"></div>
115
+
116
+<?php
117
+$pageContent = ob_get_clean(); // Store html content in variable
118
+$pageTitle = "Com's";
119
+include("includes/template.php"); // Display template with variable content
107 120
 ?>

+ 28
- 31
downloads.php View File

@@ -1,31 +1,28 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-?>
4
-    <div class="inner">
5
-        <h1>Les Telechargements</h1>
6
-        <p>Si jamais t'as perdu quelque chose, pas de problèmes ! Tu pourras trouver tout ce dont tu as besoin ici.</p>
7
-        <ul>
8
-
9
-            <li>
10
-                <a href="assets/pdf/Plaquette-INSA-2019-Promo-57.pdf">La plaquette</a>
11
-            </li>
12
-            <li>
13
-                <a href="assets/pdf/Fiche-Parrainge.pdf">La fiche de parrainage</a>
14
-            </li>
15
-            <li>
16
-                <a href="assets/pdf/Fiche-Parrainge-Anglais.pdf">La même en anglais - Godparent form in english</a>
17
-            </li>
18
-            <li>
19
-                <a href="assets/pdf/Fiche-Autorisation-Droit-Image.pdf">La charte de droit à l'image</a>
20
-            </li>
21
-            <li>
22
-                <a href="assets/pdf/Fiche-WINI.pdf">La fiche d'autorisation pour le WINI</a>
23
-            </li>
24
-        </ul>
25
-    </div>
26
-
27
-<?php
28
-$pageContent = ob_get_clean(); // Store html content in variable
29
-$pageTitle = "Téléchargements";
30
-include("includes/template.php"); // Display template with variable content
31
-?>
1
+<?php
2
+ob_start(); // Start reading html
3
+?>
4
+    <div class="inner">
5
+        <h1>Les Telechargements</h1>
6
+        <p>Si jamais t'as perdu quelque chose, pas de problèmes ! Tu pourras trouver tout ce dont tu as besoin ici.</p>
7
+        <ul>
8
+
9
+            <li>
10
+                <a href="assets/pdf/Plaquette-INSA-2020-Promo-58.pdf">La plaquette</a>
11
+            </li>
12
+            <li>
13
+                <a href="assets/pdf/Fiche-Parrainge.pdf">La fiche de parrainage</a>
14
+            </li>
15
+            <li>
16
+                <a href="assets/pdf/Charte-GB.pdf">La charte gestes barrières</a>
17
+            </li>
18
+            <li>
19
+                <a href="assets/pdf/Fiche-Autorisation-Droit-Image.pdf">La charte de droit à l'image</a>
20
+            </li>
21
+        </ul>
22
+    </div>
23
+
24
+<?php
25
+$pageContent = ob_get_clean(); // Store html content in variable
26
+$pageTitle = "Téléchargements";
27
+include("includes/template.php"); // Display template with variable content
28
+?>

+ 0
- 1
enigma.php View File

@@ -1 +0,0 @@
1
-Ils m'ont tous trouvé, j'attends leurs réponses. Signé : Arthurus

+ 25
- 25
errors/401.php View File

@@ -1,25 +1,25 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-$relativePath = "../";
4
-
5
-?>
6
-<div class="inner">
7
-    <h1>Acces non autorise</h1>
8
-    <h2>Erreur 401</h2>
9
-
10
-    <p>
11
-        Vous n'avez pas le droit d'accéder à cette page
12
-    </p>
13
-
14
-    <a href="<?= $relativePath ?>index.php" class="website-back-button">
15
-        Retour sur le site
16
-    </a>
17
-</div>
18
-
19
-<?php
20
-$pageContent = ob_get_clean(); // Store html content in variable
21
-$pageTitle = "Erreur 401";
22
-
23
-include($relativePath . "includes/template.php"); // Display template with variable content
24
-
25
-?>
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../";
4
+
5
+?>
6
+<div class="inner">
7
+    <h1>Acces non autorise</h1>
8
+    <h2>Erreur 401</h2>
9
+
10
+    <p>
11
+        Vous n'avez pas le droit d'accéder à cette page
12
+    </p>
13
+
14
+    <a href="<?= $relativePath ?>index.php" class="website-back-button">
15
+        Retour sur le site
16
+    </a>
17
+</div>
18
+
19
+<?php
20
+$pageContent = ob_get_clean(); // Store html content in variable
21
+$pageTitle = "Erreur 401";
22
+
23
+include($relativePath . "includes/template.php"); // Display template with variable content
24
+
25
+?>

+ 21
- 21
errors/404.php View File

@@ -1,21 +1,21 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-$relativePath = "../";
4
-
5
-?>
6
-<div class="inner">
7
-    <h1>Page non trouvee</h1>
8
-    <h2>Erreur 404</h2>
9
-
10
-    <a href="<?= $relativePath ?>index.php" class="website-back-button">
11
-        Retour sur le site
12
-    </a>
13
-</div>
14
-
15
-<?php
16
-$pageContent = ob_get_clean(); // Store html content in variable
17
-$pageTitle = "Erreur 404";
18
-
19
-include($relativePath . "includes/template.php"); // Display template with variable content
20
-
21
-?>
1
+<?php
2
+ob_start(); // Start reading html
3
+$relativePath = "../";
4
+
5
+?>
6
+<div class="inner">
7
+    <h1>Page non trouvee</h1>
8
+    <h2>Erreur 404</h2>
9
+
10
+    <a href="<?= $relativePath ?>index.php" class="website-back-button">
11
+        Retour sur le site
12
+    </a>
13
+</div>
14
+
15
+<?php
16
+$pageContent = ob_get_clean(); // Store html content in variable
17
+$pageTitle = "Erreur 404";
18
+
19
+include($relativePath . "includes/template.php"); // Display template with variable content
20
+
21
+?>

BIN
favicon.ico View File


+ 0
- 29
glissefondor.php View File

@@ -1,29 +0,0 @@
1
-<?php
2
-ob_start(); // Start reading html
3
-?>
4
-<div class="inner">
5
-    <h1>Glissefondor</h1>
6
-    <p>
7
-        Tu fais partie de la fabuleuse maison Glissefondor ! Comme tu le sais, notre prestige a été maintes
8
-        et maintes fois au cours du temps. Nous sommes aussi les plus
9
-        intelligents, les plus forts, et nous le démontrerons durant cette semaine. Depuis plusieurs
10
-        années nous ramenons la Coupe à la maison, et nous comptons de nouveau le faire cette année !
11
-        Alors ne te laisse pas envahir par ton inexpérience, n'oublie pas ta cape ainsi que ta b(r)aguette, et montre
12
-        aux autres
13
-        toute la grandeur de notre maison !
14
-    </p>
15
-    <p>
16
-        N'oublie pas de rejoindre ton groupe <a  href="https://www.facebook.com/groups/598630593981928/"> Facebook</a>
17
-        et de colorer ta blouse en un <strong style="color: #FF5F5F">Rouge Surnaturel</strong> !
18
-    </p>
19
-    <br/>
20
-    Signé Célestine Paillebledore
21
-    <br/>
22
-    <img style="max-width: 300px" src="assets/images/teams/paillebledore.jpg"></div>
23
-
24
-<?php
25
-$pageContent = ob_get_clean(); // Store html content in variable
26
-$customBackgroundId = "bg_gli";
27
-$pageTitle = "Glissefondor";
28
-include("includes/template.php"); // Display template with variable content
29
-?>

BIN
includes/.DS_Store View File


+ 38
- 38
includes/com_template.php View File

@@ -1,38 +1,38 @@
1
-<div class="com-container">
2
-    <h3 id="<?= $comId ?>"><?= $comTitle ?></h3>
3
-    <table id="table-coms">
4
-        <tr>
5
-            <td class="com-description"><?= $comDescription ?></td>
6
-        </tr>
7
-
8
-        <tr>
9
-            <td><br></td>
10
-        </tr>
11
-
12
-        <tr>
13
-            <td><?= $comRespo ?></td>
14
-        </tr>
15
-
16
-        <tr>
17
-            <td><?= $comRespoId ?></td>
18
-        </tr>
19
-        </tr>
20
-
21
-        <?php if ($comRespo2 != ""): ?>
22
-
23
-            <tr>
24
-                <td><br></td>
25
-            </tr>
26
-
27
-            <tr>
28
-                <td><?= $comRespo2 ?></td>
29
-            </tr>
30
-
31
-            <tr>
32
-                <td><?= $comRespo2Id ?></td>
33
-            </tr>
34
-
35
-        <?php endif; ?>
36
-
37
-    </table>
38
-</div>
1
+<div class="com-container">
2
+    <h3 id="<?= $comId ?>"><?= $comTitle ?></h3>
3
+    <table id="table-coms">
4
+        <tr>
5
+            <td class="com-description"><?= $comDescription ?></td>
6
+        </tr>
7
+
8
+        <tr>
9
+            <td><br></td>
10
+        </tr>
11
+
12
+        <tr>
13
+            <td><?= $comRespo ?></td>
14
+        </tr>
15
+
16
+        <tr>
17
+            <td><?= $comRespoId ?></td>
18
+        </tr>
19
+        </tr>
20
+
21
+        <?php if ($comRespo2 != ""): ?>
22
+
23
+            <tr>
24
+                <td><br></td>
25
+            </tr>
26
+
27
+            <tr>
28
+                <td><?= $comRespo2 ?></td>
29
+            </tr>
30
+
31
+            <tr>
32
+                <td><?= $comRespo2Id ?></td>
33
+            </tr>
34
+
35
+        <?php endif; ?>
36
+
37
+    </table>
38
+</div>

+ 19
- 19
includes/copyright.php View File

@@ -1,19 +1,19 @@
1
-<p class="copyright">
2
-    Site de la semaine d'accueil 2019 pour l'INSA Toulouse
3
-</p>
4
-<p class="copyright">
5
-    Tous les éléments présents sur ce site sont représentés à des fins humoristiques. Nous ne cherchons en aucun
6
-    cas à véhiculer un quelconque message et condamnons toute action irrespectueuse.
7
-</p>
8
-<p class="copyright">
9
-    Ce site utilise <a href="https://matomo.org/">Matomo</a> pour analyser la fréquentation de manière anonyme. Rendez-
10
-    vous sur la page <a href="<?= $relativePath ?>info.php">Infos</a> pour plus de détails.
11
-</p>
12
-<p class="copyright">Contacter <a href='<?= $relativePath ?>info.php#sarah'>Sarah, la responsable de la semaine</a>, pour plus d'informations</p>
13
-<p class="copyright"> Site maintenu par <a href='<?= $relativePath ?>info.php#arthur'>Arthur Boivert</a></p>
14
-<p class="copyright">
15
-    <script type="text/javascript">
16
-        var d = new Date();
17
-        document.write("Copyright © " + d.getFullYear() + " <a href='<?= $relativePath ?>info.php#arnaud'>Arnaud VERGNET</a>")
18
-    </script>
19
-</p>
1
+<p class="copyright">
2
+    Site de la semaine d'accueil 2020 pour l'INSA Toulouse
3
+</p>
4
+<p class="copyright">
5
+    Tous les éléments présents sur ce site sont représentés à des fins humoristiques. Nous ne cherchons en aucun
6
+    cas à véhiculer un quelconque message et condamnons toute action irrespectueuse.
7
+</p>
8
+<p class="copyright">
9
+    Ce site utilise <a href="https://matomo.org/">Matomo</a> pour analyser la fréquentation de manière anonyme. Rendez-
10
+    vous sur la page <a href="<?= $relativePath ?>info.php">Infos</a> pour plus de détails.
11
+</p>
12
+<p class="copyright">Contacter <a href='<?= $relativePath ?>info.php#maixent'>Maixent, le responsable de la semaine</a>, pour plus d'informations</p>
13
+<p class="copyright"> Site maintenu par <a href='<?= $relativePath ?>info.php#cyprien'>Cyprien Heusse</a></p>
14
+<p class="copyright">
15
+    <script type="text/javascript">
16
+        var d = new Date();
17
+        document.write("Copyright © " + d.getFullYear() + " <a href='<?= $relativePath ?>info.php#arnaud'>Arnaud VERGNET</a>")
18
+    </script>
19
+</p>

+ 8
- 8
includes/main_button_template.php View File

@@ -1,9 +1,9 @@
1
-<a title="<?php echo $text ?>" class="main-link" href="<?php echo $link ?>">
2
-    <span class="main-logo">
3
-        <?php if ($is_image == false): ?>
4
-        <i class="<?php echo $icon ?>"></i>
5
-        <?php else: ?>
6
-        <img src="<?php echo $icon ?>"/>
7
-        <?php endif; ?>
8
-    </span>
1
+<a title="<?php echo $text ?>" class="main-link" href="<?php echo $link ?>">
2
+    <span class="main-logo">
3
+        <?php if ($is_image == false): ?>
4
+        <i class="<?php echo $icon ?>"></i>
5
+        <?php else: ?>
6
+        <img src="<?php echo $icon ?>"/>
7
+        <?php endif; ?>
8
+    </span>
9 9
 </a>

+ 2
- 2
includes/pass/.htpass_admin View File

@@ -1,2 +1,2 @@
1
-Webmaster:$apr1$6ojl8f0i$.vMIf.RsGYz1up2t.hw5i0
2
-Admin:$apr1$ov3dki5b$1OSSa5Atl5IQAy3c9GqY61
1
+Webmaster:$apr1$6ojl8f0i$.vMIf.RsGYz1up2t.hw5i0
2
+Admin:$apr1$ov3dki5b$1OSSa5Atl5IQAy3c9GqY61

+ 3
- 3
includes/pass/.htpass_gda View File

@@ -1,3 +1,3 @@
1
-Webmaster:$apr1$6ojl8f0i$.vMIf.RsGYz1up2t.hw5i0
2
-Admin:$apr1$ov3dki5b$1OSSa5Atl5IQAy3c9GqY61
3
-GDA:$apr1$a9entdxg$x4/MeRH5aUezdXfzwCHpW.
1
+Webmaster:$apr1$6ojl8f0i$.vMIf.RsGYz1up2t.hw5i0
2
+Admin:$apr1$ov3dki5b$1OSSa5Atl5IQAy3c9GqY61
3
+GDA:$apr1$a9entdxg$x4/MeRH5aUezdXfzwCHpW.

+ 1
- 1
includes/pass/.htpass_webmaster View File

@@ -1 +1 @@
1
-Webmaster:$apr1$6ojl8f0i$.vMIf.RsGYz1up2t.hw5i0
1
+Webmaster:$apr1$6ojl8f0i$.vMIf.RsGYz1up2t.hw5i0

+ 18
- 18
includes/photos/folder_template.php View File

@@ -1,18 +1,18 @@
1
-<a href="<?= $folderLink ?>">
2
-    <span id="folderTitle"><?= $folderTitle ?></span>
3
-    <?php if ($photos > 1): ?>
4
-        <span id="folderPhotos"><?= $photos ?> photos</span>
5
-    <?php elseif ($photos == 1): ?>
6
-        <span id="folderPhotos"><?= $photos ?> photo</span>
7
-    <?php else: ?>
8
-        <span id="folderPhotos">vide</span>
9
-    <?php endif; ?>
10
-
11
-    <?php if ($albums > 1): ?>
12
-        <span id="folderAlbums"><?= $albums ?> albums</span>
13
-    <?php elseif ($albums == 1): ?>
14
-        <span id="folderAlbums"><?= $albums ?> album</span>
15
-    <?php endif; ?>
16
-</a>
17
-
18
-
1
+<a href="<?= $folderLink ?>">
2
+    <span id="folderTitle"><?= $folderTitle ?></span>
3
+    <?php if ($photos > 1): ?>
4
+        <span id="folderPhotos"><?= $photos ?> photos</span>
5
+    <?php elseif ($photos == 1): ?>
6
+        <span id="folderPhotos"><?= $photos ?> photo</span>
7
+    <?php else: ?>
8
+        <span id="folderPhotos">vide</span>
9
+    <?php endif; ?>
10
+
11
+    <?php if ($albums > 1): ?>
12
+        <span id="folderAlbums"><?= $albums ?> albums</span>
13
+    <?php elseif ($albums == 1): ?>
14
+        <span id="folderAlbums"><?= $albums ?> album</span>
15
+    <?php endif; ?>
16
+</a>
17
+
18
+

+ 1
- 1
includes/photos/path_template.php View File

@@ -1 +1 @@
1
-<li><a href="<?= $pathLink ?>"><?= $pathTitle ?></a></li>
1
+<li><a href="<?= $pathLink ?>"><?= $pathTitle ?></a></li>

+ 1
- 1
includes/photos/photo_template.php View File

@@ -1 +1 @@
1
-<img src="<?= $imageSrc ?>" onclick="displayBig(this);" class="photo" id="<?= $imageId ?>" alt=""/>
1
+<img src="<?= $imageSrc ?>" onclick="displayBig(this);" class="photo" id="<?= $imageId ?>" alt=""/>

+ 15
- 23
includes/score_counter.php View File

@@ -1,23 +1,15 @@
1
-<div class="score-counter" id="<?= $platformID ?>">
2
-    <img class="title-image" src="<?= $relativePath ?>assets/images/logos/titre-site-accueil.svg">
3
-    <div class="score-container">
4
-        <a href="<?= $relativePath ?>stats.php">
5
-
6
-            <div class="score-gli">
7
-                <?= $scoreGli ?>
8
-            </div>
9
-            <div class="score-separator"></div>
10
-            <div class="score-pek">
11
-                <?= $scorePek ?>
12
-            </div>
13
-            <div class="score-separator"></div>
14
-            <div class="score-boo">
15
-                <?= $scoreBoo ?>
16
-            </div>
17
-            <div class="score-separator"></div>
18
-            <div class="score-ver">
19
-                <?= $scoreVer ?>
20
-            </div>
21
-        </a>
22
-    </div>
23
-</div>
1
+<div class="score-counter" id="<?= $platformID ?>">
2
+    <img class="title-image" src="<?= $relativePath ?>assets/images/logos/titre-site-accueil.png">
3
+    <div class="score-container">
4
+        <a href="<?= $relativePath ?>stats.php">
5
+
6
+            <div class="score-tam">
7
+                <?= $scoreTam ?>
8
+            </div>
9
+            <div class="score-separator"></div>
10
+            <div class="score-pek">
11
+                <?= $scorePek ?>
12
+            </div>
13
+        </a>
14
+    </div>
15
+</div>

+ 14
- 16
includes/score_functions.php View File

@@ -1,16 +1,14 @@
1
-<?php
2
-
3
-function get_total_points($team)
4
-{
5
-    $dao = new Dao();
6
-    $points = 0;
7
-    foreach ($dao->get_score_team($team) as $row) {
8
-        $points += $row['points'];
9
-    }
10
-    return $points;
11
-}
12
-
13
-$scoreGli = get_total_points('gli');
14
-$scorePek = get_total_points('pek');
15
-$scoreBoo = get_total_points('boo');
16
-$scoreVer = get_total_points('ver');
1
+<?php
2
+
3
+function get_total_points($team)
4
+{
5
+    $dao = new Dao();
6
+    $points = 0;
7
+    foreach ($dao->get_score_team($team) as $row) {
8
+        $points += $row['points'];
9
+    }
10
+    return $points;
11
+}
12
+
13
+$scoreTam = get_total_points('tam');
14
+$scorePek = get_total_points('pek');

+ 59
- 55
includes/sidenav.php View File

@@ -1,55 +1,59 @@
1
-<div id="menuSidenav" class="sidenav">
2
-    <div id="sidenav-scroll">
3
-        <a href="<?= $relativePath ?>index.php" id="index" class="page-link"><span class="sidenav-content"><i
4
-                class="fas fa-home sidenav-icon"></i> L'Accueil</span></a>
5
-
6
-        <div class="separator"></div>
7
-
8
-        <a href="<?= $relativePath ?>planning.php" id="planning" class="page-link"><span class="sidenav-content"><i
9
-                class="fas fa-calendar-alt sidenav-icon"></i> Le
10
-            Planning</span></a>
11
-        <a href="<?= $relativePath ?>map.php" id="map" class="page-link"><span class="sidenav-content"><i
12
-                class="fas fa-map sidenav-icon"></i> Le
13
-            Plan</span></a>
14
-        <a href="<?= $relativePath ?>blouse.php" id="blouse" class="page-link"><span class="sidenav-content"><i
15
-                        class="fas fa-tshirt sidenav-icon"></i> La Blouse</span></a>
16
-        <a href="<?= $relativePath ?>parrainage.php" id="parrainage" class="page-link"><span class="sidenav-content"><i
17
-                class="fas fa-user-plus sidenav-icon"></i> Le
18
-            Parrainage</span></a>
19
-        <a href="<?= $relativePath ?>wini.php" id="wini" class="page-link"><span class="sidenav-content"><i
20
-                        class="fas fa-star sidenav-icon"></i> Le
21
-            WINI</span></a>
22
-
23
-        <div class="separator"></div>
24
-
25
-        <a href="<?= $relativePath ?>glissefondor.php" id="gli" class="page-link"><span class="sidenav-content"><img
26
-                src="<?= $relativePath ?>assets/images/logos/gli_logo.png" class="sidenav-image"> Glissefondor </span></a>
27
-        <a href="<?= $relativePath ?>peksentard.php" id="pek" class="page-link"><span class="sidenav-content"><img
28
-                src="<?= $relativePath ?>assets/images/logos/pek_logo.png" class="sidenav-image"> Peksentard </span></a>
29
-        <a href="<?= $relativePath ?>boomsouffle.php" id="boo" class="page-link"><span class="sidenav-content"><img
30
-                src="<?= $relativePath ?>assets/images/logos/boo_logo.png" class="sidenav-image"> Boomsouffle </span></a>
31
-        <a href="<?= $relativePath ?>verredaigle.php" id="ver" class="page-link"><span class="sidenav-content"><img
32
-                src="<?= $relativePath ?>assets/images/logos/ver_logo.png" class="sidenav-image"> Verredaigle </span></a>
33
-        <a href="<?= $relativePath ?>stats.php" id="stats" class="page-link"><span class="sidenav-content"><i
34
-                class="fas fa-list-ol sidenav-icon"></i> Les Stats</span></a>
35
-
36
-        <div class="separator"></div>
37
-
38
-        <a href="<?= $relativePath ?>photos.php" id="photos" class="page-link"><span class="sidenav-content"><i
39
-                        class="fas fa-camera sidenav-icon"></i> Les Photos</span></a>
40
-        <a href="<?= $relativePath ?>photosorder.php" id="order" class="page-link"><span class="sidenav-content"><i
41
-                        class="fas fa-cart-plus sidenav-icon"></i> Commande des photos</span></a>
42
-
43
-
44
-        <div class="separator"></div>
45
-
46
-        <a href="<?= $relativePath ?>coms.php" id="coms" class="page-link"><span class="sidenav-content"><i
47
-                class="fas fa-users sidenav-icon"></i> Les Com's</span></a>
48
-        <a href="<?= $relativePath ?>prevs.php" id="prevs" class="page-link"><span class="sidenav-content"><i
49
-                class="fas fa-medkit sidenav-icon"></i> La Prévention</span></a>
50
-        <a href="<?= $relativePath ?>downloads.php" id="downloads" class="page-link"><span class="sidenav-content"><i
51
-                class="fas fa-download sidenav-icon"></i>Téléchargements</span></a>
52
-        <a href="<?= $relativePath ?>info.php" id="contact" class="page-link"><span class="sidenav-content"><i
53
-                class="fas fa-info sidenav-icon"></i> Les Infos</span></a>
54
-    </div>
55
-</div>
1
+<div id="menuSidenav" class="sidenav">
2
+    <div id="sidenav-scroll">
3
+        <a href="<?= $relativePath ?>index.php" id="index" class="page-link"><span class="sidenav-content"><i
4
+                class="fas fa-home sidenav-icon"></i> L'Accueil</span></a>
5
+
6
+        <div class="separator"></div>
7
+
8
+        <a href="<?= $relativePath ?>planning.php" id="planning" class="page-link"><span class="sidenav-content"><i
9
+                class="fas fa-calendar-alt sidenav-icon"></i> Le
10
+            Planning</span></a>
11
+        <a href="<?= $relativePath ?>map.php" id="map" class="page-link"><span class="sidenav-content"><i
12
+                class="fas fa-map sidenav-icon"></i> Le
13
+            Plan</span></a>
14
+        <a href="<?= $relativePath ?>blouse.php" id="blouse" class="page-link"><span class="sidenav-content"><i
15
+                        class="fas fa-tshirt sidenav-icon"></i> La Blouse</span></a>
16
+        <a href="<?= $relativePath ?>parrainage.php" id="parrainage" class="page-link"><span class="sidenav-content"><i
17
+                class="fas fa-user-plus sidenav-icon"></i> Le
18
+            Parrainage</span></a>
19
+       <!-- <a href="<?//= $relativePath ?>wini.php" id="wini" class="page-link"><span class="sidenav-content"><i
20
+                        class="fas fa-star sidenav-icon"></i> Le
21
+            WINI</span></a> -->
22
+		<a href="<?= $relativePath ?>vacances.php" id="vacances" class="page-link"><span class="sidenav-content"><i
23
+                        class="fas fa-book sidenav-icon"></i> Le
24
+            Cahier de vacances</span></a>
25
+		<a href="<?= $relativePath ?>chansons.php" id="chansons" class="page-link"><span class="sidenav-content"><i
26
+                        class="fas fa-music sidenav-icon"></i> Les
27
+            Chansons</span></a>
28
+
29
+        <div class="separator"></div>
30
+
31
+        <a href="<?= $relativePath ?>tamboom.php" id="tam" class="page-link"><span class="sidenav-content"><img
32
+                src="<?= $relativePath ?>assets/images/logos/tam_logo.png" class="sidenav-image"> Tamboom </span></a>
33
+        <a href="<?= $relativePath ?>pekstanas.php" id="pek" class="page-link"><span class="sidenav-content"><img
34
+                src="<?= $relativePath ?>assets/images/logos/pek_logo.png" class="sidenav-image"> Pekstanas </span></a>
35
+        <a href="<?= $relativePath ?>stats.php" id="stats" class="page-link"><span class="sidenav-content"><i
36
+                class="fas fa-list-ol sidenav-icon"></i> Les Stats</span></a>
37
+
38
+        <div class="separator"></div>
39
+
40
+        <a href="<?= $relativePath ?>photos.php" id="photos" class="page-link"><span class="sidenav-content"><i
41
+                        class="fas fa-camera sidenav-icon"></i> Les Photos</span></a>
42
+
43
+
44
+        <div class="separator"></div>
45
+
46
+        <a href="<?= $relativePath ?>coms.php" id="coms" class="page-link"><span class="sidenav-content"><i
47
+                class="fas fa-users sidenav-icon"></i> Les Com's</span></a>
48
+		<a href="<?= $relativePath ?>lydia.php" id="lydia" class="page-link"><span class="sidenav-content"><i
49
+                class="fas fa-credit-card sidenav-icon"></i> Lydia et Izly</span></a>
50
+		<a href="<?= $relativePath ?>clubs.php" id="clubs" class="page-link"><span class="sidenav-content"><i
51
+                class="fas fa-sitemap sidenav-icon"></i> Les Clubs</span></a>
52
+        <a href="<?= $relativePath ?>prevs.php" id="prevs" class="page-link"><span class="sidenav-content"><i
53
+                class="fas fa-medkit sidenav-icon"></i> La Prévention</span></a>
54
+        <a href="<?= $relativePath ?>downloads.php" id="downloads" class="page-link"><span class="sidenav-content"><i
55
+                class="fas fa-download sidenav-icon"></i>Téléchargements</span></a>
56
+        <a href="<?= $relativePath ?>info.php" id="contact" class="page-link"><span class="sidenav-content"><i
57
+                class="fas fa-info sidenav-icon"></i> Les Infos</span></a>
58
+    </div>
59
+</div>

+ 0
- 0
includes/template.php View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save