1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
| <?php
session_start(); // On relaye la session
if (session_is_registered("authentification") && $_SESSION['privilege'] == "user"){ // vérification sur la session authentification (la session est-elle enregistrée?)
// On vérifie également si la session ouverte est bien une session admin et on place ici les éventuelles actions en cas de réussite de la connexion
}
else {
header("Location:index.php?erreur=intru"); // redirection en cas d'échec
}
require('connexion.php');
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="styles.css" rel="stylesheet" type="text/css">
<meta name="" content="">
<title>Supprimer une annonce</title>
<meta name="Microsoft Theme" content="none">
</head>
<?php include_once('haut.php'); ?>
<body>
<?
$date=date("Y-m-d H:i:s"); // Date actuelle au format (JJ-MM-AAAA)
$ladate=date("d-m-Y");
$lheure=date("H:i:s");
?>
<div align="center">
<table width="90%" border="0" align="center">
<tr>
<td><font size="2" class="titre">Rechercher une demande</font></td>
</tr>
<tr>
<td height="22">
<div align="left">
<p align="left"><u>Pour plus de detail sur une annonce,
vous devez cliquer sur le lien '<font color="#0099CC">Detail</font>'</u></p>
</div>
</td>
</tr>
</table>
<br>
<form method="post" action="">
<table width="90%" border="1" cellpadding="0" cellspacing="0" class="tableaux">
<tr>
<td width="2%"><b>Nom;</b></td>
<td width="19%"><b>Prénom </b></td>
<td width="37%"><b>Message</font></b></td>
<td width="28%"><b>Etat</b></td>
<td width="14%"><b>Detail</b></td>
</tr>
<?
$j=1;
$dbprotect = mysql_connect($hostname_dbprotect, $username_dbprotect, $password_dbprotect) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db($database_dbprotect, $dbprotect);
$select = ("SELECT 'Nom_du_patient','Prenom_du_patient','Etat' FROM `dossier_tbl` WHERE service='user'");
$result = mysql_query($select,$dbprotect) or die("Erreur SQL : $resultat<br/>".mysql_error());;
$total = mysql_num_rows($result);
if($total) {
while( $ligne=mysql_fetch_array($result)){?>
<tr>
<td width="2%">
<?php echo $j++; ?>
</td>
<td width="19%">
<?php echo $ligne["Nom_du_patient"]; ?>
</td>
<td width="37%">
<?php
echo stripslashes(nl2br($ligne["Prenom_du_patient"]));
?>
</td>
<td width="28%">
<?
echo $ligne["Etat"];
?>
</td>
<td width="14%"> <div align="center"><a href="detail.php?form_no=<?php echo $ligne["id"];?>">Detail</a></div>
</td>
</tr>
<? } ?>
<? } ?>
</table>
</form>
<p> </p>
<p><a href="ajouter.php">Ajouter une annonce</a></p>
<p> </p>
</div>
</body>
</html>
<? include_once('bas.php'); ?> |
Partager