myvesta_echo php function

This commit is contained in:
myvesta 2023-04-01 23:29:35 +02:00 committed by GitHub
parent a47603156d
commit 3bafc5b064
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 20 deletions

View file

@ -1,5 +1,7 @@
<?php
$myvesta_echo_done=false;
if (isset($_SERVER['SHLVL'])) $SHLVL=intval($_SERVER['SHLVL']);
else $SHLVL=3;
@ -27,14 +29,11 @@ for ($i=2; $i<$counter; $i++) {
$r=call_user_func_array($func, $params);
if (is_bool($r)) {
if ($r) {
if ($SHLVL<3) echo "\n";
exit(0);
myvesta_exit (0);
} else {
if ($SHLVL<3) echo "\n";
exit(MYVESTA_ERROR_GENERAL);
myvesta_exit (MYVESTA_ERROR_GENERAL);
}
} else {
echo $r;
if ($SHLVL<3) echo "\n";
exit(0);
myvesta_echo ($r);
myvesta_exit (0);
}