$photo_failure = false;
$filename = basename($photo);
- $curlResult = Network::curl($photo, true);
+ $curlResult = DI::httpRequest()->get($photo, true);
if ($curlResult->isSuccess()) {
$img_str = $curlResult->getBody();
$type = $curlResult->getContentType();
'total_users' => 0,
'active_users_halfyear' => 0,
'active_users_monthly' => 0,
+ 'active_users_weekly' => 0,
];
$userStmt = DBA::select('owner-view', ['uid', 'login_date', 'last-item'],
$halfyear = time() - (180 * 24 * 60 * 60);
$month = time() - (30 * 24 * 60 * 60);
+ $week = time() - (7 * 24 * 60 * 60);
while ($user = DBA::fetch($userStmt)) {
$statistics['total_users']++;
) {
$statistics['active_users_monthly']++;
}
+
+ if ((strtotime($user['login_date']) > $week) || (strtotime($user['last-item']) > $week)
+ ) {
+ $statistics['active_users_weekly']++;
+ }
}
DBA::close($userStmt);