about.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /* Copyright (C) 2011-2021 Regis Houssin <regis.houssin@inodbox.com>
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. /**
  18. * \file /multicompany/admin/about.php
  19. * \ingroup multicompany
  20. * \brief About Page
  21. */
  22. $res=@include("../../main.inc.php"); // For root directory
  23. if (empty($res) && file_exists($_SERVER['DOCUMENT_ROOT']."/main.inc.php")) {
  24. $res=@include($_SERVER['DOCUMENT_ROOT']."/main.inc.php"); // Use on dev env only
  25. }
  26. if (empty($res)) {
  27. $res=@include("../../../main.inc.php"); // For "custom" directory
  28. }
  29. // Libraries
  30. dol_include_once('/multicompany/lib/multicompany.lib.php');
  31. dol_include_once('/multicompany/lib/PHP_Markdown/Michelf/Markdown.inc.php');
  32. // Translations
  33. $langs->loadLangs(array('admin', 'multicompany@multicompany'));
  34. // Security check
  35. if (empty($user->admin) || !empty($user->entity)) {
  36. accessforbidden();
  37. }
  38. /*
  39. * View
  40. */
  41. $help_url='EN:Module_MultiCompany|FR:Module_MultiSoci&eacute;t&eacute;';
  42. llxHeader('', $langs->trans("Module5000Name"), $help_url);
  43. // Subheader
  44. $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
  45. print load_fiche_titre($langs->trans("MultiCompanySetup"), $linkback, 'multicompany@multicompany',0,'multicompany_title');
  46. // Configuration header
  47. $head = multicompany_prepare_head();
  48. dol_fiche_head($head, 'about', $langs->trans("Module5000Name"));
  49. // About page goes here
  50. $buffer = file_get_contents(dol_buildpath('/multicompany/README.md',0));
  51. use Michelf\Markdown;
  52. print Markdown::defaultTransform($buffer);
  53. print '<br>';
  54. $url = 'https://www.inodbox.com/';
  55. $link = '<a href="'.$url.'" target="_blank">iNodbox</a>';
  56. print $langs->transnoentities("MulticompanyMoreModules", $link).'<br><br>';
  57. print '<a href="'.$url.'" target="_blank"><img border="0" width="180" src="'.dol_buildpath('/multicompany/img/inodbox.png',1).'"></a>';
  58. print '<br><br><br>';
  59. print '<a target="_blank" href="'.dol_buildpath('/multicompany/COPYING',1).'"><img src="'.dol_buildpath('/multicompany/img/gplv3.png',1).'"/></a>';
  60. dol_fiche_end();
  61. llxFooter();
  62. $db->close();