/[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.8 by dpavlin, Mon Mar 12 12:53:16 2001 UTC revision 1.10 by dpavlin, Sun Mar 18 23:36:26 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  if (strstr($from,"?")) $from=substr($from,0,strpos($from,"?"));          $from=str_replace(".php","",basename($HTTP_REFERER));
22            if (strstr($from,"?")) $from=substr($from,0,strpos($from,"?"));
23    }
24    
25  $email="webmaster@pliva.hr";    // default  $email="webmaster@pliva.hr";    // default
26    
# Line 27  $sth->execute(); Line 29  $sth->execute();
29  if ($row=$sth->fetchrow_hash()) {  if ($row=$sth->fetchrow_hash()) {
30          $email=$row[email];          $email=$row[email];
31  } else {  } else {
32          $sth = $dbh->prepare("select email from emails,menu where menu.section=referer and url='results.php?type=a'");          $sth = $dbh->prepare("select email from emails,menu where menu.section=referer and url like '$from%'");
33          $sth->execute();          $sth->execute();
34          if ($row=$sth->fetchrow_hash()) {          if ($row=$sth->fetchrow_hash()) {
35                  $email=$row[email];                  $email=$row[email];
# Line 49  $smarty->assign(array(countries=>$countr Line 51  $smarty->assign(array(countries=>$countr
51    
52  include("common.inc");  include("common.inc");
53    
54  if (! isset($mailto)) {  if (isset($mailto) && check_required()) {
         $main=$smarty->fetch("$main_file.tpl");  
 } else {  
55          $main="Your comment is sent to $mailto. Thank you.";          $main="Your comment is sent to $mailto. Thank you.";
56          include("quoted-printable.inc");          include("quoted-printable.inc");
57          iso_mail("$fullname ($country) <$mailfrom>",$mailto,$subject,$comment);          iso_mail("$fullname ($country) <$mailfrom>",$mailto,$subject,$comment);
58  #       $main.="<pre>$mailto $fullname $mailfrom $country $subject $comment</pre>";  #       $main.="<pre>$mailto $fullname $mailfrom $country $subject $comment</pre>";
59    } else {
60            $main=$smarty->fetch("$main_file.tpl");
61  }  }
62    
63  $smarty->assign( array(MAIN=>$main, from=>$from,  $smarty->assign( array(MAIN=>$main, from=>$from,

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.26