<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(1); ?>
  			<? $uri2=$this->uri->segment(2); ?>
            <? if (($uri!='products') && ($uri!='view_product') && ($uri!='product') && ($uri!='product_price') && ($uri!='product_price_new') && ($uri2!='products') && ($uri2!='view_product') && ($uri2!='product') && ($uri2!='product_price') && ($uri2!='product_price_new')) {
			$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){ ?>
<?php /*?>                <div class="menu_body" style="display:block">
<?php */?>				<? //} 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): ?>



                <? $sub_subcategories = $this->MFuncs->getSubSubCategories($sub_category['sub_id']);?>
                <? if ($sub_subcategories) { ?>
               	<p class="menu_head2" style="padding:5px 0 5px 15px; margin-left:5px;"><?=$sub_category['name']?></p>
                <div class="menu_body2" style="display:none">
				<? foreach($sub_subcategories as $sub_subcategories=>$sub_subcategory): ?>
                <div class="menu_sub_links2">
                  <?=anchor("product_price/subsub/".$sub_subcategory['sub_sub_id'].'/priceasc', '- '.$sub_subcategory['name'])?>
                  </div>
                  <? //$i++; ?>
                <? endforeach ?>
                </div>
                <? } else { ?>
                 <? $qusql = "SELECT * FROM product_subcategories JOIN products ON product_subcategories.p_id=products.id WHERE product_subcategories.subcat_id=".$sub_category['sub_id']." AND products.published='Yes'";
				 $query = $this->db->query($qusql);
				 $tra = 0;
				 $tra = $query->num_rows(); 
				 if ($tra!=0) { ?>
                 <div class="menu_sub_links">
                  <?=anchor("product_price/sub/".$sub_category['sub_id'].'/priceasc', $sub_category['name']." ".$tra)?>
                   </div>
                  <? } ?>
               <? } ?>



                  <? //$i++; ?>
                <? endforeach ?>
                </div>
                <? } else { ?>
                  <p class="menu_head"><?=anchor('product_price/cat/'.$cat['cat_id'].'/priceasc', '<b>'.$cat['cat_name'].'</b>');?></p>
                <? } ?>
    <img src="<?=base_url()?>images/line_diakekommeni.png" />
                <? endforeach ?>
				<? } ?>
<?php /*?>		 <? $ld=$this->session->userdata('lang_id'); ?>
         <? if ($ld==1) { ?>
                     <? $link = $this->MFuncs->getLinkbyID(60); ?>
         <? } else { ?>
                     <? $link = $this->MFuncs->getLinkbyID(61); ?>
         <? } ?>
                     <? if ($link) { ?>
                <p class="menu_head" style="text-transform:uppercase"><?=anchor('txt/'.$link['id'], '<b>'.$link['name'].'</b>');?></p>
                	 <? } ?>
<?php */?>
 </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>
<div style="height:5px">
</div>
<div class="title_green">
<h2><img src="<?=base_url()?>images/kiklos_icon.png" align="absmiddle" />&nbsp;<strong><?=$this->lang->line('search_price')?></strong></h2>
</div>
<div class="cat_bgr_green">
<div id="orderForm">
  <? $attributes = array('class' => 'yform','AUTOCOMPLETE'=>'off'); ?>
  <?=form_open('by_price_new',$attributes); ?>
        <? echo "<p><label for='price'></label>";
			$options = array(''=>'Select one...', 'offers' => $this->lang->line('offers_txt'), '0-10' => '0 &euro; - 10 &euro;', '10-15' => '10 &euro; - 15 &euro;', '15-20' => '15 &euro; - 20 &euro;', '20' => '20 &euro; +');
			echo form_dropdown('price',$options, '') ."</p>"; ?>
        <div class="buttons">
<button type="submit" class="positive"> <?=$this->lang->line('go')?> </button></div>
 <?=form_close();?>
</div>
</div>

<? $news = $this->MFuncs->getNews(); ?>
<? if ($news) { ?>
<div style="height:5px">
</div>
<div class="left_title">
<h2 style="font-size:125%"><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>
<? } ?>
<?php /*?><div style="height:5px">
</div>
<div class="title_green">
<h2><img src="<?=base_url()?>images/kiklos_icon.png" align="absmiddle" />&nbsp;<strong><?=$this->lang->line('name_day')?></strong></h2>
</div>
<div class="cat_bgr_green">
<script language='javascript' src='<?=$this->lang->line('eortologio_uri')?>?fnt_clr=585200&tbl_brd=0&tbl_cellpading=3&tbl_cellspacing=0&tbl_title_font_color=585200&morfi=1&what_day=12&ttl=0&fr1=0&fr2=0'></script>
</div>
<?php */?>     
<div style="height:15px"></div>
<center>
    <?=anchor('name-day', img('images/giortazoun_new.jpg'));?>

</center>
<div style="height:15px"></div>
     <center>
<img src="<?=base_url()?>images/visa.jpg" alt="visa" width="80px" /><br />
<img src="<?=base_url()?>images/mastercard.jpg" alt="visa" width="80px"/><br />
<img src="<?=base_url()?>images/eurobank.jpg" alt="visa" width="80px"/><br />
<img src="<?=base_url()?>images/paypal.png" alt="paypal" width="80px"/>
</center>
<div style="height:15px"></div>
<center>
<div class="fb-like" data-href="https://www.facebook.com/Wines2u" data-send="false" data-layout="box_count" data-width="170" data-show-faces="true"></div><?php /*?><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.wines2u.gr%2F&amp;send=false&amp;layout=standard&amp;width=170&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=60" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:170px; height:60px;" allowTransparency="true"></iframe>
<?php */?>        </center>
        