about.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. /* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2019 Frédéric FRANCE <frederic.france@free.fr>
  4. *
  5. *
  6. * LICENSE =================================================================
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. /**
  23. * \file htdocs/zapier/admin/about.php
  24. * \ingroup zapier
  25. * \brief About page of module Zapier.
  26. */
  27. // Load Dolibarr environment
  28. require '../../main.inc.php';
  29. // Libraries
  30. require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
  31. require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  32. require_once '../lib/zapier.lib.php';
  33. // Translations
  34. $langs->loadLangs(array('admin', 'errors', 'zapier'));
  35. // Access control
  36. if (!$user->admin) {
  37. accessforbidden();
  38. }
  39. if (empty($conf->zapier->enabled)) accessforbidden();
  40. if (empty($user->admin)) accessforbidden();
  41. // Parameters
  42. $action = GETPOST('action', 'aZ09');
  43. $backtopage = GETPOST('backtopage', 'alpha');
  44. /*
  45. * Actions
  46. */
  47. // None
  48. /*
  49. * View
  50. */
  51. $form = new Form($db);
  52. $page_name = "ZapierAbout";
  53. $help_url = 'EN:Module_Zapier';
  54. llxHeader('', $langs->trans($page_name), $help_url);
  55. // Subheader
  56. $linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>';
  57. print load_fiche_titre($langs->trans($page_name), $linkback, 'object_zapier');
  58. // Configuration header
  59. $head = zapierAdminPrepareHead();
  60. print dol_get_fiche_head($head, 'about', '', 0, 'zapier');
  61. dol_include_once('/core/modules/modZapier.class.php');
  62. $tmpmodule = new modZapier($db);
  63. print $tmpmodule->getDescLong();
  64. // Page end
  65. print dol_get_fiche_end();
  66. llxFooter();
  67. $db->close();