1. PHP / Говнокод #4353

    +165

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    function FormatCurrency($fSum, $strCurrency)
    {
    	return CurrencyFormat($fSum, $strCurrency);
    	/*
    	if (!isset($fSum) || strlen($fSum)<=0) return "";
    
    	$arCurFormat = CCurrencyLang::GetCurrencyFormat($strCurrency);
    
    	if (!isset($arCurFormat["DECIMALS"])) $arCurFormat["DECIMALS"] = 2;
    	$arCurFormat["DECIMALS"] = IntVal($arCurFormat["DECIMALS"]);
    	if (!isset($arCurFormat["DEC_POINT"])) $arCurFormat["DEC_POINT"] = ".";
    	if (!isset($arCurFormat["THOUSANDS_SEP"])) $arCurFormat["THOUSANDS_SEP"] = "\\"."xA0";
    	$tmpTHOUSANDS_SEP = $arCurFormat["THOUSANDS_SEP"];
    	eval("\$tmpTHOUSANDS_SEP = \"$tmpTHOUSANDS_SEP\";");
    	$arCurFormat["THOUSANDS_SEP"] = $tmpTHOUSANDS_SEP;
    	if (!isset($arCurFormat["FORMAT_STRING"])) $arCurFormat["FORMAT_STRING"] = "#";
    
    	$num = number_format($fSum, $arCurFormat["DECIMALS"], $arCurFormat["DEC_POINT"], $arCurFormat["THOUSANDS_SEP"]);
    
    	return str_replace("#", $num, $arCurFormat["FORMAT_STRING"]);
    	*/
    }

    1C-Bitrix,
    /bitrix/modules/catalog/include.php

    Запостил: Under, 12 Октября 2010

    Комментарии (5) RSS

    Добавить комментарий