Some blank index.html files to prevent browsing
[moodle.git] / error / index.php
CommitLineData
f9903ed0 1<?PHP // $Id$
2
3 require("../config.php");
4
5 if (isset($text)) { // form submitted
5fa51a39 6 if (!$admin = get_admin() ) {
f9903ed0 7 error("Could not find the admin user to mail to!");
8 }
9
5fa51a39 10 email_to_user($admin, $USER, "Error: $referer -> $requested", "$text");
f9903ed0 11
12 redirect("$CFG->wwwroot/course/", "Message sent, thanks", 3);
13 die;
14 }
e80e60a6 15
16 $site = get_site();
f9903ed0 17
e80e60a6 18 print_header("$site->fullname:Error", "$site->fullname: Error 404", "", "form.text");
f9903ed0 19
faebaf0f 20 print_simple_box("An unusual error occurred (tried to reach a page that doesn't exist).<P align=center>$REDIRECT_URL", "center", "", "$THEME->cellheading");
f9903ed0 21
22?>
23
24 <CENTER>
25 <P>If you have time, please let us know what you were trying
26 to do when the error occurred:
4c48acf0 27 <P><FORM action="<?php echo $CFG->wwwroot ?>/error/index.php" name=form method=post>
f9903ed0 28 <TEXTAREA ROWS=3 COLS=50 NAME=text></TEXTAREA><BR>
4c48acf0 29 <INPUT TYPE=hidden NAME=referer VALUE="<?php echo $HTTP_REFERER ?>">
30 <INPUT TYPE=hidden NAME=requested VALUE="<?php echo $REQUEST_URI ?>">
f9903ed0 31 <INPUT TYPE=submit VALUE="Send this off">
32 </FORM>
c8848161 33<?php
f9903ed0 34
35 print_footer();
36
37?>