foreach ($prefs_fields as $fieldname) { $pref[$fieldname] = $preferences->{$fieldname}; } } //List available themes $themes = array(); $d = dir(GALETTE_TEMPLATES_PATH); while (($entry = $d->read()) !== false) { $full_entry = GALETTE_TEMPLATES_PATH . $entry; if ($entry != '.' && $entry != '..' && is_dir($full_entry) && file_exists($full_entry . '/page.tpl')) { $themes[] = $entry; } } $d->close(); $m = new Galette\Repository\Members(); $tpl->assign('staff_members', $m->getStaffMembersList(true)); $tpl->assign('time', time()); $tpl->assign('pref', $pref); $tpl->assign('pref_numrows_options', array(10 => '10', 20 => '20', 50 => '50', 100 => '100')); $tpl->assign('page_title', _T("Settings")); $tpl->assign('print_logo', $print_logo); $tpl->assign('required', $required); $tpl->assign('languages', $i18n->getList()); $tpl->assign('themes', $themes); $tpl->assign('error_detected', $error_detected); $tpl->assign('warning_detected', $warning_detected); $tpl->assign('success_detected', $success_detected); $tpl->assign('require_tabs', true); $tpl->assign('color_picker', true); // page generation $content = $tpl->fetch('preferences.tpl');