/[corp_html]/contact.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

Annotation of /contact.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations)
Mon Mar 12 12:53:16 2001 UTC (23 years ago) by dpavlin
Branch: MAIN
Changes since 1.7: +8 -1 lines
gleda adrese i po menu tablici

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=str_replace(".php","",basename($PHP_SELF));
10     $smarty->assign("section",$section);
11    
12     $main_file=$section;
13    
14     $title="CONTACT US";
15     $lpic="cont"; $lext=".jpg";
16     $mpic="contactus.gif";
17    
18     $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) );
19    
20     $from=str_replace(".php","",basename($HTTP_REFERER));
21 dpavlin 1.6 if (strstr($from,"?")) $from=substr($from,0,strpos($from,"?"));
22 dpavlin 1.1
23 dpavlin 1.8 $email="webmaster@pliva.hr"; // default
24    
25 dpavlin 1.1 $sth = $dbh->prepare("select email from emails where referer='$from' limit 1");
26     $sth->execute();
27     if ($row=$sth->fetchrow_hash()) {
28 dpavlin 1.4 $email=$row[email];
29 dpavlin 1.8 } else {
30     $sth = $dbh->prepare("select email from emails,menu where menu.section=referer and url='results.php?type=a'");
31     $sth->execute();
32     if ($row=$sth->fetchrow_hash()) {
33     $email=$row[email];
34     }
35 dpavlin 1.1 }
36    
37 dpavlin 1.4 $email=str_replace("\n","",$email);
38     $email=str_replace(" ","",$email);
39     $email_val=explode(",",$email);
40    
41 dpavlin 1.3 $sth = $dbh->prepare("select iso,name from countries order by name");
42 dpavlin 1.2 $sth->execute();
43     while ($row=$sth->fetchrow_hash()) {
44     $countries[]=$row;
45     }
46     $smarty->assign(array(countries=>$countries,
47 dpavlin 1.4 email_val=>$email_val,
48 dpavlin 1.2 ));
49    
50     include("common.inc");
51 dpavlin 1.4
52     if (! isset($mailto)) {
53     $main=$smarty->fetch("$main_file.tpl");
54     } else {
55     $main="Your comment is sent to $mailto. Thank you.";
56     include("quoted-printable.inc");
57 dpavlin 1.5 iso_mail("$fullname ($country) <$mailfrom>",$mailto,$subject,$comment);
58     # $main.="<pre>$mailto $fullname $mailfrom $country $subject $comment</pre>";
59 dpavlin 1.4 }
60 dpavlin 1.1
61 dpavlin 1.2 $smarty->assign( array(MAIN=>$main, from=>$from,
62     contact_section=>1,
63     ));
64    
65 dpavlin 1.1 $smarty->display("index.tpl");
66     ?>

  ViewVC Help
Powered by ViewVC 1.1.26