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