You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?php
|
|
session_start();
|
|
require_once('../connexionBD.php');
|
|
require_once ('../ressources/verifconnecte.php');
|
|
require_once ('../ressources/user.php');
|
|
|
|
$user = getUser($mail);
|
|
if(!$user['estadmin']){
|
|
header('Location: ../index.php');
|
|
exit();
|
|
}
|
|
|
|
$delmail = isset($_POST['delmail']) ? $_POST['delmail'] : NULL;
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="admin.css">
|
|
<link rel="stylesheet" href="../ressources/navbaradminhtml.css">
|
|
<link rel="stylesheet" href="../index.css">
|
|
<script src="../inscription/inscription.js"></script>
|
|
<title>Administration</title>
|
|
</head>
|
|
<body>
|
|
<?php require_once("../ressources/navbaradminhtml.php"); ?>
|
|
<div id="formulaire">
|
|
<h1>Administration</h1>
|
|
<div>
|
|
<h1>Supprimer un utilisateur</h1>
|
|
<fieldset>
|
|
<form action="admin.php" method="post">
|
|
<table>
|
|
<tr>
|
|
<td><p>mail de l'utilisateur a supprimer :</p></td>
|
|
<td><input type="text" name="delmail"/></td>
|
|
</tr>
|
|
<tr>
|
|
<td><p><input type="submit" name="deluserbutton" value="supprimer l'utilisateur"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><?php if (isset($_POST['delmail'])) { deluser($delmail); }?></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</fieldset>
|
|
</div>
|
|
</body>
|
|
</html>
|