| 1 | <?php |
| 2 | require("config.inc.php"); |
| 3 | require("header.inc.php"); |
| 4 | switch ($order) { |
| 5 | case "i": |
| 6 | $sql_suffix = "order by id"; |
| 7 | break; |
| 8 | case "t": |
| 9 | $sql_suffix = "order by type"; |
| 10 | break; |
| 11 | case "p": |
| 12 | default: |
| 13 | $sql_suffix = "order by path"; |
| 14 | break; |
| 15 | } |
| 16 | ?> |
| 17 | |
| 18 | <table> |
| 19 | <tr> |
| 20 | <th><a href="<?php echo $PHP_SELF; ?>?order=i">id</a></th> |
| 21 | <th><a href="<?php echo $PHP_SELF; ?>?order=t">type</a></th> |
| 22 | <th><a href="<?php echo $PHP_SELF; ?>?order=p">path</a></th> |
| 23 | </tr> |
| 24 | |
| 25 | <?php |
| 26 | $res = mysql_query("select id,path,type,dir from file $sql_suffix"); |
| 27 | while (list($id,$path,$type,$dir)=mysql_fetch_row($res)) { |
| 28 | ?> |
| 29 | <tr class="<?php echo $type; ?>"> |
| 30 | <td><?php echo $id; ?></td> |
| 31 | <td><?php echo $type; ?></td> |
| 32 | <td><a href="file.php?id=<?php echo $id; ?>&d=<?php echo $dir; ?>"><?php echo $path; ?></a></td> |
| 33 | </tr> |
| 34 | <?php |
| 35 | } |
| 36 | ?> |
| 37 | </table> |
| 38 | |
| 39 | <?php |
| 40 | require("footer.inc.php"); |
| 41 | ?> |