+ <th>relation</th>
+ <th>context</th>
+ <th>file</th>
+</tr>
+<?php
+$res = mysql_query("select dep.dir,dep.type,dep.page,file.path from dep left join file on dep.page=file.id where dep=$id order by dep.dir");
+while (list($dir,$type,$pid,$ppath)=mysql_fetch_row($res)) {
+$res2 = mysql_query("select path from dir where id=$dir");
+list($dirname)=mysql_fetch_row($res2);
+?>
+<tr <?php if ($d==$dir) echo 'class="current"'; ?>>
+ <td><?php echo $type; ?></td>