true]); } else { unset($allAutoStart[$key]); if ($json) echo json_encode(['autostart' => false]); } file_put_contents($autostart_file, implode(PHP_EOL, $allAutoStart).(count($allAutoStart)? PHP_EOL : "")); } if ($_POST['#action'] == "templates" ){ readfile("$docroot/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(['is_dir' => is_dir($_GET['is_dir'])]); } ?>