- <?php
- session_start();
- include_once('includes/config.inc.php');
- include_once('includes/common.inc.php');
- doAuthCheck();
-
- if (!empty($_GET['action'])) {
- $sAction = $_GET['action'];
- }
- else {
- $sAction = $_POST['action'];
- }
-
- if (!empty($_GET['component'])) {
- // TODO: do some input validation to make sure "action" and "component" is what we think it is
- include('components/'.$_GET['component'].'/actions/'.$sAction.'.inc.php');
- }
- elseif (!empty($_POST['component'])) {
- // TODO: do some input validation to make sure "action" and "component" is what we think it is
- include('components/'.$_POST['component'].'/actions/'.$sAction.'.inc.php');
- }
- else {
- // TODO: do some input validation to make sure $sAction is what we think it is
- include('includes/actions/'.$sAction.'.inc.php');
- }
-
- if (hasLoadUrl() || hasJavascript()) {
- printHtmlHeader();
- printLoadUrl();
- printJavascript();
- printHtmlFooter();
- }
- ?>