if ($inc2 != "rates.php3" && $inc2 != "count.php3") { ?>
mysql_pconnect (DBHOST, DBUSER, DBPASS);
mysql_select_db (DB);
$res = mysql_query ("SELECT MAX(day) FROM rates WHERE day <= curdate()");
if ($row = mysql_fetch_row ($res))
{
list ($lastdate) = $row;
if (isset ($day))
{
$oldday = $day;
$oldmonth = $month;
$oldyear = $year;
}
list ($year, $month, $day) = split ("-", $lastdate, 3);
?>
|
echo "$day.$month.$year" ?> |
|
|
|
|
|
|
$res = mysql_query ("SELECT r.TLA, buy, sell FROM rates AS r, currency AS c WHERE trim(r.TLA) = trim(c.TLA) AND day = '$lastdate' AND trim(r.TLA) IN ('USD', 'EUR') ORDER BY c.ord");
while ($row = mysql_fetch_row ($res))
{
list ($TLA, $buy, $sell) = $row;
?>
|
echo $TLA ?> |
printf ("%.2f", $buy) ?> |
printf ("%.2f", $sell) ?> |
}
?>
|
|
}
if (isset ($oldday))
{
$day = $oldday;
$month = $oldmonth;
$year = $oldyear;
}
?>
|
} ?>
if ($inc2 != "rates.php3" && $inc2 != "count.php3") { ?> } ?>
require empty ($inc) ? "firma.html" : "$inc"; ?>
|
if ($inc2 != "rates.php3" && $inc2 != "count.php3") { ?> | } ?>
require empty ($inc2) ? "informacje.htm" : "$inc2"; ?> require "stopka.html"; ?> |