| 3 |
// $Id$ |
// $Id$ |
| 4 |
// ----------------------------------------------------------------------------- |
// ----------------------------------------------------------------------------- |
| 5 |
// $Log$ |
// $Log$ |
| 6 |
|
// Revision 1.10 2004/11/03 14:13:45 jonen |
| 7 |
|
// minor changes related to check mail-address |
| 8 |
|
// |
| 9 |
|
// Revision 1.9 2004/09/07 18:52:01 jonen |
| 10 |
|
// added function 'format_amount' |
| 11 |
|
// |
| 12 |
// Revision 1.8 2003/03/03 21:21:43 joko |
// Revision 1.8 2003/03/03 21:21:43 joko |
| 13 |
// refactored most reusable code to org.netfrag.glib/php_extensions.php |
// refactored most reusable code to org.netfrag.glib/php_extensions.php |
| 14 |
// |
// |
| 163 |
|
|
| 164 |
function number_format_locale ($num, $decimals = null) { |
function number_format_locale ($num, $decimals = null) { |
| 165 |
$locale = localeconv(); |
$locale = localeconv(); |
| 166 |
if(!isset($decimals)) $decimals = $locale['frac_digits']; |
//if(!isset($decimals)) $decimals = $locale['frac_digits']; |
| 167 |
|
if(!isset($decimals)) $decimals = 2; |
| 168 |
return number_format($num, $decimals, $locale['decimal_point'], $locale['thousands_sep']); |
return number_format($num, $decimals, $locale['decimal_point'], $locale['thousands_sep']); |
| 169 |
} |
} |
| 170 |
|
|
| 179 |
} |
} |
| 180 |
} |
} |
| 181 |
|
|
| 182 |
|
function format_amount(&$amount) { |
| 183 |
|
$amount = str_replace(array(".", ","), array("", "."), $amount); |
| 184 |
|
//print "streplace amount: '$amount'<br>"; |
| 185 |
|
//return $amount; |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
|
| 189 |
?> |
?> |