initial commit
[old-projects.git] / depview / file.php
1 <?php
2 require("config.inc.php");
3 require("header.inc.php");
4 $res = mysql_query("select path from file where id=$id");
5 if (!list($page)=mysql_fetch_row($res)) {
6 echo "page not found";
7 include("footer.inc.php");
8 exit;
9 }
10 ?>
11
12 <h1>Dependencies for <?php echo $page; ?></h1>
13
14 <table>
15 <tr>
16 <th>context</th>
17 <th>file</th>
18 </tr>
19
20 <?php
21 $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");
22 while (list($id,$dir,$dep,$path)=mysql_fetch_row($res)) {
23 $res2 = mysql_query("select path from dir where id=$dir");
24 list($dirname)=mysql_fetch_row($res2);
25 ?>
26 <tr>
27 <td><?php echo $dirname; ?></td>
28 <td><a href="file.php?id=<?php echo $dep; ?>"><?php echo $path; ?></a></td>
29 </tr>
30 <?php
31 }
32 ?>
33 </table>
34
35 <?php
36 require("footer.inc.php");
37 ?>