-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparseConfig.php
More file actions
30 lines (26 loc) · 1.09 KB
/
Copy pathparseConfig.php
File metadata and controls
30 lines (26 loc) · 1.09 KB
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
<?php
$yaml = file_get_contents('/opt/dvmhost/configVC.yml');
$parsed = yaml_parse($yaml);
$callsign = $parsed['system']['cwId']['callsign'];
$identity = $parsed['system']['identity'];
$id = $parsed['network']['id'];
//var_dump($parsed['protocols']['dmr']['enable']);
$dmrEnB = $parsed['protocols']['dmr']['enable'];
$dmrEn = $dmrEnB ? 'true':'false';
$dmrEn = str_replace(['true', 'false'], ['yes', 'no'], $dmrEn);
$p25EnB = $parsed['protocols']['p25']['enable'];
$p25En = $p25EnB ? 'true':'false';
$p25En = str_replace(['true', 'false'], ['yes', 'no'], $p25En);
//$dmrEn = str_replace('false', 'Yes', $dmrEn);
//var_dump($parsed);
echo "<div style='width: 350px; border:2px solid black; border-style: dashed;'><span style='font-size: 30px;'>";
echo "Callsign: " . $callsign;
echo "<br />" . "Identity: " . $identity;
echo "<br />" . "Id: " . $id;
echo "<br />" . "P25 Enabled: "; echo $p25En;
echo "<br />" . "DMR Enabled: "; echo $dmrEn;
//echo $dmrEn ? 'true' : 'true';
echo "</span></div>";
?>
<html lang="en">
</html>