Annotation of parser3/src/www/htdocs/index.html, revision 1.510
1.510 ! paf 1: @auto[]
1.503 paf 2: $request:charset[windows-1251]
3: $response:charset[windows-1251]
1.510 ! paf 4:
! 5: @main[]
! 6: ^ttime[]
1.506 paf 7: #^tupper[]
1.499 paf 8: #^treplace[]
1.500 paf 9: #^xslt2[]
1.507 paf 10: #^tcache2[]
1.489 paf 11: #$ORIGINS(1)
1.488 paf 12: #$t[^table::set{a b} ^table::set{c d}]
1.486 paf 13: #^ttaintuntaint[]
1.493 paf 14: #^tappend2[]
1.480 paf 15: #^badvsnprintf[]
1.479 paf 16: #^badoracequoting[]
1.477 paf 17: #^badconstructors[]
1.502 paf 18: #^xloadwrongtable[]
1.476 paf 19: #^xsetwrongtable[]
1.473 paf 20: #^if($form:test){y}{n}
1.472 paf 21: #^tablecolumnerror[]
22: #^roll[]
1.471 paf 23: #^cookie2[]
1.470 paf 24: #^tableset[]
1.469 paf 25: #^math:PI.format{%.30f}
1.462 paf 26: #^xchildren[]
27: #^thashforeach3[]
1.461 paf 28: #^thashforeach2[]
29: #^thashforeach[]
1.458 paf 30: #^thashdelete[]
1.456 paf 31: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
1.454 paf 32: #^tappend[]
1.453 paf 33: #^sappend[]
1.452 paf 34: #^eval(10\3)<br>
1.450 paf 35: #^tform[]
1.448 paf 36: #^formattest[]
1.447 paf 37: #^filelist[]
1.443 paf 38: #^connect[mysql://user:pass@host]{ }
1.431 paf 39: #^безнадёжна_попытка_поправить_непоправимое[]
1.493 paf 40: #^tcache[]
1.460 paf 41: #^thashfileexp[]
1.468 paf 42: #^tcounter[]
1.423 parser 43: #^tablehash[]
1.443 paf 44: #j^hashfile[]
1.417 parser 45: #^formclass[]
1.415 parser 46: #^hren[]
1.485 paf 47: #^domedit[]
1.475 paf 48: #^domxslt[]
1.402 parser 49: #^lsplit2[]
1.401 parser 50: #^faceesize[]
1.445 paf 51: #^imageresize[]
1.399 parser 52: #^ifassignhash[]
53: #^tintdefault[]
54: #$response:status[404]
1.390 parser 55: #^ifpasshash[]
1.387 parser 56: #^movedir[]
57: #^replace[]
1.416 parser 58: #^set[]
1.385 parser 59: #^hash[]<hr>
1.384 parser 60: #$t[^methresult[]] ->$t
1.382 parser 61: #^terror[]
1.378 parser 62: #^ssave[]
1.377 parser 63: #^calendar[]
1.376 parser 64: #^thash[]
1.373 parser 65: #^tdef[]
1.375 parser 66: #^ford[]
1.371 parser 67: #^tif[]
1.383 parser 68: #^image[]
1.369 parser 69: #^mail2[]
1.413 parser 70: #^cookie[]
1.365 parser 71: #^response[]
1.364 parser 72: #^regexp2[]
73: #^ttablerem[]
74: #^pcre[]
75: #^regexp[]<hr>
76: #^mail[]
77: #^exec[]
78: #^fori[]
1.468 paf 79: #^tconnect[]
1.509 paf 80: #^xslt[]
1.470 paf 81: #^xml[]
1.364 parser 82: #^header[]
1.477 paf 83: <hr>
1.364 parser 84: OK
1.504 paf 85:
1.510 ! paf 86: @ttime[]
! 87: $now[^date::now[]]
! 88: $now.hour:$now.minute
! 89:
1.504 paf 90: @tupper[]
91: $t[abcABCабвАБВ]
92: $t<br>
93: ^t.upper[]
1.497 paf 94:
95: @treplace[]
96: $copy-paste-clean[^table::set{a b
97: . _
98: , _
99: + _
100: & _
101: ? _
102: = _}]
103:
1.498 paf 104: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
1.497 paf 105: # почему-то этот replace роняет апач в 500 ошибку :(
1.498 paf 106: #^cache_key.replace[$copy-paste-clean]
107: $test[abc]
108: ^test.save[$cache_key]saved<br>
109: $cache[^file:list[.;\.cache^$]]
110: ^file:delete[$cache_key]deleted($cache.name)<br>
111:
1.497 paf 112:
113:
114: @xslt2[]
115: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
116: <document><block><p>hi</p></block></document>
117: }]
118: #^show-xdoc2[$xdoc]
119: ^show-xdoc2[^xdoc.transform[templates/_document.xslt]]
120: <hr>
121:
1.495 paf 122:
1.496 paf 123: @tcache2[]
124: ^cache[$DB_HOME/keyключ](2){
125: ^math:random(100)
126: }
1.485 paf 127:
1.486 paf 128: @ttaintuntaint[]
129: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
130:
131: ]zz
132: <hr>
133: ^untaint[html]{1^taint[ ]2 3}
134:
135:
1.485 paf 136: @tappend2[]
137: $t[^table::set{a b}]^t.append{1 2}$t.a
1.477 paf 138:
1.479 paf 139: @badvsnprintf[]
140: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
141: }
142:
143:
1.477 paf 144: @badoracequoting[]
145: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
146: ^connect[$SQL.connect-string]{
1.478 paf 147: ^void:sql{delete from paf}
1.479 paf 148: ^void:sql{insert into paf values (1, '$form:text')}
1.478 paf 149: $paf[^table::sql{select * from paf}]
150: ^paf.menu{
1.479 paf 151: $paf.id: ^untaint{$paf.block}<hr>
1.478 paf 152:
1.477 paf 153: }
1.478 paf 154: <hr>
155:
1.477 paf 156:
1.478 paf 157: ^rem{
1.477 paf 158: $news[^table::sql{select description from news}[$.limit(3)]]
159: ^news.menu{
160: ^untaint{$news.description}<hr>
161:
162: }
1.478 paf 163: <hr>
164: }
165:
166: $tables[^table::sql{select table_name from user_tables}]
167: ^tables.menu{
168: $tables.table_name<br>
169: }
170:
1.477 paf 171: }
172: <hr>
173: $env:PATH
1.476 paf 174:
175: @badconstructors[]
176: $bred[^string::length[]]
177: $bred[^response::clear[]]
178: $bred[^int::int[]]
179:
1.475 paf 180:
181: @xloadwrongtable[]
182: $constr[^xdoc::load[wrongtable.xml]]
183:
184: @xsetwrongtable[]
185: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
186: <block-list>^untaint[as-is]{$constructor}</block-list>}]
187:
1.471 paf 188:
1.472 paf 189: @tablecolumnerror[]
190: $t[^table::set{a}]
191: $t.$a
192:
1.471 paf 193: @roll[]
1.472 paf 194: #$date[^date::set(1970;1;2)]
195: #^date.roll[month](-1)
196: $date[^date::set(2038;1;1)]
1.471 paf 197: ^date.roll[month](+1)
198: $date.year $date.month $date.day
1.470 paf 199:
200: @cookie2[]
201: #=$cookie:clientType[$.value[test]]=<br>
202: =$cookie:clientType=<br>
203:
1.469 paf 204:
205: @tableset[]
206: $a[^table::set{a
207: 1
208: 2}]
209: ^eval(100\$a)
210:
211:
212:
213: @zzz[]
214:
1.462 paf 215:
216: $constructor[
217: <block1 name="main_srvr" type="0" label="Основное тело" />
218: <block2 name="main_srvr2" type="0" label="Основное тело" />
219: ]
220:
221: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
222: <block-list>^untaint[as-is]{$constructor}</block-list>}]
223:
224: $children[$constr.documentElement.childNodes]
225: ^if($children){
226: ^for[i](1;^children._count[]){
227: $node[$children.$i]
228: $node.nodeName<br>
229: }
230: }
231:
1.461 paf 232:
233: @thashforeach3[]
234: $h[
235: $.a[1]
236: $.b[2]
237: ]
238: $c[^table::set{a
239: ^h.foreach[key;value]{$value
240: }}]
241: $c.a
242:
243: @thashforeach2[]
244: $h[
245: $.a[1]
246: $.b[2]
247: ]
248: $c[
249: ^h.foreach[key;value]{
250: $.$key[$value]
251: }
252: ]
253: $c.b
1.458 paf 254:
255: @thashforeach[]
256: $h[
257: $.a[1]
258: $.b[2]
259: ]
260: ^h.foreach[key;value]{
261: $key=$value<br>
262: }
1.457 paf 263:
264: @thashdelete[]
265: $h[$.a[1] $.b[2]]
266: was:<br>
267: count=^h._count[] <br>
268: b='$h.b' <br>
269:
270: ^h.delete[b]
271:
272: now:<br>
273: count=^h._count[] <br>
274: b='$h.b'
1.452 paf 275:
276: @sappend[]
277: $test[123]
278: ^test.save[test]
279: ^test.save[append;test]
280:
1.453 paf 281: @tappend[]
282: $test[^table::set{a b
283: a1 b1}]
284: ^test.save[test]
285: $test[^table::set{a b
286: a2 b2}]
287: ^test.save[append;test]
1.452 paf 288:
1.448 paf 289:
290: @tform[]
1.449 paf 291: ^if(def $form:new_file){y}{n}
292: <form method="post" enctype="multipart/form-data">
293: <input type="file" name="new_file" />
1.448 paf 294: <input type=submit>
295: </input>
1.447 paf 296:
297: @formattest[]
298: $size(15.124)
299:
300: ^size.format{%.2f}
1.446 paf 301:
302: @filelist[]
303: $html[^file:list[.;\.html^$]]
304: ^html.menu{
305: $html.name<br>
306: }
307: <hr>
1.431 paf 308:
309: @безнадёжна_попытка_поправить_непоправимое[]
310: $dom_from_disk[^xdoc::load[input.xml]]
311: $dom_created_in_air[^xdoc::create[doc]]
312: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
313: ^show-xdoc2[$dom_created_in_air]
314:
1.426 parser 315:
1.428 parser 316: @tcache[]
317: #^hashfile:clear[cache]
1.459 paf 318: $code[^hashfile::open[$DB_HOME;cache]]
1.496 paf 319: ^code.cache[key](2){
1.430 parser 320: ^math:random(100)
321: # ^code.delete[]
1.496 paf 322: }
1.428 parser 323:
1.426 parser 324: @thashfileexp[]
1.459 paf 325: $hf[^hashfile::open[$DB_HOME;hashfile]]
1.428 parser 326: $hf.paf[$.value[крут] $.expires(3)]
327: paf=$hf.paf
1.459 paf 328: <hr>
329: ^hf.foreach[key;value]{
330: $key=$value<br>
331: }
1.427 parser 332: <hr>
333: $hash[^hf.hash[]]
334: =$hash.paf=
335: <hr>
1.420 parser 336:
1.423 parser 337: @tcounter[]
1.440 paf 338: ^tcounterone[$DB_HOME]
1.466 paf 339: other root:
340: ^tcounterone[${DB_HOME}2]
341: again, first:
342: ^tcounterone[$DB_HOME]
1.432 paf 343:
344: @tcounterone[DB_HOME]
345: $counter[^hashfile::open[$DB_HOME;counter]]
1.440 paf 346: #^counter.clear[]
1.423 parser 347: ^counter.transaction{
348: # $counter.value(10)
349: $counter.value($counter.value+1)
350: # ^counter.delete[value]
351: $counter.value
352: }
1.424 parser 353: <hr>
1.432 paf 354: ^rem{
1.424 parser 355: $hash[^counter.hash[]]
1.425 parser 356: =$hash.value=
1.424 parser 357: <hr>
1.432 paf 358: }
1.423 parser 359:
360: @tablehash[]
361: $productList[^table::set{id name
362: 1 носки
363: 2 валенки
364: 3 ушанка
365: }]
366:
367: #скажем, у первого дилера
368: $firstPriceList[^table::set{id price
369: 1 0.3
370: 3 1000
371: }]
372:
373: $firstPriceHash[^firstPriceList.hash[id]]
374:
375: ^productList.menu{
376: продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
377: }
378:
379:
1.420 parser 380: @hashfile[]
381: $hf[^hashfile::assign[hashfile]]
1.423 parser 382: #$hf.paf[крут5]
1.420 parser 383: paf=$hf.paf
1.402 parser 384:
1.417 parser 385: @formclass[]
386: ^$form:CLASS.a=$form:CLASS.a
387:
1.406 parser 388: @domdata[]
1.418 parser 389: ^if(1){
1.422 parser 390: # $a{^hren[]}
1.418 parser 391: }
1.419 parser 392: $a
1.408 parser 393: $xdoc[^xdoc::create[doc]]
394: $doc[$xdoc.documentElement]
1.473 paf 395: $name[^doc.appendChild[^xdoc.createElement[name]]]
1.474 paf 396: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
1.435 paf 397: ^untaint[as-is]{=$text.nodeValue=}
1.406 parser 398:
399: @domedit[]
400: ^domdata[]
1.404 parser 401: #$paf.nodeName<br>
402: #$doc.documentElement.nodeName<br>
403:
1.406 parser 404: ^show-xnode1[$xdoc.documentElement;0;1]
405: <hr>
406: ^show-xdoc2[$xdoc]
1.411 parser 407: <hr>
1.406 parser 408:
409: @domxslt[]
410: ^domdata[]
1.405 parser 411: ^show-xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
1.411 parser 412: <hr>
1.401 parser 413:
414: @lsplit2[]
415: $path[/optics/]
416: $pathTable[^path.lsplit[/]]
417: ^pathTable.menu{
418: ^if(def $pathTable.piece){
419: =$pathTable.piece=
420: }
421: }
422:
1.395 parser 423:
1.397 parser 424: @faceesize[]
425: $k(2)
426: $pict[^image::load[paf.gif]]
427: $small[^image::create($pict.width/$k;$pict.height/$k)]
1.398 parser 428: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
1.397 parser 429: $response:body[^small.gif[]]
430:
1.395 parser 431: @imageresize[]
432: $k(2)
433: $pict[^image::create(400*$k;200*$k)]
434: $pict.line-width(2)
1.444 paf 435: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
436: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
1.395 parser 437: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1.444 paf 438: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
439: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
440: $response:body[^pict.gif[]]
1.395 parser 441:
1.443 paf 442: #$small[^image::create($pict.width/$k;$pict.height/$k)]
1.396 parser 443: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
1.443 paf 444: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
1.395 parser 445:
1.443 paf 446: #$response:body[^small.gif[]]
1.395 parser 447:
1.388 parser 448:
449: @tintdefault[]
450: #$abc[abc]
451: $abc[33]
452: ^abc.int[z]
453: #^abc.int(123)
1.390 parser 454:
455: @ifassignhash[]
456: $h[^if(1){$.a(1);$.a(2)}]
457: $h.a
1.387 parser 458:
459: @ifpasshash[]
460: $a[$.e[a]]
461: $b[$.e[b]]
1.389 parser 462: ^ifpasshashdest[^if(1){$a;$b}]
1.387 parser 463: #$x[^if(1){$a}{$b}]
464: #^ifpasshashdest[$x]
465:
466: @ifpasshashdest[p]
467: $p.e
468:
469: @movedir[]
470: ^file:move[a;deeper/a]
1.386 parser 471:
472: @replace[]
473: $a[12^;3]
474: ^a.replace[^table::set{from to
475: 2^; !
476: }]
477:
1.385 parser 478:
479: @set[]
480: ^setdata[]
481: ^a.add[$b]
482: add:$a.3<br>
483:
484: ^setdata[]
485: ^a.sub[$b]
486: sub2:$a.2<br>
487: sub1:$a.1<br>
488:
489: ^setdata[]
490: $c[^a.union[$b]]
491: union3:$c.3<br>
492: union2:$c.2<br>
493:
494: ^setdata[]
495: $c[^a.intersection[$b]]
496: intersection3:$c.3<br>
497: intersection2:$c.2<br>
498:
499: ^setdata[]
500: intersects:^if(^a.intersects[$b]){y;n}<br>
501: intersects2:^if(^a.intersects[ ]){y;n}<br>
502:
503:
504: <hr>
505:
506: @setdata[]
507: $a[$.1[a1] $.2[a2]]
508: $b[ $.2[b2] $.3[b3]]
509:
1.383 parser 510:
1.384 parser 511: @hash[]
512: $h[^hash::create[$._default[123]]]
513: $h.paf[not kretin]
514: $h.paf<br>
515: =$h.that=<br>
516:
517: @methresult[]
518: $result[^table::set{1}]
1.377 parser 519:
1.381 parser 520: @terror[]
521: ^error[method z must be called with z]
522:
1.380 parser 523: @syntax1[]
524: #^a[^b]
525:
526: @syntax2[]
1.381 parser 527: #^a[
1.379 parser 528:
1.377 parser 529: @ssave[]
530: $abc[abc]
531: ^abc.save[abc]
1.376 parser 532:
533: @calendar[]
534: 2001;11:<br>
535: $week_days[^date:calendar[rus](2001;11)]
536: <pre>
537: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday; ^; ^;} }<br>}
538: </pre>
1.372 parser 539:
1.375 parser 540: @thash[]
541: $table[^table::set{id name age
542: 1 paf 278
543: 2 пиф 234
544: }]
545: $hash[^table.hash[id;^table::set[nameless]{id
546: name}]]
547: $hash.2.id $hash.2.name $hash.2.age
548:
1.372 parser 549: @tdef[]
550: $s[0]
551: if 0=^if($s){}{n}<br>
552: if def 0=^if(def $s){y}{}<br>
553: <hr>
1.371 parser 554:
555: @ford[]
1.374 parser 556: ^for[i](0;5){$i}{($i)}
1.368 parser 557:
1.370 parser 558: @tif[]
559: ^if[def]{y;n}
560:
1.368 parser 561: @image[]
562: $pict[^image::create(400;200)]
1.379 parser 563: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
564: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
565: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
566: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
567: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
1.368 parser 568: $response:body[^pict.gif[]]
569:
570:
1.366 parser 571:
1.369 parser 572: @mail2[]
1.367 parser 573: ^mail:send[
1.369 parser 574: $.content-type[$.value[text/plain] $.charset[windows-1251]]
575: $.from[Александр Петросян <paf@design.ru>]
1.367 parser 576: $.to[Александр Петросян <paf@design.ru>]
1.369 parser 577: $.subject[проверка]
578: $.body[проверка]
1.367 parser 579: ]
580:
1.366 parser 581: @cookie[]
1.367 parser 582: $env:HTTP_COOKIE<br>
583:
584: #$cookie:переменная[test тест ТЕСТ2]
585: =$cookie:переменная=<br>
586: #$cookie:переменная2[test тест ТЕСТ3]
587: =$cookie:переменная2=<br>
1.412 parser 588: =$cookie:CLASS.переменная2=<br>
1.365 parser 589:
590: @response[]
591: #^if($form:reload){
592: $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
593: #}
1.364 parser 594:
595: @xslt[]
596: ^xdata[]
1.407 parser 597: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
598: ^show-xdoc2[$transformed]
1.364 parser 599:
600: @regexp2[]
601: $s[ select]
602: $s[^s.match[^^\s*][]{!}]
603: $s
604:
605: @header[]
606: $response:refresh[
607: $.value[0]
608: $.url[http://design.ru?a=^taint[123]]
609: ]
610:
611: @ttablerem[]
612: $table[^table::load[a.cfg]]
613: ^table.menu{$table.a}
614:
615: @tconnect[]
616: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
617: $tables[^table::sql{show tables}]
618: #$cols[^tables.columns[]]
619: #$cols.column
620: ^tables.menu{
621: $tables.[Tables_in_test]<br>
622: }
623: }
624:
625: @pcre[]
626: $s[1 2]
627: ^s.match[\s;ig]{!}
628: #^s.match[\d;ig]{!}
629:
630:
631: @regexp[]
632: $s[abcАБВ]
633: ^if(^s.match[б][i]){y}{n}
634:
635: @mail[]
636: #$ORIGINS(1)
637: ^mail:send[
638: $.from[paf@design.ru]
639: $.to[paf@design.ru]
640: $.body[1
641:
642: 2
643:
644:
645: 3]
646: ]
647:
648: @exec[]
1.370 parser 649: $a[^file::exec[fc.exe;;a;b]]
1.364 parser 650: $a.status|$a.stderr<hr>
651:
652: @fori[][i]
653: ^for[i](1;3){... =$i= ...}
654:
1.489 paf 655: @xdata0[]
1.364 parser 656: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1.468 paf 657: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
658: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
659: <people>
660: <man id="1" имя="word слово">
661: <name>P«^;AF B</name>
662: </man>
663: <man id="2">
664: <name>ПИФ^taint[&]</name>
665: </man>
666: </people>
667: }]
1.489 paf 668:
669: @xdata[]
670: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1.490 paf 671: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
1.489 paf 672: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
673: <people>
674: <man id="1" имя="word слово">
675: <name>P«^;AF B</name>
676: </man>
677: <man id="2">
678: <name>ПИФ^taint[&]</name>
679: </man>
680: </people>
681: }}]
1.364 parser 682:
683: @xml[]
684: ^xdata[]
685:
686: ^show-xdoc2[$xdoc]<hr>
687: #^show-xnode1[$xdoc]<hr>
688: $people[^xdoc.select[*/man]]
689: #^show1[]
690: ^show-xnodes1[$people]<hr>
691: #^people.0.owner.hren[]
692:
1.393 parser 693: ^show-xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
1.364 parser 694:
695: by id:
696: ^show-xnode1[^xdoc.getElementById[1];0;1]
697: <hr>
698:
699: @show1[array]
700: ^for[i](0;^array._count[]-1){
701: $x[$array.$i]
702: $x.firstChild.nodeValue:
703: $pattributes[$x.parentNode.attributes]
704: ^if(^pattributes._count[]){
705: $pattributes.id.name=$pattributes.id.nodeValue
706: }
707: <br>
708: }
709:
710: @show-xnodes1[array][i]
711: ^for[i](0;^array._count[]-1){
712: ^show-xnode1[$array.$i;0;1]
713: }
714:
715: @show-xnode1[x;level;single][l]
716: ^if(def $x){
717: ^for[l](0;$level-1){ ^; ^; ^; ^;}
718: ^if($x.nodeType == $xnode:ELEMENT_NODE){
719: <^;$x.nodeName
720: $pairs[$x.attributes]
721: ^if(def $pairs){
722: $names[^pairs._keys[]]
723: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
724: }
725: >^;
726: }{
727: [$x.nodeType]
728: }
729:
730: ^if(def $x.nodeValue){$x.nodeValue}<br>
731: ^show-xnode1[$x.firstChild]($level+1)
732: ^if(!$single){
733: ^show-xnode1[$x.nextSibling]($level)
734: }
735:
736: ^if($x.nodeType == $xnode:ELEMENT_NODE){
737: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
738: }
739: }
740:
741: @show-xdoc2[xdoc]
1.473 paf 742: ^xdoc.save[out/save.xml;
1.364 parser 743: # $.encoding[windows-1251]
744: $.method[xml]
745: ]
746: $file[^xdoc.file[
747: # $.encoding[windows-1251]
748: $.method[html]
749: ]]
1.473 paf 750: ^file.save[text;out/save_file.html]
1.487 paf 751: #$response:body[^xdoc.file[ $.media-type[text/paf] ]]
752: <pre>^taint[html][^xdoc.string[
1.508 paf 753: $.method[html]
1.487 paf 754: # $.version[1.0]
755: # $.encoding[utf-8]
756: # $.omit-xml-declaration[yes]
757: # $.standalone[yes]
758: # $.doctype-public[-//W3C//DTD XHTML]
759: # $.doctype-system[/a/b/c/]
760: # $.indent[no]
761: $.media-type[text/paf]
1.486 paf 762: ]]
1.413 parser 763: </pre>
E-mail: