Your IP : 216.73.216.218


Current Path : /home/antonen/chenglong.lt/modules/mod_flippingbook/tmpl/
Upload File :
Current File : /home/antonen/chenglong.lt/modules/mod_flippingbook/tmpl/lightboxview.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;
	$hidecontrols = "";
	if($hidecontrolbuttons):
	foreach($hidecontrolbuttons as $hck=>$hcv){
		$hidecontrols.=$hcv.",";
	}
	endif;
	$text_cannotaccessfiletext="Cannot access file";
	$pdf = $pdf;
	$soundFile = $module_uri.'/assets/sound/'.$soundFile;
	$soundFile = $soundFile;
?>
<link href="<?php echo $module_uri;?>assets/css/flippingbook.latest.min.css" rel="stylesheet" type="text/css">
<div id="bookid_<?php echo $module->id;?>"></div>
<?php if($loadjquery):?>
<script src="<?php echo $module_uri;?>assets/js/libs/jquery.min.js" type="text/javascript"></script>
<?php endif; ?>
<?php if($stop_reload):?>
<script src="<?php echo $module_uri;?>assets/js/flippingbook.lightbox.latest.V203.js" type="text/javascript"></script>
<?php endif; ?>

<style>
<?php echo $customcss;?>
</style>
<?php 
$mcfb_num = 0;
$multiple_catalogue_str = '';
if(count((array)$multiple_catalogue) > 0){
$jsscript ='';			
$jsscript .= '<script>'.PHP_EOL;		
		foreach ($multiple_catalogue as $mfbkey=>$mfbval)
		{
			$fb_class= 'class="_fbpj_thumb _fbpj_thumb_'.$module->id.'_'.$mcfb_num.'"';
			$fbid = 'fbpj_multifb_mo'.$module->id.'_co'.$mcfb_num.'';
			$fb_coverstyle = trim($mfbval->fb_coverstyle);
			$fb_coverstyle = str_replace(PHP_EOL,'',$fb_coverstyle);
			$fbtitle='';
			if($mfbval->show_fb_title): $fbtitle = ' tags="'.$mfbval->fb_title.'"'; endif;
			
			$fbthumbimage=''.$module_uri.'assets/images/defaultcover.png';
			if(!empty($mfbval->fb_cover)): $fbthumbimage = $site_uri.'/'.$mfbval->fb_cover; endif;
			
			$fb_pdf_source = '';
			$fb_source = $mfbval->fb_source;
			
			if($fb_source=='pdf_file'){
				$fb_url = $mfbval->fb_url;
				$fb_pdf_source=' source="'.$mfbval->fb_url.'"';
			
			} else if($fb_source=='image_folder'){
					
					$imagefolder = $mfbval->fb_imagefolder;
					$excludedimages = $mfbval->fb_excludedimages;
					$getimages = ModFlippingbookHelper::getImages( $site_uri,$mfbval->fb_imagefolder,$mfbval->fb_excludedimages );
			}	
$jsscript .= '
var dFlipLocation = "'.$module_uri.'assets/";
var option_'.$fbid.' = {';
if($fb_source=='image_folder'){
$jsscript .= '
	source:'.json_encode($getimages).',';

}
$jsscript .= '
	webgl: '.$mfbval->webgl.',
	webglShadow: '.$mfbval->webglShadow.',
	soundEnable: '.$mfbval->soundEnable.',
	height: "auto",
	autoEnableOutline: false,
	autoEnableThumbnail: false,
	overwritePDFOutline: true,
	enableDownload: '.$mfbval->enableDownload.',
	duration: '.$mfbval->pduration.',
	direction: FBPJAR.DIRECTION.'.$mfbval->direction.',
	pageMode: FBPJAR.PAGE_MODE.'.$mfbval->pageMode.',
	singlePageMode: FBPJAR.SINGLE_PAGE_MODE.'.$mfbval->spbooklet.',
	backgroundColor: "'.$mfbval->backgroundColor.'",
	autoPlay: '.$mfbval->enable_autoplay.',
	autoPlayDuration: '.$mfbval->autoPlayDuration.',
	autoPlayStart: '.$mfbval->enable_autoplay.',
	scrollWheel: '.$mfbval->scrollWheel.',
			pdfjsSrc: "'.$module_uri.'assets/js/libs/pdf.min.js",
			pdfjsCompatibilitySrc: "'.$module_uri.'assets/js/libs/compatibility.js",
			pdfjsWorkerSrc: "'.$module_uri.'assets/js/libs/pdf.worker.min.js",
			threejsSrc: "'.$module_uri.'assets/js/libs/three.min.js",
			imagesLocation: "'.$module_uri.'assets/images",
			imageResourcesPath: "'.$module_uri.'assets/images/pdfjs/",
			cMapUrl: "'.$module_uri.'assets/cmaps/",		
	controlsPosition: FBPJAR.CONTROLSPOSITION.'.$mfbval->controlsPosition.',
	allControls: "altPrev,pageNumber,altNext,play,outline,thumbnail,zoomIn,zoomOut,fullScreen,share,download,more,pageMode,startPage,endPage,sound",
	moreControls: "download,pageMode,startPage,endPage,sound",';
	if(isset($mfbval->hidecontrolbuttons) && is_array($mfbval->hidecontrolbuttons)):
	$jsscript .= 'hideControls: "'.implode(',',$mfbval->hidecontrolbuttons).'",';
	endif;	
	$jsscript .= 'text: {
		toggleSound: "'.$text_toggleSound.'",
		toggleThumbnails: "'.$text_toggleThumbnails.'",
		toggleOutline: "'.$text_toggleOutline.'",
		previousPage: "'.$text_previousPage.'",
		nextPage: "'.$text_nextPage.'",
		toggleFullscreen: "'.$text_toggleFullscreen.'",
		zoomIn: "'.$text_zoomIn.'",
		zoomOut: "'.$text_zoomOut.'",
		singlePageMode: "'.$text_singlePageMode.'",
		doublePageMode: "'.$text_doublePageMode.'",
		downloadPDFFile: "'.$text_downloadPDFFile.'",
		gotoFirstPage: "'.$text_gotoFirstPage.'",
		gotoLastPage: "'.$text_gotoLastPage.'",
		play: "'.$text_play.'",
		pause: "'.$text_pause.'",
		share: "'.$text_share.'",
		emailsubj:"'.$text_emailsubj.'",
		emailbodylink:"'.$text_emailbodylink.'",
		loadingtext:"'.$text_loading.'",
		nopdffileaccess:"'.$text_cannotaccessfiletext.'"';
		$jsscript .= '
		},
		';
		if($mfbval->selectbg!=='color'){ 
		$jsscript .= 'backgroundImage: "'.$mfbval->backgroundImage.'",'; 
		}								
		$jsscript .= '};';	
		
		$multiple_catalogue_str .= '<div style="'.$fb_coverstyle.'" '.$fb_class.' id="'.$fbid.'"'.$fbtitle.''.$fb_pdf_source.' thumb="'.$fbthumbimage.'"></div>';
		$mcfb_num++;		
		}
		echo $jsscript.''.PHP_EOL.'</script>';
		} 
	else {
		echo '<p style="display:block;padding:14px 12px;font-size:14px;color:red;background:#efef;border:1px solid #efefef;;border-radius:5px;">'.JText::_('MOD_FLIPPINGBOOK_FIELD_NOFLIPPINGBOOK').'</p>';
	}
	if(!empty($multiple_catalogue_str)){
		echo $multiple_catalogue_str;
		echo '
		<script>
		jQuery(document).ready(function () {
				'.$customjs.'	
			});
		</script>';	
	}
?>