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

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

E-mail: