64 lines
1.8 KiB
PHP
Executable File
64 lines
1.8 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>Modification d'une information du club</h1></center><br />";
|
|
|
|
echo "<br /><br />";
|
|
|
|
include("conf.php");
|
|
|
|
|
|
$info=$_POST['info'];
|
|
$posteur=$_POST['posteur'];
|
|
$date=$_POST['date'];
|
|
$id_info=$_POST['id_info'];
|
|
|
|
list($jour, $mois, $annee)=explode("/", $date);
|
|
if($jour=="" or $mois=="" or $annee=="") {
|
|
echo "Il y a un problème de saisie dans la date.";
|
|
}
|
|
else {
|
|
if($jour<10) { $jour="0".$jour;}
|
|
if($mois<10) { $mois="0".$mois;}
|
|
$date_en="$annee-$mois-$jour";
|
|
$requete="UPDATE infos_site SET date='$date_en', posteur='$posteur', information='$info' WHERE id_info='$id_info'";
|
|
$reponse=mysqli_query($db_connection, $requete) or die ("Erreur no".mysqli_errno($db_connection)()." : ".mysqli_error($db_connection)()."<br>");
|
|
}
|
|
|
|
echo "L'information a été modifiée avec succès.<br />";
|
|
echo "<center><a href='creer_info.php'>Ajouter une nouvelle information</a></center><br /><br />";
|
|
echo "<center><a href='modif_suppr_infos.php'>Retour à la liste des informations</a></center><br /><br />";
|
|
|
|
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");
|
|
}
|
|
|
|
?>
|