1 |
dpavlin |
1.1 |
<?php |
2 |
|
|
|
3 |
dpavlin |
1.2 |
$corp_dbh = new DBI("corp","dpavlin host=localhost",""); |
4 |
dpavlin |
1.1 |
|
5 |
|
|
$sth = $corp_dbh->prepare("select num,name,type,note,street,town,country,phone,fax,email,website from worldwide where type='HQ' order by num"); |
6 |
|
|
$sth->execute(); |
7 |
|
|
while ($row=$sth->fetchrow_hash()) { |
8 |
|
|
$data[]=$row; |
9 |
|
|
} |
10 |
|
|
$smarty->assign("data",$data); |
11 |
|
|
$html=$smarty->fetch("worldwide-list.tpl"); |
12 |
|
|
unset($data); |
13 |
|
|
$smarty->assign("hq",$html); |
14 |
|
|
|
15 |
|
|
|
16 |
|
|
$sth = $corp_dbh->prepare("select num,name,type,note,street,town,country,phone,fax,email,website from worldwide where type='Subsidiary' order by num"); |
17 |
|
|
$sth->execute(); |
18 |
|
|
while ($row=$sth->fetchrow_hash()) { |
19 |
|
|
$data[]=$row; |
20 |
|
|
} |
21 |
|
|
$smarty->assign("data",$data); |
22 |
|
|
$html=$smarty->fetch("worldwide-list.tpl"); |
23 |
|
|
$smarty->assign("subsidiary",$html); |
24 |
|
|
unset($data); |
25 |
|
|
|
26 |
|
|
|
27 |
|
|
$sth = $corp_dbh->prepare("select num,name,type,note,street,town,country,phone,fax,email,website from worldwide where type='Representative Office' order by num"); |
28 |
|
|
$sth->execute(); |
29 |
|
|
while ($row=$sth->fetchrow_hash()) { |
30 |
|
|
$data[]=$row; |
31 |
|
|
} |
32 |
|
|
$smarty->assign("data",$data); |
33 |
|
|
$html=$smarty->fetch("worldwide-list.tpl"); |
34 |
|
|
$smarty->assign("rep_office",$html); |
35 |
|
|
unset($data); |
36 |
|
|
|
37 |
|
|
$main=$smarty->fetch("worldwide.tpl"); |
38 |
|
|
|
39 |
|
|
?> |