--- results.php 2001/02/19 16:22:20 1.1.1.1 +++ results.php 2001/10/12 07:39:37 1.11 @@ -1,25 +1,48 @@ assign( array ( Title=>"Pliva d.d." ) ); -$section="investor"; - -$title="INVESTOR'S PAGE"; -$lpic="investor"; $lext=".jpg"; -$mpic="investors.gif"; +if (isset($from)) { + $section=$from; +} else { + $section="investor"; +} -$main_file="results"; +require("conn.inc"); +include("section.inc"); -$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); +if (! $type) $type="r"; +$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 + )); $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");