--- /dev/null
+<?php
+require("config.inc.php");
+require("header.inc.php");
+$res = mysql_query("select path from file where id=$id");
+if (!list($page)=mysql_fetch_row($res)) {
+ echo "page not found";
+ include("footer.inc.php");
+ exit;
+}
+?>
+
+<h1>Dependencies for <?php echo $page; ?></h1>
+
+<table>
+<tr>
+ <th>context</th>
+ <th>file</th>
+</tr>
+
+<?php
+$res = mysql_query("select dep.id,dep.dir,dep.dep,file.path from dep left join file on dep.dep=file.id where page=$id order by dep.dir");
+while (list($id,$dir,$dep,$path)=mysql_fetch_row($res)) {
+$res2 = mysql_query("select path from dir where id=$dir");
+list($dirname)=mysql_fetch_row($res2);
+?>
+<tr>
+ <td><?php echo $dirname; ?></td>
+ <td><a href="file.php?id=<?php echo $dep; ?>"><?php echo $path; ?></a></td>
+</tr>
+<?php
+}
+?>
+</table>
+
+<?php
+require("footer.inc.php");
+?>
--- /dev/null
+<?php
+require("config.inc.php");
+require("header.inc.php");
+?>
+
+<table>
+<tr>
+ <th>id</th>
+ <th>path</th>
+</tr>
+
+<?php
+$res = mysql_query("select id,path from file where type='page'");
+while (list($id,$path)=mysql_fetch_row($res)) {
+?>
+<tr>
+ <td><?php echo $id; ?></td>
+ <td><a href="file.php?id=<?php echo $id; ?>"><?php echo $path; ?></a></td>
+</tr>
+<?php
+}
+?>
+</table>
+
+<?php
+require("footer.inc.php");
+?>