r2215 - finally stick with dragons
[racktables] / process.php
... / ...
CommitLineData
1<?php
2
3require 'inc/init.php';
4fixContext();
5
6if (empty ($op) or !isset ($ophandler[$pageno][$tabno][$op]))
7{
8 showError ("Invalid request in operation broker: page '${pageno}', tab '${tabno}', op '${op}'", __FILE__);
9 die();
10}
11
12// We have a chance to handle an error before starting HTTP header.
13if (!isset ($delayauth[$pageno][$tabno][$op]) and !permitted())
14{
15 $errlog = array
16 (
17 'v' => 2,
18 'm' => array (0 => array ('c' => 157)) // operation not permitted
19 );
20 $location = buildWideRedirectURL ($errlog);
21}
22else
23{
24 $location = $ophandler[$pageno][$tabno][$op]();
25 if (empty ($location))
26 {
27 showError ('Operation handler failed to return its status', __FILE__);
28 }
29}
30header ("Location: " . $location);
31
32?>