$elf = new ExceptionListFactory(); $elf->getFlaggedExceptionsByUserIdAndPayPeriodStatus($current_user->getId(), 10); if ($elf->getRecordCount() > 0) { foreach ($elf as $e_obj) { if (isset($exceptions[$e_obj->getColumn('severity_id')])) { $exceptions[$e_obj->getColumn('severity_id')]++; } else { $exceptions[$e_obj->getColumn('severity_id')] = 1; } } } unset($elf, $e_obj); $smarty->assign_by_ref('exceptions', $exceptions); //Grab list of recent requests $rlf = new RequestListFactory(); $rlf->getByUserIDAndCompanyId($current_user->getId(), $current_company->getId(), 5, 1); if ($rlf->getRecordCount() > 0) { $status_options = $rlf->getOptions('status'); $type_options = $rlf->getOptions('type'); foreach ($rlf as $r_obj) { $requests[] = array('id' => $r_obj->getId(), 'user_date_id' => $r_obj->getUserDateID(), 'date_stamp' => TTDate::strtotime($r_obj->getColumn('date_stamp')), 'status_id' => $r_obj->getStatus(), 'status' => Misc::TruncateString($status_options[$r_obj->getStatus()], 15), 'type_id' => $r_obj->getType(), 'type' => $type_options[$r_obj->getType()], 'created_date' => $r_obj->getCreatedDate(), 'deleted' => $r_obj->getDeleted()); } } $smarty->assign_by_ref('requests', $requests); //Grab list of unread messages $mlf = new MessageListFactory(); $mlf->getByUserIdAndFolder($current_user->getId(), 10, 5, 1); if ($mlf->getRecordCount() > 0) { $object_name_options = $mlf->getOptions('object_name'); $require_ack = FALSE; foreach ($mlf as $message) {