You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

about.php 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. /* <one line to give the program's name and a brief idea of what it does.>
  3. * Copyright (C) <year> <name of author>
  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 admin/about.php
  20. * \ingroup mymodule
  21. * \brief This file is an example about page
  22. * Put some comments here
  23. */
  24. // Dolibarr environment
  25. $res = @include("../../main.inc.php"); // From htdocs directory
  26. if (! $res) {
  27. $res = @include("../../../main.inc.php"); // From "custom" directory
  28. }
  29. // Libraries
  30. require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
  31. require_once '../lib/mymodule.lib.php';
  32. dol_include_once('/mymodule/lib/php-markdown/markdown.php');
  33. //require_once "../class/myclass.class.php";
  34. // Translations
  35. $langs->load("mymodule@mymodule");
  36. // Access control
  37. if (! $user->admin) {
  38. accessforbidden();
  39. }
  40. // Parameters
  41. $action = GETPOST('action', 'alpha');
  42. /*
  43. * Actions
  44. */
  45. /*
  46. * View
  47. */
  48. $page_name = "MyModuleAbout";
  49. llxHeader('', $langs->trans($page_name));
  50. // Subheader
  51. $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">'
  52. . $langs->trans("BackToModuleList") . '</a>';
  53. print_fiche_titre($langs->trans($page_name), $linkback);
  54. // Configuration header
  55. $head = mymoduleAdminPrepareHead();
  56. dol_fiche_head(
  57. $head,
  58. 'about',
  59. $langs->trans("Module10000Name"),
  60. 0,
  61. 'mymodule@mymodule'
  62. );
  63. // About page goes here
  64. echo $langs->trans("MyModuleAboutPage");
  65. echo '<br>';
  66. $buffer = file_get_contents(dol_buildpath('/mymodule/README.md', 0));
  67. echo Markdown($buffer);
  68. echo '<br>',
  69. '<a href="' . dol_buildpath('/mymodule/COPYING', 1) . '">',
  70. '<img src="' . dol_buildpath('/mymodule/img/gplv3.png', 1) . '"/>',
  71. '</a>';
  72. llxFooter();
  73. $db->close();