/[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

Diff of /contact.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.26