Annotation of parser3/src/www/htdocs/index.html, revision 1.413
1.399 parser 1: @main[]
1.413 ! parser 2: ^domedit[]
! 3: ^domxslt[]
1.402 parser 4: #^lsplit2[]
1.401 parser 5: #^faceesize[]
1.400 parser 6: #^imageresize[]
1.399 parser 7: #^ifassignhash[]
8: #^tintdefault[]
9: #$response:status[404]
1.390 parser 10: #^ifpasshash[]
1.387 parser 11: #^movedir[]
12: #^replace[]
1.386 parser 13: #^set[]
1.385 parser 14: #^hash[]<hr>
1.384 parser 15: #$t[^methresult[]] ->$t
1.382 parser 16: #^terror[]
1.378 parser 17: #^ssave[]
1.377 parser 18: #^calendar[]
1.376 parser 19: #^thash[]
1.373 parser 20: #^tdef[]
1.375 parser 21: #^ford[]
1.371 parser 22: #^tif[]
1.383 parser 23: #^image[]
1.369 parser 24: #^mail2[]
1.413 ! parser 25: #^cookie[]
1.365 parser 26: #^response[]
1.364 parser 27: #^regexp2[]
28: #^ttablerem[]
29: #^pcre[]
30: #^regexp[]<hr>
31: #^mail[]
32: #^exec[]
33: #^fori[]
34: #^tconnect[]
1.406 parser 35: #^xslt[]
1.395 parser 36: #^xml[]
1.364 parser 37: #^header[]
38: OK
1.402 parser 39:
1.406 parser 40: @domdata[]
1.408 parser 41: $xdoc[^xdoc::create[doc]]
42: $doc[$xdoc.documentElement]
43: $name[^doc.appendChild[^xdoc.createElement[name]]]
1.405 parser 44: $text[^name.appendChild[^xdoc.createTextNode[петросян petrosian]]]
1.406 parser 45:
46: @domedit[]
47: ^domdata[]
1.404 parser 48: #$paf.nodeName<br>
49: #$doc.documentElement.nodeName<br>
50:
1.406 parser 51: ^show-xnode1[$xdoc.documentElement;0;1]
52: <hr>
53: ^show-xdoc2[$xdoc]
1.411 parser 54: <hr>
1.406 parser 55:
56: @domxslt[]
57: ^domdata[]
1.405 parser 58: ^show-xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
1.411 parser 59: <hr>
1.401 parser 60:
61: @lsplit2[]
62: $path[/optics/]
63: $pathTable[^path.lsplit[/]]
64: ^pathTable.menu{
65: ^if(def $pathTable.piece){
66: =$pathTable.piece=
67: }
68: }
69:
1.395 parser 70:
1.397 parser 71: @faceesize[]
72: $k(2)
73: $pict[^image::load[paf.gif]]
74: $small[^image::create($pict.width/$k;$pict.height/$k)]
1.398 parser 75: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
1.397 parser 76: $response:body[^small.gif[]]
77:
1.395 parser 78: @imageresize[]
79: $k(2)
80: $pict[^image::create(400*$k;200*$k)]
81: $pict.line-width(2)
82: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
1.397 parser 83: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
1.395 parser 84: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1.397 parser 85: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
86: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
1.395 parser 87: #$response:body[^pict.gif[]]
88:
89: $small[^image::create($pict.width/$k;$pict.height/$k)]
1.396 parser 90: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
1.398 parser 91: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
1.395 parser 92:
93: $response:body[^small.gif[]]
94:
1.388 parser 95:
96: @tintdefault[]
97: #$abc[abc]
98: $abc[33]
99: ^abc.int[z]
100: #^abc.int(123)
1.390 parser 101:
102: @ifassignhash[]
103: $h[^if(1){$.a(1);$.a(2)}]
104: $h.a
1.387 parser 105:
106: @ifpasshash[]
107: $a[$.e[a]]
108: $b[$.e[b]]
1.389 parser 109: ^ifpasshashdest[^if(1){$a;$b}]
1.387 parser 110: #$x[^if(1){$a}{$b}]
111: #^ifpasshashdest[$x]
112:
113: @ifpasshashdest[p]
114: $p.e
115:
116: @movedir[]
117: ^file:move[a;deeper/a]
1.386 parser 118:
119: @replace[]
120: $a[12^;3]
121: ^a.replace[^table::set{from to
122: 2^; !
123: }]
124:
1.385 parser 125:
126: @set[]
127: ^setdata[]
128: ^a.add[$b]
129: add:$a.3<br>
130:
131: ^setdata[]
132: ^a.sub[$b]
133: sub2:$a.2<br>
134: sub1:$a.1<br>
135:
136: ^setdata[]
137: $c[^a.union[$b]]
138: union3:$c.3<br>
139: union2:$c.2<br>
140:
141: ^setdata[]
142: $c[^a.intersection[$b]]
143: intersection3:$c.3<br>
144: intersection2:$c.2<br>
145:
146: ^setdata[]
147: intersects:^if(^a.intersects[$b]){y;n}<br>
148: intersects2:^if(^a.intersects[ ]){y;n}<br>
149:
150:
151: <hr>
152:
153: @setdata[]
154: $a[$.1[a1] $.2[a2]]
155: $b[ $.2[b2] $.3[b3]]
156:
1.383 parser 157:
1.384 parser 158: @hash[]
159: $h[^hash::create[$._default[123]]]
160: $h.paf[not kretin]
161: $h.paf<br>
162: =$h.that=<br>
163:
164: @methresult[]
165: $result[^table::set{1}]
1.377 parser 166:
1.381 parser 167: @terror[]
168: ^error[method z must be called with z]
169:
1.380 parser 170: @syntax1[]
171: #^a[^b]
172:
173: @syntax2[]
1.381 parser 174: #^a[
1.379 parser 175:
1.377 parser 176: @ssave[]
177: $abc[abc]
178: ^abc.save[abc]
1.376 parser 179:
180: @calendar[]
181: 2001;11:<br>
182: $week_days[^date:calendar[rus](2001;11)]
183: <pre>
184: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday; ^; ^;} }<br>}
185: </pre>
1.372 parser 186:
1.375 parser 187: @thash[]
188: $table[^table::set{id name age
189: 1 paf 278
190: 2 пиф 234
191: }]
192: $hash[^table.hash[id;^table::set[nameless]{id
193: name}]]
194: $hash.2.id $hash.2.name $hash.2.age
195:
1.372 parser 196: @tdef[]
197: $s[0]
198: if 0=^if($s){}{n}<br>
199: if def 0=^if(def $s){y}{}<br>
200: <hr>
1.371 parser 201:
202: @ford[]
1.374 parser 203: ^for[i](0;5){$i}{($i)}
1.368 parser 204:
1.370 parser 205: @tif[]
206: ^if[def]{y;n}
207:
1.368 parser 208: @image[]
209: $pict[^image::create(400;200)]
1.379 parser 210: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
211: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
212: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
213: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
214: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
1.368 parser 215: $response:body[^pict.gif[]]
216:
217:
1.366 parser 218:
1.369 parser 219: @mail2[]
1.367 parser 220: ^mail:send[
1.369 parser 221: $.content-type[$.value[text/plain] $.charset[windows-1251]]
222: $.from[Александр Петросян <paf@design.ru>]
1.367 parser 223: $.to[Александр Петросян <paf@design.ru>]
1.369 parser 224: $.subject[проверка]
225: $.body[проверка]
1.367 parser 226: ]
227:
1.366 parser 228: @cookie[]
1.367 parser 229: $env:HTTP_COOKIE<br>
230:
231: #$cookie:переменная[test тест ТЕСТ2]
232: =$cookie:переменная=<br>
233: #$cookie:переменная2[test тест ТЕСТ3]
234: =$cookie:переменная2=<br>
1.412 parser 235: =$cookie:CLASS.переменная2=<br>
1.365 parser 236:
237: @response[]
238: #^if($form:reload){
239: $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
240: #}
1.364 parser 241:
242: @xslt[]
243: ^xdata[]
1.407 parser 244: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
245: ^show-xdoc2[$transformed]
1.364 parser 246:
247: @regexp2[]
248: $s[ select]
249: $s[^s.match[^^\s*][]{!}]
250: $s
251:
252: @header[]
253: $response:refresh[
254: $.value[0]
255: $.url[http://design.ru?a=^taint[123]]
256: ]
257:
258: @ttablerem[]
259: $table[^table::load[a.cfg]]
260: ^table.menu{$table.a}
261:
262: @tconnect[]
263: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
264: $tables[^table::sql{show tables}]
265: #$cols[^tables.columns[]]
266: #$cols.column
267: ^tables.menu{
268: $tables.[Tables_in_test]<br>
269: }
270: }
271:
272: @pcre[]
273: $s[1 2]
274: ^s.match[\s;ig]{!}
275: #^s.match[\d;ig]{!}
276:
277:
278: @regexp[]
279: $s[abcАБВ]
280: ^if(^s.match[б][i]){y}{n}
281:
282: @mail[]
283: #$ORIGINS(1)
284: ^mail:send[
285: $.from[paf@design.ru]
286: $.to[paf@design.ru]
287: $.body[1
288:
289: 2
290:
291:
292: 3]
293: ]
294:
295: @exec[]
1.370 parser 296: $a[^file::exec[fc.exe;;a;b]]
1.364 parser 297: $a.status|$a.stderr<hr>
298:
299: @fori[][i]
300: ^for[i](1;3){... =$i= ...}
301:
302: @xdata[]
303: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
304: $xdoc[^xdoc::load[input.xml]]
305:
306: @xml[]
307: ^xdata[]
308:
309: ^show-xdoc2[$xdoc]<hr>
310: #^show-xnode1[$xdoc]<hr>
311: $people[^xdoc.select[*/man]]
312: #^show1[]
313: ^show-xnodes1[$people]<hr>
314: #^people.0.owner.hren[]
315:
1.393 parser 316: ^show-xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
1.364 parser 317:
318: by id:
319: ^show-xnode1[^xdoc.getElementById[1];0;1]
320: <hr>
321:
322: @show1[array]
323: ^for[i](0;^array._count[]-1){
324: $x[$array.$i]
325: $x.firstChild.nodeValue:
326: $pattributes[$x.parentNode.attributes]
327: ^if(^pattributes._count[]){
328: $pattributes.id.name=$pattributes.id.nodeValue
329: }
330: <br>
331: }
332:
333: @show-xnodes1[array][i]
334: ^for[i](0;^array._count[]-1){
335: ^show-xnode1[$array.$i;0;1]
336: }
337:
338: @show-xnode1[x;level;single][l]
339: ^if(def $x){
340: ^for[l](0;$level-1){ ^; ^; ^; ^;}
341: ^if($x.nodeType == $xnode:ELEMENT_NODE){
342: <^;$x.nodeName
343: $pairs[$x.attributes]
344: ^if(def $pairs){
345: $names[^pairs._keys[]]
346: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
347: }
348: >^;
349: }{
350: [$x.nodeType]
351: }
352:
353: ^if(def $x.nodeValue){$x.nodeValue}<br>
354: ^show-xnode1[$x.firstChild]($level+1)
355: ^if(!$single){
356: ^show-xnode1[$x.nextSibling]($level)
357: }
358:
359: ^if($x.nodeType == $xnode:ELEMENT_NODE){
360: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
361: }
362: }
363:
364: @show-xdoc2[xdoc]
365: ^xdoc.save[save.xml;
366: # $.encoding[windows-1251]
367: $.method[xml]
368: ]
369: $file[^xdoc.file[
370: # $.encoding[windows-1251]
371: $.method[html]
372: ]]
373: ^file.save[text;save_file.html]
1.413 ! parser 374: <pre>^taint[^xdoc.string[]]
1.364 parser 375: # $.encoding[windows-1251]
1.413 ! parser 376: # $.method[html]
1.364 parser 377: #]]
1.413 ! parser 378: </pre>
E-mail: