diff --git a/html/changeconf.php b/html/changeconf.php index 1cf1385..0b9de44 100755 --- a/html/changeconf.php +++ b/html/changeconf.php @@ -149,23 +149,68 @@ if (isset($msg)) { echo "\r\n"; } } elseif ($msg == "stations") { - echo "New stations list:\r\n"; - $stations = $_POST['stations']; - if ($stations[0] == "#") { - $stations = "\r\n".$stations; + $option = $_POST['submit']; + if ($option == "new") { + echo "New stations list:\r\n"; + $stations = $_POST['stations']; + if ($stations[0] == "#") { + $stations = "\r\n".$stations; + } + $stations_tmp = preg_replace("/\n#.*/", "", $stations); + echo "
".htmlspecialchars($stations_tmp).""; + file_put_contents('/var/lib/radiod/stationlist_new', $stations); + chmod("/var/lib/radiod/stationlist_new", 0755); + echo "\r\n"; + echo '