notice.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /* Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
  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 htdocs/public/notice.php
  19. * \brief Dolibarr page to show a notice.
  20. * Default notice is a message to say network connection is off.
  21. * You can also call this page with URL:
  22. * /public/notice.php?lang=xx_XX&transkey=translation_key (key must be inside file main.lang, error.lang or other.lang)
  23. * /public/notice.php?transphrase=url_encoded_sentence_to_show
  24. */
  25. define('NOCSRFCHECK',1);
  26. define('NOLOGIN',1);
  27. require '../main.inc.php';
  28. /**
  29. * View
  30. */
  31. if (! GETPOST('transkey','alphanohtml') && ! GETPOST('transphrase','alphanohtml'))
  32. {
  33. print 'Sorry, it seems your internet connexion is off.<br>';
  34. print 'You need to be connected to network to use this software.<br>';
  35. }
  36. else
  37. {
  38. $langs->load("error");
  39. $langs->load("other");
  40. if (GETPOST('transphrase','alphanohtml')) print GETPOST('transphrase','alphanohtml');
  41. if (GETPOST('transkey','alphanohtml')) print $langs->trans(GETPOST('transkey','alphanohtml'));
  42. }