phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: wcm/website/templates frame.tpl,1.12,1.13


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: wcm/website/templates frame.tpl,1.12,1.13
Date: Wed, 27 Feb 2002 00:00:13 -0500

Update of /cvsroot/phpgroupware/wcm/website/templates
In directory subversions:/tmp/cvs-serv4398/website/templates

Modified Files:
        frame.tpl 
Log Message:
Some adjustment to help ensure session gets created at the right time



Index: frame.tpl
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/website/templates/frame.tpl,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** frame.tpl   27 Feb 2002 04:10:11 -0000      1.12
--- frame.tpl   27 Feb 2002 05:00:11 -0000      1.13
***************
*** 1,3 ****
--- 1,27 ----
  <!-- BEGIN framing_table_start -->
+ <?php
+       /* $Id$ */
+ 
+       /* phpGroupWare Website Content Manager display code */
+       $phpgw_info = array();
+       $GLOBALS['phpgw_info']['flags'] = array(
+               'currentapp' => 'login',
+               'login'      => True,
+               'noheader'   => True,
+               'nonavbar'   => True
+       );
+       include('{phpgwdir}header.inc.php');
+ 
+       $login  = '{anonusername}';
+       $passwd = '{anonpassword}';
+       $anon = False;
+ 
+       /* User did not login, use anon account values and create a session */
+       if(!$GLOBALS['sessionid'])
+       {
+               $anon = True;
+               $GLOBALS['sessionid'] = 
@$GLOBALS['phpgw']->session->create($login,$passwd,'text');
+       }
+ ?>
  {header}
  <!-- framing_table_start start -->
***************
*** 111,131 ****
        function refresh_page($sname='', $pname='')
        {
-               $login  = '{anonusername}';
-               $passwd = '{anonpassword}';
-               $phpgw_info = array();
- 
-               $GLOBALS['phpgw_info']['flags'] = array(
-                       'currentapp' => 'login',
-                       'login'      => True,
-                       'noheader'   => True,
-                       'nonavbar'   => True
-               );
-               include('{phpgwdir}header.inc.php');
- 
-               if(!$GLOBALS['sessionid'])
-               {
-                       $GLOBALS['sessionid'] = 
$GLOBALS['phpgw']->session->create($login,$passwd,'text');
-               }
- 
                $s = CreateObject('wcm.bosite');
                $p = CreateObject('wcm.bopage');
--- 135,138 ----
***************
*** 160,163 ****
--- 167,174 ----
                        exit;
                }
+       }
+       if($anon && $GLOBALS['sessionid'])
+       {
+               
@$GLOBALS['phpgw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']);
        }
  ?>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]