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

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

E-mail: