Commit 3238975fe954bf2861d08474b07cc7b408aa2a34

Authored by Eugeny Galkovskiy
1 parent 6029e9bb

123

Showing 1 changed file with 7 additions and 2 deletions   Show diff stats
www-arktika/email.php
@@ -7,6 +7,11 @@ @@ -7,6 +7,11 @@
7 date_default_timezone_set('Etc/UTC'); 7 date_default_timezone_set('Etc/UTC');
8 require 'PHPMailer/PHPMailerAutoload.php'; 8 require 'PHPMailer/PHPMailerAutoload.php';
9 9
  10 +
  11 + function getHtml($code, $email){
  12 +
  13 + return require "list.php";
  14 + }
10 15
11 if(isset($_POST['name']) && !empty($_POST['name']) && isset($_POST['email']) && !empty($_POST['email']) ) { 16 if(isset($_POST['name']) && !empty($_POST['name']) && isset($_POST['email']) && !empty($_POST['email']) ) {
12 17
@@ -53,8 +58,8 @@ if(isset($_POST['name']) && !empty($_POST['name']) && isset($_POST['email']) && @@ -53,8 +58,8 @@ if(isset($_POST['name']) && !empty($_POST['name']) && isset($_POST['email']) &&
53 $mail->Subject = 'Промокод на сайт semena.in.ua'; 58 $mail->Subject = 'Промокод на сайт semena.in.ua';
54 //Read an HTML message body from an external file, convert referenced images to embedded, 59 //Read an HTML message body from an external file, convert referenced images to embedded,
55 //convert HTML into a basic plain-text alternative body 60 //convert HTML into a basic plain-text alternative body
56 - $list = file_get_contents("list.php");  
57 - $mail->msgHTML(eval("\$list = \"$list\";");); 61 +
  62 + $mail->msgHTML(getHtml($code, $email) );
58 $mail->send(); 63 $mail->send();
59 //send the message, check for errors 64 //send the message, check for errors
60 header('Location: http://arktika.semena.in.ua/'); 65 header('Location: http://arktika.semena.in.ua/');