Annotation of parser3/www/htdocs/index.html, revision 1.7

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

E-mail: