--- inc/common.inc 2001/03/19 10:47:46 1.10 +++ inc/common.inc 2001/09/18 10:38:55 1.14 @@ -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<>'e' and visible order by date desc limit 5"); +$sth = $dbh->prepare("select id,title from news where type<>'e' and 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 priority desc,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;