handle require_once and include_once, allow single quotes
[old-projects.git] / depview / list.php
CommitLineData
ecf0462b
JL
1<?php
2require("config.inc.php");
3require("header.inc.php");
3dbc39ba
JL
4
5$order = isset($_REQUEST['order']) ? $_REQUEST['order'] : "p";
ecf0462b
JL
6switch ($order) {
7 case "i":
8 $sql_suffix = "order by id";
9 break;
10 case "t":
11 $sql_suffix = "order by type";
12 break;
13 case "p":
ecf0462b
JL
14 $sql_suffix = "order by path";
15 break;
16}
17?>
18
19<table>
20<tr>
3dbc39ba
JL
21 <th><a href="<?php echo $_SERVER['PHP_SELF']; ?>?order=i">id</a></th>
22 <th><a href="<?php echo $_SERVER['PHP_SELF']; ?>?order=t">type</a></th>
23 <th><a href="<?php echo $_SERVER['PHP_SELF']; ?>?order=p">path</a></th>
ecf0462b
JL
24</tr>
25
26<?php
4d16103e
WP
27$res = mysql_query("select id,path,type,dir from file $sql_suffix");
28while (list($id,$path,$type,$dir)=mysql_fetch_row($res)) {
ecf0462b
JL
29?>
30<tr class="<?php echo $type; ?>">
31 <td><?php echo $id; ?></td>
32 <td><?php echo $type; ?></td>
4d16103e 33 <td><a href="file.php?id=<?php echo $id; ?>&d=<?php echo $dir; ?>"><?php echo $path; ?></a></td>
ecf0462b
JL
34</tr>
35<?php
36}
37?>
38</table>
39
40<?php
41require("footer.inc.php");
42?>