Uname:Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64

Base Dir : /var/www/html

User : gavin


403WebShell
403Webshell
Server IP : 68.183.124.220  /  Your IP : 216.73.216.141
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : gavin ( 1000)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : 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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins/popup-builder/com/classes/popups/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/popup-builder/com/classes/popups/FblikePopup.php
<?php
namespace sgpb;
require_once(dirname(__FILE__).'/SGPopup.php');

class FblikePopup extends SGPopup
{
	public function getOptionValue($optionName, $forceDefaultValue = false)
	{
		return parent::getOptionValue($optionName, $forceDefaultValue);
	}

	public function getPopupTypeOptionsView()
	{
		return array(
			'filePath' => SG_POPUP_TYPE_OPTIONS_PATH.'facebook.php',
			'metaboxTitle' => 'Facebook Options'
		);
	}

	private function getScripts()
	{
		/*get WordPress localization name*/
		$locale = $this->getSiteLocale();
		ob_start();
		?>
		<script>
			jQuery(window).on('sgpbDidOpen', function (e) {
				var sgpbOldCB = window.fbAsyncInit;
				window.fbAsyncInit = function () {
					if (typeof sgpbOldCB === 'function') {
						sgpbOldCB();
					}
					FB.init({
						appId: <?php echo SGPB_FACEBOOK_APP_ID;?>
				    });
				};
				(function(d, s, id) {
					var js, fjs = d.getElementsByTagName(s)[0];
					if (d.getElementById(id)) return;
					js = d.createElement(s); js.id = id;
					js.src = 'https://connect.facebook.net/<?php echo $locale;?>/all.js#xfbml=1&version=v2.11&appId=<?php echo SGPB_FACEBOOK_APP_ID;?>';
					fjs.parentNode.insertBefore(js, fjs);
				}(document, 'script', 'facebook-jssdk'));
			});
		</script>
		<?php
		$scripts = ob_get_contents();
		ob_get_clean();

		return $scripts;
	}

	private function getButtonConfig($shareUrl, $layout, $shareButtonStatus)
	{
		ob_start();
		?>
			<div class='sg-fb-buttons-wrapper sgpb-fb-wrapper-<?php echo $layout;?>'>
				<div class="fb-like"
				     data-href="<?php echo $shareUrl; ?>"
				     data-layout="<?php echo $layout; ?>"
				     data-action="like"
				     data-size="small"
				     data-show-faces="true"
				     data-share="<?php echo $shareButtonStatus; ?>">
				</div>
			</div>
		<?php
		$buttonConfig = ob_get_contents();
		ob_get_clean();

		return $buttonConfig;
	}

	private function getFblikeContent()
	{
		$options = $this->getOptions();
		$shareUrl = $options['sgpb-fblike-like-url'];
		$layout = $options['sgpb-fblike-layout'];
		$shareButtonStatus = true;
		if (!empty($options['sgpb-fblike-dont-show-share-button'])) {
			$shareButtonStatus = false;
		}

		$scripts = $this->getScripts();
		$buttonConfig = $this->getButtonConfig($shareUrl, $layout, $shareButtonStatus);
		ob_start();
		?>
		<div id="sg-facebook-like">
			<div id="fb-root"></div>
			<?php echo $buttonConfig; ?>
			<?php echo $scripts; ?>
		</div>
		<?php
		$content = ob_get_contents();
		ob_get_clean();

		return $content;
	}

	public function getPopupTypeContent()
	{
		$fbLikeContent = $this->getFblikeContent();
		$popupContent = $this->getContent();
		$popupContent .= $fbLikeContent;

		return $popupContent;
	}

	public function getExtraRenderOptions()
	{
		return array();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit