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