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/app/webroot/news/administrator/components/com_youtubegallery/controllers/ |
Upload File : |
<?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 to this file defined('_JEXEC') or die('Restricted access'); // import Joomla controllerform library jimport('joomla.application.component.controller'); /** * YoutubeGallery - LinksForm Controller */ class YoutubeGalleryControllerSettings extends JController { /** * Proxy for getModel. */ function display($cachable = false, $urlparams = array()) { $task=$_POST['task']; if($task=='linksform.add' or $task=='add' or $task=='linksform.edit' or $task=='edit' ) { $this->setRedirect( 'index.php?option=com_youtubegallery&controller=settings&layout=edit'); return true; } JRequest::setVar( 'view', 'settings'); JRequest::setVar( 'layout', 'edit'); switch(JRequest::getVar( 'task')) { case 'apply': $this->save(); break; case 'settings.apply': $this->save(); break; case 'save': $this->save(); break; case 'settings.save': $this->save(); break; case 'cancel': $this->cancel(); break; case 'settings.cancel': $this->cancel(); break; default: parent::display(); break; } } function save($key = NULL, $urlVar = NULL) { $task = JRequest::getVar( 'task'); // get our model $model = $this->getModel('settings'); // attempt to store, update user accordingly if($task != 'save' and $task != 'apply' and $task != 'settings.save' and $task != 'settings.apply' ) { $msg = 'Settings was unable to save'; $this->setRedirect($link, $msg, 'error'); } if ($model->store()) { if($task == 'save' or $task == 'settings.save') $link = 'index.php?option=com_youtubegallery&controller=settings&layout=edit'; elseif($task == 'apply' or $task == 'settings.apply') { $link = 'index.php?option=com_youtubegallery&controller=settings&layout=edit'; } $msg = 'Settings Saved Successfully'; $this->setRedirect($link, $msg); } else { //die; $link = 'index.php?option=com_youtubegallery&controller=settings&layout=edit'; $msg = 'Settings was unable to save'; $this->setRedirect($link, $msg, 'error'); } } /** * Cancels an edit operation */ /*function cancelItem() { $model = $this->getModel('item'); $model->checkin(); }*/ /** * Cancels an edit operation */ function cancel($key = NULL) { $this->setRedirect( 'index.php?option=com_youtubegallery&controller=linkslist'); } /** * Form for copying item(s) to a specific option */ }