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