<?php
/**
* @Copyright Copyright (C) 2010 VTEM . All rights reserved.
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
* @link     	http://www.vtem.net
**/

// no direct access
defined('_JEXEC') or die('Restricted access');
// Include the syndicate functions only once
require_once (dirname(__FILE__).DS.'helper.php');
$imagePath 	= modVtemimageshowHelper::cleanDir($params->get( 'imagePath', 'images/stories/fruit' ));
$sortCriteria = $params->get( 'sortCriteria', 0);
$sortOrder = $params->get( 'sortOrder', 'asc');
$sortOrderManual = $params->get( 'sortOrderManual', '');
$width = $params->get( 'width', 650 );
$height = $params->get( 'height', 250 );

$document = &JFactory::getDocument();
$document->addStyleSheet(JURI::root().'modules/mod_vtem_imageshow/css/styles.css');

if (trim($sortOrderManual) != "")
	$images = explode(",", $sortOrderManual);
else
	$images = modVtemimageshowHelper::imageList($imagePath, $sortCriteria, $sortOrder);
require(JModuleHelper::getLayoutPath('mod_vtem_imageshow'));