Code smell

This commit is contained in:
Igor Barkov (iwork) 2020-07-03 17:51:01 +03:00
parent a394c61be0
commit 7de55af40f

View File

@ -22,6 +22,7 @@ function private_access($uid)
} }
//$presents = db::c()->query('SELECT img, sender FROM `users_presents` WHERE expiration_date >= "?s" AND owner = ?i', date('Y-m-d'), $user->id); //$presents = db::c()->query('SELECT img, sender FROM `users_presents` WHERE expiration_date >= "?s" AND owner = ?i', date('Y-m-d'), $user->id);
function getnumrows() {}
$presents = []; $presents = [];
if (empty($user->id)): ?> if (empty($user->id)): ?>
@ -91,12 +92,11 @@ if (!empty($user->realname)) {
# Секретный раздел # Секретный раздел
# Если я любой паладин, и смотрю не админа, или я сам админ. # Если я любой паладин, и смотрю не админа, или я сам админ.
if ((private_access($uid) === MODERATOR_ACCESS && !$user->admin) || private_access($uid) === ADMINISTRATOR_ACCESS) { if ((private_access($uid) === MODERATOR_ACCESS && !$user->admin) || private_access($uid) === ADMINISTRATOR_ACCESS) {
//$ld = db::c()->query('SELECT * FROM `lichka` WHERE `pers` = ?i ORDER BY `id` ASC', $user['id']); $ld = db::c()->query('SELECT * FROM users_logs WHERE user_id = ?i ORDER BY `id` ASC', $user->id);
$ld = db::c()->query();
echo "<H4>Личное дело</H4>"; echo "<H4>Личное дело</H4>";
while ($row_ld = $ld->fetch_assoc()) { while ($row_ld = $ld->fetch_assoc()) {
$dat = date("d.m.Y H:i", $row_ld['date']); $text = date("d.m.Y H:i ", $row_ld['date']) . $row_ld['text'];
echo "<code>$dat {$row_ld['text']} </code><br />"; echo "<code>$text</code><br />";
} }
echo "<H4>Дополнительные сведения</H4>"; echo "<H4>Дополнительные сведения</H4>";