file size.html was added on branch MOODLE_15_STABLE on 2005-07-07 17:01:43 +0000
[moodle.git] / doc / index.php
blob8d108185d57d8a03c7e5e3d5f1bc1a0c6d8006be
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;
39 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
40 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
41 <html xmlns="http://www.w3.org/1999/xhtml">
42 <head>
43 <title><?php print_string("documentation")?></title>
44 <meta http-equiv="Content-Type" content="text/html; charset=<?php print_string("thischarset") ?>" />
45 </head>
47 <frameset rows="70,*">
48 <frame name="top" src="top.php" />
49 <frameset cols="200,*">
50 <frame name="contents" src="contents.php" />
51 <frame name="main" src="index.php?file=<?php echo "$file$sub"; ?>" />
52 </frameset>
53 </frameset>
54 </html>