--- investor.php 2001/03/03 08:33:20 1.2 +++ investor.php 2001/03/12 16:01:22 1.3 @@ -14,23 +14,34 @@ $lpic="investor"; $lext=".jpg"; $mpic="investors.gif"; +if ($menu_item) $title.=" : $menu_item"; + $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); include("common.inc"); -$dbh->dbh_do("set datestyle='german'"); - -$sql="select date,type,current,change,high,low,open from stocks order by date desc limit 2"; +if ($part == "analyst") { + $sth = $dbh->prepare("select company,analyst,email from analysts order by company"); + $sth->execute(); + while ($row=$sth->fetchrow_hash()) { + $analysts[]=$row; + } + + $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; + } -$sth = $dbh->prepare("$sql"); -$sth->execute(); -while ($row=$sth->fetchrow_hash()) { - $stock[]=$row; + $smarty->assign("stock",$stock); + $main=$smarty->fetch("investor.tpl"); } - -$smarty->assign("stock",$stock); - -$main=$smarty->fetch("investor.tpl"); $smarty->assign("MAIN",$main); $smarty->display("index.tpl");