diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-12-01 14:37:39 +0100 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-12-01 14:37:39 +0100 |
commit | 98562ba546ef3a378363679055132c134ca4e4d2 (patch) | |
tree | 1aced18bde2d0e10bb868b6b514e75dbb5eeed6a /public_html/api/index.php | |
parent | b263e1c0557adf721f8f344b289d882d0415a577 (diff) | |
download | webadmin-98562ba546ef3a378363679055132c134ca4e4d2.tar.gz |
Add initial stab at some API work
Diffstat (limited to 'public_html/api/index.php')
-rw-r--r-- | public_html/api/index.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/public_html/api/index.php b/public_html/api/index.php new file mode 100644 index 0000000..5146e3d --- /dev/null +++ b/public_html/api/index.php @@ -0,0 +1,16 @@ +<?php + require_once( dirname(__FILE__) . "/../../lib/functions.php"); + + if (!valid_login()) { + need_login(); + } + + if (!empty($_GET['object']) && !empty($_GET['action'])) { + if (function_exists($_GET['object'] . '_' . $_GET['action'])) { + call_user_func_array($_GET['object'] . '_' . $_GET['action']); + } elseif (file_exists(dirname(__FILE__) . "/../../lib/actions/" . $_GET['object'] . '_' . $_GET['action'] . ".php")) { + require_once(dirname(__FILE__) . "/../../lib/actions/" . $_GET['object'] . '_' . $_GET['action'] . ".php"); + } + } + +?> |