예제 #1
0
파일: search.php 프로젝트: raz0rsdge/horde
            $registry->callAppMethod('hermes', 'download', array('args' => array($vars)));
        } catch (Horde_Exception $e) {
            $notification->push($e->getMessage(), 'horde.error');
        }
}
$title = _("Search for Time");
if (!($searchVars = $session->get('hermes', 'search_criteria'))) {
    $searchVars = $vars;
}
$form = new Hermes_Form_Search($searchVars);
$page_output->header(array('title' => $title));
$notification->notify(array('listeners' => 'status'));
$form->renderActive(new Horde_Form_Renderer(), $searchVars, Horde::url('search.php'), 'post');
echo '<br />';
if ($session->exists('hermes', 'search_criteria')) {
    echo Hermes::tabs();
    if (is_null($criteria)) {
        $criteria = $form->getSearchCriteria($searchVars);
    }
    $table = new Hermes_Table('results', $vars, array('title' => _("Search Results"), 'name' => 'hermes/hours', 'params' => $criteria));
    $template = new Horde_Template();
    $template->setOption('gettext', true);
    $template->set('postUrl', Horde::url('time.php', false, -1));
    $template->set('sessionId', Horde_Util::formInput());
    $template->set('table', $table->render());
    echo $template->fetch(HERMES_TEMPLATES . '/time/form.html');
}
echo '<br />';
$exportForm = new Hermes_Form_Export($vars);
$exportForm->renderActive(new Horde_Form_Renderer(), $vars, Horde::url('search.php'), 'post');
$page_output->footer();