PageRenderTime 45ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/htdocs/webservices/index.php

https://bitbucket.org/speedealing/speedealing
PHP | 105 lines | 62 code | 16 blank | 27 comment | 7 complexity | 098e05144a38704d2f957ceaf2e62459 MD5 | raw file
Possible License(s): LGPL-3.0, LGPL-2.1, GPL-3.0, MIT
  1. <?php
  2. /* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.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 <http://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. {
  35. $langs->load("admin");
  36. dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled");
  37. print $langs->trans("WarningModuleNotActive",'WebServices').'.<br><br>';
  38. print $langs->trans("ToActivateModule");
  39. exit;
  40. }
  41. // WSDL
  42. print '<u>'.$langs->trans("WSDLCanBeDownloadedHere").':</u><br>';
  43. $url=DOL_MAIN_URL_ROOT.'/webservices/server_other.php?wsdl';
  44. print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
  45. if (! empty($conf->societe->enabled))
  46. {
  47. $url=DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php?wsdl';
  48. print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
  49. }
  50. if (! empty($conf->facture->enabled))
  51. {
  52. $url=DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php?wsdl';
  53. print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
  54. }
  55. if (! empty($conf->fournisseur->enabled))
  56. {
  57. $url=DOL_MAIN_URL_ROOT.'/webservices/server_supplier_invoice.php?wsdl';
  58. print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
  59. }
  60. $url=DOL_MAIN_URL_ROOT.'/webservices/server_user.php?wsdl';
  61. print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
  62. print '<br>';
  63. // Endpoint
  64. print '<u>'.$langs->trans("EndPointIs").':</u><br>';
  65. $url=DOL_MAIN_URL_ROOT.'/webservices/server_other.php';
  66. print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
  67. if (! empty($conf->societe->enabled))
  68. {
  69. $url=DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php';
  70. print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
  71. }
  72. if (! empty($conf->facture->enabled))
  73. {
  74. $url=DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php';
  75. print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
  76. }
  77. if (! empty($conf->fournisseur->enabled))
  78. {
  79. $url=DOL_MAIN_URL_ROOT.'/webservices/server_supplier_invoice.php';
  80. print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
  81. }
  82. $url=DOL_MAIN_URL_ROOT.'/webservices/server_user.php';
  83. print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
  84. print '<br>';
  85. print '<br>';
  86. print 'NUSoap library path used by Dolibarr: ' . NUSOAP_PATH . '<br>';
  87. print '<br>';
  88. $db->close();
  89. ?>