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

1.200   ! parser      1: @main[]
        !             2: -^eol[]-
        !             3: <hr>
        !             4: ^if(1<2){$a[1]}
        !             5: ^$a=$a
        !             6: <hr>
1.197     parser      7: 
1.200   ! 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>
1.190     parser     16: 
1.200   ! parser     17: #^main[]
        !            18: #^use[$form:file]
1.184     parser     19: 
1.200   ! parser     20: $строка[вася ЗдЕсЬ]
        !            21: ^^строка.upper[]=^строка.upper[]<br>
        !            22: ^^строка.lower[]=^строка.lower[]<br>
        !            23: <hr>
        !            24: 
        !            25: 
        !            26: $a[12]
        !            27: ^a.int[]
        !            28: <hr>
        !            29: 
        !            30: 
        !            31: $t[^table:set{key      value
        !            32: 1      v1
        !            33: 2      v2}]
        !            34: $h[^t.hash[key]]
        !            35: 
        !            36: ^sql_test[$SQL.connect-string]
        !            37: #^sql_test[mysql://test:test@localhost/test/cp1251_koi8]
        !            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>
        !            53: $currentFolder[/a/b]
        !            54: $path[^currentFolder.lsplit[/]]
        !            55: ^path.flip[]
        !            56: $path{
        !            57: ^menu{$0}{,}
        !            58: }
        !            59: <hr>
        !            60: $t1[^table:set{key     value
        !            61: 1      v1
        !            62: 2      v2}]
        !            63: $h1[^t1.hash[key]]
        !            64: ^h1.default[$value[nothing]]
        !            65: ^$h1.2.value=$h1.2.value<br>
        !            66: ^$h1.2x.value=$h1.2x.value<br>
        !            67: <hr>
        !            68: $t2[^table:set{key     a       b
        !            69: 1      a1
        !            70: 2      a2      b2
        !            71: }]
        !            72: t2 ^if(^t2.empty[]){empty}{not empty}<br>
        !            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]]
        !            81: ^$th.2.a=$th.2.a<br>
        !            82: <hr>
        !            83: #^OP:eval(1<2)
        !            84: 
        !            85: $filelist[^table:dir[.]]
        !            86: <hr>
        !            87: $path[/news/tululu/]
        !            88: #^path.flip[]
        !            89: <hr>
        !            90: $branches[^table:set{name      val
        !            91: index.cgihtml  123
        !            92: }]
        !            93: $splitURI[^request:uri.lsplit[/]]
        !            94: name ^if(^branches.locate[name;$splitURI.1]){found;not found}:
        !            95: $branches.name
        !            96: <HR>
        !            97: $splitURI[^request:uri.lsplit[/]]
        !            98: $splitURI.0!$splitURI.1
        !            99: <HR>
        !           100: 
        !           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>
        !           114: ^if(in "/otherdeeper"){y;n}
        !           115: <HR>
        !           116: 
        !           117: ^^table:dir[/]:<BR>
        !           118: $d[^table:dir[/]]
        !           119: $d{^menu{$name &nbsp^;&nbsp^;&nbsp^;&nbsp^;^if(-f $name){-f} ^if(-d $name){-d};<BR>}}
        !           120: <HR>
        !           121: 
        !           122: $files[^table:set{name}]
        !           123: $d{^menu{
        !           124:     ^if(-d "$name"){
        !           125:         ^:files.append{$name}
        !           126:     }
        !           127: }}
        !           128: 
        !           129: $files{^menu{$name}[,]}
        !           130: <HR>
        !           131: 
        !           132: @exception[origin;source;comment;type;code][i;j]
        !           133: <body bgcolor=black>
        !           134: <font color=white>
        !           135: ERROR:
        !           136: ^if(def $source){$origin '$source'}
        !           137: ${comment}.
        !           138: ^if(def $type){type=$type}
        !           139: ^if(def $code){code=$code}
        !           140: 
        !           141: @auto_test[]
        !           142: ^BASE.auto_test[]
        !           143: <li>${request:uri}!
        !           144: @end
        !           145: 
        !           146: 
        !           147: @sql_test[connect-string]
        !           148: #^rem{
        !           149: #^for[i](1;2){
        !           150: ^connect[$connect-string]{
        !           151:        $shit[^taint[our's]]
        !           152: #      $paf[^table:sql{insert into paf (name, age) values ('$shit', ^random:generate(10000))}]
        !           153:        ^nothing:sql{update paf set age=age+1}
        !           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:        }}
        !           162:        ^^string:sql{select name from paf where id=1}=^string:sql{select name from paf where id=1}<br>
        !           163:        ^^int:sql{select age from paf where id=1}=^int:sql{select age from paf where id=1}<br>
        !           164:        ^^double:sql{select age from paf where id=1}=^double:sql{select age from paf where id=1}<br>
        !           165: 
        !           166:        $paf[^hash:sql{select id,age from paf}]
        !           167:        ^$paf.2.age=$paf.2.age<br>
        !           168: }
        !           169: #}
        !           170: #}
        !           171: 
        !           172: @eol[]
        !           173: eol
        !           174: 
        !           175: @default[test;def]
        !           176: $result[^if(^test.length[]){$test}{$def}]

E-mail: