|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 27.77 GB of 70.42 GB (39.43%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
http/
guitar.1/
modules/
mod_menu/
- drwxr-xr-x
|
Viewing file: helper.php (3.88 KB) -rw-r--r--Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
<?php /** * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */
// no direct access defined('_JEXEC') or die;
/** * @package Joomla.Site * @subpackage mod_menu * @since 1.5 */ class modMenuHelper { /** * Get a list of the menu items. * * @param JRegistry $params The module options. * * @return array * @since 1.5 */ static function getList(&$params) { $app = JFactory::getApplication(); $menu = $app->getMenu();
// If no active menu, use default $active = ($menu->getActive()) ? $menu->getActive() : $menu->getDefault();
$user = JFactory::getUser(); $levels = $user->getAuthorisedViewLevels(); asort($levels); $key = 'menu_items'.$params.implode(',', $levels).'.'.$active->id; $cache = JFactory::getCache('mod_menu', ''); if (!($items = $cache->get($key))) { // Initialise variables. $list = array(); $db = JFactory::getDbo();
$path = $active->tree; $start = (int) $params->get('startLevel'); $end = (int) $params->get('endLevel'); $showAll = $params->get('showAllChildren'); $items = $menu->getItems('menutype', $params->get('menutype'));
$lastitem = 0;
if ($items) { foreach($items as $i => $item) { if (($start && $start > $item->level) || ($end && $item->level > $end) || (!$showAll && $item->level > 1 && !in_array($item->parent_id, $path)) || ($start > 1 && !in_array($item->tree[$start-2], $path)) ) { unset($items[$i]); continue; }
$item->deeper = false; $item->shallower = false; $item->level_diff = 0;
if (isset($items[$lastitem])) { $items[$lastitem]->deeper = ($item->level > $items[$lastitem]->level); $items[$lastitem]->shallower = ($item->level < $items[$lastitem]->level); $items[$lastitem]->level_diff = ($items[$lastitem]->level - $item->level); }
$item->parent = (boolean) $menu->getItems('parent_id', (int) $item->id, true);
$lastitem = $i; $item->active = false; $item->flink = $item->link;
switch ($item->type) { case 'separator': // No further action needed. continue;
case 'url': if ((strpos($item->link, 'index.php?') === 0) && (strpos($item->link, 'Itemid=') === false)) { // If this is an internal Joomla link, ensure the Itemid is set. $item->flink = $item->link.'&Itemid='.$item->id; } break;
case 'alias': // If this is an alias use the item id stored in the parameters to make the link. $item->flink = 'index.php?Itemid='.$item->params->get('aliasoptions'); break;
default: $router = JSite::getRouter(); if ($router->getMode() == JROUTER_MODE_SEF) { $item->flink = 'index.php?Itemid='.$item->id; } else { $item->flink .= '&Itemid='.$item->id; } break; }
if (strcasecmp(substr($item->flink, 0, 4), 'http') && (strpos($item->flink, 'index.php?') !== false)) { $item->flink = JRoute::_($item->flink, true, $item->params->get('secure')); } else { $item->flink = JRoute::_($item->flink); }
$item->title = htmlspecialchars($item->title); $item->anchor_css = htmlspecialchars($item->params->get('menu-anchor_css', '')); $item->anchor_title = htmlspecialchars($item->params->get('menu-anchor_title', '')); $item->menu_image = $item->params->get('menu_image', '') ? htmlspecialchars($item->params->get('menu_image', '')) : ''; }
if (isset($items[$lastitem])) { $items[$lastitem]->deeper = (($start?$start:1) > $items[$lastitem]->level); $items[$lastitem]->shallower = (($start?$start:1) < $items[$lastitem]->level); $items[$lastitem]->level_diff = ($items[$lastitem]->level - ($start?$start:1)); } }
$cache->store($items, $key); } return $items; } }
|