<?php
include_once("header.php");
?>
<script src="js/control_functions.js"></script>
<?php
  $qry = "SELECT * FROM control_form WHERE id=".$_GET['id'];
  $res = mysqli_query($dbC, $qry);
  $row = mysqli_fetch_array($res);
  $sn_kiv = json_decode($row['sn_kib'],1);
  $posothta_pagou = json_decode($row['posothta_pagou'],1);
  $pagos_kg = json_decode($row['pagos_kg'],1);
  $therm_kiv = json_decode($row['therm_kiv'],1);
  $therm_psariwn = json_decode($row['therm_psariwn'],1);
  $ar_psariwn = json_decode($row['ar_psariwn'],1);
  $varos_kiv = json_decode($row['varos_kiv'],1);
  $kefalh = json_decode($row['kefalh'],1);
  $koilia = json_decode($row['koilia'],1);
  $swma = json_decode($row['swma'],1);
  $bragxia = json_decode($row['bragxia'],1);
  $matia = json_decode($row['matia'],1);
  $dusmorfies = json_decode($row['dusmorfies'],1);
  $apobolh_trofhs = json_decode($row['apobolh_trofhs'],1);
  $alloiwseis = json_decode($row['alloiwseis'],1);
  $parasita = json_decode($row['parasita'],1);
  $upomege8h = json_decode($row['upomege8h'],1);
  $upermege8h = json_decode($row['upermege8h'],1);
  $pinpar = json_decode($row['pinakas_par']);
  $pinsum = json_decode($row['pinsum']);
  $apobolh_genul = json_decode($row['apobolh_genul']);


$pagos = ['','',''];
$pi = 0;
foreach($posothta_pagou as $pagos_pct){
  if($pagos_pct>=80 && $pagos_pct<=100 && $pagos_pct!=""){
      $pagos[$pi] = 'green';
    } else if($pagos_pct<80 && $pagos_pct>=60 && $pagos_pct!=""){
      $pagos[$pi] = 'orange';
    } else if($pagos_pct<60 && $pagos_pct!=""){
      $pagos[$pi] = 'red';
    } elseif($pagos_pct!="") {
      $pagos[$pi] = 'green';
    }
  $pi++;
}
$tpsarc = ['','','',''];
$pi = 0;
foreach($therm_psariwn as $tpsar){
  if($tpsar>=0 && $tpsar<=2 && $tpsar!=""){
      $tpsarc[$pi] = 'green';
    } elseif($tpsar!="") {
      $tpsarc[$pi] = 'red';
    }
  $pi++;
}

if($row['varos_kiv2']!=''){
  $vk2 = $row['varos_kiv2'];
  $vkiv = ['','','',''];
  $pi = 0;
  foreach($varos_kiv as $kiv){
    if($kiv!="" && fmod($kiv, 1)==0){
      // echo "<script>console.log('".$kiv."');</script>";
      $kiv = $kiv / ( pow( 10, (strlen( (string)$kiv ) -1) ) );
      // echo "<script>console.log('".$kiv."');</script>";
    }
    // echo "<script>console.log('".(($vk2*(1.5/100))+$vk2).", rec: ".$kiv.", kiv%1=".($kiv%1).", type: ".gettype($kiv)."');</script>";
    if($kiv>=$vk2 && $kiv<=(($vk2*(1.5/100))+$vk2) && $kiv!=""){
      $vkiv[$pi]='green';
    } elseif($kiv>($vk2*(1.5/100))+$vk2 && $kiv!=""){
      $vkiv[$pi]='orange';
    } elseif($kiv<($vk2*(1.5/100))+$vk2 && $kiv!=""){
      $vkiv[$pi]='red';
    }
    $pi++;
  }
}

echo '<div id="piczoom" style="display:none;"></div><div id="main_wrap"><form name="control_form" action="control_parse.php" method="POST">
<div id="head" style="width:100%;text-align:center;">
<table border="1" style="width:100%;text-align:center;" class="table table-striped table-bordered table-condensed  table-responsive">
<tbody>
  <tr>
    <th>Ημ/νία Παραλαβής</th>
    <th>Εταιρία</th>
        <th>Συσκευαστήριο</th>
        <th>Μονάδα Πάχυνσης</th>


  </tr>
  <tr>

    <td>'.($row['hm_paralav']!='-' ? date('d-m-Y',strtotime($row['hm_paralav'])) : $row['hm_paralav']).'</td>
    <td>'.$row['etairia'].'</td>
        <td>'.$row['kwd_sus'].'</td>
        <td>'.$row['monada_paxunshs'].'</td>

  </tr>
  <tr>

        <th>Ετικετέζα</th>
        <th>Μετατόπιση</th>
        <th>Ημ/νία Ελέγχου</th>
    <th>Ώρα Ελέγχου</th>
  </tr>
  <tr>

        <td>'.$row['etiketeza'].'</td>
    <td>'.$row['metatopish'].'</td>
        <td>'.($row['hm_elegxou']!='0000-00-00' ? date('d-m-Y',strtotime($row['hm_elegxou'])) : '-').'</td>
        <td>'.$row['wra_elegxou'].'</td>
  </tr>
  <tr>
        <th>Ημερομηνία Λήξης - Παραγωγής</th>
        <th>Ελεγκτής</th>
    <th>Είδος/Μέγεθος</th>
    <th>Κιβώτιο</th>
  </tr>
  <tr>
        <td>'.($row['hm_lixpar']!='0000-00-00' ? date('d-m-Y',strtotime($row['hm_lixpar'])) : '-').'</td>
        <td>'.$row['elegkths'].'</td>
    <td>'.$row['eidos'].$row['megethos'].'
          <input type="hidden" name="eidos" value="'.$row['eidos'].'"  />
          <input type="hidden" name="megethos" value="'.$row['megethos'].'"  />
    </td>
    <td>'.$row['varos_kiv2'].'</td>
  </tr>
</tbody>
</table>
<table style="width:100%;text-align:center;" class="table table-striped table-bordered table-condensed  table-responsive">

    <tr><th>Είδος Κιβωτίου</th></tr>
  <tr><td>'.$row['eidos_kiv'].'</td></tr>

    <tr><th>Παρτίδα</th></tr>
  <tr><td>'.$row['partida'].'</td></tr>
</table>
</div>';
?>

<div class="panel panel-default">
   <div class="panel-heading" style="cursor:pointer;" id="toggle_partbl">Πίνακας Παραγωγής <span class="pull-right"><i id="toggle_partbl2" class="glyphicon glyphicon-plus"></i></span></div>
   <div class="panel-body" style="display: none;" id="partbl_body">
      <table class="table table-striped table-responsive table-bordered">
         <thead>
            <tr>
               <th></th>
               <th>Κιβώτιο 1</th>
               <th>Κιβώτιο 2</th>
               <th>Κιβώτιο 3</th>
               <th>Κιβώτιο 4</th>
               <th>Κιβώτιο 5</th>
               <th>Κιβώτιο 6</th>
               <th>Κιβώτιο 7</th>
               <th>Κιβώτιο 8</th>
               <th>Κιβώτιο 9</th>
               <th>Κιβώτιο 10</th>
            </tr>
         </thead>
         <tbody>
            <?php
               for($y=1;$y<=40;$y++){
                  echo
                  "<tr>
                     <td>".$y."</td>
                     <td><center>".$pinpar[0][$y-1]."</center></td>
                     <td><center>".$pinpar[1][$y-1]."</center></td>
                     <td><center>".$pinpar[2][$y-1]."</center></td>
                     <td><center>".$pinpar[3][$y-1]."</center></td>
                     <td><center>".$pinpar[4][$y-1]."</center></td>
                     <td><center>".$pinpar[5][$y-1]."</center></td>
                     <td><center>".$pinpar[6][$y-1]."</center></td>
                     <td><center>".$pinpar[7][$y-1]."</center></td>
                     <td><center>".$pinpar[8][$y-1]."</center></td>
                     <td><center>".$pinpar[9][$y-1]."</center></td>
                  </tr>";
               }
            ?>
         </tbody>
         <tfoot>
           <tr>
             <td>sum</td>
             <td id="athr1"><center><?php echo $pinsum[0]; ?></center></td>
             <td id="athr2"><center><?php echo $pinsum[1]; ?></center></td>
             <td id="athr3"><center><?php echo $pinsum[2]; ?></center></td>
             <td id="athr4"><center><?php echo $pinsum[3]; ?></center></td>
             <td id="athr4"><center><?php echo $pinsum[4]; ?></center></td>
             <td id="athr4"><center><?php echo $pinsum[5]; ?></center></td>
             <td id="athr4"><center><?php echo $pinsum[6]; ?></center></td>
             <td id="athr4"><center><?php echo $pinsum[7]; ?></center></td>
             <td id="athr4"><center><?php echo $pinsum[8]; ?></center></td>
             <td id="athr4"><center><?php echo $pinsum[9]; ?></center></td>
           </tr>
         </tfoot>
      </table>
   </div>
</div>

<?php
echo '<div id="left_col">
<table border="1" class="table table-striped table-bordered table-condensed  table-responsive">
  <tr>
    <th></th>
    <th>Κιβ. 1</th>
    <th>Κιβ. 2</th>
    <th>Κιβ. 3</th>
    <th>Κιβ. 4</th>
    <th>Κιβ. 5</th>
    <th>Κιβ. 6</th>
    <th>Κιβ. 7</th>
    <th>Κιβ. 8</th>
    <th>Κιβ. 9</th>
    <th>Κιβ. 10</th>
  </tr>
  <tr>
    <th>S/N Κιβωτίου</th>
    <td>'.$sn_kiv[0].'</td>
    <td>'.$sn_kiv[1].'</td>
    <td>'.$sn_kiv[2].'</td>
    <td>'.$sn_kiv[3].'</td>
    <td>'.$sn_kiv[4].'</td>
    <td>'.$sn_kiv[5].'</td>
    <td>'.$sn_kiv[6].'</td>
    <td>'.$sn_kiv[7].'</td>
    <td>'.$sn_kiv[8].'</td>
    <td>'.$sn_kiv[9].'</td>
  </tr>
  <tr>
    <th>Ποσότητα Πάγου %</th>
    <td class="'.$pagos[0].'">'.$posothta_pagou[0].'</td>
    <td class="'.$pagos[1].'">'.$posothta_pagou[1].'</td>
    <td class="'.$pagos[2].'">'.$posothta_pagou[2].'</td>
    <td class="'.$pagos[3].'">'.$posothta_pagou[3].'</td>
    <td class="'.$pagos[4].'">'.$posothta_pagou[4].'</td>
    <td class="'.$pagos[5].'">'.$posothta_pagou[5].'</td>
    <td class="'.$pagos[6].'">'.$posothta_pagou[6].'</td>
    <td class="'.$pagos[7].'">'.$posothta_pagou[7].'</td>
    <td class="'.$pagos[8].'">'.$posothta_pagou[8].'</td>
    <td class="'.$pagos[9].'">'.$posothta_pagou[9].'</td>
  </tr>
  <tr>
    <th>Ποσότητα Πάγου σε Kg</th>
    <td>'.$pagos_kg[0].'</td>
    <td>'.$pagos_kg[1].'</td>
    <td>'.$pagos_kg[2].'</td>
    <td>'.$pagos_kg[3].'</td>
    <td>'.$pagos_kg[4].'</td>
    <td>'.$pagos_kg[5].'</td>
    <td>'.$pagos_kg[6].'</td>
    <td>'.$pagos_kg[7].'</td>
    <td>'.$pagos_kg[8].'</td>
    <td>'.$pagos_kg[9].'</td>
  </tr>
  <tr>
    <th>Θερμοκρασία Κιβωτίου</th>
    <td>'.$therm_kiv[0].'</td>
    <td>'.$therm_kiv[1].'</td>
    <td>'.$therm_kiv[2].'</td>
    <td>'.$therm_kiv[3].'</td>
    <td>'.$therm_kiv[4].'</td>
    <td>'.$therm_kiv[5].'</td>
    <td>'.$therm_kiv[6].'</td>
    <td>'.$therm_kiv[7].'</td>
    <td>'.$therm_kiv[8].'</td>
    <td>'.$therm_kiv[9].'</td>
  </tr>
  <tr>
    <th>Θερμοκρασία Ψαριού</th>
    <td class="'.$tpsarc[0].'">'.$therm_psariwn[0].'</td>
    <td class="'.$tpsarc[1].'">'.$therm_psariwn[1].'</td>
    <td class="'.$tpsarc[2].'">'.$therm_psariwn[2].'</td>
    <td class="'.$tpsarc[3].'">'.$therm_psariwn[3].'</td>
    <td class="'.$tpsarc[4].'">'.$therm_psariwn[4].'</td>
    <td class="'.$tpsarc[5].'">'.$therm_psariwn[5].'</td>
    <td class="'.$tpsarc[6].'">'.$therm_psariwn[6].'</td>
    <td class="'.$tpsarc[7].'">'.$therm_psariwn[7].'</td>
    <td class="'.$tpsarc[8].'">'.$therm_psariwn[8].'</td>
    <td class="'.$tpsarc[9].'">'.$therm_psariwn[9].'</td>
  </tr>
  <tr>
    <th>Αριθμός Ψαριών</th>
    <td>'.$ar_psariwn[0].'</td>
    <td>'.$ar_psariwn[1].'</td>
    <td>'.$ar_psariwn[2].'</td>
    <td>'.$ar_psariwn[3].'</td>
    <td>'.$ar_psariwn[4].'</td>
    <td>'.$ar_psariwn[5].'</td>
    <td>'.$ar_psariwn[6].'</td>
    <td>'.$ar_psariwn[7].'</td>
    <td>'.$ar_psariwn[8].'</td>
    <td>'.$ar_psariwn[9].'</td>
  </tr>
  <tr>
    <th>Βάρος Κιβωτίου</th>
    <td class="'.$vkiv[0].'">'.$varos_kiv[0].'</td>
    <td class="'.$vkiv[1].'">'.$varos_kiv[1].'</td>
    <td class="'.$vkiv[2].'">'.$varos_kiv[2].'</td>
    <td class="'.$vkiv[3].'">'.$varos_kiv[3].'</td>
    <td class="'.$vkiv[4].'">'.$varos_kiv[4].'</td>
    <td class="'.$vkiv[5].'">'.$varos_kiv[5].'</td>
    <td class="'.$vkiv[6].'">'.$varos_kiv[6].'</td>
    <td class="'.$vkiv[7].'">'.$varos_kiv[7].'</td>
    <td class="'.$vkiv[8].'">'.$varos_kiv[8].'</td>
    <td class="'.$vkiv[9].'">'.$varos_kiv[9].'</td>
  </tr>
  <tr>
    <th>Αποβολή Τροφής</th>
    <td>'.$apobolh_trofhs[0].'</td>
    <td>'.$apobolh_trofhs[1].'</td>
    <td>'.$apobolh_trofhs[2].'</td>
    <td>'.$apobolh_trofhs[3].'</td>
    <td>'.$apobolh_trofhs[4].'</td>
    <td>'.$apobolh_trofhs[5].'</td>
    <td>'.$apobolh_trofhs[6].'</td>
    <td>'.$apobolh_trofhs[7].'</td>
    <td>'.$apobolh_trofhs[8].'</td>
    <td>'.$apobolh_trofhs[9].'</td>
  </tr>
  <tr>
    <th>Αποβολή Γενετικού Υλικού</th>
    <td>'.$apobolh_genul[0].'</td>
    <td>'.$apobolh_genul[1].'</td>
    <td>'.$apobolh_genul[2].'</td>
    <td>'.$apobolh_genul[3].'</td>
    <td>'.$apobolh_genul[4].'</td>
    <td>'.$apobolh_genul[5].'</td>
    <td>'.$apobolh_genul[6].'</td>
    <td>'.$apobolh_genul[7].'</td>
    <td>'.$apobolh_genul[8].'</td>
    <td>'.$apobolh_genul[9].'</td>
  </tr>
<tr>
    <th>Υπομεγέθη</th>
    <td>'.$upomege8h[0].'</td>
    <td>'.$upomege8h[1].'</td>
    <td>'.$upomege8h[2].'</td>
    <td>'.$upomege8h[3].'</td>
    <td>'.$upomege8h[4].'</td>
    <td>'.$upomege8h[5].'</td>
    <td>'.$upomege8h[6].'</td>
    <td>'.$upomege8h[7].'</td>
    <td>'.$upomege8h[8].'</td>
    <td>'.$upomege8h[9].'</td>
  </tr>
  <tr>
    <th>Υπερμεγέθη</th>
    <td>'.$upermege8h[0].'</td>
    <td>'.$upermege8h[1].'</td>
    <td>'.$upermege8h[2].'</td>
    <td>'.$upermege8h[3].'</td>
    <td>'.$upermege8h[4].'</td>
    <td>'.$upermege8h[5].'</td>
    <td>'.$upermege8h[6].'</td>
    <td>'.$upermege8h[7].'</td>
    <td>'.$upermege8h[8].'</td>
    <td>'.$upermege8h[9].'</td>
  </tr>
  <tr><th>Αιματώματα</th><td colspan="10">
    <table border="0" class="table table-striped table-bordered table-condensed  table-responsive">
      <tr>
        <th>Κεφαλή</th>
        <td>
          <table border="1" class="table table-striped table-bordered table-condensed  table-responsive">
          <tr>
            <th>Ελαφρά</th>
            <td>'.$kefalh['elafra'][0].'</td>
            <td>'.$kefalh['elafra'][1].'</td>
            <td>'.$kefalh['elafra'][2].'</td>
            <td>'.$kefalh['elafra'][3].'</td>
            <td>'.$kefalh['elafra'][4].'</td>
            <td>'.$kefalh['elafra'][5].'</td>
            <td>'.$kefalh['elafra'][6].'</td>
            <td>'.$kefalh['elafra'][7].'</td>
            <td>'.$kefalh['elafra'][8].'</td>
            <td>'.$kefalh['elafra'][9].'</td>
          </tr>
          <tr>
            <th>Μεσαία</th>
            <td>'.$kefalh['mesaia'][0].'</td>
            <td>'.$kefalh['mesaia'][1].'</td>
            <td>'.$kefalh['mesaia'][2].'</td>
            <td>'.$kefalh['mesaia'][3].'</td>
            <td>'.$kefalh['mesaia'][4].'</td>
            <td>'.$kefalh['mesaia'][5].'</td>
            <td>'.$kefalh['mesaia'][6].'</td>
            <td>'.$kefalh['mesaia'][7].'</td>
            <td>'.$kefalh['mesaia'][8].'</td>
            <td>'.$kefalh['mesaia'][9].'</td>
          </tr>
          <tr>
            <th>Έντονα</th>
            <td>'.$kefalh['entona'][0].'</td>
            <td>'.$kefalh['entona'][1].'</td>
            <td>'.$kefalh['entona'][2].'</td>
            <td>'.$kefalh['entona'][3].'</td>
            <td>'.$kefalh['entona'][4].'</td>
            <td>'.$kefalh['entona'][5].'</td>
            <td>'.$kefalh['entona'][6].'</td>
            <td>'.$kefalh['entona'][7].'</td>
            <td>'.$kefalh['entona'][8].'</td>
            <td>'.$kefalh['entona'][9].'</td>
          </tr>
          </table>
        </td>
      </tr>
      <tr>
        <th>Κοιλιά</th>
        <td>
          <table border="1" class="table table-striped table-bordered table-condensed  table-responsive">
          <tr>
            <th>Κηλίδες</th>
            <td>'.$koilia['khlides'][0].'</td>
            <td>'.$koilia['khlides'][1].'</td>
            <td>'.$koilia['khlides'][2].'</td>
            <td>'.$koilia['khlides'][3].'</td>
            <td>'.$koilia['khlides'][4].'</td>
            <td>'.$koilia['khlides'][5].'</td>
            <td>'.$koilia['khlides'][6].'</td>
            <td>'.$koilia['khlides'][7].'</td>
            <td>'.$koilia['khlides'][8].'</td>
            <td>'.$koilia['khlides'][9].'</td>
          </tr>
          <tr>
            <th>Στικτά</th>
            <td>'.$koilia['stikta'][0].'</td>
            <td>'.$koilia['stikta'][1].'</td>
            <td>'.$koilia['stikta'][2].'</td>
            <td>'.$koilia['stikta'][3].'</td>
            <td>'.$koilia['stikta'][4].'</td>
            <td>'.$koilia['stikta'][5].'</td>
            <td>'.$koilia['stikta'][6].'</td>
            <td>'.$koilia['stikta'][7].'</td>
            <td>'.$koilia['stikta'][8].'</td>
            <td>'.$koilia['stikta'][9].'</td>
          </tr>
          <tr>
            <th>Διάχυτα</th>
            <td>'.$koilia['diaxuta'][0].'</td>
            <td>'.$koilia['diaxuta'][1].'</td>
            <td>'.$koilia['diaxuta'][2].'</td>
            <td>'.$koilia['diaxuta'][3].'</td>
            <td>'.$koilia['diaxuta'][4].'</td>
            <td>'.$koilia['diaxuta'][5].'</td>
            <td>'.$koilia['diaxuta'][6].'</td>
            <td>'.$koilia['diaxuta'][7].'</td>
            <td>'.$koilia['diaxuta'][8].'</td>
            <td>'.$koilia['diaxuta'][9].'</td>
          </tr>
          </table>
        </td>
      </tr>
      <tr>
        <th>Σώμα</th>
        <td>
          <table border="1" class="table table-striped table-bordered table-condensed  table-responsive">
          <tr>
            <th>Κηλίδες</th>
            <td>'.$swma['khlides'][0].'</td>
            <td>'.$swma['khlides'][1].'</td>
            <td>'.$swma['khlides'][2].'</td>
            <td>'.$swma['khlides'][3].'</td>
            <td>'.$swma['khlides'][4].'</td>
            <td>'.$swma['khlides'][5].'</td>
            <td>'.$swma['khlides'][6].'</td>
            <td>'.$swma['khlides'][7].'</td>
            <td>'.$swma['khlides'][8].'</td>
            <td>'.$swma['khlides'][9].'</td>
          </tr>
          <tr>
            <th>Στικτά</th>
            <td>'.$swma['stikta'][0].'</td>
            <td>'.$swma['stikta'][1].'</td>
            <td>'.$swma['stikta'][2].'</td>
            <td>'.$swma['stikta'][3].'</td>
            <td>'.$swma['stikta'][4].'</td>
            <td>'.$swma['stikta'][5].'</td>
            <td>'.$swma['stikta'][6].'</td>
            <td>'.$swma['stikta'][7].'</td>
            <td>'.$swma['stikta'][8].'</td>
            <td>'.$swma['stikta'][9].'</td>
          </tr>
          <tr>
            <th>Διάχυτα</th>
            <td>'.$swma['diaxuta'][0].'</td>
            <td>'.$swma['diaxuta'][1].'</td>
            <td>'.$swma['diaxuta'][2].'</td>
            <td>'.$swma['diaxuta'][3].'</td>
            <td>'.$swma['diaxuta'][4].'</td>
            <td>'.$swma['diaxuta'][5].'</td>
            <td>'.$swma['diaxuta'][6].'</td>
            <td>'.$swma['diaxuta'][7].'</td>
            <td>'.$swma['diaxuta'][8].'</td>
            <td>'.$swma['diaxuta'][9].'</td>
          </tr>
          </table>
        </td>
      </tr>

    </table>
    </td>
  </tr>
  <tr>
    <th>Βράγχια</th><td colspan="10">
      <table border="1" class="table table-striped table-bordered table-condensed  table-responsive">
        <tr>
          <th>Ρόδινα</th>
          <td>'.$bragxia['rodina'][0].'</td>
          <td>'.$bragxia['rodina'][1].'</td>
          <td>'.$bragxia['rodina'][2].'</td>
          <td>'.$bragxia['rodina'][3].'</td>
          <td>'.$bragxia['rodina'][4].'</td>
          <td>'.$bragxia['rodina'][5].'</td>
          <td>'.$bragxia['rodina'][6].'</td>
          <td>'.$bragxia['rodina'][7].'</td>
          <td>'.$bragxia['rodina'][8].'</td>
          <td>'.$bragxia['rodina'][9].'</td>
        </tr>
        <tr>
          <th>Φαιά</th>
          <td>'.$bragxia['faia'][0].'</td>
          <td>'.$bragxia['faia'][1].'</td>
          <td>'.$bragxia['faia'][2].'</td>
          <td>'.$bragxia['faia'][3].'</td>
          <td>'.$bragxia['faia'][4].'</td>
          <td>'.$bragxia['faia'][5].'</td>
          <td>'.$bragxia['faia'][6].'</td>
          <td>'.$bragxia['faia'][7].'</td>
          <td>'.$bragxia['faia'][8].'</td>
          <td>'.$bragxia['faia'][9].'</td>
        </tr>
        <tr>
          <th>Μ.Ε.Β.Ν.</th>
          <td>'.$bragxia['mebn'][0].'</td>
          <td>'.$bragxia['mebn'][1].'</td>
          <td>'.$bragxia['mebn'][2].'</td>
          <td>'.$bragxia['mebn'][3].'</td>
          <td>'.$bragxia['mebn'][4].'</td>
          <td>'.$bragxia['mebn'][5].'</td>
          <td>'.$bragxia['mebn'][6].'</td>
          <td>'.$bragxia['mebn'][7].'</td>
          <td>'.$bragxia['mebn'][8].'</td>
          <td>'.$bragxia['mebn'][9].'</td>
        </tr>
        <tr>
          <th>Αιματώματα</th>
          <td>'.$bragxia['aimatwmata'][0].'</td>
          <td>'.$bragxia['aimatwmata'][1].'</td>
          <td>'.$bragxia['aimatwmata'][2].'</td>
          <td>'.$bragxia['aimatwmata'][3].'</td>
          <td>'.$bragxia['aimatwmata'][4].'</td>
          <td>'.$bragxia['aimatwmata'][5].'</td>
          <td>'.$bragxia['aimatwmata'][6].'</td>
          <td>'.$bragxia['aimatwmata'][7].'</td>
          <td>'.$bragxia['aimatwmata'][8].'</td>
          <td>'.$bragxia['aimatwmata'][9].'</td>
        </tr>
        <tr>
          <th>Καφέ</th>
          <td>'.$bragxia['kafe'][0].'</td>
          <td>'.$bragxia['kafe'][1].'</td>
          <td>'.$bragxia['kafe'][2].'</td>
          <td>'.$bragxia['kafe'][3].'</td>
          <td>'.$bragxia['kafe'][4].'</td>
          <td>'.$bragxia['kafe'][5].'</td>
          <td>'.$bragxia['kafe'][6].'</td>
          <td>'.$bragxia['kafe'][7].'</td>
          <td>'.$bragxia['kafe'][8].'</td>
          <td>'.$bragxia['kafe'][9].'</td>
        </tr>
        <tr>
          <th>Αποχρωματισμένα</th>
          <td>'.$bragxia['apoxrwm'][0].'</td>
          <td>'.$bragxia['apoxrwm'][1].'</td>
          <td>'.$bragxia['apoxrwm'][2].'</td>
          <td>'.$bragxia['apoxrwm'][3].'</td>
          <td>'.$bragxia['apoxrwm'][4].'</td>
          <td>'.$bragxia['apoxrwm'][5].'</td>
          <td>'.$bragxia['apoxrwm'][6].'</td>
          <td>'.$bragxia['apoxrwm'][7].'</td>
          <td>'.$bragxia['apoxrwm'][8].'</td>
          <td>'.$bragxia['apoxrwm'][9].'</td>
        </tr>
        <tr>
          <th>Βλέννα</th>
          <td>'.$bragxia['vlenna'][0].'</td>
          <td>'.$bragxia['vlenna'][1].'</td>
          <td>'.$bragxia['vlenna'][2].'</td>
          <td>'.$bragxia['vlenna'][3].'</td>
          <td>'.$bragxia['vlenna'][4].'</td>
          <td>'.$bragxia['vlenna'][5].'</td>
          <td>'.$bragxia['vlenna'][6].'</td>
          <td>'.$bragxia['vlenna'][7].'</td>
          <td>'.$bragxia['vlenna'][8].'</td>
          <td>'.$bragxia['vlenna'][9].'</td>
        </tr>
        <tr>
          <th>Αιματηρή Βλέννα</th>
          <td>'.$bragxia['aim_vlenna'][0].'</td>
          <td>'.$bragxia['aim_vlenna'][1].'</td>
          <td>'.$bragxia['aim_vlenna'][2].'</td>
          <td>'.$bragxia['aim_vlenna'][3].'</td>
          <td>'.$bragxia['aim_vlenna'][4].'</td>
          <td>'.$bragxia['aim_vlenna'][5].'</td>
          <td>'.$bragxia['aim_vlenna'][6].'</td>
          <td>'.$bragxia['aim_vlenna'][7].'</td>
          <td>'.$bragxia['aim_vlenna'][8].'</td>
          <td>'.$bragxia['aim_vlenna'][9].'</td>
        </tr>
      </table>

    </td>
  </tr>
  <tr>
    <th>Μάτια</th><td colspan="10">
      <table border="1" class="table table-striped table-bordered table-condensed  table-responsive">
        <tr>
          <th>Λαμπερά</th>
          <td>'.$matia['lampera'][0].'</td>
          <td>'.$matia['lampera'][1].'</td>
          <td>'.$matia['lampera'][2].'</td>
          <td>'.$matia['lampera'][3].'</td>
          <td>'.$matia['lampera'][4].'</td>
          <td>'.$matia['lampera'][5].'</td>
          <td>'.$matia['lampera'][6].'</td>
          <td>'.$matia['lampera'][7].'</td>
          <td>'.$matia['lampera'][8].'</td>
          <td>'.$matia['lampera'][9].'</td>
        </tr>
        <tr>
          <th>Θολά</th>
          <td>'.$matia['thola'][0].'</td>
          <td>'.$matia['thola'][1].'</td>
          <td>'.$matia['thola'][2].'</td>
          <td>'.$matia['thola'][3].'</td>
          <td>'.$matia['thola'][4].'</td>
          <td>'.$matia['thola'][5].'</td>
          <td>'.$matia['thola'][6].'</td>
          <td>'.$matia['thola'][7].'</td>
          <td>'.$matia['thola'][8].'</td>
          <td>'.$matia['thola'][9].'</td>
        </tr>
        <tr>
          <th>Λευκά</th>
          <td>'.$matia['leuka'][0].'</td>
          <td>'.$matia['leuka'][1].'</td>
          <td>'.$matia['leuka'][2].'</td>
          <td>'.$matia['leuka'][3].'</td>
          <td>'.$matia['leuka'][4].'</td>
          <td>'.$matia['leuka'][5].'</td>
          <td>'.$matia['leuka'][6].'</td>
          <td>'.$matia['leuka'][7].'</td>
          <td>'.$matia['leuka'][8].'</td>
          <td>'.$matia['leuka'][9].'</td>
        </tr>
        <tr>
          <th>Επουλωμένα</th>
          <td>'.$matia['epoulwmena'][0].'</td>
          <td>'.$matia['epoulwmena'][1].'</td>
          <td>'.$matia['epoulwmena'][2].'</td>
          <td>'.$matia['epoulwmena'][3].'</td>
          <td>'.$matia['epoulwmena'][4].'</td>
          <td>'.$matia['epoulwmena'][5].'</td>
          <td>'.$matia['epoulwmena'][6].'</td>
          <td>'.$matia['epoulwmena'][7].'</td>
          <td>'.$matia['epoulwmena'][8].'</td>
          <td>'.$matia['epoulwmena'][9].'</td>
        </tr>
        <tr>
          <th>Τυφλά</th>
          <td>'.$matia['tufla'][0].'</td>
          <td>'.$matia['tufla'][1].'</td>
          <td>'.$matia['tufla'][2].'</td>
          <td>'.$matia['tufla'][3].'</td>
          <td>'.$matia['tufla'][4].'</td>
          <td>'.$matia['tufla'][5].'</td>
          <td>'.$matia['tufla'][6].'</td>
          <td>'.$matia['tufla'][7].'</td>
          <td>'.$matia['tufla'][8].'</td>
          <td>'.$matia['tufla'][9].'</td>
        </tr>
        <tr>
          <th>Αιμοραγικά</th>
          <td>'.$matia['aimoragika'][0].'</td>
          <td>'.$matia['aimoragika'][1].'</td>
          <td>'.$matia['aimoragika'][2].'</td>
          <td>'.$matia['aimoragika'][3].'</td>
          <td>'.$matia['aimoragika'][4].'</td>
          <td>'.$matia['aimoragika'][5].'</td>
          <td>'.$matia['aimoragika'][6].'</td>
          <td>'.$matia['aimoragika'][7].'</td>
          <td>'.$matia['aimoragika'][8].'</td>
          <td>'.$matia['aimoragika'][9].'</td>
        </tr>
      </table>

    </td>
  </tr>
  <tr>
    <th>Δυσμορφίες</th><td colspan="10">
      <table border="1" class="table table-striped table-bordered table-condensed  table-responsive">
        <tr>
          <th>Στραβό Στόμα</th>
          <td>'.$dusmorfies['stravo_stoma'][0].'</td>
          <td>'.$dusmorfies['stravo_stoma'][1].'</td>
          <td>'.$dusmorfies['stravo_stoma'][2].'</td>
          <td>'.$dusmorfies['stravo_stoma'][3].'</td>
          <td>'.$dusmorfies['stravo_stoma'][4].'</td>
          <td>'.$dusmorfies['stravo_stoma'][5].'</td>
          <td>'.$dusmorfies['stravo_stoma'][6].'</td>
          <td>'.$dusmorfies['stravo_stoma'][7].'</td>
          <td>'.$dusmorfies['stravo_stoma'][8].'</td>
          <td>'.$dusmorfies['stravo_stoma'][9].'</td>
        </tr>
        <tr>
          <th>Εξόγκωμα κάτω σιαγώνας</th>
          <td>'.$dusmorfies['eksogkoma_katw'][0].'</td>
          <td>'.$dusmorfies['eksogkoma_katw'][1].'</td>
          <td>'.$dusmorfies['eksogkoma_katw'][2].'</td>
          <td>'.$dusmorfies['eksogkoma_katw'][3].'</td>
          <td>'.$dusmorfies['eksogkoma_katw'][4].'</td>
          <td>'.$dusmorfies['eksogkoma_katw'][5].'</td>
          <td>'.$dusmorfies['eksogkoma_katw'][6].'</td>
          <td>'.$dusmorfies['eksogkoma_katw'][7].'</td>
          <td>'.$dusmorfies['eksogkoma_katw'][8].'</td>
          <td>'.$dusmorfies['eksogkoma_katw'][9].'</td>
        </tr>
        <tr>
          <th>Προέκταση κάτω σιαγώνας</th>
          <td>'.$dusmorfies['proekt_katw'][0].'</td>
          <td>'.$dusmorfies['proekt_katw'][1].'</td>
          <td>'.$dusmorfies['proekt_katw'][2].'</td>
          <td>'.$dusmorfies['proekt_katw'][3].'</td>
          <td>'.$dusmorfies['proekt_katw'][4].'</td>
          <td>'.$dusmorfies['proekt_katw'][5].'</td>
          <td>'.$dusmorfies['proekt_katw'][6].'</td>
          <td>'.$dusmorfies['proekt_katw'][7].'</td>
          <td>'.$dusmorfies['proekt_katw'][8].'</td>
          <td>'.$dusmorfies['proekt_katw'][9].'</td>
        </tr>
        <tr>
          <th>Παραμορφωμένο κεφάλι</th>
          <td>'.$dusmorfies['paramorf_kefali'][0].'</td>
          <td>'.$dusmorfies['paramorf_kefali'][1].'</td>
          <td>'.$dusmorfies['paramorf_kefali'][2].'</td>
          <td>'.$dusmorfies['paramorf_kefali'][3].'</td>
          <td>'.$dusmorfies['paramorf_kefali'][4].'</td>
          <td>'.$dusmorfies['paramorf_kefali'][5].'</td>
          <td>'.$dusmorfies['paramorf_kefali'][6].'</td>
          <td>'.$dusmorfies['paramorf_kefali'][7].'</td>
          <td>'.$dusmorfies['paramorf_kefali'][8].'</td>
          <td>'.$dusmorfies['paramorf_kefali'][9].'</td>
        </tr>
        <tr>
          <th>Κάθετο εμπρός κεφάλι</th>
          <td>'.$dusmorfies['katheto_kefali'][0].'</td>
          <td>'.$dusmorfies['katheto_kefali'][1].'</td>
          <td>'.$dusmorfies['katheto_kefali'][2].'</td>
          <td>'.$dusmorfies['katheto_kefali'][3].'</td>
          <td>'.$dusmorfies['katheto_kefali'][4].'</td>
          <td>'.$dusmorfies['katheto_kefali'][5].'</td>
          <td>'.$dusmorfies['katheto_kefali'][6].'</td>
          <td>'.$dusmorfies['katheto_kefali'][7].'</td>
          <td>'.$dusmorfies['katheto_kefali'][8].'</td>
          <td>'.$dusmorfies['katheto_kefali'][9].'</td>
        </tr>
        <tr>
          <th>Παπαγαλάκι</th>
          <td>'.$dusmorfies['papagalaki'][0].'</td>
          <td>'.$dusmorfies['papagalaki'][1].'</td>
          <td>'.$dusmorfies['papagalaki'][2].'</td>
          <td>'.$dusmorfies['papagalaki'][3].'</td>
          <td>'.$dusmorfies['papagalaki'][4].'</td>
          <td>'.$dusmorfies['papagalaki'][5].'</td>
          <td>'.$dusmorfies['papagalaki'][6].'</td>
          <td>'.$dusmorfies['papagalaki'][7].'</td>
          <td>'.$dusmorfies['papagalaki'][8].'</td>
          <td>'.$dusmorfies['papagalaki'][9].'</td>
        </tr>
        <tr>
          <th>Μόνο Βραγχιοκάλυμμα</th>
          <td>'.$dusmorfies['vragxiokaluma'][0].'</td>
          <td>'.$dusmorfies['vragxiokaluma'][1].'</td>
          <td>'.$dusmorfies['vragxiokaluma'][2].'</td>
          <td>'.$dusmorfies['vragxiokaluma'][3].'</td>
          <td>'.$dusmorfies['vragxiokaluma'][4].'</td>
          <td>'.$dusmorfies['vragxiokaluma'][5].'</td>
          <td>'.$dusmorfies['vragxiokaluma'][6].'</td>
          <td>'.$dusmorfies['vragxiokaluma'][7].'</td>
          <td>'.$dusmorfies['vragxiokaluma'][8].'</td>
          <td>'.$dusmorfies['vragxiokaluma'][9].'</td>
        </tr>
        <tr>
          <th>Ραχιτικά</th>
          <td>'.$dusmorfies['raxitika'][0].'</td>
          <td>'.$dusmorfies['raxitika'][1].'</td>
          <td>'.$dusmorfies['raxitika'][2].'</td>
          <td>'.$dusmorfies['raxitika'][3].'</td>
          <td>'.$dusmorfies['raxitika'][4].'</td>
          <td>'.$dusmorfies['raxitika'][5].'</td>
          <td>'.$dusmorfies['raxitika'][6].'</td>
          <td>'.$dusmorfies['raxitika'][7].'</td>
          <td>'.$dusmorfies['raxitika'][8].'</td>
          <td>'.$dusmorfies['raxitika'][9].'</td>
        </tr>
        <tr>
          <th>Λόρδωση</th>
          <td>'.$dusmorfies['lordwsh'][0].'</td>
          <td>'.$dusmorfies['lordwsh'][1].'</td>
          <td>'.$dusmorfies['lordwsh'][2].'</td>
          <td>'.$dusmorfies['lordwsh'][3].'</td>
          <td>'.$dusmorfies['lordwsh'][4].'</td>
          <td>'.$dusmorfies['lordwsh'][5].'</td>
          <td>'.$dusmorfies['lordwsh'][6].'</td>
          <td>'.$dusmorfies['lordwsh'][7].'</td>
          <td>'.$dusmorfies['lordwsh'][8].'</td>
          <td>'.$dusmorfies['lordwsh'][9].'</td>
        </tr>
        <tr>
          <th>Κοντόχοντρα</th>
          <td>'.$dusmorfies['kontoxontra'][0].'</td>
          <td>'.$dusmorfies['kontoxontra'][1].'</td>
          <td>'.$dusmorfies['kontoxontra'][2].'</td>
          <td>'.$dusmorfies['kontoxontra'][3].'</td>
          <td>'.$dusmorfies['kontoxontra'][4].'</td>
          <td>'.$dusmorfies['kontoxontra'][5].'</td>
          <td>'.$dusmorfies['kontoxontra'][6].'</td>
          <td>'.$dusmorfies['kontoxontra'][7].'</td>
          <td>'.$dusmorfies['kontoxontra'][8].'</td>
          <td>'.$dusmorfies['kontoxontra'][9].'</td>
        </tr>
        <tr>
          <th>Κλίση ουράς</th>
          <td>'.$dusmorfies['klish_ouras'][0].'</td>
          <td>'.$dusmorfies['klish_ouras'][1].'</td>
          <td>'.$dusmorfies['klish_ouras'][2].'</td>
          <td>'.$dusmorfies['klish_ouras'][3].'</td>
          <td>'.$dusmorfies['klish_ouras'][4].'</td>
          <td>'.$dusmorfies['klish_ouras'][5].'</td>
          <td>'.$dusmorfies['klish_ouras'][6].'</td>
          <td>'.$dusmorfies['klish_ouras'][7].'</td>
          <td>'.$dusmorfies['klish_ouras'][8].'</td>
          <td>'.$dusmorfies['klish_ouras'][9].'</td>
        </tr>
      </table>

    </td>
  </tr>

  <tr>
    <th>Αλλοιώσεις</th><td colspan="10">
      <table border="1" class="table table-striped table-bordered table-condensed  table-responsive">
        <tr>
          <th>Φαγωμένες ουρές/πτερύγια</th>
          <td>'.$alloiwseis['fagwmenes_oures'][0].'</td>
          <td>'.$alloiwseis['fagwmenes_oures'][1].'</td>
          <td>'.$alloiwseis['fagwmenes_oures'][2].'</td>
          <td>'.$alloiwseis['fagwmenes_oures'][3].'</td>
          <td>'.$alloiwseis['fagwmenes_oures'][4].'</td>
          <td>'.$alloiwseis['fagwmenes_oures'][5].'</td>
          <td>'.$alloiwseis['fagwmenes_oures'][6].'</td>
          <td>'.$alloiwseis['fagwmenes_oures'][7].'</td>
          <td>'.$alloiwseis['fagwmenes_oures'][8].'</td>
          <td>'.$alloiwseis['fagwmenes_oures'][9].'</td>
        </tr>
        <tr>
          <th>Πληγές & γδαρμένα</th>
          <td>'.$alloiwseis['plhges_gdarmena'][0].'</td>
          <td>'.$alloiwseis['plhges_gdarmena'][1].'</td>
          <td>'.$alloiwseis['plhges_gdarmena'][2].'</td>
          <td>'.$alloiwseis['plhges_gdarmena'][3].'</td>
          <td>'.$alloiwseis['plhges_gdarmena'][4].'</td>
          <td>'.$alloiwseis['plhges_gdarmena'][5].'</td>
          <td>'.$alloiwseis['plhges_gdarmena'][6].'</td>
          <td>'.$alloiwseis['plhges_gdarmena'][7].'</td>
          <td>'.$alloiwseis['plhges_gdarmena'][8].'</td>
          <td>'.$alloiwseis['plhges_gdarmena'][9].'</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <th>Παράσιτα</th><td colspan="10">
      <table border="1" class="table table-striped table-bordered table-condensed  table-responsive">
        <tr>
          <th>Ψείρες</th>
          <td>'.$parasita['pseires'][0].'</td>
          <td>'.$parasita['pseires'][1].'</td>
          <td>'.$parasita['pseires'][2].'</td>
          <td>'.$parasita['pseires'][3].'</td>
          <td>'.$parasita['pseires'][4].'</td>
          <td>'.$parasita['pseires'][5].'</td>
          <td>'.$parasita['pseires'][6].'</td>
          <td>'.$parasita['pseires'][7].'</td>
          <td>'.$parasita['pseires'][8].'</td>
          <td>'.$parasita['pseires'][9].'</td>
        </tr>
        <tr>
          <th>lernanthropus</th>
          <td>'.$parasita['lamanthropus'][0].'</td>
          <td>'.$parasita['lamanthropus'][1].'</td>
          <td>'.$parasita['lamanthropus'][2].'</td>
          <td>'.$parasita['lamanthropus'][3].'</td>
          <td>'.$parasita['lamanthropus'][4].'</td>
          <td>'.$parasita['lamanthropus'][5].'</td>
          <td>'.$parasita['lamanthropus'][6].'</td>
          <td>'.$parasita['lamanthropus'][7].'</td>
          <td>'.$parasita['lamanthropus'][8].'</td>
          <td>'.$parasita['lamanthropus'][9].'</td>
        </tr>
      </table>
    </td>
  </tr>

</table>
</div>
<div id="right_col">
  <table border="1" style="text-align: center;" class="table table-striped table-bordered table-condensed  table-responsive">
    <tr>
      <th>Κατάσταση Δέρματος</th>
      <th></th>
      <th>Κατάσταση Οφθαλμού</th>
      <th></th>
      <th>Κατάσταση Βραγχίων</th>
      <th></th>
    </tr>
    <tr>
      <td>Ζωηρό ιριδίζον χρώμα, με υδαρή,<br />διαυγή γλοιώδης ουσία.</td>
      <td>Βαθ.<br />4<br /><input class="form-control" type="radio" name="katast_dermatos" value="4" '.($row['katast_dermatos']==4 ? 'checked="checked"' : '').'/></td>
      <td>Κυρτός, διαυγής, κόρη μαύρη και<br />στίλβουσα.</td>
      <td>Βαθ.<br />4<br /><input class="form-control" type="radio" name="katast_ofthalmou" value="4" '.($row['katast_ofthalmou']==4 ? 'checked="checked"' : '').'/></td>
      <td>Στίλβοντα, ρόδινα, άνευ βλέννας</td>
      <td>Βαθ.<br />4<br /><input class="form-control" type="radio" name="katast_bragxiwn" value="4"'.($row['katast_bragxiwn']==4 ? 'checked="checked"' : '').'/></td>
    </tr>
    <tr>
      <td>Ζωηρό χρώμα χωρίς λάμψη με<br />ελαφρώς θολή γλοιώδης ουσία.</td>
      <td>Βαθ.<br />3<br /><input class="form-control" type="radio" name="katast_dermatos" value="3"'.($row['katast_dermatos']==3 ? 'checked="checked"' : '').'/></td>
      <td>Ελαφρώς κυρτός, λαμπερός, ελαφρώς<br />αδιαφανής, κόρη μαύρη, θαμπή.</td>
        <td>Βαθ.<br />3<br /><input class="form-control" type="radio" name="katast_ofthalmou" value="3"'.($row['katast_ofthalmou']==3 ? 'checked="checked"' : '').'/></td>
      <td>Ρόδινα, ελαφρώς αποχρωματισμένα,<br /> με διαυγή γλοιώδης ουσία.</td>
      <td>Βαθ.<br />3<br /><input class="form-control" type="radio" name="katast_bragxiwn" value="3"'.($row['katast_bragxiwn']==3 ? 'checked="checked"' : '').'/></td>
    </tr>
    <tr>
      <td>Αποχρωματισμένο & θαμπό με<br />θολή γλοιώδης ουσία.</td>
      <td>Βαθ.<br />2<br /><input class="form-control" type="radio" name="katast_dermatos" value="2"'.($row['katast_dermatos']==2 ? 'checked="checked"' : '').'/></td>
      <td>Επίπεδος, αδιαφανής, κόρη διαφανής.</td>
      <td>Βαθ.<br />2<br /><input class="form-control" type="radio" name="katast_ofthalmou" value="2"'.($row['katast_ofthalmou']==2 ? 'checked="checked"' : '').'/></td>
      <td>Αποχρωματισμένα με ελαφρώς θολή<br />γλοιώδης ουσία.</td>
      <td>Βαθ.<br />2<br /><input class="form-control" type="radio" name="katast_bragxiwn" value="2"'.($row['katast_bragxiwn']==2 ? 'checked="checked"' : '').'/></td>
    </tr>
    <tr>
      <td>Χρώμα θαμπό με αδιαφανή<br />γλοιώδης ουσία.</td>
      <td>Βαθ.<br />1<br /><input class="form-control" type="radio" name="katast_dermatos" value="1"'.($row['katast_dermatos']==1 ? 'checked="checked"' : '').'/></td>
      <td>Κοίλος εις το μέσον, γαλακτόχρους<br />κόρη γκρίζα.</td>
      <td>Βαθ.<br />1<br /><input class="form-control" type="radio" name="katast_ofthalmou" value="1"'.($row['katast_ofthalmou']==1 ? 'checked="checked"' : '').'/></td>
      <td>Κιτρινωπά, καφέ, με θολή<br />γαλακτόχρους γλοιώδης ουσία</td>
      <td>Βαθ.<br />1<br /><input class="form-control" type="radio" name="katast_bragxiwn" value="1"'.($row['katast_bragxiwn']==1 ? 'checked="checked"' : '').'/></td>
    </tr>
  </table>
    <table border="1" style="float:right;" class="table table-bordered table-condensed  table-responsive">
    <tr>
      <th>Βαθμοί</th> <th>Χαρακτηρισμός</th>
    </tr>
    <tr class="'.($row['freskothta']=='EXTRA' ? 'blue' : '' ).'" >
      <td>10 - 12</td> <td>EXTRA</td>
    </tr>
    <tr class="'.($row['freskothta']=='A' ? 'green' : '' ).'" >
      <td>7 - 9</td> <td>A</td>
    </tr>
    <tr class="'.($row['freskothta']=='B' ? 'orange' : '' ).'" >
      <td>4 - 6</td> <td>B</td>
    </tr>
    <tr class="'.($row['freskothta']=='REJECTED' ? 'red' : '' ).'" >
      <td><4</td> <td>Απορριπτέο</td>
    </tr>
  </table>
  <div id="general">
  <center><b>Γενικά</b></center>
  <table style="float:left;" border="1" class="table table-striped table-bordered table-condensed  table-responsive">
    <tr>
      <th>Κατάσταση Σάρκας</th> <th></th> <th>Χρώμα</th> <th></th> <th>Απολέπιση</th> <th></th> <th>Αιματώματα</th> <th></th> <th>Κοιλιά</th>
    </tr>
    <tr>
      <td>Λεία & Υγρή <input class="form-control" type="radio" name="stat_sarkas" value="Λεία & Υγρή" '.($row['stat_sarkas']=='Λεία & Υγρή' ? 'checked="checked"' : '').'/></td> <td></td>
      <td>Ιριδίζον <input class="form-control" type="radio" name="stat_xrwma" value="Ιριδίζον" '.($row['stat_xrwma']=='Ιριδίζον' ? 'checked="checked"' : '').'/></td> <td></td>
      <td>Ελαφρή <input class="form-control" type="radio" name="stat_apolepish" value="Ελαφρή" '.($row['stat_apolepish']=='Ελαφρή' ? 'checked="checked"' : '').'/></td> <td></td>
      <td>Κεφαλή <input class="form-control" type="radio" name="stat_aimatwmata" value="Κεφαλή" '.($row['stat_aimatwmata']=='Κεφαλή' ? 'checked="checked"' : '').'/></td> <td></td>
      <td>Κυλινδρική <input class="form-control" type="radio" name="stat_koilia" value="Κυλινδρική" '.($row['stat_koilia']=='Κυλινδρική' ? 'checked="checked"' : '').'/></td>
    </tr>
    <tr>
      <td>Κέρινη <input class="form-control" type="radio" name="stat_sarkas" value="Κέρινη" '.($row['stat_sarkas']=='Κέρινη' ? 'checked="checked"' : '').'/></td> <td></td>
      <td>Ζωηρό <input class="form-control" type="radio" name="stat_xrwma" value="Ζωηρό" '.($row['stat_xrwma']=='Ζωηρό' ? 'checked="checked"' : '').'/></td> <td></td>
      <td>Μεσαία <input class="form-control" type="radio" name="stat_apolepish" value="Μεσαία" '.($row['stat_apolepish']=='Μεσαία' ? 'checked="checked"' : '').'/></td> <td></td>
      <td>Σώμα <input class="form-control" type="radio" name="stat_aimatwmata" value="Σώμα" '.($row['stat_aimatwmata']=='Σώμα' ? 'checked="checked"' : '').'/></td> <td></td>
      <td>Διογκωμένη <input class="form-control" type="radio" name="stat_koilia" value="Διογκωμένη" '.($row['stat_koilia']=='Διογκωμένη' ? 'checked="checked"' : '').'/></td>
    </tr>
    <tr>
      <td>Στεγνή <input class="form-control" type="radio" name="stat_sarkas" value="Στεγνή" '.($row['stat_sarkas']=='Στεγνή' ? 'checked="checked"' : '').'/></td> <td></td>
      <td>Θαμπό <input class="form-control" type="radio" name="stat_xrwma" value="Θαμπό" '.($row['stat_xrwma']=='Θαμπό' ? 'checked="checked"' : '').'/></td> <td></td>
      <td>Έντονη <input class="form-control" type="radio" name="stat_apolepish" value="Έντονη" '.($row['stat_apolepish']=='Έντονη' ? 'checked="checked"' : '').'/></td>  <td></td>
      <td>Περιοχές <input class="form-control" type="radio" name="stat_aimatwmata" value="Περιοχές" '.($row['stat_aimatwmata']=='Περιοχές' ? 'checked="checked"' : '').'/></td> <td></td>
      <td>Μαλακή <input class="form-control" type="radio" name="stat_koilia" value="Μαλακή" '.($row['stat_koilia']=='Μαλακή' ? 'checked="checked"' : '').'/></td>
    </tr>
  </table>
  </div>

    <table border="1" class="table table-striped table-bordered table-condensed  table-responsive">
    <tr>
      <th></th> <th>Τυπική</th> <th>Προβληματική</th> <th>Μη Αποδεκτή</th> <th>Διόρθωση</th>
    </tr>
    <tr>
      <td>Κουρμπάρισμα</td>
      <td><input class="form-control" type="radio" name="susk_kourmparisma" value="Τυπική" '.($row['susk_kourmparisma']=='Τυπική' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_kourmparisma" value="Προβληματική" '.($row['susk_kourmparisma']=='Προβληματική' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_kourmparisma" value="Μη Αποδεκτή" '.($row['susk_kourmparisma']=='Μη Αποδεκτή' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_kourmparisma" value="Διόρθωση" '.($row['susk_kourmparisma']=='Διόρθωση' ? 'checked="checked"' : '').'/></td>
    </tr>
    <tr>
      <td>Κατάσταση Φελιζόλ</td>
      <td><input class="form-control" type="radio" name="susk_felizol" value="Τυπική" '.($row['susk_felizol']=='Τυπική' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_felizol" value="Προβληματική" '.($row['susk_felizol']=='Προβληματική' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_felizol" value="Μη Αποδεκτή" '.($row['susk_felizol']=='Μη Αποδεκτή' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_felizol" value="Διόρθωση" '.($row['susk_felizol']=='Διόρθωση' ? 'checked="checked"' : '').'/></td>
    </tr>
    <tr>
      <td>Κατάσταση Πάγου</td>
      <td><input class="form-control" type="radio" name="susk_pagos" value="Τυπική" '.($row['susk_pagos']=='Τυπική' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_pagos" value="Προβληματική" '.($row['susk_pagos']=='Προβληματική' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_pagos" value="Μη Αποδεκτή" '.($row['susk_pagos']=='Μη Αποδεκτή' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_pagos" value="Διόρθωση" '.($row['susk_pagos']=='Διόρθωση' ? 'checked="checked"' : '').'/></td>
    </tr>
    <tr>
      <td>Κατάσταση Παλέτας</td>
      <td><input class="form-control" type="radio" name="susk_paleta" value="Τυπική" '.($row['susk_paleta']=='Τυπική' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_paleta" value="Προβληματική" '.($row['susk_paleta']=='Προβληματική' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_paleta" value="Μη Αποδεκτή" '.($row['susk_paleta']=='Μη Αποδεκτή' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_paleta" value="Διόρθωση" '.($row['susk_paleta']=='Διόρθωση' ? 'checked="checked"' : '').'/></td>
    </tr>
    <tr>
      <td>Κατάσταση Σήμανσης</td>
      <td><input class="form-control" type="radio" name="susk_shmansh" value="Τυπική" '.($row['susk_shmansh']=='Τυπική' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_shmansh" value="Προβληματική" '.($row['susk_shmansh']=='Προβληματική' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_shmansh" value="Μη Αποδεκτή" '.($row['susk_shmansh']=='Μη Αποδεκτή' ? 'checked="checked"' : '').'/></td>
      <td><input class="form-control" type="radio" name="susk_shmansh" value="Διόρθωση" '.($row['susk_shmansh']=='Διόρθωση' ? 'checked="checked"' : '').'/></td>
    </tr>
  </table>

  <br />
  <div>
  <center><p><b>ΠΑΡΑΤΗΡΗΣΕΙΣ: Οι θερμογράφοι να είναι σε ετοιμότητα 24ωρης εγγραφής!!! <br />Σύντομη Περιγραφή του Δείγματος</b></p>
  <textarea name="comment" style="height:200px;width:400px;">'.$row['parathrhseis'].'</textarea></center>
  <br />
  <!-- <input class="form-control" type="submit" name="submit" value="Καταχώρηση" style="height:100px;width:200px;" /> -->
  </div>
</div>

</form>';
  $pics = json_decode($row['picture']);
  if(sizeof($pics)>0){
    echo "<div class='panel panel-default'>
    				<div class='panel-heading'>
    					Φωτογραφίες
    				</div>
    				<div class='panel-body'>";
     $ii=1;
  echo "<div id='pics'><div class'row'>";
  foreach($pics as $pic){
  try{
    $resize = new ResizeImage('uploads/images/'.$pic);
    $resize->resizeTo(300, 300, 'maxHeight');
    $resize->saveImage('uploads/images/temp/'.$pic);
    echo "<div class='col-sm-".(12/sizeof($pics))."'><center><img class='img-responsive' height=\"300\" onclick=\"zoom('".$pic."');\" src=\"uploads/images/temp/".$pic."\" /></center></div>";
  } catch (Exception $e) {
    // echo 'Caught exception: ',  $e->getMessage(), "\n";
  }

    if($ii%4==0){
      echo "</div><div class='row'>";
    }
    $ii++;
  }
  echo "</div></div></div>";
  }

  echo "</div>";
