forked from rebillar/site-accueil-insa
dashboard de création/supression de la bdd
This commit is contained in:
parent
f0e537dd74
commit
8dc1e8acff
4 changed files with 57 additions and 10 deletions
52
admin/bdd.php
Normal file
52
admin/bdd.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
include "script.php";
|
||||
|
||||
include "../script/db_init.php";
|
||||
|
||||
include "../assets/scripts/globals.php";
|
||||
|
||||
if($user['perm'] < 3) {
|
||||
header('Location: deco.php');
|
||||
}
|
||||
|
||||
$req = $db->query("SELECT * FROM enigma WHERE id = 1");
|
||||
$r = $req -> fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
|
||||
if(isset($_GET["radio_bdd"])){
|
||||
|
||||
switch($_GET["radio_bdd"]){
|
||||
|
||||
case "drop":
|
||||
drop_bdd($LISTE_TABLES);
|
||||
break;
|
||||
|
||||
case "create":
|
||||
create_bdd($LISTE_TABLES);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Admin / index</title>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
|
||||
<form action="/admin/bdd.php">
|
||||
<input type="radio" name="radio_bdd" id="drop_bdd" value="drop">
|
||||
<label for="drop_bdd">Supprimer la base de données</label>
|
||||
<input type="radio" name="radio_bdd" id="create_bdd" value="create">
|
||||
<label for="create_bdd">Créer la base de données</label>
|
||||
<input type="submit" value="CLIQUE PAS SUR MOI, PAS LE VENDREDI STP">
|
||||
</form>
|
||||
</main>
|
||||
|
||||
|
||||
</body>
|
|
@ -74,6 +74,7 @@ if(isset($_POST['login'])) {
|
|||
break;
|
||||
}
|
||||
echo "<br> Si l'onglet que vous recherchez n'est pas disponible, demandez avec amour et volupté une élévation d'acces à un respo web.";
|
||||
|
||||
} else {
|
||||
?>
|
||||
<form method="POST">
|
||||
|
@ -85,6 +86,8 @@ if(isset($_POST['login'])) {
|
|||
echo "<font color='red'>".$error."</font>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
|
@ -38,7 +38,8 @@ if($user_exist != 1) {
|
|||
.'<a href="planning.php"><li class="orange">Planning</li></a>'
|
||||
.'<a href="gestion_des_acces.php"><li class="red">Gestion des accès</li></a>'
|
||||
.'<a href="enigma.php"><li class="red">Enigma</li></a>'
|
||||
.'<a href="../matomo" target="_matomo"><li class="red">Matomo</li></a>';
|
||||
.'<a href="../matomo" target="_matomo"><li class="red">Matomo</li></a>'
|
||||
.'<a href="bdd.php"><li class="red">/!\DANGER ZONE/!\</li></a>';
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
//page de test pour la création automatique de la BDD
|
||||
include "../script/db_init.php";
|
||||
|
||||
echo "quoicoubeh";
|
||||
|
||||
?>
|
Loading…
Reference in a new issue