/[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.6 - (hide annotations)
Mon Mar 5 15:22:27 2001 UTC (23 years ago) by dpavlin
Branch: MAIN
Changes since 1.5: +1 -0 lines
nuke QUERY_STRING

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     $sth = $dbh->prepare("select email from emails where referer='$from' limit 1");
24     $sth->execute();
25 dpavlin 1.4 $email="webmaster@pliva.hr";
26 dpavlin 1.1 if ($row=$sth->fetchrow_hash()) {
27 dpavlin 1.4 $email=$row[email];
28 dpavlin 1.1 }
29    
30 dpavlin 1.4 $email=str_replace("\n","",$email);
31     $email=str_replace(" ","",$email);
32     $email_val=explode(",",$email);
33    
34 dpavlin 1.3 $sth = $dbh->prepare("select iso,name from countries order by name");
35 dpavlin 1.2 $sth->execute();
36     while ($row=$sth->fetchrow_hash()) {
37     $countries[]=$row;
38     }
39     $smarty->assign(array(countries=>$countries,
40 dpavlin 1.4 email_val=>$email_val,
41 dpavlin 1.2 ));
42    
43     include("common.inc");
44 dpavlin 1.4
45     if (! isset($mailto)) {
46     $main=$smarty->fetch("$main_file.tpl");
47     } else {
48     $main="Your comment is sent to $mailto. Thank you.";
49     include("quoted-printable.inc");
50 dpavlin 1.5 iso_mail("$fullname ($country) <$mailfrom>",$mailto,$subject,$comment);
51     # $main.="<pre>$mailto $fullname $mailfrom $country $subject $comment</pre>";
52 dpavlin 1.4 }
53 dpavlin 1.1
54 dpavlin 1.2 $smarty->assign( array(MAIN=>$main, from=>$from,
55     contact_section=>1,
56     ));
57    
58 dpavlin 1.1
59     $smarty->assign("debug",$PHP_SELF." -- ".basename($PHP_SELF)." -- $section --".
60     $url[0] . "from: $from");
61    
62    
63     $smarty->display("index.tpl");
64     ?>

  ViewVC Help
Powered by ViewVC 1.1.26