-
Notifications
You must be signed in to change notification settings - Fork 0
/
realtimelist.php
executable file
·87 lines (81 loc) · 2.73 KB
/
realtimelist.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
84
85
86
87
<?php session_start();
if ($contestdashboard == 0) {
echo "<b>Last 10 contacts this band (" . $_SESSION["band"] . ")</b><br>";
echo "<table border = 1>"; // Contacts This band
echo "<tr>";
echo "<th>Contact ID</th><th>Callsign</th><th>Park</th><th>State</th><th>Band</th><th>Mode</th>";
echo "</tr>";
$sql = "select ol.contactid, ol.contactcallsign, sb.band, ifnull(op.parkid,0) as parkid, ifnull(ss.stateabrv,0) as stateabrv from ospotalog ol ";
$sql = $sql . "join sysbands sb on sb.sysbandsid = ol.bandid ";
$sql = $sql . "left join ospotaparks op on ol.parkid = op.ospotaparkid ";
$sql = $sql . "left join sysstates ss on ss.sysstatesid = ol.stateid ";
$sql = $sql . "where sb.band = '" . $_SESSION["band"] . "' order by contactid desc limit 10";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
echo "<tr>";
echo '<td><a href="editcontact.php?id=' . $row["contactid"] . '">'. $row["contactid"] . '</td>';
echo "<td>" . $row["contactcallsign"] . "</td>";
echo "<td>";
if ($row["parkid"] == "0") {
echo "";
} else {
echo $row["parkid"];
}
echo "</td>";
echo "<td>";
if ($row["stateabrv"] == "0") {
echo "";
} else {
echo $row["stateabrv"];
}
echo "</td>";
echo "<td>" . $row["band"] . "</td>";
echo "<td>PH</td>";
echo "</tr>";
}
echo "</table>";//Contacts this band
echo "<br><br><br>";
}
if ($contestdashboard == 1) {
echo "<b>Last 20 contacts Overall</b><br>";
} else {
echo "<b>Last 10 contacts Overall</b><br>";
}
echo "<table border = 1>"; // Contacts All bands
echo "<tr>";
echo "<th>Contact ID</th><th>Callsign</th><th>Park</th><th>State</th><th>Band</th><th>Mode</th>";
echo "</tr>";
$sql = "select ol.contactid, ol.contactcallsign, sb.band, ifnull(op.parkid,0) as parkid, ifnull(ss.stateabrv,0) as stateabrv from ospotalog ol ";
$sql = $sql . "join sysbands sb on sb.sysbandsid = ol.bandid ";
$sql = $sql . "left join ospotaparks op on ol.parkid = op.ospotaparkid ";
$sql = $sql . "left join sysstates ss on ss.sysstatesid = ol.stateid ";
if ($contestdashboard == 1) {
$sql = $sql . "order by contactid desc limit 20";
} else {
$sql = $sql . "order by contactid desc limit 10";
}
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
echo "<tr>";
echo "<td>" . $row["contactid"] . "</td>";
echo "<td>" . $row["contactcallsign"] . "</td>";
echo "<td>";
if ($row["parkid"] == "0") {
echo "";
} else {
echo $row["parkid"];
}
echo "</td>";
echo "<td>";
if ($row["stateabrv"] == "0") {
echo "";
} else {
echo $row["stateabrv"];
}
echo "</td>";
echo "<td>" . $row["band"] . "</td>";
echo "<td>PH</td>";
echo "</tr>";
}
echo "</table>";//Contacts all band
?>