} if ($Params['user_parameters_unordered']['print'] == 1) { $tpl = erLhcoreClassTemplate::getInstance('lhchat/printchats.tpl.php'); $items = erLhcoreClassChat::getPendingChats(10000, 0, $filterParams['filter']); $tpl->set('items', $items); $Result['content'] = $tpl->fetch(); $Result['pagelayout'] = 'popup'; return; } if (in_array($Params['user_parameters_unordered']['xls'], array(1, 2))) { erLhcoreClassChatExport::chatListExportXLS(erLhcoreClassChat::getPendingChats(10000, 0, $filterParams['filter']), array('type' => (int) $Params['user_parameters_unordered']['xls'])); exit; } $append = erLhcoreClassSearchHandler::getURLAppendFromInput($filterParams['input_form']); $pages = new lhPaginator(); $pages->items_total = erLhcoreClassChat::getPendingChatsCount($filterParams['filter']); $pages->translationContext = 'chat/pendingchats'; $pages->serverURL = erLhcoreClassDesign::baseurl('chat/pendingchats') . $append; $pages->paginate(); $tpl->set('pages', $pages); if ($pages->items_total > 0) { $items = erLhcoreClassChat::getPendingChats($pages->items_per_page, $pages->low, $filterParams['filter']); $tpl->set('items', $items); } $filterParams['input_form']->form_action = erLhcoreClassDesign::baseurl('chat/pendingchats'); $tpl->set('input', $filterParams['input_form']); $tpl->set('inputAppend', $append); $tpl->set('can_delete_global', $currentUser->hasAccessTo('lhchat', 'deleteglobalchat')); $tpl->set('can_delete_general', $currentUser->hasAccessTo('lhchat', 'deletechat')); $tpl->set('current_user_id', $currentUser->getUserID()); $Result['content'] = $tpl->fetch();