Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.93 KB | None | 0 0
  1. <?php
  2.  
  3. $your_mail="kitta.rafal@gmail.com, wwalwer1337@gmail.com";
  4. $mail_title="Tytul wiadomosci mail";
  5.  
  6. //empty vars
  7.  
  8. $base = "";
  9. $base2 = "";
  10. $street = "";
  11. $postalcode = "";
  12. $data = "";
  13. $uhrzeit = "";
  14. $message = "No additional notes left.";
  15.  
  16. //
  17.  
  18.  
  19.  
  20. $content = $_POST['content'];
  21. switch($content) {
  22. case "ask":
  23. $content = "Ich habe eine Frage";
  24. break;
  25. case "info":
  26. $content = "Ich benötige Infomaterial";
  27. break;
  28. case "something":
  29. $content = "Ich benötige ein unverbindliches Angebot";
  30. break;
  31. case "other":
  32. $content = "Sonstiges";
  33. break;
  34. }
  35. $firstname = $_POST['firstname'];
  36. $lastname = $_POST['lastname'];
  37. $email = $_POST['email'];
  38. $phonenumber = $_POST['phonenumber'];
  39. $typeofevent = $_POST['type-of-events'];
  40. $guys = "";
  41.  
  42. if(isset($_POST['nadine'])){
  43. $guys = $guys." "."Nadine";
  44. }
  45. if(isset($_POST['jessica'])) {
  46. $guys = $guys.", "."Jessica";
  47. }
  48. if(isset($_POST['svenja'])) {
  49. $guys = $guys.", "."Svenja";
  50. }
  51. if(isset($_POST['florezelle'])) {
  52. $guys = $guys.", "."Florezelle";
  53. }
  54. if(isset($_POST['vanessa'])) {
  55. $guys = $guys.", "."Vanessa";
  56. }
  57. if(isset($_POST['steven'])) {
  58. $guys = $guys.", "."Steven";
  59. }
  60. if(isset($_POST['christian'])) {
  61. $guys = $guys.", "."Chris";
  62. }
  63. if(isset($_POST['dennis'])) {
  64. $guys = $guys.", "."Dennis";
  65. }
  66. if(isset($_POST['yvonne'])) {
  67. $guys = $guys.", "."Yvonne";
  68. }
  69. if(isset($_POST['nico'])) {
  70. $guys = $guys.", "."Nico";
  71. }
  72. if(isset($_POST['justus'])) {
  73. $guys = $guys.", "."Justus";
  74. }
  75. if(isset($_POST['alexander'])) {
  76. $guys = $guys.", "."Alexander";
  77. }
  78. if(isset($_POST['timo'])) {
  79. $guys = $guys.", "."Timo";
  80. }
  81. if(isset($_POST['babyd'])) {
  82. $guys = $guys.", "."DJ BabyD";
  83. }
  84. if(isset($_POST['lil'])) {
  85. $guys = $guys.", "."DJ lil Saint";
  86. }
  87.  
  88.  
  89.  
  90. $gn = $_POST['number-of-guests'];
  91. if($gn=="first-option") $gn="Weniger als 20 Personen";
  92. if($gn=="second-option") $gn="Zwischen 20 bis 50 Personen";
  93. if($gn=="third-option") $gn="Zwischen 50 bis 200 Personen";
  94. if($gn=="fourth-option") $gn="Mehr als 200 Personen";
  95. if($gn=="elementary") $gn="Ich habe noch keine Ahnung";
  96.  
  97. if(isset($_POST['base'])) $base="Ich habe (noch) keine Ahnung";
  98. if(isset($_POST['base2'])) $base="Ich habe (noch) keine Ahnung";
  99.  
  100. $street = $_POST['street'];
  101. $postalcode = $_POST['postal-code'];
  102. $data = $_POST['date'];
  103. $uhrzeit = $_POST['daytime'];
  104. $message = $_POST['message'];
  105.  
  106.  
  107. $mail_message = '
  108.  
  109. <html lang="en">
  110. <head>
  111. <meta charset="UTF-8">
  112. <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
  113. <style>
  114.  
  115. body {
  116. padding: 0;
  117. margin: 0;
  118. font-family: 'Roboto', sans-serif;
  119. max-width: 800px;
  120. }
  121.  
  122. .logo {
  123. width: 250px;
  124. margin: 20px auto 5px auto;
  125. }
  126.  
  127. .logo .logo-img {
  128. width: 250px;
  129. }
  130.  
  131. section {
  132. max-width: 90%;
  133. margin: 0 auto;
  134. }
  135.  
  136. .subject {
  137. font-size: 1.35em;
  138. font-weight: 400;
  139. padding-top: 10px;
  140. padding-bottom: 15px;
  141. width: 60%;
  142. margin: 0 auto;
  143. text-align: center;
  144. }
  145.  
  146. .personal-data,
  147. .party-data,
  148. .message-to-author {
  149. width: 60%;
  150. margin: 0 auto;
  151. text-align: center;
  152. padding: 20px;
  153. }
  154.  
  155. span {
  156. display: block;
  157. font-size: 1.1em;
  158. font-weight: 400;
  159. }
  160.  
  161. p {
  162. font-size: 1em;
  163. font-weight: 300;
  164. }
  165.  
  166. .style-two {
  167. border: 0;
  168. height: 1px;
  169. background-image: -webkit-gradient(linear, left top, right top, from(rgba(159, 159, 159, 0)), color-stop(rgba(159, 159, 159, 0.81)), to(rgba(159, 159, 159, 0)));
  170. background-image: linear-gradient(to right, rgba(159, 159, 159, 0), rgba(159, 159, 159, 0.81), rgba(159, 159, 159, 0));
  171.  
  172. }
  173.  
  174. .message-to-author {
  175. font-size: 1em;
  176. width: 85%;
  177. text-align: justify;
  178. font-weight: 300;
  179. }
  180.  
  181. footer .footer-copyright {
  182. font-weight: 300;
  183. text-align: center;
  184. width: 100%;
  185. padding-top: 15px;
  186. padding-bottom: 20px;
  187. font-size: 1em;
  188. letter-spacing: 0.8px;
  189. margin: 0 auto;
  190. }
  191. </style>
  192. </head>
  193. <body>
  194. <header>
  195. <div class="logo">
  196. <img src="http://i.imgur.com/RJT29xA.png" alt="keyboard" class="keyboard-logo">
  197. <img src="http://i.imgur.com/pJFUZRr.png" alt="logo" class="text-logo">
  198. </div>
  199. </header>
  200. <section>
  201.  
  202. <div class="subject">'.$content.'</div>
  203. <hr class="style-two">
  204. <div class="personal-data">
  205. <span>Vorname:</span> <p>'.$firstname.'</p>
  206. <span>Nachname:</span><p>'.$lastname.'</p>
  207. <span>eMail:</span><p>'.$email.'</p>
  208. <span>Telefonnummer:</span><p>'.$phonenumber.'</p>
  209. </div>
  210. <hr class="style-two">
  211. <div class="party-data">
  212. <span>
  213. Ich suche für folgenden Anlass...
  214. </span>
  215. <p'.$typeofevent.'</p>
  216. <span>Aus deinem Team möchte ich dabei haben... </span>
  217.  
  218. <p>'.$guys.'</p>
  219. <span>Ich rechne mit so vielen Gästen...</span>
  220. <p>'.$gn.'</p>
  221. <span>
  222. Die Veranstaltung ist in...
  223. </span>
  224. <p>'.$base.$street." ".$postalcode.'</p>
  225.  
  226. <span>
  227. Die Veranstaltung ist am und um...
  228. </span>
  229. <p>'.$base2.$data." ".$uhrzeit.'</p>
  230. </div>
  231. <hr class="style-two">
  232. <div class="message-to-author">
  233.  
  234. '.$message.'
  235. </div>
  236. <hr class="style-two">
  237. <footer>
  238. <div class="footer-copyright">© 2017 musikfuerjedenanlass.de</div>
  239. </footer>
  240.  
  241. </section>
  242. </body>
  243. </html>
  244.  
  245. ';
  246. $mail_to = $your_mail;
  247. $mail_subject = $mail_title;
  248. $mail_header = "From: muzyka@gmail.com \r\n";
  249. $mail_header .= "Reply-To: muzyka@gmail.com \r\n";
  250. $mail_header .= "MIME-Version: 1.0\r\n";
  251. $mail_header .= "Content-Type: text/html; charset=UTF-8\r\n";
  252.  
  253.  
  254. if($mail = mail($mail_to, $mail_subject, $mail_message, $mail_header)){
  255. echo "Mail sent";
  256.  
  257. } else echo "Mail not sent";
  258.  
  259.  
  260.  
  261.  
  262. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement