mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Minor improvements (#882)
* Minor improvements * Updated * Updated * Updated * Update privmsg.php * Updated * Update admin_attach_cp.php
This commit is contained in:
parent
2c07660435
commit
4b453de64a
75 changed files with 699 additions and 735 deletions
|
@ -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']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue