<div class="left_title">
<h2><img src="<?=base_url()?>images/kiklos_icon.png" align="absmiddle" />&nbsp;<strong><?=$this->lang->line('categories_title')?></strong></h2>
</div>
<div class="left_cat_bgr">
  <div class="firstpane menu_list"> <!--Code for menu starts here-->
  			<? $uri=$this->uri->segment(2); ?>
            <? if (($uri!='products') || ($uri!='view_product') || ($uri!='product')) {
			$category_id='';
			} ?>
			<? $categories = $this->MFuncs->getCategories(); ?>
                <? if ($categories) { ?>
                <? $i=1; ?>
				<? foreach($categories as $result=>$cat): ?>
                <? $sub_categories = $this->MFuncs->getSubCategories($cat['cat_id']);?>
                <? if ($sub_categories) { ?>
               	<p class="menu_head"><?=$cat['cat_name']?></p>
                <? if (!$category_id) { ?>
                <? if ($i==1){ ?>
                <div class="menu_body" style="display:block">
				<? } else { ?>
                <div class="menu_body" style="display:none">
                <? } 
				} elseif ($category_id==$cat['cat_id']) {?>
                 <div class="menu_body" style="display:block">
                <? } else { ?>
                <div class="menu_body" style="display:none">
                <? } ?>
				<? foreach($sub_categories as $sub_categories=>$sub_category): ?>
                  <?=anchor("products/sub/".$sub_category['sub_id'], $sub_category['name'])?>
                  <? $i++; ?>
                <? endforeach ?>
                </div>
                <? } else { ?>
                  <p><?=anchor('products/cat/'.$cat['cat_id'], '<b>'.$cat['cat_name'].'</b>');?></p>
                <? } ?>
    <img src="<?=base_url()?>images/line_diakekommeni.png" />
                <? endforeach ?>
				<? } ?>
 </div>
<?php /*?>    <ul id="categories">
	<? foreach($categories as $result=>$cat): ?>
    <li><?=anchor('products/'.$cat['cat_id'], '<b>'.$cat['cat_name'].'</b>');?></li>
    <img src="<?=base_url()?>images/line_diakekommeni.png" />
    <? endforeach ?>
	</ul>
<?php */?></div>
<? $news = $this->MFuncs->getNews(); ?>
<? if ($news) { ?>
<div style="height:5px">
</div>
<div class="left_title">
<h2><img src="<?=base_url()?>images/kiklos_icon.png" align="absmiddle" />&nbsp;<strong><?=$this->lang->line('news_title')?></strong></h2>
</div>
<div class="left_cat_bgr">
    <ul id="categories">
	<? foreach($news as $result=>$new): ?>
    <li><?=anchor('news/'.$new['id'], '<b>'.$new['title'].'</b>');?></li>
    <img src="<?=base_url()?>images/line_diakekommeni.png" />
    <? endforeach ?>
	</ul>
</div>
<? } ?>