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/basicviewpdf.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 = base64_encode($pdf);
	$soundFile = $module_uri.'/assets/sound/'.$soundFile;
	$soundFile = base64_encode($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.latest.V203.js" type="text/javascript"></script>
<?php endif; ?>
<script>
	var pdf = '<?php echo $pdf;?>'; 
	var soundf = '<?php echo $soundFile;?>';	
	var dFlipLocation = "<?php echo $module_uri;?>assets/";
	jQuery(document).ready(function () {
		pdf = ''+Base64.decode(pdf)+''; 
		var options = {
		webgl: <?php echo $webgl;?>,
		webglShadow: <?php echo $webglShadow;?>,
		soundEnable: <?php echo $soundEnable;?>,
		soundFile: ''+Base64.decode(soundf)+'',
		height: '<?php echo $height;?>',
		autoEnableOutline: <?php echo $autoEnableOutline;?>,
		autoEnableThumbnail: <?php echo $autoEnableThumbnail;?>,
		overwritePDFOutline: <?php echo $overwritePDFOutline;?>,
		enableDownload: <?php echo $enableDownload;?>,
		duration: <?php echo $pduration;?>,
		direction: FBPJAR.DIRECTION.<?php echo $direction;?>,
		pageMode: FBPJAR.PAGE_MODE.<?php echo $pageMode;?>,
		singlePageMode: FBPJAR.SINGLE_PAGE_MODE.<?php echo $spbooklet;?>,
		backgroundColor: "<?php echo $backgroundColor;?>",
		autoPlay: <?php echo $enable_autoplay;?>,
		autoPlayDuration: <?php echo $autoPlayDuration;?>,
		autoPlayStart: <?php echo $enable_autoplay;?>,
		scrollWheel: <?php echo $scrollWheel;?>,
			pdfjsSrc: "<?php echo $module_uri;?>assets/js/libs/pdf.min.js",
			pdfjsCompatibilitySrc: "<?php echo $module_uri;?>assets/js/libs/compatibility.js",
			pdfjsWorkerSrc: "<?php echo $module_uri;?>assets/js/libs/pdf.worker.min.js",
			threejsSrc: "<?php echo $module_uri;?>assets/js/libs/three.min.js",
			imagesLocation: "<?php echo $module_uri;?>assets/images",
			imageResourcesPath: "<?php echo $module_uri;?>assets/images/pdfjs/",
			cMapUrl: "<?php echo $module_uri;?>assets/cmaps/",		
		text: {
			toggleSound: "<?php echo $text_toggleSound;?>",
			toggleThumbnails: "<?php echo $text_toggleThumbnails;?>",
			toggleOutline: "<?php echo $text_toggleOutline;?>",
			previousPage: "<?php echo $text_previousPage;?>",
			nextPage: "<?php echo $text_nextPage;?>",
			toggleFullscreen: "<?php echo $text_toggleFullscreen;?>",
			zoomIn: "<?php echo $text_zoomIn;?>",
			zoomOut: "<?php echo $text_zoomOut;?>",
			singlePageMode: "<?php echo $text_singlePageMode;?>",
			doublePageMode: "<?php echo $text_doublePageMode;?>",
			downloadPDFFile: "<?php echo $text_downloadPDFFile;?>",
			gotoFirstPage: "<?php echo $text_gotoFirstPage;?>",
			gotoLastPage: "<?php echo $text_gotoLastPage;?>",
			play: "<?php echo $text_play;?>",
			pause: "<?php echo $text_pause;?>",
			share: "<?php echo $text_share;?>",
			emailsubj:"<?php echo $text_emailsubj;?>",
			emailbodylink:"<?php echo $text_emailbodylink;?>",
			loadingtext:"<?php echo $text_loading;?>",
			nopdffileaccess:"<?php echo $text_cannotaccessfiletext;?>"			
		},
		controlsPosition: FBPJAR.CONTROLSPOSITION.<?php echo $controlsPosition;?>,
		allControls: "altPrev,pageNumber,altNext,play,outline,thumbnail,zoomIn,zoomOut,fullScreen,share,download,more,pageMode,startPage,endPage,sound",
		moreControls: "download,pageMode,startPage,endPage,sound",
		hideControls: "<?php echo $hidecontrols;?>",
		<?php if($selectbg!=='color'):?>backgroundImage: "<?php echo $backgroundImage;?> ",<?php endif;?>
		};
		<?php if($enableOutlines && !empty($outlines)):?>
		options.outline = [
			<?php foreach ($outlines as $okey=>$oval){ ?>
			<?php echo '{title: "'.$oval->title.'", dest: '.$oval->destination.'},'; ?>
			<?php } ?>
		];
		<?php endif; ?>	
		var flipBook = jQuery("#bookid_<?php echo $module->id;?>").flipBook(pdf, options);
		
		<?php echo $customjs;?>		
		
		});
</script>
<style>
<?php echo $customcss;?>
</style>