set_prefilter('maintenance', 'plugrlPT'); $template->assign( array( 'U_RESETLEVEL' => $admin_base_url . '&resetlevel&pwg_token='.get_pwg_token(), )); } function plugrlPT($content, &$smarty){ $search = '# #'; $replacement = '
'; return preg_replace($search, $replacement, $content); } function plugrlaction(){ if (isset($_GET['resetlevel'])){ //$admin_base_url=explode('&resetlevel', $_SERVER['REQUEST_URI']); $query = 'UPDATE ' . IMAGES_TABLE . ' SET level= \'0\';'; $result = pwg_query($query); invalidate_user_cache(); $_SESSION['page_infos'] = array(l10n('delle_totalok')); redirect(get_root_url().'admin.php?page=maintenance'); } }