Fixed firstname lastname to call to fullname function
[moodle.git] / error / index.php
CommitLineData
f9903ed0 1<?PHP // $Id$
2
70e728fb 3 require('../config.php');
f9903ed0 4
5 if (isset($text)) { // form submitted
5fa51a39 6 if (!$admin = get_admin() ) {
70e728fb 7 error('Could not find the admin user to mail to!');
f9903ed0 8 }
9
70e728fb 10 email_to_user($admin, $USER, 'Error: '. $referer .' -> '. $requested, $text);
f9903ed0 11
70e728fb 12 redirect($CFG->wwwroot .'/course/', 'Message sent, thanks', 3);
f9903ed0 13 die;
14 }
e80e60a6 15
16 $site = get_site();
f9903ed0 17
70e728fb 18 print_header($site->fullname .':Error', $site->fullname .': Error 404', '', 'form.text');
f9903ed0 19
70e728fb 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
730a5f5a 24 <center>
25 <p>If you have time, please let us know what you were trying
f9903ed0 26 to do when the error occurred:
730a5f5a 27 <p><form action="<?php echo $CFG->wwwroot ?>/error/index.php" name="form" method="post">
839f2456 28 <textarea rows="3" cols="50" name="text"></textarea><br />
730a5f5a 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">
32 </form>
c8848161 33<?php
f9903ed0 34
35 print_footer();
36
70e728fb 37?>