? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/domains/happytokorea.com/public_html_bk/test3/plugins/content/
File Upload :
Current File : /home/admin/domains/happytokorea.com/public_html_bk/test3/plugins/content/joomlapopin.php

<?php
/**
* @name Joomla Popin
* @description Show a popin window in an article
* @package Joomla 1.0.x
* @author DART Creations spam-me@dart-creations.com http://www.dart-creations.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* @version 1.5
*/ 



/** ensure this file is being included by a parent file */
defined( '_JEXEC' ) or die( 'Go Away!' );

$mainframe->registerEvent( 'onPrepareContent', 'botJoomlaPopin' );
 
function botJoomlaPopin( &$row, &$params, $page=0 ) {
 
  $db =& JFactory::getDBO();
	
	     
	$strpos =  JString::strpos( $row->text, 'joomlapopin' );

	if ( JString::strpos( $row->text, 'popin' ) === false ) {
		return true;
	}

  $plugin =& JPluginHelper::getPlugin('content', 'joomlapopin');
  
	// expression to search for
  $regex = "#{popin}#s";  
  
	plgContentProcessPopins( $row, $regex, $params );
}
/**
* Replaces the popin tags with the popin html
*/
function plgContentProcessPopins( &$row, &$regex, &$params  ) {

  if(!isset($_SESSION))
  {
     session_start();
  }
	
	// Get plugin info
	$plugin =& JPluginHelper::getPlugin('content', 'joomlapopin');
	
	$pluginParams = new JParameter( $plugin->params );
	
	$popinheight = $pluginParams->get('popinheight');
	$popinwidth = $pluginParams->get('popinwidth');
	$leftpos = $pluginParams->get('leftpos');
	$toppos = $pluginParams->get('toppos');
	$resizable = $pluginParams->get('resizable');
	$scrollable = $pluginParams->get('scrollable');
	$html = $pluginParams->get('html');
	$title = $pluginParams->get('titletext');
	$link = $pluginParams->get('link');
	$session = $pluginParams->get('session');
	$userparam = $pluginParams->get('user');

  if ($session == 0)
  {
		unset($_SESSION['views']); 
  }
  $output = "";
  if(!isset($_SESSION['views']))
	{
		$user =& JFactory::getUser();   
    $user_id = $user->get('id');   
    $display = null;
    if ($userparam == 0)
    {
    	$display = true;
    }
    else if ($userparam == 1 && !$user_id)
    {
    	$display = true;
    }
    else if ($userparam == 2 && $user_id)
    {
    	$display = true;
    }
    else 
    {
    	$display = false;
    }
    if ($display)
    {  
			$output = "<script type=\"text/javascript\" src=\"plugins/content/popin/dhtmlwindow.js\"></script>\n".
			$output = "<link rel=\"stylesheet\" href=\"plugins/content/popin/dhtmlwindow.css\" type=\"text/css\" />\n".
			"<div id=\"popincontent\" style=\"display:none\">\n".$html."</div>\n".
			//"<div id=\"popincontent\" style=\"clear:both\">\n".$html."</div>\n".
			"<script type=\"text/javascript\">\n".
			"var divwin=dhtmlwindow.open('divbox', 'div', 'popincontent', '".$title."', 'width=".$popinwidth.",height=".$popinheight.",left=".$leftpos.",top=".$toppos.",resize=".$resizable.",scrolling=".$scrollable."','recal')\n".
		  "</script>\n";
		}
	  				
		if ($session == 1)
		{
		  $_SESSION['views'] = 1;
		}

		if ($link == 1)
		{
			$output .= "<a href=\"http://www.dart-creations.com\" style=\"font-size:1px;display:none;\">Joomla Popin Window by DART Creations</a>";
		}
		
	}

	$row->text = preg_replace($regex, $output, $row->text);
}

?>

T1KUS90T
  root-grov@210.1.60.28:~$