merged changes from STABLE
[moodle-linuxchix.git] / doc / index.php
blobda7bf50def46833178ae009aeb958f2ae7f9900d
1 <?PHP // $Id$
3 require("../config.php");
5 $file = optional_param('file', "", PARAM_FILE); // docs file to view straight
6 $frame = optional_param('frame', "", PARAM_FILE); // docs file to view in frame
7 $sub = optional_param('sub', "", PARAM_CLEAN); // sub-section (named anchor)
9 if ($CFG->forcelogin) {
10 require_login();
13 if (!empty($sub)) {
14 $sub = "#$sub";
15 } else {
16 $sub = "";
19 if (empty($file)) {
20 $include = false;
21 if (empty($frame)) {
22 $file = "intro.html";
23 } else {
24 $file = $frame;
26 } else {
27 $include = true;
30 if (! document_file($file, $include)) {
31 error("Error 404 - File Not Found");
34 if ($include) {
35 exit;
40 <head>
41 <title><?php print_string("documentation")?></title>
42 </head>
44 <frameset rows="70,*">
45 <frame name="top" src="top.php">
46 <frameset cols="200,*">
47 <frame name="contents" src="contents.php">
48 <frame name="main" src="index.php?file=<?php echo "$file$sub"; ?>">
49 </frameset>
50 </frameset>