diff options
author | Sergey Kartashoff <gluke@php.net> | 2001-11-04 09:02:25 +0000 |
---|---|---|
committer | Sergey Kartashoff <gluke@php.net> | 2001-11-04 09:02:25 +0000 |
commit | c4b7501956cb79d729e56115a7ef17bbe8f89c22 (patch) | |
tree | a02dd9bfa4ddba3402251c8c92d41e487a1e7a4c /ext/mnogosearch | |
parent | e475621f2c1b6e213fcf6ee554ab1a8156254808 (diff) | |
download | php-git-c4b7501956cb79d729e56115a7ef17bbe8f89c22.tar.gz |
# more mnoGoSearch example fixes
Diffstat (limited to 'ext/mnogosearch')
-rw-r--r-- | ext/mnogosearch/index.php | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/ext/mnogosearch/index.php b/ext/mnogosearch/index.php index 4f98ac911e..a3d755caeb 100644 --- a/ext/mnogosearch/index.php +++ b/ext/mnogosearch/index.php @@ -1,9 +1,9 @@ -<!-- +<? + +/* $Source$ $Id$ ---> - -<? +*/ /* mnoGoSearch-php-lite v.1.1 * for mnoGoSearch ( formely known as UdmSearch ) free web search engine @@ -468,6 +468,13 @@ function make_nav($query_orig){ print "Cannot determine php version: <b>".phpversion()."</b>\n"; exit; } + + $have_spell_flag=0; + + $udm_agent=Udm_Alloc_Agent($dbaddr,$dbmode); + + Udm_Set_Agent_Param($udm_agent,UDM_PARAM_PAGE_SIZE,$ps); + Udm_Set_Agent_Param($udm_agent,UDM_PARAM_PAGE_NUM,$np); if ($phpver >= 40006) { if ($temp_cp_arr=Udm_Cat_Path($udm_agent,$cat)) { @@ -503,13 +510,6 @@ function make_nav($query_orig){ $t_DY=$temp_cp; } } - - $have_spell_flag=0; - - $udm_agent=Udm_Alloc_Agent($dbaddr,$dbmode); - - Udm_Set_Agent_Param($udm_agent,UDM_PARAM_PAGE_SIZE,$ps); - Udm_Set_Agent_Param($udm_agent,UDM_PARAM_PAGE_NUM,$np); $trackquery=strtolower($trackquery); if ($trackquery == 'yes') { @@ -564,11 +564,13 @@ function make_nav($query_orig){ if ($hlbeg != '') { Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLBEG,$hlbeg); } else { + $hlbeg='<font color="000088"><b>'; Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLBEG,'<font color="000088"><b>'); } if ($hlend != '') { Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLEND,$hlend); } else { + $hlend='</b></font>'; Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLEND,'</b></font>'); } } @@ -899,19 +901,23 @@ if(($errno=Udm_Errno($udm_agent))>0){ for($i=0;$i<$rows;$i++){ $ndoc=Udm_Get_Res_Field($res,$i,UDM_FIELD_ORDER); $rating=Udm_Get_Res_Field($res,$i,UDM_FIELD_RATING); - $url=Udm_Get_Res_Field($res,$i,UDM_FIELD_URL); - $title=Udm_Get_Res_Field($res,$i,UDM_FIELD_TITLE); - $title=($title) ? htmlspecialChars($title):'No title'; - $text=htmlspecialChars(Udm_Get_Res_Field($res,$i,UDM_FIELD_TEXT)); - $contype=Udm_Get_Res_Field($res,$i,UDM_FIELD_CONTENT); - $docsize=Udm_Get_Res_Field($res,$i,UDM_FIELD_SIZE); - $lastmod=format_lastmod(Udm_Get_Res_Field($res,$i,UDM_FIELD_MODIFIED)); - $keyw=htmlspecialChars(Udm_Get_Res_Field($res,$i,UDM_FIELD_KEYWORDS)); - $desc=htmlspecialChars(Udm_Get_Res_Field($res,$i,UDM_FIELD_DESC)); - $crc=Udm_Get_Res_Field($res,$i,UDM_FIELD_CRC); - $rec_id=Udm_Get_Res_Field($res,$i,UDM_FIELD_URLID); - - if ($phpver >= 40006) { + $url=Udm_Get_Res_Field($res,$i,UDM_FIELD_URL); + $contype=Udm_Get_Res_Field($res,$i,UDM_FIELD_CONTENT); + $docsize=Udm_Get_Res_Field($res,$i,UDM_FIELD_SIZE); + $lastmod=format_lastmod(Udm_Get_Res_Field($res,$i,UDM_FIELD_MODIFIED)); + + $title=Udm_Get_Res_Field($res,$i,UDM_FIELD_TITLE); + $title=($title) ? htmlspecialChars($title):'No title'; + + $title=ParseDocText($title); + $text=ParseDocText(htmlspecialChars(Udm_Get_Res_Field($res,$i,UDM_FIELD_TEXT))); + $keyw=ParseDocText(htmlspecialChars(Udm_Get_Res_Field($res,$i,UDM_FIELD_KEYWORDS))); + $desc=ParseDocText(htmlspecialChars(Udm_Get_Res_Field($res,$i,UDM_FIELD_DESC))); + + $crc=Udm_Get_Res_Field($res,$i,UDM_FIELD_CRC); + $rec_id=Udm_Get_Res_Field($res,$i,UDM_FIELD_URLID); + + if ($phpver >= 40006) { $category=Udm_Get_Res_Field($res,$i,UDM_FIELD_CATEGORY); } else { $category=''; |