';
}
else {
// Page title
echo dcPage::breadcrumb(
array(
__('Plugins') => '',
''.__('Maintenance').'' => ''
)
);
// Simple task (with only a button to start it)
foreach($maintenance->getTabs() as $tab_id => $tab_name)
{
$res_group = '';
foreach($maintenance->getGroups($core) as $group_id => $group_name)
{
$res_task = '';
foreach($maintenance->getTasks($core) as $t)
{
if ($t->group() != $group_id || $t->tab() != $tab_id) {
continue;
}
$res_task .=
'
'.form::radio(array('task', $t->id()), $t->id()).' '.
'';
if (array_key_exists($t->id(), $expired)) {
$res_task .=
' '.sprintf(
__('Last execution of this task was on %s. You should execute it again.'),
dt::dt2str(__('%Y-%m-%d %H:%M'), $expired[$t->id()])
).'';
}
$res_task .= '
';
}
if (!empty($res_task)) {
$res_group .=
'
'.
'
'.$group_name.'
'.
$res_task.
'
';
}
}
if (!empty($res_group)) {
echo
'
'.
'
'.$tab_name.'
'.
''.
'
';
}
}
// Advanced tasks (that required a tab)
foreach($maintenance->getTasks($core) as $t)
{
if ($t->group() !== null) {
continue;
}
echo
'