35 include_once
'Services/Search/classes/class.ilSearchSettings.php';
58 $this->lng->loadLanguageModule(
'search');
60 $ilMainMenu->setActive(
'search');
66 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.search_base.html",
'Services/Search');
67 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
83 $_SESSION[
"$a_session_key"] = max(
$_SESSION[
"$a_session_key"],$this->search_cache->getResultPageNumber());
91 if($this->search_cache->getResultPageNumber() > 1)
93 $this->ctrl->setParameter($this,
'page_number',$this->search_cache->getResultPageNumber() - 1);
94 $this->tpl->setCurrentBlock(
'prev');
95 $this->tpl->setVariable(
'PREV_LINK',$this->ctrl->getLinkTarget($this,
'performSearch'));
96 $this->tpl->setVariable(
'TXT_PREV',$this->lng->txt(
'search_page_prev'));
97 $this->tpl->parseCurrentBlock();
99 for($i = 1;$i <=
$_SESSION[
"$a_session_key"];$i++)
101 if($i == $this->search_cache->getResultPageNumber())
103 $this->tpl->setCurrentBlock(
'pages_link');
104 $this->tpl->setVariable(
'NUMBER',$i);
105 $this->tpl->parseCurrentBlock();
109 $this->ctrl->setParameter($this,
'page_number',$i);
110 $link =
'<a href="'.$this->ctrl->getLinkTarget($this,
'performSearch').
'" /a>'.$i.
'</a> ';
111 $this->tpl->setCurrentBlock(
'pages_link');
112 $this->tpl->setVariable(
'NUMBER',$link);
113 $this->tpl->parseCurrentBlock();
119 $this->tpl->setCurrentBlock(
'next');
120 $this->ctrl->setParameter($this,
'page_number',$this->search_cache->getResultPageNumber() + 1);
121 $this->tpl->setVariable(
'NEXT_LINK',$this->ctrl->getLinkTarget($this,
'performSearch'));
122 $this->tpl->setVariable(
'TXT_NEXT',$this->lng->txt(
'search_page_next'));
123 $this->tpl->parseCurrentBlock();
126 $this->tpl->setCurrentBlock(
'prev_next');
127 $this->tpl->setVariable(
'SEARCH_PAGE',$this->lng->txt(
'search_page'));
128 $this->tpl->parseCurrentBlock();
130 $this->ctrl->clearParameters($this);