        <?=$this->tinyMce?>
<center><h3><?=$title?></h3></center>
      <? if ($this-> session-> flashdata('message')): ?>
    <div class='warning'>
      <?=$this-> session-> flashdata('message');?>
    </div>
    <? endif; ?>
          <? if ($add==false) { ?>
          <h4><?=anchor("admin/categories/add_top", 'Προσθήκη νέου link')?></h4>
          <? } ?>
<? if ($add==true) { ?>
    <table cellspacing="0" cellpadding="0" border="1" class="full">
      <thead>
        <tr>
          <th colspan="100%" scope="col"></th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th scope="col">Όνομα</th>
          <th scope="col">Path</th>
          <th scope="col">Τίτλος</th>
          <th scope="col">Κείμενο</th>
          <th scope="col">Keywords</th>
          <th scope="col">Γλώσσα</th>
          <th scope="col">Ενέργειες</th>
        </tr>
            <? $attributes = array('class' => 'nform'); ?>
		    <?=form_open('admin/categories/add_top', $attributes); ?>
        <tr>
          <td>
                  <? $languages = $this->MAdmins->getLanguages();
                   foreach($languages as $languages=>$language){ ?>
        <?  echo "<p><label for='name'></label>";
		$data = array('name'=>'name'.$language['lang_id'],'id'=>'name'.$language['lang_id'],'size'=>15);
echo form_input($data) ."</p>"; ?>
<br />
<? } ?>
		</td>
          <td>
                  <? $languages = $this->MAdmins->getLanguages();
                   foreach($languages as $languages=>$language){ ?>
        <?  echo "<p><label for='cat_url_title'></label>";
		$data = array('name'=>'cat_url_title'.$language['lang_id'],'id'=>'cat_url_title'.$language['lang_id'],'size'=>15, 'readonly'=>'readonly' );
echo form_input($data) ."</p>"; ?>
<br />
<? } ?>
		</td>
          <td>
                  <? $languages = $this->MAdmins->getLanguages();
                   foreach($languages as $languages=>$language){ ?>
        <?  echo "<p><label for='title'></label>";
		$data = array('name'=>'title'.$language['lang_id'],'id'=>'title'.$language['lang_id'],'size'=>15);
echo form_input($data) ."</p>"; ?>
<br />
<? } ?>
		</td>
          <td>
                  <? $languages = $this->MAdmins->getLanguages();
                   foreach($languages as $languages=>$language){ ?>
        <?  echo "<p><label for='content'></label>";
		$data = array('name'=>'content'.$language['lang_id'],'id'=>'content'.$language['lang_id'],'size'=>15);
echo form_textarea($data) ."</p>"; ?>
<br />
<? } ?>
		</td>
          <td>
                  <? $languages = $this->MAdmins->getLanguages();
                   foreach($languages as $languages=>$language){ ?>
        <?  echo "<p><label for='keywords'></label>";
		$data = array('name'=>'keywords'.$language['lang_id'],'id'=>'keywords'.$language['lang_id'],'size'=>15);
echo form_input($data) ."</p>"; ?>
<br />
<? } ?>
		</td>
       <td>
        <? $languages = $this->MAdmins->getLanguages();
        foreach($languages as $languages=>$language){ ?>
        <? echo "<p>".$language['lang_name']."</p>"; ?>
        <br />
		<? }  ?>
		</td>
        <td><? echo form_submit('submit','add link')?><br /><?=anchor("admin/categories/top", 'Ακύρωση')?></td>
       </tr>
       <? echo form_close(); ?>
       <? if (!$content) { ?>
      </tbody>
    </table>
    <? } ?>
<? } ?>    
<? if ($content) { ?>
<? if ($add==false) { ?>
    <table cellspacing="0" cellpadding="0" border="1" class="full">
      <thead>
        <tr>
          <th colspan="100%" scope="col"></th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th scope="col">Όνομα</th>
          <th scope="col">Path</th>
          <th scope="col">Τίτλος</th>
          <th scope="col">Κείμενο</th>
          <th scope="col">Keywords</th>
          <th scope="col">Γλώσσα</th>
          <th scope="col">Ενέργειες</th>
        </tr>
<? } ?>
        <? foreach($content as $cont=>$content){ ?>
        <? if (($edit==true) && ($content['id']==$edit_id)) { ?>
            <? $attributes = array('class' => 'nform'); ?>
		    <?=form_open('admin/categories/update_top/'.$content['id'],$attributes); ?>
        <tr>
          <td>
        <?  echo "<p><label for='name'></label>";
		$data = array('name'=>'name','id'=>'name','size'=>15, 'value' => $content['name']);
echo form_input($data) ."</p>"; ?>
		</td>
        <td>        <?  echo "<p><label for='cat_url_title'></label>";
		$data = array('name'=>'cat_url_title','id'=>'cat_url_title','size'=>15, 'value' => $content['path']);
echo form_input($data) ."</p>"; ?>
</td>
          <td>
        <?  echo "<p><label for='title'></label>";
		$data = array('name'=>'title','id'=>'title','size'=>15, 'value' => $content['title']);
echo form_input($data) ."</p>"; ?>
		</td>
          <td>
        <?  echo "<p><label for='content'></label>";
$data = array('name'=>'content','id'=>'content','rows'=>'15', 'cols'=>'50', 'value' => $content['content']);
echo form_textarea($data) ."</p>"; ?>
		</td>
          <td>
        <?  echo "<p><label for='keywords'></label>";
$data = array('name'=>'keywords','id'=>'keywords','rows'=>'15', 'cols'=>'50', 'value' => $content['keywords']);
echo form_input($data) ."</p>"; ?>
		</td>
         <? if ($content['lang_id']==1) { ?>
          <td>Greek</td>
          <? } else { ?>
          <td>English</td>
         <? } ?>
        <td><? echo form_submit('submit','update page')?><br /><?=anchor("admin/categories/top", 'Ακύρωση')?></td>
       </tr>
       <? echo form_close(); ?>
       <? } else { ?>
        <tr>
          <td><?=$content['name']?></td>
          <td><?=$content['path']?></td>
          <td><?=$content['title']?></td>
          <td><?=$content['content']?></td>
          <td><?=$content['keywords']?></td>
         <? if ($content['lang_id']==1) { ?>
          <td>Greek</td>
          <? } else { ?>
          <td>English</td>
         <? } ?>
          <td><?=anchor("admin/categories/edit_top/".$content['id'], 'Επεξεργασία εγγραφής')?><Br /><Br /><?=anchor("admin/categories/delete_page_top/".$content['id'],  'Διαγραφή εγγραφής', array( 'onclick'=>'return confirm(\''.'Είστε σίγουροι πως θέλετε να προχωρήσετε στη διαγραφή?'.'\');', 'title' => '','class' => ''))?></td>
       </tr>
       <? }
	   } ?>
      </tbody>
    </table>
<?    } ?>