<?=$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_company', $attributes); ?>
            <div>
          <h2>Γενικές Πληροφορίες</h2>
              <table cellspacing="0" cellpadding="0" border="1" class="full">
      <tbody>
        <tr>
          <th scope="col">URL</th>
          <th scope="col">E-mail</th>
          <th scope="col">Published</th>
     </tr>
        <tr>
          <td>
        <?  echo "<p><label for='url'></label>";
		$data = array('name'=>'url','id'=>'url','size'=>15, 'value' => $this->input->post('url'));
echo form_input($data) ."</p>"; ?>
		</td>
          <td>
        <?  echo "<p><label for='email'></label>";
		$data = array('name'=>'email','id'=>'email','size'=>15, 'value' => $this->input->post('email'));
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>
       </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){ ?>
			 <?	$allcategories = $this->MAdmins->getCategories2();?>
        <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='longdesc'></label>";
$data = array('name'=>'longdesc'.$language['lang_id'],'id'=>'longdesc'.$language['lang_id'],'rows'=>'15', 'cols'=>'15', 'value' => $this->input->post('longdesc'.$language['lang_id']));
echo form_textarea($data) ."</p>"; ?>
		</td>
           <td>
        <?  echo "<p><label for='address'></label>";
$data = array('name'=>'address'.$language['lang_id'],'id'=>'address'.$language['lang_id'],'rows'=>'15', 'cols'=>'15', 'value' => $this->input->post('address'.$language['lang_id']));
echo form_input($data) ."</p>"; ?>
		</td>
           <td>
        <?  echo "<p><label for='number'></label>";
$data = array('name'=>'number'.$language['lang_id'],'id'=>'number'.$language['lang_id'],'rows'=>'15', 'cols'=>'15', 'value' => $this->input->post('number'.$language['lang_id']));
echo form_input($data) ."</p>"; ?>
		</td>
           <td>
        <?  echo "<p><label for='postal'></label>";
$data = array('name'=>'postal'.$language['lang_id'],'id'=>'postal'.$language['lang_id'],'rows'=>'15', 'cols'=>'15', 'value' => $this->input->post('postal'.$language['lang_id']));
echo form_input($data) ."</p>"; ?>
		</td>
           <td>
        <?  echo "<p><label for='about'></label>";
$data = array('name'=>'about'.$language['lang_id'],'id'=>'about'.$language['lang_id'],'rows'=>'15', 'cols'=>'15', 'value' => $this->input->post('about'.$language['lang_id']));
echo form_textarea($data) ."</p>"; ?>
		</td>
           <td>
        <?  echo "<p><label for='contact'></label>";
$data = array('name'=>'contact'.$language['lang_id'],'id'=>'contact'.$language['lang_id'],'rows'=>'15', 'cols'=>'15', 'value' => $this->input->post('contact'.$language['lang_id']));
echo form_textarea($data) ."</p>"; ?>
		</td>
       <td>
        <? echo "<p><b>".$language['lang_name']."</b></p>"; ?>
		</td>
       </tr>
	<? }?>
      </tbody>
    </table>
       </div>
                 <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 Company')?></center>
</div>