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="products"; |
10 |
|
|
|
11 |
dpavlin |
1.4 |
include("section.inc"); |
12 |
|
|
|
13 |
|
|
$title.=" : SMPC"; |
14 |
dpavlin |
1.1 |
$back_url="products.php"; |
15 |
|
|
|
16 |
dpavlin |
1.2 |
if (isset($smpc)) { |
17 |
dpavlin |
1.1 |
|
18 |
dpavlin |
1.2 |
$sth = $dbh->prepare("select brand,form from products where smpc=$smpc"); |
19 |
|
|
$sth->execute(); |
20 |
|
|
if ($row=$sth->fetchrow_hash()) $title.=" : $row[brand] $row[form]"; |
21 |
dpavlin |
1.1 |
|
22 |
|
|
$sth = $dbh->prepare("select section,title,body |
23 |
|
|
from sections,paragraphs |
24 |
|
|
where smpc=$smpc and sections.id=section_id and section<=5.2 |
25 |
|
|
and html is true order by section asc"); |
26 |
|
|
$sth->execute(); |
27 |
|
|
while ($row=$sth->fetchrow_hash()) { |
28 |
|
|
$data[]=$row; |
29 |
|
|
} |
30 |
|
|
|
31 |
|
|
$smarty->assign("smpc",$data); |
32 |
|
|
} |
33 |
dpavlin |
1.2 |
|
34 |
|
|
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
35 |
dpavlin |
1.1 |
|
36 |
|
|
$main=$smarty->fetch("smpc.tpl"); |
37 |
|
|
|
38 |
|
|
include("common.inc"); |
39 |
dpavlin |
1.3 |
$smarty->assign( array(back_url=>$back_url, contact_from=>"human_health", MAIN=>$main)); |
40 |
dpavlin |
1.1 |
|
41 |
|
|
$smarty->display("index.tpl"); |
42 |
|
|
?> |