ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_mysql.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_mysql extends HFile{
6  function HFile_mysql(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // MySQL
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");
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  "add" => "1",
46  "all" => "1",
47  "alter" => "1",
48  "and" => "1",
49  "as" => "1",
50  "asc" => "1",
51  "auto_increment" => "1",
52  "between" => "1",
53  "binary" => "1",
54  "both" => "1",
55  "by" => "1",
56  "change" => "1",
57  "check" => "1",
58  "column" => "1",
59  "columns" => "1",
60  "create" => "1",
61  "cross" => "1",
62  "data" => "1",
63  "database" => "1",
64  "databases" => "1",
65  "default" => "1",
66  "delayed" => "1",
67  "delete" => "1",
68  "desc" => "1",
69  "describe" => "1",
70  "distinct" => "1",
71  "drop" => "1",
72  "enclosed" => "1",
73  "escaped" => "1",
74  "exists" => "1",
75  "explain" => "1",
76  "field" => "1",
77  "fields" => "1",
78  "flush" => "1",
79  "for" => "1",
80  "foreign" => "1",
81  "from" => "1",
82  "function" => "1",
83  "grant" => "1",
84  "group" => "1",
85  "having" => "1",
86  "identified" => "1",
87  "if" => "1",
88  "ignore" => "1",
89  "index" => "1",
90  "insert" => "1",
91  "infile" => "1",
92  "into" => "1",
93  "join" => "1",
94  "key" => "1",
95  "keys" => "1",
96  "kill" => "1",
97  "leading" => "1",
98  "left" => "1",
99  "like" => "1",
100  "limit" => "1",
101  "lines" => "1",
102  "load" => "1",
103  "local" => "1",
104  "lock" => "1",
105  "low_priority" => "1",
106  "modify" => "1",
107  "natural" => "1",
108  "not" => "1",
109  "null" => "1",
110  "on" => "1",
111  "optimize" => "1",
112  "option" => "1",
113  "optionally" => "1",
114  "or" => "1",
115  "order" => "1",
116  "outer" => "1",
117  "outfile" => "1",
118  "primary" => "1",
119  "proceedure" => "1",
120  "read" => "1",
121  "references" => "1",
122  "regexp" => "1",
123  "rename" => "1",
124  "replace" => "1",
125  "returns" => "1",
126  "revoke" => "1",
127  "rlike" => "1",
128  "select" => "1",
129  "set" => "1",
130  "show" => "1",
131  "soname" => "1",
132  "status" => "1",
133  "straight_join" => "1",
134  "table" => "1",
135  "tables" => "1",
136  "teminated" => "1",
137  "to" => "1",
138  "trailing" => "1",
139  "unique" => "1",
140  "unlock" => "1",
141  "unsigned" => "1",
142  "update" => "1",
143  "use" => "1",
144  "using" => "1",
145  "values" => "1",
146  "variables" => "1",
147  "where" => "1",
148  "with" => "1",
149  "write" => "1",
150  "zerofill" => "1",
151  "xor" => "1",
152  "abs" => "2",
153  "acos" => "2",
154  "adddate" => "2",
155  "ascii" => "2",
156  "asin" => "2",
157  "atan" => "2",
158  "atan2" => "2",
159  "avg" => "2",
160  "bin" => "2",
161  "bit_and" => "2",
162  "bit_count" => "2",
163  "bit_or" => "2",
164  "ceiling" => "2",
165  "char_lengh" => "2",
166  "character_length" => "2",
167  "concat" => "2",
168  "conv" => "2",
169  "cos" => "2",
170  "cot" => "2",
171  "count" => "2",
172  "curdate" => "2",
173  "curtime" => "2",
174  "current_time" => "2",
175  "current_timestamp" => "2",
176  "date_add" => "2",
177  "date_format" => "2",
178  "date_sub" => "2",
179  "dayname" => "2",
180  "dayofmonth" => "2",
181  "dayofweek" => "2",
182  "dayofyear" => "2",
183  "degrees" => "2",
184  "elt" => "2",
185  "encrypt" => "2",
186  "exp" => "2",
187  "find_in_set" => "2",
188  "floor" => "2",
189  "format" => "2",
190  "from_days" => "2",
191  "from_unixtime" => "2",
192  "get_lock" => "2",
193  "greatest" => "2",
194  "hex" => "2",
195  "hour" => "2",
196  "ifnull" => "2",
197  "instr" => "2",
198  "isnull" => "2",
199  "interval" => "2",
200  "last_insert_id" => "2",
201  "lcase" => "2",
202  "lower" => "2",
203  "least" => "2",
204  "length" => "2",
205  "locate" => "2",
206  "log" => "2",
207  "log10" => "2",
208  "lpad" => "2",
209  "ltrim" => "2",
210  "max" => "2",
211  "mid" => "2",
212  "min" => "2",
213  "minute" => "2",
214  "mod" => "2",
215  "month" => "2",
216  "monthname" => "2",
217  "now" => "2",
218  "oct" => "2",
219  "octet_length" => "2",
220  "password" => "2",
221  "period_add" => "2",
222  "period_diff" => "2",
223  "pi" => "2",
224  "position" => "2",
225  "pow" => "2",
226  "quarter" => "2",
227  "radians" => "2",
228  "rand" => "2",
229  "release_lock" => "2",
230  "repeat" => "2",
231  "reverse" => "2",
232  "right" => "2",
233  "round" => "2",
234  "rpad" => "2",
235  "rtrim" => "2",
236  "second" => "2",
237  "sec_to_time" => "2",
238  "session_user" => "2",
239  "sign" => "2",
240  "sin" => "2",
241  "soundex" => "2",
242  "space" => "2",
243  "sqrt" => "2",
244  "strcmp" => "2",
245  "substring" => "2",
246  "substring_index" => "2",
247  "sysdate" => "2",
248  "system_user" => "2",
249  "std" => "2",
250  "sum" => "2",
251  "tan" => "2",
252  "time_format" => "2",
253  "time_to_sec" => "2",
254  "to_days" => "2",
255  "trim" => "2",
256  "truncate" => "2",
257  "ucase" => "2",
258  "unix_timestamp" => "2",
259  "user" => "2",
260  "version" => "2",
261  "week" => "2",
262  "weekday" => "2",
263  "year" => "2",
264  "bigint" => "3",
265  "blob" => "3",
266  "char" => "3",
267  "date" => "3",
268  "datetime" => "3",
269  "decimal" => "3",
270  "double" => "3",
271  "doubleprecision" => "3",
272  "enum" => "3",
273  "float" => "3",
274  "float4" => "3",
275  "float8" => "3",
276  "int" => "3",
277  "int1" => "3",
278  "int2" => "3",
279  "int3" => "3",
280  "int4" => "3",
281  "int8" => "3",
282  "integer" => "3",
283  "long" => "3",
284  "longblob" => "3",
285  "longtext" => "3",
286  "mediumblob" => "3",
287  "mediumint" => "3",
288  "mediumtext" => "3",
289  "middleint" => "3",
290  "numeric" => "3",
291  "real" => "3",
292  "smallint" => "3",
293  "text" => "3",
294  "time" => "3",
295  "timestamp" => "3",
296  "tinyint" => "3",
297  "tinytext" => "3",
298  "tinyblob" => "3",
299  "varbinary" => "3",
300  "varchar" => "3",
301  "varying" => "3");
302 
303 // Special extensions
304 
305 // Each category can specify a PHP function that returns an altered
306 // version of the keyword.
307 
308 
309 
310 $this->linkscripts = array(
311  "1" => "donothing",
312  "2" => "donothing",
313  "3" => "donothing");
314 }
315 
316 
317 function donothing($keywordin)
318 {
319  return $keywordin;
320 }
321 
322 }?>