[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgroupware/redirect.php, 1.1.4.1
From: |
nomail |
Subject: |
[Phpgroupware-cvs] phpgroupware/redirect.php, 1.1.4.1 |
Date: |
Fri, 3 Sep 2004 12:24:17 +0200 |
Update of /phpgroupware
Modified Files:
Branch: Version-0_9_16-branch
redirect.php
date: 2004/09/03 10:24:17; author: skwashd; state: Exp; lines: +51 -8
Log Message:
make this work
=====================================================================
Index: phpgroupware/redirect.php
diff -u phpgroupware/redirect.php:1.1 phpgroupware/redirect.php:1.1.4.1
--- phpgroupware/redirect.php:1.1 Mon Dec 31 12:44:47 2001
+++ phpgroupware/redirect.php Fri Sep 3 10:24:17 2004
@@ -1,9 +1,11 @@
<?php
/**************************************************************************\
- * phpGroupWare - save redirect script
*
- * idea by: Jason Wies <address@hidden>
*
- * doing and adding to cvs: Lars Kneschke <address@hidden> *
+ * phpGroupWare - Session safe redirect
*
* http://www.phpgroupware.org
*
+ * Idea by: Jason Wies <address@hidden>
*
+ * Poor implementation by: Lars Kneschke <address@hidden> *
+ * Proper Implementation by: Dave Hall skwashd at phpgroupware.org
*
+ * Copyright (c) 2004 Free Software Foundation Inc - http://www.fsf.org/
*
* --------------------------------------------
*
* This program is free software; you can redistribute it and/or modify
it *
* under the terms of the GNU General Public License as published by
the *
@@ -13,13 +15,54 @@
/* $Id$ */
- if ($GLOBALS['go'])
+ //Get the session variables set for non cookie based sessions
+ if (! (@isset($_COOKIES['PHPSESSID']) || @isset($_COOKIES['sessionid'])
) )
{
- Header('Location: ' . $GLOBALS['go']);
+ $get = array();
+ $url = parse_url($_SERVER['HTTP_REFERER']);
+ parse_str($url['query'], $get);
+ foreach($get as $key => $val)
+ {
+ $_GET[$key] = $val;
+ }
+
+ }
+
+ $GLOBALS['phpgw_info']['flags'] = array(
+ 'currentapp' => 'home',
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'noappheader' => True,
+ 'noappfooter' => True,
+ 'nofooter' => True
+ );
+
+ require_once('./header.inc.php');
+
+ if( @isset($_GET['go']) )
+ {
+ $_GET['go'] = html_entity_decode($_GET['go']);
+ ?>
+ <h2><?php lang('external link'); ?></h2>
+ <p><?php lang('lang you are about to visit an external
site'); ?><br />
+ <?php lang('vist:'); ?> <a href="<?php echo
$_GET['go']; ?>"
+ target="_blank"><?php echo $_GET['go'];
?></a></p>
+ <script>window.location='<?php echo$_GET['go'];
?>';</script>
+ <?php
exit;
}
else
{
- print "this want work!!";
+
+ $GLOBALS['phpgw_info']['flags']['header'] = True;
+ $GLOBALS['phpgw_info']['flags']['navbar'] = True;
+ $GLOBALS['phpgw_info']['flags']['footer'] = True;
+
+ $GLOBALS['phpgw']->common->phpgw_header();
+ echo parse_navbar();
+
+ echo '<h2>' . lang('invalid link') . "</h2>\n"
+ . '<p><a href="' .
$GLOBALS['phpgw']->link('/index.php')
+ . lang('return to phpgroupware') . "\"></p>\n";
}
-?>
\ No newline at end of file
+?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgroupware/redirect.php, 1.1.4.1,
nomail <=