| 1 | <?php |
| 2 | if (preg_match("/^\/([^\/]+)\/webdav(\/.*)?$/",$_SERVER['PATH_INFO'],$tmp)) { |
| 3 | |
| 4 | // this is a WebDAV operation |
| 5 | require_once 'diogenes.common.inc.php'; |
| 6 | require_once 'diogenes.webdav.inc.php'; |
| 7 | $server = new $globals->webdav; |
| 8 | $server->ServeRequest(); |
| 9 | |
| 10 | } elseif (preg_match("/^\/([^\/]+)\/admin\/(.*)/",$_SERVER['PATH_INFO'],$tmp)) { |
| 11 | $afile = $tmp[2]; |
| 12 | if (preg_match("/^(ekitapplet|gnu-regexp-1.1.4|kafenio-config|kafenio-icons|kafenio)\.jar$/", $afile)) { |
| 13 | header("Content-Type: application/java-archive"); |
| 14 | header("Last-modified:".gmdate("D, d M Y H:i:s T", filemtime($afile))); |
| 15 | readfile($afile); |
| 16 | } else { |
| 17 | // include the requested admin page |
| 18 | if (!$afile) $afile = "index"; |
| 19 | require("admin/$afile.php"); |
| 20 | } |
| 21 | |
| 22 | } else { |
| 23 | |
| 24 | // post or get on a barrel file |
| 25 | require_once 'diogenes.common.inc.php'; |
| 26 | require_once 'diogenes.barrel.inc.php'; |
| 27 | $page = new $globals->barrel; |
| 28 | |
| 29 | if (!$globals->validatepages) |
| 30 | $page->assign("skipvalidator",1); |
| 31 | |
| 32 | $page->doContent(); |
| 33 | |
| 34 | } |
| 35 | ?> |