diff --git a/html/changeconf.php b/html/changeconf.php index 36b0e15..bff3349 100755 --- a/html/changeconf.php +++ b/html/changeconf.php @@ -13,11 +13,54 @@ $msg = $_GET['file']; if (isset($msg)) { if ($msg == "restart") { - $end = "xxx"; + $end = shell_exec('sudo ./scripts/restart.sh'); + echo "PiRadio restart in progress.
\r\n"; + echo "\r\n"; + } elseif ($msg == "reboot") { + $end = shell_exec('sudo ./scripts/reboot.sh'); + /* UWAGA! Folder z plikami uruchamianymi przez sudo + musi byc dopisany w pliku /etc/sudoers */ + echo "Reboot in progress.
\r\n"; + echo "Wait!
\r\n"; + echo "\r\n"; + } elseif ($msg == "audio") { + echo "Not implemented..."; } elseif ($msg == "stations") { echo "Not implemented..."; } elseif ($msg == "network") { echo "Not implemented..."; + } elseif ($msg == "update") { + $confirmation = $_POST["submit"]; + if ($confirmation == "yes") { + echo "Update from github in progress.
"; + $end = shell_exec('sudo ./scripts/make_tmp.sh'); + $end = shell_exec('sudo ./scripts/tmp_upd.sh'); + echo "Wait!
\r\n"; + echo "\r\n"; + } else { + echo "Update from github canceled.
\r\n"; + echo "\r\n"; + } } elseif ($msg == "rss") { $rss_link = $_POST["rss_link"]; file_put_contents('/var/lib/radiod/rss', $rss_link); @@ -70,6 +113,6 @@ if (isset($msg)) { } ?>
- - + + diff --git a/html/config.php b/html/config.php index 972c00b..30ec00e 100755 --- a/html/config.php +++ b/html/config.php @@ -1,15 +1,3 @@ - @@ -61,6 +49,7 @@ echo '
'; +
Media network folder config
@@ -117,6 +106,6 @@ echo '';

- - + + diff --git a/html/hconfig.php b/html/hconfig.php new file mode 100644 index 0000000..d060b35 --- /dev/null +++ b/html/hconfig.php @@ -0,0 +1,26 @@ + + + + + + + PiRadio mini web interface - hardware config page + + +PiRadio
config

+
+Audio device config
+
+
+   internal audio
+   USB audio card
+ +
+
+
+Update to last build from github + +
+ + + diff --git a/html/update.html b/html/update.html new file mode 100644 index 0000000..418ff7d --- /dev/null +++ b/html/update.html @@ -0,0 +1,19 @@ + + + + + + + PiRadio mini web interface - update confirm + + +PiRadio
config

+
+Update to last build from github

+Do you really want to update your PiRadio from github repository.
+After update your PiRadio will be rebooted! +
+ + +
+