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
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Document sans nom</title>
<?php
include "mairies\connec.inc.php";
?>
</head>
<body>
<div align="center"><span class='cc'>Commune commençant par : </span>
<?php
$lettres = array ("b","c","e","g","l","m","n","p","r","s","v");
for ($numero = 0; $numero < 11; $numero++)
{
echo '<p style="display: inline";><a href="index.php?lettre='.$lettres[$numero].'">'.strtoupper($lettres[$numero]).'</a></p>';
if($numero != 26)
echo ' - ';
}
echo "<br />";
$lettre = (isset($_GET['lettre']) && in_array($_GET['lettre'], $lettres)) ? $_GET['lettre'] : "b";
//Résultat
$sql = "SELECT id, nom, maire, adresse, cp, ville, tel, fax, email, lundi, mardi, mercredi, jeudi, vendredi, samedi, information, abrege "
."FROM mairies WHERE ville LIKE '$lettre%' ORDER BY nom;";
$query = mysql_query($sql,$connec) or die("erreur5 -> ".mysql_error());
echo "<table width='700' border='0' cellpadding='10' cellspacing='0' align='center'>";
while($ligne = mysql_fetch_array($query))
{
$nom = $ligne['nom'];
$maire = $ligne['maire'];
$adresse = $ligne['adresse'];
$cp = $ligne['cp'];
$ville = $ligne['ville'];
$tel = $ligne['tel'];
$fax = $ligne['fax'];
$email = $ligne['email'];
$lundi = $ligne['lundi'];
$mardi = $ligne['mardi'];
$mercredi = $ligne['mercredi'];
$jeudi = $ligne['jeudi'];
$vendredi = $ligne['vendredi'];
$samedi = $ligne['samedi'];
$info = $ligne['information'];
$abrege = $ligne['abrege'];
echo "<tr>";
echo "<td align = 'left' width='350'><span class='nom'>$nom</span></br>$maire</br>$adresse</br>$cp $ville</br>Tel : $tel</br>Fax : $fax</br>$email</br>$info</td>";
echo "<td align = 'left' width='350'><span class='abre'><strong>Abrégé : $abrege</strong></span></br>Lundi : $lundi</br>Mardi : $mardi</br>Mercredi : $mercredi</br>Jeudi : $jeudi</br>Vendredi : $vendredi</br>Samedi : $samedi</td>";
echo "</tr>";
}
echo "</table>";
?>
</div>
<p> </p>
</body>
</html> |
Partager