Φόρμα επικοινωνίας

0 ){ $restformdata[$key] .= $val; } } $contacttypes=array(1=>"Contact Form", 2=>"Reservation Request", 3=>"City Comment", 4=>"Sight Comment", 5=>"News Comment", 6=>"Newsletter", 7=>"Blog, Page"); if(isset($_POST["navform"])){ //================================================================================== //if(strstr($_POST['onoma'], "\n")) die ("WRONG ACTION!"); if(strstr($_POST['email'], "\\n")) die ("WRONG ACTION A!"); //if(strstr($_POST['comments'],"\n"))die("WRONG ACTION!"); if(strstr($_POST['comments'],"\\n"))die("WRONG ACTION B!"); if(strstr($_POST['comments'],"@"))die("WRONG ACTION C!"); if(strstr($_POST['comments'],"$"))die("WRONG ACTION K!"); if(strstr($_POST['comments'],"%"))die("WRONG ACTION N!"); if(strstr($_POST['comments'],"dollar"))die("WRONG ACTION M!"); if(strstr($_POST['comments'],"http://"))die("WRONG ACTION D!"); if(strstr($_POST['comments'],"https://"))die("WRONG ACTION F!"); if(strstr($_POST['comments'],"Discount"))die("WRONG ACTION R!"); if(strstr($_POST['comments'],"WARRANTY"))die("WRONG ACTION T!"); if($_POST['onoma']=="Name")die("WRONG ACTION E!"); //preg_match("/\d+/",$_POST['tel'],$result); //echo $result[0]; // prueft ob Zahlen im Telefon //if( !$result[0] )die("WRONG ACTION F!"); if(strstr($_POST['onoma'],"!") || strstr($_POST['epitheto'],"!"))die("WRONG ACTION G!"); if(strstr($_POST['onoma'],"1") || strstr($_POST['epitheto'],"1"))die("WRONG ACTION G!"); //==================================================================================== if(isset($_POST["type_id"])){ $contacttype = $contacttypes[$_POST["type_id"]]; }else{ $contacttype="Reservation Request"; } $to = "aggelos@istorama.com"; $betreff = $contacttype." - ".$_POST["sbj_2"]." ".$_POST["sbj_3"]." ".$_POST["title"]." (hosted by Travelpilot.gr)"; $message = "-------------------------------------------\n" ."Subject: ".$_POST["sbj_1"]." ".$_POST["sbj_2"]." ".$_POST["sbj_3"]." ".$_POST["title"]." \n" ."------------------------------------------\n" ."Name: ".$_POST["epitheto"]." ".$_POST["onoma"]." \n" ."Adresse: ".$_POST["address"]." \n" ."City: ".$_POST["city"]."\n" ."Country: ".$_POST["country"]." \n" ."Phone: ".$_POST["tel"]." \n" ."Email: ".$_POST["email"]." \n" ."Email επαλήθευσης: ".$_POST["email_epal"]." \n " ."-----------------------------------\n" ."REQUEST: \n\n"; if($_POST["afixi"]){ $message .= "Arrival: ".$_POST["afixi"]." \n" ; } $message .= "Departure: ".$_POST["anaxorisi"]." \n" ."Persons: ".$_POST["persons"]." \n" ."Rooms: ".$_POST["rooms"]." \n"; if($accommodation_type){ $message .= "Accommodation type: $accommodation_type \n" ."Package type: $package_type \n" ."Budget: $budget \n"; } if($restformdata){ foreach($restformdata as $name => $wert){ $message .= "$name = $wert \n"; } } if($_POST["promocode"]){ $message .= "Κωδικός Έκπτωσης: ".$_POST["promocode"]." \n" ; } $message .= "Comments: ".$_POST["comments"]." \n\n" ."-----------------------------------\n" ."Referer: ".$_SERVER['HTTP_REFERER']." \n" ."IP: ".$_SERVER['REMOTE_ADDR']." \n"; $header = "From: ".$_POST["epitheto"]." ".$_POST["onoma"]." <".$_POST["email"]."> \n "; mail($to,$betreff,$message,$header ); //echo nl2br($message); //update package_tbl : package_requests: if($_POST["sbj_pid"]){ mysql_query("UPDATE agency_package_tbl SET package_requests=(package_requests+1) WHERE package_id='".$_POST["sbj_pid"]."'"); } //informiere db: if($_POST["title"]){ $myreqTitle=$_POST["title"]; }else{ $myreqTitle = $_POST["sbj_1"]." ".$_POST["sbj_2"]." ".$_POST["sbj_3"]; } if($restformdata){ foreach($restformdata as $name => $wert){ $hotelrooms .= "$name=$wert;"; } } $sql_req="INSERT INTO req_tbl(type_id,title,epitheto,onoma,email,email_confirm,address,city,tel,persons,rooms,departure,notes,hotelrooms," ." referer,package_id,agency_id,ip,date_added) " ." VALUES('".$_POST["type_id"]."', '".$myreqTitle."','".$_POST["epitheto"]."','" .$_POST["onoma"]."','".$_POST["email"]."','".$_POST["email_epal"]."','".$_POST["address"]."','".$_POST["city"]."','".$_POST["tel"] ."','".$_POST["persons"]."','".$_POST["rooms"]."','".$_POST["anaxorisi"]."','".$_POST["comments"]."','".$hotelrooms."','" .$_SERVER['HTTP_REFERER'].";".$_POST["ref1"]."','".$_POST["sbj_pid"]."','".$_POST["sbj_aid"]."', '".$_SERVER['REMOTE_ADDR']."','" .date("Y-m-d")."')"; mysql_query($sql_req); //echo mysql_error(); ?>

Επιβεβαίωση αποστολής μηνύματος


Το μήνυμά σας έχει αποσταλεί.

Θα λάβετε την σχετική απάντηση το συντομότερο δυνατό.

 

 

[ επιστροφή ]


 

 

Για τα σχόλια, παρατηρήσεις ή εκδήλωση ενδιαφέροντος συμπληρώστε την ακόλουθη φόρμα:


Για το Istorama.com