AnonSec Team
Server IP : 10.2.73.233  /  Your IP : 216.73.216.59
Web Server : Apache/2.4.59 (Debian)
System : Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
User : www-data ( 33)
PHP Version : 5.6.40-64+0~20230107.71+debian10~1.gbp673146
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,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 : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/dialektologia/web/mambots/content/mediaplayer/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/dialektologia/web/mambots/content/mediaplayer/../smoothgallery.php
<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
/**
	SmoothGallery Joomla Mambot is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	SmoothGallery Joomla Mambot is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with JonDesign's SmoothGallery; if not, write to the Free Software
	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

$_MAMBOTS->registerFunction( 'onPrepareContent', 'smoothgallery_onprepare' );

include('smoothgallery/smoothgallery.class.php');
include('smoothgallery/content_smoothgallery.php');

/**
* smoothgallery Joomla Mambot
* please see http://www.oscandy.com/author/taras for instructions on how to use this mambot
* email tarasm@gmail.com
*/
function smoothgallery_onprepare( $published, &$row, &$params, $page=0 ) {

	// expression to search for
	$regex = '/{(smoothgallery)\s*(.*?)}/i';
	
	// check whether mambot has been unpublished
	if (!$published) {
		$row->text = preg_replace( $regex, '', $row->text );
		return true;
	}

	// simple performance check to determine whether bot should process further
	if ( strpos( $row->text, 'smoothgallery' ) === false ) {
		return true;
	}
	
	global $mainframe, $mosConfig_live_site, $database;

	
	// find all instances of mambot and put in $matches
	$matches = array();
	preg_match_all( $regex, $row->text, $matches, PREG_SET_ORDER );

	$output = '';
	
	$css='';
		
	$settings['imagesfolder'] = 'images/stories';
	$settings['cachefolder'] = 'mambots/content/smoothgallery/cache/';
	
	// check if param query has previously been processed
	if ( !isset($_MAMBOTS->_content_mambot_params['smoothgallery']) ) {
		// load mambot params info
		$query = "SELECT params"
		. "\n FROM #__mambots"
		. "\n WHERE element = 'smoothgallery'"
		. "\n AND folder = 'content'"
		;
		$database->setQuery( $query );
		$database->loadObject($mambot);
		
		// save query to class variable
		$_MAMBOTS->_content_mambot_params['smoothgallery'] = $mambot;
	}

	// pull query data from class variable
	$mambot = $_MAMBOTS->_content_mambot_params['smoothgallery'];
	
 	$botParams = new mosParameters( $mambot->params );
	
	$i=0;
	
	// for each occurance of mambot
	foreach ($matches as $match) {
		$tekst='';
		$i++;
		$settings['counter'] = $i;
		unset($gallery);
		$html = '';
		// convert mambot parameters to array 
		
		parse_str( html_entity_decode( $match[2] ), $args );
		//print_r(array_values($settings));
		
		$settings = array_merge((array)$botParams->_params, $settings, $args);
		
		// Declare Smooth Gallery Class
		$gallery = new content_smoothgallery();
		
		// pass arguments to initialize the gallery
		$gallery->init($row, $settings);
		// pass settings to defaults loader
		$gallery->loadDefaults($settings);
		
		// get images
		$images = $gallery->get_images();
		
		// pass settings to profile loader
		$gallery->loadProfiles($settings, $images);
		
		// get gallery html
		$html .= $gallery->get_gallery($images);
		
		// add window.onDomReady Script
		$html .= $gallery->get_script();
		
		// get head from 
		$gallery->get_head();

		// place the generated text back into the original text instead of the match
		$row->text = str_replace($match[0], $html, $row->text);
		//$args['image']='';
		unset($settings['album']);
		unset($settings['folder']);
		unset($settings['image']);
	}

	return true; 
}
?>

AnonSec - 2021