Your IP : 216.73.216.218


Current Path : /proc/thread-self/root/home/antonen/chenglong.lt/modules/mod_flippingbook/
Upload File :
Current File : //proc/thread-self/root/home/antonen/chenglong.lt/modules/mod_flippingbook/mod_flippingbook.php

<?php
/**
* @package 		mod_flippingbook - Flipping Book
* @version		2.0.3
* @created		Oct 2020
* @author		PluginJar.com
* @email		support@pluginjar.com
* @website		https://www.pluginjar.com
* @support		https://www.pluginjar.com/premium-support-board.html
* @copyright	Copyright (C) 2020 - 2021 PluginJar.com. All rights reserved.
* @license		GNU General Public License version 2 and above
*/
	defined('_JEXEC') or die;

	// modules base location
	$site_uri = JUri::base();
	$module_uri = $site_uri.'modules/mod_flippingbook/';

		$document = JFactory::getDocument();
		JLoader::register('ModFlippingbookHelper', __DIR__ . '/helper.php');

		$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
		// Field : Load jQuery 
		$loadjquery 			= $params->get('loadjquery', '0');
		// Field : Load Flipbook JS 
		$stop_reload 			= $params->get('stop_reload', '1');
		// Field : Theme 
		$theme 			= $params->get('theme', 'basicview');
		// Field : FB Source 
		$fbsource 			= $params->get('fbsource', 'pdf_file');
		// Field : Image Folder 
		$imagefolder 			= $params->get('imagefolder', 'http://www.mywebsite.com/images/flipbookimages');
		// Field : PDF File Source 
		$pdf 			= $params->get('pdf', 'https://www.yoursite.com/modules/mod_flippingbook/assets/samples/demo.pdf');
		// Field : Background 
		$selectbg 			= $params->get('selectbg', 'color');
		// Field : Background Color 
		$backgroundColor 			= $params->get('backgroundColor', '#FFFFFF');
		// Field : Background Image 
		$backgroundImage 			= $params->get('backgroundImage', 'background.jpg');
		// Field : Direction 
		$direction 			= $params->get('direction', 'LTR');
		// Field : Page Mode 
		$pageMode 			= $params->get('pageMode', 'If you select single page view, a single page will be centered.');
		// Field : Single Page Mode 
		$spbooklet 			= $params->get('spbooklet', 'BOOKLET');
		// Field : Height 
		$height 			= $params->get('height', '100%');
		// Field : Enable Download 
		$enableDownload 			= $params->get('enableDownload', 'false');
		// Field : 3D Usage 
		$webgl 			= $params->get('webgl', 'true');
		// Field : 3D Shadows 
		$webglShadow 			= $params->get('webglShadow', 'true');
		// Field : Page Turn Duration 
		$pduration 			= $params->get('pduration', '800');
		// Field : Enable Sound 
		$soundEnable 			= $params->get('soundEnable', 'true');
		// Field : Select Sound 
		$soundFile 			= $params->get('soundFile', 'turn1.mp3');
		// Field : Enable Auto Play 
		$enable_autoplay 			= $params->get('enable_autoplay', 'false');
		// Field : Auto Play Duration 
		$autoPlayDuration 			= $params->get('autoPlayDuration', '2000');
		// Field : Enable Scroll Wheel 
		$scrollWheel 			= $params->get('scrollWheel', 'true');
		// Field : Enable Auto Thumbnails 
		$autoEnableThumbnail 			= $params->get('autoEnableThumbnail', 'false');
		// Field : Control Bar Position 
		$controlsPosition 			= $params->get('controlsPosition', 'BOTTOM');
		// Field : Hide Control Buttons 
		$hidecontrolbuttons 			= $params->get('hidecontrolbuttons', '0');
		// Field : Enable Outlines 
		$enableOutlines 			= $params->get('enableOutlines', '0');
		// Field : Remove Inbuilt Outlines 
		$overwritePDFOutline 			= $params->get('overwritePDFOutline', 'true');
		// Field : Enable Auto Outlines 
		$autoEnableOutline 			= $params->get('autoEnableOutline', 'false');
		// Field : Create Outlines 
		$outlines 			= $params->get('outlines', 'Some Value');
		// Field : Loading Text 
		$text_loading 			= $params->get('text_loading', 'Flippingbook is Loading');
		// Field : Sound 
		$text_toggleSound 			= $params->get('text_toggleSound', 'Turn on/off Sound');
		// Field : Thumbnails 
		$text_toggleThumbnails 			= $params->get('text_toggleThumbnails', 'Toggle Thumbnails');
		// Field : Outlines 
		$text_toggleOutline 			= $params->get('text_toggleOutline', 'Toggle Outline/Bookmark');
		// Field : Previous Page 
		$text_previousPage 			= $params->get('text_previousPage', 'Previous Page');
		// Field : Next Page 
		$text_nextPage 			= $params->get('text_nextPage', 'Next Page');
		// Field : Fullscreen 
		$text_toggleFullscreen 			= $params->get('text_toggleFullscreen', 'Toggle Fullscreen');
		// Field : Zoom in 
		$text_zoomIn 			= $params->get('text_zoomIn', 'Zoom in');
		// Field : Zoom out 
		$text_zoomOut 			= $params->get('text_zoomOut', 'Zoom out');
		// Field : Single Page Mode 
		$text_singlePageMode 			= $params->get('text_singlePageMode', 'Single Page Mode');
		// Field : Double Page Mode 
		$text_doublePageMode 			= $params->get('text_doublePageMode', 'Double Page Mode');
		// Field : Download PDF File 
		$text_downloadPDFFile 			= $params->get('text_downloadPDFFile', 'Download PDF File');
		// Field : Goto First Page 
		$text_gotoFirstPage 			= $params->get('text_gotoFirstPage', 'Goto Frist Page');
		// Field : Goto Last Page 
		$text_gotoLastPage 			= $params->get('text_gotoLastPage', 'Goto Last Page');
		// Field : Play 
		$text_play 			= $params->get('text_play', 'Start Auto Play');
		// Field : Pause AutoPlay 
		$text_pause 			= $params->get('text_pause', 'Pause AutoPlay');
		// Field : Share 
		$text_share 			= $params->get('text_share', 'Share');
		// Field : Email Subject 
		$text_emailsubj 			= $params->get('text_emailsubj', 'You must see that page!');
		// Field : Email Body 
		$text_emailbodylink 			= $params->get('text_emailbodylink', 'Check out this site :');
		// Field : Custom CSS 
		$customcss 			= $params->get('customcss', '/* write your custom css */');
		// Field : Custom JS 
		$customjs 			= $params->get('customjs', '// Write your custom JS');
		$excludedimages 			= $params->get('excludedimages', '180px_koala_ag1.jpg,180px_wobbegong.jpg');
		// Load Layout 
		switch($theme){
			case 'basicview':
				if($fbsource=="pdf_file"){
					require JModuleHelper::getLayoutPath('mod_flippingbook', 'basicviewpdf');
				} else if($fbsource=="image_folder"){
						if(!is_dir( $imagefolder )){
							echo 'There is no such a folder <h4>'.$imagefolder.'</h4>';
						} else {				
							require JModuleHelper::getLayoutPath('mod_flippingbook', 'basicviewimages');
						}
				}
			break;
			case 'lightboxview':
			$multiple_catalogue = $params->get('multiple_catalogue');
			require JModuleHelper::getLayoutPath('mod_flippingbook', 'lightboxview');
			break;
			case 'linkview':
			require JModuleHelper::getLayoutPath('mod_flippingbook', 'linkview');
			break;			
		}