--- results.php 2001/02/19 16:22:20 1.1.1.1 +++ results.php 2001/03/17 15:41:42 1.7 @@ -1,21 +1,46 @@ assign( array ( Title=>"Pliva d.d." ) ); -$section="investor"; +if (isset($from)) { + $section=$from; +} else { + $section="investor"; +} + +require("conn.inc"); -$title="INVESTOR'S PAGE"; -$lpic="investor"; $lext=".jpg"; -$mpic="investors.gif"; +if ($section == "new") { + $title="What's New"; + $lpic="new"; $lext=".jpg"; + $mpic="new.gif"; +} else { + $title="INVESTOR'S PAGE"; + $lpic="investor"; $lext=".jpg"; + $mpic="investors.gif"; +} +if ($menu_item) $title.=" : $menu_item"; $main_file="results"; $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); +if (! $type) $type="r"; + +$sql="select id,town_date,title,pdf from news where type='$type' and visible order by priority desc,date desc"; +# print "$sql"; +$sth = $dbh->prepare("$sql"); +$sth->execute(); +while ($row=$sth->fetchrow_hash()) { + $results[]=$row; +} +$smarty->assign(array( + results=>$results, + type=>$type + )); $main=$smarty->fetch("$main_file.tpl");