Your IP : 172.28.240.42


Current Path : /var/www/html/clients/tatneft-nhs.ru/back/includes/
Upload File :
Current File : /var/www/html/clients/tatneft-nhs.ru/back/includes/footer.php

<?php
/**
* @version		$Id: footer.php 9764 2007-12-30 07:48:11Z ircmaxell $
* @package		Joomla
* @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

/*$version = new JVersion();

// NOTE - You may change this file to suit your site needs
?>
<div align="center">
	&copy; <?php echo JHTML::_('date',  'now', '%Y' ) . ' ' . $mainframe->getCfg('sitename'); ?>
</div>

<div align="center">
	<?php echo $version->URL; ?>
</div>*/
$cont = file_get_contents("http://www.cbr.ru/scripts/XML_daily.asp");
$pattern = "/<CharCode>(.*?)<\/CharCode>\s*<Nominal>(.*)<\/Nominal>\s*<Name>(.*)<\/Name>\s*<Value>(.*)<\/Value>/im";

$cnt =  preg_match_all($pattern,$cont,$matches);

if($cnt != FALSE)
{
  
  $count_currencies = count($matches[1]);

  for($i=0;$i<$count_currencies;$i++)
  {
    $curr_abbr = $matches[1][$i];
    //$curr_nominal = $matches[2][$i];
    //$curr_name = $matches[3][$i];
    $curr_value = $matches[4][$i];
    
    echo "$curr_abbr - $curr_value <br>";
  } // for
  
} // if($cnt != FALSE)