$notification->push($e); $data = array(); } } else { foreach ($session->get('operator', 'lastsearch/params', Horde_Session::TYPE_ARRAY) as $var => $val) { $vars->set($var, $val); } } // Create the Pager UI $page = Horde_Util::getGet('page', 0); $pager_vars = Horde_Variables::getDefaultVariables(); $pager_vars->set('page', $page); $perpage = $prefs->getValue('rowsperpage'); $pager = new Horde_Core_Ui_Pager('page', $pager_vars, array('num' => count($data), 'url' => 'search.php', 'page_count' => 10, 'perpage' => $perpage)); // Limit the domain list to the current page $data = array_slice($data, $page * $perpage, $perpage); // See if we got the complete set of records if ($stats['numcalls'] > $GLOBALS['conf']['storage']['searchlimit']) { $msg = _("Number of calls exceeded search limit (%s). Try narrowing your search dates or exporting the data."); $notification->push(sprintf($msg, $GLOBALS['conf']['storage']['searchlimit']), 'horde.warning'); } $page_output->addScriptFile('stripe.js', 'horde'); $page_output->header(array('title' => _("Search Call Detail Records"))); $notification->notify(array('listeners' => 'status')); $notification->notify(); $form->renderActive($renderer, $vars, Horde::url('search.php'), 'post'); $columns = unserialize($prefs->getValue('columns')); if (!empty($data)) { require OPERATOR_TEMPLATES . '/search.inc'; } $page_output->footer();