2002-10-29 14:48:58 +00:00
|
|
|
<?PHP // $Id$
|
|
|
|
|
|
|
|
require("../config.php");
|
|
|
|
|
2004-12-12 07:01:35 +00:00
|
|
|
$file = optional_param('file', "", PARAM_FILE); // docs file to view straight
|
|
|
|
$frame = optional_param('frame', "", PARAM_FILE); // docs file to view in frame
|
|
|
|
$sub = optional_param('sub', "", PARAM_CLEAN); // sub-section (named anchor)
|
2002-12-29 16:28:41 +00:00
|
|
|
|
2004-05-16 10:26:04 +00:00
|
|
|
if ($CFG->forcelogin) {
|
|
|
|
require_login();
|
|
|
|
}
|
|
|
|
|
2003-01-06 08:23:36 +00:00
|
|
|
if (!empty($sub)) {
|
|
|
|
$sub = "#$sub";
|
2003-01-06 08:47:57 +00:00
|
|
|
} else {
|
|
|
|
$sub = "";
|
2003-01-06 08:23:36 +00:00
|
|
|
}
|
|
|
|
|
2002-12-29 14:39:52 +00:00
|
|
|
if (empty($file)) {
|
|
|
|
$include = false;
|
2003-01-01 15:13:56 +00:00
|
|
|
if (empty($frame)) {
|
|
|
|
$file = "intro.html";
|
|
|
|
} else {
|
|
|
|
$file = $frame;
|
|
|
|
}
|
2002-12-29 14:39:52 +00:00
|
|
|
} else {
|
|
|
|
$include = true;
|
|
|
|
}
|
|
|
|
|
2003-06-12 11:55:03 +00:00
|
|
|
if (! document_file($file, $include)) {
|
|
|
|
error("Error 404 - File Not Found");
|
|
|
|
}
|
2002-10-29 14:48:58 +00:00
|
|
|
|
2002-12-29 14:39:52 +00:00
|
|
|
if ($include) {
|
|
|
|
exit;
|
2002-10-29 14:48:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
2003-06-12 11:55:03 +00:00
|
|
|
<head>
|
|
|
|
<title><?php print_string("documentation")?></title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<frameset rows="70,*">
|
|
|
|
<frame name="top" src="top.php">
|
|
|
|
<frameset cols="200,*">
|
|
|
|
<frame name="contents" src="contents.php">
|
|
|
|
<frame name="main" src="index.php?file=<?php echo "$file$sub"; ?>">
|
|
|
|
</frameset>
|
|
|
|
</frameset>
|