parse_str($_SERVER['QUERY_STRING'], $params);
$module = $params['module'];
$action = $params['action'];
+ $args = $params['args'];
include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "header.php")));
if ($module) {
$include = join(DIRECTORY_SEPARATOR, array($lib_root, "$module.php"));
if (file_exists($include)) {
include_once($include);
- call_user_func("module_$module", $action);
+ call_user_func("module_$module", $action, $args);
}
else echo "<p>What's all that about, then?</p>\n";
}
}
}
- function module_competitor($action) {
+ function module_competitor($action, $args) {
if ($_POST['add_competitor']) {
if (add_competitor($_POST["cmdr_name"], $_POST["forum_name"])) unset($_POST);
}
return false;
}
- function module_entry($action) {
+ function module_entry($action, $args) {
if ($action && ! count($_POST)) {
$eq = new EntryQuery;
$eq->joinWith('Entry.Race');
}
}
- function module_hull($action) {
+ function module_hull($action, $args) {
if ($_POST['add_hull']) {
if (add_hull($_POST["name"])) unset($_POST);
}
<?php
- function module_lap($action) {
+ function module_lap($action, $args) {
$rq = new RaceQuery;
$races = $rq->find();
return $ret;
}
- function module_race($action) {
+ function module_race($action, $args) {
if ($_POST['add_race']) {
if (add_race($_POST["name"], $_POST["allotted_time"])) unset($_POST);
}
return false;
}
- function module_raikogram($action) {
+ function module_raikogram($action, $args) {
if ($_POST['edit_raikogram']) {
if (edit_raikogram($_POST["race_id"])) unset($_POST);
}
}
}
- function module_ship($action) {
+ function module_ship($action, $args) {
if ($_POST['add_ship']) {
if (add_ship($_POST["competitor_id"], $_POST["hull_id"], $_POST["name"])) unset($_POST);
}
return false;
}
- function module_station($action) {
+ function module_station($action, $args) {
if ($_POST['add_station']) {
if (add_station($_POST["system_id"], $_POST["type"], $_POST["name"])) unset($_POST);
}
return false;
}
- function module_system($action) {
+ function module_system($action, $args) {
if ($_POST['add_system']) {
if (add_system($_POST["system_name"])) unset($_POST);
}
echo "//--></script>\n";
}
- function module_timeline($action) {
+ function module_timeline($action, $args) {
if ($action) show_timeline($action);
$rq = new RaceQuery;
$rq->joinWith('Race.Entry');