c = $user_id; } public function class($class) { $this->class = $class; } public function content($table) { $content = json_decode($this->c['content'], true); return $content[$table]; } public function i() { $user = new User($this->c['user_id']); $content = json_decode($this->c['content'], true); echo '
'.Date::zmdate($this->c['posted_at']).'
Цитировать · Ссылка '; echo '
'.htmlspecialchars($user->i('username')).' · '; if (json_decode($user->i('content'), true)['aboutrid']['value'] != null) { echo ''; } if (json_decode($user->i('content'), true)['aboutlive']['value'] != null) { echo ' '.htmlspecialchars(json_decode($user->i('content'), true)['aboutlive']['value']); } if ($content['edited'] === 'true') { echo '
(отредактировано)'; } if ($user->i('admin') === 1) { $admintype = ' · Администратор сервера'; } else if ($user->i('admin') === 2) { $admintype = ' · Фотомодератор'; } if ((int)Vote::countcommrates($this->c['id'], -1) >= 1) { $commclass = 'pro'; $symb = '+'; } else if ((int)Vote::countcommrates($this->c['id'], -1) < 0) { $commclass = 'con'; $symb = ''; } else if ((int)Vote::countcommrates($this->c['id'], -1) === 0) { $commclass = ''; } echo '
Фото: '.Photo::fetchAll($this->c['user_id']).' '.$admintype.'
'.preg_replace("~(?:[\p{M}]{1})([\p{M}])+?~uis","", htmlspecialchars($this->c['body'])).'
'; echo ''; if ($this->c['user_id'] === Auth::userid()) { echo '
'; } }