} dcPage::addSuccessNotice(__('Maintenance plugin has been successfully configured.')); http::redirect($p_url . '&tab=' . $tab . '#' . $tab); } catch (Exception $e) { $core->error->add($e->getMessage()); } } // Combos $combo_ts = array(__('Never') => 0, __('Every week') => 604800, __('Every two weeks') => 1209600, __('Every month') => 2592000, __('Every two months') => 5184000); // Display page echo '<html><head> <title>' . __('Maintenance') . '</title>' . dcPage::jsPageTabs($tab) . dcPage::jsLoad(dcPage::getPF('maintenance/js/settings.js')); if ($task && $task->ajax()) { echo '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . dcPage::jsVar('dotclear.msg.wait', __('Please wait...')) . "//]]>\n" . '</script>' . dcPage::jsLoad(dcPage::getPF('maintenance/js/dc.maintenance.js')); } echo $maintenance->getHeaders() . ' </head> <body>'; // Check if there is somthing to display according to user permissions if (empty($tasks)) { echo dcPage::breadcrumb(array(__('Plugins') => '', __('Maintenance') => '')) . '<p class="warn">' . __('You have not sufficient permissions to view this page.') . '</p>' . '</body></html>'; return null; } if ($task && ($res = $task->step()) !== null) { // Page title echo dcPage::breadcrumb(array(__('Plugins') => '', '<a href="' . $p_url . '">' . __('Maintenance') . '</a>' => '', html::escapeHTML($task->name()) => '')) . dcPage::notices(); // content if (substr($res, 0, 1) != '<') { $res = sprintf('<p class="step-msg">%s</p>', $res); } // Intermediate task (task required several steps)