<?php
/**
 * JE Groupbuydeals 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 display($catid)
	{

		$today_date = JHTML::_('date',  time(), "Y-m-d ");

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

		if($catid == 0)
		$query	  	  = "SELECT * from #__jegroupbuy_product WHERE expired =0";
		else
		$query	  	  = "SELECT * from #__jegroupbuy_product WHERE expired =0 AND catid='$catid'";

		$db->setQuery( $query);

		$values = $db->loadObjectlist();

		return $values;
	}

	function currency_symbols($sym)
	{
		if($sym == "1") $symbol = "&#36";
		elseif($sym == "2") $symbol = "&#163";
		elseif($sym == "3") $symbol = "&#165";
		elseif($sym == "4") $symbol = "&#128";
		elseif($sym == "5") $symbol = "&#8377";
		elseif($sym == "6") $symbol = "&#36";
		elseif($sym == "7") $symbol = "&#36";
		elseif($sym == "8") $symbol = "&#36";
		elseif($sym == "9") $symbol = "&#67&#72&#70";
		elseif($sym == "10") $symbol = "&#36";
		elseif($sym == "11") $symbol = "&#163";
		elseif($sym == "12") $symbol = "&#107&#114";
		elseif($sym == "13") $symbol = "&#107&#114";
		elseif($sym == "14") $symbol = "&#122&#322";
		elseif($sym == "15") $symbol = "&#107&#114";
		elseif($sym == "16") $symbol = "&#70&#116";
		elseif($sym == "17") $symbol = "&#75&#269";
		elseif($sym == "18") $symbol = "&#8362";
		elseif($sym == "19") $symbol = "&#36";
		elseif($sym == "20") $symbol = "&#82&#36";
		elseif($sym == "21") $symbol = "&#82&#77";
		elseif($sym == "22") $symbol = "&#8369";
		elseif($sym == "23") $symbol = "&#78&#84&#36";
		elseif($sym == "24") $symbol = "&#3647";
		else $symbol = "&#8356";

		return $symbol;
	}

}

?>