--- investor.php 2001/03/12 16:01:22 1.3 +++ investor.php 2001/03/17 16:40:55 1.8 @@ -30,16 +30,8 @@ $smarty->assign("analysts",$analysts); $main=$smarty->fetch("analysts.tpl"); } else { - $dbh->dbh_do("set datestyle='german'"); - - $sql="select date,type,current,change,high,low,open from stocks order by date desc limit 2"; - $sth = $dbh->prepare("$sql"); - $sth->execute(); - while ($row=$sth->fetchrow_hash()) { - $stock[]=$row; - } - - $smarty->assign("stock",$stock); + include("stocks.inc"); + $smarty->assign(array(stock=>$stock, date=>$date, time=>$time)); $main=$smarty->fetch("investor.tpl"); } $smarty->assign("MAIN",$main);