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

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

E-mail: