Guest User

Untitled

a guest
Apr 8th, 2018
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. <?php
  2. foreach ($_POST as $key=>$value) { $$key = $value; }
  3.  
  4. $EmailTo = "andrew@fiber-hosting.com";
  5. $Subject = "New $form Web-Form Inquiry - Fiber-Hosting.com";
  6.  
  7.  
  8. if ($form == "Contact") {
  9. if ($recipient == "abuse") {
  10. $recipient = "abuse@fiber-hosting.com"; }
  11.  
  12. if ($recipient == "billing") {
  13. $recipient = "billing@fiber-hosting.com"; }
  14.  
  15. if ($recipient == "info") {
  16. $recipient = "info@fiber-hosting.com"; }
  17.  
  18. if ($recipient == "reboot") {
  19. $recipient = "reboot@fiber-hosting.com"; }
  20.  
  21. if ($recipient == "sales") {
  22. $recipient = "sales@fiber-hosting.com"; }
  23.  
  24. if ($recipient == "support") {
  25. $recipient = "support@fiber-hosting.com"; }
  26.  
  27. if ($recipient == "webmaster") {
  28. $recipient = "webmaster@fiber-hosting.com"; }
  29. }
  30.  
  31. $Body .= "";
  32. if (isset($recipient)){
  33. $Body .= "Here is a new $form form submission result sent to '$recipient'.\r\n";
  34. } else {
  35. $Body .= "Here is a new $form form submission result sent to you.\r\n";
  36. }
  37.  
  38. if (isset($name)) {
  39. $name = "$firstname $lastname";
  40. $Body .= "Name: ";
  41. $Body .= $name;
  42. $Body .= "\n";
  43. }
  44.  
  45. if (isset($email)) {
  46. $Body .= "Email: ";
  47. $Body .= $email;
  48. $Body .= "\n";
  49. }
  50.  
  51. if (isset($phone)) {
  52. $Body .= "Phone #: ";
  53. $Body .= $phone;
  54. $Body .= "\n"; }
  55.  
  56. if (isset($messenger)) {
  57. $Body .= "Instant Messaging: ";
  58. $Body .= $messenger;
  59. $Body .= "\n"; }
  60.  
  61. if (isset($bestwaytocontact)){
  62. $Body .= "Best way to contact: ";
  63. $Body .= $bestwaytocontact;
  64. $Body .= "\n";}
  65.  
  66. if (isset($urgency)) {
  67. $Body .= "Urgency: ";
  68. $Body .= $urgency;
  69. $Body .= "\n";}
  70.  
  71. if (isset($message)) {
  72. $Body .= "Message: ";
  73. $Body .= $message;
  74. $Body .= "\n";}
  75.  
  76. if ($form == "design") {
  77. $recipient = "web-design@fiber-hosting.com";
  78. $Body .= "Project Type: ";
  79. $Body .= $projecttype;
  80. $Body .= "\n";
  81. $Body .= "Projected time frame: ";
  82. $Body .= $timeframe;
  83. $Body .= "\n";
  84. $Body .= "Project Details: ";
  85. $Body .= $projectdetails;
  86. $Body .= "\n";
  87.  
  88. if (isset($siteurl)) {
  89. $Body .= "Site URL: ";
  90. $Body .= $siteurl;
  91. $Body .= "\n"; }
  92.  
  93. if (isset($messenger)) {
  94. $Body .= "Instant Messaging: ";
  95. $Body .= $messenger;
  96. $Body .= "\n"; }
  97. }
  98.  
  99.  
  100.  
  101. $success = mail($EmailTo, $Subject, $Body, "From: <$recipient>");
  102. $name = "$firstname $lastname";
  103.  
  104. include 'includes/header.php';
  105. // redirect to success page
  106. if ($success){
  107. ?>
  108.  
  109. <h2>Thank You</h2>
  110. <p>
  111. <?php
  112. print "Thank you for your time $name. A member of our staff will contact you by the contact method you requested within 24 hours."; ?>
  113. </p>
  114. </div>
  115. </div>
  116. <div class="clear"></div>
  117. <div id="carriers"> </div>
  118. <div class="pbg">
  119. <p>Fiber Hosting support team is always on call for problems that might occur while you are hosting your content with us. Fiber Hosting does not backup your content. You the user are responsible for the backup of your files. You either must do this on your own or with third party software.</p>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. <!-- END MAIN CONTENT -->
  126. <?php include("footer.html"); ?>
  127. <?php
  128. }
  129. else{
  130. print "Sorry there was a problem submitting the form. Please notify webmaster.";
  131. }
  132. include 'includes/footer.php';
  133. ?>
Add Comment
Please, Sign In to add comment