| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: helper.php 15198 2010-03-05 09:06:05Z ian $ 4 * @package Joomla 5 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 6 * @license GNU/GPL, see LICENSE.php 7 * Joomla! is free software. This version may have been modified pursuant 8 * to the GNU General Public License, and as distributed it includes or 9 * is derivative of works licensed under the GNU General Public License or 10 * other free or open source software licenses. 11 * See COPYRIGHT.php for copyright notices and details. 12 */ 13 14 // no direct access 15 defined('_JEXEC') or die('Restricted access'); 16 17 class modLoginHelper 18 { 19 function getReturnURL($params, $type) 20 { 21 if($itemid = $params->get($type)) 22 { 23 $menu =& JSite::getMenu(); 24 $item = $menu->getItem($itemid); //var_dump($menu);die; 25 if ($item) 26 { 27 $url = JRoute::_($item->link.'&Itemid='.$itemid, false); 28 } 29 else 30 { 31 // stay on the same page 32 $uri = JFactory::getURI(); 33 $url = $uri->toString(array('path', 'query', 'fragment')); 34 } 35 36 } 37 else 38 { 39 // stay on the same page 40 $uri = JFactory::getURI(); 41 $url = $uri->toString(array('path', 'query', 'fragment')); 42 } 43 44 return base64_encode($url); 45 } 46 47 function getType() 48 { 49 $user = & JFactory::getUser(); 50 return (!$user->get('guest')) ? 'logout' : 'login'; 51 } 52 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |