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