ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_SearchScript.php
Go to the documentation of this file.
1 <?php
2 $BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php";
3 if (!isset ($BEAUT_PATH)) return;
4 require_once("$BEAUT_PATH/Beautifier/HFile.php");
5  class HFile_SearchScript extends HFile{
6  function HFile_SearchScript(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // SearchScript
11 /*************************************/
12 // Flags
13 
14 $this->nocase = "1";
15 $this->notrim = "0";
16 $this->perl = "0";
17 
18 // Colours
19 
20 $this->colours = array("blue", "purple", "gray", "brown", "blue");
21 $this->quotecolour = "blue";
22 $this->blockcommentcolour = "green";
23 $this->linecommentcolour = "green";
24 
25 // Indent Strings
26 
27 $this->indent = array();
28 $this->unindent = array();
29 
30 // String characters and delimiters
31 
32 $this->stringchars = array();
33 $this->delimiters = array("~", "!", "@", "$", "%", "^", "&", "*", "(", ")", "-", "+", "=", "|", "\\", "{", "}", "[", "]", ":", ";", "\"", "'", "<", ">", " ", ",", " ", ".", "?");
34 $this->escchar = "";
35 
36 // Comment settings
37 
38 $this->linecommenton = array("");
39 $this->blockcommenton = array("%-");
40 $this->blockcommentoff = array("-%");
41 
42 // Keywords (keyword mapping to colour number)
43 
44 $this->keywords = array(
45  "<A" => "1",
46  "</A>" => "1",
47  "<ABOVE>" => "1",
48  "<ADDRESS>" => "1",
49  "</ADDRESS>" => "1",
50  "<APPLET" => "1",
51  "</APPLET>" => "1",
52  "<ARRAY>" => "1",
53  "<AREA" => "1",
54  "</AREA" => "1",
55  "<B>" => "1",
56  "</B>" => "1",
57  "<BASE" => "1",
58  "<BASEFONT" => "1",
59  "<BGSOUND" => "1",
60  "<BIG>" => "1",
61  "</BIG>" => "1",
62  "<BLINK>" => "1",
63  "</BLINK>" => "1",
64  "<BLOCKQUOTE>" => "1",
65  "</BLOCKQUOTE>" => "1",
66  "<BODY" => "1",
67  "<BODY>" => "1",
68  "</BODY>" => "1",
69  "<BOX>" => "1",
70  "<BR" => "1",
71  "<BR>" => "1",
72  "<CAPTION>" => "1",
73  "</CAPTION>" => "1",
74  "<CENTER>" => "1",
75  "</CENTER>" => "1",
76  "<CITE>" => "1",
77  "</CITE>" => "1",
78  "<CODE>" => "1",
79  "</CODE>" => "1",
80  "<DD>" => "1",
81  "<DFN>" => "1",
82  "<DIR>" => "1",
83  "</DIR>" => "1",
84  "<DIV" => "1",
85  "</DIV>" => "1",
86  "<DL>" => "1",
87  "</DL>" => "1",
88  "<DT>" => "1",
89  "<EM>" => "1",
90  "</EM>" => "1",
91  "<EMBED" => "1",
92  "<FIG>" => "1",
93  "<FONT" => "1",
94  "</FONT>" => "1",
95  "<FORM>" => "1",
96  "<FORM" => "1",
97  "</FORM>" => "1",
98  "<FRAME" => "1",
99  "<FRAMESET" => "1",
100  "</FRAMESET>" => "1",
101  "<H" => "1",
102  "<H1>" => "1",
103  "<H2>" => "1",
104  "<H3>" => "1",
105  "<H4>" => "1",
106  "<H5>" => "1",
107  "<H6>" => "1",
108  "</H1>" => "1",
109  "</H2>" => "1",
110  "</H3>" => "1",
111  "</H4>" => "1",
112  "</H5>" => "1",
113  "</H6>" => "1",
114  "<HEAD>" => "1",
115  "</HEAD>" => "1",
116  "<HR>" => "1",
117  "<HR" => "1",
118  "<HTML>" => "1",
119  "</HTML>" => "1",
120  "<I>" => "1",
121  "</I>" => "1",
122  "<IMG" => "1",
123  "<INPUT>" => "1",
124  "<INPUT" => "1",
125  "<ISINDEX>" => "1",
126  "<KBD>" => "1",
127  "</KBD>" => "1",
128  "<LI>" => "1",
129  "<LINK" => "1",
130  "</LI>" => "1",
131  "<MAP" => "1",
132  "</MAP>" => "1",
133  "<MARQUEE" => "1",
134  "</MARQUEE>" => "1",
135  "<MENU>" => "1",
136  "</MENU>" => "1",
137  "<META" => "1",
138  "<NEXTID" => "1",
139  "<NOBR>" => "1",
140  "</NOBR>" => "1",
141  "<NOFRAMES>" => "1",
142  "</NOFRAMES>" => "1",
143  "<NOTE>" => "1",
144  "</NOTE>" => "1",
145  "<OL>" => "1",
146  "</OL>" => "1",
147  "<OPTION>" => "1",
148  "<OPTION" => "1",
149  "<P" => "1",
150  "<P>" => "1",
151  "</P>" => "1",
152  "<PRE>" => "1",
153  "</PRE>" => "1",
154  "<PARAM>" => "1",
155  "<RANGE>" => "1",
156  "<ROOT>" => "1",
157  "<SAMP>" => "1",
158  "</SAMP>" => "1",
159  "<SCRIPT" => "1",
160  "</SCRIPT>" => "1",
161  "<SELECT>" => "1",
162  "</SELECT>" => "1",
163  "<SMALL>" => "1",
164  "</SMALL>" => "1",
165  "<SOUND" => "1",
166  "<SQRT>" => "1",
167  "<STYLE>" => "1",
168  "<STRIKE>" => "1",
169  "</STRIKE>" => "1",
170  "<STRONG>" => "1",
171  "</STRONG>" => "1",
172  "<SUB>" => "1",
173  "</SUB>" => "1",
174  "<SUP>" => "1",
175  "</SUP>" => "1",
176  "<SELECT" => "1",
177  "<TABLE>" => "1",
178  "<TABLE" => "1",
179  "</TABLE>" => "1",
180  "<TD" => "1",
181  "<TD>" => "1",
182  "</TD>" => "1",
183  "<TEXT>" => "1",
184  "<TEXTAREA" => "1",
185  "<TEXTAREA>" => "1",
186  "</TEXTAREA>" => "1",
187  "<TH" => "1",
188  "<TH>" => "1",
189  "</TH>" => "1",
190  "<TITLE>" => "1",
191  "</TITLE>" => "1",
192  "<TR" => "1",
193  "<TR>" => "1",
194  "</TR>" => "1",
195  "<TT>" => "1",
196  "</TT>" => "1",
197  "<U>" => "1",
198  "</U>" => "1",
199  "<UL>" => "1",
200  "</UL>" => "1",
201  "<VAR>" => "1",
202  "</VAR>" => "1",
203  "<WBR>" => "1",
204  "ACTION=" => "2",
205  "ALIGN=" => "2",
206  "ALINK" => "2",
207  "ALT" => "2",
208  "BACKGROUND=" => "2",
209  "BEHAVIOR" => "2",
210  "BELOW" => "2",
211  "BGCOLOR=" => "2",
212  "BORDER=" => "2",
213  "CELLPADDING" => "2",
214  "CELLSPACING" => "2",
215  "COLOR=" => "2",
216  "COLS" => "2",
217  "COLSPAN" => "2",
218  "CONTENT=" => "2",
219  "DIRECTION" => "2",
220  "FACE=" => "2",
221  "FRAMEBORDER=" => "2",
222  "FRAMESPACING=" => "2",
223  "HEIGHT=" => "2",
224  "HREF=" => "2",
225  "HSPACE=" => "2",
226  "HTTP-EQUIV=" => "2",
227  "ISMAP" => "2",
228  "LANGUAGE" => "2",
229  "LINK" => "2",
230  "METHOD=" => "2",
231  "MARGINHEIGHT=" => "2",
232  "MARGINWIDTH=" => "2",
233  "MULTIPLE" => "2",
234  "NAME=" => "2",
235  "NORESIZE" => "2",
236  "NOSHADE" => "2",
237  "ONBLUR" => "2",
238  "ONCLICK" => "2",
239  "ONFOCUS" => "2",
240  "ONLOAD" => "2",
241  "ONMOUSEOUT" => "2",
242  "ONMOUSEOVER" => "2",
243  "REV=" => "2",
244  "ROWS" => "2",
245  "ROWSPAN" => "2",
246  "SCROLLING" => "2",
247  "SIZE=" => "2",
248  "SRC=" => "2",
249  "START" => "2",
250  "TARGET=" => "2",
251  "TEXT=" => "2",
252  "TOPMARGIN" => "2",
253  "TYPE=" => "2",
254  "URL=" => "2",
255  "VALIGN=" => "2",
256  "VALUE=" => "2",
257  "VLINK=" => "2",
258  "VSPACE=" => "2",
259  "WIDTH=" => "2",
260  "and" => "3",
261  "Boolplus" => "3",
262  "Course" => "3",
263  "else" => "3",
264  "endif" => "3",
265  "endfor" => "3",
266  "exit" => "3",
267  "exitfor" => "3",
268  "Fine" => "3",
269  "Fixed" => "3",
270  "for" => "3",
271  "foreach" => "3",
272  "Freetext" => "3",
273  "if" => "3",
274  "in" => "3",
275  "Medium" => "3",
276  "not" => "3",
277  "or" => "3",
278  "Simple" => "3",
279  "stop" => "3",
280  "then" => "3",
281  "to" => "3",
282  "abs" => "4",
283  "AddHeader" => "4",
284  "asc" => "4",
285  "date" => "4",
286  "count" => "4",
287  "eval" => "4",
288  "exists" => "4",
289  "GetCookie" => "4",
290  "getenvvariable" => "4",
291  "GetNextPageURLKeys" => "4",
292  "GetPageURLKeys" => "4",
293  "GetSummary" => "4",
294  "GetURLKeys" => "4",
295  "instr" => "4",
296  "int" => "4",
297  "isempty" => "4",
298  "lcase" => "4",
299  "left" => "4",
300  "len" => "4",
301  "log" => "4",
302  "ltrim" => "4",
303  "mid" => "4",
304  "now" => "4",
305  "print" => "4",
306  "printhtmlesc" => "4",
307  "printurlesc" => "4",
308  "reverse" => "4",
309  "right" => "4",
310  "rtrim" => "4",
311  "setenvvariable" => "4",
312  "SetContentType" => "4",
313  "SetCookie" => "4",
314  "str" => "4",
315  "strcomp" => "4",
316  "trim" => "4",
317  "ucase" => "4",
318  "undate" => "4",
319  "urlesc" => "4",
320  "urlescpath" => "4",
321  "val" => "4",
322  "AccessQueryMode" => "5",
323  "AccessQueryText" => "5",
324  "Alias" => "5",
325  "Author" => "5",
326  "BeginHighlight" => "5",
327  "ClientHost" => "5",
328  "ClientSoftware" => "5",
329  "Cluster" => "5",
330  "Clusters" => "5",
331  "ClusterKeywordCount" => "5",
332  "ClusterCount" => "5",
333  "ClusterEffort" => "5",
334  "ClusterOrder" => "5",
335  "ClusterPageSize" => "5",
336  "ClusterScore" => "5",
337  "ClusterStyle" => "5",
338  "Collection" => "5",
339  "CollectionName" => "5",
340  "Comments" => "5",
341  "Created" => "5",
342  "Config" => "5",
343  "Cookie" => "5",
344  "DefaultList" => "5",
345  "Description" => "5",
346  "DocsCount" => "5",
347  "DocsEnd" => "5",
348  "DocsFound" => "5",
349  "DocsSearched" => "5",
350  "DocsStart" => "5",
351  "Document" => "5",
352  "DocumentPrint" => "5",
353  "Documents" => "5",
354  "EndHighlight" => "5",
355  "Ext" => "5",
356  "Filter" => "5",
357  "HLBookmark" => "5",
358  "HLFirstURL" => "5",
359  "HLNavigate" => "5",
360  "HLNextLabel" => "5",
361  "HLPrevLabel" => "5",
362  "HTMLBodyPrint" => "5",
363  "HGMLBodyPrintPre" => "5",
364  "HTMLHeadPrint" => "5",
365  "Index" => "5",
366  "Keywords" => "5",
367  "KeywordSummary" => "5",
368  "Mime-Type" => "5",
369  "Modified" => "5",
370  "Name" => "5",
371  "NextDocMime" => "5",
372  "NextDocURL" => "5",
373  "NextDocXML" => "5",
374  "NextPageURL" => "5",
375  "PageNumber" => "5",
376  "PageURLs" => "5",
377  "Path" => "5",
378  "PrevDocMime" => "5",
379  "PrevDocURL" => "5",
380  "PrevDocXML" => "5",
381  "PrevPageURL" => "5",
382  "QBEDOC" => "5",
383  "QBE_Key" => "5",
384  "QBE_Input" => "5",
385  "QueryMode" => "5",
386  "QueryText" => "5",
387  "QueryWeight" => "5",
388  "QueryZip" => "5",
389  "Rank" => "5",
390  "RefinedQueryZip" => "5",
391  "Request" => "5",
392  "Result" => "5",
393  "ResultCount" => "5",
394  "ResultErrorTemplate" => "5",
395  "ResultField" => "5",
396  "ResultMaxDocs" => "5",
397  "ResultStart" => "5",
398  "ResultTemplate" => "5",
399  "Score" => "5",
400  "ScoreThreshold" => "5",
401  "ScriptName" => "5",
402  "SearchURL" => "5",
403  "ServerHost" => "5",
404  "ServerKB" => "5",
405  "ServerPort" => "5",
406  "ServerURL" => "5",
407  "Size" => "5",
408  "Snippet" => "5",
409  "SortSpec" => "5",
410  "SourceQueryMode" => "5",
411  "SourceQueryText" => "5",
412  "State" => "5",
413  "StoredKeywords" => "5",
414  "StoredSummary" => "5",
415  "Subject" => "5",
416  "Title" => "5",
417  "URL" => "5",
418  "URL_HTML" => "5",
419  "URL_QBE" => "5",
420  "URL_XML" => "5",
421  "ViewTemplate" => "5",
422  "Web" => "5");
423 
424 // Special extensions
425 
426 // Each category can specify a PHP function that returns an altered
427 // version of the keyword.
428 
429 
430 
431 $this->linkscripts = array(
432  "1" => "donothing",
433  "2" => "donothing",
434  "3" => "donothing",
435  "4" => "donothing",
436  "5" => "donothing");
437 }
438 
439 
440 function donothing($keywordin)
441 {
442  return $keywordin;
443 }
444 
445 }?>