Changes to strings in print_recent_activity (added, updated, deleted activities)
[moodle.git] / help.php
blob3070e850a4daef7dbc10b76d4e9b67f005604e2f
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 if (ereg("\\.\\.", $file)) {
14 error("Error: Filenames can not contain \"..\"");
18 <HTML>
19 <HEAD>
20 <LINK rel="stylesheet" href="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme?>/styles.css">
21 </HEAD>
22 <BODY BGCOLOR="<?=$THEME->body ?>">
23 <? if ($file) {
24 if ($module == "moodle") {
25 $langpath = "$CFG->dirroot/lang";
26 } else {
27 $langpath = "$CFG->dirroot/mod/$module/lang";
30 if (file_exists("$langpath/$CFG->lang/page/$file")) {
31 include("$langpath/$CFG->lang/page/$file");
32 } else {
33 include("$langpath/en/page/$file");
35 } else {
36 echo "<P>";
37 echo $text;
38 echo "</P>";
41 </BODY>
42 </HTML>