* 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 */ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; if (!$user->admin) accessforbidden(); $langs->load("admin"); $langs->load("other"); $langs->load("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','alpha'); $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); //$i+=dolibarr_set_const($db,'EXTERNALSITE_LABEL',trim($_POST["EXTERNALSITE_LABEL"]),'chaine',0,'',$conf->entity); if ($i >= 2) { $db->commit(); setEventMessage($langs->trans("SetupSaved")); } else { $db->rollback(); setEventMessage($db->lasterror(), 'errors'); } } /** * View */ llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("ExternalSiteSetup"),$linkback,'title_setup'); print '
'; print $langs->trans("Module100Desc")."
\n"; print '
'; print '
'; print ''; print ''; print ""; print ""; print ""; print ""; print ""; print ""; $var=true; $var=!$var; print ""; print '"; print ""; print ""; print ""; $var=!$var; 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")."global->EXTERNALSITE_URL)?'':$conf->global->EXTERNALSITE_URL)) . "\" size=\"40\">http://localhost/myurl/"; print "
http://wikipedia.org/"; print "
"; print '
'; print ''; print '
'; print "
\n"; llxFooter(); $db->close();