Moved admin related files together

This commit is contained in:
keplyx 2019-07-29 19:02:52 +02:00
parent 845c90f725
commit 01c3c84012
13 changed files with 33 additions and 30 deletions

View file

@ -1,7 +1,6 @@
<?php <?php
ob_start(); // Start reading html ob_start(); // Start reading html
$relativePath = "../"; $relativePath = "../../";
require_once $relativePath . 'classes/dao.php';
?> ?>
<div class="inner"> <div class="inner">
<h1>ADMIN</h1> <h1>ADMIN</h1>
@ -36,11 +35,12 @@ require_once $relativePath . 'classes/dao.php';
</div> </div>
<br> <br>
<div class="buttons-container"> <div class="buttons-container">
<a href="index.php" class="admin-back-button"> <a href="../index.php" class="admin-back-button">
<i class="fas fa-chevron-left"></i>
Retour sur la page admin Retour sur la page admin
</a> </a>
<a href="<?= $relativePath ?>planning.php" class="website-back-button"> <a href="<?= $relativePath ?>planning.php" class="website-back-button">
Retour sur le site Voir sur le site
</a> </a>
</div> </div>
</div> </div>
@ -52,7 +52,7 @@ require_once $relativePath . 'classes/dao.php';
$pageContent = ob_get_clean(); // Store html content in variable $pageContent = ob_get_clean(); // Store html content in variable
$pageTitle = "Édition planning"; $pageTitle = "Édition planning";
$pageScripts = "<script type=\"text/javascript\" src=\"../assets/js/planningManager.js\"></script>"; $pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/planningManager.js\"></script>";
include($relativePath . "includes/template.php"); // Display template with variable content include($relativePath . "includes/template.php"); // Display template with variable content

View file

@ -1,6 +1,6 @@
<?php <?php
ob_start(); // Start reading html ob_start(); // Start reading html
$relativePath = "../"; $relativePath = "../../";
?> ?>
<div class="inner"> <div class="inner">
<h1>ADMIN</h1> <h1>ADMIN</h1>
@ -39,11 +39,12 @@ $relativePath = "../";
</div> </div>
<br> <br>
<div class="buttons-container"> <div class="buttons-container">
<a href="index.php" class="admin-back-button"> <a href="../index.php" class="admin-back-button">
<i class="fas fa-chevron-left"></i>
Retour sur la page admin Retour sur la page admin
</a> </a>
<a href="<?= $relativePath ?>stats.php" class="website-back-button"> <a href="<?= $relativePath ?>stats.php" class="website-back-button">
Retour sur le site Voir sur le site
</a> </a>
</div> </div>
</div> </div>
@ -55,7 +56,7 @@ $relativePath = "../";
$pageContent = ob_get_clean(); // Store html content in variable $pageContent = ob_get_clean(); // Store html content in variable
$pageTitle = "Édition scores"; $pageTitle = "Édition scores";
$pageScripts = "<script type=\"text/javascript\" src=\"../assets/js/statsManager.js\"></script>"; $pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/statsManager.js\"></script>";
include($relativePath . "includes/template.php"); // Display template with variable content include($relativePath . "includes/template.php"); // Display template with variable content

View file

@ -34,21 +34,21 @@ $relativePath = "../";
<h4> <h4>
Action des GDA Action des GDA
</h4> </h4>
<a href="scores.php">Editer les scores</a> <a href="gda/scores.php">Editer les scores</a>
</div> </div>
<div class="admin-container"> <div class="admin-container">
<h4> <h4>
Action des admins Action des admins
</h4> </h4>
<a href="planning.php">Editer le planning</a> <a href="admin/planning.php">Editer le planning</a>
</div> </div>
<div class="admin-container"> <div class="admin-container">
<h4> <h4>
Action des webmasters Action des webmasters
</h4> </h4>
<a href="map.php">Editer le texte de la carte</a> <a href="webmaster/map.php">Editer le texte de la carte</a>
<br/> <br/>
<a href="update.php">Mises à jour</a> <a href="webmaster/update.php">Mises à jour</a>
</div> </div>
</div> </div>

View file

@ -1,6 +1,6 @@
<?php <?php
ob_start(); // Start reading html ob_start(); // Start reading html
$relativePath = "../"; $relativePath = "../../";
require_once $relativePath . 'classes/dao.php'; require_once $relativePath . 'classes/dao.php';
?> ?>
<div class="inner"> <div class="inner">
@ -25,11 +25,12 @@ require_once $relativePath . 'classes/dao.php';
</div> </div>
<br> <br>
<div class="buttons-container"> <div class="buttons-container">
<a href="index.php" class="admin-back-button"> <a href="../index.php" class="admin-back-button">
<i class="fas fa-chevron-left"></i>
Retour sur la page admin Retour sur la page admin
</a> </a>
<a href="<?= $relativePath ?>map.php" class="website-back-button"> <a href="<?= $relativePath ?>map.php" class="website-back-button">
Retour sur le site Voir sur le site
</a> </a>
</div> </div>
</div> </div>
@ -41,7 +42,7 @@ require_once $relativePath . 'classes/dao.php';
$pageContent = ob_get_clean(); // Store html content in variable $pageContent = ob_get_clean(); // Store html content in variable
$pageTitle = "Édition carte"; $pageTitle = "Édition carte";
$pageScripts = "<script type=\"text/javascript\" src=\"../assets/js/mapManager.js\"></script>"; $pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/mapManager.js\"></script>";
include($relativePath . "includes/template.php"); // Display template with variable content include($relativePath . "includes/template.php"); // Display template with variable content

View file

@ -1,6 +1,6 @@
<?php <?php
ob_start(); // Start reading html ob_start(); // Start reading html
$relativePath = "../"; $relativePath = "../../";
require_once $relativePath . 'classes/dao.php'; require_once $relativePath . 'classes/dao.php';
$log = shell_exec("git log | head -50"); // Show the first few commits $log = shell_exec("git log | head -50"); // Show the first few commits
@ -33,11 +33,12 @@ $log = shell_exec("git log | head -50"); // Show the first few commits
</p> </p>
<div class="buttons-container"> <div class="buttons-container">
<a href="index.php" class="admin-back-button"> <a href="../index.php" class="admin-back-button">
<i class="fas fa-chevron-left"></i>
Retour sur la page admin Retour sur la page admin
</a> </a>
<a href="<?= $relativePath ?>index.php" class="website-back-button"> <a href="<?= $relativePath ?>index.php" class="website-back-button">
Retour sur le site Voir sur le site
</a> </a>
</div> </div>
</div> </div>
@ -49,7 +50,7 @@ $log = shell_exec("git log | head -50"); // Show the first few commits
$pageContent = ob_get_clean(); // Store html content in variable $pageContent = ob_get_clean(); // Store html content in variable
$pageTitle = "Mise à jour"; $pageTitle = "Mise à jour";
$pageScripts = "<script type=\"text/javascript\" src=\"../assets/js/updateManager.js\"></script>"; $pageScripts = "<script type=\"text/javascript\" src=\"".$relativePath."assets/js/admin/updateManager.js\"></script>";
include($relativePath . "includes/template.php"); // Display template with variable content include($relativePath . "includes/template.php"); // Display template with variable content

View file

@ -52,6 +52,7 @@
color: #000; color: #000;
border-radius: 5px; border-radius: 5px;
padding: 15px; padding: 15px;
margin: 5px;
box-shadow: 0 0 5px #000000; box-shadow: 0 0 5px #000000;
} }
@ -66,6 +67,7 @@
color: #000; color: #000;
border-radius: 5px; border-radius: 5px;
padding: 15px; padding: 15px;
margin: 5px;
box-shadow: 0 0 5px #000000; box-shadow: 0 0 5px #000000;
} }

View file

@ -11,7 +11,7 @@ $(document).ready(function () {
'info': info, 'info': info,
}; };
$.get( $.get(
"../ajax/write/master.php", "ajax.php",
object, object,
function (data) { function (data) {
alert(data); alert(data);
@ -33,7 +33,7 @@ function getMapInfo(selector) {
'selector': selector, 'selector': selector,
}; };
$.get( $.get(
"../ajax/read", "../../ajax/read",
object, object,
function (data) { function (data) {
console.log(data); console.log(data);

View file

@ -141,7 +141,7 @@ function saveDayActivities() {
"entries": currentActivities, "entries": currentActivities,
}; };
$.get( $.get(
"../ajax/write/planning.php", "ajax.php",
object, object,
function (data) { function (data) {
alert(data); alert(data);
@ -155,7 +155,7 @@ function getDayActivities(day) {
'day': day, 'day': day,
}; };
$.get( $.get(
"../ajax/read", "../../ajax/read",
object, object,
function (data) { function (data) {
currentActivities = data; currentActivities = data;

View file

@ -23,10 +23,11 @@ $(document).ready(function () {
"lines": lines, "lines": lines,
}; };
$.get( $.get(
"../ajax/write/scores.php", 'ajax.php',
object, object,
function (data) { function (data) {
alert(data); alert(data);
window.location.reload();
}); });
}); });
$('#teamSelect').on('change', function () { $('#teamSelect').on('change', function () {
@ -55,9 +56,7 @@ function addLine(text, value) {
$entry.find('.edit-text-input').val(text); $entry.find('.edit-text-input').val(text);
$entry.find('.edit-value-input').val(value); $entry.find('.edit-value-input').val(value);
$("#removeEntry_" + uniqueID).on("click", function () { $("#removeEntry_" + uniqueID).on("click", function () {
console.log($($entry));
$entry.remove(); $entry.remove();
}); });
} }
@ -73,7 +72,6 @@ function getLine() {
}; };
array.push(values); array.push(values);
} }
console.log(array);
return array; return array;
} }
@ -84,7 +82,7 @@ function getScores(team) {
'team': team, 'team': team,
}; };
$.get( $.get(
"../ajax/read", "../../ajax/read",
object, object,
function (data) { function (data) {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {