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 :  C:/AppServ/www/news/administrator/components/com_youtubegallery/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/AppServ/www/news/administrator/components/com_youtubegallery/controllers/categories.php
<?php
/**
 * Youtube Gallery for Joomla! 1.5 Native Component
 * @version 3.8.3
 * @author Design Compass corp <support@joomlaboat.com>
 * @link http://www.joomlaboat.com
 * @GNU General Public License
 **/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die( 'Restricted access' );

jimport('joomla.application.component.controller');
/**
 * Youtube Gallery - Categories Controller
 */
class YoutubeGalleryControllerCategories extends JController
{
        /**
         * Proxy for getModel.
         */
		function display()
		{

				JRequest::setVar( 'view', 'categories');
				parent::display();
		}
		
		function newItem()
		{
			JRequest::setVar( 'view', 'categoryform');
			JRequest::setVar( 'layout', 'edit'  );
			JRequest::setVar('hidemainmenu', 1);
			parent::display();
		}

		function edit()
		{
		
			JRequest::setVar( 'view', 'categoryform');
			JRequest::setVar( 'layout', 'edit'  );
			JRequest::setVar('hidemainmenu', 1);
			parent::display();
		}
		
		/**
		 * Saves a option item
		*/
	
		function apply()
		{
				// get our model
				$model = &$this->getModel('categoryform');
				// attempt to store, update user accordingly
				$link 	= 'index.php?option=com_youtubegallery&controller=categories';
				
				if($this->_task == 'apply')
				{
					$id=JRequest::getInt('id', 0);
					$link 	= 'index.php?option=com_youtubegallery&controller=categories&task=edit&cid[]='.$id;
				}
		
				if ($model->store())
				{
					$msg = JText::_( 'Category Saved Successfully' );
					$this->setRedirect($link, $msg);
				}
				else
				{
					$msg = JText::_( 'Category was Unabled to Save');
					$this->setRedirect($link, $msg, 'error');
				}

		}
	
		function save()
		{
				// get our model
				$model = &$this->getModel('categoryform');
				// attempt to store, update user accordingly
			
				if($this->_task == 'save')
				{
					$link 	= 'index.php?option=com_youtubegallery&controller=categories';
				}
		
		
				if ($model->store())
				{
					$msg = JText::_( 'Category Saved Successfully' );
					$this->setRedirect($link, $msg);
				}
				else
				{
					$msg = JText::_( 'Category was Unabled to Save');
					$this->setRedirect($link, $msg, 'error');
				}
		}
		
 
        public function remove()
        {
                //echo 'delete cat';
				//die;
        	// Check for request forgeries
        	JRequest::checkToken() or jexit( 'Invalid Token' );
        	
            $cid	= JRequest::getVar( 'cid', array(), 'post', 'array' );

            if (!count($cid)) {

                $this->setRedirect( 'index.php?option=com_youtubegallery&controller=categories', JText::_('Select Category first.'),'error' );
                
        		return false;
        	}
		
        	$model =&$this->getModel('categoryform');
        	
        	$model->ConfirmRemove();
        }
	
        public function remove_confirmed()
        {
		
        	// Get some variables from the request
        	
        	$cid	= JRequest::getVar( 'cid', array(), 'post', 'array' );


        	if (!count($cid)) {
        		$this->setRedirect( 'index.php?option=com_youtubegallery&controller=categories', JText::_('Select Category first.'),'error' );
        		return false;
        	}

        	$model =& $this->getModel('categoryform');
        	if ($n = $model->delete($cid)) {
        		$msg = JText::sprintf( 'Category(s) deleted.', $n );
        		$this->setRedirect( 'index.php?option=com_youtubegallery&controller=categories', $msg );
        	} else {
        		$msg = $model->getError();
        		$this->setRedirect( 'index.php?option=com_youtubegallery&controller=categories', $msg,'error' );
        	}
		
        }
		
		public function copyItem()
		{
				
		    $cid = JRequest::getVar( 'cid', array(), 'post', 'array' );
	    
		    $model = $this->getModel('categoryform');
	    
	    
		    if($model->copyItem($cid))
		    {
				$msg = JText::_( 'Category(s) copied successfully' );
		    }
		    else
		    {
				$msg = JText::_( 'Category(s) was unable to copy.' );
				
		    }
	    
		    $link 	= 'index.php?option=com_youtubegallery&controller=categories';
		    $this->setRedirect($link, $msg);
		}


		/**
		* Cancels an edit operation
		*/
	
		function cancel()
		{
			$this->setRedirect( 'index.php?option=com_youtubegallery&controller=categories');
		}

}

?>

Anon7 - 2022
AnonSec Team