68 lines
2.2 KiB
PHP
Executable File
68 lines
2.2 KiB
PHP
Executable File
<?php
|
|
session_start();
|
|
header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');
|
|
if(isset($_SESSION['Admin']) and $_SESSION['Admin']==2 and isset($_SESSION['Club'])) {
|
|
$id_club=$_SESSION['Club'];
|
|
$id_admin=$_SESSION['Id'];
|
|
?>
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Language" content="fr">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
|
|
<title>LE SERVEUR VOCAL DE RESERVATION DES SALLES DE TENNIS</title>
|
|
<link rel="stylesheet" href="style.css" type="text/css">
|
|
</head>
|
|
|
|
<body>
|
|
<div id="tout">
|
|
<?php
|
|
include("enTete.php");
|
|
include("menu.php");
|
|
echo "<center><h1>Gestion des news du club</h1></center><br /><br />";
|
|
|
|
echo "<p>";
|
|
echo "Cette page vous permet de modifier ou de supprimer les news du club qui sont affichés sur le site.";
|
|
echo "</p>";
|
|
|
|
include("conf.php");
|
|
|
|
$requete="SELECT * FROM infos_site WHERE id_club='$id_club' ORDER BY date DESC";
|
|
$reponse=mysqli_query($db_connection, $requete) or die ("Erreur no".mysqli_errno($db_connection)()." : ".mysqli_error($db_connection)()."<br>");
|
|
$existe=mysqli_num_rows($reponse);
|
|
if($existe>0) {
|
|
echo "<center><table border='1' width='75%'>";
|
|
echo "<th>Date</th><th>Posteur</th><th>information</th><th>Modification</th><th>Suppression</th>";
|
|
while($info=mysqli_fetch_object($reponse)) {
|
|
echo "<tr>";
|
|
list($annee, $mois, $jour)=explode("-", $info->date);
|
|
echo "<td><center>$jour/$mois/$annee</center></td>";
|
|
echo "<td><center>$info->posteur</center></td>";
|
|
echo "<td><center>$info->information</center></td>";
|
|
echo "<td><center><a href='modif_info.php?id_info=$info->id_info'>Modifier</a></center></td>";
|
|
echo "<td><center><a href='suppr_info.php?id_info=$info->id_info'>Supprimer</a></center></td>";
|
|
echo "</tr>";
|
|
}
|
|
echo "</table></center>";
|
|
}
|
|
else {
|
|
echo "<center>Vous n'avez aucune information enregistrée sur le site. Cliquez sur le lien ci-dessous pour en ajouter une.</center>";
|
|
}
|
|
|
|
echo "<br /><br />";
|
|
echo "<center><a href='creer_info.php'>Ajouter une information</a></center>";
|
|
echo "<br /><br />";
|
|
|
|
|
|
include("deco_admin_club.php");
|
|
include("piedDePage.php");
|
|
}
|
|
else {
|
|
echo("Non autorisé - Redirection vers la page d'identification dans 2 secondes");
|
|
sleep(2);
|
|
include("admin_login.php");
|
|
}
|
|
|
|
?>
|