--- inc/common.inc 2001/09/20 09:50:24 1.9 +++ inc/common.inc 2001/11/20 11:26:14 1.10 @@ -1,6 +1,6 @@ assign("menu",$menu); + +// link na otroke sa slatkorne stran +if ($m == "sladkorna") $smarty->assign("link_otroci",1); + + +$sql_where=" and substr(type,3,1)<>'x'" ; // don't show locked records + +// auth... based on m +if ($m == "za_zdravnike") { + Header("X-auth: needed"); + print ""; + + $sql_where=""; +} + // fetch news -$sth = $dbh->prepare("select id,title from news where substr(type,1,1)='n' and $visible_is_true order by date desc limit 5"); +$sth = $dbh->prepare("select id,title from news where substr(type,1,1)='n' $sql_where 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 substr(type,1,1)='e' and $visible_is_true order by priority desc,date desc limit 5"); +$sth = $dbh->prepare("select id,title from news where substr(type,1,1)='e' $sql_where and $visible_is_true order by priority desc,date desc limit 5"); $sth->execute(); while ($row=$sth->fetchrow_hash()) { $events[]=$row;