From 2a5f9f585c8e542e7acefae74680020adf265067 Mon Sep 17 00:00:00 2001 From: Eugeny Galkovskiy Date: Fri, 4 Nov 2016 15:53:43 +0200 Subject: [PATCH] 123 --- www-arktika/email.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/www-arktika/email.php b/www-arktika/email.php index dedb7d0..a93b65e 100644 --- a/www-arktika/email.php +++ b/www-arktika/email.php @@ -7,14 +7,15 @@ date_default_timezone_set('Etc/UTC'); require 'PHPMailer/PHPMailerAutoload.php'; - // Читаем содержимое - $code = 'fdfdfdd'; - $text = file_get_contents("list.php"); - // Переводим содержимое в видимую форму - $text = htmlspecialchars($text); - // Выводим содержимое файла - $text = eval($text); - die(); + function getContent($code){ + // Читаем содержимое + $code = 'fdfdfdd'; + $text = file_get_contents("list.php"); + // Переводим содержимое в видимую форму + $text = htmlspecialchars($text); + return str_replace("{code}", $code, $text); + + } if(isset($_POST['name']) && !empty($_POST['name']) && isset($_POST['email']) && !empty($_POST['email']) ) { @@ -62,7 +63,7 @@ if(isset($_POST['name']) && !empty($_POST['name']) && isset($_POST['email']) && //Read an HTML message body from an external file, convert referenced images to embedded, //convert HTML into a basic plain-text alternative body - $mail->msgHTML(getHtml($code, $email) ); + $mail->msgHTML(getContent($code)); $mail->send(); //send the message, check for errors header('Location: http://arktika.semena.in.ua/'); -- libgit2 0.21.4