Minor improvements (#882)

* Minor improvements

* Updated

* Updated

* Updated

* Update privmsg.php

* Updated

* Update admin_attach_cp.php
This commit is contained in:
Roman Kelesidis 2023-09-04 01:01:01 +07:00 committed by GitHub
commit 4b453de64a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
75 changed files with 699 additions and 735 deletions

View file

@ -13,7 +13,7 @@ if (!defined('BB_ROOT')) {
global $bb_cfg;
$data = array();
$data = [];
// usercount
$row = DB()->fetch_row("SELECT COUNT(*) AS usercount FROM " . BB_USERS . " WHERE user_id NOT IN(" . EXCLUDED_USERS . ")");
@ -68,27 +68,27 @@ if ($bb_cfg['birthday_check_day'] && $bb_cfg['birthday_enabled']) {
$date_today = bb_date(TIMENOW, 'md', false);
$date_forward = bb_date(TIMENOW + ($bb_cfg['birthday_check_day'] * 86400), 'md', false);
$birthday_today_list = $birthday_week_list = array();
$birthday_today_list = $birthday_week_list = [];
foreach ($sql as $row) {
$user_birthday = bb_date(strtotime($row['user_birthday']), 'md', false);
if ($user_birthday > $date_today && $user_birthday <= $date_forward) {
// user are having birthday within the next days
$birthday_week_list[] = array(
$birthday_week_list[] = [
'user_id' => $row['user_id'],
'username' => $row['username'],
'user_rank' => $row['user_rank'],
'user_birthday' => $row['user_birthday'],
);
'user_birthday' => $row['user_birthday']
];
} elseif ($user_birthday == $date_today) {
//user have birthday today
$birthday_today_list[] = array(
$birthday_today_list[] = [
'user_id' => $row['user_id'],
'username' => $row['username'],
'user_rank' => $row['user_rank'],
'user_birthday' => $row['user_birthday'],
);
'user_birthday' => $row['user_birthday']
];
}
}