Annotation of parser3/src/www/htdocs/index.html, revision 1.192

1.48      paf         1: @main[]
1.190     parser      2: <form method=post>
                      3: <input type=hidden name=a value=123>
                      4: <table border=1 width=250><tr><td>$form:name</td></tr></table>
                      5: <textarea name=name rows=5 cols=40>^untaint[html]{^default[$form:name;Пробный текст: А.Ф._Петросян <<Жизнь в Аду>>
                      6: нажми Submit]}</textarea><BR>
                      7: <input type=submit>
                      8: </form>
                      9: <hr>
                     10: 
1.185     parser     11: #^main[]
                     12: #^use[$form:file]
1.184     parser     13: 
1.186     parser     14: $строка[вася ЗдЕсЬ]
1.183     parser     15: ^^строка.upper[]=^строка.upper[]<br>
                     16: ^^строка.lower[]=^строка.lower[]<br>
                     17: <hr>
                     18: 
                     19: 
1.182     parser     20: $a[12]
                     21: ^a.int[]
                     22: <hr>
                     23: 
                     24: 
1.178     paf        25: $t[^table:set{key      value
                     26: 1      v1
                     27: 2      v2}]
                     28: $h[^t.hash[key]]
                     29: 
1.188     parser     30: ^sql_test[$SQL.connect-string]
1.191     parser     31: #^sql_test[mysql://test:test@localhost/test/cp1251_koi8]
1.178     paf        32: 
                     33: <HR>
                     34: $abc{}
                     35: $tn[^table:set[nameless]{a1    b1
                     36: a2     b2
                     37: }]
                     38: $x[^tn.locate[0;a2]]
                     39: ^$tn.1=$tn.1
                     40: <hr>
                     41: $t0[^table:set{key     a       b
                     42: 1      a1
                     43: 2      a2      b2
                     44: }]
                     45: ^if(^t0.locate[key;2] && "a" ne "b"){y;n}
                     46: <hr>
1.177     paf        47: $currentFolder[/a/b]
                     48: $path[^currentFolder.lsplit[/]]
                     49: ^path.flip[]
                     50: $path{
                     51: ^menu{$0}{,}
                     52: }
                     53: <hr>
1.175     paf        54: $t1[^table:set{key     value
                     55: 1      v1
                     56: 2      v2}]
                     57: $h1[^t1.hash[key]]
                     58: ^h1.default[$value[nothing]]
1.176     paf        59: ^$h1.2.value=$h1.2.value<br>
                     60: ^$h1.2x.value=$h1.2x.value<br>
1.175     paf        61: <hr>
1.172     paf        62: $t2[^table:set{key     a       b
1.173     paf        63: 1      a1
1.172     paf        64: 2      a2      b2
                     65: }]
1.175     paf        66: t2 ^if(^t2.empty[]){empty}{not empty}<br>
1.173     paf        67: ^t2.offset(1)
                     68: $t2.b
                     69: $r[^t2.record[]]
                     70: <hr>
                     71: $th[^t2.hash[b]]
                     72: ^$th.b2.a=$th.b2.a<br>
                     73: <hr>
                     74: $th[^t2.hash[key;a]]
1.174     paf        75: ^$th.2.a=$th.2.a<br>
1.172     paf        76: <hr>
1.171     paf        77: #^OP:eval(1<2)
1.169     paf        78: 
                     79: $filelist[^table:dir[.]]
1.168     paf        80: <hr>
                     81: $path[/news/tululu/]
1.169     paf        82: #^path.flip[]
1.168     paf        83: <hr>
1.167     paf        84: $branches[^table:set{name      val
                     85: index.cgihtml  123
                     86: }]
                     87: $splitURI[^request:uri.lsplit[/]]
1.171     paf        88: name ^if(^branches.locate[name;$splitURI.1]){found;not found}:
                     89: $branches.name
1.167     paf        90: <HR>
1.166     paf        91: $splitURI[^request:uri.lsplit[/]]
1.164     paf        92: $splitURI.0!$splitURI.1
                     93: <HR>
                     94: 
1.163     paf        95: $t2[^table:set{dir     title
                     96: /here  Here
                     97: }]
                     98: $t2{^menu{${dir}-$title}[,]}
                     99: <HR>
                    100: $dir[news]
                    101: $list[^table:dir[$dir]]
                    102: ^list.menu{
                    103:     $subdir[$dir/$list.name]
                    104:        $sublist[^table:dir[$subdir]]
                    105:        ${list.name}/ $sublist{^menu{$name}[,]}<br>
                    106: }
                    107: <HR>
1.161     paf       108: ^if(in "/otherdeeper"){y;n}
                    109: <HR>
1.160     paf       110: 
1.116     paf       111: ^^table:dir[/]:<BR>
                    112: $d[^table:dir[/]]
1.158     paf       113: $d{^menu{$name &nbsp^;&nbsp^;&nbsp^;&nbsp^;^if(-f $name){-f} ^if(-d $name){-d};<BR>}}
1.115     paf       114: <HR>
                    115: 
1.158     paf       116: $files[^table:set{name}]
1.159     paf       117: $d{^menu{
                    118:     ^if(-d "$name"){
                    119:         ^:files.append{$name}
1.158     paf       120:     }
1.159     paf       121: }}
                    122: 
1.158     paf       123: $files{^menu{$name}[,]}
1.94      paf       124: <HR>
1.31      paf       125: 
1.159     paf       126: @exception[origin;source;comment;type;code][i;j]
1.35      paf       127: <body bgcolor=black>
                    128: <font color=white>
1.31      paf       129: ERROR:
1.67      paf       130: ^if(def $source){$origin '$source'}
1.31      paf       131: ${comment}.
                    132: ^if(def $type){type=$type}
                    133: ^if(def $code){code=$code}
1.42      paf       134: 
1.43      paf       135: @auto_test[]
                    136: ^BASE.auto_test[]
1.168     paf       137: <li>${request:uri}!
1.179     paf       138: @end
1.168     paf       139: 
                    140: 
1.188     parser    141: @sql_test[connect-string]
                    142: #^rem{
1.189     parser    143: #^for[i](1;2){
1.188     parser    144: ^connect[$connect-string]{
                    145:        $shit[^taint[our's]]
                    146: #      $paf[^table:sql{insert into paf (name, age) values ('$shit', ^random:generate(10000))}]
1.192   ! parser    147:        ^sql{update paf set age=age+1}
1.188     parser    148:        $paf[^table:sql{select * from paf order by id desc}(5)]
                    149:        $paf{
                    150:        ^if(^empty[]){query result is empty}{
                    151:        <table border=1>
                    152:                <tr><td>id</td><td>name</td><td>age</td></tr>
                    153:                ^menu{<tr><td>$id</td><td>$name</td><td>$age</td></tr>}
                    154:        </table>
                    155:        }}
1.192   ! parser    156:        $paf[^hash:sql{select id,age from paf}]
        !           157:        ^$paf.2.age=$paf.2.age<br>
1.188     parser    158: }
1.189     parser    159: #}
1.188     parser    160: #}
                    161: 
1.190     parser    162: @default[test;def]
                    163: $result[^if(^test.length[]){$test}{$def}]

E-mail: