Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. define(REF,"http://www.raznahotel.lv/reservation_en.htm");
  2. define(TO,"albatross@raznahotel.lv ");
  3. define(SUBJECT,"New reservation HOTEL ALBATROSS - ENGLISH LANG.-!");
  4. define(OK,"http://www.raznahotel.lv/reservation_confirm_en.htm");
  5. define(FAIL,"http://www.raznahotel.lv/confirm_error_en.htm");
  6.  
  7. if ($_SERVER["HTTP_REFERER"] == REF) {
  8.  
  9. condition = mail(TO, SUBJECT,
  10.  
  11. "NEW Booking request (EN):
  12.  
  13. Date: ".date("H:i:s d.m.Y")."
  14. Name: ".strip_tags($_POST["vards"])."
  15. Surname: ".strip_tags($_POST["uzvards"])."
  16. Order: ".strip_tags($_POST["veids"])."
  17. Order: ".strip_tags($_POST["veids1"])."
  18. Number of persons:: ".preg_replace("[^0-9]", "", strip_tags($_POST["personu_skaits"]))."
  19. From: ".preg_replace("[^0-9]", "", strip_tags($_POST["laiks_no_diena"]))." ".strip_tags($_POST["laiks_no_menesis"])."
  20. Till: ".preg_replace("[^0-9]", "", strip_tags($_POST["laiks_liidz_diena"]))." ".strip_tags($_POST["laiks_liidz_menesis"])."
  21. Telephone: (".preg_replace("[^0-9]", "", strip_tags($_POST["tel1"])).") ".preg_replace("[^0-9]", "", strip_tags($_POST["tel2"]))."
  22. Address: ".strip_tags($_POST["adrese"])."
  23. E-Mail: ".strip_tags($_POST["epasts"])."
  24. Questions, special wishes: ".strip_tags($_POST["komentari"])."
  25.  
  26. User browser: ".strip_tags($_SERVER["HTTP_USER_AGENT"])."
  27. User IP address: ".$_SERVER["REMOTE_ADDR"])
  28.  
  29. if (condition)
  30. {
  31. Header("Location: ".OK);
  32. } else {
  33. Header("Location: ".FAIL);
  34. }
  35. } else {
  36. Header("Location: ".FAIL);
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement