get() as $k) { $select_menu[$k->name] = $k->id; if ($k->id == $_REQUEST['part']) { $cleaner = $k; } } if (!$cleaner) { if (!($cleaner = $ac->get('caches', true))) { return false; } } # Actions if (!empty($_POST['entries']) && !empty($_POST['action'])) { try { foreach ($_POST['entries'] as $ns) { $ac->set($cleaner->id, $_POST['action'], $ns); } dcAdminNotices::addSuccessNotice(__('Action successfuly excecuted')); dcCore::app()->adminurl->redirect( 'admin.plugin.dcAdvancedCleaner', ['part' => $cleaner->id] ); } catch (Exception $e) { dcCore::app()->error->add($e->getMessage()); } } # Display echo '' . __('Advanced cleaner') . '' . dcPage::cssLoad(dcPage::getPF('dcAdvancedCleaner/style.css')) . dcPage::jsLoad(dcPage::getPF('dcAdvancedCleaner/js/index.js')); # --BEHAVIOR-- dcAdvancedCleanerAdminHeader dcCore::app()->callBehavior('dcAdvancedCleanerAdminHeader'); echo '' . dcPage::breadcrumb([ __('Plugins') => '', __('Advanced cleaner') => '', ]) . dcPage::notices() . '
' . '

' . form::combo('part', $select_menu, $cleaner->id) . ' ' . '' . form::hidden('p', 'dcAdvancedCleaner') . '

' . '
' . '

' . $cleaner->name . '

' . $cleaner->desc . '

'; $rs = $cleaner->get(); if (empty($rs)) { echo '

' . __('There is nothing to display') . '

'; } else { echo '
' . '
' . '' . '' . ''; foreach ($rs as $k => $v) { $offline = in_array($v['key'], $cleaner->official()); if ($offline && dcCore::app()->blog->settings->dcAdvancedCleaner->dcAdvancedCleaner_dcproperty_hide) { continue; } echo '' . ' ' . '' . '' . ''; } echo '
' . sprintf(__('There are %s %s'), count($rs), __($cleaner->id)) . '
' . __('Name') . '' . __('Objects') . '
' . form::checkbox( ['entries[' . $k . ']', 'entries_' . $k], html::escapeHTML($v['key']) ) . '' . $v['value'] . '
' . '

' . __('Action on selected rows:') . ' ' . form::combo(['action'], array_flip($cleaner->getActions())) . '' . form::hidden(['p'], 'dcAdvancedCleaner') . form::hidden(['part'], $cleaner->id) . dcCore::app()->formNonce() . '

' . '

' . __('Beware: All actions done here are irreversible and are directly applied') . '

' . '
'; } if (dcCore::app()->blog->settings->dcAdvancedCleaner->dcAdvancedCleaner_dcproperty_hide) { echo '

' . __('Default values of Dotclear are hidden. You can change this in settings') . '

'; } dcPage::helpBlock('dcAdvancedCleaner'); echo '';