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 |
dpavlin |
1.2 |
$section="investor"; |
10 |
|
|
|
11 |
dpavlin |
1.1 |
$smarty->assign("section",$section); |
12 |
|
|
|
13 |
dpavlin |
1.2 |
$title="INVESTOR'S PAGE"; |
14 |
|
|
$lpic="investor"; $lext=".jpg"; |
15 |
|
|
$mpic="investors.gif"; |
16 |
dpavlin |
1.1 |
|
17 |
|
|
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
18 |
|
|
|
19 |
|
|
include("common.inc"); |
20 |
|
|
|
21 |
dpavlin |
1.2 |
$dbh->dbh_do("set datestyle='german'"); |
22 |
|
|
|
23 |
|
|
$sql="select date,type,current,change,high,low,open from stocks order by date desc limit 2"; |
24 |
|
|
|
25 |
|
|
$sth = $dbh->prepare("$sql"); |
26 |
|
|
$sth->execute(); |
27 |
|
|
while ($row=$sth->fetchrow_hash()) { |
28 |
|
|
$stock[]=$row; |
29 |
|
|
} |
30 |
dpavlin |
1.1 |
|
31 |
dpavlin |
1.2 |
$smarty->assign("stock",$stock); |
32 |
dpavlin |
1.1 |
|
33 |
dpavlin |
1.2 |
$main=$smarty->fetch("investor.tpl"); |
34 |
|
|
$smarty->assign("MAIN",$main); |
35 |
dpavlin |
1.1 |
|
36 |
|
|
$smarty->display("index.tpl"); |
37 |
|
|
?> |