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