2002-10-29 14:48:58 +00:00
|
|
|
<?PHP // $Id$
|
|
|
|
|
|
|
|
require("../config.php");
|
|
|
|
|
2003-06-12 11:55:03 +00:00
|
|
|
if (! $info = document_file("files.php", false)) {
|
|
|
|
error("404 - File Not Found");
|
|
|
|
}
|
2005-01-27 05:01:16 +00:00
|
|
|
|
|
|
|
$string = array();
|
2004-05-16 10:26:04 +00:00
|
|
|
if ($CFG->forcelogin) {
|
|
|
|
require_login();
|
|
|
|
}
|
|
|
|
|
2002-12-29 14:39:52 +00:00
|
|
|
include($info->filepath);
|
|
|
|
|
2002-10-29 14:48:58 +00:00
|
|
|
print_header();
|
2005-01-27 05:01:16 +00:00
|
|
|
|
|
|
|
$ulopen = false;
|
|
|
|
|
2002-12-29 14:39:52 +00:00
|
|
|
foreach ($string as $file => $filename) {
|
2005-01-27 05:01:16 +00:00
|
|
|
if (substr($file,0,1) == "-") {
|
|
|
|
if($ulopen) {
|
|
|
|
echo '</ul>';
|
|
|
|
}
|
|
|
|
echo '<h1>'.$filename.'</h1><ul>';
|
|
|
|
$ulopen = true;
|
2003-10-01 18:00:41 +00:00
|
|
|
} else {
|
2005-01-27 05:01:16 +00:00
|
|
|
echo '<li><a target="main" href="'.$CFG->wwwroot.'/doc/?file='.$file.'">'.$filename.'</a></li>';
|
2003-10-01 18:00:41 +00:00
|
|
|
}
|
2002-12-29 14:39:52 +00:00
|
|
|
}
|
2005-01-27 05:01:16 +00:00
|
|
|
if($ulopen) {
|
|
|
|
echo '</ul>';
|
|
|
|
}
|
|
|
|
|
2005-01-27 05:20:31 +00:00
|
|
|
// Sloppy way to produce valid markup... there should be a print_footer_minimal().
|
|
|
|
echo '</div></div></body></html>';
|
2002-10-29 14:48:58 +00:00
|
|
|
|
|
|
|
?>
|