12 |
$smarty->assign("m_form_session","<input type=\"hidden\" name=\"m\" value=\"$m\">"); |
$smarty->assign("m_form_session","<input type=\"hidden\" name=\"m\" value=\"$m\">"); |
13 |
} |
} |
14 |
|
|
15 |
$sth = $dbh->prepare("select item,url,file,w,h from menu where section='$m' and visible order by num"); |
$sth = $dbh->prepare("select item,url,file,w,h from menu where section='$m' and $visible_is_true order by num"); |
16 |
$sth->execute(); |
$sth->execute(); |
17 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
18 |
$menu[]=$row; |
$menu[]=$row; |
22 |
|
|
23 |
// fetch news |
// fetch news |
24 |
|
|
25 |
$sth = $dbh->prepare("select id,title from news where substr(type,1,1)='n' and visible order by date desc limit 5"); |
$sth = $dbh->prepare("select id,title from news where substr(type,1,1)='n' and $visible_is_true order by date desc limit 5"); |
26 |
$sth->execute(); |
$sth->execute(); |
27 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
28 |
$news[]=$row; |
$news[]=$row; |
29 |
} |
} |
30 |
$smarty->assign("news",$news); |
$smarty->assign("news",$news); |
31 |
|
|
32 |
$sth = $dbh->prepare("select id,title from news where substr(type,1,1)='e' and visible order by priority desc,date desc limit 5"); |
$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"); |
33 |
$sth->execute(); |
$sth->execute(); |
34 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
35 |
$events[]=$row; |
$events[]=$row; |