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
| <?php
session_start();
include("config.php");
include("functions.php");
if(!isset($_SESSION["updated"]))
{
AddView();
$_SESSION["updated"]=1;
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="<?php echo $config['path'].'style.css'; ?>" />
<title>Saint Vaast - Topo</title>
</head>
<body>
<?php
mysql_connect($config['dbConnection']['host'], $config['dbConnection']['user'], $config['dbConnection']['pass']) or die ("Connexion Sql impossible.");
mysql_select_db($config['dbConnection']['name']) or die ("Connexion a la base impossible.");
$result=mysql_query("SELECT secteur.idsecteur, secteur.namesect, voie.idvoie, voie.namevoie FROM secteur, voie WHERE secteur.idsecteur=voie.idsecteur order by idsecteur,idvoie");
$num_rows=mysql_num_rows($result);
$num_secteur=0;
echo 'Liste des voies par secteur :<dl><dt>';
for($i=0;$i<$num_rows;$i++)
{
$row=mysql_fetch_assoc($result);
if($num_secteur!=$row["idsecteur"])
{
$num_secteur=$row["idsecteur"];
echo '</dt><dt><a href="'.$config['path'].'show.php?x='.$row['idsecteur'].'">'.$row["namesect"].'</a>';
}
echo '<dd><a href="'.$config['path'].'show.php?x='.$row['idsecteur'].'&y='.$row['idvoie'].'">'.$row["namevoie"].'</a></dd>';
}
echo '</dt></dl>';
echo '<br /><a href="'.$config['path'].'">accueil</a>';
echo '<br />';ReadView();
?>
</body>
</html> |
Partager