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