3 require('../config.php');
5 if (isset($text)) { // form submitted
6 if (!$admin = get_admin() ) {
7 error('Could not find the admin user to mail to!');
10 email_to_user($admin, $USER, 'Error: '. $referer .' -> '. $requested, $text);
12 redirect($CFG->wwwroot
.'/course/', 'Message sent, thanks', 3);
18 print_header($site->fullname
.':Error', $site->fullname
.': Error 404', '', 'form.text');
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
);
25 <p
>If you have time
, please let us know what you were trying
26 to
do when the error occurred
:
27 <p
><form action
="<?php echo $CFG->wwwroot ?>/error/index.php" name
="form" method
="post">
28 <textarea rows
="3" cols
="50" name
="text"></textarea
><br
/>
29 <input type
="hidden" name
="referer" value
="<?php echo $HTTP_REFERER ?>">
30 <input type
="hidden" name
="requested" value
="<?php echo $REQUEST_URI ?>">
31 <input type
="submit" value
="Send this off">