* Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2011 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 2 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/webservices/admin/webservices.php * \ingroup webservices * \brief Page to setup webservices module */ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $langs->load("admin"); if (! $user->admin) accessforbidden(); $actionsave=GETPOST("save"); $mesg=''; // Sauvegardes parametres if ($actionsave) { $i=0; $db->begin(); $i+=dolibarr_set_const($db,'WEBSERVICES_KEY',trim(GETPOST("WEBSERVICES_KEY")),'chaine',0,'',$conf->entity); if ($i >= 1) { $db->commit(); $mesg = "".$langs->trans("SetupSaved").""; } else { $db->rollback(); $mesg = "".$langs->trans("Error").""; } } /* * View */ llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("WebServicesSetup"),$linkback,'setup'); print $langs->trans("WebServicesDesc")."
\n"; print "
\n"; 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("KeyForWebServicesAccess").' 
'; print '
'; print ''; print '
'; print '
'; dol_htmloutput_mesg($mesg); print '

'; // WSDL print ''.$langs->trans("WSDLCanBeDownloadedHere").':
'; $url=DOL_MAIN_URL_ROOT.'/webservices/server_other.php?wsdl'; print img_picto('','object_globe.png').' '.$url."
\n"; if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { $url=DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php?wsdl'; print img_picto('','object_globe.png').' '.$url."
\n"; } if (! empty($conf->societe->enabled)) { $url=DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php?wsdl'; print img_picto('','object_globe.png').' '.$url."
\n"; } if (! empty($conf->facture->enabled)) { $url=DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php?wsdl'; print img_picto('','object_globe.png').' '.$url."
\n"; } if (! empty($conf->fournisseur->enabled)) { $url=DOL_MAIN_URL_ROOT.'/webservices/server_supplier_invoice.php?wsdl'; print img_picto('','object_globe.png').' '.$url."
\n"; } print '
'; // Endpoint print ''.$langs->trans("EndPointIs").':
'; $url=DOL_MAIN_URL_ROOT.'/webservices/server_other.php'; print img_picto('','object_globe.png').' '.$url."
\n"; if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { $url=DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php'; print img_picto('','object_globe.png').' '.$url."
\n"; } if (! empty($conf->societe->enabled)) { $url=DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php'; print img_picto('','object_globe.png').' '.$url."
\n"; } if (! empty($conf->facture->enabled)) { $url=DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php'; print img_picto('','object_globe.png').' '.$url."
\n"; } if (! empty($conf->fournisseur->enabled)) { $url=DOL_MAIN_URL_ROOT.'/webservices/server_supplier_invoice.php'; print img_picto('','object_globe.png').' '.$url."
\n"; } print '
'; print '
'; print $langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php'); $db->close(); llxFooter(); ?>