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