/[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.5 by dpavlin, Mon Mar 5 12:11:05 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="webmaster@pliva.hr";  
30  if ($row=$sth->fetchrow_hash()) {  if ($row=$sth->fetchrow_hash()) {
31          $email=$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  $email=str_replace("\n","",$email);  $email=str_replace("\n","",$email);
# Line 41  $smarty->assign(array(countries=>$countr Line 52  $smarty->assign(array(countries=>$countr
52    
53  include("common.inc");  include("common.inc");
54    
55  if (! isset($mailto)) {  if (isset($mailto) && check_required()) {
         $main=$smarty->fetch("$main_file.tpl");  
 } else {  
56          $main="Your comment is sent to $mailto. Thank you.";          $main="Your comment is sent to $mailto. Thank you.";
57          include("quoted-printable.inc");          include("quoted-printable.inc");
58          iso_mail("$fullname ($country) <$mailfrom>",$mailto,$subject,$comment);          iso_mail("$fullname ($country) <$mailfrom>",$mailto,$subject,$comment);
59  #       $main.="<pre>$mailto $fullname $mailfrom $country $subject $comment</pre>";  #       $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,  $smarty->assign( array(MAIN=>$main, from=>$from,
65          contact_section=>1,          contact_section=>1,
66          ));          ));
67    
   
 $smarty->assign("debug",$PHP_SELF." -- ".basename($PHP_SELF)." -- $section --".  
         $url[0] . "from: $from");  
   
   
68  $smarty->display("index.tpl");  $smarty->display("index.tpl");
69  ?>  ?>

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

  ViewVC Help
Powered by ViewVC 1.1.26