<?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');

?>

<link rel="stylesheet" type="text/css" href="<?php echo JURI::root().'components/com_jegroupbuy/assets/images/layout4/css/style.css'?>">

<div class="group_layout1_menu">

	<div>

		<div>

			<div>

				<?php

				$c = count($name);

				if($c != 0){

					$i = 1;

					foreach ($name as $values)

					{

						if($i <= $count){

							echo "<ul>";

								echo "<li>";

									echo "<table style='border-collapse:separate !important;margin-bottom:7px;'>";

										echo "<tr>";

											echo "<td width='40%' style='float:left;'>";

											if($values->imageurl != '' || null)

												echo "<a style='background:none !important;' href=".JURI::base()."index.php?option=com_jegroupbuy&view=productdetails&pid=$values->id><img src=".JURI::base()."$values->imageurl alt='' width='70px' height='60px'/></a>";

											else

												echo "<a style='background:none !important;' href=".JURI::base()."index.php?option=com_jegroupbuy&view=productdetails&pid=$values->id><img src=".JURI::base()."modules/mod_jegroupbuydeals/assets/images/jegroupbuy_icon_large.png alt='' width='70px' height='60px'/></a>";

											echo "</td>";

											echo "<td style='padding-right:3px;'></td>";

											echo "<td width='60%' >";

												echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'>";

													echo "<tr>";

														echo "<td style='font-size:16px;padding-bottom:8px;'>";

															echo "<a style='background:none;color:#095197;text-decoration:none;' href=".JURI::base()."index.php?option=com_jegroupbuy&view=productdetails&pid=$values->id>".ucfirst($values->title)."</a>";

														echo "</td>";

													echo "</tr>";

													echo "<tr>";

														echo "<td style='font-size:14px;font-weight:bold'>";

															echo JText::_('DEALPRICE')." : ".HTML_jegroupbuy::currency_symbols($values->currencysymbol)." ".$values->deal_price;

														echo "</td>";

													echo "</tr>";

												echo "</table>";

											echo "</td>";

										echo "</tr>";

									echo "</table>";

								echo "</li>";

							echo "</ul>";

						}

						$i = ++$i;

					}

					$listcount = $i-1;

				 if($c != $count) {

				 	if($c > $count) {

				 		if($catid == 0){

				 		?>

						 	<table cellpadding="0" cellspacing="0" width="50%" border="0" id="buttonimage_layout1">

								<tr>

									<td id="buy_left"></td>

									<td id="buy_bgimage" align="center" ><a id="linkimage" href= "<?php echo JURI::base(); ?>index.php?option=com_jegroupbuy&view=jegroupbuy"><?php echo JText::_('VIEWDEALS'); ?></a></td>

									<td id="buy_right"></td>

								</tr>

								<tr><td style="padding-bottom:8px;"></td></tr>

							</table>

					<?php } else{

				 			$link = "index.php?option=com_jegroupbuy&view=category&catid=$catid";

				 			?>

						 	<table cellpadding="0" cellspacing="0" width="50%" border="0" id="buttonimage_layout1">

								<tr>

									<td id="buy_left"></td>

									<td id="buy_bgimage" align="center" ><a id="linkimage" href= "<?php echo JURI::base().$link; ?>"><?php echo JText::_('VIEWDEALS'); ?></a></td>

									<td id="buy_right"></td>

								</tr>

								<tr><td style="padding-bottom:8px;"></td></tr>

							</table>



				 	<?php	}

				 		}

					}

				} else  { ?>

					<p style="padding:7px;margin:5px;font-weight:bold;">

						<?php echo JText::_('NO_DEALS'); ?>

					</p>

				<?php } ?>

			</div>

		</div>

	</div>

</div>

