/[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.13 by dpavlin, Mon Oct 1 14:05:16 2001 UTC
# Line 6  $smarty = new Smarty; Line 6  $smarty = new Smarty;
6    
7  $smarty->assign( array ( Title=>"Pliva d.d." ) );  $smarty->assign( array ( Title=>"Pliva d.d." ) );
8    
 $section=str_replace(".php","",basename($PHP_SELF));  
 $smarty->assign("section",$section);  
   
9  $main_file=$section;  $main_file=$section;
10    include("section.inc");
 $title="CONTACT US";  
 $lpic="cont"; $lext=".jpg";  
 $mpic="contactus.gif";  
11    
12  $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) );  $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) );
13    
14  $from=str_replace(".php","",basename($HTTP_REFERER));  if (! isset($from) || $from == "") {
15  if (strstr($from,"?")) $from=substr($from,0,strpos($from,"?"));          $from=str_replace(".php","",basename($HTTP_REFERER));
16            if (strstr($from,"?")) $from=substr($from,0,strpos($from,"?"));
17            if ($from == $HTTP_HOST || $from=="www.pliva.hr") $from="index";
18    }
19    
20  $email="webmaster@pliva.hr";    // default  $email="webmaster@pliva.hr";    // default
21    
# Line 27  $sth->execute(); Line 24  $sth->execute();
24  if ($row=$sth->fetchrow_hash()) {  if ($row=$sth->fetchrow_hash()) {
25          $email=$row[email];          $email=$row[email];
26  } else {  } else {
27          $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%'");
28          $sth->execute();          $sth->execute();
29          if ($row=$sth->fetchrow_hash()) {          if ($row=$sth->fetchrow_hash()) {
30                  $email=$row[email];                  $email=$row[email];
# Line 49  $smarty->assign(array(countries=>$countr Line 46  $smarty->assign(array(countries=>$countr
46    
47  include("common.inc");  include("common.inc");
48    
49  if (! isset($mailto)) {  if (isset($mailto) && check_required()) {
         $main=$smarty->fetch("$main_file.tpl");  
 } else {  
50          $main="Your comment is sent to $mailto. Thank you.";          $main="Your comment is sent to $mailto. Thank you.";
51          include("quoted-printable.inc");          include("quoted-printable.inc");
52          iso_mail("$fullname ($country) <$mailfrom>",$mailto,$subject,$comment);          iso_mail("$fullname ($country) <$mailfrom>",$mailto,$subject,$comment);
53  #       $main.="<pre>$mailto $fullname $mailfrom $country $subject $comment</pre>";  #       $main.="<pre>$mailto $fullname $mailfrom $country $subject $comment</pre>";
54    } else {
55            $main=$smarty->fetch("$main_file.tpl");
56  }  }
57    
58  $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.13

  ViewVC Help
Powered by ViewVC 1.1.26