Annotation of parser3/www/htdocs/index.html, revision 1.25
1.15 paf 1: #@USE
2: #z/t.p
3:
4: @autoz[]
5: $request:charset[windows-1251]
6: $response:charset[windows-1251]
7: $response:content-type[$.value[text/html]$.charset[$response:charset]]
8:
9: @main[]
1.25 ! paf 10: ^rolls[]
! 11: #^exceptions1[]
1.22 paf 12: #^locate_by_expr[]
1.18 paf 13: #^method_junction_params{...}
1.17 paf 14: #^verifyCookie[paf]
1.21 paf 15: #^execlangs[]
1.16 paf 16: #$t[^tobjeresult[]]$t.a
17: #^xmlprobs[]
1.15 paf 18: #^doubleprobs[]
19: #^math:random(-10)
20: #^divnamestop[]
21: #^arrayclone[]
22: #^operator_tricks[]
23: #^xoutputrusattr[]
24: #^xdocset1[]
25: #^regexp3[]
26: #^exec2[]
27: #^tlock[]
28: #^xmloutattrwithoutvalue[]
29: #^precisionProblem[]
30: #^xpath[]
31: #^ttablesetlang[]
32: #^mail3[]
33: #^ttime[]
34: #^tupper[]
35: #^treplace[]
36: #^xslt2[]
37: #^tcache2[]
38: #$ORIGINS(1)
39: #$t[^table::set{a b} ^table::set{c d}]
40: #^ttaintuntaint[]
41: #^tappend2[]
42: #^badvsnprintf[]
43: #^badoracequoting[]
44: #^badconstructors[]
45: #^xloadwrongtable[]
46: #^xsetwrongtable[]
47: #^if($form:test){y}{n}
48: #^tablecolumnerror[]
49: #^roll[]
50: #^cookie2[]
51: #^tableset[]
52: #^math:PI.format{%.30f}
53: #^xchildren[]
54: #^thashforeach3[]
55: #^thashforeach2[]
56: #^thashforeach[]
57: #^thashdelete[]
58: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
59: #^tappend[]
60: #^sappend[]
61: #^eval(10\3)<br>
62: #^tform[]
63: #^formattest[]
64: #^filelist[]
65: #^connect[mysql://user:pass@host]{ }
66: #^безнадёжна_попытка_поправить_непоправимое[]
67: #^tcache[]
68: #^thashfileexp[]
69: #^tcounter[]
70: #^tablehash[]
71: #j^hashfile[]
72: #^formclass[]
73: #^hren[]
74: #^domedit[]
75: #^domxslt[]
76: #^lsplit2[]
77: #^faceesize[]
78: #^imageresize[]
79: #^ifassignhash[]
80: #^tintdefault[]
81: #$response:status[404]
82: #^ifpasshash[]
83: #^movedir[]
84: #^replace[]
85: #^set[]
86: #^hash[]<hr>
87: #$t[^methresult[]] ->$t
88: #^terror[]
89: #^ssave[]
90: #^calendar[]
91: #^thash[]
92: #^tdef[]
93: #^ford[]
94: #^tif[]
95: #^image[]
96: #^mail2[]
97: #^cookie[]
98: #^response[]
99: #^regexp2[]
100: #^ttablerem[]
101: #^pcre[]
102: #^regexp[]<hr>
103: #^mail[]
104: #^exec[]
105: #^fori[]
106: #^tconnect[]
107: #^xslt[]
108: #^xml[]
109: #^header[]
110: <hr>
111: OK
1.25 ! paf 112:
! 113: @rolls[]
! 114: $d[^date::create(2002;4;4)]
! 115: ^d.sql-string[]<br>
! 116: ^for[i](1;7){
! 117: ^d.roll[day](-1)
! 118: ^d.sql-string[]<br>
! 119: }
! 120: <hr>
! 121: $d[^date::create(2002;3;28)]
! 122: ^d.sql-string[]<br>
! 123: ^for[i](1;7){
! 124: ^d.roll[day](+1)
! 125: ^d.sql-string[]<br>
! 126: }
! 127: <hr>
! 128: $d[^date::create(2002;12;3)]
! 129: ^d.sql-string[]<br>
! 130: ^for[i](1;14){
! 131: ^d.roll[day](-1)
! 132: ^d.sql-string[]<br>
! 133: }
! 134: <hr>
! 135: $d[^date::create(2002;10;19)]
! 136: ^d.sql-string[]<br>
! 137: ^for[i](1;14){
! 138: ^d.roll[day](+1)
! 139: ^d.sql-string[]<br>
! 140: }
! 141:
! 142:
! 143:
! 144:
! 145:
1.22 paf 146:
147: @exceptions1[]
148: ^try{
149: aaa
1.24 paf 150: ^throw[custom1;paf;is stupid]
1.22 paf 151: }{
1.24 paf 152: ^if($exception.type eq custom1){
153: $exception.handled(1)
154: # ^throw[$exception]
155: type=$exception.type<br>
156: source=$exception.source<br>
157: file=$exception.file<br>
158: lineno=$exception.lineno<br>
159: comment=$exception.comment<br>
160: }
1.22 paf 161: }
1.21 paf 162:
163: @locate_by_expr[]
164: $t[^table::create{a b
165: 1 nok
166: 2 ok
167: 3 nok
168: }]
169: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17 paf 170:
171: @method_junction_params[param]
172: ^if($param is junction){junction}{ne junction}
173:
174: @verifyCookie[value]
175: ^if($cookie:dummyvote eq $value){
176: $result(1)
177: }{
178: $cookie:dummyvote[$value]
179: $result(0)
180: }
1.16 paf 181:
182: @execlangs[]
1.20 paf 183: $f[^file::exec[test.pl]]
1.16 paf 184: ^process{$f.text}
185: #$c[^t.columns[]]
186: #^c.menu{
187: #* $c.column<br>
188: #}
189: =$t.c=
190:
191: @tobjeresult[]
192: ^table::create{a
193: 12}
1.15 paf 194:
195: @xmlprobs[]
196: $xmlDataType[^xdoc::load[program.xml]]
197: #<pre>^taint[^xmlDataType.string[]]
198: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
199: #=^xmlDataTypes._count[]=
200: =^xmlDataTypes.0.getAttribute[type-id]=
201:
202: @doubleprobs[]
203: $1(^math:radians(180))
204: $2($math:PI)
205: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
206: ^if($1==$2){y;n}
207: ^if(^math:radians(180)==$math:PI){y;n}
208:
209:
210: @divnamestop[]
211: $a(10)
212: ^eval($a\3)
213:
214: @arrayclone[]
215: $t[^table::create{a b
216: 1 11
217: 2 22
218: }]
219: $c[^table::create[$t]]
220: ^c.append{2 33}
221: ^t.count[]
222: ^c.count[]
223:
224: @operator_tricks[]
225: ^if(1){$a[^t[]]}
226: $a!
227: $a($b)
228: ^if(1){y}{n}
229: $MAIN:a(^t[] eq OK)
230: #$MAIN:a(1)
231: ^if($a){y}{n}
232: #^if(1){y}{n}
233: $form:if
234: $a[$.n[1]]
235: $a.if
236:
237: @xoutputrusattr[]
238: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
239: ^show_xdoc2[$d]
240:
241: @xdocset1[]
242: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
243: ^show_xdoc2[$d]
244:
245: @regexp3[]
246: $s[abcАБВ]
247: ^if(^s.match[][i]){y}{n}
248:
249:
250: @exec2[]
251: $a[^file::exec[bin/t.cmd]]
252: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
253:
254:
255: @tlock[]
256: ^file:lock[lockfile]{
257: code
258: }
259:
260: @xmloutattrwithoutvalue[]
261: #$ORIGINS(1)
262: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
263: $doc[^doc.transform[global.xsl]]
264: =^taint[html][^doc.string[$.method[html]]]=
265:
266:
267:
268: @precisionProblem[]
269: $a[123456789012345678901234567890]
270: $b(^a.double[])
271: ^b.format{%.20E}
272: <hr>
273: ^eval(2*2)
274:
275: @xpath[]
276: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
277: <document><block><p>привет</p></block></document>
278: }]
279: #^show_xdoc2[$xdoc]
280: $node[^xdoc.selectSingle[/document/block/p]]
281: ^if(def $node){
282: ^if($node is string){
283: $node
284: }{
285: ^if($node is hash){
286: ^node._count[]
287: }{
288: $node.nodeType
289: }
290: }
291: #$node.firstChild.nodeValue
292: }{
293: node not found
294: }
295:
296:
297: @ttablesetlang[]
298: $a-tab-b[a b
299: 1 2]
300:
301: $t[^table::set{$a-tab-b}]
302: =$t.a=
303: <hr>
304:
305: $t[^table::set[nameless]{^taint[$a-tab-b]}]
306: =$t.0=
307: <hr>
308:
309: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
310: =$t.a=
311:
312: #^t.append{1 2}
313:
314: @mail3[]
315: ^mail:send[
316: $.from[Александр Петросян <paf@design.ru>]
317: $.to[Александр Петросян <paf@design.ru>]
318: $.subject[проверка4]
319: $.body[
320: $.text[
321: $.content-type[$.value[text/plain] $.charset[windows-1251]]
322: $.body[проверка]
323: ]
324: $.attachment[
325: $.value[^file::load[text;index.html]]
326: $.file-name[привет всем.html]
327: ]
328: ]
329: ]
330:
331:
332: @ttime[]
333: $now[^date::now[]]
334: $now.hour:$now.minute
335:
336: @tupper[]
337: $t[abcABCабвАБВ]
338: $t<br>
339: ^t.upper[]
340:
341: @treplace[]
342: $copy-paste-clean[^table::set{a b
343: . _
344: , _
345: + _
346: & _
347: ? _
348: = _}]
349:
350: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
351: # почему-то этот replace роняет апач в 500 ошибку :(
352: #^cache_key.replace[$copy-paste-clean]
353: $test[abc]
354: ^test.save[$cache_key]saved<br>
355: $cache[^file:list[.;\.cache^$]]
356: ^file:delete[$cache_key]deleted($cache.name)<br>
357:
358:
359:
360: @xslt2[]
361: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
362: <document><block><p>привет</p></block></document>
363: }]
364: ^show_xdoc2[$xdoc]
365: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
366: <hr>
367:
368:
369: @tcache2[]
370: ^cache[$DB_HOME/keyключ](2){
371: ^math:random(100)
372: }
373:
374: @ttaintuntaint[]
375: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
376:
377: ]zz
378: <hr>
379: ^untaint[html]{1^taint[ ]2 3}
380:
381:
382: @tappend2[]
383: $t[^table::set{a b}]^t.append{1 2}$t.a
384:
385: @badvsnprintf[]
386: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
387: }
388:
389:
390: @badoracequoting[]
391: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
392: ^connect[$SQL.connect-string]{
393: ^void:sql{delete from paf}
394: ^void:sql{insert into paf values (1, '$form:text')}
395: $paf[^table::sql{select * from paf}]
396: ^paf.menu{
397: $paf.id: ^untaint{$paf.block}<hr>
398:
399: }
400: <hr>
401:
402:
403: ^rem{
404: $news[^table::sql{select description from news}[$.limit(3)]]
405: ^news.menu{
406: ^untaint{$news.description}<hr>
407:
408: }
409: <hr>
410: }
411:
412: $tables[^table::sql{select table_name from user_tables}]
413: ^tables.menu{
414: $tables.table_name<br>
415: }
416:
417: }
418: <hr>
419: $env:PATH
420:
421: @badconstructors[]
422: $bred[^string::length[]]
423: $bred[^response::clear[]]
424: $bred[^int::int[]]
425:
426:
427: @xloadwrongtable[]
428: $constr[^xdoc::load[wrongtable.xml]]
429: ^show_xdoc2[$constr]
430:
431: @xsetwrongtable[]
432: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
433: <block-list>^untaint[as-is]{$constructor}</block-list>}]
434:
435:
436: @tablecolumnerror[]
437: $t[^table::set{a}]
438: $t.$a
439:
440: @roll[]
441: #$date[^date::set(1970;1;2)]
442: #^date.roll[month](-1)
443: $date[^date::set(2038;1;1)]
444: ^date.roll[month](+1)
445: $date.year $date.month $date.day
446:
447: @cookie2[]
448: #=$cookie:clientType[$.value[test]]=<br>
449: =$cookie:clientType=<br>
450:
451:
452: @tableset[]
453: $a[^table::set{a
454: 1
455: 2}]
456: ^eval(100\$a)
457:
458:
459:
460: @zzz[]
461:
462:
463: $constructor[
464: <block1 name="main_srvr" type="0" label="Основное тело" />
465: <block2 name="main_srvr2" type="0" label="Основное тело" />
466: ]
467:
468: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
469: <block-list>^untaint[as-is]{$constructor}</block-list>}]
470:
471: $children[$constr.documentElement.childNodes]
472: ^if($children){
473: ^for[i](1;^children._count[]){
474: $node[$children.$i]
475: $node.nodeName<br>
476: }
477: }
478:
479:
480: @thashforeach3[]
481: $h[
482: $.a[1]
483: $.b[2]
484: ]
485: $c[^table::set{a
486: ^h.foreach[key;value]{$value
487: }}]
488: $c.a
489:
490: @thashforeach2[]
491: $h[
492: $.a[1]
493: $.b[2]
494: ]
495: $c[
496: ^h.foreach[key;value]{
497: $.$key[$value]
498: }
499: ]
500: $c.b
501:
502: @thashforeach[]
503: $h[
504: $.a[1]
505: $.b[2]
506: ]
507: ^h.foreach[key;value]{
508: $key=$value<br>
509: }
510:
511: @thashdelete[]
512: $h[$.a[1] $.b[2]]
513: was:<br>
514: count=^h._count[] <br>
515: b='$h.b' <br>
516:
517: ^h.delete[b]
518:
519: now:<br>
520: count=^h._count[] <br>
521: b='$h.b'
522:
523: @sappend[]
524: $test[123]
525: ^test.save[test]
526: ^test.save[append;test]
527:
528: @tappend[]
529: $test[^table::set{a b
530: a1 b1}]
531: ^test.save[test]
532: $test[^table::set{a b
533: a2 b2}]
534: ^test.save[append;test]
535:
536:
537: @tform[]
538: ^if(def $form:new_file){y}{n}
539: <form method="post" enctype="multipart/form-data">
540: <input type="file" name="new_file" />
541: <input type=submit>
542: </input>
543:
544: @formattest[]
545: $size(15.124)
546:
547: ^size.format{%.2f}
548:
549: @filelist[]
550: $html[^file:list[.;\.html^$]]
551: ^html.menu{
552: $html.name<br>
553: }
554: <hr>
555:
556: @безнадёжна_попытка_поправить_непоправимое[]
557: $dom_from_disk[^xdoc::load[input.xml]]
558: $dom_created_in_air[^xdoc::create[doc]]
559: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
560: ^show_xdoc2[$dom_created_in_air]
561:
562:
563: @tcache[]
564: #^hashfile:clear[cache]
565: $code[^hashfile::open[$DB_HOME;cache]]
566: ^code.cache[key](2){
567: ^math:random(100)
568: # ^code.delete[]
569: }
570:
571: @thashfileexp[]
572: $hf[^hashfile::open[$DB_HOME;hashfile]]
573: $hf.paf[$.value[крут] $.expires(3)]
574: paf=$hf.paf
575: <hr>
576: ^hf.foreach[key;value]{
577: $key=$value<br>
578: }
579: <hr>
580: $hash[^hf.hash[]]
581: =$hash.paf=
582: <hr>
583:
584: @tcounter[]
585: ^tcounterone[$DB_HOME]
586: other root:
587: ^tcounterone[${DB_HOME}2]
588: again, first:
589: ^tcounterone[$DB_HOME]
590:
591: @tcounterone[DB_HOME]
592: $counter[^hashfile::open[$DB_HOME;counter]]
593: #^counter.clear[]
594: ^counter.transaction{
595: # $counter.value(10)
596: $counter.value($counter.value+1)
597: # ^counter.delete[value]
598: $counter.value
599: }
600: <hr>
601: ^rem{
602: $hash[^counter.hash[]]
603: =$hash.value=
604: <hr>
605: }
606:
607: @tablehash[]
608: $productList[^table::set{id name
609: 1 носки
610: 2 валенки
611: 3 ушанка
612: }]
613:
614: #скажем, у первого дилера
615: $firstPriceList[^table::set{id price
616: 1 0.3
617: 3 1000
618: }]
619:
620: $firstPriceHash[^firstPriceList.hash[id]]
621:
622: ^productList.menu{
623: продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
624: }
625:
626:
627: @hashfile[]
628: $hf[^hashfile::assign[hashfile]]
629: #$hf.paf[крут5]
630: paf=$hf.paf
631:
632: @formclass[]
633: ^$form:CLASS.a=$form:CLASS.a
634:
635: @domdata[]
636: ^if(1){
637: # $a{^hren[]}
638: }
639: $a
640: $xdoc[^xdoc::create[doc]]
641: $doc[$xdoc.documentElement]
642: $name[^doc.appendChild[^xdoc.createElement[name]]]
643: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
644: ^untaint[as-is]{=$text.nodeValue=}
645:
646: @domedit[]
647: ^domdata[]
648: #$paf.nodeName<br>
649: #$doc.documentElement.nodeName<br>
650:
651: ^show_xnode1[$xdoc.documentElement;0;1]
652: <hr>
653: ^show_xdoc2[$xdoc]
654: <hr>
655:
656: @domxslt[]
657: ^domdata[]
658: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
659: <hr>
660:
661: @lsplit2[]
662: $path[/optics/]
663: $pathTable[^path.lsplit[/]]
664: ^pathTable.menu{
665: ^if(def $pathTable.piece){
666: =$pathTable.piece=
667: }
668: }
669:
670:
671: @faceesize[]
672: $k(2)
673: $pict[^image::load[paf.gif]]
674: $small[^image::create($pict.width/$k;$pict.height/$k)]
675: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
676: $response:body[^small.gif[]]
677:
678: @imageresize[]
679: $k(2)
680: $pict[^image::create(400*$k;200*$k)]
681: $pict.line-width(2)
682: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
683: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
684: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
685: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
686: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
687: $response:body[^pict.gif[]]
688:
689: #$small[^image::create($pict.width/$k;$pict.height/$k)]
690: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
691: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
692:
693: #$response:body[^small.gif[]]
694:
695:
696: @tintdefault[]
697: #$abc[abc]
698: $abc[33]
699: ^abc.int[z]
700: #^abc.int(123)
701:
702: @ifassignhash[]
703: $h[^if(1){$.a(1);$.a(2)}]
704: $h.a
705:
706: @ifpasshash[]
707: $a[$.e[a]]
708: $b[$.e[b]]
709: ^ifpasshashdest[^if(1){$a;$b}]
710: #$x[^if(1){$a}{$b}]
711: #^ifpasshashdest[$x]
712:
713: @ifpasshashdest[p]
714: $p.e
715:
716: @movedir[]
717: ^file:move[a;deeper/a]
718:
719: @replace[]
720: $a[12^;3]
721: ^a.replace[^table::set{from to
722: 2^; !
723: }]
724:
725:
726: @set[]
727: ^setdata[]
728: ^a.add[$b]
729: add:$a.3<br>
730:
731: ^setdata[]
732: ^a.sub[$b]
733: sub2:$a.2<br>
734: sub1:$a.1<br>
735:
736: ^setdata[]
737: $c[^a.union[$b]]
738: union3:$c.3<br>
739: union2:$c.2<br>
740:
741: ^setdata[]
742: $c[^a.intersection[$b]]
743: intersection3:$c.3<br>
744: intersection2:$c.2<br>
745:
746: ^setdata[]
747: intersects:^if(^a.intersects[$b]){y;n}<br>
748: intersects2:^if(^a.intersects[ ]){y;n}<br>
749:
750:
751: <hr>
752:
753: @setdata[]
754: $a[$.1[a1] $.2[a2]]
755: $b[ $.2[b2] $.3[b3]]
756:
757:
758: @hash[]
759: $h[^hash::create[$._default[123]]]
760: $h.paf[not kretin]
761: $h.paf<br>
762: =$h.that=<br>
763:
764: @methresult[]
765: $result[^table::set{1}]
766:
767: @terror[]
768: ^error[method z must be called with z]
769:
770: @syntax1[]
771: #^a[^b]
772:
773: @syntax2[]
774: #^a[
775:
776: @ssave[]
777: $abc[abc]
778: ^abc.save[abc]
779:
780: @calendar[]
781: 2001;11:<br>
782: $week_days[^date:calendar[rus](2001;11)]
783: <pre>
784: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday; ^; ^;} }<br>}
785: </pre>
786:
787: @thash[]
788: $table[^table::set{id name age
789: 1 paf 278
790: 2 пиф 234
791: }]
792: $hash[^table.hash[id;^table::set[nameless]{id
793: name}]]
794: $hash.2.id $hash.2.name $hash.2.age
795:
796: @tdef[]
797: $s[0]
798: if 0=^if($s){}{n}<br>
799: if def 0=^if(def $s){y}{}<br>
800: <hr>
801:
802: @ford[]
803: ^for[i](0;5){$i}{($i)}
804:
805: @tif[]
806: ^if[def]{y;n}
807:
808: @image[]
809: $pict[^image::create(400;200)]
810: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
811: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
812: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
813: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
814: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
815: $response:body[^pict.gif[]]
816:
817:
818:
819: @mail2[]
820: ^mail:send[
821: $.content-type[$.value[text/plain] $.charset[windows-1251]]
822: $.from[Александр Петросян <paf@design.ru>]
823: $.to[Александр Петросян <paf@design.ru>]
824: $.subject[проверка]
825: $.body[проверка]
826: ]
827:
828: @cookie[]
829: $env:HTTP_COOKIE<br>
830:
831: #$cookie:переменная[test тест ТЕСТ2]
832: =$cookie:переменная=<br>
833: #$cookie:переменная2[test тест ТЕСТ3]
834: =$cookie:переменная2=<br>
835: =$cookie:CLASS.переменная2=<br>
836:
837: @response[]
838: #^if($form:reload){
839: $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
840: #}
841:
842: @xslt[]
843: ^xdata[]
844: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
845: ^show_xdoc2[$transformed]
846:
847: @regexp2[]
848: $s[ select]
849: $s[^s.match[^^\s*][]{!}]
850: $s
851:
852: @header[]
853: $response:refresh[
854: $.value[0]
855: $.url[http://design.ru?a=^taint[123]]
856: ]
857:
858: @ttablerem[]
859: $table[^table::load[a.cfg]]
860: ^table.menu{$table.a}
861:
862: @tconnect[]
863: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
864: $tables[^table::sql{show tables}]
865: #$cols[^tables.columns[]]
866: #$cols.column
867: ^tables.menu{
868: $tables.[Tables_in_test]<br>
869: }
870: }
871:
872: @pcre[]
873: $s[1 2]
874: ^s.match[\s;ig]{!}
875: #^s.match[\d;ig]{!}
876:
877:
878: @regexp[]
879: $s[abcАБВ]
880: ^if(^s.match[б][i]){y}{n}
881:
882: @mail[]
883: #$ORIGINS(1)
884: ^mail:send[
885: $.from[paf@design.ru]
886: $.to[paf@design.ru]
887: $.body[1
888:
889: 2
890:
891:
892: 3]
893: ]
894:
895: @exec[]
896: $a[^file::exec[fc.exe;;a;b]]
897: $a.status|$a.stderr<hr>
898:
899: @fori[][i]
900: ^for[i](1;3){... =$i= ...}
901:
902: @xdata0[]
903: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
904: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
905: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
906: <people>
907: <man id="1" имя="word слово">
908: <name>P«^;AF B</name>
909: </man>
910: <man id="2">
911: <name>ПИФ^taint[&]</name>
912: </man>
913: </people>
914: }]
915:
916: @xdata[]
917: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
918: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
919: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
920: <people>
921: <man id="1" имя="word слово">
922: <name>P«^;AF B</name>
923: </man>
924: <man id="2">
925: <name>ПИФ^taint[&]</name>
926: </man>
927: </people>
928: }}]
929:
930: @xml[]
931: ^xdata[]
932:
933: ^show_xdoc2[$xdoc]<hr>
934: #^show_xnode1[$xdoc]<hr>
935: $people[^xdoc.select[*/man]]
936: #^show1[]
937: ^show_xnodes1[$people]<hr>
938: #^people.0.owner.hren[]
939:
940: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
941:
942: by id:
943: ^show_xnode1[^xdoc.getElementById[1];0;1]
944: <hr>
945:
946: @show1[array]
947: ^for[i](0;^array._count[]-1){
948: $x[$array.$i]
949: $x.firstChild.nodeValue:
950: $pattributes[$x.parentNode.attributes]
951: ^if(^pattributes._count[]){
952: $pattributes.id.name=$pattributes.id.nodeValue
953: }
954: <br>
955: }
956:
957: @show_xnodes1[array][i]
958: ^for[i](0;^array._count[]-1){
959: ^show_xnode1[$array.$i;0;1]
960: }
961:
962: @show_xnode1[x;level;single][l]
963: ^if(def $x){
964: ^for[l](0;$level-1){ ^; ^; ^; ^;}
965: ^if($x.nodeType == $xnode:ELEMENT_NODE){
966: <^;$x.nodeName
967: $pairs[$x.attributes]
968: ^if(def $pairs){
969: $names[^pairs._keys[]]
970: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
971: }
972: >^;
973: }{
974: [$x.nodeType]
975: }
976:
977: ^if(def $x.nodeValue){$x.nodeValue}<br>
978: ^show_xnode1[$x.firstChild]($level+1)
979: ^if(!$single){
980: ^show_xnode1[$x.nextSibling]($level)
981: }
982:
983: ^if($x.nodeType == $xnode:ELEMENT_NODE){
984: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
985: }
986: }
987:
988: @show_xdoc2[xdoc]
989: ^xdoc.save[out/save.xml;
990: # $.encoding[utf-8]
991: $.method[xml]
992: ]
993: $file[^xdoc.file[
994: $.encoding[utf-8]
995: $.method[html]
996: ]]
997: ^file.save[text;out/save_file.html]
998: #$response:body[^xdoc.file[ $.media-type[text/paf] ]]
999: <pre>^taint[html][^xdoc.string[
1000: $.method[html]
1001: # $.encoding[utF-8]
1002: # $.omit-xml-declaration[yes]
1003: # $.standalone[no]
1004: # -$.doctype-public[-//W3C//DTD XHTML]
1005: # -$.doctype-system[/a/b/c/]
1006: # $.indent[yes]
1007: # $.media-type[text/paf]
1008: ]]
1009: </pre>
E-mail: