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,"?")); |
if (strstr($from,"?")) $from=substr($from,0,strpos($from,"?")); |
22 |
|
|
23 |
|
$email="webmaster@pliva.hr"; // default |
24 |
|
|
25 |
$sth = $dbh->prepare("select email from emails where referer='$from' limit 1"); |
$sth = $dbh->prepare("select email from emails where referer='$from' limit 1"); |
26 |
$sth->execute(); |
$sth->execute(); |
|
$email="webmaster@pliva.hr"; |
|
27 |
if ($row=$sth->fetchrow_hash()) { |
if ($row=$sth->fetchrow_hash()) { |
28 |
$email=$row[email]; |
$email=$row[email]; |
29 |
|
} else { |
30 |
|
$sth = $dbh->prepare("select email from emails,menu where menu.section=referer and url='results.php?type=a'"); |
31 |
|
$sth->execute(); |
32 |
|
if ($row=$sth->fetchrow_hash()) { |
33 |
|
$email=$row[email]; |
34 |
|
} |
35 |
} |
} |
36 |
|
|
37 |
$email=str_replace("\n","",$email); |
$email=str_replace("\n","",$email); |
62 |
contact_section=>1, |
contact_section=>1, |
63 |
)); |
)); |
64 |
|
|
|
|
|
|
$smarty->assign("debug",$PHP_SELF." -- ".basename($PHP_SELF)." -- $section --". |
|
|
$url[0] . "from: $from"); |
|
|
|
|
|
|
|
65 |
$smarty->display("index.tpl"); |
$smarty->display("index.tpl"); |
66 |
?> |
?> |