mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-11-14 19:19:15 +03:00
decline reasons in history
This commit is contained in:
parent
9390462c81
commit
6f3bb7aa30
2 changed files with 29 additions and 2 deletions
|
@ -20,5 +20,27 @@ class Photo {
|
|||
$content = json_decode(self::i('content'), true);
|
||||
return $content[$table];
|
||||
}
|
||||
public function declineReason($number) {
|
||||
switch ($number) {
|
||||
case 1:
|
||||
return 'Малоинформативный бред';
|
||||
break;
|
||||
case 2:
|
||||
return 'Не подходит для сайта';
|
||||
break;
|
||||
case 3:
|
||||
return 'Порнография';
|
||||
break;
|
||||
case 4:
|
||||
return 'Травля/Издевательство над человеком';
|
||||
break;
|
||||
case 5:
|
||||
return 'Расчленёнка';
|
||||
break;
|
||||
default:
|
||||
return 'Не подходит для сайта';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
use \App\Services\{Auth, DB, Date};
|
||||
use \App\Models\User;
|
||||
use \App\Models\{User, Photo};
|
||||
|
||||
//$userprofile = new User(explode('/', $_SERVER['REQUEST_URI'])[2]);
|
||||
?>
|
||||
|
@ -55,6 +55,7 @@ use \App\Models\User;
|
|||
$color = 's12';
|
||||
}
|
||||
$author = new User($p['user_id']);
|
||||
$photo = new Photo($p['id']);
|
||||
echo ' <tr class="'.$color.'">
|
||||
<td class="pb-photo pb_photo">
|
||||
<a href="/photo/'.$p['id'].'/" target="_blank" class="prw">
|
||||
|
@ -64,7 +65,11 @@ use \App\Models\User;
|
|||
</td>
|
||||
<td class="d">
|
||||
<p><span style="word-spacing:-1px"><b>'.htmlspecialchars($p['place']).'</b></span></p>
|
||||
<p class="sm"><b>'.Date::zmdate($p['posted_at']).'</b><br>Автор: <a href="/author/'.$p['user_id'].'/">'.htmlspecialchars($author->i('username')).'</a></p>
|
||||
<p class="sm"><b>'.Date::zmdate($p['posted_at']).'</b><br>Автор: <a href="/author/'.$p['user_id'].'/">'.htmlspecialchars($author->i('username')).'</a></p>';
|
||||
if ($p['moderated'] === 2) {
|
||||
echo '<p class="sm"><b>Причина отклонения: '.$photo->declineReason($photo->content('declineReason')).'</b></p>';
|
||||
}
|
||||
echo '
|
||||
|
||||
</td>
|
||||
<td class="c" style="padding:10px">
|
||||
|
|
Loading…
Reference in a new issue