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)); |
$from=str_replace(".php","",basename($HTTP_REFERER)); |
21 |
|
if (strstr($from,"?")) $from=substr($from,0,strpos($from,"?")); |
22 |
|
|
23 |
$sth = $dbh->prepare("select email from emails where referer='$from' limit 1"); |
$sth = $dbh->prepare("select email from emails where referer='$from' limit 1"); |
24 |
$sth->execute(); |
$sth->execute(); |
25 |
$email_to="webmaster@pliva.hr"; |
$email="webmaster@pliva.hr"; |
26 |
if ($row=$sth->fetchrow_hash()) { |
if ($row=$sth->fetchrow_hash()) { |
27 |
$email_to=$row[email]; |
$email=$row[email]; |
28 |
} |
} |
29 |
|
|
30 |
$sth = $dbh->prepare("select iso,name from countries order by iso"); |
$email=str_replace("\n","",$email); |
31 |
|
$email=str_replace(" ","",$email); |
32 |
|
$email_val=explode(",",$email); |
33 |
|
|
34 |
|
$sth = $dbh->prepare("select iso,name from countries order by name"); |
35 |
$sth->execute(); |
$sth->execute(); |
36 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
37 |
$countries[]=$row; |
$countries[]=$row; |
38 |
} |
} |
39 |
$smarty->assign(array(countries=>$countries, |
$smarty->assign(array(countries=>$countries, |
40 |
email_to=>$email_to, |
email_val=>$email_val, |
41 |
)); |
)); |
42 |
|
|
43 |
include("common.inc"); |
include("common.inc"); |
44 |
$main=$smarty->fetch("$main_file.tpl"); |
|
45 |
|
if (! isset($mailto)) { |
46 |
|
$main=$smarty->fetch("$main_file.tpl"); |
47 |
|
} else { |
48 |
|
$main="Your comment is sent to $mailto. Thank you."; |
49 |
|
include("quoted-printable.inc"); |
50 |
|
iso_mail("$fullname ($country) <$mailfrom>",$mailto,$subject,$comment); |
51 |
|
# $main.="<pre>$mailto $fullname $mailfrom $country $subject $comment</pre>"; |
52 |
|
} |
53 |
|
|
54 |
$smarty->assign( array(MAIN=>$main, from=>$from, |
$smarty->assign( array(MAIN=>$main, from=>$from, |
55 |
contact_section=>1, |
contact_section=>1, |