getNumberOfRequiredParameters(); if ($fixNumOfPars != "" && is_numeric($fixNumOfPars)) : $numOfFunctionArguments = $fixNumOfPars; endif; $argumentArray = array(); for ($i = 1; $i <= $numOfFunctionArguments; $i++) : $parValue = ${("par_" . pad($i, 2))}; array_push($argumentArray, $parValue); endfor; // Call function ang get HTML output $retValue = call_user_func_array($fun, $argumentArray); if (is_array($retValue)) : if ($retIdx != "") : $retValue = $retValue[$retIdx]; if (is_array($retValue)) : echo $retParName . " = " . json_encode($retValue) . ";\n"; else : echo $retParName . " = '" . my_str_check_js($retValue) . "';\n"; endif; else : echo $retParName . " = " . json_encode($retValue) . ";\n"; endif; elseif (is_bool($retValue) === true) : if ($retValue) : $retValue = "1"; else : $retValue = "0"; endif; echo $retParName . " = '" . $retValue . "';\n"; else : if ($retParName == "_RAW_TEXT_") : if (strtolower($mode) == "html") : $retValue = nl2br($retValue); endif; echo $retValue; else : echo $retParName . " = '" . my_str_check_js($retValue) . "';\n"; endif; endif; else : $retValue = "ERR_03"; // No database available echo $retParName . " = '" . $retValue . "';\n"; endif; else : $retValue = "ERR_02"; // Called function does not exist echo $retParName . " = '" . $retValue . "';\n"; endif; else : $retValue = "ERR_01"; // No function name specified echo $retParName . " = '" . $retValue . "';\n"; endif; ?>