From: Ben Klang Date: Fri, 15 Jul 2005 04:30:45 +0000 (+0000) Subject: Reworking minor directory structure to get around stupid web browser pathing bug X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=921f5c938b1c3d7bae3ff46d8a9cd02a6bbd852b;p=horde.git Reworking minor directory structure to get around stupid web browser pathing bug git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@57 06cd67b6-e706-0410-b29e-9de616bca6e9 --- diff --git a/dialplan.php b/dialplan.php deleted file mode 100644 index 3d4f11723..000000000 --- a/dialplan.php +++ /dev/null @@ -1,6 +0,0 @@ -push(_("Internal error viewing requested page"), + 'horde.error'); + $notification->notify(); + require $registry->get('templates', 'horde') . '/common-footer.inc'; + exit(); +} + diff --git a/main/system.php b/main/system.php new file mode 100644 index 000000000..6d5eff42d --- /dev/null +++ b/main/system.php @@ -0,0 +1,68 @@ + + * + * See the enclosed file LICENSE for license information (GPL). If you + * did not receive this file, see http://www.horde.org/licenses/gpl.php. + */ +@define('SHOUT_BASE', dirname(__FILE__) . '/..'); +require_once SHOUT_BASE . '/lib/System.php'; +require_once 'Horde/Variables.php'; + +$RENDERER = &new Horde_Form_Renderer(); + +$empty = ''; +$beendone = 0; +$wereerrors = 0; + +$vars = &Variables::getDefaultVariables($empty); +$syscontext = Util::getFormData("syscontext"); +$formname = $vars->get('formname'); + +$title = _("System Settings"); + +$ContextForm = &Horde_Form::singleton('ContextForm', $vars); +$ContextFormValid = $ContextForm->validate($vars, true); + +// print_r($vars); +if ($ContextFormValid) { + $SettingsForm = &Horde_Form::singleton('SettingsForm', $vars); + + $SettingsForm->open($RENDERER, $vars, 'index.php', 'post'); + $SettingsFormValid = $SettingsForm->validate($vars, true); + // Render the original form readonly. + $ContextForm->preserve($vars); + $RENDERER->beginInactive($ContextForm->getTitle()); + $RENDERER->renderFormInactive($ContextForm, $vars); + $RENDERER->end(); + echo '
'; + + // Render the second stage form. + if ($formname != 'SettingsForm') { + $SettingsForm->clearValidation(); + } + $RENDERER->beginActive($SettingsForm->getTitle()); + $ContextForm->preserveVarByPost($vars, "section"); + $SettingsForm->preserve($vars); + $RENDERER->renderFormActive($SettingsForm, $vars); + $RENDERER->submit(); + $RENDERER->end(); + + $SettingsForm->close($RENDERER); + + $beendone = 1; +} else { + if ($formname != 'ContextForm') { + $ContextForm->clearValidation(); + } + $ContextForm->open($RENDERER, $vars, 'index.php', 'post'); + $ContextForm->preserveVarByPost($vars, "section"); + $ContextForm->preserve($vars); + $RENDERER->beginActive($ContextForm->getTitle()); + $RENDERER->renderFormActive($ContextForm, $vars); + $RENDERER->submit(); + $RENDERER->end(); + $ContextForm->close($RENDERER); +} diff --git a/main/users.php b/main/users.php new file mode 100644 index 000000000..8b2b6f4c4 --- /dev/null +++ b/main/users.php @@ -0,0 +1,6 @@ +push(_("Internal error viewing requested page"), - 'horde.error'); - $notification->notify(); - require $registry->get('templates', 'horde') . '/common-footer.inc'; - exit(); -} - diff --git a/shout.webprj b/shout.webprj index ae3c79cfd..8b2793df2 100644 --- a/shout.webprj +++ b/shout.webprj @@ -9,51 +9,51 @@ - - - - + + + + - - + + - + - + - - - + + + - + - + - + - + - + - - + + - + - - + + - - + + @@ -74,20 +74,16 @@ -//w3c//dtd xhtml 1.0 strict//en - - - - + + + - - + - - - + + - - + Ben Klang ben@alkaloid.net Gubed @@ -100,15 +96,21 @@ - - + - - + + + + + + + + + diff --git a/system.php b/system.php deleted file mode 100644 index 6d5eff42d..000000000 --- a/system.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * See the enclosed file LICENSE for license information (GPL). If you - * did not receive this file, see http://www.horde.org/licenses/gpl.php. - */ -@define('SHOUT_BASE', dirname(__FILE__) . '/..'); -require_once SHOUT_BASE . '/lib/System.php'; -require_once 'Horde/Variables.php'; - -$RENDERER = &new Horde_Form_Renderer(); - -$empty = ''; -$beendone = 0; -$wereerrors = 0; - -$vars = &Variables::getDefaultVariables($empty); -$syscontext = Util::getFormData("syscontext"); -$formname = $vars->get('formname'); - -$title = _("System Settings"); - -$ContextForm = &Horde_Form::singleton('ContextForm', $vars); -$ContextFormValid = $ContextForm->validate($vars, true); - -// print_r($vars); -if ($ContextFormValid) { - $SettingsForm = &Horde_Form::singleton('SettingsForm', $vars); - - $SettingsForm->open($RENDERER, $vars, 'index.php', 'post'); - $SettingsFormValid = $SettingsForm->validate($vars, true); - // Render the original form readonly. - $ContextForm->preserve($vars); - $RENDERER->beginInactive($ContextForm->getTitle()); - $RENDERER->renderFormInactive($ContextForm, $vars); - $RENDERER->end(); - echo '
'; - - // Render the second stage form. - if ($formname != 'SettingsForm') { - $SettingsForm->clearValidation(); - } - $RENDERER->beginActive($SettingsForm->getTitle()); - $ContextForm->preserveVarByPost($vars, "section"); - $SettingsForm->preserve($vars); - $RENDERER->renderFormActive($SettingsForm, $vars); - $RENDERER->submit(); - $RENDERER->end(); - - $SettingsForm->close($RENDERER); - - $beendone = 1; -} else { - if ($formname != 'ContextForm') { - $ContextForm->clearValidation(); - } - $ContextForm->open($RENDERER, $vars, 'index.php', 'post'); - $ContextForm->preserveVarByPost($vars, "section"); - $ContextForm->preserve($vars); - $RENDERER->beginActive($ContextForm->getTitle()); - $RENDERER->renderFormActive($ContextForm, $vars); - $RENDERER->submit(); - $RENDERER->end(); - $ContextForm->close($RENDERER); -} diff --git a/users.php b/users.php deleted file mode 100644 index 8b2b6f4c4..000000000 --- a/users.php +++ /dev/null @@ -1,6 +0,0 @@ - - * - * 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