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
| <head>
<link rel="stylesheet" href="../jquery/jquery.treeview.css" />
<link rel="stylesheet" href="../jquery/screen.css" />
<script src="../jquery/jquery.js" type="text/javascript"></script>
<script src="../jquery/jquery.treeview.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#tree").treeview({
collapsed: true,
animated: "medium",
control:"#sidetreecontrol",
persist: "location"
});
})
</script>
</head>
<body>
<ul id="tree">
<?php
foreach($entite as $uneEntite)
{
$e = $uneEntite['nom_entite']; ?>
<li><span><strong><?php echo $e; ?> </strong></span>
<ul>
<?php
$numEn = $uneEntite['ref_entite'];
foreach ($agence as $uneAgence)
{
$ag = $uneAgence['num_entite'];
if($numEn == $ag)
{ ?>
<li><a href="#"><?php echo $uneAgence['nom_agence']; ?></a></li>
<ul>
<?php
$numAg = $uneAgence['ref_agence'];
foreach($chantier as $ch)
{
$cha = $ch['num_agence'];
if($cha == $numAg)
{ ?>
<li><a href="#"> <?php echo $ch['nom_chantier']; ?> </a></li>
<?php
}
}?> </ul> <?php
}
}?> </ul> <?php
}
?>
</u>
</body> |
Partager