3 require('../config.php');
5 if ($form = data_submitted('nomatch')) { // form submitted, do not check referer (origal page unknown)!
6 if (!$admin = get_admin() ) {
7 error('Could not find the admin user to mail to!');
10 if (empty($USER->id
)) {
11 $user = getremoteaddr(); // user not logged in, use IP address as name
15 email_to_user($admin, $user, 'Error: '. $form->referer
.' -> '. $form->requested
, $form->text
);
17 redirect($CFG->wwwroot
.'/course/', 'Message sent, thanks', 3);
22 $redirecturl = empty($_SERVER['REDIRECT_URL']) ?
'' : $_SERVER['REDIRECT_URL'];
23 $httpreferer = empty($_SERVER['HTTP_REFERER']) ?
'' : $_SERVER['HTTP_REFERER'];
24 $requesturi = empty($_SERVER['REQUEST_URI']) ?
'' : $_SERVER['REQUEST_URI'];
26 print_header($site->fullname
.':Error', $site->fullname
.': Error 404', '', 'text');
27 print_simple_box('<p align="center">'. get_string('pagenotexist', 'error'). '<br />'.s($requesturi).'</p>', 'center');
32 <p
><?php
echo get_string('pleasereport', 'error'); ?
>
33 <p
><form action
="<?php echo $CFG->wwwroot ?>/error/index.php" method
="post">
34 <textarea rows
="3" cols
="50" name
="text" id
="text"></textarea
><br
/>
35 <input type
="hidden" name
="referer" value
="<?php p($httpreferer) ?>">
36 <input type
="hidden" name
="requested" value
="<?php p($requesturi) ?>">
37 <input type
="submit" value
="<?php echo get_string('sendmessage', 'error'); ?>">