        <?=$this->tinyMce?>
<center><h3><?=$title?></h3></center>
      <? if ($this-> session-> flashdata('message')): ?>
    <div class='warning'>
      <?=$this-> session-> flashdata('message');?>
    </div>
    <? endif; ?>
                  <div class="subcolumns">
        <div class="c50l">
          <div class="subcl">
              </div>
        </div>
        <div class="c50r">
          <div class="subcr">
<?php /*?><? $attributes=array('class'=>'search-form', 'autocomplete'=>'off');?>
<? $data = array("name" => "term", "id" => "term", "maxlength" => "128", 'id'=>'masthead-search-term', 'class'=>'search-term');?>
<div id="masthead-search">
	<?=form_open("admin/categories/search_prd_offer",$attributes); ?>
    <?="Αναζήτηση Προϊόντων"?>
    <?=form_input($data);?>
    <input id="submit" type="submit" value="Search" name="submit" class="yt-button yt-button-primary"/>
	<?=form_close();?>
</div>
<?php */?>    </div>
  </div>
</div>
<br />
<? if ($products) { ?>
    <table cellspacing="0" cellpadding="0" border="1" class="full">
      <thead>
        <tr>
          <th colspan="100%" scope="col">Available Products</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th scope="col">Εικόνα</th>
          <th scope="col">Όνομα</th>
          <th scope="col">Κατηγορία</th>
          <th scope="col">Αρχική Τιμή</th>
          <th scope="col">Προσθήκη στις Προσφορές</th>
          <th scope="col">Τιμή Προσφοράς</th>
     </tr>
        <? foreach($products as $products=>$product){ ?>
        <? //$company_details = $this->MAdmins->getHotelDetailsUnique($hotel['h_id']); ?>
        <? $categories = $this->MAdmins->getProductCategories($product['p_id']); ?>

            <? $attributes = array('class' => 'nform'); ?>
		    <?=form_open('admin/categories/update_product_offers', $attributes); ?>
        <tr>
          <td><a  title="<?=$product['name']?>"  href="<?=base_url().'images/prds/'.$product['image']?>" rel="shadowbox[];options={counterType:'skip',continuous:true,animSequence:'sync'}"> <img class="center" src="<?=base_url().'images/prds/thumb/'.$product['image']?>" style="max-width:120px; max-height:200px;" /> </a></td>
          <td><?=$product['name']?></td>
          <td><? foreach($categories as $categories=>$category){ ?>
           <? $category_name = $this->MAdmins->getCategoryName($category['cat_id'], 1); ?>
		  <?=$category_name['cat_name']?><br />
          <? } ?></td>
          <td><?=$product['price']?></td>
        <td>
      <? $check = $this->MAdmins->checkProductOffers($product['p_id']); ?>
      <div class="type-check">
        <?=form_checkbox($product['p_id'], $product['p_id'], $check); ?>
        <?=form_label($product['name'])?>
      </div>
      	</td>
          <td>
        <?  echo "<p><label for='offer_price'></label>";
		$data = array('name'=>'offer_price'.$product['p_id'],'id'=>'offer_price'.$product['p_id'],'size'=>15, 'value' => $product['offer_price']);
echo form_input($data) ."</p>"; ?>
		</td>
       </tr>
       <? } ?>
      </tbody>
    </table>
    <? echo form_submit('submit','Update Page')?>
    <? echo form_close(); ?>
<?    } ?>