<?php
/**
* @version 1.0.0
* @package RSEvents! 1.0.0
* @copyright (C) 2009 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/

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

$params = & $params;

$layout = $params->get('chooselayout',0);
$class_suffix = $params->get('moduleclass_sfx');
$class_suffix = (empty($class_suffix)) ? '' : '_'.$class_suffix;

// check if any results returned
if(empty($list))
	echo JText::_('RSE_NO_EVENTS_MODULE');
else {
?>
<div class="rse_upcoming<?php echo $class_suffix; ?>">
<?php 
echo ($layout == 0) ? '<ul>' : '' ; 
$startli = ($layout == 0) ? '<li>' : '' ;
$endli   = ($layout == 0) ? '</li>' : '' ;
?>

<?php
foreach($list as $item)
{
	echo $startli.$item->layout.$endli;
}
?>

<?php echo ($layout == 0) ? '</ul>' : '' ; ?>
</div>
<?php } ?>