Platform
3.1
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
Lib.FullSearch.php
Go to the documentation of this file.
1
<?php
2
/*
3
* @author Anakeen
4
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5
* @package FDL
6
*/
7
/**
8
* Full Text Search document
9
*
10
* @author Anakeen 2009
11
* @version $Id: $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
*/
15
/**
16
*/
17
18
include_once (
"FGSEARCH/fullsearchresult.php"
);
19
20
function
getHighlight
(&
$doc
, $keys)
21
{
22
23
$htext = nl2br(str_replace(array(
24
'[b]'
,
25
'[/b]'
26
) , array(
27
'<b>'
,
28
'</b>'
29
) , (str_replace(
"<"
,
"<"
, preg_replace(
"/<\/?(\w+[^:]?|\w+\s.*?)>/"
,
""
, str_replace(array(
30
'<b>'
,
31
'</b>'
32
) , array(
33
'[b]'
,
34
'[/b]'
35
) , nl2br(wordwrap(
nobr
(
highlight_text
(
$doc
->dbid,
$doc
->svalues, $keys) , 80)))))))));
36
37
return
$htext;
38
}
39
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase