Container::getRouter()->generate('administration'),'name' => get_lang('PlatformAdmin')); $form = new FormValidator('archive_cleanup_form', 'post', '', '', array(), FormValidator::LAYOUT_BOX); $form->addButtonSend(get_lang('ArchiveDirCleanupProceedButton')); if ($form->validate()) { $archive_path = api_get_path(SYS_ARCHIVE_PATH); $htaccess = @file_get_contents($archive_path.'.htaccess'); $result = rmdirr($archive_path, true, true); \Chamilo\CoreBundle\Composer\ScriptHandler::dumpCssFiles(); if (!empty($htaccess)) { @file_put_contents($archive_path.'/.htaccess', $htaccess); } if ($result) { Display::addFlash(Display::return_message(get_lang('ArchiveDirCleanupSucceeded'))); } else { Display::addFlash(Display::return_message(get_lang('ArchiveDirCleanupFailed'), 'error')); } header('Location: '.api_get_self()); exit; } Display::display_header(get_lang('ArchiveDirCleanup')); Display::display_warning_message(get_lang('ArchiveDirCleanupDescr')); $form->display(); Display::display_footer();