\r
require("../config.php");\r
\r
- $info = document_file("files.php", false);\r
+ if (! $info = document_file("files.php", false)) {\r
+ error("404 - File Not Found");\r
+ }\r
\r
include($info->filepath);\r
\r
print_header();\r
\r
- echo "<FONT SIZE=2 FACE=\"san-serif\">";\r
+ echo "<font size=2 face=\"san-serif\">";\r
foreach ($string as $file => $filename) {\r
- echo "<LI><A TARGET=\"main\" HREF=\"$CFG->wwwroot/doc/?file=$file\">$filename</A></LI>";\r
+ echo "<li><a target=\"main\" href=\"$CFG->wwwroot/doc/?file=$file\">$filename</a></li>";\r
}\r
- echo "</FONT>";\r
+ echo "</font>";\r
\r
?>\r
$include = true;
}
- document_file($file, $include);
+ if (! document_file($file, $include)) {
+ error("Error 404 - File Not Found");
+ }
if ($include) {
exit;
?>
-<HEAD>
- <TITLE>Moodle 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>
+<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>
}
$strhelp = get_string("help");
print_header("$course->shortname: $strhelp", "$course->fullname",
- "<A HREF=\"../course/view.php?id=$course->id\">$course->shortname</A> -> $strhelp");
+ "<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> -> $strhelp");
} else {
if (! $site = get_site()) {
error("Site is misconfigured");
}
$strdocumentation = get_string("documentation");
print_header("$site->shortname: $strhelp", "$site->fullname",
- "<A HREF=\"view.php?file=contents.html\">$strdocumentation</A>");
+ "<a href=\"view.php?file=contents.html\">$strdocumentation</a>");
}
- echo "<BLOCKQUOTE>";
+ echo "<blockquote>";
- document_file($file, true);
+ if (! document_file($file, true)) {
+ notify("404 - File Not Found");
+ }
- echo "</BLOCKQUOTE>";
+ echo "</blockquote>";
?>