1 |
dpavlin |
1.1 |
<?php |
2 |
|
|
require("Smarty.class.php"); |
3 |
|
|
require("conn.inc"); |
4 |
|
|
|
5 |
|
|
$smarty = new Smarty; |
6 |
|
|
|
7 |
|
|
$smarty->assign( array ( Title=>"Pliva d.d." ) ); |
8 |
|
|
|
9 |
|
|
$section="investor"; |
10 |
|
|
|
11 |
|
|
$title="INVESTOR'S PAGE"; |
12 |
dpavlin |
1.4 |
if ($menu_item) $title.=" : $menu_item"; |
13 |
dpavlin |
1.1 |
$lpic="investor"; $lext=".jpg"; |
14 |
|
|
$mpic="investors.gif"; |
15 |
|
|
|
16 |
dpavlin |
1.2 |
if ($part && file_exists("templates/$part.tpl")) { |
17 |
|
|
$main_file=$part; |
18 |
|
|
} else { |
19 |
|
|
$main_file="results"; |
20 |
|
|
} |
21 |
dpavlin |
1.1 |
|
22 |
|
|
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
23 |
|
|
|
24 |
dpavlin |
1.3 |
$sql="select id,title,pdf from news where type='r' and visible order by priority desc,date desc"; |
25 |
|
|
# print "$sql"; |
26 |
|
|
$sth = $dbh->prepare("$sql"); |
27 |
|
|
$sth->execute(); |
28 |
|
|
while ($row=$sth->fetchrow_hash()) { |
29 |
|
|
$results[]=$row; |
30 |
|
|
} |
31 |
|
|
$smarty->assign("results",$results); |
32 |
dpavlin |
1.1 |
|
33 |
|
|
$main=$smarty->fetch("$main_file.tpl"); |
34 |
|
|
|
35 |
|
|
include("common.inc"); |
36 |
|
|
$smarty->assign( array(back_url=>"$section.php", MAIN=>$main)); |
37 |
|
|
|
38 |
|
|
$smarty->display("index.tpl"); |
39 |
|
|
?> |