Your IP : 216.73.216.41


Current Path : /home/purehotels/public_html/templates/purehotels/html/com_k2/1spalte/
Upload File :
Current File : /home/purehotels/public_html/templates/purehotels/html/com_k2/1spalte/item.php

<?php
/**
 * @version		2.6.x
 * @package		K2
 * @author		JoomlaWorks http://www.joomlaworks.net
 * @copyright	Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
 * @license		GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 */


// no direct access
defined('_JEXEC') or die;



$gallery ='';
$json = 'media/k2/gallerychamp/item'.$this->item->id.'/ordering.json';
if(file_exists($json)){
    $ordering = json_decode(file_get_contents($json));
    $ordering = $ordering->ordering;
    $gallery = $ordering;
}


?>	

<article id="default" class="article article-1">	
	<?php if ( count($gallery) == 1 ): ?>
		<div class="main-image">
			<?php 
				$image = new JImage('media/k2/gallerychamp/item'.$this->item->id.'/main/'.$gallery[0]);
				$image = $image->createThumbs('1100x400', JImage::CROP_RESIZE)[0]->getPath();
			?>
	        <img src="<?php echo $image; ?>" alt="" width="100%">
			<div class="image-bottom-tag"></div>
		</div>
	<?php else: ?>
		<div class="jcarousel-wrapper gallery" style="display: block;">
		    <div class="jcarousel one">
		        <ul>
					<?php foreach($gallery as $image): ?>
						<?php 
							$thumb = new JImage('media/k2/gallerychamp/item'.$this->item->id.'/main/'.$image);
							$thumb = $thumb->createThumbs('1100x400', JImage::CROP_RESIZE)[0]->getPath();
						?>
				        <li><img src="<?php echo $thumb; ?>" width="100%" alt=""></li>
					<?php endforeach; ?>
		        </ul>
		    </div>
		    <a href="#" class="jcarousel-control-prev"><img src="templates/purehotels/images/arrow-left.png" alt=""></a>
		    <a href="#" class="jcarousel-control-next"><img src="templates/purehotels/images/arrow-right.png" alt=""></a>
			<div class="image-bottom-tag"></div>
		</div>
	<?php endif; ?>




	
	<div class="content">

			
		<?php if($this->item->params->get('itemTitle')): ?>
			<h2 class="title">
				<?php echo $this->item->title; ?>
			</h2>
		<?php endif; ?>

		<?php if(isset($this->item->editLink)): ?>
		<!-- Item edit link -->
		<span class="itemEditLink">
			<a class="btn modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>">
				<?php echo JText::_('K2_EDIT_ITEM'); ?>
			</a>
		</span>
		<?php endif; ?>

		<div class="textWrapper">
			<?php if (strlen($this->item->introtext) > 2): ?>
				<div class="introtext">
					<?php echo $this->item->introtext; ?>
				</div>
			<?php endif; ?>
			<?php if (strlen($this->item->fulltext) > 2): ?>
				<div class="fulltext col1">
					<?php echo $this->item->fulltext; ?>
				</div>
			<?php endif; ?>
		</div>

	</div>
</div>