2001-11-22 06:23:56 +00:00
< ? PHP // $Id$
2004-09-24 22:28:50 +00:00
require ( '../config.php' );
2001-11-22 06:23:56 +00:00
if ( isset ( $text )) { // form submitted
2002-06-05 14:05:59 +00:00
if ( ! $admin = get_admin () ) {
2004-09-24 22:28:50 +00:00
error ( 'Could not find the admin user to mail to!' );
2001-11-22 06:23:56 +00:00
}
2004-09-24 22:28:50 +00:00
email_to_user ( $admin , $USER , 'Error: ' . $referer . ' -> ' . $requested , $text );
2001-11-22 06:23:56 +00:00
2004-09-24 22:28:50 +00:00
redirect ( $CFG -> wwwroot . '/course/' , 'Message sent, thanks' , 3 );
2001-11-22 06:23:56 +00:00
die ;
}
2002-09-17 14:56:18 +00:00
$site = get_site ();
2001-11-22 06:23:56 +00:00
2004-09-24 22:28:50 +00:00
print_header ( $site -> fullname . ':Error' , $site -> fullname . ': Error 404' , '' , 'form.text' );
2001-11-22 06:23:56 +00:00
2004-09-24 22:28:50 +00:00
print_simple_box ( 'An unusual error occurred (tried to reach a page that doesn\'t exist).<p align="center">' . $REDIRECT_URL , 'center' , '' , $THEME -> cellheading );
2001-11-22 06:23:56 +00:00
?>
2004-09-12 20:45:41 +00:00
< center >
< p > If you have time , please let us know what you were trying
2001-11-22 06:23:56 +00:00
to do when the error occurred :
2004-09-12 20:45:41 +00:00
< p >< form action = " <?php echo $CFG->wwwroot ?>/error/index.php " name = " form " method = " post " >
2004-09-16 17:13:57 +00:00
< textarea rows = " 3 " cols = " 50 " name = " text " ></ textarea >< br />
2004-09-12 20:45:41 +00:00
< input type = " hidden " name = " referer " value = " <?php echo $HTTP_REFERER ?> " >
< input type = " hidden " name = " requested " value = " <?php echo $REQUEST_URI ?> " >
< input type = " submit " value = " Send this off " >
</ form >
2003-09-11 13:50:02 +00:00
< ? php
2001-11-22 06:23:56 +00:00
print_footer ();
2004-09-24 22:28:50 +00:00
?>