* Copyright (C) 2005-2009 Laurent Destailleur * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** \file htdocs/bookmarks/admin/bookmark.php * \ingroup bookmark * \brief Page to setup bookmark module */ // Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; /** * @var Conf $conf * @var DoliDB $db * @var HookManager $hookmanager * @var Translate $langs * @var User $user */ // Load translation files required by the page $langs->load("admin"); if (!$user->admin) { accessforbidden(); } $action = GETPOST('action', 'aZ09'); /* * Actions */ $error = 0; if ($action == 'setvalue') { $showmenu = GETPOST('BOOKMARKS_SHOW_IN_MENU', 'alpha'); $res = dolibarr_set_const($db, "BOOKMARKS_SHOW_IN_MENU", $showmenu, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { $error++; } if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); } } /* * View */ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-bookmarks page-admin_bookmark'); $linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BookmarkSetup"), $linkback, 'title_setup'); print $langs->trans("BookmarkDesc")."
\n"; print '
'; print '
'; print ''; print ''; print ''; print ''; print ''; print ''; print "\n"; print ''; print '
'.$langs->trans("Name").''.$langs->trans("Value").'
'; print $langs->trans("NbOfBoomarkToShow").''; print ''; print '

'; // End of page llxFooter(); $db->close();