<?php
include($_SERVER['DOCUMENT_ROOT'] . HOME_DIR . TEMPLATE_DIR . '/header.php');
include($_SERVER['DOCUMENT_ROOT'] . HOME_DIR . '/Auth/nav.php');
?>
<div class="card bg-light mb-3">
  <div class="card-header">
    <?php
    include($_SERVER['DOCUMENT_ROOT'] . HOME_DIR . TEMPLATE_DIR . '/headline.php');
    ?>
  </div>
  <div class="card-body">
    <table width="100%">
      <thead>
        <tr>
          <th height="40" width="50">Nr.</th>
          <th>Produkt</th>
          <th>Markenname</th>
          <th>Office</th>
          <th>Nummer</th>
          <th>NCL</th>
          <th>Anmeldung</th>
          <th><a href="<?php echo $_SERVER['REQUEST_URI']; ?>&order_rule=1"><i class="fas fa-sort-up fa-lg"></i></a><br><a href="<?php echo $_SERVER['REQUEST_URI']; ?>&order_rule=2"><i class="fas fa-sort-down fa-lg"></i></a></th>
          <th>Schutz bis</th>
          <th>Verlängerung</th>
        </tr>
      </thead>
      <tbody>
        <?php
        $counter                = 1;
        foreach ($rowsTrademarkByCountry as $row) {
          switch ($row['need_action']) {
            case 0:
              $badgeclass                             = 'badge badge-success';
              break;
            case 1:
              $badgeclass                             = 'badge badge-warning';
              break;
            case 2:
              $badgeclass                             = 'badge badge-danger';
              break;
          }
          ?>
          <tr>
            <td height="40"><span class="<?php echo $badgeclass; ?>"><?php echo $counter; ?></span></td>
            <td><?php echo showHtmlEntities($row['product_name']); ?></td>
            <td><?php echo showHtmlEntities($row['trademark_name']); ?></td>
            <td><?php echo showHtmlEntities($row['office']); ?></td>
            <td><?php echo showHtmlEntities($row['number']); ?></td>
            <td><?php echo showHtmlEntities($row['ncl']); ?></td>
            <td><?php echo makeLocalDate($row['start_date'], "DE"); ?></td>
            <td></td>
            <td><?php echo makeLocalDate($row['end_date'], "DE"); ?></td>
            <td><?php echo validateYesNoTxt($row['renewal']); ?></td>
            
          </tr>
        <?php
        }
        ?>
      </tbody>
    </table>
  </div>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<?php
include($_SERVER['DOCUMENT_ROOT'] . HOME_DIR . TEMPLATE_DIR . '/footer.php');
?>

</body>
</html>
