<?php
/**
 * JE Testing package
 * @author JExtension <contact@jextn.com<>
 * @link http://www.web-designs-company.com
 * Copyright (C) 201o - 2011 by web-designs-company.com. All rights reserved.
 * @license GNU/GPL, see LICENSE.php for full license.
**/

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

class HTML_jegroupbuy
{
	static function displayDeals($params)
	{
		$catid 		= $params->get('catid');
		$today_date = JHTML::_('date',  time(), "Y-m-d ");

		$db    	  	= JFactory::getDBO();
		$query		= $db->getQuery(true);

		$query->select('*');
		$query->from('#__jegroupbuy_product');
		$query->where("expired = 0");

		if($catid != 0)
		{
			$query->where('catid='.$catid);
		}

		$db->setQuery( $query);

		$values = $db->loadObjectlist();

		return $values;
	}

}

?>