Exemplo n.º 1
0
 }
 if ($sort != '') {
     if ($dir == 'ASC') {
         $oCriteria->addAscendingOrderByColumn($sort);
     } else {
         $oCriteria->addDescendingOrderByColumn($sort);
     }
 }
 $oCriteria->setOffset($start);
 $oCriteria->setLimit($limit);
 $oDataset = UsersPeer::DoSelectRs($oCriteria);
 $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
 $Login = new LoginLog();
 $aLogin = $Login->getLastLoginAllUsers();
 $Cases = new AppCacheView();
 $aCases = $Cases->getTotalCasesByAllUsers();
 $Department = new Department();
 $aDepart = $Department->getAllDepartmentsByUser();
 $aAuthSources = $RBAC->getAllAuthSourcesByUser();
 require_once PATH_CONTROLLERS . 'adminProxy.php';
 $uxList = adminProxy::getUxTypesList();
 $oRoles = new Roles();
 $rows = array();
 while ($oDataset->next()) {
     $row = $oDataset->getRow();
     $uRole = $oRoles->loadByCode($row['USR_ROLE']);
     $row['USR_ROLE'] = isset($uRole['ROL_NAME']) ? $uRole['ROL_NAME'] != '' ? $uRole['ROL_NAME'] : $uRole['USR_ROLE'] : $uRole['USR_ROLE'];
     $row['DUE_DATE_OK'] = date('Y-m-d') > date('Y-m-d', strtotime($row['USR_DUE_DATE'])) ? 0 : 1;
     $row['LAST_LOGIN'] = isset($aLogin[$row['USR_UID']]) ? $aLogin[$row['USR_UID']] : '';
     $row['TOTAL_CASES'] = isset($aCases[$row['USR_UID']]) ? $aCases[$row['USR_UID']] : 0;
     $row['DEP_TITLE'] = isset($aDepart[$row['USR_UID']]) ? $aDepart[$row['USR_UID']] : '';