[insert_php] require_once $_SERVER[“DOCUMENT_ROOT”].”/wp-content/themes/premiumopenosh/exchange_rates/SelfCurrencyRate.php”; require_once $_SERVER[“DOCUMENT_ROOT”].”/wp-content/themes/premiumopenosh/exchange_rates/getCurrency.php”; $curTime = time(); for ( $selectedRows = 0, $i = 1; $selectedRows == 0 && $i < 100; $i++ ) { $curRate = new SelfCurrencyRate($curTime); $curRate->select(); $selectedRows = $curRate->rates->num_rows; $fatchTime = getdate($curTime); $curTime = mktime(0, 0, 0, $fatchTime[“mon”], $fatchTime[“mday”]-1, $fatchTime[“year”]); } for ( $selectedRows = 0, $i = 1; $selectedRows == 0 && $i < 100; $i++ ) { $prevRate = new SelfCurrencyRate($curTime); $prevRate->select(); $selectedRows = $prevRate->rates->num_rows; $fatchTime = getdate($curTime); $curTime = mktime(0, 0, 0, $fatchTime[“mon”], $fatchTime[“mday”]-1, $fatchTime[“year”]); } $actualTime = explode(‘-‘, $curRate->sqlDate); $curDate=array(); foreach (array(“USD”, “EUR”, “RUB”) as $currency) { $c = array( “buy” => getCurrency($currency, $curRate, $prevRate, ‘buy’), “sell” => getCurrency($currency, $curRate, $prevRate, ‘sell’) ); $curDate[“OSCHAD”][$c[“buy”][“NAME”]]=$c[“buy”][“RATE_DATE”]; echo $c[“buy”][“RATE”]; echo $c[“sell”][“RATE”]; } [/insert_php]

Анатолій Криволап – Український мотив. Вечір.
Олія на полотні, 100×140 см, 2003