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 |
if (isset($from)) { |
10 |
$section=$from; |
11 |
} else { |
12 |
$section="index"; |
13 |
} |
14 |
|
15 |
include("section.inc"); |
16 |
$back_url="index.php"; |
17 |
|
18 |
|
19 |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
20 |
|
21 |
|
22 |
$sth = $dbh->prepare("select num,name,type,note,street,town,country,phone,fax,email,website from worldwide where type='HQ' order by num"); |
23 |
$sth->execute(); |
24 |
while ($row=$sth->fetchrow_hash()) { |
25 |
$data[]=$row; |
26 |
} |
27 |
$smarty->assign("data",$data); |
28 |
$html=$smarty->fetch("worldwide-list.tpl"); |
29 |
unset($data); |
30 |
$smarty->assign("hq",$html); |
31 |
|
32 |
|
33 |
$sth = $dbh->prepare("select num,name,type,note,street,town,country,phone,fax,email,website from worldwide where type='Subsidiary' order by num"); |
34 |
$sth->execute(); |
35 |
while ($row=$sth->fetchrow_hash()) { |
36 |
$data[]=$row; |
37 |
} |
38 |
$smarty->assign("data",$data); |
39 |
$html=$smarty->fetch("worldwide-list.tpl"); |
40 |
$smarty->assign("subsidiary",$html); |
41 |
unset($data); |
42 |
|
43 |
|
44 |
$sth = $dbh->prepare("select num,name,type,note,street,town,country,phone,fax,email,website from worldwide where type='Representative Office' order by num"); |
45 |
$sth->execute(); |
46 |
while ($row=$sth->fetchrow_hash()) { |
47 |
$data[]=$row; |
48 |
} |
49 |
$smarty->assign("data",$data); |
50 |
$html=$smarty->fetch("worldwide-list.tpl"); |
51 |
$smarty->assign("rep_office",$html); |
52 |
unset($data); |
53 |
|
54 |
$main=$smarty->fetch("worldwide.tpl"); |
55 |
|
56 |
include("common.inc"); |
57 |
$smarty->assign( array(back_url=>'index.php', MAIN=>$main)); |
58 |
|
59 |
$smarty->display("index.tpl"); |
60 |
?> |