Exemplo n.º 1
0
     }
     include "sorted_table.php";
 } catch (Exception $e) {
     handleAjaxExceptions($e);
 }
 try {
     $userInfo = array();
     $userInfo['general'] = $infoUser->getInformation();
     $userInfo['communication'] = EfrontStats::getUserCommunicationInfo($infoUser);
     if (sizeof($userInfo['communication']['forum_messages'])) {
         $last = current($userInfo['communication']['forum_messages']);
         $userInfo['communication']['forum_last_message'] = formatTimestamp($last['timestamp'], 'time');
     } else {
         $userInfo['communication']['forum_last_message'] = "";
     }
     $userInfo['usage'] = EfrontStats::getUserUsageInfo($infoUser);
     $userInfo['usage']['meanDuration'] = EfrontTimes::formatTimeForReporting($userInfo['usage']['mean_duration'] * 60);
     $userInfo['usage']['monthmeanDuration'] = EfrontTimes::formatTimeForReporting($userInfo['usage']['month_mean_duration'] * 60);
     $userInfo['usage']['weekmeanDuration'] = EfrontTimes::formatTimeForReporting($userInfo['usage']['week_mean_duration'] * 60);
     try {
         $avatar = new EfrontFile($userInfo['general']['avatar']);
         $avatar['id'] != -1 ? $smarty->assign("T_AVATAR", $avatar['id']) : $smarty->assign("T_AVATAR", $avatar['path']);
     } catch (Exception $e) {
         $smarty->assign("T_AVATAR", G_SYSTEMAVATARSPATH . "unknown_small.png");
     }
     if (G_VERSIONTYPE == 'enterprise') {
         #cpp#ifdef ENTERPRISE
         // Check if current user supervises the user for whom we show statistics - if so, the traffic tab should appear
         if ($currentUser->getType() != "administrator") {
             $currentEmployee = $currentUser->aspects['hcd'];
             if ($supervisesUser) {