13 |
$lpic="investor"; $lext=".jpg"; |
$lpic="investor"; $lext=".jpg"; |
14 |
$mpic="investors.gif"; |
$mpic="investors.gif"; |
15 |
|
|
16 |
if ($part && file_exists("templates/$part.tpl")) { |
$main_file="results"; |
|
$main_file=$part; |
|
|
} else { |
|
|
$main_file="results"; |
|
|
} |
|
17 |
|
|
18 |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
19 |
|
|
20 |
$sql="select id,title,pdf from news where type='r' and visible order by priority desc,date desc"; |
if (! $type) $type="r"; |
21 |
|
|
22 |
|
$sql="select id,title,pdf from news where type='$type' and visible order by priority desc,date desc"; |
23 |
# print "$sql"; |
# print "$sql"; |
24 |
$sth = $dbh->prepare("$sql"); |
$sth = $dbh->prepare("$sql"); |
25 |
$sth->execute(); |
$sth->execute(); |
26 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
27 |
$results[]=$row; |
$results[]=$row; |
28 |
} |
} |
29 |
$smarty->assign("results",$results); |
$smarty->assign(array( |
30 |
|
results=>$results, |
31 |
|
type=>$type |
32 |
|
)); |
33 |
|
|
34 |
$main=$smarty->fetch("$main_file.tpl"); |
$main=$smarty->fetch("$main_file.tpl"); |
35 |
|
|