-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDMR_Talkgroups.php
More file actions
44 lines (24 loc) · 925 Bytes
/
DMR_Talkgroups.php
File metadata and controls
44 lines (24 loc) · 925 Bytes
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
<!-- Another DVSPH Talk Group page example -->
<!-- As used on LYRG.co.uk, This time using file_get_contents-->
<table>
<thead>
<tr>
<th style="width:10%">Slot</th>
<th style="width:25%">Talk Group</th>
<th style="width:65%">Description</th>
</tr>
</thead>
<tbody>
<?php
$json_data = file_get_contents("https://dvsph.net/api/TalkGroups.json");
$data = json_decode($json_data, true);
$items = $data['TalkGroups'];
foreach($items as $row){
if ($row["Interlink"] =="") {
echo "<tr><td>".$row["Slot"].'</td><td>'.$row["TalkGroup"].'</td><td>'.$row["Description"]."</td></tr>";
} else {
echo "<tr><td>".$row["Slot"].'</td><td>'.$row["TalkGroup"].'</td><td><a href="#" data-toggle="tooltip" title="Linked to: '.$row["Interlink"].'">'.$row["Description"]."</a></td></tr>";}
}
?>
</tbody>
</table>