<?=$this->tinyMce?>
<center><h3><?=$title?></h3></center>
      <? if ($this-> session-> flashdata('message')): ?>
    <div class='warning'>
      <?=$this-> session-> flashdata('message');?>
    </div>
    <? endif; ?>
<div>
            <? $attributes = array('class' => 'nform'); ?>
		    <?=form_open('admin/categories/save_product', $attributes); ?>
            <div>
          <h2>Γενικές Πληροφορίες</h2>
              <table cellspacing="0" cellpadding="0" border="1" class="full">
      <tbody>
        <tr>
         <th scope="col">Τιμή</th>
         <th scope="col">Keywords</th>
         <th scope="col">Βάρος (γρ.)</th>
         <th scope="col">Published</th>
         <th scope="col">Διαθεσιμοτητα</th>
     </tr>
        <tr>
          <td>
        <?  echo "<p><label for='price'></label>";
		$data = array('name'=>'price','id'=>'price','size'=>15, 'value' => $this->input->post('price'));
echo form_input($data) ."</p>"; ?>
		</td>
            <td>
        <?  echo "<p><label for='keywords'></label>";
		$data = array('name'=>'keywords','id'=>'keyword','size'=>15, 'value' => $this->input->post('keywords'));
echo form_input($data) ."</p>"; ?>
		</td>
         <td>
        <?  echo "<p><label for='weight'></label>";
		$data = array('name'=>'weight','id'=>'weight','size'=>15, 'value' => $this->input->post('weight'));
echo form_input($data) ."</p>"; ?>
		</td>
     <td>
        <? echo "<p><label for='published'></label>";
			$options = array(''=>'Select one...', 'Yes' => 'Yes', 'No' => 'No');
			echo form_dropdown('published',$options, '') ."</p>"; ?>
		</td>
     <td>
        <? echo "<p><label for='available'></label>";
			$options = array(''=>'Select one...', 'Yes' => 'Yes', 'No' => 'No');
			echo form_dropdown('available',$options, 'Yes') ."</p>"; ?>
		</td>
       </tr>
      </tbody>
    </table>
    </div>
    <br />
    <div>
                    <h2>Λεπτομέρειες Προϊόντος</h2>
    <table cellspacing="0" cellpadding="0" border="1" class="full">
      <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>
          <th scope="col">Λοιπά Χαρακτηριστικά</th>
          <th scope="col">Γλώσσα</th>
     </tr>
<? $languages = $this->MAdmins->getLanguages(); ?>
            <? foreach($languages as $languages=>$language){ ?>
        <tr>
          <td>
        <?  echo "<p><label for='name'></label>";
		$data = array('name'=>'name'.$language['lang_id'],'id'=>'name'.$language['lang_id'],'size'=>15, 'value' => $this->input->post('name'.$language['lang_id']));
echo form_input($data) ."</p>"; ?>
		</td>
          <td>
        <?  echo "<p><label for='description'></label>";
$data = array('name'=>'description'.$language['lang_id'],'id'=>'description'.$language['lang_id'],'rows'=>'15', 'cols'=>'5', 'value' => $this->input->post('description'.$language['lang_id']));
echo form_textarea($data) ."</p>"; ?>
		</td>
          <td>
        <?  echo "<p><label for='suggestions'></label>";
$data = array('name'=>'suggestions'.$language['lang_id'],'id'=>'suggestions'.$language['lang_id'],'rows'=>'15', 'cols'=>'5', 'value' => $this->input->post('suggestions'.$language['lang_id']));
echo form_textarea($data) ."</p>"; ?>
		</td>
           <td>
        <?  echo "<p><label for='characteristics'></label>";
$data = array('name'=>'characteristics'.$language['lang_id'],'id'=>'characteristics'.$language['lang_id'],'rows'=>'15', 'cols'=>'5', 'value' => $this->input->post('characteristics'.$language['lang_id']));
echo form_textarea($data) ."</p>"; ?>
		</td>
           <td>
        <?  echo "<p><label for='vinification'></label>";
$data = array('name'=>'vinification'.$language['lang_id'],'id'=>'vinification'.$language['lang_id'],'rows'=>'15', 'cols'=>'5', 'value' => $this->input->post('vinification'.$language['lang_id']));
echo form_textarea($data) ."</p>"; ?>
		</td>
           <td>
        <?  echo "<p><label for='microclimate'></label>";
$data = array('name'=>'microclimate'.$language['lang_id'],'id'=>'microclimate'.$language['lang_id'],'rows'=>'15', 'cols'=>'5', 'value' => $this->input->post('microclimate'.$language['lang_id']));
echo form_textarea($data) ."</p>"; ?>
		</td>
           <td>
        <?  echo "<p><label for='other_characteristics'></label>";
$data = array('name'=>'other_characteristics'.$language['lang_id'],'id'=>'other_characteristics'.$language['lang_id'],'rows'=>'15', 'cols'=>'5', 'value' => $this->input->post('other_characteristics'.$language['lang_id']));
echo form_textarea($data) ."</p>"; ?>
		</td>
       <td>
        <? echo "<p><b>".$language['lang_name']."</b></p>"; ?>
		</td>
       </tr>
	<? }?>
      </tbody>
    </table>
       </div>
       			 <?	$allcategories = $this->MAdmins->getCategories2();?>
                 <h2>Κατηγορία/ες Εταιρίας</h2>
              <table cellspacing="0" cellpadding="0" border="1" class="full">
      <tbody>
        <tr>
          <th scope="col">Διαθέσιμες Κατηγορίες</th>
     </tr>
        <tr>
          <td><? foreach ($allcategories as $allcategories => $category){ ?>
      <div class="type-check">
        <?=form_checkbox($category['cat_id'], $category['cat_id'], FALSE); ?>
        <? $category_name = $this->MAdmins->getCategoryName($category['cat_id'], 1); ?>
        <?=form_label($category_name['cat_name'])?>
      </div>
      <? }?></td>
       </tr>
      </tbody>
    </table>
    </div>
    <br />
    <div>

<center><? echo form_submit('submit','Add Product')?></center>
</div>