spdxl/www-sq7br/conf.php

19 wiersze
600 B
PHP
Czysty Zwykły widok Historia

2018-03-26 23:01:29 +00:00
<?php
if (array_key_exists("config",$_POST)){
file_put_contents("conf/dxl_config.sh",str_replace("\r\n","\n",$_POST["config"]));
}
if (array_key_exists("restart",$_POST)){
touch("/tmp/restart_dxl");
}
2018-03-26 23:01:29 +00:00
print("<form method='POST'>");
print("<textarea name='config' cols='80' rows='20'>");
print(file_get_contents("conf/dxl_config.sh"));
print("</textarea>");
print("<input type='submit' name='save_config' value='SAVE'>");
print("<input type='submit' name='restart' value='SAVE & RESTART'>");
2018-03-26 23:01:29 +00:00
print("</form>");
print("<pre>");
@print(file_get_contents("/tmp/restart_log"));
print("</pre>");
2018-03-26 23:01:29 +00:00
?>