|
|
| version 1.89, 2001/04/03 06:23:09 | version 1.364, 2001/10/08 08:35:56 |
|---|---|
| Line 1 | Line 1 |
| @auto[] | |
| !!$html-typo[^table:set{user html comment | |
| << «^; длинные user вперёд | |
| >> »^; | |
| \n\n <p> !эти есть в таблице по умолчанию | |
| \n <br> !но т.к. заменяем, надо повторить. | |
| < <^; !можно этим воспользоваться, | |
| > >^; !и что-то сделать ДО обычных замен | |
| " "^; !например из << и >> | |
| & &^; !сделать ёлочки-кавычки. | |
| _  ^; | |
| ^#AB «^; windows коды ёлочек | |
| ^#BB »^; windows коды ёлочек | |
| (c) ©^; | |
| ^#A9 ©^; windows (c) | |
| }] | |
| @dump[t] | |
| ^t.menu{$n<BR>} | |
| <HR> | |
| @func[n] | |
| $n | |
| @twop[a;b] | |
| ($a,$b) | |
| @main[] | @main[] |
| $dest[^table:set[nameless]{ | #^regexp2[] |
| $form:d11 d12 d13 | #^ttablerem[] |
| d21 d22 d23 | #^pcre[] |
| }] | #^regexp[]<hr> |
| $src[^table:set{a b c d | #^mail[] |
| #^exec[] | |
| s1 s2 s3 s4 | #^fori[] |
| }] | #^tconnect[] |
| 1:<BR>^dest.menu{$0!$1!$2!$3!<BR>} | ^xslt[] |
| ^dest.join[$src] | #^xml[] |
| 2:<BR>^dest.menu{$0!$1!$2!$3!<BR>} | #^header[] |
| OK | |
| <HR> | |
| $dest[^table:set{a b c | @xslt[] |
| d11 d12 d13 | ^xdata[] |
| d21 d22 d23 | ^show-xdoc2[^xdoc.transform[global.xsl]] |
| }] | |
| $src[^table:set{a b c d | @regexp2[] |
| s1 s2 s3 s4 | $s[ select] |
| }] | $s[^s.match[^^\s*][]{!}] |
| ^dest.join[$src] | $s |
| ^dest.menu{$a!$b!$c!<BR>} | |
| @header[] | |
| <HR> | $response:refresh[ |
| ^^random:generate(10)=^random:generate(10)<BR> | $.value[0] |
| $.url[http://design.ru?a=^taint[123]] | |
| <HR> | |
| $t[^table:load[/test.cfg]] | |
| $t{ | |
| ^menu{$a!$b!$c<BR>} | |
| <HR> | |
| ^append{x y z} | |
| ^menu{$a!$b!$c<BR>} | |
| <HR> | |
| ^flip[] | |
| ^menu{$0!$1!$2!$3<BR>} | |
| <HR> | |
| } | |
| $a[vasya,fedya,kolya] | |
| ^^"$a".lsplit[,]=$as[^a.lsplit[,]]$as.0|$as.1|$as.2|$as.3<BR> | |
| ^^"$a".rsplit[,]=$as[^a.rsplit[,]]$as.0|$as.1|$as.2|$as.3<BR> | |
| ^^a.pos(sy]="^a.pos[sy]"<BR> | |
| ^^a.pos[zsy]="^a.pos[zsy]"<BR> | |
| ^^a.left(3)="^a.left(3)"<BR> | |
| ^^a.right(3)="^a.right(3)"<BR> | |
| ^^a.mid(1;3)="^a.mid(1;3)"<BR> | |
| <HR> | |
| ^^twop[a;]=^twop[a;]<BR> | |
| ^$request:browser.type=$request:browser.type<BR> | |
| ^$request:browser.version=$request:browser.version<BR> | |
| $tf[^file:load[test.zip;abc.zip]] | |
| $response:body[$tf] | |
| ^$tf.name=$tf.name<BR> | |
| ^$tf.size=$tf.size<BR> | |
| ^$tf.mime-type=$tf.mime-type<BR> | |
| ^$tf.text:<BR> | |
| $tf.text<HR> | |
| <HR> | |
| ^file:find[test.cfg]<BR> | |
| ^file:find[tes.cfg]{not found}<BR> | |
| <HR> | |
| $t[^table:set{n | |
| 3 | |
| 01.3 | |
| 1.2 | |
| 2 | |
| }] | |
| $t{^locate[n;2z]^found{$n}{not found}}<BR> | |
| $t{^locate[n;3]^found{found:$n}{not found}}<BR> | |
| ^$t:<BR> | |
| ^dump[$t] | |
| ^t.sort($n) | |
| ^^t.sort(^$n):<BR> | |
| ^dump[$t] | |
| ^t.sort{^:func($n)} | |
| ^^t.sort{^^:func(^$n)}:<BR> | |
| ^dump[$t] | |
| ^t.sort{$n} | |
| ^^t.sort{^$n}:<BR> | |
| ^dump[$t] | |
| ^t.sort{$n}[desc] | |
| ^^t.sort{^$n}[desc]:<BR> | |
| ^dump[$t] | |
| <HR> | |
| ^if(-f index.html){y}{n}<BR> | |
| ^taint[html-typo;не знаю | |
| я ничего | |
| <<слово длинное>> | |
| (c) by Я | |
| ]<HR> | |
| $t[^table:load[/test.cfg]] | |
| ^process[@b[] | |
| f | |
| ] | ] |
| ^b[]<BR> | |
| ^$t.a=$t.a<BR> | @ttablerem[] |
| ^t.offset[2] | $table[^table::load[a.cfg]] |
| #$r[^t.record[]] | ^table.menu{$table.a} |
| #^$r.a=$r.a<BR> | |
| @tconnect[] | |
| ^$request:uri=$request:uri<BR> | ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{ |
| ^$env:PATH_INFO=$env:PATH_INFO<BR> | $tables[^table::sql{show tables}] |
| ^$env:REMOTE_ADDR=$env:REMOTE_ADDR<BR> | #$cols[^tables.columns[]] |
| #$cols.column | |
| ^rem{ | ^tables.menu{ |
| $response:body[] | $tables.[Tables_in_test]<br> |
| $response:location[http://parser3/123] | } |
| } | } |
| @pcre[] | |
| <HR> | $s[1 2] |
| ^^auto_test[]:<BR> | ^s.match[\s;ig]{!} |
| <ol> | #^s.match[\d;ig]{!} |
| ^auto_test[] | |
| </ol> | |
| <HR> | @regexp[] |
| $s[abcАБВ] | |
| ^${cookie:вот}=${cookie:вот}?<BR> | ^if(^s.match[б][i]){y}{n} |
| ^$request:query=$request:query<BR> | |
| ^$request:uri=$request:uri<BR> | @mail[] |
| #$ORIGINS(1) | |
| <form method=post> | ^mail:send[ |
| <table border=1 width=250><tr><td>$form:name</td></tr></table> | $.from[paf@design.ru] |
| <textarea name=name rows=5 cols=40>^untaint[html]{^default[$form:name;не знаю]}</textarea><BR> | $.to[paf@design.ru] |
| <input type=submit> | $.body[1 |
| </form> | |
| 2 | |
| <HR> | |
| $свойства_когда_пьян[ | |
| $цвет_глаз[красный] | 3] |
| ] | |
| $вася[ | |
| $свойства[$свойства_когда_пьян] | |
| ] | ] |
| $кусок_имени_поля[ства] | @exec[] |
| ^$кусок_имени_поля=$кусок_имени_поля<BR> | $a[^file::exec[fc.exe;a;b]] |
| ^$вася.свой^$кусок_имени_поля.цвет_глаз=$вася.свой$кусок_имени_поля.цвет_глаз | $a.status|$a.stderr<hr> |
| <HR> | |
| <form method=post enctype=multipart/form-data> | @fori[][i] |
| <input name=photo type=file> | ^for[i](1;3){... =$i= ...} |
| <input type=submit> | |
| </form> | @xdata[] |
| <hr> | #$response:content-type[$.value[text/html] $.charset[windows-1251]] |
| ^if($form:photo){ | $xdoc[^xdoc::load[input.xml]] |
| <pre> | |
| ^$form:photo.name='$form:photo.name' | @xml[] |
| ^$form:photo.size='$form:photo.size' | ^xdata[] |
| ^$form:photo.text='$form:photo.text' | |
| ^form:photo.save[paf.txt] | ^show-xdoc2[$xdoc]<hr> |
| </pre> | #^show-xnode1[$xdoc]<hr> |
| } | $people[^xdoc.select[*/man]] |
| #^show1[] | |
| ^show-xnodes1[$people]<hr> | |
| #^people.0.owner.hren[] | |
| #todo proper! untaint $response:refresh[$value[2] $content[url=http://design.ru]] | ^show-xnode1[^xdoc.select-single[*/man[2]/name];0;1]<hr> |
| by id: | |
| ^show-xnode1[^xdoc.getElementById[1];0;1] | |
| <hr> | |
| @default[test;def] | @show1[array] |
| $result[^if(^test.length[]){$test}{$def}] | ^for[i](0;^array._count[]-1){ |
| $x[$array.$i] | |
| $x.firstChild.nodeValue: | |
| $pattributes[$x.parentNode.attributes] | |
| ^if(^pattributes._count[]){ | |
| $pattributes.id.name=$pattributes.id.nodeValue | |
| } | |
| <br> | |
| } | |
| @show-xnodes1[array][i] | |
| ^for[i](0;^array._count[]-1){ | |
| ^show-xnode1[$array.$i;0;1] | |
| } | |
| @exception[origin;source;comment;type;code] | |
| <body bgcolor=black> | |
| <font color=white> | |
| ERROR: | |
| ^if(def $source){$origin '$source'} | |
| ${comment}. | |
| ^if(def $type){type=$type} | |
| ^if(def $code){code=$code} | |
| @auto_test[] | |
| ^BASE.auto_test[] | |
| <li>${request:uri}! | |
| @show-xnode1[x;level;single][l] | |
| ^if(def $x){ | |
| ^for[l](0;$level-1){ ^; ^; ^; ^;} | |
| ^if($x.nodeType == $xnode:ELEMENT_NODE){ | |
| <^;$x.nodeName | |
| $pairs[$x.attributes] | |
| ^if(def $pairs){ | |
| $names[^pairs._keys[]] | |
| ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"} | |
| } | |
| >^; | |
| }{ | |
| [$x.nodeType] | |
| } | |
| ^if(def $x.nodeValue){$x.nodeValue}<br> | |
| ^show-xnode1[$x.firstChild]($level+1) | |
| ^if(!$single){ | |
| ^show-xnode1[$x.nextSibling]($level) | |
| } | |
| ^if($x.nodeType == $xnode:ELEMENT_NODE){ | |
| ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br> | |
| } | |
| } | |
| @show-xdoc2[xdoc] | |
| ^xdoc.save[save.xml; | |
| # $.encoding[windows-1251] | |
| $.method[xml] | |
| ] | |
| $file[^xdoc.file[ | |
| # $.encoding[windows-1251] | |
| $.method[html] | |
| ]] | |
| ^file.save[text;save_file.html] | |
| <pre>^taint[^xdoc.string[]]</pre> | |
| # $.encoding[windows-1251] | |
| # $.method[xml] | |
| #]] |