diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index 2f0e903b8c5a5bd95db5f0c2a5e9a3730a9e991d..e08eb5715c438b961ab6e188789a13f973d63e16 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -2,16 +2,12 @@ //define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. - require '../../main.inc.php'; -if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') -{ - print "Page available only from remote address 127.0.0.1"; - exit; +if ($dolibarr_main_prod) { + accessforbidden(); } - $usedolheader=1; // 1 = Test inside a dolibarr page, 0 = Use hard coded header @@ -358,4 +354,4 @@ if (! empty($usedolheader)) </body> <?php } ?> -</html> \ No newline at end of file +</html> diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index e8841eea580b8314e596ca7b228c5451e3b1d084..86db08fe1487d79633d2c6adeb694b0b36edf79b 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -6,13 +6,10 @@ define('REQUIRE_JQUERY_MULTISELECT','select2'); require '../../main.inc.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') -{ - print "Page available only from remote address 127.0.0.1"; - exit; +if ($dolibarr_main_prod) { + accessforbidden(); } - llxHeader(); ?>