--- /tmp/dsg/dolibarr/htdocs/public/github_19.0.3_notice.php +++ /tmp/dsg/dolibarr/htdocs/public/client_notice.php @@ -2 +2 @@ -/* Copyright (C) 2016-2021 Laurent Destailleur +/* Copyright (C) 2016-2020 Laurent Destailleur @@ -20,4 +20,5 @@ - * \brief Dolibarr public page to show a notice. - * Default notice is a message to say network connection is off. Some parameters can be used to show another message: - * /public/notice.php?lang=xx_XX&transkey=translation_key (key must be inside file main.lang, error.lang or other.lang) - * /public/notice.php?transphrase=sentence_to_show + * \brief Dolibarr page to show a notice. + * Default notice is a message to say network connection is off. + * You can also call this page with URL: + * /public/notice.php?lang=xx_XX&transkey=translation_key (key must be inside file main.lang, error.lang or other.lang) + * /public/notice.php?transphrase=url_encoded_sentence_to_show @@ -26,15 +27,3 @@ -if (!defined('NOLOGIN')) { - define("NOLOGIN", 1); // This means this output page does not require to be logged. -} -if (!defined('NOCSRFCHECK')) { - define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -} -if (!defined('NOIPCHECK')) { - define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -} -if (!defined('NOSESSION')) { - define('NOSESSION', '1'); -} -if (!defined('NOBROWSERNOTIF')) { - define('NOBROWSERNOTIF', '1'); -} +define('NOCSRFCHECK', 1); +define('NOLOGIN', 1); +define('NOSESSION', 1); @@ -42 +30,0 @@ -// Load Dolibarr environment @@ -50 +38,2 @@ -if (!GETPOST('transkey', 'alphanohtml') && !GETPOST('transphrase', 'alphanohtml')) { +if (!GETPOST('transkey', 'alphanohtml') && !GETPOST('transphrase', 'alphanohtml')) +{ @@ -53,2 +42,4 @@ -} else { - $langs->loadLangs(array("error", "other")); +} +else +{ + $langs->loadLangs(array("error", "other")); @@ -56,5 +47,2 @@ - if (GETPOST('transphrase', 'alphanohtml')) { - print dol_escape_htmltag(GETPOST('transphrase', 'alphanohtml')); - } elseif (GETPOST('transkey', 'alphanohtml')) { - print dol_escape_htmltag($langs->trans(GETPOST('transkey', 'alphanohtml'))); - } + if (GETPOST('transphrase', 'alphanohtml')) print dol_escape_htmltag(GETPOST('transphrase', 'alphanohtml')); + elseif (GETPOST('transkey', 'alphanohtml')) print dol_escape_htmltag($langs->trans(GETPOST('transkey', 'alphanohtml'))); @@ -62,2 +49,0 @@ - -$db->close();