diff --git a/www-arktika/email.php b/www-arktika/email.php index 71a1fb7..14a82a6 100644 --- a/www-arktika/email.php +++ b/www-arktika/email.php @@ -7,6 +7,11 @@ date_default_timezone_set('Etc/UTC'); require 'PHPMailer/PHPMailerAutoload.php'; + + function getHtml($code, $email){ + + return require "list.php"; + } if(isset($_POST['name']) && !empty($_POST['name']) && isset($_POST['email']) && !empty($_POST['email']) ) { @@ -53,8 +58,8 @@ if(isset($_POST['name']) && !empty($_POST['name']) && isset($_POST['email']) && $mail->Subject = 'Промокод на сайт semena.in.ua'; //Read an HTML message body from an external file, convert referenced images to embedded, //convert HTML into a basic plain-text alternative body - $list = file_get_contents("list.php"); - $mail->msgHTML(eval("\$list = \"$list\";");); + + $mail->msgHTML(getHtml($code, $email) ); $mail->send(); //send the message, check for errors header('Location: http://arktika.semena.in.ua/'); -- libgit2 0.21.4