Smarty and SourceForge

From: Date: Wed, 20 Feb 2002 13:38:33 +0000
Subject: Smarty and SourceForge
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2774@lists.php.net to get a copy of this message
After quite some time of brainstorming I have not yet found a solution with a problem I'm having with SourceForge's web hosting service. I am using Smarty to create dynamic output for my project's web site admin interface. Here's the source of one of the page (the one that prints the menu): <?php // Every application MUST include the config file require_once("./config.php"); require_once("./header.php"); // Sets various flags $portal_flags["show_menubar"] = 0; $portal_flags["hide_topmenu"] = 1; if (($portal_info["user"]["logged"] != 1) || ($portal_info["user"]["admin"] != 1)) { header("Location: notauth.php"); } foreach($portal_mod as $k => $v) { $res = $portal->module_add("box_menu_entry", $k, "show_admin", null, 1); if ($res) { $out[] = $res; } } $tpl->assign("menu_list", $out); $portal->display_header(); $portal->display("menu.html"); $portal->display_footer(); ?> What this piece of code is doing is simply loading some config parameters and instantiating a Smarty template ($tpl). Than I check for the user to be logged in and an administrator and if not I redirect to the page noauth.php, otherwise the rest of the code is taking a list of installed modules and calls their show_admin functions to print their admin menus. Well.. when I open this page, it happens that every once in a while I get redirect noauth.php page even if I'm logged in and an admin. Then I reload the page and sometime I get the menu and some other time the noauth. Any idea of what could be causing this behaviour? -- Valerio Santinelli HateSeed.com Founder (http://www.hateseed.com) In Flames Italia Webmaster (http://www.inflames.it) My Lab (http://tanis.hateseed.com)

« previous php.smarty.general (#2774) next »