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

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

E-mail: