Rev 11406 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 11406 | Rev 11483 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | - | ||
2 | Processing search request. |
1 | Processing search request. |
3 | !nocache |
2 | !nocache |
4 | !if $wims_referer!=$empty and $wims_user=$empty and $wims_new_session=yes |
3 | !if $wims_referer!=$empty and $wims_user=$empty and $wims_new_session=yes |
5 | refcut=!replace internal :// by $ $ in $wims_referer |
4 | refcut=!replace internal :// by $ $ in $wims_referer |
6 | refcut=!word 2 of $refcut |
5 | refcut=!word 2 of $refcut |
Line 29... | Line 28... | ||
29 | !if $refS!=$empty |
28 | !if $refS!=$empty |
30 | search_category=A |
29 | search_category=A |
31 | search_keywords=$refS |
30 | search_keywords=$refS |
32 | !endif |
31 | !endif |
33 | !endif |
32 | !endif |
34 | !endif |
33 | !endif |
35 | !reset test_exist |
34 | !reset test_exist |
36 | 35 | ||
37 | s2dir=!replace internal sessions/ by s2/ in $wims_sesdir |
36 | s2dir=!replace internal sessions/ by s2/ in $wims_sesdir |
38 | s2dir=!translate internal _ to $ $ in $s2dir |
37 | s2dir=!translate internal _ to $ $ in $s2dir |
39 | s2dir=!word 1 of $s2dir |
38 | s2dir=!word 1 of $s2dir |
40 | !if $wims_accessright!=$empty and $wims_class!=$empty |
39 | !if $wims_accessright!=$empty and $wims_class!=$empty |
41 | !default search_package=!getdef package in wimshome/$s2dir/home_search |
40 | !default search_package=!getdef package in wimshome/$s2dir/home_search |
42 | !bound search_package within $wims_accessright default bases/site |
41 | !bound search_package within $wims_accessright default bases/site |
43 | !else |
42 | !else |
44 | search_package=bases/site |
43 | search_package=bases/site |
45 | !endif |
44 | !endif |
46 | !if $search_package=bases/site |
45 | !if $search_package=bases/site |
47 | search_package1=wimshome/public_html/$search_package |
46 | search_package1=wimshome/public_html/$search_package |
48 | search_package2=$search_package |
47 | search_package2=$search_package |
49 | !else |
48 | !else |
50 | search_package1=wimshome/public_html/modules/$search_package/.index |
49 | search_package1=wimshome/public_html/modules/$search_package/.index |
Line 57... | Line 56... | ||
57 | list_batch=20 |
56 | list_batch=20 |
58 | !default search_lang=$lang |
57 | !default search_lang=$lang |
59 | !read adm/search_engine/mklist_form.proc $search_lang |
58 | !read adm/search_engine/mklist_form.proc $search_lang |
60 | !read adm/lang/levelname.phtml.$lang |
59 | !read adm/lang/levelname.phtml.$lang |
61 | !set Listlevel=$wims_listlevel |
60 | !set Listlevel=$wims_listlevel |
62 | !set |
61 | !set search_levelcnt=!itemcnt $Listlevel |
63 | !set listlevel=!makelist level x for x in $Listlevel |
62 | !set listlevel=!makelist level x for x in $Listlevel |
64 | !set listlevel=!nospace $listlevel |
63 | !set listlevel=!nospace $listlevel |
65 | !set listlevel=!lowercase $listlevel |
64 | !set listlevel=!lowercase $listlevel |
66 | 65 | ||
67 | !if $wims_user=supervisor |
66 | !if $wims_user=supervisor |
68 | !set cl=!positionof item $class_level in $Listlevel |
67 | !set cl=!positionof item $class_level in $Listlevel |
69 | !default search_level_from=$[max(1,$cl-1)] |
68 | !default search_level_from=$[max(1,$cl-1)] |
70 | !default search_level_to=$[$cl+1] |
69 | !default search_level_to=$[$cl+1] |
71 | !endif |
70 | !endif |
72 | !if $search_level_from=1 and |
71 | !if $search_level_from=1 and $search_level_to=$search_levelcnt |
73 | !reset search_level_from search_level_to |
72 | !reset search_level_from search_level_to |
74 | !endif |
73 | !endif |
75 | 74 | ||
76 | !if $list=clear |
75 | !if $list=clear |
77 | search_category=V |
76 | search_category=V |
Line 83... | Line 82... | ||
83 | !endif |
82 | !endif |
84 | 83 | ||
85 | !if _tool isin $wims_session |
84 | !if _tool isin $wims_session |
86 | search_category=T |
85 | search_category=T |
87 | !endif |
86 | !endif |
88 | !if $search_level_from!=$empty |
- | |
89 | !default search_level_to=-1 |
- | |
90 | search_level=$(listlevel[$search_level_from .. $search_level_to]) |
- | |
91 | !endif |
87 | |
92 | search_keywords=!trim $search_keywords |
88 | search_keywords=!trim $search_keywords |
93 | search_keywords=!translate " to $ $ in $search_keywords |
89 | search_keywords=!translate " to $ $ in $search_keywords |
94 | !if $search_category$search_keywords$search_level=$empty |
90 | !if $search_category$search_keywords$search_level=$empty |
- | 91 | !! read the preceding option in the user search |
|
95 | !read wimshome/$s2dir/home_search |
92 | !read wimshome/$s2dir/home_search |
96 | readback=yes |
93 | readback=yes |
97 | !else |
94 | !else |
- | 95 | !if $search_level_from!=$empty |
|
- | 96 | !default search_level_to=-1 |
|
- | 97 | search_level=$(listlevel[$search_level_from .. $search_level_to]) |
|
- | 98 | !endif |
|
98 | search_level=!nospace $search_level |
99 | search_level=!nospace $search_level |
99 | search_level=!lowercase $search_level |
100 | search_level=!lowercase $search_level |
100 | search_domain=!trim $search_domain |
101 | search_domain=!trim $search_domain |
101 | search_keywords=!trim $search_keywords |
102 | search_keywords=!trim $search_keywords |
102 | !endif |
103 | !endif |
103 | search_category=!replace exercise by X in $search_category |
104 | search_category=!replace exercise by X in $search_category |
104 | search_category=!replace tool by T in $search_category |
105 | search_category=!replace tool by T in $search_category |
105 | search_category=!replace recreation by R in $search_category |
106 | search_category=!replace recreation by R in $search_category |
106 | search_category=!trim $search_category |
107 | search_category=!trim $search_category |
Line 208... | Line 209... | ||
208 | !writefile wimshome/$s2dir/home_search search_level=$search_level\ |
209 | !writefile wimshome/$s2dir/home_search search_level=$search_level\ |
209 | search_category=$search_category\ |
210 | search_category=$search_category\ |
210 | search_domain=$search_domain\ |
211 | search_domain=$search_domain\ |
211 | search_keywords=$search_keywords\ |
212 | search_keywords=$search_keywords\ |
212 | package=$search_package\ |
213 | package=$search_package\ |
213 |
|
214 | search_lang=$search_lang\ |
- | 215 | search_level_from=$search_level_from\ |
|
- | 216 | search_level_to=$search_level_to |
|
214 | 217 | ||
215 | !if $search_category isin LPS |
218 | !if $search_category isin LPS |
216 | !changeto search.$search_category |
219 | !changeto search.$search_category |
217 | !endif |
220 | !endif |
218 | 221 |