<?php
require("config.inc.php");
require("header.inc.php");
+
+$order = isset($_REQUEST['order']) ? $_REQUEST['order'] : "p";
switch ($order) {
case "i":
$sql_suffix = "order by id";
$sql_suffix = "order by type";
break;
case "p":
- default:
$sql_suffix = "order by path";
break;
}
<table>
<tr>
- <th><a href="<?php echo $PHP_SELF; ?>?order=i">id</a></th>
- <th><a href="<?php echo $PHP_SELF; ?>?order=t">type</a></th>
- <th><a href="<?php echo $PHP_SELF; ?>?order=p">path</a></th>
+ <th><a href="<?php echo $_SERVER['PHP_SELF']; ?>?order=i">id</a></th>
+ <th><a href="<?php echo $_SERVER['PHP_SELF']; ?>?order=t">type</a></th>
+ <th><a href="<?php echo $_SERVER['PHP_SELF']; ?>?order=p">path</a></th>
</tr>
<?php