<?php
$ii = 0;
$DataPageLimiteOLD2 = 50;
?>




         <!-- Bootstrap core CSS -->
         <!-- link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">


  <!-- Bootstrap core JavaScript -->
  <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" 				integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" 	integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" 		integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

         <!-- Datatables ** 1.10.21 ** 2.3.6 **  -->
         <!-- link rel="stylesheet" href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css">
         <!-- script type="text/javascript" src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js"></script -->

<!-- script>
    $('old2').DataTable({ lengthMenu: [[ 5, 10, 25, 50, 100, -1],[ 5, 10, 25, 50, 100, "Tout"]], pageLength: 10});
</script -->









<?php

// ********** Themes ********* -----
$ThemesCouleur = '/var/www/html/DlFiles/ThemesCouleurs.php';
$ThemesCouleurLocal = '/var/www/html/include/ThemesCouleurs.php';
$heure = date("G");
if ($heure >= 6 && $heure < 19) {
    if (file_exists($ThemesCouleur)) {
	 require_once '/var/www/html/DlFiles/ThemesCouleurs.php';
    } else if(file_exists($ThemesCouleurLocal)) { 
	 require_once '/var/www/html/include/ThemesCouleurs.php';
	} else {
	// Debut Couleur OLD ----------  # < ? = $BgColOLD1; ? > ;  ------- JOUR -----
	// BackGround Couleur OLD **************
        $BgColOLD1 = "70A7B7"; // -*- Bulle Externe
        $BgColOLD2 = "2437A8A"; // Bulle Header-G
        $BgColOLD3 = "2437A8A"; // Bulle Header-C
        $BgColOLD4 = "2437A8A"; // Bulle Header-D
        $BgColOLD5 = "000000";
        $BgColOLD6 = "508797"; // _____Onglais Titre
        $BgColOLD7 = "000000";
        $BgColOLD8 = "A9DFEF"; // BG Data List
	// Text Couleur OLD *******************
        $TxtColOLD1 = "B7EFFF"; // - List de tous les indicatifs OLD
        $TxtColOLD2 = "000000";
        $TxtColOLD3 = "002010"; // Heur Contact
        $TxtColOLD4 = "002010"; // Indicatif
        $TxtColOLD5 = "002010"; // Cible
        $TxtColOLD6 = "002010"; // Passerelle 
        $TxtColOLD7 = "000000"; 
        $TxtColOLD8 = "000000";
        $TxtColOLD9 = "113344";  // Data0 Heur Contact
        $TxtColOLD10 = "0050AF"; // Data1 Indicatif
        $TxtColOLD11 = "343434"; // Data2 Cible
        $TxtColOLD12 = "DF1000"; // Data3 Passerelle
        $TxtColOLD13 = "000000"; 
        // Fin Couleur OLD  ------------------------------------------------
	}
} else {
// Debut Couleur OLD ----------  # < ? = $BgColOLD1; ? > ;  ------- NUIT --------
// BackGround Couleur OLD **************
    $BgColOLD1 = "002A39"; // -*- Bulle Externe
    $BgColOLD2 = "2437A8A"; // Bulle Header-G
    $BgColOLD3 = "2437A8A"; // Bulle Header-C
    $BgColOLD4 = "2437A8A"; // Bulle Header-D
    $BgColOLD5 = "000000";
    $BgColOLD6 = "303737"; // _____Onglais Titre
    $BgColOLD7 = "000000";
    $BgColOLD8 = "002030"; // BG Data List
// Text Couleur OLD *******************
    $TxtColOLD1 = "B7EFFF"; // - List de tous les indicatifs OLD
    $TxtColOLD2 = "000000";
    $TxtColOLD3 = "BFAF9F"; // Heur Contact
    $TxtColOLD4 = "BFAF9F"; // Indicatif
    $TxtColOLD5 = "BFAF9F"; // Cible
    $TxtColOLD6 = "BFAF9F"; // Passerelle 
    $TxtColOLD7 = "000000"; 
    $TxtColOLD8 = "000000";
    $TxtColOLD9 = "AF9F8F";  // Data0 Heur Contact
    $TxtColOLD10 = "87D7FF"; // Data1 Indicatif
    $TxtColOLD11 = "848484"; // Data2 Cible
    $TxtColOLD12 = "FF2000"; // Data3 Passerelle
    $TxtColOLD13 = "000000"; 
// Fin Couleur OLD  ------------------------------------------------
}

// ********** Themes ********* -----  color: # < ? = $TxtColOLD3 ; ? > ; font-size: 1.25em ; font-weith: bold ; ----------
?>

<!--    table table-condensed    -->
<div class="card" style="background-color: #<?= $BgColOLD1; ?>; padding: 5px; box-shadow: 0px 0px 10px 3px #000; border-radius: 15px;">
 <div class="card-header" style="background-color: #<?= $BgColOLD2; ?>; color: #<?= $TxtColOLD1; ?>; font-size: 2em; font-weith: bold; text-shadow: 1px 1px 3px #000; float: right; border-radius: 15px;">Liste de tous les indicatifs</div>
  <div class="table-responsive">
   <table id="OLD2" class="table table-condensed" data-page-length="<?= $DataPageLimiteOLD2 ?>">
    <thead>
     <tr style="background-color: #<?= $BgColOLD6; ?>; color: #<?= $TxtColOLD3; ?>; font-size: 1.25em;">
      <th>Heure (<?php echo TIMEZONE;?>)</th>
      <th>Indicatif</th>
      <th>Cible</th>
      <th>Passerelle</th>
     </tr>
    </thead>
    <tbody>

<?php

// OldAllHeard1	--- List Historique Trafics (Tx) ---
// OldAllHeard2	--- List de tout les indicatifs ----
// allHeard 	--- List entendues aujourd hui -----
// lastHeard 	--- List dernier entendu -----------

for ($i = 0; $i < count($oldallHeard2); $i++) {
		$listElem = $oldallHeard2[$i];
		echo"<tr style='background-color: #$BgColOLD8;'>";
		$ii = count($oldallHeard2) - $i;
		echo"<td style='color: #$TxtColOLD9; font-size: 1.35em; font-weith: bold;'>$ii - $listElem[0]</td>";

		$oldCaller = preg_replace('/[-\/_].*/','',$listElem[1]);

		if (defined("GDPR")) {
			echo"<td nowrap>".str_replace("0","&Oslash;",substr($listElem[1],0,3)."***")."</td>";
		} else {
			echo"<td nowrap><a style='color: #$TxtColOLD10; font-size: 1.4em; font-weith: bold;' target=\"_new\" href=\"https://qrz.com/db/$oldCaller\">" .str_replace("0","&Oslash;",$listElem[1])."</a></td>";
		}

		echo"<td style='color: #$TxtColOLD11; font-size: 1.3em;'>$listElem[2]</td>";

		if (defined("GDPR")) {
			echo"<td style='color: #$TxtColOLD12; font-size: 1.25em; font-weith: bold; text-shadow: 0px 0px 3px #001;' nowrap>".str_replace("0","&Oslash;",substr($listElem[3],0,3)."***")."</td>";
		} else {
			echo"<td style='color: #$TxtColOLD12; font-size: 1.25em; font-weith: bold;' nowrap>".str_replace("0","&Oslash;",$listElem[3])."</td>";
		}

		echo"</tr>\n";
	}

?>
    </tbody>
   </table>
  </div>

  <script>
    $(document).ready(function(){
      $('#OLD2').dataTable( {
        "aaSorting": [[0,'desc']]
      } );
    });
  </script>

 </div>
</div>
