Refactor
This commit is contained in:
parent
01ac9e04b9
commit
0b2df54f38
1 changed files with 16 additions and 10 deletions
|
@ -117,9 +117,11 @@ if (isset($_POST['user-id'], $_POST['section'])) {
|
||||||
|
|
||||||
if ($set) {
|
if ($set) {
|
||||||
$database
|
$database
|
||||||
->query('UPDATE `users`
|
->query(
|
||||||
|
'UPDATE `users`
|
||||||
SET ' . implode(',', $set) . '
|
SET ' . implode(',', $set) . '
|
||||||
WHERE `id` = ' . Sanitiser::getNumber($_POST['user-id']));
|
WHERE `id` = ' . Sanitiser::getNumber($_POST['user-id'])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($loginRequired) {
|
if ($loginRequired) {
|
||||||
|
@ -356,9 +358,11 @@ $page->navigation();
|
||||||
$user_is_active = '`last_login` >= CURDATE() - INTERVAL 60 DAY';
|
$user_is_active = '`last_login` >= CURDATE() - INTERVAL 60 DAY';
|
||||||
|
|
||||||
$count_users = $database
|
$count_users = $database
|
||||||
->query('SELECT COUNT(`id`)
|
->query(
|
||||||
|
'SELECT COUNT(`id`)
|
||||||
FROM `users`
|
FROM `users`
|
||||||
WHERE ' . $user_is_active . ';')
|
WHERE ' . $user_is_active . ';'
|
||||||
|
)
|
||||||
->fetch();
|
->fetch();
|
||||||
$count_users = reset($count_users);
|
$count_users = reset($count_users);
|
||||||
|
|
||||||
|
@ -373,10 +377,12 @@ $page->navigation();
|
||||||
);
|
);
|
||||||
|
|
||||||
$count_users_rc = $database
|
$count_users_rc = $database
|
||||||
->query('SELECT COUNT(`id`)
|
->query(
|
||||||
|
'SELECT COUNT(`id`)
|
||||||
FROM `users`
|
FROM `users`
|
||||||
WHERE ' . $user_is_active . '
|
WHERE ' . $user_is_active . '
|
||||||
AND `channel` = "release-candidate";')
|
AND `channel` = "release-candidate";'
|
||||||
|
)
|
||||||
->fetch();
|
->fetch();
|
||||||
$count_users_rc = reset($count_users_rc);
|
$count_users_rc = reset($count_users_rc);
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue