2005-09-29 06:30:58 +00:00
|
|
|
<?php
|
2006-04-13 08:48:51 +00:00
|
|
|
/**
|
|
|
|
* Wrapper script redirecting user operations to correct destination.
|
|
|
|
*/
|
|
|
|
|
2005-09-29 06:30:58 +00:00
|
|
|
require_once("../config.php");
|
|
|
|
|
2006-04-13 08:48:51 +00:00
|
|
|
$formaction = required_param('formaction', PARAM_FILE);
|
|
|
|
$id = required_param('id', PARAM_INT);
|
2005-09-29 06:30:58 +00:00
|
|
|
|
|
|
|
// Add every page will be redirected by this script
|
|
|
|
$actions = array(
|
|
|
|
'messageselect.php',
|
2007-05-22 02:08:22 +00:00
|
|
|
'extendenrol.php',
|
|
|
|
'groupextendenrol.php',
|
2007-07-05 06:53:17 +00:00
|
|
|
'addnote.php',
|
|
|
|
'groupaddnote.php',
|
2006-04-13 08:48:51 +00:00
|
|
|
);
|
2005-09-29 06:30:58 +00:00
|
|
|
|
2006-04-13 08:48:51 +00:00
|
|
|
if (array_search($formaction, $actions) === false) {
|
|
|
|
print_error('unknownuseraction');
|
2005-09-29 06:30:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!confirm_sesskey()) {
|
2006-04-13 08:48:51 +00:00
|
|
|
print_error('confirmsesskeybad');
|
2005-09-29 06:30:58 +00:00
|
|
|
}
|
|
|
|
|
2006-04-13 08:48:51 +00:00
|
|
|
require_once($formaction);
|
2005-09-29 06:30:58 +00:00
|
|
|
?>
|