73 lines
2.3 KiB
PHP
Executable File
73 lines
2.3 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");
|
|
include("conf.php");
|
|
|
|
echo "<div id='contenu'>";
|
|
echo "<center><h1>Impression du planning de la journée</h1></center><br />";
|
|
|
|
if(count($_POST) == 0 or count($_GET) > 0) {
|
|
echo "<p style='text-align:center;font-weight:bold;font-size:14px;'>Veuillez saisir la date à imprimer.</p>";
|
|
echo "<form action='impression_journee.php' method='post'>";
|
|
echo "<center><table>";
|
|
if(! isset($_GET['date'])) {
|
|
$date=date("d/m/Y", time());
|
|
}
|
|
else {
|
|
$date=$_GET['date'];
|
|
}
|
|
echo "<tr><td>Date :</td><td><input type='text' name='date' maxlength='10' value='$date'><strong>(format jj/mm/aaaa)</strong></td></tr>";
|
|
echo "<tr><td colspan='2'><center><input type='submit' name='valider' value='Valider'></center></td></tr>";
|
|
echo "</table></center>";
|
|
echo "</form>";
|
|
}
|
|
else {
|
|
$date=$_POST['date'];
|
|
|
|
if(strlen($date)==10) {
|
|
list($jour, $mois, $annee)=explode("/", $date);
|
|
echo "<center>";
|
|
echo "<a href='planning_imp_html.php?id_club=$id_club&annee=$annee&mois=$mois&jour=$jour' target='_blank'>Cliquez ici pour afficher le planning au format HTML</a>";
|
|
echo "<br /><br />";
|
|
echo "<a href='fct_planning_pdf_jour.php?id_club=$id_club&annee=$annee&mois=$mois&jour=$jour' target='_blank'>Cliquez ici pour afficher le planning au format PDF (format A4 paysage)</a>";
|
|
echo "<br /><br />";
|
|
echo "<a href='impression_journee.php'>Cliquez ici pour choisir une autre date</a>";
|
|
echo "</center>";
|
|
}
|
|
else {
|
|
echo "La date n'a pas le bon format !!<br />";
|
|
echo "Cliquez <a href='impression_journee.php?date=$date'>ici</a> pour recommencer";
|
|
}
|
|
}
|
|
|
|
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");
|
|
}
|
|
|
|
|