Grazie per avere utilizzato i nostri servizi."); define("ADMOREINFO","Richiesta informazioni annuncio"); define("BLACKLISTED","Errore: indirizzo email bloccato. Contattare il webmaster"); break; //EN case "EN": define("PAGETITLE","Mooring ad contact :: SailingTheWeb"); define("PAGEDESCRIPTION","SailingTheWeb: Mooring ad contact"); define("MOREINFO","I would like more informations on the following ad"); define("NAME","your name and surname"); define("EMAIL","email (for our replies)"); define("PHONE","phone nr. (recommended)"); define("FREETEXT","any additional note"); define("SENDBTN","send"); define("ACCEPT","I accept"); define("PRIVACYLAW","the privacy law conditions"); define("INVALIDEMAIL","Error: invalid email address"); define("RECIPIENTERROR","Error: recipient address not fount. Please inform our webmaster"); define("MAILSENT","Your request has been sent to the user who will reply as soon as possible.
Thank you for using our online services."); define("ADMOREINFO","Ad info request"); define("BLACKLISTED","This email address was blocked. Please contact the webmaster"); break; } // ################################################################################ // LETTURA CAMPI (POST/GET) // ----------------------------- if (!$IDad=checkID($_GET["IDad"])) $IDad=checkID($_POST["IDad"]); $name=parseInput($_POST["*txt-name"]); // CONNESSIONE -- CHECK DB $cn=mysql_connect($DBserver, $DBuser, $DBpass) or die(DBCNDOWN); mysql_select_db($DBname, $cn) or die(DBSELECTERR); mysql_set_charset("utf8",$cn); // -------------------------- if ($IDad) { $sql="SELECT * FROM marinas, adsMarinas WHERE IDmarina=ID_marina AND IDad=$IDad"; $result=mysql_query($sql,$cn); if (mysql_num_rows($result)==1) $currAD=mysql_fetch_assoc($result); } if (!$currAD["IDad"]) $onLoad="parent.popUrl('popUpDiv',0,0,'');"; ?> <? echo PAGETITLE; ?>
//'" title="SailingTheWeb - home page">SailingTheWeb - home page

\n"; } ?>

"; $Mtext.="email: ".$emailFrom."
"; $Mtext.="tel: ".$phone."
"; $Mtext.=""; $Mtext.="

".MOREINFO."

"; $Mtext.="

".showString($currAD["marinaName"]." / ".$currAD["marinaLocation"]." (".countryName($currAD["ISOA2_country"]).")")."
"; $Mtext.=showNumber($currAD["length"],substr($SETUnits,0,2))." X ".showNumber($currAD["width"],substr($SETUnits,0,2))." ".substr($SETUnits,0,2)." | ".showNumber($currAD["price"])." ".$currAD["currency"]."

"; if ($freeText) $Mtext.=" 
".showString($freeText)."
"; // CERCA EMAIL DESTINATARIO mysql_select_db($DBclub, $cn); $sql="SELECT login.ID_ana, ID_gruppo, uname FROM login, adsMarinas WHERE IDwbm=ID_wbm AND IDad=$IDad"; $result=mysql_query($sql,$cn); if (mysql_num_rows($result)==1) { $IDana=mysql_result($result,0,0); $IDgruppo=mysql_result($result,0,1); $emailTo=mysql_result($result,0,2); if ($IDana && $IDgruppo>=50) { // seleziona email agenzia $sql="SELECT email FROM anagrafica WHERE IDana=$IDana"; $result=mysql_query($sql,$cn); if (mysql_num_rows($result)==1) { if (controllaEmail(mysql_result($result,0,0))) $emailTo=mysql_result($result,0,0); } $service="mooring ad - power"; } else $service="mooring ad - free"; // INVIA LA EMAIL if (sendMail($emailTo,ADMOREINFO." :: SailingTheWeb",$Mtext,$emailFrom,$format="HTML")) { // UPDATE LOGS // ---------------------------------------------------------------- saveContactLog ($name,$emailFrom,$emailTo,$Mtext,$service); // Contact log LOGads ("adsMarinas","Ncontacts","IDad",$IDad); // Ad counter // ---------------------------------------------------------------- $warning=MAILSENT; } } else $error=RECIPIENTERROR; } else $error=BLACKLISTED; } else $error=INVALIDEMAIL; if ($error) echo "
".$error."
"; else echo "
".$warning."
"; } else { ?>