Incorrect variable name used for parameter.
[moodle-linuxchix.git] / error / index.php
blob542883c2aa5120064bf6a2527e9d3fc473c885ad
1 <?PHP // $Id$
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);
13 die;
16 $site = get_site();
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);
24 <center>
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">
32 </form>
33 <?php
35 print_footer();