index.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2011 Regis Houssin <regis.houssin@inodbox.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. */
  18. /**
  19. * \file htdocs/webservices/server_invoice.php
  20. * \brief File that is entry point to call Dolibarr WebServices
  21. */
  22. // This is to make Dolibarr working with Plesk
  23. set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
  24. require_once '../master.inc.php';
  25. require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP
  26. require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
  27. $langs->load("admin");
  28. /*
  29. * View
  30. */
  31. dol_syslog("Call Dolibarr webservices interfaces");
  32. // Enable and test if module web services is enabled
  33. if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) {
  34. $langs->load("admin");
  35. dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled");
  36. print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>';
  37. print $langs->trans("ToActivateModule");
  38. exit;
  39. }
  40. // WSDL
  41. print 'List of available SOAP Web services is visible on the setup area, setup page of module WebService SOAP.';
  42. $db->close();