--- contact.php 2001/03/12 20:05:04 1.9 +++ contact.php 2001/03/27 10:26:34 1.12 @@ -20,6 +20,7 @@ if (! isset($from) || $from == "") { $from=str_replace(".php","",basename($HTTP_REFERER)); if (strstr($from,"?")) $from=substr($from,0,strpos($from,"?")); + if ($from == $HTTP_HOST || $from=="www.pliva.hr") $from="index"; } $email="webmaster@pliva.hr"; // default @@ -51,13 +52,13 @@ include("common.inc"); -if (! isset($mailto)) { - $main=$smarty->fetch("$main_file.tpl"); -} else { +if (isset($mailto) && check_required()) { $main="Your comment is sent to $mailto. Thank you."; include("quoted-printable.inc"); iso_mail("$fullname ($country) <$mailfrom>",$mailto,$subject,$comment); # $main.="
$mailto $fullname $mailfrom $country $subject $comment
"; +} else { + $main=$smarty->fetch("$main_file.tpl"); } $smarty->assign( array(MAIN=>$main, from=>$from,