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