--- inc/common.inc 2001/02/23 15:23:34 1.6 +++ inc/common.inc 2002/04/05 09:40:39 1.18 @@ -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,14 +19,14 @@ // fetch news -$sth = $dbh->prepare("select id,title from news where (type='n' or type='c' or type='r') and visible order by date 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' and visible order by date desc limit 5"); +$sth = $dbh->prepare("select id,title from news where type='e' and $visible_is_true order by priority desc,date desc limit 5"); $sth->execute(); while ($row=$sth->fetchrow_hash()) { $events[]=$row; @@ -30,6 +35,8 @@ #include("debug.inc"); +// multipage + if ($multi_page) { $max=count($multi_page); $next=$multi_page[$current+1]; @@ -63,4 +70,8 @@ } +// banner + +include("banner.inc"); + ?>