From de9cd2c818621f74f3f0693117c3549afee2c34a Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Fri, 15 Jul 2005 04:31:07 +0000 Subject: [PATCH] User switching file git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@58 06cd67b6-e706-0410-b29e-9de616bca6e9 --- users.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 users.php diff --git a/users.php b/users.php new file mode 100644 index 000000000..46fb92a0a --- /dev/null +++ b/users.php @@ -0,0 +1,51 @@ + + * + * See the enclosed file COPYING for license information (GPL). If you + * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. + */ + +@define('SHOUT_BASE', dirname(__FILE__) . "/.."); +$shout_configured = (@is_readable(SHOUT_BASE . '/config/conf.php'));# && + #@is_readable(SHOUT_BASE . '/config/prefs.php')); +if (!$shout_configured) { + require SHOUT_BASE . '/../lib/Test.php'; + Horde_Test::configFilesMissing('Shout', SHOUT_BASE, + array('conf.php', 'prefs.php')); +} + +require_once SHOUT_BASE . '/lib/base.php'; +require_once SHOUT_BASE . '/lib/Shout.php'; + +$context = Util::getFormData("context"); +$section = "users"; +$action = Util::getFormData("action"); + +$contexts = $shout->getContexts(); +$vars = &Variables::getDefaultVariables(); + +if (!isset($context)) {#FIXME || !Shout::checkContext()) { + $url = Horde::applicationUrl("/shout/index.php"); + header("Location: $url"); + exit(0); +} + +require SHOUT_TEMPLATES . '/common-header.inc'; +require SHOUT_TEMPLATES . '/menu.inc'; + +echo "
"; + +$tabs = &Shout::getTabs($context, $vars); +$tabs->preserve('context', $context); +echo $tabs->render($section); + +switch ($action) { + case "add": + case "edit": + case "delete": + require SHOUT_BASE . "/users/$action.php"; + break; +} \ No newline at end of file -- 2.11.0