Annotation of parser3/src/www/htdocs/index.html, revision 1.400
1.399 parser 1: @main[]
1.400 ! parser 2: ^faceesize[]
! 3: #^imageresize[]
1.399 parser 4: #^ifassignhash[]
5: #^tintdefault[]
6: #$response:status[404]
1.390 parser 7: #^ifpasshash[]
1.387 parser 8: #^movedir[]
9: #^replace[]
1.386 parser 10: #^set[]
1.385 parser 11: #^hash[]<hr>
1.384 parser 12: #$t[^methresult[]] ->$t
1.382 parser 13: #^terror[]
1.378 parser 14: #^ssave[]
1.377 parser 15: #^calendar[]
1.376 parser 16: #^thash[]
1.373 parser 17: #^tdef[]
1.375 parser 18: #^ford[]
1.371 parser 19: #^tif[]
1.383 parser 20: #^image[]
1.369 parser 21: #^mail2[]
1.367 parser 22: #^cookie[]
1.365 parser 23: #^response[]
1.364 parser 24: #^regexp2[]
25: #^ttablerem[]
26: #^pcre[]
27: #^regexp[]<hr>
28: #^mail[]
29: #^exec[]
30: #^fori[]
31: #^tconnect[]
1.383 parser 32: #^xslt[]
1.395 parser 33: #^xml[]
1.364 parser 34: #^header[]
35: OK
1.395 parser 36:
1.397 parser 37: @faceesize[]
38: $k(2)
39: $pict[^image::load[paf.gif]]
40: $small[^image::create($pict.width/$k;$pict.height/$k)]
1.398 parser 41: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
1.397 parser 42: $response:body[^small.gif[]]
43:
1.395 parser 44: @imageresize[]
45: $k(2)
46: $pict[^image::create(400*$k;200*$k)]
47: $pict.line-width(2)
48: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
1.397 parser 49: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
1.395 parser 50: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1.397 parser 51: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
52: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
1.395 parser 53: #$response:body[^pict.gif[]]
54:
55: $small[^image::create($pict.width/$k;$pict.height/$k)]
1.396 parser 56: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
1.398 parser 57: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
1.395 parser 58:
59: $response:body[^small.gif[]]
60:
1.388 parser 61:
62: @tintdefault[]
63: #$abc[abc]
64: $abc[33]
65: ^abc.int[z]
66: #^abc.int(123)
1.390 parser 67:
68: @ifassignhash[]
69: $h[^if(1){$.a(1);$.a(2)}]
70: $h.a
1.387 parser 71:
72: @ifpasshash[]
73: $a[$.e[a]]
74: $b[$.e[b]]
1.389 parser 75: ^ifpasshashdest[^if(1){$a;$b}]
1.387 parser 76: #$x[^if(1){$a}{$b}]
77: #^ifpasshashdest[$x]
78:
79: @ifpasshashdest[p]
80: $p.e
81:
82: @movedir[]
83: ^file:move[a;deeper/a]
1.386 parser 84:
85: @replace[]
86: $a[12^;3]
87: ^a.replace[^table::set{from to
88: 2^; !
89: }]
90:
1.385 parser 91:
92: @set[]
93: ^setdata[]
94: ^a.add[$b]
95: add:$a.3<br>
96:
97: ^setdata[]
98: ^a.sub[$b]
99: sub2:$a.2<br>
100: sub1:$a.1<br>
101:
102: ^setdata[]
103: $c[^a.union[$b]]
104: union3:$c.3<br>
105: union2:$c.2<br>
106:
107: ^setdata[]
108: $c[^a.intersection[$b]]
109: intersection3:$c.3<br>
110: intersection2:$c.2<br>
111:
112: ^setdata[]
113: intersects:^if(^a.intersects[$b]){y;n}<br>
114: intersects2:^if(^a.intersects[ ]){y;n}<br>
115:
116:
117: <hr>
118:
119: @setdata[]
120: $a[$.1[a1] $.2[a2]]
121: $b[ $.2[b2] $.3[b3]]
122:
1.383 parser 123:
1.384 parser 124: @hash[]
125: $h[^hash::create[$._default[123]]]
126: $h.paf[not kretin]
127: $h.paf<br>
128: =$h.that=<br>
129:
130: @methresult[]
131: $result[^table::set{1}]
1.377 parser 132:
1.381 parser 133: @terror[]
134: ^error[method z must be called with z]
135:
1.380 parser 136: @syntax1[]
137: #^a[^b]
138:
139: @syntax2[]
1.381 parser 140: #^a[
1.379 parser 141:
1.377 parser 142: @ssave[]
143: $abc[abc]
144: ^abc.save[abc]
1.376 parser 145:
146: @calendar[]
147: 2001;11:<br>
148: $week_days[^date:calendar[rus](2001;11)]
149: <pre>
150: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday; ^; ^;} }<br>}
151: </pre>
1.372 parser 152:
1.375 parser 153: @thash[]
154: $table[^table::set{id name age
155: 1 paf 278
156: 2 пиф 234
157: }]
158: $hash[^table.hash[id;^table::set[nameless]{id
159: name}]]
160: $hash.2.id $hash.2.name $hash.2.age
161:
1.372 parser 162: @tdef[]
163: $s[0]
164: if 0=^if($s){}{n}<br>
165: if def 0=^if(def $s){y}{}<br>
166: <hr>
1.371 parser 167:
168: @ford[]
1.374 parser 169: ^for[i](0;5){$i}{($i)}
1.368 parser 170:
1.370 parser 171: @tif[]
172: ^if[def]{y;n}
173:
1.368 parser 174: @image[]
175: $pict[^image::create(400;200)]
1.379 parser 176: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
177: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
178: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
179: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
180: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
1.368 parser 181: $response:body[^pict.gif[]]
182:
183:
1.366 parser 184:
1.369 parser 185: @mail2[]
1.367 parser 186: ^mail:send[
1.369 parser 187: $.content-type[$.value[text/plain] $.charset[windows-1251]]
188: $.from[Александр Петросян <paf@design.ru>]
1.367 parser 189: $.to[Александр Петросян <paf@design.ru>]
1.369 parser 190: $.subject[проверка]
191: $.body[проверка]
1.367 parser 192: ]
193:
1.366 parser 194: @cookie[]
1.367 parser 195: $env:HTTP_COOKIE<br>
196:
197: #$cookie:переменная[test тест ТЕСТ2]
198: =$cookie:переменная=<br>
199: #$cookie:переменная2[test тест ТЕСТ3]
200: =$cookie:переменная2=<br>
1.365 parser 201:
202: @response[]
203: #^if($form:reload){
204: $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
205: #}
1.364 parser 206:
207: @xslt[]
208: ^xdata[]
1.375 parser 209: ^show-xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
1.364 parser 210:
211: @regexp2[]
212: $s[ select]
213: $s[^s.match[^^\s*][]{!}]
214: $s
215:
216: @header[]
217: $response:refresh[
218: $.value[0]
219: $.url[http://design.ru?a=^taint[123]]
220: ]
221:
222: @ttablerem[]
223: $table[^table::load[a.cfg]]
224: ^table.menu{$table.a}
225:
226: @tconnect[]
227: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
228: $tables[^table::sql{show tables}]
229: #$cols[^tables.columns[]]
230: #$cols.column
231: ^tables.menu{
232: $tables.[Tables_in_test]<br>
233: }
234: }
235:
236: @pcre[]
237: $s[1 2]
238: ^s.match[\s;ig]{!}
239: #^s.match[\d;ig]{!}
240:
241:
242: @regexp[]
243: $s[abcАБВ]
244: ^if(^s.match[б][i]){y}{n}
245:
246: @mail[]
247: #$ORIGINS(1)
248: ^mail:send[
249: $.from[paf@design.ru]
250: $.to[paf@design.ru]
251: $.body[1
252:
253: 2
254:
255:
256: 3]
257: ]
258:
259: @exec[]
1.370 parser 260: $a[^file::exec[fc.exe;;a;b]]
1.364 parser 261: $a.status|$a.stderr<hr>
262:
263: @fori[][i]
264: ^for[i](1;3){... =$i= ...}
265:
266: @xdata[]
267: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
268: $xdoc[^xdoc::load[input.xml]]
269:
270: @xml[]
271: ^xdata[]
272:
273: ^show-xdoc2[$xdoc]<hr>
274: #^show-xnode1[$xdoc]<hr>
275: $people[^xdoc.select[*/man]]
276: #^show1[]
277: ^show-xnodes1[$people]<hr>
278: #^people.0.owner.hren[]
279:
1.393 parser 280: ^show-xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
1.364 parser 281:
282: by id:
283: ^show-xnode1[^xdoc.getElementById[1];0;1]
284: <hr>
285:
286: @show1[array]
287: ^for[i](0;^array._count[]-1){
288: $x[$array.$i]
289: $x.firstChild.nodeValue:
290: $pattributes[$x.parentNode.attributes]
291: ^if(^pattributes._count[]){
292: $pattributes.id.name=$pattributes.id.nodeValue
293: }
294: <br>
295: }
296:
297: @show-xnodes1[array][i]
298: ^for[i](0;^array._count[]-1){
299: ^show-xnode1[$array.$i;0;1]
300: }
301:
302: @show-xnode1[x;level;single][l]
303: ^if(def $x){
304: ^for[l](0;$level-1){ ^; ^; ^; ^;}
305: ^if($x.nodeType == $xnode:ELEMENT_NODE){
306: <^;$x.nodeName
307: $pairs[$x.attributes]
308: ^if(def $pairs){
309: $names[^pairs._keys[]]
310: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
311: }
312: >^;
313: }{
314: [$x.nodeType]
315: }
316:
317: ^if(def $x.nodeValue){$x.nodeValue}<br>
318: ^show-xnode1[$x.firstChild]($level+1)
319: ^if(!$single){
320: ^show-xnode1[$x.nextSibling]($level)
321: }
322:
323: ^if($x.nodeType == $xnode:ELEMENT_NODE){
324: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
325: }
326: }
327:
328: @show-xdoc2[xdoc]
329: ^xdoc.save[save.xml;
330: # $.encoding[windows-1251]
331: $.method[xml]
332: ]
333: $file[^xdoc.file[
334: # $.encoding[windows-1251]
335: $.method[html]
336: ]]
337: ^file.save[text;save_file.html]
338: <pre>^taint[^xdoc.string[]]</pre>
339: # $.encoding[windows-1251]
340: # $.method[xml]
341: #]]
E-mail: