setAttribute( NumberFormatter::FRACTION_DIGITS, $decimals ); return $formatter->format( $number ); } function format_output_percent( $number, $decimals ){ $formatStyle = NumberFormatter::PERCENT; $formatter = new NumberFormatter( 'de-DE', $formatStyle ); $formatter->setAttribute( NumberFormatter::FRACTION_DIGITS, $decimals ); return $formatter->format( $number ); } function format_output_list( $value, $listName ){ list ( $listName, $attr ) = explode( ',', $listName ) + ['','']; //return "$listName|$attr"; $attr = trim( $attr ); $list = $GLOBALS[ $listName ] ?? []; if ( empty( $list[ $value ] ) ){ return $value; } return $attr ? ( $list[ $value ][ $attr ] ?? '' ) : $list[ $value ]; } ### Main Script ### require_once 'lib/leany.class.php'; $tpl = new Leany( 'views', $Config['templateCache'] ?? NULL ); $tpl->baseUrlLinks = $BaseUrl; $tpl->baseUrlResources = $BaseUrlResources; $tpl->outputFunction = 'encode_value'; $now = time(); // end of file init_leany.php