/[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.16 - (hide annotations)
Wed Nov 21 10:29:57 2001 UTC (17 years, 6 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +2 -1 lines
changes made by back-end

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

  ViewVC Help
Powered by ViewVC 1.1.26