diff --git a/admin/profile.php b/admin/profile.php index b07dbe1..b3e28df 100644 --- a/admin/profile.php +++ b/admin/profile.php @@ -43,6 +43,7 @@ $image = new Thumbs($_SERVER['DOCUMENT_ROOT'] . $File->getPath()); $image->thumb(300, 300); + $image->watermark(UPLOADS_PATH . '/watermark_small.png', 'bottom-right', 50); $image->save(); } diff --git a/admin/threads.php b/admin/threads.php index 96b7808..04cfeda 100644 --- a/admin/threads.php +++ b/admin/threads.php @@ -99,7 +99,7 @@
Задания в очереди
| @@ -124,8 +124,20 @@ $arTasks = $MQ->getTasks(10, 'priority', 'asc'); foreach($arTasks as $task) { ?> - | |||
|---|---|---|---|
| =$task['in_progress'] === MQ::VALUE_Y ? 'R' : '';?> | +|||
| =$task['in_progress'] === MQ::VALUE_Y ? 'RUN' : '';?> | =$task['id'];?> | =$task['active'] === MQ::VALUE_Y ? 'Да' : 'Нет';?> | =$task['in_progress'] === MQ::VALUE_Y ? 'Да' : 'Нет';?> | diff --git a/core/config.php b/core/config.php index f153d9f..e2dd469 100644 --- a/core/config.php +++ b/core/config.php @@ -10,6 +10,11 @@ */ define('ROOT_PATH', $_SERVER['DOCUMENT_ROOT']); + /** + * Путь до папки загрузок + */ + const UPLOADS_PATH = ROOT_PATH . '/uploads'; + /** * Путь до директории с логами */ diff --git a/core/lib/Core/Helpers/Thumbs.class.php b/core/lib/Core/Helpers/Thumbs.class.php index 129eab8..3bc698d 100644 --- a/core/lib/Core/Helpers/Thumbs.class.php +++ b/core/lib/Core/Helpers/Thumbs.class.php @@ -731,7 +731,7 @@ /** * Выводит изображение в браузер. */ - public function output($quality = 100) + public function output($quality = 100): void { switch ($this->type) { case 1: @@ -756,7 +756,7 @@ /** * Выводит изображение в браузер и Сохраняет его. */ - public function saveOut($filename, $quality = 100) + public function saveOut($filename, $quality = 100): void { if (empty($filename)) { $filename = $this->filename; @@ -781,7 +781,7 @@ readfile($filename); } - public function destroy() + public function destroy(): void { imagedestroy($this->img); } diff --git a/uploads/watermark_small.png b/uploads/watermark_small.png new file mode 100644 index 0000000..a68f6fc Binary files /dev/null and b/uploads/watermark_small.png differ