restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('Module administration') . ' — ' . WT_I18N::translate('Reports')) ->pageHeader(); $modules=WT_Module::getActiveReports(WT_GED_ID, WT_PRIV_HIDE); $action = WT_Filter::post('action'); if ($action=='update_mods' && WT_Filter::checkCsrf()) { foreach ($modules as $module_name=>$module) { foreach (WT_Tree::getAll() as $tree) { $value = WT_Filter::post("reportaccess-{$module_name}-{$tree->tree_id}", WT_REGEX_INTEGER, $module->defaultAccessLevel()); WT_DB::prepare( "REPLACE INTO `##module_privacy` (module_name, gedcom_id, component, access_level) VALUES (?, ?, 'report', ?)" )->execute(array($module_name, $tree->tree_id, $value)); } } } ?>

getPageTitle(); ?>

$module) { ?>
getTitle(); ?> getDescription(); ?> tree_id; $access_level=WT_DB::prepare( "SELECT access_level FROM `##module_privacy` WHERE gedcom_id=? AND module_name=? AND component='report'" )->execute(array($tree->tree_id, $module_name))->fetchOne(); if ($access_level===null) { $access_level=$module->defaultAccessLevel(); } echo '
', $tree->tree_title_html, ''; echo edit_field_access_level($varname, $access_level); } ?>