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