Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Unrecognized Tag?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
dartmanx
Smarty n00b


Joined: 07 Jan 2004
Posts: 2

PostPosted: Wed Jan 07, 2004 1:45 pm    Post subject: Unrecognized Tag? Reply with quote

I'm bashing my head against a wall on this one, because I can find no obvious error causing an unrecognized tag error.

I use PEAR::Auth to validate logins to my website. Based on whether the login is successful or not, certain menu items appear. I also use output buffering to put Auth's login dialog where I want it.

pkgstatus.php:
Code:

   $smarty = & new Smarty;
   $auth = & new Auth('DB', DSN, 'loginFunction');
   $dbconn = DB::connect(DSN);
   
   $smarty->assign('pagetitle','Package Status');
   $smarty->display('header.tpl');
   
   ob_start();
   $auth->start();
   $authcontents = ob_get_contents();
   ob_end_clean();
   
   $smarty->assign('adminuser',0);
   if (!$auth->getAuth())
   {
      
      header('Location: ' . $appdir);
   }
   else
   {
      $smarty->assign('adminuser' ,1);
   }
   $smarty->assign('authcontents', $authcontents);
   $smarty->display('menu.tpl');


menu.tpl

Code:
{* Smarty *}

{* Menu For Application *}

<div class="menubox">

{$authcontents}

{if $adminuser ==  0}
<h3>Menu</h3>

<p><b>Search</b></p>
<p><a href="search.php">Search Menu</a></p>
<p><b>Reports</b></p>
<p><a href="rpt.php">Report Menu</a></p>
<p> </p>

{else}

<h3>Menu</h3>
<p><a href="index.php">Dailylook Home</a></p>
<b>Package Functions</b>
<p><a href="addpkg.php">Add New Package</a></p>
<b>Search</b>
<p><a href="search.php">Search Menu</a></p>
<b>Suspense Management</b>
<p><a href="suspense.php">Suspense Management</a></p>
<b>Reports</b>
<p><a href="rpt.php">Report Menu</a></p>
<b>Administrative Functions</b>
<p><a href="usermgmt.php">User Management</a></p>
<p><a href="rptmgmt.php">Report Management</a></p>
<p><a href="index.php?logout=True">Log Out</a></p>

{/if}

</div>

Unfortunately, a Fatal Error is triggered by Smarty around the if(!$auth->getAuth) line in the pkgstatus.php code. It will say there is an unrecognized tag of "header('Location: ' . $appdir)"

Need help desperately, as this project is already taking too long.
Back to top
View user's profile Send private message Visit poster's website
dartmanx
Smarty n00b


Joined: 07 Jan 2004
Posts: 2

PostPosted: Wed Jan 07, 2004 3:45 pm    Post subject: Sorry Reply with quote

Sorry, it was a FAQ.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP