| 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_simple_review/classes/ |
Upload File : |
<?php
/**
* $Id: SRBridgeCMS.php 320 2010-11-17 08:44:15Z rowan $
*
* Copyright (C) 2005-2009 Rowan Youngson
*
* This file is part of Simple Review.
*
* Simple Review is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Simple Review is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Simple Review. If not, see <http://www.gnu.org/licenses/>.
*/
/** ensure this file is being included by a parent file */
defined( '_JEXEC' ) or die('Direct Access to this location is not allowed.');
require_once("SRBridgeDatabaseBase.php");
class SRBridgeCMS
{
var $SystemToBridge;
var $AdminPage;
var $AdminTemplate;
var $Option;
var $PathComponentFrontEnd;
var $PathComponentAdministrator;
var $PathJoomla;
var $SiteUrl;
var $SiteDomain;
var $InDebugMode;
var $UsingSeoLinks;
var $Database = null;
var $CurrentUser = null;
function SRBridgeCMS()
{
if(strtolower(get_class($this))=='srbridgecms' || !is_subclass_of ($this,'SRBridgeCMS'))
{
trigger_error('This class is abstract. It cannot be instantiated!',E_USER_ERROR);
}
}
function AddCustomTag($tag){}
function AddMetaDescription($description){}
function AddMetaKeywords($keywords){}
function MakeUrlSafe($string){}
function GetCurrentPath(){}
function &GetDocument(){}
function GetDocumentType(){}
function GetItemID(){}
function GetParameter( &$array, $key, $default = null, $type = ''){}
function Redirect($url, $text){}
function RewriteUrl($url){}
function SetPageTitle($title){}
function IncludeCssLink($url){}
function IncludeJSLink($url){}
function IncludeJQuery($provider = null){}
function IncludeJQueryUI($provider = null){}
function IncludeBridgeControls()
{
require_once("SRBridgeControls$this->SystemToBridge.php");
}
function GracefulExit($message){ die($message);}
function RunPlugins($content)
{
//http://forum.joomla.org/viewtopic.php?p=2066900#p2066900
// Create temporary article
$item = JTable::getInstance('content');
$dispatcher =JDispatcher::getInstance();
$params =new JParameter('');
JPluginHelper::importPlugin('content');
$item->parameters = new JParameter('');
$item->text = $content;
// Apply content plugins to custom module content
$event = 'onPrepareContent';
$eventArguments = array (&$item, &$params, 0);
$results = $dispatcher->trigger($event, $eventArguments);
return $item->text;
}
}
class SRBridgeManager
{
/**
*
* @var SRBridgeCMS
*/
var $_Bridge;
function SRBridgeManager()
{
$key = "__SR_BRIDGEMANAGER";
if(array_key_exists($key, $GLOBALS))
{
trigger_error('This class is a singleton class!',E_USER_ERROR);
}
if(defined('_JEXEC'))
{
$version = new JVersion;
$joomla = $version->getShortVersion();
$majorMinor = substr($joomla,0,3);
switch($majorMinor)
{
case '1.5':
require_once("SRBridgeJoomlaUser15.php");
require_once("SRBridgeJoomla15.php");
$this->_Bridge = new SRBridgeJoomla15();
break;
case '1.6':
require_once("SRBridgeJoomlaUser16.php");
require_once("SRBridgeJoomla15.php");
require_once("SRBridgeJoomla16.php");
$this->_Bridge = new SRBridgeJoomla16();
break;
case '1.7':
require_once("SRBridgeJoomlaUser16.php");
require_once("SRBridgeJoomla15.php");
require_once("SRBridgeJoomla16.php");
$this->_Bridge = new SRBridgeJoomla16();
break;
case '2.5':
require_once("SRBridgeJoomlaUser16.php");
require_once("SRBridgeJoomla15.php");
require_once("SRBridgeJoomla16.php");
$this->_Bridge = new SRBridgeJoomla16();
break;
}
}
else
{
trigger_error('Unable to find bridge.',E_USER_ERROR);
}
require_once($this->_Bridge->PathComponentAdministrator.'/globals.php');
require_once($this->_Bridge->PathComponentAdministrator.'/addons/Addon_Base.php');
require_once($this->_Bridge->PathComponentAdministrator.'/addons/Addon_Base_Frontend.php');
require_once($this->_Bridge->PathComponentAdministrator.'/addons/Addon_Base_Template.php');
require_once($this->_Bridge->PathComponentAdministrator.'/addons/Addon_Manager.php');
}
/**
* Creates a singleton instance of the Bridge.
* Usage: $SR_Bridge_Manager =& SRBridgeManager::Get();
* @return SRBridgeManager
*/
function &Get()
{
$key = "__SR_BRIDGEMANAGER";
if(!array_key_exists($key, $GLOBALS) || $GLOBALS[$key] == null)
{
$GLOBALS[$key] = new SRBridgeManager();
}
$manager =& $GLOBALS[$key];
return $manager->_Bridge;
}
}
class SRBridgeUserBase
{
var $_User = null;
var $_Acl = null;
var $Name = null;
var $UserName = null;
var $ID = null;
var $IP = null;
/**
* Creates a wrapped user object.
* @return
* @param object $userNameOrID[optional] Null for current users, else the username or user id.
*/
function SRBridgeUserBase($userNameOrID=null)
{
if(strtolower(get_class($this))=='srbridgeuserbase' || !is_subclass_of ($this,'SRBridgeUserBase'))
{
trigger_error('This class is abstract. It cannot be instantiated!',E_USER_ERROR);
}
}
/**
* Checks if the user can view the admin screen.
* @return true is can view, else false.
*/
function CanViewAdmin(){}
/**
* Checks if a user is currently logged in.
* @return
*/
function IsLoggedIn()
{
if(intval($this->ID) > 0)
{
return true;
}
else
{
return false;
}
}
/**
*
* @return an array of users
*/
function GetAllUsers(){}
}
?>