Skip to content

Commit ba9cac0

Browse files
committed
initial load for repository split
1 parent 1195c71 commit ba9cac0

File tree

124 files changed

+15596
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+15596
-0
lines changed

audio.php

+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<?php
2+
$progname = basename($_SERVER['SCRIPT_FILENAME'],".php");
3+
include_once 'include/config.php';
4+
include_once 'include/tools.php';
5+
6+
7+
// migrate to external class tbc
8+
9+
$svxConfigFile = '/etc/svxlink/svxlink.conf';
10+
if (fopen($svxConfigFile,'r'))
11+
{ $svxconfig = parse_ini_file($svxConfigFile,true,INI_SCANNER_RAW);
12+
$callsign = $svxconfig['ReflectorLogic']['CALLSIGN'];
13+
$fmnetwork =$svxconfig['ReflectorLogic']['FMNET']; }
14+
else { $callsign="N0CALL";
15+
$fmnetwork="no registered";
16+
}
17+
18+
19+
?>
20+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
21+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
22+
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" lang="en">
23+
<head>
24+
<meta name="robots" content="index" />
25+
<meta name="robots" content="follow" />
26+
<meta name="language" content="English" />
27+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
28+
<meta name="generator" content="SVXLink" />
29+
<meta name="Author" content="SP2ONG, SP0DZ" />
30+
<meta name="Description" content="Dashboard for SVXLink by SP2ONG, SP0DZ" />
31+
<meta name="KeyWords" content="SVXLink,SP2ONG" />
32+
<meta http-equiv="cache-control" content="max-age=0" />
33+
<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate" />
34+
<meta http-equiv="expires" content="0" />
35+
<meta http-equiv="pragma" content="no-cache" />
36+
<link rel="preconnect" href="https://fonts.googleapis.com">
37+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
38+
<link href="https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Fredoka+One&family=Tourney&family=Oswald&display=swap" rel="stylesheet">
39+
<link rel="shortcut icon" href="images/favicon.ico" sizes="16x16 32x32" type="image/png">
40+
41+
<?php echo ("<title>" . $callsign ." ". $fmnetwork . " Dashboard</title>"); ?>
42+
43+
<?php include_once "include/browserdetect.php"; ?>
44+
<script type="text/javascript" src="scripts/jquery.min.js"></script>
45+
<script type="text/javascript" src="scripts/functions.js"></script>
46+
<script type="text/javascript" src="scripts/pcm-player.min.js"></script>
47+
<script type="text/javascript">
48+
$.ajaxSetup({ cache: false });
49+
</script>
50+
<link href="css/featherlight.css" type="text/css" rel="stylesheet" />
51+
<script src="scripts/featherlight.js" type="text/javascript" charset="utf-8"></script>
52+
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
53+
</head>
54+
<body style="background-color: #e1e1e1;font: 11pt arial, sans-serif;">
55+
<center>
56+
<fieldset style="box-shadow:0 0 10px #999; background-color:#f1f1f1; width:0px;margin-top:15px;margin-left:0px;margin-right:5px;font-size:13px;border-top-left-radius: 10px; border-top-right-radius: 10px;border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;">
57+
<div class="container">
58+
<div class="header">
59+
<div class="parent">
60+
<div class="img" style="padding-left:270px"><img src="images/tower-rpt.png" /></div>
61+
<div class="text"style="padding-right:230px">
62+
<center><p style="margin-top:5px;margin-bottom:0px;">
63+
<?php
64+
$svxConfigFile = '/etc/svxlink/svxlink.conf';
65+
if (fopen($svxConfigFile,'r'))
66+
{ $svxconfig = parse_ini_file($svxConfigFile,true,INI_SCANNER_RAW);
67+
$callsign = $svxconfig['ReflectorLogic']['CALLSIGN'];}
68+
else { $callsign="N0CALL";}
69+
?>
70+
<span style="font-size: 32px;letter-spacing:4px;font-family: &quot;Fredoka One&quot;, sans-serif;font-weight:500;color:DarkOrange"><?php echo $callsign; ?></span>
71+
<p style="margin-top:0px;margin-bottom:0px;">
72+
<span style="font-size: 30px;font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, sans-serif;letter-spacing: 3px;font-weight: 600;background: #3083b8;"><?php echo $fmnetwork; ?></span>
73+
</p></center>
74+
</div></div>
75+
</div>
76+
77+
<?php include_once __DIR__."/include/top_menu.php"; ?>
78+
79+
<div class="content"><center>
80+
<div style="margin-top:8px;">
81+
</div></center>
82+
</div>
83+
<?php
84+
if (MENUBUTTON=="TOP") {
85+
include_once __DIR__."/include/buttons.php";
86+
}
87+
?>
88+
<?php
89+
echo '<table style="margin-bottom:0px;border:0; border-collapse:collapse; cellspacing:0; cellpadding:0; background-color:#f1f1f1;"><tr style="border:none;background-color:#f1f1f1;">';
90+
echo '<td width="200px" valign="top" class="hide" style="height:auto;border:0;background-color:#f1f1f1;">';
91+
echo '<div class="nav" style="margin-bottom:10px;margin-top:10px;">'."\n";
92+
93+
echo '<script type="text/javascript">'."\n";
94+
echo 'function reloadStatusInfo(){'."\n";
95+
echo ' $("#statusInfo").load("include/status.php",function(){ setTimeout(reloadStatusInfo,3000) });'."\n";
96+
echo '}'."\n";
97+
echo 'setTimeout(reloadStatusInfo,3000);'."\n";
98+
echo '$(window).trigger(\'resize\');'."\n";
99+
echo '</script>'."\n";
100+
echo '<div id="statusInfo" style="margin-bottom:30px;">'."\n";
101+
include 'include/status.php';
102+
echo '</div>'."\n";
103+
echo '</div>'."\n";
104+
echo '</td>'."\n";
105+
106+
107+
108+
109+
110+
echo '<td valign="center" style="height:auto;border:none; background-color:#f1f1f1;">';
111+
112+
echo '<iframe src="/audio" width="600" height="500" title="audio"></iframe>';
113+
114+
115+
116+
117+
echo '</td>';
118+
?>
119+
</tr></table>
120+
<?php
121+
echo '<div class="content2">'."\n";
122+
echo '<script type="text/javascript">'."\n";
123+
echo 'function reloadSysInfo(){'."\n";
124+
echo ' $("#sysInfo").load("include/system.php",function(){ setTimeout(reloadSysInfo,15000) });'."\n";
125+
echo '}'."\n";
126+
echo 'setTimeout(reloadSysInfo,15000);'."\n";
127+
echo '$(window).trigger(\'resize\');'."\n";
128+
echo '</script>'."\n";
129+
echo '<div id="sysInfo">'."\n";
130+
include 'include/system.php';
131+
echo '</div>'."\n";
132+
echo '</div>'."\n";
133+
?>
134+
<?php
135+
if (MENUBUTTON=="BOTTOM") {
136+
include_once __DIR__."/include/buttons.php"; }
137+
?>
138+
<!--- Please do not remove copyright info -->
139+
<center><span title="Dashboard " style="font: 7pt arial, sans-serif;">SvxLink Dashboard © SP2ONG, SP0DZ <?php $cdate=date("Y"); if ($cdate > "2021") {$cdate="2021-".date("Y");} echo $cdate; ?>
140+
</div>
141+
</div>
142+
</fieldset>
143+
<br>
144+
</body>
145+
</html>

audio/index.php

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Audio Peak Meter</title>
6+
<meta name="Author" content="Waldek SP2ONG" />
7+
<meta name="Description" content="Audio Test Peak Meter for SVXLink by SP2ONG 2022" />
8+
<meta name="KeyWords" content="SVXLink, SVXRelector,SP2ONG" />
9+
<link href="/css/css.php" type="text/css" rel="stylesheet" />
10+
<style type="text/css">
11+
body {
12+
background-color: #eee;
13+
font-size: 18px;
14+
font-family: Arial;
15+
font-weight: 300;
16+
margin: 2em auto;
17+
max-width: 40em;
18+
line-height: 1.5;
19+
color: #444;
20+
padding: 0 0.5em;
21+
}
22+
h1, h2, h3 {
23+
line-height: 1.2;
24+
}
25+
a {
26+
color: #607d8b;
27+
}
28+
.highlighter-rouge {
29+
background-color: #fff;
30+
border: 1px solid #ccc;
31+
border-radius: .2em;
32+
font-size: .8em;
33+
overflow-x: auto;
34+
padding: .2em .4em;
35+
}
36+
pre {
37+
margin: 0;
38+
padding: .6em;
39+
overflow-x: auto;
40+
}
41+
42+
#player {
43+
position:relative;
44+
width:205px;
45+
overflow: hidden;
46+
direction: ltl;
47+
}
48+
49+
</style>
50+
</head>
51+
<body style="background-color: #e1e1e1;font: 11pt arial, sans-serif;">
52+
<script src="web-audio-peak-meter.js"></script>
53+
<center>
54+
<fieldset style="border:#3083b8 2px groove;box-shadow:0 0 10px #999; background-color:#f1f1f1; width:500px;margin-top:15px;margin-left:0px;margin-right:5px;font-size:13px;border-top-left-radius: 10px; border-top-right-radius: 10px;border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;">
55+
<div style="padding:0px;width:495px;background-image: linear-gradient(to bottom, #e9e9e9 50%, #bcbaba 100%);border-radius: 10px;-moz-border-radius:10px;-webkit-border-radius:10px;border: 1px solid LightGrey;margin-left:0px; margin-right:0px;margin-top:4px;margin-bottom:0px;line-height:1.6;white-space:normal;">
56+
<center>
57+
<h1 id="web-audio-peak-meters" style="color:#00aee8;font: 18pt arial, sans-serif;font-weight:bold; text-shadow: 0.25px 0.25px gray;">SVXLink Audio Test Peak Meter</h1>
58+
<p style="font-size:14px;color:#454545;font-weight:bold;">Optimal Audio Level: <span style="color:brown;"><b>-20</b> to <b>-10dB</b></span> Max top Audio level (peak) <span style="color:brown;"><b> -5dB</b>.</span></p>
59+
<div>
60+
<fieldset style="border:rgb(255, 156, 42) 2px groove; box-shadow: 5px 5px 20px rgb(255, 236, 214); background-color:#f1f1f1; width:400px;margin-top:15px;margin-left:0px;margin-right:5px;font-size:13px;border-top-left-radius: 10px; border-top-right-radius: 10px;border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;">
61+
<div id="my-peak-meter" style="width: 32em; height: 65px; margin: 10px;"></div>
62+
</fieldset>
63+
<p style="margin-top:30px;"></p>
64+
<?php
65+
error_reporting(0);
66+
$filelist=array();
67+
foreach(glob('*.wav') as $filename) {
68+
$filelist[] = $filename;
69+
}
70+
$filelist = array_reverse($filelist);
71+
//foreach($filelist as $value) {
72+
echo '<p style="margin-bottom:10px;margin-top:10px;"><a href='.$filelist[0].'><span style="font-size:14px;color:blue;font-weight:bold">'.$filelist[0].'</span>&nbsp&nbsp&nbsp&nbsp;<img src=/images/download.png></a></p>';
73+
echo '<div id="player"><audio id="my-audio" preload="none" crossorigin="anonymous" controls="controls"><source src="'.$filelist[0].'?[';
74+
echo time();
75+
echo ']" type="audio/wav"></audio></div>';
76+
// }
77+
?>
78+
</center>
79+
<script>
80+
var myMeterElement = document.getElementById('my-peak-meter');
81+
var myAudio = document.getElementById('my-audio');
82+
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
83+
var sourceNode = audioCtx.createMediaElementSource(myAudio);
84+
sourceNode.connect(audioCtx.destination);
85+
var meterNode = webAudioPeakMeter.createMeterNode(sourceNode, audioCtx);
86+
webAudioPeakMeter.createMeter(myMeterElement, meterNode, {});
87+
myAudio.addEventListener('play', function() {
88+
audioCtx.resume();
89+
});
90+
</script>
91+
<br>
92+
</div>
93+
</fieldset>
94+
<?php
95+
if (isset($_POST['recAudio']))
96+
{
97+
exec('/opt/fmpoland/audiotest/record.sh');
98+
header("Refresh:0; url=index.php");
99+
}
100+
?>
101+
<script>
102+
function func() {
103+
document.getElementById('runRec').value = 'Recording audio, please wait... ';
104+
document.getElementById('runRec').className = 'orange';
105+
}
106+
</script>
107+
108+
<p style="margin-bottom:0px;"></p>
109+
110+
<form method="post">
111+
<p>
112+
<input name="recAudio" type="submit" class="red" onclick="func()" id="runRec" type="button" value="Click to record 15sec" style="height:45px;font-size:18px;"></input>
113+
</p>
114+
</form>
115+
<p style="margin: 0 auto;"></p>
116+
<p style="margin-bottom:-2px;"></p>
117+
118+
</body>
119+
</html>

0 commit comments

Comments
 (0)