--- inc/common.inc 2001/02/22 09:51:23 1.3 +++ inc/common.inc 2002/05/07 14:02:33 1.21 @@ -1,10 +1,15 @@ prepare("select item,url,file from menu where section='$section' order by num"); +$sth = $dbh->prepare("select item,url,file from menu where section='$section' and $visible_is_true order by num"); $sth->execute(); while ($row=$sth->fetchrow_hash()) { $menu[]=$row; @@ -14,15 +19,24 @@ // fetch news -$sth = $dbh->prepare("select id,title from news where type='n' and visible order by id desc limit 5"); +$sth = $dbh->prepare("select id,title from news where (type='n' or type='c' or type='a' or type='i' or type='r' or type='p') and $visible_is_true order by date desc limit 5"); $sth->execute(); while ($row=$sth->fetchrow_hash()) { $news[]=$row; } $smarty->assign("news",$news); +$sth = $dbh->prepare("select id,title from news where (type='e' or type='f') and $visible_is_true order by priority desc,date desc limit 5"); +$sth->execute(); +while ($row=$sth->fetchrow_hash()) { + $events[]=$row; +} +$smarty->assign("events",$events); + #include("debug.inc"); +// multipage + if ($multi_page) { $max=count($multi_page); $next=$multi_page[$current+1]; @@ -45,6 +59,7 @@ } if ($show) { $smarty->assign(array( + "multi_page_show" => 1, "multi_page"=>$multi_page, "multi_page_current"=>($current+1), "multi_page_max"=>$max, @@ -55,4 +70,14 @@ } +// banner + +include("banner.inc"); + +// newsletter + +if ($from == "investor" || $form == "new" || $section == "investor" || $section=="new" ) { + //include("inc/newsletter.php"); +} + ?>