* Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2011-2012 Juanjo Menent * * 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/externalsite/admin/externalsite.php * \ingroup externalsite * \brief Page de configuration du module externalsite */ if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check anti CSRF attack test require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; if (!$user->admin) accessforbidden(); // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'externalsite')); $def = array(); $action = GETPOST('action', 'alpha'); // Sauvegardes parametres if ($action == 'update') { $i=0; $db->begin(); $label = GETPOST('EXTERNALSITE_LABEL', 'alpha'); $exturl = GETPOST('EXTERNALSITE_URL', 'none'); $i+=dolibarr_set_const($db, 'EXTERNALSITE_LABEL', trim($label), 'chaine', 0, '', $conf->entity); $i+=dolibarr_set_const($db, 'EXTERNALSITE_URL', trim($exturl), 'chaine', 0, '', $conf->entity); if ($i >= 2) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); setEventMessages($db->lasterror(), null, 'errors'); } } /** * View */ llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ExternalSiteSetup"), $linkback, 'title_setup'); print '
'; print $langs->trans("Module100Desc")."
\n"; print '
'; print '
'; print ''; print ''; print ""; print ""; print ""; print ""; print ""; print ""; print ''; print '"; print ""; print ""; print ""; print ''; print '"; print ''; print ""; print ""; print "
".$langs->trans("Parameter")."".$langs->trans("Value")."".$langs->trans("Examples")."
'.$langs->trans("Label")."global->EXTERNALSITE_LABEL) || $conf->global->EXTERNALSITE_LABEL=='ExternalSite')?'':$conf->global->EXTERNALSITE_LABEL)) . "\" size=\"12\">".$langs->trans("ExampleMyMenuEntry")."
'.$langs->trans("ExternalSiteURL")."http://localhost/myurl/"; print "
https://wikipedia.org/"; print "
<iframe>...</iframe>"; print "
"; print '
'; print ''; print '
'; print "
\n"; llxFooter(); $db->close();