--- inc/common.inc 2001/03/18 23:36:26 1.9 +++ 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<>'e' 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 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; @@ -30,6 +35,8 @@ #include("debug.inc"); +// multipage + if ($multi_page) { $max=count($multi_page); $next=$multi_page[$current+1]; @@ -63,23 +70,8 @@ } -function check_required() { - global $inputs_required; - global $inputs_required_type; - $ok=1; - if (isset($inputs_required)) { - foreach ($inputs_required as $i) { - if (! isset($GLOBALS[$i]) || $GLOBALS[$i] == "") $ok=0; - switch ($input_required_type[$i]) { - case 'email': - if (!strstr($GLOBALS[$i],'@')) $ok=0; - } +// banner - } - } else { - print ""; - } - return $ok; -} +include("banner.inc"); ?>