1 |
<?php |
<?php |
2 |
require("Smarty.class.php"); |
require("Smarty.class.php"); |
|
require("conn.inc"); |
|
3 |
|
|
4 |
$smarty = new Smarty; |
$smarty = new Smarty; |
5 |
|
|
6 |
$smarty->assign( array ( Title=>"Pliva d.d." ) ); |
$smarty->assign( array ( Title=>"Pliva d.d." ) ); |
7 |
|
|
8 |
$section="investor"; |
if (isset($from)) { |
9 |
|
$section=$from; |
10 |
|
} else { |
11 |
|
$section="investor"; |
12 |
|
} |
13 |
|
|
14 |
|
require("conn.inc"); |
15 |
|
|
16 |
$title="INVESTOR'S PAGE"; |
if ($section == "new") { |
17 |
$lpic="investor"; $lext=".jpg"; |
$title="What's New"; |
18 |
$mpic="investors.gif"; |
$lpic="new"; $lext=".jpg"; |
19 |
|
$mpic="new.gif"; |
20 |
|
} else { |
21 |
|
$title="INVESTOR'S PAGE"; |
22 |
|
$lpic="investor"; $lext=".jpg"; |
23 |
|
$mpic="investors.gif"; |
24 |
|
} |
25 |
|
if ($menu_item) $title.=" : $menu_item"; |
26 |
|
|
27 |
$main_file="results"; |
$main_file="results"; |
28 |
|
|
29 |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
30 |
|
|
31 |
|
if (! $type) $type="r"; |
32 |
|
|
33 |
|
$sql="select id,town_date,title,body,pdf from news where type='$type' and visible order by priority desc,date desc"; |
34 |
|
# print "$sql"; |
35 |
|
$sth = $dbh->prepare("$sql"); |
36 |
|
$sth->execute(); |
37 |
|
while ($row=$sth->fetchrow_hash()) { |
38 |
|
$results[]=$row; |
39 |
|
} |
40 |
|
|
41 |
|
if ($type == "p") $main_file="presentations"; |
42 |
|
|
43 |
|
$smarty->assign(array( |
44 |
|
results=>$results, |
45 |
|
type=>$type |
46 |
|
)); |
47 |
|
|
48 |
$main=$smarty->fetch("$main_file.tpl"); |
$main=$smarty->fetch("$main_file.tpl"); |
49 |
|
|