1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
$query ="SELECT * FROM liste ORDER BY indicatif ASC";
$result = mysqli_query($connect, $query);
$LatA = "48.858383";
$LonA = "2.294518";
?>
<!DOCTYPE html>
<html>
<head>
<title>Liste des relais radioamateurs en France</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script>
<script src="https:////cdn.datatables.net/plug-ins/1.10.15/i18n/French.json"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" />
</head>
<body>
<br /><br />
<table width="1500" >
<tbody>
<h2>
<table bgcolor="#DCDCDC">
<table bordercolor="#FF8C00" >
<td width="96"><a href="index.html"> <center><font face="Century Gothic" ><FONT size="4">Accueil</a></td>
<td width="188"><a href="liste.php"><center><font face="Century Gothic" ><FONT size="4">Liste des relais</a></td>
<td width="181"><center><font face="Century Gothic" ><FONT size="4">Relais</a></td>
<td width="200"><center><font face="Century Gothic" ><FONT size="4"></a></td>
</h2>
</table>
<br /><br />
<div class="container">
<h3 align="center">Liste des relais radioamateurs en France</h3>
<br />
<div class="table-responsive">
<table id="liste2" class="table table-striped table-bordered">
<thead>
<tr>
<td>Indicatif</td>
<td>Ville</td>
<td>Département</td>
<td>Fréquence</td>
<td>Offset</td>
<td>Technologie</td>
<td>Distance </td>
<td>Azimut</td>
</tr>
</thead>
Latitude : <input style="font-size:14px" type="text" value="<?php echo $LatA;?>">
Longitude : <input style="font-size:14px" type="text" value="<?php echo $LonA;?>">
<br /><br />
<?php
while($row = mysqli_fetch_array($result))
{
$distance=round(6378*acos(sin($LatA*PI()/180)*sin(($row['latitude']+0.0001)*pi()/180)+cos($LatA*pi()/180)*cos(($row['latitude']+0.0001)*pi()/180)*cos((($row['longitude']+0.00001)*pi()/180)-($LonA*PI()/180))));
$Angle=-atan((cos(($LonA*pi()/180)-(($row['longitude']+0.00001)*pi()/180))*sin(pi()/2-(($row['latitude']+0.0001)*pi()/180))*sin(pi()/2-($LatA*pi()/180))+cos(pi()/2-(($row['latitude']+0.0001)*pi()/180))*cos(pi()/2-($LatA*pi()/180)))/sqrt(1-(cos(($LonA*pi()/180)-(($row['longitude']+0.00001)*pi()/180))*sin(pi()/2-(($row['latitude']+0.0001)*pi()/180))*sin(pi()/2-($LatA*pi()/180))+cos(pi()/2-(($row['latitude']+0.0001)*pi()/180))*cos(pi()/2-($LatA*pi()/180)))*(cos(($LonA*pi()/180)-(($row['longitude']+0.00001)*pi()/180))*sin(pi()/2-(($row['latitude']+0.0001)*pi()/180))*sin(pi()/2-($LatA*pi()/180))+cos(pi()/2-(($row['latitude']+0.0001)*pi()/180))*cos(pi()/2-($LatA*pi()/180)))))+pi()/2;
$azimut=round((-ATAN(((SIN((($row['latitude']+0.0001)*PI()/180))-SIN(($LatA*PI()/180))*COS($Angle))/SIN($Angle)/COS(($LatA*PI()/180)))/(SQRT(1-((SIN((($row['latitude']+0.0001)*PI()/180))-SIN(($LatA*PI()/180))*COS($Angle))/SIN($Angle)/COS(($LatA*PI()/180)))*((SIN((($row['latitude']+0.0001)*PI()/180))-SIN(($LatA*PI()/180))*COS($Angle))/SIN($Angle)/COS(($LatA*PI()/180))))))+PI()/2)*180/PI());
if ($row['longitude'] < $LonA)
{
}
else
{
$azimut=360-$azimut;
}
echo '
<tr>
<td><center><b><a href="index3.php?indicatif='.$row["indicatif"].'">'.$row["indicatif"].'</a></b></td>
<td>'.$row["ville"].'</td>
<td>'.$row["departement"].'</td>
<td>'.$row["frequence"].'</td>
<td>'.$row["offset"].'</td>
<td>'.$row["technologie"].'</td>
<td>'.$distance.'</td>
<td>'.$azimut.'</td>
</tr>
';
}
?>
</table>
</div>
</div>
</body>
</html>
<script>
$(document).ready(function () {
$('#liste2').DataTable({
pageLength: '25',
language: {
url: "DataTables/media/French.json"
}
});
});
</script> |
Partager