Added popup links for IP addresses in logs (display IP location on world map)
[moodle.git] / help.php
blob95ea0942ab39a54e290b7314ac70567ca9fe05c5
1 <?PHP
2 /// help.php - prints a very simple page and includes a
3 /// page content or a string from elsewhere
4 /// Usually this will appear in a popup
5 /// See helpbutton() in lib/moodlelib.php
7 include("config.php");
9 optional_variable($file, "");
10 optional_variable($text, "No text to display");
11 optional_variable($module, "moodle");
13 print_header();
15 if (ereg("\\.\\.", $file)) {
16 error("Filenames can not contain \"..\"");
19 if ($file) {
20 if ($module == "moodle") {
21 $filepath = "$CFG->dirroot/lang/$CFG->lang/help/$file";
22 } else {
23 $filepath = "$CFG->dirroot/lang/$CFG->lang/help/$module/$file";
26 if (file_exists("$filepath")) {
27 include("$filepath"); // Chosen language
29 } else { // Fall back to English
30 if ($module == "moodle") {
31 $filepath = "$CFG->dirroot/lang/en/help/$file";
32 } else {
33 $filepath = "$CFG->dirroot/lang/en/help/$module/$file";
36 if (file_exists("$filepath")) {
37 include("$filepath");
38 } else {
39 notify("Can not find the specified help file");
40 die;
43 } else {
44 echo "<P>";
45 echo $text;
46 echo "</P>";
49 </BODY>
50 </HTML>