I am using a menu frame on the left side but i cant destroy it using the logout link that i created ...
any ideas?
//index.php
// PAGE this will just redirect to the frame2.php (normally login / pass here but //removed unesecery code) just to show example
Expand|Select|Wrap|Line Numbers
- <?php
- require_once ('ini.php');
- session_start();
- $_SESSION['authorized'] = TRUE;
- $_SESSION['alive'] = TRUE;
- // $_SESSION['user']=$Username;
- $_SESSION['frames']=yes;
- require_once ('settime.php');
- header('Location: frame2.php');
- ?>
Expand|Select|Wrap|Line Numbers
- <?php
- require_once ('ini.php');
- session_start();
- $smarty->assign('frames', $_SESSION['frames'] );
- $smarty->display('frame2.tpl');
- ?>
[HTML]
<html>
{if $frames eq "yes"}
<frameset cols="10%,90%">
<frame src="menu.php" name="menu" />
<frame src="add.php" name="showframe">
</frameset>
{/if}
{if $frames neq "yes"}
<frameset cols="100%">
<frame src="add.php" name="showframe">
</frameset> <!--it shouldn't show me frames anymore-->
{/if}
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<meta HTTP-EQUIV="REFRESH" content="0; url=index.php">
<body>
</body>
</html>[/HTML]
//menu.php
[PHP]
<?php
require_once ('ini.php');
require_once ('authorize.php');
session_start();
$smarty->assign('type', $_SESSION['type'] );
$smarty->display('menu.tpl');
?>[/PHP]
//menu.tpl
[HTML]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Menu</title>
</head>
<body>
<h3> Menu </h3>
<hr width="100%" size="4" noshade>
{if $type eq "admin"}
<a href ="manageuser.php" target ="showframe">additional admin option</a>
<hr width="100%">
{/if}
<p> </p>
<a href ="add.php" target ="showframe">Add users </a>
<hr width="100%">
<p> </p>
<a href ="logout.php" target ="showframe">Logout</a>
<hr width="100%">
</body>
</html>[/HTML]
//and finally Logout.php
[PHP]
<?php
require_once ('ini.php');
session_start();
$_SESSION['authorized']=false;
$_SESSION['alive']=false;
$_SESSION['frames']=no;
header('Location: frame2.php');
?>[/PHP]