From 3c0273b236dd65a9a4b5e82ab46bb74d5875ba29 Mon Sep 17 00:00:00 2001 From: Repellent Date: Mon, 22 Dec 2025 16:32:12 +0500 Subject: [PATCH] =?UTF-8?q?=D0=B2=20=D0=BF=D0=B0=D0=BF=D0=BA=D1=83=20uploa?= =?UTF-8?q?ds/comments/=20=D0=BF=D1=80=D0=B8=20=D1=81=D0=BE=D0=B7=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B8=20=D0=B7=D0=B0=D0=BF=D0=B8=D1=88=D0=B5?= =?UTF-8?q?=D1=82=D1=81=D1=8F=20index.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/comment.php | 23 +++++++++++++++++------ css/mod_comment_styles.css | 6 +++--- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/class/comment.php b/class/comment.php index 449bad9..29f49c1 100644 --- a/class/comment.php +++ b/class/comment.php @@ -448,12 +448,23 @@ function commentListShow($tpl_dir) { $upload_path = BASE_DIR . '/uploads/comments/'; - // Создаем папку, если её нет - if (!is_dir($upload_path)) { - @mkdir($upload_path, 0775, true); - // Создаем пустой index.html для безопасности (запрет листинга папки) - @file_put_contents($upload_path . 'index.html', ''); - } +// Создаем папку, если её нет +if (!is_dir($upload_path)) { + @mkdir($upload_path, 0775, true); + + // Содержимое для защитного файла index.php + $index_content = ""; + + // Создаем index.php для безопасности (запрет листинга папки и редирект) + @file_put_contents($upload_path . 'index.php', $index_content); +} $allowed_mime = ['image/jpeg', 'image/png', 'image/gif']; $file_info = @getimagesize($_FILES['comment_image']['tmp_name']); diff --git a/css/mod_comment_styles.css b/css/mod_comment_styles.css index 7bd35a4..e7e5bf3 100644 --- a/css/mod_comment_styles.css +++ b/css/mod_comment_styles.css @@ -166,7 +166,7 @@ display: flex !important; align-items: center !important; /* ПРИЖИМАЕМ КНОПКИ ВПРАВО */ - justify-content: flex-end !important; +/* justify-content: flex-end !important; */ /* ФИКСИРОВАННАЯ ВЫСОТА (чтобы не прыгало как на Screenshot 5) */ min-height: 48px !important; @@ -187,9 +187,9 @@ } /* Гарантируем, что текст таймера тоже будет справа */ -[id^="timer_container_"] { +/*[id^="timer_container_"] { text-align: right !important; -} +}*/ /* Если нужно, чтобы кнопки "Ответить" и "Удалить" были разнесены (одну влево, другие вправо) */ /* .mod_comment_footer { justify-content: space-between !important; } */ \ No newline at end of file