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

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

E-mail: