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
| <script language="javascript">
function montre(id)
{
var d = document.getElementById(id);
for (var i=1; i<=200; i++)
{
if (document.getElementById('smenu'+ i))
{
document.getElementById('smenu'+ i).style.display = 'none';
}
}
if(d)
{
d.style.display = 'block';
}
}
window.onload = montre;
</script>
</head>
<body>
<dl id="menu">
<?
$sql = " SELECT cat_cle, cat_lib FROM categorie WHERE cat_lib LIKE '%20%' ORDER BY cat_lib DESC ";
$qry = pg_query($conn, $sql);
$i = 0;
while ($result = pg_fetch_assoc($qry))
{
$i++;
?>
<dt onClick="javascript:montre('smenu<?=$i?>');">Bodemer Infos de <?=$result['cat_lib']?></dt>
<dd id="smenu<?=$i?>">
<ul>
<?
$sql2 = " SELECT doc_cle, doc_lib, doc_type, doc_file, doc_date, doc_cat FROM documents WHERE doc_cat=".$result['cat_cle']." ORDER BY doc_lib DESC ";
$qry2 = pg_query($conn, $sql2);
while ($result2 = pg_fetch_assoc($qry2))
{
$clefile = $result2['doc_file'];
?>
<li>
<a href="../admin/file.php?cle=<?=$result2['doc_cle']?>&oid=<?=$clefile?>&doc_type=<?=$result2['doc_type']?>&doc_lib=<?=$result2['doc_lib']?>" target="bodemer">
<?=$result2['doc_lib']?>
</a>
</li>
<?
}
?>
</ul>
</dd>
<?
}
?>
</dl> |
Partager