| Server IP : 180.180.241.3 / Your IP : 216.73.216.216 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 : C:/AppServ/www/news/administrator/components/com_phocagallery/libraries/ |
Upload File : |
<?php
/*
* @package Joomla 1.5
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
if (! class_exists('JLoader')) {
require_once( JPATH_LIBRARIES.DS.'loader.php');
}
class PhocaGalleryLoader extends JLoader
{
function import( $filePath, $base = null, $key = 'libraries.' ) {
static $paths;
if (!isset($paths)) {
$paths = array();
}
$keyPath = $key ? $key . $filePath : $filePath;
if (!isset($paths[$keyPath]))
{
if ( ! $base ) {
$base = JPATH_ADMINISTRATOR.DS.'components'.DS.'com_phocagallery'.DS.'libraries';
}
$parts = explode( '.', $filePath );
$classname = array_pop( $parts );
switch($classname)
{
case 'helper' :
$classname = ucfirst(array_pop( $parts )).ucfirst($classname);
break;
default :
$classname = ucfirst($classname);
break;
}
$path = str_replace( '.', DS, $filePath );
if (strpos($filePath, 'phocagallery') === 0)
{
$classname = 'PhocaGallery'.$classname;
$classes = JLoader::register($classname, $base.DS.$path.'.php');
$rs = isset($classes[strtolower($classname)]);
}
else
{
/*
* If it is not in the joomla namespace then we have no idea if
* it uses our pattern for class names/files so just include.
*/
$rs = include($base.DS.$path.'.php');
}
$paths[$keyPath] = $rs;
}
return $paths[$keyPath];
}
}
function phocagalleryimport($path) {
return PhocaGalleryLoader::import($path);
}