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

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

E-mail: