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

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

E-mail: