true )); } else { unset($allAutoStart[$key]); if ($json) echo json_encode(array( 'autostart' => false )); } file_put_contents($autostart_file, implode(PHP_EOL, $allAutoStart).(count($allAutoStart)? PHP_EOL : "")); } if ($_POST['#action'] == "templates" ){ readfile("/usr/local/emhttp/update.htm"); $repos = $_POST['template_repos']; file_put_contents($template_repos, $repos); $DockerTemplates = new DockerTemplates(); $DockerTemplates->downloadTemplates(); } if ( isset($_GET['is_dir'] )) { echo json_encode( array( 'is_dir' => is_dir( $_GET['is_dir'] ))); } ?>