403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Old Sites/ees_request/tmp/install_4dbede53792dd/com_jvframework_j16/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Old Sites/ees_request/tmp/install_4dbede53792dd/com_jvframework_j16/script.php
<?php
/**
 # com_jvframework - JV Framework
 # @version		1.6.x
 # ------------------------------------------------------------------------
 # author    Open Source Code Solutions Co
 # copyright Copyright (C) 2011 joomlavi.com. All Rights Reserved.
 # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL or later.
 # Websites: http://www.joomlavi.com
 # Technical Support:  http://www.joomlavi.com/my-tickets.html
-------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Script file of jvframework
 */
class PlgSystemInstallerInstallerScript
{
	/**
	 * method to install the component
	 *
	 * @return void
	 */
	function install($parent) 
	{
		// $parent is the class calling this method
		JVInstall::process($parent);
	}
    
    /**
	 * method to update the component
	 *
	 * @return void
	 */
	function update($parent) 
	{
		// $parent is the class calling this method
		JVInstall::process($parent);
		
	}
}

class JVInstaller extends JInstaller{
    /**
	 * Package installation method
	 *
	 * @access	public
	 * @param	string	$path	Path to package source folder
	 * @return	boolean	True if successful
	 * @since	1.5
	 */
	public function install($path=null)
	{
		if ($path && JFolder::exists($path)) {
			$this->setPath('source', $path);
		}
		else
		{
			$this->abort(JText::_('JLIB_INSTALLER_ABORT_NOINSTALLPATH'));
			return false;
		}

		if (!$this->setupInstall())
		{
			$this->abort(JText::_('JLIB_INSTALLER_ABORT_DETECTMANIFEST'));
			return false;
		}

		$type = (string)$this->manifest->attributes()->type;

		if (is_object($this->_adapters[$type]))
		{
			// Add the languages from the package itself
			if (method_exists($this->_adapters[$type], 'loadLanguage'))
			{
				$this->_adapters[$type]->loadLanguage($path);
			}

			// Fire the onExtensionBeforeInstall event.
        	JPluginHelper::importPlugin('extension');
        	$dispatcher = JDispatcher::getInstance();
			$dispatcher->trigger('onExtensionBeforeInstall', array('method'=>'install', 'type'=>$type, 'manifest'=>$this->manifest, 'extension'=>0));

			// Run the install
			$result = $this->_adapters[$type]->install();

			// Fire the onExtensionAfterInstall
			$dispatcher->trigger('onExtensionAfterInstall', array('installer'=>clone $this, 'eid'=> $result));
			if ($result !== false) {
                if($type == 'component'){
                    $db	= JFactory::getDbo();
                    $query = $db->getQuery(true);
                    $query->delete('#__menu');
            		$query->where('`client_id` = 1');
            		$query->where('`component_id` = '.(int) $result);
                    $db->setQuery((string) $query);
                    $db->query();
                                        
                    return true;
                }  
				return true;
			}
			else {
				return false;
			}
		}
		return false;
	}
   
}

class JVInstall {
	
	public static function process(JInstallerPlugin &$component) {
	   
		if (isset($component->get('manifest')->additional[0])) {
			$add = $component->get('manifest')->additional[0];
			if (count($add->children())) {
			    $exts = $add->children();
			    foreach ($exts as $ext) {
					$installer = new JVInstaller();
					$installer->setOverwrite(true);
					
					$update = false;
					if ($ext->name() == 'template' && JFolder::exists(JPATH_ROOT.'/templates/'.$ext->getAttribute('name'))) {
						$update = true;
					}
                    
                    if ($ext->name() == 'library' && JFolder::exists(JPATH_ROOT.'/libraries/'.$ext->getAttribute('name'))) {
						$update = true;
					}
					
					if ($ext->name() == 'component' && JFolder::exists(JPATH_ROOT.'/components/'.$ext->getAttribute('name'))) {
						$update = true;
					}
		
					$folder = $component->get('parent')->getPath('source').'/'.$ext->getAttribute('folder');					
					$folder = rtrim($folder, "\\/") . '/';
					if (JFolder::exists($folder)) {
				    	$extensions[] = array(
							'name' => $ext->data(),
							'type' => $ext->name(),
							'folder' => $folder,
							'installer' => $installer,
							'status' => false,
				    		'update' => $update
				    	);
				    }
			    }
			}	
		}
		
		// install additional extensions
		for ($i = 0; $i < count($extensions); $i++) {
			if (is_dir($extensions[$i]['folder'])) {
				if (@$extensions[$i]['installer']->install($extensions[$i]['folder'])) {
					$extensions[$i]['status'] = $extensions[$i]['update'] ? 2 : 1;
				} else {
					$error = true;
					break;
				}
			}
		}
		self::displayResults($extensions, 'Extensions', 'Extension');
		
		return true;
	}
	
	public static function displayResults($result, $name, $type) {?>
		
		<h3><?php echo JText::_($name); ?></h3>
		<table class="adminlist">
			<thead>
				<tr>
					<th class="title"><?php echo JText::_($type); ?></th>
					<th width="60%"><?php echo JText::_('Status'); ?></th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="2">&nbsp;</td>
				</tr>
			</tfoot>
			<tbody>
				<?php 
					foreach ($result as $i => $ext) : ?>
					<tr class="row<?php echo $i++ % 2; ?>">
						<td class="key"><?php echo $ext['name']; ?></td>
						<td>
							<?php $style = $ext['status'] ? 'font-weight: bold; color: green;' : 'font-weight: bold; color: red;'; ?>
							<?php $update = $ext['status'] == 2 ? 'Updated' : 'Installed'; ?>
							<span style="<?php echo $style; ?>"><?php echo $ext['status'] ? JText::_($update.' successfully') : JText::_('NOT Installed'); ?></span>
						</td>
					</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
		
		<?php
		
	}	
	
}

Youez - 2016 - github.com/yon3zu
LinuXploit