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_simple_review/ |
Upload File : |
<?php /** * $Id$ * * 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/>. */ defined('_JEXEC') or die( 'Restricted access' ); jimport('joomla.application.component.controller'); class SimpleReviewController extends JController { function display() { $addonManager =& Addon_Manager::Get(); // Set a default view if none exists if ( !JRequest::getCmd( 'view' ) ) { JRequest::setVar('view', 'Category' ); } //fix for if SEO is off if ( !JRequest::getCmd( 'id' ) ) { $tid = JRequest::getCmd( 'rev' ); if(!$tid) { $tid = JRequest::getCmd( 'cat' ); } if($tid) { $tid = explode("-", $tid); $tid = count($tid) > 0 ? intval($tid[0]) : 0; } else { $tid = 0; } JRequest::setVar('id', $tid ); } $task = JRequest::getVar('task'); /* if(!$task) { $task = JRequest::getVar('layout'); $task = str_replace('MODULE', '_', $task); }*/ if($task) { //Format ModuleName_TaskName - the module name should exclude Module e.g. Review_Module -> Review if(preg_match('/^([a-zA-Z]+)_([a-zA-Z]+)$/', $task, $matches) > 0) { $taskModule =& $addonManager->GetModule($matches[1].'_Module', true); $taskID = intval(JRequest::getCmd( 'taskid' )); $taskModule->PerformTask($matches[2], $taskID); if($taskModule->ExitAfterPerformingTask($matches[2], $taskID)) { return; } } } $view = ucwords(JRequest::getCmd( 'view' )); $id = intval(JRequest::getCmd( 'id' )); $module =& $addonManager->GetModule($view.'_Module', true); if($module == null) { $module =& $addonManager->GetModule("Category_Module", true); } $module->Display($id); } } ?>