57 lines
1.2 KiB
PHP
Executable File
57 lines
1.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']==1) {
|
|
?>
|
|
<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("mysql_compat.php");
|
|
include("conf.php");
|
|
$db_connection=mysql_connect($db_host,$db_user,$password);
|
|
|
|
echo "<center><h1>Envoi de SMS</h1></center><br /><br />";
|
|
|
|
$numeros=$_POST['numero'];
|
|
$message=$_POST['message'];
|
|
|
|
include("fonction_sms.php");
|
|
$reponse=envoi_sms($numeros, $message);
|
|
if($reponse==80) {
|
|
$message="Le SMS a bien été envoyé.";
|
|
}
|
|
else {
|
|
$message="Une erreur s'est produite lors de l'envoi du SMS. Code erreur : ".$reponse;
|
|
}
|
|
|
|
echo $message."<br /><br />";
|
|
|
|
include("deco_admin.php");
|
|
echo "</div>";
|
|
include("piedDePage.php");
|
|
?>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
<?php
|
|
}
|
|
else {
|
|
echo("Non autorisé - Redirection vers la page d'identification dans 2 secondes");
|
|
sleep(2);
|
|
include("admin_login.php");
|
|
}
|
|
|
|
?>
|