User switching file
authorBen Klang <ben@alkaloid.net>
Fri, 15 Jul 2005 04:31:07 +0000 (04:31 +0000)
committerBen Klang <ben@alkaloid.net>
Fri, 15 Jul 2005 04:31:07 +0000 (04:31 +0000)
git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@58 06cd67b6-e706-0410-b29e-9de616bca6e9

users.php [new file with mode: 0644]

diff --git a/users.php b/users.php
new file mode 100644 (file)
index 0000000..46fb92a
--- /dev/null
+++ b/users.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * $Horde: shout/users/index.php,v 0.1 2005/07/13 10:01:01 ben Exp $
+ *
+ * Copyright 2005 Ben Klang <ben@alkaloid.net>
+ *
+ * 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 "<br />";
+
+$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