27 |
|
|
28 |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
29 |
|
|
30 |
$sql_where=""; |
$sql_where="where visible is true"; |
31 |
|
|
32 |
if (isset($id)) { |
if (isset($id)) { |
33 |
$sql_where.=" where id=$id "; |
$sql_where.=" and id=$id "; |
34 |
} |
} |
35 |
|
|
36 |
if (! isset($more) || !file_exists("./news/$more")) { |
if (! isset($more) || !file_exists("./news/$more")) { |
37 |
|
|
38 |
$sth = $dbh->prepare("select id,title,date,body,more,pdf from news $sql_where order by id desc"); |
$sth = $dbh->prepare("select id,title,town_date,body,more,pdf from news $sql_where order by id desc"); |
39 |
$sth->execute(); |
$sth->execute(); |
40 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
41 |
$data[]=$row; |
$data[]=$row; |