|
|
| version 1.189, 2001/05/17 19:03:00 | version 1.317, 2001/09/18 16:05:43 |
|---|---|
| Line 1 | Line 1 |
| @main[] | @main[] |
| #^main[] | ^xslt[] |
| #^use[$form:file] | OK |
| $строка[вася ЗдЕсЬ] | @xslt[] |
| ^^строка.upper[]=^строка.upper[]<br> | $dom[^dom::set{<?xml version="1.0" encoding="windows-1251"?> |
| ^^строка.lower[]=^строка.lower[]<br> | |
| <hr> | |
| <people> | |
| <man id="1"> | |
| <name>PAF</name> | |
| </man> | |
| <man id="2"> | |
| <name>ПИФ</name> | |
| </man> | |
| </people> | |
| }] | |
| $a[12] | ^show-dnode[$dom]<hr> |
| ^a.int[] | $people[^dom.xpath[*/man[@id=1]]] |
| <hr> | #^show1[] |
| #^show-dnodes[$people]<hr> | |
| ^show-dnodes2[$people]<hr> | |
| $t[^table:set{key value | #^people.0.owner.hren[] |
| 1 v1 | |
| 2 v2}] | @show1[] |
| $h[^t.hash[key]] | ^for[i](0;^people._count[]-1){ |
| $node[$people.$i] | |
| ^sql_test[$SQL.connect-string] | $node.first-child.value: |
| ^sql_test[mysql://test:test@localhost/test/cp1251_koi8] | $pattributes[$node.parent.attributes] |
| ^if(^pattributes._count[]){ | |
| $pattributes.id.name=$pattributes.id.value | |
| } | |
| <br> | |
| } | |
| <HR> | @show-dnodes[array][i] |
| $abc{} | ^for[i](0;^array._count[]-1){ |
| $tn[^table:set[nameless]{a1 b1 | ^show-dnode[$array.$i] |
| a2 b2 | |
| }] | |
| $x[^tn.locate[0;a2]] | |
| ^$tn.1=$tn.1 | |
| <hr> | |
| $t0[^table:set{key a b | |
| 1 a1 | |
| 2 a2 b2 | |
| }] | |
| ^if(^t0.locate[key;2] && "a" ne "b"){y;n} | |
| <hr> | |
| $currentFolder[/a/b] | |
| $path[^currentFolder.lsplit[/]] | |
| ^path.flip[] | |
| $path{ | |
| ^menu{$0}{,} | |
| } | } |
| <hr> | |
| $t1[^table:set{key value | |
| 1 v1 | |
| 2 v2}] | |
| $h1[^t1.hash[key]] | |
| ^h1.default[$value[nothing]] | |
| ^$h1.2.value=$h1.2.value<br> | |
| ^$h1.2x.value=$h1.2x.value<br> | |
| <hr> | |
| $t2[^table:set{key a b | |
| 1 a1 | |
| 2 a2 b2 | |
| }] | |
| t2 ^if(^t2.empty[]){empty}{not empty}<br> | |
| ^t2.offset(1) | |
| $t2.b | |
| $r[^t2.record[]] | |
| <hr> | |
| $th[^t2.hash[b]] | |
| ^$th.b2.a=$th.b2.a<br> | |
| <hr> | |
| $th[^t2.hash[key;a]] | |
| ^$th.2.a=$th.2.a<br> | |
| <hr> | |
| #^OP:eval(1<2) | |
| $filelist[^table:dir[.]] | |
| <hr> | |
| $path[/news/tululu/] | |
| #^path.flip[] | |
| <hr> | |
| $branches[^table:set{name val | |
| index.cgihtml 123 | |
| }] | |
| $splitURI[^request:uri.lsplit[/]] | |
| name ^if(^branches.locate[name;$splitURI.1]){found;not found}: | |
| $branches.name | |
| <HR> | |
| $splitURI[^request:uri.lsplit[/]] | |
| $splitURI.0!$splitURI.1 | |
| <HR> | |
| $t2[^table:set{dir title | @show-dnode[dnode;level][l] |
| /here Here | ^for[l](0;$level-1){ ^; ^; ^; ^;} |
| }] | ^if($dnode.type eq element){ |
| $t2{^menu{${dir}-$title}[,]} | <^;$dnode.name |
| <HR> | $pairs[$dnode.attributes] |
| $dir[news] | ^if(def $pairs){ |
| $list[^table:dir[$dir]] | $names[^pairs._keys[]] |
| ^list.menu{ | ^names.menu{$names.key=$pairs.[$names.key].value } |
| $subdir[$dir/$list.name] | |
| $sublist[^table:dir[$subdir]] | |
| ${list.name}/ $sublist{^menu{$name}[,]}<br> | |
| } | } |
| <HR> | >^; |
| ^if(in "/otherdeeper"){y;n} | }{[$dnode.type]} |
| <HR> | |
| ^$form:проверка_имя=$form:проверка_имя<BR> | ^if(def $dnode.value){'$dnode.value'}<br> |
| <form method=post action=index.html> | ^if(def ${dnode.first-child}){^show-dnode[$dnode.first-child]($level+1)} |
| <input name=проверка_имя value=проверка_значение> | ^if(def ${dnode.next-sibling}){^show-dnode[$dnode.next-sibling]($level)} |
| <input type=submit> | |
| </form> | ^if($dnode.type eq element){ |
| <HR> | ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$dnode.name>^;<br> |
| ^^table:dir[/]:<BR> | |
| $d[^table:dir[/]] | |
| $d{^menu{$name  ^; ^; ^; ^;^if(-f $name){-f} ^if(-d $name){-d};<BR>}} | |
| <HR> | |
| $files[^table:set{name}] | |
| $d{^menu{ | |
| ^if(-d "$name"){ | |
| ^:files.append{$name} | |
| } | |
| }} | |
| $files{^menu{$name}[,]} | |
| <HR> | |
| @exception[origin;source;comment;type;code][i;j] | |
| <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}! | |
| @end | |
| @sql_test[connect-string] | |
| #^rem{ | |
| #^for[i](1;2){ | |
| ^connect[$connect-string]{ | |
| $shit[^taint[our's]] | |
| # $paf[^table:sql{insert into paf (name, age) values ('$shit', ^random:generate(10000))}] | |
| $paf[^table:sql{select * from paf order by id desc}(5)] | |
| $paf{ | |
| ^if(^empty[]){query result is empty}{ | |
| <table border=1> | |
| <tr><td>id</td><td>name</td><td>age</td></tr> | |
| ^menu{<tr><td>$id</td><td>$name</td><td>$age</td></tr>} | |
| </table> | |
| }} | |
| } | } |
| #} | |
| #} | |
| @show-dnodes2[people] | |
| ^people.string[] |