kopia lustrzana https://github.com/craigerl/digipi
Bit of code cleanup and layout fix to button row
rodzic
25bae648e7
commit
96c9eaafe9
|
@ -1,36 +1,7 @@
|
|||
<?php include 'header.php' ?>
|
||||
<!---
|
||||
<html>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<LINK href="styles/simple.css" rel="stylesheet" type="text/css">
|
||||
|
||||
|
||||
<title>DigiPi </title>
|
||||
|
||||
<body style="position: relative; height: 100%; width: 100%; overflow: hidden;">
|
||||
|
||||
|
||||
<table width=400 >
|
||||
<tr>
|
||||
<td width=10% bgcolor="lightgrey">
|
||||
<font size=+3><strong>DigiPi</strong> </font>
|
||||
</td>
|
||||
<td width=10% bgcolor="lightgrey" >
|
||||
<img align=right height=40px src="radio.png">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
-->
|
||||
|
||||
<!---
|
||||
<h1><strong>DigiPi</strong></h1>
|
||||
--->
|
||||
|
||||
<form action="index.php" method="post">
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
|
||||
$submit = "none";
|
||||
|
@ -47,7 +18,6 @@ if (isset($_POST["tnc"])) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($_POST["digipeater"])) {
|
||||
$submit = $_POST["digipeater"];
|
||||
if ( $submit == 'on' ) {
|
||||
|
@ -534,95 +504,99 @@ echo "</td></tr>";
|
|||
|
||||
|
||||
#craiger systemd thinks a sigkill is a failure, so reset failed service status
|
||||
#This will turn red/failed service into grey/stopped
|
||||
$output = shell_exec('sudo systemctl reset-failed fldigi 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed sstv 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed wsjtx 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed ardop 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed tnc300b 2> /dev/null');
|
||||
#This will turn red/failed service into grey/stopped
|
||||
$output = shell_exec('sudo systemctl reset-failed fldigi 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed sstv 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed wsjtx 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed ardop 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed tnc300b 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed digipeater 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed tnc 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed node 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed winlinkrms 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed pat 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed js8call 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed node 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed winlinkrms 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed pat 2> /dev/null');
|
||||
$output = shell_exec('sudo systemctl reset-failed js8call 2> /dev/null');
|
||||
|
||||
?>
|
||||
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<!--<table cellpadding="4" bgcolor="#dddddd" border="1" style="border-width:1px;border-color:black; border-collapse:collapse;" > -->
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px">
|
||||
<script language="JavaScript">
|
||||
document.write('<a href="' + window.location.protocol + '//' + window.location.hostname + ':8080' + '" target="new" title="Pat Email Client"><strong>PatEmail</strong></a> ' );
|
||||
document.write('<a href="' + window.location.protocol + '//' + window.location.hostname + ':8080' + '" target="new" title="Pat Email Client">PatEmail</a> ' );
|
||||
</script>
|
||||
</td>
|
||||
<td width="100px">
|
||||
<a href="axcall.php" target="new" title="Connect to radio/BBS"><strong>AXCall</strong></a>
|
||||
<a href="axcall.php" target="new" title="Connect to radio/BBS">AXCall</a>
|
||||
</td>
|
||||
<td width="100px">
|
||||
<a href="/js8" target="js8" title="Display JS8Call screen"><strong>JS8Call</strong></a>
|
||||
<td width="100px">
|
||||
<a href="/js8" target="js8" title="Display JS8Call screen">JS8Call</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/ft8" target="ft8" title="Dispaly FT8 screen"><strong>WSJTX FT8</strong>
|
||||
<a href="/ft8" target="ft8" title="Dispaly FT8 screen">WSJTX FT8</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/tv" target="tv" title="Dispaly SSTV screen"><strong>SSTV</strong>
|
||||
<a href="/tv" target="tv" title="Dispaly SSTV screen">SSTV</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/fld" target="fld" title="Display FLDigi screen"><strong>FLDigi</strong></a>
|
||||
<a href="/fld" target="fld" title="Display FLDigi screen">FLDigi</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/wifi.php" title="Setup Wifi connection"><strong>Wifi</strong></a>
|
||||
<a href="/wifi.php" title="Setup Wifi connection">Wifi</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href=/shell.php target="shell" title="Command prompt"><strong>Shell</strong></a>
|
||||
<a href=/shell.php target="shell" title="Command prompt">Shell</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href=/log.php title="Direwolf Log" target="log"><strong>PktLog</strong></a>
|
||||
<a href=/log.php title="Direwolf Log" target="log">PktLog</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<a href=/syslog.php title="System log file" target="syslog"><strong>SysLog</strong></a>
|
||||
<a href=/syslog.php title="System log file" target="syslog">SysLog</a>
|
||||
</td>
|
||||
<td >
|
||||
<a href=/index.php><strong>Refresh</strong></a>
|
||||
<a href=/index.php>Refresh</a>
|
||||
</td>
|
||||
<td colspan="1">
|
||||
<a href=/help.php><strong>Help</strong></a>
|
||||
<a href=/help.php>Help</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if (!file_exists("/var/cache/digipi/localized.txt")) {
|
||||
echo '<tr><td colspan=3><a href="/setup.php" title="REQUIRED! Enter your callsign and other local information" " target="setup"><font color="green"><strong>Initialize</strong></font></a> </td></tr>';
|
||||
echo '<tr><td colspan=3><a href="/setup.php" title="REQUIRED! Enter your callsign and other local information" " target="setup"><font color="green">Initialize</font></a> </td></tr>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
<br/><br/>
|
||||
<table class="bottom-nav">
|
||||
<tr>
|
||||
<td class="bottom-nav">
|
||||
<input type="submit" name="reboot" value="Reboot">
|
||||
</td>
|
||||
<td class="bottom-nav">
|
||||
<input type="submit" name="shutdown" value="Shutdown">
|
||||
</td>
|
||||
<td class="bottom-nav">
|
||||
<input title="Write current application configurations (ft8, js8call, etc) to SD card" type="submit" name="save" value="Save Configs">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/><br/>
|
||||
<input type="submit" name="reboot" value="Reboot">
|
||||
|
||||
<input type="submit" name="shutdown" value="Shutdown">
|
||||
|
||||
<input title="Write current application configurations (ft8, js8call, etc) to SD card" type="submit" name="save" value="Save Configs">
|
||||
|
||||
<br/><br/>
|
||||
<small>1.6-2 KM6LYW ©2022</small>
|
||||
<small>1.6-2 KM6LYW ©2022</small>
|
||||
|
||||
<br/><br/>
|
||||
|
||||
|
@ -631,7 +605,7 @@ $output = shell_exec('sudo systemctl reset-failed js8call 2> /dev/null');
|
|||
if (isset($_POST["reboot"])) {
|
||||
$submit = $_POST["reboot"];
|
||||
if ( $submit == 'Reboot' ) {
|
||||
echo "<br/><br/><strong><font color=red>Restarting DigiPi...</font></strong><br/> ";
|
||||
echo "<br/><br/><font color=red>Restarting DigiPi...</font><br/> ";
|
||||
# if (isset($_SERVER['SERVER_ADDR'])) {
|
||||
# $IP = $_SERVER['SERVER_ADDR'];
|
||||
# }
|
||||
|
@ -639,7 +613,7 @@ if (isset($_POST["reboot"])) {
|
|||
# $IP = "0.0.0.0";
|
||||
# }
|
||||
$output = shell_exec("sudo killall direwatch.py");
|
||||
$output = shell_exec("sudo /home/pi/digibanner.py -b DigiPi -s Rebooting...");
|
||||
$output = shell_exec("sudo /home/pi/digibanner.py -b DigiPi -s Rebooting...");
|
||||
$output = shell_exec("sudo /sbin/shutdown -r 0");
|
||||
echo $output;
|
||||
}
|
||||
|
@ -648,9 +622,9 @@ if (isset($_POST["reboot"])) {
|
|||
if (isset($_POST["shutdown"])) {
|
||||
$submit = $_POST["shutdown"];
|
||||
if ( $submit == 'Shutdown' ) {
|
||||
echo "<br/><br/><strong><font color=red>Shutting down DigiPi...</font></strong><br/> ";
|
||||
echo "<br/><br/><font color=red>Shutting down DigiPi...</font><br/> ";
|
||||
$output = shell_exec("sudo killall direwatch.py");
|
||||
$output = shell_exec("sudo /home/pi/digibanner.py -b Digipi -s Shutdown...");
|
||||
$output = shell_exec("sudo /home/pi/digibanner.py -b Digipi -s Shutdown...");
|
||||
$output = shell_exec("sudo /sbin/shutdown -h 0");
|
||||
echo $output;
|
||||
}
|
||||
|
@ -659,10 +633,10 @@ if (isset($_POST["shutdown"])) {
|
|||
if (isset($_POST["save"])) {
|
||||
$submit = $_POST["save"];
|
||||
if ( $submit == 'Save Configs' ) {
|
||||
echo "<br/><br/><strong><font color=red>Saving configuration...</font></strong><br/> ";
|
||||
echo "<br/><br/><font color=red>Saving configuration...</font><br/> ";
|
||||
$output = shell_exec("sudo -i -u pi /home/pi/saveconfigs.sh");
|
||||
#echo $output;
|
||||
echo "<br/><br/><strong><font color=red>Please reboot or shutdown gracefully.</font></strong><br/> ";
|
||||
echo "<br/><br/><font color=red>Please reboot or shutdown gracefully.</font><br/> ";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -670,10 +644,9 @@ if (isset($_POST["save"])) {
|
|||
|
||||
<br/>
|
||||
<br/>
|
||||
<!-- EASTER EGG -->
|
||||
<a href="/dot"><font size="+3" color="#eeeeee">.</font></a>
|
||||
|
||||
</form>
|
||||
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -2,57 +2,80 @@
|
|||
Base styles
|
||||
------------------------*/
|
||||
|
||||
body
|
||||
{
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 5;
|
||||
color: #333;
|
||||
background-color: #fdfdfd;
|
||||
/* font: 1em/1.2 "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; */
|
||||
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
|
||||
/* font: 1em/1.2 "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; */
|
||||
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
|
||||
|
||||
overflow:initial !important;
|
||||
overflow: initial !important;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5,h6
|
||||
{
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin: 0 0 .5em;
|
||||
font-weight: 500;
|
||||
line-height: 1.1;
|
||||
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
|
||||
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
|
||||
}
|
||||
|
||||
h1 { font-size: 2.25em; } /* 36px */
|
||||
h2 { font-size: 1.75em; } /* 28px */
|
||||
h3 { font-size: 1.375em; } /* 22px */
|
||||
h4 { font-size: 1.125em; } /* 18px */
|
||||
h5 { font-size: 1em; } /* 16px */
|
||||
h6 { font-size: .875em; } /* 14px */
|
||||
h1 {
|
||||
font-size: 2.25em;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
/* 36px */
|
||||
h2 {
|
||||
font-size: 1.75em;
|
||||
}
|
||||
|
||||
/* 28px */
|
||||
h3 {
|
||||
font-size: 1.375em;
|
||||
}
|
||||
|
||||
/* 22px */
|
||||
h4 {
|
||||
font-size: 1.125em;
|
||||
}
|
||||
|
||||
/* 18px */
|
||||
h5 {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* 16px */
|
||||
h6 {
|
||||
font-size: .875em;
|
||||
}
|
||||
|
||||
/* 14px */
|
||||
|
||||
p {
|
||||
margin: 0 0 1.5em;
|
||||
line-height: 1.5;
|
||||
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
|
||||
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
|
||||
}
|
||||
|
||||
div
|
||||
{
|
||||
margin: 0 0 1.5em;
|
||||
line-height: 1.5;
|
||||
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
|
||||
div {
|
||||
margin: 0 0 1.5em;
|
||||
line-height: 1.5;
|
||||
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
|
||||
}
|
||||
|
||||
|
||||
blockquote
|
||||
{
|
||||
blockquote {
|
||||
padding: 1em 2em;
|
||||
margin: 0 0 2em;
|
||||
border-left: 5px solid #eee;
|
||||
}
|
||||
|
||||
hr
|
||||
{
|
||||
hr {
|
||||
height: 0;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 2em;
|
||||
|
@ -60,29 +83,55 @@ hr
|
|||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
table
|
||||
{
|
||||
table {
|
||||
background-color: transparent;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
th, td
|
||||
{
|
||||
th,
|
||||
td {
|
||||
padding: .2em 1em;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #ddd;
|
||||
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
|
||||
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
|
||||
}
|
||||
|
||||
a { text-decoration:none; }
|
||||
a:link { color: royalblue; }
|
||||
a:visited { color: royalblue; }
|
||||
a:focus { color: black; }
|
||||
a:hover { color: green; }
|
||||
a:active { color: red; }
|
||||
table.bottom-nav,
|
||||
.bottom-nav th,
|
||||
.bottom-nav td {
|
||||
background-color: transparent;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: royalblue;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: royalblue;
|
||||
}
|
||||
|
||||
a:focus {
|
||||
color: black;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: green;
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: red;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -90,42 +139,39 @@ a:active { color: red; }
|
|||
Layout styles
|
||||
------------------------*/
|
||||
|
||||
.container
|
||||
{
|
||||
.container {
|
||||
max-width: 70em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.header
|
||||
{
|
||||
.header {
|
||||
color: #fff;
|
||||
background: #999;
|
||||
padding: 1em 1.25em;
|
||||
}
|
||||
|
||||
.header-heading { margin: 0; }
|
||||
.header-heading {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.nav-bar
|
||||
{
|
||||
.nav-bar {
|
||||
background: #000;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.content
|
||||
{
|
||||
.content {
|
||||
/* overflow: hidden; --*/
|
||||
overflow: scroll;
|
||||
padding: 1em 1.25em;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.main, .aside
|
||||
{
|
||||
.main,
|
||||
.aside {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.footer
|
||||
{
|
||||
.footer {
|
||||
color: #fff;
|
||||
background: #000;
|
||||
padding: 1em 1.25em;
|
||||
|
@ -135,21 +181,18 @@ Layout styles
|
|||
Nav
|
||||
------------------------*/
|
||||
|
||||
.nav
|
||||
{
|
||||
.nav {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.nav li
|
||||
{
|
||||
.nav li {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.nav a
|
||||
{
|
||||
.nav a {
|
||||
display: block;
|
||||
padding: .7em 1.25em;
|
||||
color: #fff;
|
||||
|
@ -157,23 +200,25 @@ Nav
|
|||
border-bottom: 1px solid gray;
|
||||
}
|
||||
|
||||
.nav a:link { color: white; }
|
||||
.nav a:visited { color: white; }
|
||||
.nav a:link {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav a:focus
|
||||
{
|
||||
.nav a:visited {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav a:focus {
|
||||
color: black;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.nav a:hover
|
||||
{
|
||||
.nav a:hover {
|
||||
color: white;
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.nav a:active
|
||||
{
|
||||
.nav a:active {
|
||||
color: white;
|
||||
background-color: red;
|
||||
}
|
||||
|
@ -182,10 +227,11 @@ Nav
|
|||
Single styles
|
||||
------------------------*/
|
||||
|
||||
.img-responsive { max-width: 100%; }
|
||||
.img-responsive {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.btn
|
||||
{
|
||||
.btn {
|
||||
color: #fff !important;
|
||||
background-color: royalblue;
|
||||
border-color: #222;
|
||||
|
@ -203,46 +249,39 @@ Single styles
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn:hover
|
||||
{
|
||||
.btn:hover {
|
||||
color: #fff !important;
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.btn:focus
|
||||
{
|
||||
.btn:focus {
|
||||
color: #fff !important;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.btn:active
|
||||
{
|
||||
.btn:active {
|
||||
color: #fff !important;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.table
|
||||
{
|
||||
.table {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.list-unstyled
|
||||
{
|
||||
.list-unstyled {
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.list-inline
|
||||
{
|
||||
.list-inline {
|
||||
padding-left: 0;
|
||||
margin-left: -5px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.list-inline > li
|
||||
{
|
||||
.list-inline>li {
|
||||
display: inline-block;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
|
@ -252,39 +291,44 @@ Single styles
|
|||
Wide styles
|
||||
------------------------*/
|
||||
|
||||
@media (min-width: 55em)
|
||||
{
|
||||
.header { padding: 1.5em 3em; }
|
||||
.nav-bar { padding: 1em 3em; }
|
||||
.content { padding: 2em 3em; }
|
||||
@media (min-width: 55em) {
|
||||
.header {
|
||||
padding: 1.5em 3em;
|
||||
}
|
||||
|
||||
.main
|
||||
{
|
||||
.nav-bar {
|
||||
padding: 1em 3em;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 2em 3em;
|
||||
}
|
||||
|
||||
.main {
|
||||
float: left;
|
||||
width: 65%;
|
||||
margin-right: 5%;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.aside
|
||||
{
|
||||
.aside {
|
||||
float: left;
|
||||
width: 30%;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.footer { padding: 2em 3em; }
|
||||
|
||||
.nav li
|
||||
{
|
||||
.footer {
|
||||
padding: 2em 3em;
|
||||
}
|
||||
|
||||
.nav li {
|
||||
display: inline;
|
||||
margin: 0 1em 0 0;
|
||||
}
|
||||
|
||||
.nav a
|
||||
{
|
||||
|
||||
.nav a {
|
||||
display: inline;
|
||||
padding: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
Ładowanie…
Reference in New Issue