assign("DEF_TIME", $VAR['default_time']); if (empty($VAR['misc_dir'])) { erreur("Please add misc_dir variable into root.xml configuration."); return "admin/home"; } $misc_dir = $VAR['misc_dir']; if (!is_dir("$misc_dir/shared") || !is_writable("$misc_dir/shared")) erreur("$misc_dir/shared/ directory not writable."); $template->assign("cert_writable", is_writable("$misc_dir/shared/") && is_writable("$misc_dir/PKI/")); $ca_file = "$misc_dir/shared/cacert.crt"; if (file_exists($ca_file)) { if (!is_readable($ca_file)) erreur("Impossible de lire le fichier"); else $template->assign("cert_CA", openssl_x509_parse(file_get_contents($ca_file))); } $srv_file = "$misc_dir/shared/server.crt"; if (file_exists($srv_file)) { if (!is_readable($srv_file)) erreur("Impossible de lire le fichier"); else $template->assign("cert_srv", openssl_x509_parse(file_get_contents($srv_file))); } /* GENERATION */ $queue = explode("\n", pipe_backend_scheduler("show")); unset($queue[0], $queue[1]); $template->assign("queue", array_filter($queue, function($var){ return !empty($var); })); return "admin/home";