Files
resatennis_tyroltenn/www/tyroltenn/creer_permanent.php

80 lines
2.5 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'];
?>
<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>Cr&eacute;ation d'un compte pour les permanents</h1></center><br />";
if(count($_POST)==0) {
echo "<p>";
echo "Le titulaire d'un compte \"permanent\" peut r&eacute;aliser les actions suivantes: <br />";
echo "<ul>";
echo "<li>Cr&eacute;er des r&eacute;servations sans quota ;</li>";
echo "<li>Cr&eacute;er des cartes invit&eacute; et ajouter des jetons ;</li>";
echo "<li>Annuler seulement ses r&eacute;servations ;</li>";
echo "</ul>";
echo "</p>";
echo "</p>";
echo "<form action='creer_permanent.php' method='post'>";
echo "<center><table>";
echo "<tr><td>Nom du permanent:</td><td><input type='text' name='nom' id='nom' value='' maxlength='50' /></td></tr>";
echo "<tr><td>Pr&eacute;nom du permanent:</td><td><input type='text' name='prenom' id='prenom' value='' maxlength='50' /></td></tr>";
echo "<tr><td>Mot de passe:</td><td><input type='password' name='mdp1' id='mdp1' value='' maxlength='50' /></td></tr>";
echo "<tr><td>Confirmer le mot de passe:</td><td><input type='password' name='mdp2' id='mdp2' value='' maxlength='50' /></td></tr>";
echo "</table></center>";
echo "</form>";
echo "</p>";
}
else {
}
echo "<br /><br />";
include("deco_admin_club.php");
include("piedDePage.php");
}
else {
echo("Non autoris&eacute; - Redirection vers la page d'identification dans 2 secondes");
sleep(2);
include("admin_login.php");
}
/************************************************************/
/* Conversion d'un timestamp MySQL en timestamp Unix */
/* (AAAAMMJJHHMMSS) => secondes depuis le 01/01/1970 00:00 */
/************************************************************/
function conversion_ts_mysql($champ_ts) {
$ts=0;
$annee=substr($champ_ts,0,4);
$mois=substr($champ_ts,5,2);
$jour=substr($champ_ts,8,2);
$heure=substr($champ_ts,11,2);
$min=substr($champ_ts,14,2);
$sec=substr($champ_ts,17,2);
$ts=mktime($heure, $min, $sec, $mois, $jour, $annee);
return $ts;
}
?>