wikipoints/views/user/notification.php

32 lines
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
setlocale(LC_ALL, 'ru_RU.UTF-8');
if ($notification->readed == 0) {print '<b>';}
switch ($notification->type) {
case Notifications::typePointConfirmed:
print strftime('%d %b %H:%M', $notification->date).' — Ваша точка <a href="/point/'.$notification->objectId.'">"'.$notification->RefPoint->name.'"</a> прошла модерацию.';
break;
case Notifications::typePointDeleted:
print strftime('%d %b %H:%M', $notification->date).' — Ваша точка <a href="/point/'.$notification->objectId.'">"'.$notification->RefPoint->name.'"</a> ОТКЛОНЕНА модератором.';
break;
case Notifications::typeNewCommentPoint:
$comment = $notification->RefComment;
$point = Point::model()->getByPK($comment->parentId);
print strftime('%d %b %H:%M', $notification->date).' — Новый <a href="/point/'.$point->id.'#comment'.$comment->id.'">комментарий</a> к точке <a href="/point/'.$point->id.'">"'.$point->name.'"</a>.';
break;
case Notifications::typeNewCommentArticle:
$comment = $notification->RefComment;
$article = Article::model()->getByPK($comment->parentId);
print strftime('%d %b %H:%M', $notification->date).' — Новый <a href="/article/'.$article->id.'#comment'.$comment->id.'">комментарий</a> к статье <a href="/article/'.$article->id.'">"'.$article->title.'"</a>.';
break;
case Notifications::typeReply:
$comment = $notification->RefComment;
print strftime('%d %b %H:%M', $notification->date).' — '.$comment->RefUser->nick.' <a href="/'.$comment->parentType.'/'.$comment->parentId.'#comment'.$comment->id.'">ответил(-а)</a> на ваш комментарий.';
break;
default:
break;
}
if ($notification->readed == 0) {print '</b>';}