/[corp_html]/fine_chemicals.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /fine_chemicals.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations)
Fri Sep 7 14:27:37 2001 UTC (18 years, 2 months ago) by dpavlin
Branch: MAIN
Changes since 1.6: +5 -5 lines
better page title for Contact Us

1 <?php
2
3 if ($QUERY_STRING == "") {
4 Header("Location: $PHP_SELF?part=Main");
5 }
6
7 require("Smarty.class.php");
8 require("conn.inc");
9
10 $smarty = new Smarty;
11
12 $smarty->assign( array ( Title=>"Pliva d.d." ) );
13
14 $section="products";
15
16 if ($menu_item) {
17 $title="Products : Fine Chemicals : $menu_item";
18 } else {
19 $title="Products : Fine Chemicals";
20 }
21 $lpic="products"; $lext=".jpg";
22 $mpic="products.gif";
23 $back_url="products.php";
24
25 $sub_part=substr($part,0,strpos($part,"-"));
26 if ($sub_part == "CustomManuf") {
27 $multi_page=array(
28 "fine_chemicals.php?part=CustomManuf-Page1",
29 "fine_chemicals.php?part=CustomManuf-Page2",
30 "fine_chemicals.php?part=CustomManuf-Page3",
31 "fine_chemicals.php?part=CustomManuf-Page4",
32 "fine_chemicals.php?part=CustomManuf-Page5",
33 );
34 }
35
36 $main_file="./fc/";
37 if ($part=="ContactUs") {
38 $sth = $dbh->prepare("select name,comment,addr1,addr2,email,tel,fax from fc_contact where is_office is not true order by num");
39 $sth->execute();
40 while ($row=$sth->fetchrow_hash()) {
41 $person[]=$row;
42 }
43
44 $sth = $dbh->prepare("select office,name,comment,addr1,addr2,email,tel,fax from fc_contact where is_office is true order by num");
45 $sth->execute();
46 while ($row=$sth->fetchrow_hash()) {
47 $office[]=$row;
48 }
49 $smarty->assign( array( person=>$person, office=>$office ) );
50 $main=$smarty->fetch("fc_ContactUs.tpl");
51
52 $title.=" : Contact Us";
53
54 } elseif (file_exists($main_file.$part.".htm")) {
55 $main_file.=$part.".htm";
56 $main=join('',file($main_file));
57 } else {
58 $main_file.="Main.htm";
59 $title="Products : Fine Chemicals";
60 $main=join('',file($main_file));
61 }
62
63 include("common.inc");
64
65 unset($menu);
66
67 $sth = $dbh->prepare("select item,url,file from menu where section='fine' and visible order by num");
68 $sth->execute();
69 while ($row=$sth->fetchrow_hash()) {
70 $menu[]=$row;
71 }
72 $smarty->assign("menu",$menu);
73
74 $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic,
75 Section_title=>$title, back_url=>$back_url, MAIN=>$main,
76 contact_url => 'fine_chemicals.php?part=ContactUs'));
77
78 $smarty->display("index.tpl");
79 ?>

  ViewVC Help
Powered by ViewVC 1.1.26