<div class="card">
  <div class="card-body table-responsive">
    <table id="dataTable" class="table table-bordered table-striped">
      <thead>
        <tr>
          <th><?php echo $langArray['TABLE_CODE']; ?></th>
          <th>IP</th>
          <th><?php echo $langArray['TABLE_PRODUCT']; ?></th>
          <th><?php echo $langArray['TABLE_QUANTITY']; ?></th>
          <th><?php echo $langArray['NAME_SURNAME']; ?></th>
          <th><?php echo $langArray['TABLE_DATE']; ?></th>
          <th><?php echo $langArray['TABLE_STATUS']; ?></th>
          <th><?php echo $langArray['TABLE_OPERATION']; ?></th>
        </tr>
      </thead>
      <tbody>
        <?php
           $orderAsk->execute(array(
             'order_type' => 'order_packet'
           ));
           while ($orderCheck=$orderAsk->fetch(PDO::FETCH_ASSOC)){
         ?>
          <tr>
            <td><?php echo $orderCheck['order_code']; ?></td>
            <td><?php echo $orderCheck['ip']; ?></td>
            <td>
              <?php
              $allPackAsk1->execute(array(
                'packet_id' => $orderCheck['product']
              ));
              $packCheck=$allPackAsk1->fetch(PDO::FETCH_ASSOC);
              echo $packCheck['title'];
              ?>
            </td>
            <td>x<?php echo $orderCheck['quantity']; ?></td>
            <td><?php echo $orderCheck['name_surname']; ?></td>
            <td><?php echo $orderCheck['dates']; ?></td>
            <td>
              <?php if ($orderCheck['status']== 1){ ?>
                <i class="fas fa-eye text-success"></i>
              <?php }else{ ?>
                <i class="fas fa-eye-slash text-danger"></i>
              <?php } ?>
            </td>
            <td>
               <a class="btn btn-light" href="index.php?page=packetOrderRead&order_id=<?php echo $orderCheck['order_id'] ?>"><i class="fas fa-eye"></i></a>
               <a class="btn btn-danger" data-toggle="modal" data-target="#dataDelete-<?php echo $orderCheck['order_id']?>"><i class="fas fa-trash"></i></a>
               <div class="modal fade" id="dataDelete-<?php echo $orderCheck['order_id']?>">
                 <div class="modal-dialog customDialog">
                   <div class="modal-content bg-danger">
                     <div class="modal-header">
                       <h4 class="modal-title"><?php echo $langArray['ARE_YOU_SURE']; ?></h4>
                     </div>
                     <div class="modal-footer justify-content-between">
                       <button type="button" class="btn btn-outline-light" data-dismiss="modal"><?php echo $langArray['CANCEL_FORM']; ?></button>
                       <a href="system/operation.php?order_id=<?php echo $orderCheck['order_id']; ?>&packetOrderDelete=success" class="btn btn-outline-light"><?php echo $langArray['TABLE_DELETE']; ?></a>
                     </div>
                   </div>
                 </div>
               </div>
            </td>
          </tr>
        <?php } ?>
      </tbody>
      <tfoot>
        <tr>
          <th><?php echo $langArray['TABLE_CODE']; ?></th>
          <th>IP</th>
          <th><?php echo $langArray['TABLE_PRODUCT']; ?></th>
          <th><?php echo $langArray['TABLE_QUANTITY']; ?></th>
          <th><?php echo $langArray['NAME_SURNAME']; ?></th>
          <th><?php echo $langArray['TABLE_DATE']; ?></th>
          <th><?php echo $langArray['TABLE_STATUS']; ?></th>
          <th><?php echo $langArray['TABLE_OPERATION']; ?></th>
        </tr>
      </tfoot>
    </table>
  </div>
</div>
