forked from kkaiser1952/NCM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetTop100.php
83 lines (69 loc) · 1.92 KB
/
getTop100.php
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
<!doctype html>
<html lang="en">
<head>
<title>First 100 Locations</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='https://fonts.googleapis.com/css?family=Allerta' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/NetManager.css" />
<style>
</style>
</head>
<body>
<div><h2>The 100</h2>
<h3>100 tt Locations under Northland ARES</h3>
</div>
<div id="100table">
<table class="sortable " id="thisNet">
<thead id="thead" style="text-align: center;">
<tr>
<th>TT</th>
<th width="8%">Call Sign</th>
<th>Name</th>
<th>eMail</th>
<th>Credentials</th>
<th>Coords</th>
<th>Grid</th>
<th>Locality</th>
</tr>
</thead>
<tbody id="netBody">
<?php
ini_set('display_errors',1);
error_reporting (E_ALL ^ E_NOTICE);
require_once "dbConnectDtls.php";
$sql = "SELECT DISTINCT tt ,
callsign,
CONCAT(Fname, ' ', Lname) AS name,
email,
creds,
CONCAT(latitude, ', ', longitude) as coords,
grid,
CONCAT(county,' Co. ', state, ', ', district) as locality
FROM NetLog
WHERE tt < 100
GROUP by tt
ORDER BY tt";
//echo "$sql";
$num_rows = 0; // Counter to color row backgrounds in loop below
foreach($db_found->query($sql) as $row) {
++$num_rows;
echo ("
<tr>
<td> $row[tt] </td>
<td> $row[callsign] </td>
<td> $row[name] </td>
<td> $row[email] </td>
<td> $row[creds] </td>
<td> $row[coords] </td>
<td> $row[grid] </td>
<td> $row[locality] </td>
</tr>
");
}
?>
</tbody>
</table>
</div>
</body>
</html>