--- results.php 2001/03/19 16:47:46 1.8 +++ results.php 2001/10/12 07:39:37 1.11 @@ -12,31 +12,26 @@ } require("conn.inc"); - -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 ) ); +include("section.inc"); if (! $type) $type="r"; -$sql="select id,town_date,title,body,pdf from news where type='$type' and visible order by priority desc,date desc"; +$sql="select id,town_date,title,body,pdf from news where type='$type' and $visible_is_true order by priority desc,date desc"; # print "$sql"; $sth = $dbh->prepare("$sql"); $sth->execute(); while ($row=$sth->fetchrow_hash()) { $results[]=$row; } + +if ($type == "p") { + $main_file="presentations"; +} elseif ($type == "o") { + $main_file="comp_profile"; +} else { + $main_file="results"; +} + $smarty->assign(array( results=>$results, type=>$type @@ -45,6 +40,9 @@ $main=$smarty->fetch("$main_file.tpl"); include("common.inc"); + +$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); + $smarty->assign( array(back_url=>"$section.php", MAIN=>$main)); $smarty->display("index.tpl");