/[pliva-si]/inc/common.inc
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /inc/common.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by dpavlin, Thu Sep 20 09:50:24 2001 UTC revision 1.10 by dpavlin, Tue Nov 20 11:26:14 2001 UTC
# Line 1  Line 1 
1  <?  <?
2    
3  global $smarty,$dbh;  global $smarty,$dbh,$auth_required;
4    
5  // fetch menu  // fetch menu
6    
# Line 20  while ($row=$sth->fetchrow_hash()) { Line 20  while ($row=$sth->fetchrow_hash()) {
20    
21  $smarty->assign("menu",$menu);  $smarty->assign("menu",$menu);
22    
23    
24    // link na otroke sa slatkorne stran
25    if ($m == "sladkorna") $smarty->assign("link_otroci",1);
26    
27    
28    $sql_where=" and substr(type,3,1)<>'x'" ; // don't show locked records
29    
30    // auth... based on m
31    if ($m == "za_zdravnike") {
32            Header("X-auth: needed");
33            print "<!-- auth needed -->";
34    
35            $sql_where="";
36    }
37    
38  // fetch news  // fetch news
39    
40  $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");
41  $sth->execute();  $sth->execute();
42  while ($row=$sth->fetchrow_hash()) {  while ($row=$sth->fetchrow_hash()) {
43          $news[]=$row;          $news[]=$row;
44  }  }
45  $smarty->assign("news",$news);  $smarty->assign("news",$news);
46    
47  $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");
48  $sth->execute();  $sth->execute();
49  while ($row=$sth->fetchrow_hash()) {  while ($row=$sth->fetchrow_hash()) {
50          $events[]=$row;          $events[]=$row;

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.26