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 |
|
|
$lpic="investor"; $lext=".jpg"; |
13 |
|
|
$mpic="investors.gif"; |
14 |
|
|
|
15 |
dpavlin |
1.2 |
if ($part && file_exists("templates/$part.tpl")) { |
16 |
|
|
$main_file=$part; |
17 |
|
|
} else { |
18 |
|
|
$main_file="results"; |
19 |
|
|
} |
20 |
dpavlin |
1.1 |
|
21 |
|
|
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
22 |
|
|
|
23 |
dpavlin |
1.3 |
$sql="select id,title,pdf from news where type='r' and visible order by priority desc,date desc"; |
24 |
|
|
# print "$sql"; |
25 |
|
|
$sth = $dbh->prepare("$sql"); |
26 |
|
|
$sth->execute(); |
27 |
|
|
while ($row=$sth->fetchrow_hash()) { |
28 |
|
|
$results[]=$row; |
29 |
|
|
} |
30 |
|
|
$smarty->assign("results",$results); |
31 |
dpavlin |
1.1 |
|
32 |
|
|
$main=$smarty->fetch("$main_file.tpl"); |
33 |
|
|
|
34 |
|
|
include("common.inc"); |
35 |
|
|
$smarty->assign( array(back_url=>"$section.php", MAIN=>$main)); |
36 |
|
|
|
37 |
|
|
$smarty->display("index.tpl"); |
38 |
|
|
?> |