rustweb 0.2.3

Rust-based web server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
�c[�d�fd93�uid�1���86�d2v7 !"#$%&'()*��9$s&�(%Lqsysj�	ts�1
R !6#Q'l)"Lpsys�'
r�u��GFEDCBAK/favicon.icoimage/x-icon>��^
yxwZ�@0�.�	7/��'�z3George Barwood�β�2�B9)~�smtp.ma*�geebee2+�rxzjfer,smtp.gmail.com�george.-�dgpfqyd.
�+email.RetrydC�p��u�>�/favicon.ico�/Uploado^v�
|{z�ONMLKJIH�onmlkjih�WVUTSRQP����������)+,->������?����������_^]\[ZYX����������gfedcba`(/)/*/+/,/-/./����������������� /!/"/#/$/%/&////////////////	/
///
/////////�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.�.x.y.z.{.|.}.~.p.q.r.s.t.u.v.A/B/C/D/E/F/G/H/I/J/K/L/k/l/m/n/o/p/q/r/s/t/u/v/w/h.i.j.k.l.m.n.`.a.b.c.d.e.f.X.Y.Z.[.\.].^.P.Q.R.S.T.U.V.H.I.J.K.L.M.N.@.A.B.C.D.E.F.8.9.:.;.<.=.>.0.1.2.3.4.5.6.(.).*.+.,.-... .!.".#.$.%.&................	.
...
.........�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�/�/�/�/�/�/�/�/�/�/�/�/�/�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-�-0/1/2/3/4/5/6/7/�-�-�-�-�-�-�-x-y-z-{-|-}-~-p-q-r-s-t-u-v-h-i-j-k-l-m-n-`-a-b-c-d-e-f-X-Y-Z-[-\-]-^-P-Q-R-S-T-U-V-H-I-J-K-L-M-N-@-A-B-C-D-E-F-8-9-:-;-<-=->-0-1-2-3-4-5-6-(-)-*-+-,---.- -!-"-#-$-%-&----------------	-
---
---------�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,x,y,z,{,|,},~,p,q,r,s,t,u,v,h,i,j,k,l,m,n,`,a,b,c,d,e,f,�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/X,Y,Z,[,\,],^,P,Q,R,S,T,U,V,H,I,J,K,L,M,N,@,A,B,C,D,E,F,8,9,:,;,<,=,>,0,1,2,3,4,5,6,(,),*,+,,,-,.,V/W/X/Y/Z/[/\/]/^/_/`/a/ ,!,",#,$,%,&,,,,,,,,,,,,,,,,	,
,,,
,,,,,,,,,�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+�+x+y+z+{+|+}+~+p+q+r+s+t+u+v+h+i+j+k+l+m+n+`+a+b+c+d+e+f+X+Y+Z+[+\+]+^+P+Q+R+S+T+U+V+H+I+J+K+L+M+N+@+A+B+C+D+E+F+8+9+:+;+<+=+>+0+1+2+3+4+5+6+(+)+*+++,+-+.+ +!+"+#+$+%+&++++++++++++++++	+
+++
+++++++++�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�2�2�2�2�2�2�2�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*�*x*y*z*{*|*}*~*p*q*r*s*t*u*v*h*i*j*k*l*m*n*`*a*b*c*d*e*f*X*Y*Z*[*\*]*^*P*Q*R*S*T*U*V*H*I*J*K*L*M*N*@*A*B*C*D*E*F*8*9*:*;*<*=*>*0*1*2*3*4*5*6*(*)***+*,*-*.* *!*"*#*$*%*&****************	*
***
*********�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)x)y)z){)|)})~)p)q)r)s)t)u)v)h)i)j)k)l)m)n)�2�2�2�2�2�2�2�2�2�2�2�2�2�2`)a)b)c)d)e)f)X)Y)Z)[)\)])^)P)Q)R)S)T)U)V)H)I)J)K)L)M)N)@)A)B)C)D)E)F)8)9):);)<)=)>)0)1)2)3)4)5)6)()))*)+),)-).) )!)")#)$)%)&))))))))))))))))	)
)))
)))))))))�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(x(y(z({(|(}(~(p(q(r(s(t(u(v(h(i(j(k(l(m(n(`(a(b(c(d(e(f(X(Y(Z([(\(](^(P(Q(R(S(T(U(V(H(I(J(K(L(M(N(@(A(B(C(D(E(F(8(9(:(;(<(=(>(0(1(2(3(4(5(6((()(*(+(,(-(.( (!("(#($(%(&((((((((((((((((	(
(((
((�2�2�2�2�2�2�2(((((((�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'x'y'z'{'|'}'~'p'q'r's't'u'v'h'i'j'k'l'm'n'`'a'b'c'd'e'f'X'Y'Z'['\']'^'P'Q'R'S'T'U'V'H'I'J'K'L'M'N'@'A'B'C'D'E'F'8'9':';'<'='>'0'1'2'3'4'5'6'(')'*'+','-'.' '!'"'#'$'%'&''''''''''''''''	'
'''
'''''''''�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2{2|2}2~22�2�2�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&s2t2u2v2w2x2y2k2l2m2n2o2p2q2�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&�&x&y&z&{&|&}&~&p&q&r&s&t&u&v&h&i&j&k&l&m&n&`&a&b&c&d&e&f&X&Y&Z&[&\&]&^&P&Q&R&S&T&U&V&H&I&J&K&L&M&N&@&A&B&C&D&E&F&8&9&:&;&<&=&>&0&1&2&3&4&5&6&(&)&*&+&,&-&.& &!&"&#&$&%&&&&&&&&&&&&&&&&&&	&
&&&
&&&&&&&&&�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%x%y%z%{%|%}%~%p%q%r%s%t%u%v%h%i%j%k%l%m%n%`%a%b%c%d%e%f%X%Y%Z%[%\%]%^%P%Q%R%S%T%U%V%H%I%J%K%L%M%N%c2d2e2f2g2h2i2@%A%B%C%D%E%F%8%9%:%;%<%=%>%0%1%2%3%4%5%6%(%)%*%+%,%-%.% %!%"%#%$%%%&%%%%%%%%%%%%%%%%	%
%%%
%%%%%%%%%�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$x$y$z${$|$}$~$p$q$r$s$t$u$v$h$i$j$k$l$m$n$`$a$b$c$d$e$f$X$Y$Z$[$\$]$^$P$Q$R$S$T$U$V$H$I$J$K$L$M$N$@$A$B$C$D$E$F$8$9$:$;$<$=$>$0$1$2$3$4$5$6$($)$*$+$,$-$.$ $!$"$#$$$%$&$[2\2]2^2_2`2a2S2T2U2V2W2X2Y2K2L2M2N2O2P2Q2C2D2E2F2G2H2I2$$$$$$$$$$$$$$$	$
$$$
$$$$$$$$$�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#;2<2=2>2?2@2A2�#�#�#�#�#�#�#32425262728292�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#x#y#z#{#|#}#~#p#q#r#s#t#u#v#h#i#j#k#l#m#n#`#a#b#c#d#e#f#X#Y#Z#[#\#]#^#P#Q#R#S#T#U#V#H#I#J#K#L#M#N#@#A#B#C#D#E#F#8#9#:#;#<#=#>#0#1#2#3#4#5#6#(#)#*#+#,#-#.# #!#"###$#%#&################	#
###
#########�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"+2,2-2.2/20212�"�"�"�"�"�"�"x"y"z"{"|"}"~"p"q"r"s"t"u"v"h"i"j"k"l"m"n"`"a"b"c"d"e"f"X"Y"Z"["\"]"^"P"Q"R"S"T"U"V"H"I"J"K"L"M"N"@"A"B"C"D"E"F"8"9":";"<"=">"0"1"2"3"4"5"6"(")"*"+","-"." "!"""#"$"%"&""""""""""""""""	"
"""
"""""""""�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!x!y!z!{!|!}!~!p!q!r!s!t!u!v!h!i!j!k!l!m!n!`!a!b!c!d!e!f!#2$2%2&2'2(2)222222 2!2222222222
22222X!Y!Z![!\!]!^!P!Q!R!S!T!U!V!H!I!J!K!L!M!N!@!A!B!C!D!E!F!8!9!:!;!<!=!>!0!1!2!3!4!5!6!(!)!*!+!,!-!.!222222	2 !!!"!#!$!%!&!�1�1�1�1�122!!!!!!!!!!!!!!!	!
!!!
!!!!!!!!!� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � x y z { | } ~ p q r s t u v h i j k l m n ` a b c d e f X Y Z [ \ ] ^ P Q R S T U V H I J K L M N @ A B C D E F 8 9 : ; < = > 0 1 2 3 4 5 6 ( ) * + , - .   ! " # $ % &                	 
   
         ��������������������������������������������������1�1�1�1�1�1�1���������������������������������������������������������������xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&	

�������������������������������������������������������������������������������������1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1��������1�1�1�1�1�1�1���������������������xyz{|}~pqrstuvhijklmn�1�1�1�1�1�1�1`abcdef�1�1�1�1�1�1�1XYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&	

����������������������������������������������������������������������������������������������������������������xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&	

�1�1�1�1�1�1�1����������������������������������������������������������������������������������������������������������������xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&	

�����������������������������1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1�1��������1�1�1�1�1�1�1��������������������������������������������������1�1�1�1�1�1�1�1�1�1�1�1�1�1����������������������������xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&	

����������������������������������������������������������������������������������������������������������������xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUVHIJKLMN@ABCDEF�1�1�1�1�1�1�189:;<=>0123456()*+,-. !"#$%&	

����������������������������������������������������������������������������������������������������������������xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&{1|1}1~11�1�1s1t1u1v1w1x1y1k1l1m1n1o1p1q1c1d1e1f1g1h1i1	

����������������������������[1\1]1^1_1`1a1S1T1U1V1W1X1Y1������������������������������������������������������������������������������������xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&	

����������������������������������������������������������������������������������������������������������������K1L1M1N1O1P1Q1xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&	

����������������������������������������������������������������������������������������������������������������xyz{|}~pqrstuvhijklmn`abcdefC1D1E1F1G1H1I1;1<1=1>1?1@1A1XYZ[\]^31415161718191+1,1-1.1/10111PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&#1$1%1&1'1(1)111111 1!1	

����������������������������������������������������������������������������������������������������������������xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&	

��������������������������������������������������������1111111��������������������������������������������������������xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&	

������������������������������������������������������������������������������������11
11111�������111111	1�0�0�0�0�011�0�0�0�0�0�0�0���������������������xyz{|}~pqrstuvhijklmn`abcdef�0�0�0�0�0�0�0�0�0�0�0�0�0�0XYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&	

����������������������������������������������������������������������������������������������������������������xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUVHIJKLMN@ABCDEF89:;<=>0123456()*+,-. !"#$%&	

�0�0�0�0�0�0�0����������������������������������������������������������������������������������������������������������������xyz{|}~pqrstuvhijklmn`abcdefXYZ[\]^PQRSTUV������~}0�������@ABCDEF+�������9:;<=>1�������1234562�������)*+,-.3�������!"#$%&4�������5�������6�������	

7�������8�������������9�������������:�������������;�������������<�������������=��������������0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0>�������������C�������������D�������������E�������������F�������������G�������������H��������������0�0�0�0�0�0�0�0�0�0�0�0�0�0I�������������L�������������M�������������N�������yz{|}~O�������qrstuvP�������ijklmnQ�������abcdefR�������YZ[\]^S�������QRSTUVT�������IJKLMNU�������ABCDEFV�������9:;<=>W�������123456X�������)*+,-.Y�������!"#$%&Z�������[�������\�������	

]�������^�������������_�������������`�������������a�������������b�������������c�������������d�������������e�������������f�������������g�������������h�������������i�������������j�������������k�������������l�������������m�������������n�������yz{|}~o�������qrstuvp�������ijklmnq�������abcdefr�������YZ[\]^s�������QRSTUVt�������IJKLMNu�������ABCDEFv�������9:;<=>�0�0�0�0�0�0�0w�������123456y�������)*+,-.z�������!"#$%&{�������|�������}�������	

~����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yz{|}~��������qrstuv��������ijklmn��������abcdef��������YZ[\]^��������QRSTUV��������IJKLMN��������ABCDEF��������9:;<=>��������123456��������)*+,-.��������!"#$%&�����������������0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0�0��������	

�����������������
�
�
�
�
�
���������
�
�
�
�
�
���������
�
�
�
�
�
���������
�
�
�
�
�
���������
�
�
�
�
�
{0|0}0~00�0�0���������
�
�
�
�
�
s0t0u0v0w0x0y0���������
�
�
�
�
�
���������
�
�
�
�
�
���������
�
�
�
�
�
���������
�
�
�
�
�
���������
�
�
�
�
�
���������
�
�
�
�
�
���������
�
�
�
�
�
���������
�
�
�
�
�
���������
�
�
�
�
�
���������
�
�
�
�
�
��������y
z
{
|
}
~
��������q
r
s
t
u
v
��������i
j
k
l
m
n
��������a
b
c
d
e
f
��������Y
Z
[
\
]
^
��������Q
R
S
T
U
V
��������I
J
K
L
M
N
��������A
B
C
D
E
F
��������9
:
;
<
=
>
��������1
2
3
4
5
6
��������)
*
+
,
-
.
��������!
"
#
$
%
&
��������





��������





��������	







��������





����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yz{|}~k0l0m0n0o0p0q0��������qrstuv��������ijklmn��������abcdef��������YZ[\]^��������QRSTUV��������IJKLMN��������ABCDEF��������9:;<=>��������123456��������)*+,-.��������!"#$%&������������������������	

������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yz{|}~��������qrstuv��������ijklmn��������abcdef��������YZ[\]^��������QRSTUVc0d0e0f0g0h0i0[0\0]0^0_0`0a0S0T0U0V0W0X0Y0K0L0M0N0O0P0Q0��������IJKLMN�������ABCDEF�������9:;<=>�������123456�������)*+,-.�������!"#$%&�������C0D0E0F0G0H0I0�������;0<0=0>0?0@0A0	�������	

���������������
�
�
�
�
�

��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
��������
�
�
�
�
�
�������y
z
{
|
}
~
�������q
r
s
t
u
v
�������i
j
k
l
m
n
�������a
b
c
d
e
f
 �������Y
Z
[
\
]
^
!�������Q
R
S
T
U
V
"�������I
J
K
L
M
N
#�������A
B
C
D
E
F
$�������9
:
;
<
=
>
%�������1
2
3
4
5
6
&�������)
*
+
,
-
.
'�������!
"
#
$
%
&
(�������





)�������





*�������	






+�������





,��������	�	�	�	�	�	-��������	�	�	�	�	�	.��������	�	�	�	�	�	/��������	�	�	�	�	�	0��������	�	�	�	�	�	1��������	�	�	�	�	�	2��������	�	�	�	�	�	3��������	�	�	�	�	�	4��������	�	�	�	�	�	304050607080905��������	�	�	�	�	�	7��������	�	�	�	�	�	8��������	�	�	�	�	�	9��������	�	�	�	�	�	:��������	�	�	�	�	�	;��������	�	�	�	�	�	<��������	�	�	�	�	�	=�������y	z	{	|	}	~	>�������q	r	s	t	u	v	?�������i	j	k	l	m	n	@�������a	b	c	d	e	f	A�������Y	Z	[	\	]	^	B�������Q	R	S	T	U	V	C�������I	J	K	L	M	N	D�������A	B	C	D	E	F	E�������9	:	;	<	=	>	F�������1	2	3	4	5	6	G�������)	*	+	,	-	.	H�������!	"	#	$	%	&	I�������						J�������						K�������		
			
		L�������						M�������������N�������������O�������������P�������������Q�������������R�������������S�������������T�������������U�������������V�������������W�������������X�������������Y�������������Z�������������+0,0-0.0/00010#0$0%0&0'0(0)000000 0!00000000[�������������`�������������a�������yz{|}~b�������qrstuvc�������ijklmnd�������abcdefe�������YZ[\]^00
00000f�������QRSTUV000000	0h�������IJKLMNj�������ABCDEFk�������9:;<=>l�������123456m�������)*+,-.n�������!"#$%&o�������p�������q�������	

r�������s�������������t�������������u�������������v�������������w�������������x�������������y�������������z�������������{�������������|�������������}�������������~����������������������������������������������������������������������������yz{|}~��������qrstuv��������ijklmn��������abcdef��������YZ[\]^��������QRSTUV��������IJKLMN��������ABCDEF��������9:;<=>��������123456��������)*+,-.��������!"#$%&������������������������	

�����������������������/�/�/�/�/00��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yz{|}~��������qrstuv��������ijklmn��������abcdef��������YZ[\]^��������QRSTUV��������IJKLMN��������ABCDEF��������9:;<=>��������123456��������)*+,-.��������!"#$%&������������������������	

���������������������������������������������������������������������������������������������/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/���������������/�/�/�/�/�/�/���������������������������������������������������������������������������������������������������/�/�/�/�/�/�/�/�/�/�/�/�/�/������������������������������������yz{|}~��������qrstuv��������ijklmn��������abcdef��������YZ[\]^��������QRSTUV��������IJKLMN��������ABCDEF��������9:;<=>��������123456��������)*+,-.��������!"#$%&������������������������	

������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������yz{|}~��������qrstuv��������ijklmn��������abcdef��������YZ[\]^��������QRSTUV��������IJKLMN��������ABCDEF��������9:;<=>��������123456�/�/�/�/�/�/�/��������)*+,-.��������!"#$%&������������������������	

���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������	�������������
��������������������yz{|}~�������qrstuv
�������ijklmn�������abcdef�������YZ[\]^�������QRSTUV�������IJKLMN�������ABCDEF�������9:;<=>�������123456�������)*+,-.�������!"#$%&���������������/�/�/�/�/�/�/�/�/�/�/�/�/�/�������	

�/�/�/�/�/�/�/y/z/{/|/}/~//�������������������� �������������!�������������"�������������#�������������$�������������c/d/e/f/g/h/i/N/O/P/Q/R/S/T/%�������������(�������������)�������������*�������������+�������������,�������������-�������������.�������������/�������������0�������������1�������yz{|}~2�������qrstuv3�������ijklmn4�������abcdef5�������YZ[\]^���������6�������@ABCDE8�������89:;<=9�������012345:�������()*+,-;������� !"#$%<�������=�������>�������	

?�������@�������������A�������������B�������������C�������������D�������������E�������������F�������������G�������������H�������������I�������������J�������������K�������������L�������������M�������������N�������������O�������������P�������xyz{|}Q�������pqrstuR�������hijklmS�������`abcde9/:/;/</=/>/?/T�������XYZ[\]V�������PQRSTUW�������HIJKLMX�������@ABCDEY�������89:;<=Z�������012345�����C3D3E3F3G3H3:3;3<3=3>3?3@323334353637383�+3,3-3.3/303�543210/.�=<;:9876%et mut result = BTreeMap::new();
    for cookie in cookies.list() {
        let (name, value) = cookie.name_val_�tions for building ServerTrans.

/// Get BTreeMap of cookies from Cookies.
fn map_cookies(cookies: Cookies) -> BTreeMap<String,^�;
    st.x.qy.sql = Arc::new(src);
    state.process(st).await;
}

/////////////////////////////////////////////
// Helper func;0]�r: String) {
    let mut st = ServerTrans::new();
    let src = format!("EXEC email.LogSendError({},{},'{}')", msg, retry, err)\�e the database to reflect an error occurred sending an email.
async fn email_error(state: &SharedState, msg: u64, retry: i8, er!#[� ServerTrans::new();
    st.x.qy.sql = Arc::new(format!("EXEC email.Sent({})", msg));
    state.process(st).await;
}

/// UpdatZ�
}

/// Update the database to reflect an email was sent.
async fn email_sent(state: &SharedState, msg: u64) {
    let mut st ="&Y�ings
        .pool_config(PoolConfig::new().max_size(20))
 %       .build();

    let _result = sender.send(&email)?;
    Ok(())X� // Configure expected authentication mechanism
        .authentication(vec![Mechanism::Plain])
        // Connection pool sett%'W�elay(&server)?
        // Add credentials for authentication
        .credentials(Credentials::new(username, password))
       V�)
        .singlepart(body)?;

    // Create TLS transport on port 587 with STARTTLS
    let sender = SmtpTransport::starttls_r$,U�(body),
    };

    let email = Message::builder()
        .to(to.parse()?)
        .from(from.parse()?)
        .subject(titleT�Transport, Transport,
    };

    let body = match format {
        1 => SinglePart::html(body),
        _ => SinglePart::plain)+S�ansport::smtp::{
            authentication::{Credentials, Mechanism},
            PoolConfig,
        },
        Message, SmtpR�e, password): (String, String, String),
) -> Result<(), EmailError> {
    use lettre::{
        messag%e::SinglePart,
        tr*.Q�l using lettre.
fn send_email(
    (from, to, title, body, format): (String, String, String, String, i64),
    (server, usernamP�for EmailError {
    fn from(e: lettre::transport::smtp::Error) -> Self {
        EmailError::Send(e)
    }
}

/// Send an emai-/O�   fn from(e: lettre::error::Error) -> Self {
        EmailError::Lettre(e)
    }
}

impl From<lettre::transport::smtp::Error> N�re::address::AddressError) -> Self {
        EmailError::Address(e)
    }
}

impl From<lettre::error::Error> for EmailError {
 (4M�or),
    Send(lettre::transport::smtp::Error),
}

impl From<lettre::address::AddressError> for EmailError {
    fn from(e: lettL�num for send_email
#[derive(Debug)]
enum EmailError {
    Address(lettre::address::AddressError),
    Lettre(lettre::error::Err13K�state, msg, retry, se.to_string()).await;
                    }
                },
            }
        }
    }
}

/// Error eJ�:Send(%se) => {
                        let retry = if se.is_transient() { 1 } else { 0 };
                        email_error(&28I�                       email_error(&state, msg, 0, le.to_string()).await;
                    }
                    EmailError:H�     email_error(&state, msg, 0, ae.to_string()).await;
                    }
                    EmailError::Lettre(le) => {
 57G�nt(&state, msg).await,
                Err(e) => match e {
                    EmailError::Address(ae) => {
                   F� account));
            let result = blocking_task.await.unwrap();
            match result {
                Ok(_) => email_se69E� for (msg, email, account) in send_list {
            let blocking_task = tokio::task::spawn_blocking(move || send_email(email,:D�erver, username, password),
                        ));
                    }
                }
            }
        }
       ~�binpack(b: &Block, args: &mut [Expr]) -> CExpPtr<%Value> {
    check_types(b, args, &[DataKind::Binary]);
    let bytes = c_valuC�e(b, &mut args[0]);
    Box::new(Binpack { bytes })
}

/// Compiled call to BINPACK.
struct Binpack {
    bytes: CExpPtr<Value>��,
}
impl CExp<Value> for Binpack {
    fn eval(&self, ee: &mut EvalEnv, d: &[u8]) -> Value {
        if let Value::RcBinary(dat><��a) = self.bytes.eval(ee, d) {
            let mut comp = flate3::Compressor::new();
            let cb: Vec<u8> = comp.deflate(��&data);
            Value::RcBinary(Rc::new(cb))
        } else {
            panic!();
        }
    }
}

/// Compile call to A=��BINUNPACK.
fn c_binunpack(b: &Block, args: &mut [Expr]) -> CExpPtr<Value> {
    check_types(b, args, &[DataKind::Binary]);
    ��let bytes = c_value(b, &mut args[0]);
    Box::new(Binunpack { bytes })
}

/// Compiled call to BINUNPACK.
struct Binunpack {
 B@��   bytes: CExpPtr<Value>,
}
impl CExp<Value> for Binunpack {
    fn eval(&self, ee: &mut Eva%lEnv, d: &[u8]) -> Value {
        ��if let Value::RcBinary(data) = self.bytes.eval(ee, d) {
            let ucb: Vec<u8> = flate3::inflate(&data);
            ValuG?��e::RcBinary(Rc::new(ucb))
        } else {
            panic!();
        }
    }
}
*/

use clap::Parser;

#[derive(Parser)]
#[c��lap(author, version, about, long_about = None)]
struct Args {
   /// Port to listen on
   #[clap(value_parser = clap::value_parFD��ser!(u16).range(1..))]
   port: u16,

   /// Ip Address to listen on
   #[clap(short, long, value_parser, default_value = "0.0.��0.0")]
   ip: String,

   /// Server to replicate
   #[clap(short, long, value_parser, default_value = "")]
   rep: String,

  KE�� /// Login cookies for replication
   #[clap(short, long, value_parser, default_value = "")]
   login: String,

   /// Memory l��imit for page cache (in MB)
   #[clap(short, long, value_parser, default_value_t = 10)]
   mem: usize,

   /// Trace query timeJH�( �t��an exception ). 
<p>WHERE condition is not optional in UPDATE and DELETE statements - WHERE true can be used if you really wan��n if not specified in an INSERT statement. Id values must be unique ( an attempt to insert or assign a duplicate Id will raise ��L.
<p>Every table automatically gets an integer Id field ( it does not have to be specified ), which is automatically filled i��MSSQL ), no fixed length strings.
<p>Similarly there is a single binary datatype "binary" equivalent to varbinary(max) in MSSQ��tations</h2><p>There is a single variable length string datatype "string" for unicode strings ( equivalent to nvarchar(max) in ��e terminated by */. Comments have no effect, they are simply to help document the code.
<h2>Comparison with other SQL implemen��inds of comments. Single line comments start with -- and extend to the end of the line. Delimited comments start with /* and ar�� INDEX indexname ON schema(.tablename<p>The specified index is removed from the database.
<h2>Comments</h2>
<p>There are two k��s in the SCHEMA are also removed. In the case of TABLE, all the rows in the table are also removed.
<h3>DROP INDEX</h3><p>DROP��any one of SCHEMA,TABLE or FUNCTION.
<p>The specified object is removed from the database. In the case of a SCHEMA, all object	�� retrieved without scanning the entire order table.
<h2>Drop</h2>
<h3>DROP object-type object-name</h3><p>object-type can be ��EX ByCust ON dbo.Order(Cust) 
<br>creates an index allowing the orders associated with a particular customer to be efficiently
��2 ... )<p>Creates a new index. Indexes allow efficient access to rows other than by Id values. 
<p>For example, <br>CREATE IND��ds of string concatenation.
<h2>Indexes
<h3>CREATE INDEX</h3><p>CREATE INDEX indexname ON schema.tablename( Colname1, Colname
��p requests.</li>
</ul>
<h3>Conversions</h3>
<p>To be decided. Curr(ently the only implicit conversion is to string for operan��ocess is updating the database may result in an exception.
<li>See the web schema for functions that can be used to access htt��e database to give consistent results, as it can observe update activity in shared data structures. Calling it while another pr��FYDB() : verifies the logical page structure of the database. , the result is a string. Note: this needs exclusive access to th�� or -1 if the table or index does not exist. k=0 => main file, k=1.. => an index, k in -4..-1 => byte storage files. 
<li>VERI��i>
<li>REPACKFILE(k,schema,table) : A file is re-packed to free up pages. The result is an integer, the number of pages freed,��oating point number from s.</li>
<li>EXCEPTION() returns a string with any error that occurred during an EXECUTE statement.</l�� an INSERT statement.</li>
<li>PARSEINT( s string ) : parses an integer from s.</li>
<li>PARSEFLOAT( s string () : parses a fl��rns a copy of s where every occurrence of pat is replaced with sub.</li>
<li>LASTID() : returns the last Id value allocated by��ING( s binary, start int, len int ) : binary version of SUBSTRING.</li>
<li>REPLACE( s string, pat string, sub string ) : retu��<li>SUBSTRING( s string, start int, len int ) : returns the substring of s from start (1-based) length len.</li>
<li>BINSUBSTR��must be a string expression.</li>
<li>BINLEN( s binary ) : returns the length of s, which must be a binary expression.</li> 
��essary, for example ( a + b ) * c.
<h3>Pre-defined functions</h3>
<ul>
<li>LEN( s string ) : returns the length of s, which ��true )</li>
<li>OR : boolean operator  ( result is true if either arg is true )</li>
</ul>
<p>Brackets can be used where nec��n ( result is true if arg is false, false if arg is true ).</li>
<li>AND : boolean operator ( result is true if both args are ��onverted to stri(ng/binary if necessary.</li>
<li>= != > < >= <= : comparison of any data type.</li>
<li>NOT : boolean negatio��addition, subtraction of numbers.</li>
<li>| : concatenation of string/binary values. The second expression is automatically c�� / % : multiplication, division and remainder (after division) of numbers. Remainder only applies to integers.</li>
<li>+ - : 0��cept for - which can be unary, and NOT which is only unary ) in order of precedence, high to low, are as follows:
<ul>
<li>* �� brackets can be omitted if the name consists of only letters (A-Z,a-z).
<h3>Operators</h3>
<p>The operators ( all binary, ex!#�� SELECT are case insensitive, and are written without the square brackets, often in upper case only by convention ). The square��lse.
<h3>Names</h3><p>Names are enclosed in square brackets and are case sensitive ( although language keywords such as CREATE"&��nary literals are written in hexadecimal preceded by 0x. In(tegers are a list of digits (0-9). The bool literals are true and fa�� are written enclosed in single quotes. If a single quote is needed in a string literal, it is written as two single quotes. Bi%'��ult is the expression associated with the first bool expression which evaluates to true.
<h3>Literals</h3>
<p>String literals�� There is also the CASE expression, which has syntax CASE WHEN bool1 THEN exp1 WHEN bool2 THEN exp2 .... ELSE exp END - the res$,��local parameters and named columns from tables. These may be combined using operators, stored functions, pre-defined functions.��sed to check if there is any error.

<h2>Expressions</h2>
<p>Expressions are composed from literals, named local variables, )+�� to set the return value.
<h3>CHECK</h3>
<p>CHECK schema.name
<p>Checks that a function compiles ok. EXCEPTION() should be u��pression returns from a stored function with no return value.
<p>The pre-defined local variable resul(t can be assigned instead*.��er be used in expressions.
<h3>RETURN</h3>
<p>RETURN expression
<p>Returns a value from a stored function. RETURN with no ex��hema.name ( param1 type1, param2 type2... ) RETURNS type AS BEGIN statements END
<p>A stored function is created which can lat-/�ring-expression 
<p>An exception is raised, with the error message being set to the string.
<h3>CREATE FN</h3><p>CREATE FN sc~�eption (and clears the exception string). If any exception occurs, the database is left unchanged.
<h3>THROW</h3>
<p>THROW st(4}� will terminate the execution of a function or batch. EXCEPTION() can be used to obtain a string describing the most recent exc|�hema.name( exp1, exp2 ... )
<p>The stored function is called with the supplied parameters.
<h3>Exceptions</h3><p>An exception13{�
<p>A stored function ( no return value ) is created, which can later be called by an EXEC statement.
<h3>EXEC</h3><p>EXEC scz�<h2>St(ored Functions</h2>
<h3>CREATE FN</h3><p>CREATE FN schema.name ( param1 type1, param2 type2... ) AS BEGIN statements END28y�unction ) must be created in a prior batch before being used. A GO statement may be used to signify the start of a new batch.
x�pression, and then executes the result ( which should be a list of SQL statements ).
<p>Note that database objects ( tables, f57w�nclosing FOR or WHILE loop is terminated.
<h2>Batch execution</h2><p>EXECUTE ( string-expression )
<p>Evaluates the string exv�ed to the labelled statement. A label consists of a name followed by a colon (:)
<h3>BREAK</h3><p>BREAK
<p>Execution of the e69u�repeatedly executed as long as bool-exp evaluates to true. See also BREAK.
<h3>GOTO</h3><p>GOTO label
<p>Control is transferr:t�t1 is executed, otherwise Statement2 ( if specified ) is executed.
<h3>WHILE</h3><p>WHILE bool-exp Statement
<p>Statement is & �ts�<h3>IF .. THEN ... ELSE ...</h3>
<p>IF bool-exp THEN Statement1 [ ELSE Statement2 ]
<p>If bool-exp evaluates to true Statemenr�
<p>The statements are executed in order. A BEGIN..END compound statement can be used whenever a single statement is allowed.
q�sions which depend on the rows.
<h2>Control flow statements</h2>
<h3>BEGIN .. END</h3><p>BEGIN Statement1 Statement2 ... END
p� executed for each row from the table which satisfies the WHERE condition, with the named local variables being assigned expreso�>FOR name1 = exp1, name2 = exp2 .... FROM table [ WHERE bool-exp ] [ORDER BY expressions] Statement
<p>Statement is repeatedlyn�ich satisfies the WHERE condition. If there is no such row, the values of the local variables remain unchanged.
<h3>FOR</h3><pm� [ WHERE bool-exp ]
<p>Local variables are assigned. If the FROM clause is specified, the values are taken from a table row whl�each time the DECLARE is e&ncountered if there is a loop ).
<h3>SET</h3>
<p>SET name1 = exp1, name2 = exp2 .... [ FROM table ]k�<p>Local variables are declared with the specified types. The variables are initialised to default values ( but only once, not j�ved.
<h2>Local variable declaration and assignment statements</h2>
<h3>DECLARE</h3><p>DECLARE name1 type1, name2 type2 ....
	i�
<h3>DELETE</h3><p>DELETE FROM schema.tablename WHERE bool-exp
<p>Rows in the table which satisfy the WHERE condition are remoh� SET Colname1 = Exp1, Colname2 = Exp2 .... WHERE bool-exp
<p>Rows in the table which satisfy the WHERE condition are updated.

g�isplayed to a user or sent to a client for further processing and eventual display. 
<h3>UPDATE</h3><p>UPDATE schema.tablenamef�mes using AS.
<p>When used as a stand-alone statement, the results are passed to the code that invoked the batch, and may be d
e� is placed after an ORDER BY expression, the order is reversed ( desc&ending order ).
<p>The SELECT expressions can be given nad�ions]
<p>A new table is computed, based on the list of expressions and the WHERE and ORDER BY clauses.
<p>If the keyword DESCc�ocal variables or function calls ).
<h3>SELECT</h3><p>SELECT expressions FROM source-table [WHERE bool-exp ] [ORDER BY expressb�3, Val4 ...) ...
<p>The specified values are inserted into the table. The values may be any expressions ( possibly involving la�statements</h2>
<h3>INSERT</h3>
<p>INSERT INTO schema.tablename ( Colname1, Colname2 ... ) VALUES ( Val1, Val2... ) [,] ( Val`�dded to a table need to be dropped before using ALTER TABLE. They can be added again afterwards.
</ul>
<h2>Data manipulation _�g.</li>
<li>DROP Colname : the column is removed from the table.</li>
</ul>
<p>Note: currently, any indexes that have been a^�fferent sizes of integers, between float and double, and modification of the number of bytes stored inline for b&inary and strin]�.</li>
<li>MODIFY Colname Coltype : the datatype of an existing column is changed. The only changes allowed are between the di\�lename action1, action2 .... <p>The actions are as follows:
<ul>
<li>ADD Colname Coltype : a new column is added to the table[� The lower precision only applies when a value is stored in column of a table.
<h3>ALTER TABLE</h3>
<p>ALTER TABLE schema.tabZ�e slightly slower to store and retrieve. Local float and integer variables and arithmetic operations are all 64 bits (8 bytes).Y�iable length data types are stored in a special system table if the length exceeds the reserved inline storage, meaning they arX�ype has a default value : zero for numbers, a zero length string for string and binary, and false for the boolean type. The varW� default 15) specifies number of bytes stored inline.</li>
<li>bool : boolean ( true or false ).</li>
</ul>

<p>Each data tV�nal, default 15)& specifies number of bytes stored inline.</li>
<li>binary(n) : a variable length string of bytes. n (optional,U�oint numbers of size 4 and 8 bytes respectively.</li>
<li>string(n) : a variable length string of unicode characters. n (optioT�are as follows:
<ul>
<li>int(n), 1 <= n <= 8. Signed n-byte integer. Default is 8 bytes.</li>
<li>float, double : floating p0S�ble is automatically given an Id column, which auto-increments on INSERT ( if no explicit value is supplied).<p>The data types R�</h3><p>CREATE TABLE schema.tablename ( Colname1 Coltype1, Colname2 Coltype2, ... )
<p>Creates a new base table. Every base ta!#Q�ted schema. Schemas are used to organise database objects into logical categories.
<h2>Table definition</h2>
<h3>CREATE TABLEP�
<h3>CREATE SCHEMA</h3>
<p>CREATE SCHEMA name
<p>Creates a new schema. Every database object (Table, Function) has an associa"&O�ntLength | ' id=' | Id | ' <a href="/EditFile?k=' | Id | '"&>Edit Path</a>'
  FROM web.File
  EXEC web.Trailer()
ENDN�<p><Input name=file type=file><p><input name=submit type=submit value=Upload></form>'
  EXEC web.Trailer()
ENDipart/form-data">%'M�s/' | FILEATTR(0,2), FILEATTR(0,1), BINLEN(content), content )
  END
  SELECT '<form method=post enctype="multipart/form-data">L� SET content =  FILECONTENT(0)
    
    INSERT INTO web.File( Path, ContentType, ContentLength, Content )
    VALUES ( '/Upload$,K�'' Len='' | BINLEN(data) FROM log.Transaction'

   EXEC web.Trailer()
ENDERE true'
     | '<br>SELECT ''&lt;p>Id='' | Id | J�    | '<br>EXEC dbo.MakeOrders(50000)'
     | '<br>DELETE FROM dbo.Order WHERE true'
     | '<br>SELECT ''&lt;p>Id='' | Id | )+I�code'
     | '<br>DROP TABLE dbo.Cust'
     | '<br>SELECT VERIFYDB()'
     | '<br>SELECT REPACKFILE(0,''dbo'',''Order'')'
 H�TER TABLE dbo.Cust MODIFY FirstName string(20), ADD [City] string, PostCode string'
     | '<br>ALTER& TABLE dbo.Cust DROP Post*.G� rtest.OneTest()'
     | '<br>CREATE INDEX ByCust ON dbo.Order'
     | '<br>DROP INDEX ByCust ON dbo.Order'  
     | '<br>ALF�on2i!'', ''delicious salt'' )'
     | '<br>EXEC web.SetCookie(''username'',''fred'',''Max-Age=1000000000'')'
     | '<br>EXEC-/E�stName string, Age int )'
     | '<br>CREATE FN handler.[/MyPage]() AS BEGIN END'
     | '<br>SELECT ''hash='' | ARGON( ''argD�'
     | '<br>EXEC date.Test( 2020, 1, 1, 60 )'
     | '<br>EXEC date.TestRoundTrip()'
     | '<br>CREATE TABLE dbo.Cust( La(4C�LECT dbo.CustName(Id) AS Name, Age FROM dbo.Cust'
     | '<br>SELECT Cust, Total FROM dbo.Order'
     | '<br>SELECT EMAILTX()B� SET ex = EXCEPTION()
    IF ex != '' SELECT '<p>Error : ' | htm.Encode(ex)
  END
  SELECT '<p>Example SQL:'
     | '<br>SE13A� ) -- Causes result tables to be displayed as HTML tables
    EXECUTE( sql ) 
    -- EXEC SETMODE( 0 )
    DECLARE ex string@�ls."' &ELSE '' END | '>' | htm.Encode(sql) | '</textarea>' 
     | '</form>' 
  IF sql != '' 
  BEGIN
    -- EXEC SETMODE( 128?�'
     | '<br><textarea name=sql rows=20 cols=100' | CASE WHEN sql='' THEN ' placeholder="Enter SQL here. See Manual for detai>� '<br><textarea name=def rows=40 cols=150>' | htm.Encode(def) | '</textarea>' 
     | '</form>' 
  EXEC web.Trailer()
END     |57=�howSchema?s=' | s | '>' | s | '</a> . ' | n 
     | CASE WHEN s = 'handler' THEN ' <a href=' | n | '>Go</a>' ELSE '' END
     |<�LECT '<p>Error: ' | htm.Encode( ex )
  SELECT 
     '<p><form method=post>'
     | '<input type=submit value="ALTER"> <a href=S69;�)
  END
  ELSE SET def = Def FROM sys.Function WHERE Schema = sid AND Name = n 
  EXEC web.Head( 'Edit ' | n )
  IF ex != '' SE::�tring SET def = web.Form('def')
  IF def != '' 
  BEGIN
    EXECUTE( 'ALTER FN ' | sys.Dot(s,n) | def )
    SET ex = EXCEPTION($ �t9�'<p><input name="$submit" type=submit value=Save></form>'
  EXEC web.Trailer()
END( browse.FormInsertSql( t, c ) )
  SELECT 8�'
  IF ex != '' SELECT '<p>Error: ' | ex
  SELECT '<form method=post>' 
  EXECUTE( browse.FormInsertSql( t, c ) )
  SELECT 7� DECLARE title string SET title = 'Add ' | browse.TableTitle( t )
  EXEC web.Head( title )
  SELECT '<b>' | title | '</b><br>6�.tablearg(t) | '&k=' | LASTID() | ba )
      EXEC web.Redirect( browse.backurl() )       
      RETURN 
    END
  END
 
 5� IF ex = '' 
    BEGIN
      -- DECLARE ba string SET ba = browse.backargs()
      -- EXEC web.Redirect( 'ShowRow?' | browse4� string
  IF web.Form( '$submit' ) != '' 
  BEGIN
    EXECUTE( browse.InsertSql( t, c, p ) ) 
    SET ex = EXCEPTION()
   3�ser( colId, type, f )
  END
  RETURN 'UPDATE ' | sys.TableName( table ) | ' SET ' | alist | ' WHERE Id =' | k
END browse.ColPar2�uote(col) | ')'
    SET al$ist |= CASE WHEN alist = '' THEN '' ELSE ' , ' END
      | sys.QuoteName(col) | ' = ' | browse.ColPar1�r()
  END
  ELSE
  BEGIN
    EXEC web.Redirect( browse.backurl() )
  END
'
ENDe(t) | '' Table</a>''
    EXEC web.Traile0�  SELECT ''<p><a href="/ShowTable?'' | browse.tablearg(t) | ''">'' | browse.TableTitle(t) | '' Table</a>''
    EXEC web.Traile	/� '''|ba|'">Add</a>''
      FROM sys.Column WHERE Id = col
      EXECUTE( browse.ChildSql( col, k, '''|ba|''' ) )
    END
  .�ECT ''<p><b>'' | browse.TableTitle( Table ) | ''</b>''
       | '' <a href="AddChild?'' | browse.fieldarg(col) | ''&p='' | k |
-�'| ba |'">Edit</a>'''
  | '
    DECLARE col int
    FOR col = Id FROM browse.Column WHERE RefersTo = t
    BEGIN
      SEL,�FROM ' | sys.TableName(table) | ' WHERE Id = k'
  | ' SELECT ''<p><a href="/EditRow?'' | browse.tablearg(t) | ''&k='' | k | ''
+�unc | '(k)' END | '
      EXEC web.Head( title )
      SELECT ''<b>$'' | title | ''</b><br>''
  '
  | ' SELECT ' | cols | ' *�DECLARE title string SET title = browse.TableTitle( t )' 
        | CASE WHEN namefunc = '' THEN '' ELSE ' | '' '' | ' | namef)�ET k = '|k|'

    DECLARE ok int SET ok = Id FROM ' | sys.TableName(table) | ' WHERE Id = k
    IF ok = k
    BEGIN
      (�efunc = NameFunction FROM browse.Table WHERE Id = table
  RETURN '  
    DECLARE t int SET t = '|table|'
    DECLARE k int S'�col | '|''">''|' | nf | '(' | col | ')' | '|''</a>''' 
        ELSE col
        END
  END
  DECLARE namefunc string SET nam&�df != '' THEN df | '(' | col | ')'
        WHEN nf != '' THEN '''<a href="/ShowRow?' | browse.tablearg(ref) | ba | '&k=''|' | %�cols |= 
      CASE WHEN cols = '' THEN '' ELSE ' | ' END
      | '''<p>' | colname | ': '' | '
      | CASE 
        WHEN $�rowse.Column WHERE Id = colid
    IF ref > 0 SET nf = NameFunction FROM browse.Table WHERE Id = ref ELSE SET nf$ = ''
    SET #�  DECLARE ref int, nf string, df string
    SET ref = 0, nf = '', df = ''
    SET ref = RefersTo, df = DisplayFunction FROM b"�e(' | Name | ')'
    ELSE Name
    END
  FROM sys.Column WHERE Table = table 
  ORDER BY browse.ColPos(Id), Id
  BEGIN
  !�
     '<option ' | CASE WHEN sel = 0 THEN ' selected' ELSE '' END | ' value=0></option>'
     | '</select>'
END">' | options |  �n>'
  FROM sys.Schema
  ORDER BY Name
  SET options |= opt
  RETURN '<select id="' | col | '" name="' | col | '">' | options | �OR opt = '<option ' | CASE WHEN Id = sel THEN ' selected' ELSE '' END 
  | ' value=' | Id | '>' | htm.Encode( Name ) | '</optio� )
    END
  RETURN 'INSERT INTO ' | sys.TableName( table ) | browse.InsertNames( table ) | ' VALUES (' | vlist | ')'
ENDype, f�E WHEN vlist = '' THEN '' ELSE ' , ' END | 
    CASE 
    WHEN colId = pc THEN '' | p
    ELSE browse.ColParser( colId, type, f�t id="' | cn | '$" name="' | cn | '" size=' | size | ' value=' | htm.Attr(date.YearMonthDayToString(value)) | '>'
END�l | '|'''|ba|'">''|' | nf | '(' | col | ')' | '|''</a>''' 
      ELSE col
      END
  END
END.tablearg(ref) | '&k=''|' | co�!= '' THEN df | '(' | col | ')'
      WHEN nf != '' 
      THEN '''<a href="/ShowRow?' | browse.tablearg(ref) | '&k=''|' | co0�rowse.Table WHERE Id = ref
    SET result |= CASE WHEN result = '' THEN '' ELSE '|'', ''|' END | 
      CASE 
      WHEN df �
    SET ref = RefersTo, df = DisplayFunction FROM browse.Column WHERE Id = colid
    IF ref > 0 SET nf = NameFunction FROM b!#�table 
  ORDER BY browse.ColPos(Id), Id
  BEGIN
    DECLARE ref int, nf string, df string
    SET ref = 0, nf = '', df = ''�THEN 'PARSEFLOAT(' | f | ')'
    WHEN type % 8 = 5 THEN 'browse.ParseBool(' | f | ')'
    ELSE f
  END
END   WHEN type % 8 = 4 "&�  RETURN CASE 
    WHEN pf != '' THEN pf | '(' | f | ')'
  $  WHEN type % 8 = 3 THEN 'PARSEINT(' | f |')'
    WHEN type % 8 = 4 � only 28 days in a non-leap-year.
  IF m >= 3 AND NOT date.IsLeapYear( y ) SET d = d - 1
  RETURN date.YearDay( y, d )
ENDbeing%'�244 -- Sep
    WHEN m = 10 THEN 274 -- Oct
    WHEN m = 11 THEN 305 -- Nov
    ELSE 335 -- Dec
    END
  -- Allow for Feb being�EN 121 -- May
    WHEN m = 6 THEN 152 -- Jun
    WHEN m = 7 THEN 182 -- Jul
    WHEN m = 8 THEN 213 -- Aug
    WHEN m = 9 THEN $,�m = 1 THEN 0 -- Jan
    WHEN m = 2 THEN 31 -- Feb
    WHEN m = 3 THEN 60 -- Mar
    WHEN m = 4 THEN 91 -- Apr
    WHEN m = 5 TH�   ELSE 335 -- Dec
    END
  SET dim = d - fdm
  SET m = ( d - dim + 28 ) / 31
  RETURN date.YearMonthDay( y, m+1, dim+1 )
END )+�EN d < 244 THEN 213 -- Aug
    WHEN d < 274 THEN 244 -- Sep
    WHEN d < 305 THEN 274 -- Oct
    WHEN d < 335 THEN 305 -- Nov
 � < 121 THEN 91 -- Apr
    WHEN d < 152 THEN 121 -- May
    WHEN d < 182 THEN 152 -- Jun
    WHEN d < 2$13 THEN 182 -- Jul
    WH*.
� d + 1
  SET fdm = CASE 
    WHEN d < 31 THEN 0 -- Jan
    WHEN d < 60 THEN 31 -- Feb
    WHEN d < 91 THEN 60 -- Mar
    WHEN d�N t % 8 = 2 THEN 'string(' | (p-1) | ')'
       WHEN t % 8 = 3 THEN 'int(' | p | ')'
       ELSE '???'
    END
  END
END    WHE-/� THEN 'binary'
    WHEN t = 130 THEN 'string'
    ELSE 
    CASE 
       WHEN t % 8 = 1 THEN 'binary(' | (p-1) | ')'
       WHE
�Quote(ParseFunction)|')'
    FROM browse.Column WHERE Id = cid
  END
  SELECT '
GO'
ENDgleQuote(DisplayFunction)|','|sys.Single(4	�InputCols|','|sys.SingleQuote(InputFunction)
      |','|InputRows|','|Style|','|sys.SingleQuote(DisplayFunction)|','|sys.Single�sition|','|sys.SingleQuote(Label)
      |','|sys.SingleQuote(Description)
      |','|RefersTo|','|sys.SingleQuote(Default)|','|13�efersTo],[Default],[InputCols],[InputFunction],[InputRows],[Style],[DisplayFunction],[ParseFunction]) 
VALUES (cid, '
      |Po�mn WHE$RE Table = tid AND Name = ' | sys.SingleQuote(cname) | '
INSERT INTO browse.Column(Id,[Position],[Label],[Description],[R28�RE cid int, cname string
  FOR cid=Id, cname=Name FROM sys.Column WHERE Table = t
  BEGIN
    SELECT '
SET cid=Id FROM sys.Colu�| sys.SingleQuote(Title) | ',' 
    | sys.SingleQuote(Description) | ',' | Role | ')'
  FROM browse.Table WHERE Id = t

  DECLA57�id,'
    | sys.SingleQuote(NameFunction) |','|sys.SingleQuote(SelectFunction) 
    | ',' | sys.SingleQuote(DefaultOrder) | ',' �e(tname) 
SELECT '
INSERT INTO browse.Table(Id,NameFunction, SelectFunction, DefaultOrder, Title, Description, Role) 
VALUES (t69�Schema WHERE Name = ' | sys.SingleQuote(sname) | '
SET tid = Id FROM sys.Table WHERE Schema = sid AND Name = ' | sys.SingleQuot:�E Id = t
  SET sname = Name FROM sys.Schema WHERE Id = sid

  SELECT '
DECLARE tid int, sid int, cid int
SET sid = Id FROM sys.�geebee2�george. �Sunday !�Test Re"�geebee2#�mozhdar$Hi Moz!!This is a test�george.%�george.&�Thursda'�Testing(0�Invalid/��P�Ȥ��permaneS��xk����permaneT�6"v����permaneU��~����permane0��;�����permane2y������.S���EXEC 4T���EXEC 8U���EXEC 9V���EXEC :W���EXEC >X���EXEC BY���EXEC FZ���EXEC J[���EXEC N\���EXEC R	]���EXEC V^���EXEC Z
_���EXEC ^`���EXEC b
a���EXEC fb���EXEC jc���EXEC nd���EXEC �e���EXEC �f���EXEC �g���EXEC �h���EXEC Vi���EXEC q0sys.SchemaName�browse.
sys.TableName�browse.
sys.IndexName
dbo.CustNamedbo.CustSelectCustomer
email.MsgNameemail.MsgSelect�email.S�email.S]p��', '%3F' )
  --SET s = REPLACE( s, '/', '%2F' )
  --SET s = REPLACE( s, '#', '%23' )
  RETURN s
END�� ((  ����������	���3�7	�������(�*���������\�����X	���R	�U���������������	���b	�8	�8�b	������]�����Z	���1�5	���	��	�]���	����	����`�7�7�`�������������	����`�7�7�`�����ame�Alex�LastName�Barwood�x�101��hpw�B0xceb28932f94239943ca565f2ee11c9839b27d320318f2cbdedb52fcdf95cfd93�uid�1������FirstN��ame�Alex�LastName�Barwood�x�101��hpw�B0xceb28932f94239943ca565f2ee11c9839b27d320318f2cbdedb52fcdf95cfd93�uid�1���
���FirstN��web.Main()�/EditRow��b1�/ShowTable?s=dbo&n=Cust�b2�/ShowRow?s=dbo&n=Cust&k=8�k�8�n�Cust�s�dbo��$submit�Save�Age�63�City��FirstN
��web.Main()�/EditRow��b1�/ShowTable?s=dbo&n=Cust�b2�/ShowRow?s=dbo&n=Cust&k=8�k�8�n�Cust�s�dbo��$submit�Save�Age�63�City��FirstN	�����(�*��	���R	�U��
� &mut *sm.st.x);
            }
            else
            {
       P9$s&�(�\!][^�_�`		a
Cb%\ �t��SELECT ''(''|' | sys.ColValues(t) | '|'')
''' | ' FROM ' | sys.TableName(t) | filter )

    SELECT 'GO
'
END    EXECUTE( '��'' END
    END    

    SELECT '
INSERT INTO ' | sys.TableName(t) | sys.ColNames(t) | ' VALUES 
'       

    EXECUTE( '��        WHEN sname = 'log' OR sname = 'email' OR sname = 'login' OR sname = 'timed'
        THEN ' WHERE 1 = 0'
        ELSE �� = Schema FROM sys.Table WHERE Id = t
      DECLARE sname string SET sname = sys.SchemaName(schema)
      SET filter = CASE
��
    ELSE IF mode = 2
    BEGIN
      DECLARE tname string SET tname = sys.TableName(t) 
      DECLARE schema int SET schema��
       WHEN t = 4 THEN ' WHERE Id > 6' -- Index
       WHEN t = 5 THEN ' WHERE Index > 6' -- IndexColumn
       ELSE '' END
��F next < now + 10 * 1000000 SET next = now + 10 * 1000000

  UPDATE timed.Job SET at = next WHERE fn = 'email.Retry'

END I��il.Delayed
  BEGIN
    I\F t < next SET next = t
  END
 
  -- Minimum time for next call to email.Retry is 10 seconds.
  I��for next call to email.Retry.
  DECLARE next int SET next = now + 24 * 3600 * 1000000
  FOR t = time + 600 * 1000000 FROM ema��
    INSERT INTO email.Queue( msg ) VALUES ( m )
    DECLARE dummy int SET dummy = EMAILTX()
  END

  -- Calculate time to 	�� != 0
  BEGIN
    DECLARE m int
    SET m = msg FROM email.Delayed WHERE Id = r
    DELETE FROM email.Delayed WHERE Id = r
��600 * 1000000 FROM email.Delayed 
  BEGIN
    IF now >= t
    BEGIN
      SET r = id
      BREAK
    END
  END

  IF r
�� * 60 + hour * 3600 + min * 60 + sec
  SET result = result * 1000000
ENDyear, month, day ) )
  SET result = result * 24 * 60��''|sec)
  

  SET result = date.YearMonthDayToDays( date.YearMonthDay( year, month, day ) )
  SET result = result * 24 * 60
��  SET sec = PARSEINT( SUBSTRING( s, six + 1, LEN(s) ) )
  IF sec > 5\9 THROW 'Secondss must be 0..59 parsing time ' | htm.Attr(��SEINT( SUBSTRING( s, mix + 1, six - mix - 1 ) )
  IF min > 59 THROW 'Minutes must be 0..59 parsing time ' | htm.Attr(''|min)
��NG( s, hix + 1, mix - hix - 1 ) )
  IF hour > 23 THROW 'Hour must be 0..23 parsing time ' | htm.Attr(''|hour)
  SET min = PAR��sing date ' | htm.Attr(''|day)
  SET year = PARSEINT( SUBSTRING( s, yix + 1, hix - yix - 1 ) )
  SET hour = PARSEINT( SUBSTRI��1
  END
 
  SET day = PARSEINT( SUBSTRING( s, dix+1, yix - dix - 1) )
  IF day < 1 OR day > 31 THROW 'Day must be 1..31 par�� six = mix+1
  WHILE true
  BEGIN
    IF six > LEN(s) BREAK
    IF SUBSTRING( s, six, 1 ) = ':' BREAK
    SET six = six + ��RING( s, mix, 1 ) = ':' BREAK
    SET mix = mix + 1
  END

  DECLARE six int -- Index of colon before seconds string
  SET��mix int -- Index of colon before hour string
  SET mix = hix+1
  WHILE true
  BEGIN
    IF mix > LEN(s) BREA\K
    IF SUBST��true
  BEGIN
    IF hix > LEN(s) BREAK
    IF SUBSTRING( s, hix, 1 ) = ' ' BREAK
    SET hix = hix + 1
  END

  DECLARE �� ' ' BREAK
    SET yix = yix + 1
  END

  DECLARE hix int -- Index of space before hour string
  SET hix = yix+1
  WHILE �� space before year string
  SET yix = dix+1
  WHILE true
  BEGIN
    IF yix > LEN(s) BREAK
    IF SUBSTRING( s, yix, 1 ) =��  IF dix > LEN(s) BREAK
    IF SUBSTRING( s, dix, 1 ) = ' ' BREAK
    SET dix = dix + 1
  END
  DECLARE yix int -- Index of��parsing date ' | htm.Attr(ms)
  DECLARE dix int -- Index of space beforee day string
  SET dix = 4
  WHILE true
  BEGIN
  ��t' THEN 10
    WHEN ms = 'Nov' THEN 11
    WHEN ms = 'Dec' THEN 12
    ELSE 0
  END  
  IF month = 0 THROW 'Unknown month ��  WHEN ms = 'Jun' THEN 6
    WHEN ms = 'Jul' THEN 7
    WHEN ms = 'Aug' THEN 8
    WHEN ms = 'Sep' THEN 9
    WHEN ms = 'Oc��Jan' THEN 1
   \ WHEN ms = 'Feb' THEN 2
    WHEN ms = 'Mar' THEN 3
    WHEN ms = 'Apr' THEN 4
    WHEN ms = 'May' THEN 5
  �� '<input id="' | cn | '" name="' | cn | '" size=' | size | ' value=' | htm.Attr(date.MicroSecToString(value)) | '>'
END��a = at FROM timed.Job
  BEGIN
    IF now >= a
      EXECUTE( 'EXEC ' | f | '()' )
  END
   
  EXEC timed.Sleep()
END0��d.Job table with time for next retry.
    EXEC timed.Sleep() -- Set sleep time based on timed.Job table.
  END
ENDpdate time��SERT INTO email.Delayed( msg, error, time )
    VALUES ( id, error, date.Ticks() )
    EXEC email.Retry() -- Will update time!#��SE 'DELETE FROM rtestdata.[' | tname | '] WHERE y = ' | ( r%15)
  END
  
  SELECT 'sql=' | sql

  EXECUTE( sql )
 
END)'
    EL�� = 1 THEN 'INSERT INTO rtestdata.[' | tname | '](x,y) VALUES ( rtest.repeat(''George'','|(r % 100)|'),' | (r % 10) | ')'
    EL"&��e | '](x string, y int(3), z string )'
      END
    WHEN r\ % 10 = 0 THEN 'DROP TABLE rtestdata.[' | tname | ']'
    WHEN r % 2��SE WHEN r % 2 =1 THEN 'CREATE TABLE rtestdata.[' | tname | '](x string, y int(5))'
      ELSE 'CREATE TABLE rtestdata.[' | tnam%'��T exists = Name FROM sys.Table WHERE Schema = rtestdata AND Name = tname

  SET sql = CASE 
    WHEN exists = '' THEN 
      CA��int
  SET a = r % 2

  DECLARE tname string
  SET tname = 't' | ( r / 100 ) % 7

  DECLARE exists string
  SET exists = ''
  SE$,��DER BY ' | orderBy ELSE '' END
  FROM sys.Table WHERE Id = t

  EXECUTE( sql )

  EXEC web.Trailer()
ENDy != '' THEN ' OR��''| ''''|' 
    | browse.ColValues(Id,ba)  
    | ' FROM ' 
    | sys.TableName(Id)
    | CASE WHEN orderBy != '' THEN ' OR)+��
  DECLARE sql string SET sql ='SELECT ''<br><a href="ShowRow?' | browse.tablearg(t)
    | '&k=''| Id | ''' | ba |'">Show</a> �� | browse.tablearg(t) | ba | '">Add</a>'

  DECLARE orderBy string SET orderBy = DefaultOrder FROM b\rowse.Table WHERE Id = t
*.��sys.QuoteName(Name) | ' ' | sys.IndexCols(Id)
  FROM sys.Index WHERE Table = t
*/
  SELECT '<p><b>Rows</b> <a href="AddRow?'��>Settings</a>'   
    | '<p><b>Columns:</b> ' | browse.ColNames( t, ba )
/*
  SELECT '<p><b>Indexes</b>'
  SELECT '<br>' | -/�� title | ' Table'
  EXEC web.Head( title )
  SELECT '<b>' | title | '</b> <a href=/BrowseInfo?' | browse.tablearg(t) | ba | '��
    EXEC sys.ScriptSchema(s,mode)
  FOR s = Id FROM sys.Schema
    EXEC sys.ScriptSchemaBrowse(s)
END(4�� dates - conversions between Days ( from year 0 ), Year-Day, Year-Month-Day and string.
' 
EXEC web.Trailer()
ENDanipulating�� tables and functions for displaying, editing arbitrary tables in the database.
<h3>date</h3><p>Has functions for manipulating13��>Has handler functions, one for each web page.
<h3>htm</h3>
<p>Has functions related to encoding html.
<h3>browse</h3><p>Has��the fu\nction that handles web requests ( web.main ) and other functions related to handling web requests.
<h3>handler</h3>
<p28��efined schemas</h2>
<h3>sys</h3>
<p>Has core system tables for language objects and related functions.
<h3>web</h3>
<p>Has ��r when new columns are added to a table by ALTER TABLE.
<p>No triggers. No joins. No outer references.
<h2>Guide to the pre-d57��ctions must always be stated explicitly.
<p>No nulls. Columns are initialised to default a value if not specified by INSERT, o�� FOR instead ).
<p>Local variables cannot be assigned in a DECLARE statement.
<p>No default schemas. Schema of tables and fun69��FOR is used, can be FROM a table, e.g.
<p>DECLARE s string SET s = Name FROM sys.Schema WHERE Id = schema
<p>No cursors ( use:��t to UPDATE or DELETE all rows. This is a "safety" feature.
<p>Local variables cannot be assigned with SELECT, instead SET or `rage::new("rustweb.rustdb"));
    let upd = Box::new(SimpleFileStorage::new("rustweb.upd"));
    let ��ials = args.login;

    // Construct an AtomicFile. This ensures that updates to the database are "all or nothing".
    let fil��rsing listen address:port");
    let is_master = args.rep == "";
    let replicate_source = args.rep;
    let replicate_credent	��args.rep, args.login);

    let listen = format!("{}:{}", args.ip, args.port);
    let listen = listen.parse().expect("Error pa��ber::init();

    let args = Args::parse();
    println!("ip={} port={} mem={} rep={} login={}", args.ip, args.port, args.mem, 
��ion/octet-stream��d�#![forbid(unsafe_code)]

#[tokio::main]
/// Execution starts here.
async fn main() {
    // console_subscri��web.Main()�/FileUpload����hpw�B0xceb28932f94239943ca565f2ee11c9839b27d320318f2cbdedb52fcdf95cfd93�uid�1���file�main.rs�applicat
�? false)]
   tracemem: bool,

}
  tracetime: bool,

   /// Trace memor`p��unc::Int(c_email_tx)),
        ("SLEEP", DataKind::Int, CompileFunc::Int(c_sleep)),
        ("TRANSWAIT", DataKind::Int, Compil��
    let list = [
        ("ARGON", DataKind::Binary, CompileFunc::Value(c_argon)),
        ("EMAILTX", DataKind::Int, CompileF��MAILTX and SLEEP as well as the standard functions.
    let mut bmap = BuiltinMap::default();
    standard_builtins(&mut bmap);��emem;
    }
    // Construct map of "builtin" functions that can be called in SQL code.
    // Include extra functions ARGON, E��stg));
    {
       let mut s = spd.stash.write().unwrap();
       s.mem_limit = args.mem * 1000000;
       s.trace = args.trac��t readers never have to wait, they get a "virtual" read-only copy of the database.
    let spd = Arc::new(SharedPagedData::new(��stg = Box::new(AtomicFile::new(file, upd));

    // SharedPagedData allows for one writer and multiple readers.
    // Note tha��e = Box::new(SimpleFileSto (�Name�RootCSchemaCName�IdGenCTableCName�TypeC	RootC
TableC	Name�IndexC

ColIdCSchemaC
NameDef�Path�ContentType�
ContentLengthCContent�PositionCLabel�Description�Re(�
	


	#2 	,!	""	#	$!$	%%	&
'
).(
)
*(*
+<,';-.&-/01/12 635
0789�(Schema
TableColumnMIndex
IndexColumn	Function�FileColumnJ	Table
Cust		Order�MMsg

QueueD	Gen

userSmtpAccount	SendErrorJobDelayedTransaction�(SchemaTableColumnIndexIndexColumnFunctionFile
Column	Table

CustOrder	Msg
Queue	Gen
userSmtpAccount	SendErrorJobDelayedTransactionX
	
		X
	
		H
ByNameBySchemaNameByTable
ByTableByIndexBySchemaNameByPath
ByRefersTo		 ByCust@��-N '(' | list | ')'
ENDP= 8 THEN 'Aug'
    WHEN m = 9 THEN 'Sep'P
    WHEN m = 10 THEN 'Oct'
    WHEN m =P 11 THEN 'Nov'
    WHEN m = 12 THEN 'Dec5'
    ELSE '???'
  END
END= 12 THEN 'DecQ( days + i )
    SET i = i + 1
  END
ENDP
  SELECT 'Finished test day=' | day | 'I date=' | date.DaysToString(day)
END | '; ELSE '?weekday?'
    END
END	7owse.InputString'
  END
END	
P id="' | cn | '" name="' | cn | '" size=Q' | size | ' value="' | value | '">'
END
PET requests maybe be assumed to be read-
Conly.
  EXEC rtest.OneTest() 
ENDe read-
P7, ( 501 * (@I%11+@I%7) ) / 100, date ) =
    SET @I=@I+1 
  END
END0, date ) =ysToYearMonthDay(date.Today())#InputYearMonthDay%arMonthDayToString%ringToYearMonthDayE body is plain text, 1 means HTML.croSecToStringcroSecToStringInputTimecroSecToStringringToTimecroSecToStringSchemaSelectTableSelectmtpAccountName!mtpAccountSelect222@yahoo.com0 #barwood@gmail.com!Eventing test#!"=try <b>Some bold text</b> Test#222@yahoo.com&"$'owzabaghi@gmail.com%#barwood@gmail.com'%&'barwood@outlook.com'y 11 Aug Test,$( <b>Html</b>)3�<�e��Ƀ�'� 1�,���/��\��+)*il.yahoo.com+222@yahoo.com.*,ijpiacmnm-#barwood@gmail.com/-.mgcrwlgda/ email domain8(0Pnt error (535): 5.7.8 Username and Passw1?ord not accepted. Learn more atand Passw312Pnt error (535): 5.7.8 Username and Passw3?ord not accepted. Learn more atand Passw624Pweb.Main()�/Execute���sql�%DELETE FROM l5Pog.Transaction WHERE 1=1��hpw�B0xceb2893756P2f94239943ca565f2ee11c9839b27d320318f2cb7Cdedb52fcdf95cfd93�uid�1���riqō318f2cb<483timed.Run()�������r�q�93timed.Run()��������Iy�;9:Pweb.Main()�/Execute���sql�"SELECT REPACK;PFILE(0,'dbo','Order')��hpw�B0xceb28932f9>:<P4239943ca565f2ee11c9839b27d320318f2cbded==b52fcdf95cfd93�uid�1����l	�318f2cbded?=>Pweb.Main()�/Execute���sql�"SELECT REPACK?PFILE(0,'dbo','Order')��hpw�B0xceb28932f9` @P4239943ca565f2ee11c9839b27d320318f2cbdedA=b52fcdf95cfd93�uid�1������318f2cbdedCABPweb.Main()�/Execute���sql�"SELECT REPACKCPFILE(0,'dbo','Order')��hpw�B0xceb28932f9FBDP4239943ca565f2ee11c9839b27d320318f2cbdedE=b52fcdf95cfd93�uid�1������h318f2cbdedGEFPweb.Main()�/Execute���sql�#SELECT REPACKGPFILE(-2,'dbo','Order')��hpw�B0xceb28932fLDHP94239943ca565f2ee11c9839b27d320318f2cbdeI?db52fcdf95cfd93�uid�1����Go318f2cbdeKIJPweb.Main()�/Execute���sql�EXEC dbo.MakeOKPrders(50000)��hpw�B0xceb28932f94239943caNJLP565f2ee11c9839b27d320318f2cbdedb52fcdf95M+cfd93�uid�1���[�;�318f2cbdedb52fcdf95OMNPweb.Main()�/Execute���sql�EXEC dbo.MakeOOPrders(50000)��hpw�B0xceb28932f94239943caXHPP565f2ee11c9839b27d320318f2cbdedb52fcdf95Q+cfd93�uid�1���[�nY318f2cbdedb52fcdf95SQRPweb.Main()�/Execute���sql�"SELECT REPACKSPFILE(0,'dbo','Order')��hpw�B0xceb28932f9VRTP4239943ca565f2ee11c9839b27d320318f2cbdedU=b52fcdf95cfd93�uid�1���d\��318f2cbdedWUVPweb.Main()�/Execute���sql�"SELECT REPACKWPFILE(0,'dbo','Order')��hpw�B0xceb28932f9\TXP4239943ca565f2ee11c9839b27d320318f2cbdedY=b52fcdf95cfd93�uid�1���d�@318f2cbded[YZPweb.Main()�/Execute���sql�"SELECT REPACK[PFILE(0,'dbo','Order')��hpw�B0xceb28932f9^Z\P4239943ca565f2ee11c9839b27d320318f2cbded]=b52fcdf95cfd93�uid�1���d��M318f2cbded_]^Pweb.Main()�/Execute���sql�"SELECT REPACK_PFILE(0,'dbo','Order')��hpw�B0xceb28932f9hP`P4239943ca565f2ee11c9839b27d320318f2cbdeda=b52fcdf95cfd93�uid�1���d���318f2cbdedcabPweb.Main()�/Execute���sql�"SELECT REPACKcPFILE(0,'dbo','Order')��hpw�B0xceb28932f9fbdP4239943ca565f2ee11c9839b27d320318f2cbdede=b52fcdf95cfd93�uid�1���d��n318f2cbdedgefPweb.Main()�/Execute���sql�"SELECT REPACKgPFILE(0,'dbo','Order')��hpw�B0xceb28932f9ldhP4239943ca565f2ee11c9839b27d320318f2cbdedi=b52fcdf95cfd93�uid�1���d���318f2cbdedkijPweb.Main()�/Execute���sql�"SELECT REPACKkPFILE(0,'dbo','Order')��hpw�B0xceb28932f9qjlP4239943ca565f2ee11c9839b27d320318f2cbdedm=b52fcdf95cfd93�uid�1���d�B�318f2cbdedomn3timed.Run()�������� �drPFILE(0,'dbo','Order')��hpw�B0xceb28932f9qPweb.Main()�/Execute���sql�"SELECT REPACKrnsP4239943ca565f2ee11c9839b27d320318f2cbdedspt=b52fcdf95cfd93�uid�1���9ºr318f2cbded ���' | sys.QuoteName( sname )

    DECLARE t int
    FOR t = Id FROM �sys.Table WHERE Schema = s ORDER BY Name
    BEGIN
      EXEC sys.S�criptTable(t)
    END
  END

  /******* Script functions *******/�

  SELECT '
CREATE FN ' | sys.Dot( sname,Name) | Def | '
GO' 
 � FROM sys.Function  WHERE Schema = s ORDER BY Name

  /******* Scri�pt Data *******/

  IF sname != 'sys' AND sname != 'browse'
  BEGI�N
    FOR t = Id FROM sys.Table WHERE Schema = s ORDER BY Name
    S  EXEC sys.ScriptData(t,mode)
  END
ENDhema = s ORDER BY Name
    � | ' ON ' | sys.TableName(t) | sys.IndexCols(ix) | '
GO'
  END
END	�sec % 60
  SET hour = min / 60
  SET min = min % 60
  RETURN date.	
}DaysToString(  day ) | ' ' | hour | ':' | min | ':' | sec
ENDN date.�C web.SetCookie('username','','Max-Age=0')
  */
  DECLARE x int
  SET
� x = HEADER( 'set-cookie', name | '=' | value | '; ' | expires )
ENDT
�>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

�<title>' | title | '</title>
<style>
   body{font-family:sans-serif;}�
</style>
</head>
<body>
<div class=menubar><div><div>
   <a href="/"�>Home</a>
   <a href="/About">About Us</a>
   <a href="/Contact">Cont=act us</a>
</div></div>

'
ENDAbout Us</a>
   <a href="/Contact">Cont�Table = table
  ORDER BY browse.ColPos(Id), Id
  BEGIN
    SET res�ult |= CASE WHEN result = '' THEN '' ELSE ', ' END | col
  END
ENDs�f string
    SET ref = 0, inf = ''
    SET ref = RefersTo, inf = Inpu�tFunction FROM browse.Column WHERE Id = colId
    IF ref > 0 AND inf �= '' SET inf = SelectFunction FROM browse.Table WHERE Id = ref
    IF� inf = '' SET inf = browse.DefaultInput( type )
    SET sql |= 
     � CASE WHEN sql = '' THEN '' ELSE ' | ' END
      | '''<p><label for="�' | col | '">' | col | '</label>: '' | ' 
      | inf | '(' | colId |� ',' | sys.QuoteName(col) | ')'
  END
  RETURN 'SELECT ' | sql | ' FRkOM ' | sys.TableName( table ) | ' WHERE Id =' | k
ENDT ' | sql | ' FR�| Id | '>' | htm.Encode( sys.TableName(Id) ) | '</option>'
  FROM sys�.Table
  ORDER BY sys.TableName(Id)
  SET options |= opt
  RETURN '<s�elect id="' | col | '" name="' | col | '">' | options | 
     '<optio�n ' | CASE WHEN sel = 0 THEN ' selected' ELSE '' END | ' value=0></op@ ;tion>'
     | '</select>'
END' selected' ELSE '' END | ' value=0></op!�ECUTE( browse.InsertSql( t, 0, 0 ) ) 
    SET ex = EXCEPTION()
    #!"�IF ex = '' 
    BEGIN
      DECLARE ba string SET ba = browse.backa#�rgs()
      EXEC web.Redirect( 'ShowRow?' | browse.tablearg(t) | '&k&"$�=' | LASTID() | ba )
      RETURN
    END
  END
  
  EXEC web.He%�ad( 'Add ' | browse.TableTitle( t ) )
  IF ex != '' SELECT '<p>Error'%&�: ' | htm.Encode( ex )
  SELECT '<form method=post>' 
  EXECUTE( br'�owse.FormInsertSql( t, 0 ) )
  SELECT '<p><input name="$submit" type,$(m=submit value=Save></form>'
  EXEC web.Trailer()
END="$submit" type)�d = c

  DECLARE ok int SET ok = 0
  SET ok = Id FROM browse.Column W+)*�HERE Id = c
  IF ok != c INSERT INTO browse.Column( Id ) VALUES ( c )+�

  IF web.Form( '$submit' ) != '' 
  BEGIN
    EXECUTE( browse.Updat.*,�eSql( tid, c ) ) 
    EXEC web.Redirect( 'ShowTable?k=' | t )
  END
 -� ELSE
  BEGIN
    EXEC web.Head( 'Column ' | colName )
    SELECT '<h/-.�1>Column ' | colName | '</h1><form method=post>' 
    EXECUTE( browse/�.FormUpdateSql( tid, c ) )
    SELECT '<p><input name="$submit" type=8(0wsubmit value=Save></form>'
    EXEC web.Trailer()
  END
ENDmit" type=1� k
    EXEC web.Redirect('ListFile')
  END
  ELSE
  BEGIN
    EXEC we312�b.Head( 'Edit File' )
    SELECT '<h1>Edit File Path</h1>'
    SELECT3� '<form method=post>Path: <input name=path size=50 value="' | Path | 624�'">'
      | '<p><input type=submit value=Save></form>'
    FROM web.5eFile WHERE Id = k
    EXEC web.Trailer()
  END
ENDorm>'
    FROM web.756�bmit' )
  IF submit != '' 
  BEGIN
    IF submit = 'Save'
    BEG7�IN
      EXECUTE( browse.UpdateSql( t, k ) ) 
      SET ex = EXCEPT<48�ION()
      IF ex = '' 
      BEGIN
        EXEC web.Redirect( bro9�wse.backurl() )
        RETURN
      END
    END
    ELSE IF subm;9:�it = 'Delete'
    BEGIN
      EXECUTE( 'DELETE FROM ' | sys.TableNa;�me( t ) | ' WHERE Id =' | k )
      EXEC web.Redirect( browse.backur>:<�l() )
      RETURN
    END      
  END
 
  EXEC web.Head( 'Edit =�' | browse.TableTitle( t ) )
  IF ex != '' SELECT '<p>Error: ' | htm?=>�.Encode(ex)

  SELECT '<form method=post>'  
  EXECUTE( browse.For?�mUpdateSql( t, k ) )
  SELECT '<p><input name="$submit" type=submit P0@�value=Save></form>'

  SELECT '<form method=post><input name="$submA�it" type=submit value=Delete></form>'
  EXEC web.Trailer()
END$submCAB� login.hash(pw) WHERE Id = k
    EXEC web.Head( 'Password Set')
   C� SELECT '<p>Password set'
    EXEC web.Trailer()
  END
  ELSE
  BFBD�EGIN
    EXEC web.Head( 'Set Password' )
    SELECT '<form method=pE�ost><p>Enter password: <input name=pw><input type=submit></form>'
  GEFA  EXEC web.Trailer()
  END
ENDme=pw><input type=submit></form>'
  G�' | Id | '>' | htm.Encode( dbo.CustName(Id) ) | '</option>'
  FROM dbLDH�o.Cust
  ORDER BY LastName, FirstName
  SET options |= opt

  RETURN I�'<select id="' | col | '" name="' | col | '">' | options 
    | '<optKIJ�ion ' | CASE WHEN sel = 0 THEN ' selected' ELSE '' END | ' value=0></K=option>'
    | '</select>'
END ' selected' ELSE '' END | ' value=0></NJL� value=' | Id | '>' | htm.Encode( email.SmtpAccountName(Id) ) | '</opM�tion>'
  FROM email.SmtpAccount
  ORDER BY Id
  SET options |= optOMN�

  RETURN '<select id="' | col | '" name="' | col | '">' | optionsO� 
    | '<option ' | CASE WHEN sel = 0 THEN ' selected' ELSE '' END THP]| ' value=0></option>'
    | '</select>'
END selected' ELSE '' END QU sid AND Name = tname

  RETURN tid
ENDSQR� | web.UrlEncode(pv)
    SET pv = v

    SET n = n + 1
  END
ENDSsnt error (554): 6.6.0 Error sending message for delivery.VRTynt error (535): 5.7.0 (#AUTH005) Too many bad auth attempts.Uynt error (535): 5.7.0 (#AUTH005) Too many bad auth attempts.WUV�web.Main()�/Execute���sql�EXEC dbo.MakeOrders(0)��hpw�B0xceb28932f942XW�39943ca565f2ee11c9839b27d320318f2cbdedb52fcdf95c@�sys.Column WHERE Table = table
    SET result |= '|'',''|' | col
  RETURN result
END� sid EXECUTE( 'DROP FN ' | sys.Dot(schema,name) )
  FOR name = Name FROM sys.Table WHERE Schema = �sid EXECUTE( 'DROP TABLE ' | sys.Dot(schema,name) )
  DELETE FROM sys.Schema WHERE Id = sid
END = � id = Id FROM sys.Index WHERE Table = t
  BEGIN
    DELETE FROM sys.IndexColumn WHERE Index = id
 � END
  DELETE FROM sys.Index WHERE Table = t
   /* Delete the column data */
  FOR id = Id FROM sy�s.Column WHERE Table = t
  BEGIN
    DELETE FROM browse.Column WHERE Id = id
  END
  /* Delete oth�er data */
  DELETE FROM browse.Table WHERE Id = t
  DELETE FROM sys.Column WHERE Table = t
  DELEETE FROM sys.Table WHERE Id = t
ENDble WHERE Id = t
  DELETE FROM sys.Column WHERE Table = t
  DELE�st |= CASE WHEN  list = '' THEN col ELSE ',' | col END
  RETURN '(' | list | ')'
END	�ar int, day int, cycle int
  -- 146097 is the number of the days in a 400 year cycle ( 400 * 365 +	
� 97 leap years )
  SET cycle = days / 146097
  SET days = days - 146097 * cycle -- Same as days % �146097
  SET year = days / 365
  SET day = days - year * 365 -- Same as days % 365
  -- Need to ad
�just day to allow for leap years.
  -- Leap years are 0, 4, 8, 12 ... 96, not 100, 104 ... not 200
�... not 300, 400, 404 ... not 500.
  -- Adjustment as function of y is 0 => 0, 1 => 1, 2 =>1, 3 =>
� 1, 4 => 1, 5 => 2 ..
  SET day = day - ( year + 3 ) / 4 + ( year + 99 ) / 100 - ( year + 399 ) / �400
  
  IF day < 0
  BEGIN
    SET year = year - 1
    SET day = day + CASE WHEN date.IsLeapYear(� year ) THEN 366 ELSE 365 END
  END
  RETURN 512 * ( cycle * 400 + year ) + day + 1
ENDIsLeapYear(� ms = 'Apr' THEN 4
    WHEN ms = 'May' THEN 5
    WHEN ms = 'Jun' THEN 6
    WHEN ms = 'Jul' THEN �7
    WHEN ms = 'Aug' THEN 8
    WHEN ms = 'Sep' THEN 9
    WHEN ms = 'Oct' THEN 10
    WHEN ms = �'Nov' THEN 11
    WHEN ms = 'Dec' THEN 12
    ELSE 0
  END  
  IF month = 0 THROW 'Unknown month p�arsing date ' | htm.Attr(ms)
  DECLARE six int -- Index of first space
  SET six = 4
  WHILE true
�  BEGIN
    IF six > LEN(s) BREAK
    IF SUBSTRING( s, six, 1 ) = ' ' BREAK
    SET six = six + 1
�  END
  DECLARE ssix int
  SET ssix = six+1
  WHILE true
  BEGIN
    IF ssix > LEN(s) BREAK
    IF� SUBSTRING( s, ssix, 1 ) = ' ' BREAK
    SET ssix = ssix + 1
  END
 
  DECLARE day int, year int
 � SET day = PARSEINT( SUBSTRING( s, six+1, ssix - six - 1) )
  IF day < 1 OR day > 31 THROW 'Day mu�st be 1..31 parsing date ' | htm.Attr(''|day)
  SET year = PARSEINT( SUBSTRING( s, ssix + 1, LEN(s�) ) )
  RETURN date.YearMonthDayToDays( date.YearMonthDay( year, month, day ) )
ENDssix + 1, LEN(s�ere days divisible by 4 are leap years, except if divisible by 100, except if divisible by 400.
  �DECLARE y int, d int, cycle int
  -- Extract y and d from yd.
  SET y = yd / 512, d = yd % 512 - 1�
  SET cycle = y / 400, y = y % 400 -- The Gregorian calendar repeats every 400 years.
 
  -- Resu�lt days come from cycles, from years having at least 365 days, from leap years and finally d.
  --� 146097 is the number of the days in a 400 year cycle ( 400 * 365 + 97 leap years ).
  RETURN cycl0 �e * 146097 
    + y * 365 
    + ( y + 3 ) / 4 - ( y + 99 ) / 100 + ( y + 399 ) / 400
    + d
ENDl!�name="viewport" content="width=device-width, initial-scale=1">
<title>' | title | '</title>
<sty#!"�le>
   body{font-family:sans-serif;}
   body{ max-width:60em; }
</style>
</head>
<body>
<div#� style="color:white;background:lightblue;padding:4px;">
' | CASE WHEN back != '' THEN '<a href="'&"$� | back| '">Back</a> | ' ELSE '' END | '
<a href=/Menu>Menu</a> 
| <a target=_blank href=/Menu>N%�ew Window</a>
| <a href=/Manual>Manual</a>
| <a href=/Logout>Logout</a>
| <a target=_blank href'%&�="EditFunc?s=handler&n=' | web.Path() | '">Code</a> ' | date.NowString() | ' UTC</div>'
ENDk href'�ng
    SET ex = EXCEPTION()
    IF ex != ''
    BEGIN
      EXEC web.pubhead( 'Error' )
      SELE,$(�CT '<h1>Error</h1><pre>'
      SELECT htm.Encode( ex )
      SELECT '</pre>'
      EXEC web.pubtra)�il()
    END
  END
  ELSE
  BEGIN
    DECLARE ct string, content binary
    SET ok = Path, ct = Co+)*�ntentType, content = Content FROM web.File WHERE Path = path
    IF ok = path
    BEGIN
      EXEC+� web.SendBinary( ct, content )
    END    
    ELSE
    BEGIN
      EXEC web.pubhead( 'Unknown pag.*,�e')
      SELECT 'Unknown page Path=' | path
      EXEC web.pubtrail()
    END
  END
ENDnknown pag-�
  DECLARE table int SET table = Table FROM sys.Column WHERE Id = colId
  
  SET ob = DefaultOr/-.�der FROM browse.Table WHERE Id = table
  FOR colid = Id, type = Type,
    col = CASE WHEN Type %/� 8 = 2 THEN 'htm.Encode(' | Name | ')' ELSE Name END, colName = Name
  FROM sys.Column WHERE Tabl8(0�e = table AND Id != colId
  ORDER BY browse.ColPos(Id), Id
  BEGIN
    DECLARE ref int, nf stri1�ng, label string, df string
    SET ref = 0, nf = '', df = ''
    SET ref = RefersTo, label = La312�bel, df = DisplayFunction FROM browse.Column WHERE Id = colid
    IF ref > 0 SET nf = NameFunctio3�n FROM browse.Table WHERE Id = ref
    SET ob = DefaultOrder FROM browse.Table WHERE Id = ref
  624�  SET result |= '|''<TD' | CASE WHEN type % 8 != 2 THEN ' align=right' ELSE '' END | '>''|'
     5� | CASE 
        WHEN df != '' THEN df | '(' | col | ')'
        WHEN nf != '' 
        THEN ''756�'<a href="/ShowRow?t=' | ref | ba | '&k=''|' | col | '|''">''|' | nf | '(' | col | ')' | '|''</a>'7�'' 
        ELSE col
        END,
        th = th | '<TH>' | CASE WHEN label != '' THEN label E<48�LSE colName END
  END
  DECLARE kcol string SET kcol = sys.QuoteName(Name) FROM sys.Column WHERE9� Id = colId
  RETURN 
   'SELECT ''<TABLE><TR><TH>' | th | ''' '
   | 'SELECT ' | '''<TR><TD><a;9:� href="ShowRow?' | browse.tablearg(table) | '&k=''| Id | ''' | ba | '">Show</a> '''
     | result;� | ' FROM ' | sys.TableName( table ) | ' WHERE ' | kcol | ' = ' | k | CASE WHEN ob != '' THEN ' OR>:<wDER BY ' | ob ELSE '' END
   | ' SELECT ''</TABLE>'''
END = ' | k | CASE WHEN ob != '' THEN ' OR=�GIN
    DECLARE ref int, inf string, default string
    SET ref = 0, inf = '', default = ''
   ?=>� SET ref = RefersTo,  inf = InputFunction, default = Default FROM browse.Column WHERE Id = colId
?�    IF ref > 0 AND inf = '' SET inf = SelectFunction FROM browse.Table WHERE Id = ref
    IF inf ` @�= '' SET inf = browse.DefaultInput( type )
    IF default = '' SET default = browse.DefaultDefaulA�t( type, ref )
 
    SET sql |= CASE WHEN sql = '' THEN '' ELSE ' | ' END
      | '''<p><label CAB�for="' | col | '">' | col | '</label>: '' | ' 
      | inf | '(' | colId | ',' | default | ')'
 C� END
  RETURN CASE WHEN sql = '' THEN '' ELSE 'SELECT ' | sql END
ENDId | ',' | default | ')'
 FBD�put id="' | cn | '" name="' | cn | '" size="' | size | '"' | ' value="' | value | '">'
ENDE�t type=number id="' | cn | '" name="' | cn | '" size=' | size | ' value=' | value | '>'
ENDGEF�FROM browse.Column WHERE Id = colId
  IF cols = 0 SET cols = 50
  IF rows > 0
    RETURN '<textareG�a id="' | cn | '" name="' | cn | '" cols="' | cols | '"' | '" rows="' | rows |'"'
      | CASE WHELDH�N value = '' THEN 'placeholder=' | htm.Attr(description) ELSE '' END
      | '">' | htm.Encode(valI�ue) | '</textarea>'
  ELSE
    RETURN '<input id="' | cn | '" name="' | cn | '" size="' | cols | 'KIJU"' | ' value=' | htm.Attr(value) | '>'
ENDput id="' | cn | '" name="' | cn | '" size="' | cols | 'K�RT INTO browse.Table( Id ) VALUES ( k )
  IF web.Form( '$submit' ) != '' 
  BEGIN
    EXECUTE( NJL�browse.UpdateSql( tid, k ) ) 
    EXEC web.Redirect( 'ShowTable?' | browse.tablearg(k) )
  END
M�  ELSE
  BEGIN
    EXEC web.Head( 'Browse Info for ' | sys.TableName(k) )
    SELECT '<form metOMN�hod=post>' 
    EXECUTE( browse.FormUpdateSql( tid, k ) )
    SELECT '<p><input name="$submit" tO�ype=submit value=Save></form>'
    EXEC web.Trailer()
  END
ENDLECT '<p><input name="$submit" tXHP� BEGIN
    FOR fname = sys.QuoteName(Name) FROM sys.Function WHERE Schema = sid
    BEGIN
      --Q� SELECT '<br>Checking ' | sname | '.' | fname
      EXECUTE( 'CHECK ' | sname | '.' | fname )
    SQR�  DECLARE ex string SET ex = EXCEPTION()
      IF ex != '' 
      BEGIN
        SELECT '<br>Error S�: ' | htm.Encode(ex)
        SET err = err + 1
      END
      SET n = n + 1
    END
  END
  SELECVRT�T '<p>' | n | ' functions checked, errors=' | err | '.'
  EXEC web.Trailer()
END END
  END
  SELECU�ng of some fields. File editing. https://www.reddit.com/r/rust/comments/wooiwi/3_of_the_top_5_fastWUV�est_web_frameworks_are_written/


Look at function to trim the cache. Command line argument parW�sing / rustweb crate.


<p><a href="/ShowTable?s=dbo&n=Cust">Customers</a> | <a href="/OrderSum\TX�mary">Order Summary</a>
<p><a target=_blank href="/">Public Site Home Page</a>
<h3>System</h3>
Y�<p><a href=/Execute>Execute SQL</a>
<p><a href=/ListLogins>Logins</a>
<p><a href=/ListFile>Files[YZ�</a>
<p><a href=/FileUpload>File Upload</a>
<p><a target=_blank href=/ScriptAll?mode=1>Script en[�tire database</a> 
  | <a target=_blank href=/ScriptAll?mode=2>Filtered</a>    
  | <a target=_b^Z\�lank href=/ScriptExact>Exact</a>
<p><a href=/CheckAll>Check all functions compile ok</a> 

<h3>]�Schemas</h3>'
   SELECT '<a href=ShowSchema?s=' | Name | '>' | Name | '</a> | ' FROM sys.Schema O_]^URDER BY Name

   EXEC web.Trailer()
ENDma?s=' | Name | '>' | Name | '</a> | ' FROM sys.Schema O_� int, sum int, count int, gsum int, gcount int
  FOR cust = Id FROM dbo.Cust ORDER BY FirstName, pP`�LastName
  BEGIN
    SET sum = 0, count = 0
    FOR total = Total FROM dbo.Order WHERE Cust = ca�ust 
      SET sum = sum + total, count = count + 1
    SELECT '<tr><td><a href=ShowRow?s=dbo&n=cab�Cust&k=' | cust | ba | '>' | dbo.CustName(cust) | '</a>' 
      | '<td align=right>' | sum | '<tdc� align=right>' | count
    SET gsum = gsum + sum, gcount = gcount + count
  END
  SELECT '</tabfbd�le>'
  SELECT '<p>Grand total =' | gsum | ' count=' | gcount
  EXEC web.Trailer()
ENDECT '</tabe�ead( 'Schema ' | s )
  SELECT '<h1>Schema ' | s | '</h1>'
  SELECT '<h2>Tables</h2>'
  SELECT 'gef�<p><a href="ShowTable?' | browse.tablearg(Id) | ba | '">' | Name | '</a>'
  FROM sys.Table WHERE g�Schema = sid ORDER BY Name
  SELECT '<h2>Functions</h2>' 
  SELECT '<p><a href="EditFunc?s=' | sldh� | '&n=' | Name | ba | '">' | Name | '</a>'
  FROM sys.Function WHERE Schema = sid ORDER BY Name
i5
  EXEC web.Trailer()
END' | Name | '</a>'
  FROM sys.Function WHERE Schema = sid ORDER BY Name
kij�' | Id | '>' | htm.Encode( email.MsgName(Id) ) | '</option>'
  FROM email.Msg
  ORDER BY Id
  SET k�options |= opt

  RETURN '<select id="' | col | '" name="' | col | '">' | options 
    | '<option njl�' | CASE WHEN sel = 0 THEN ' selected' ELSE '' END | ' value=0></option>'
    | '</select>'
ENDon m�ine below enable Login after Login password has been setup for some user.
     In addition, the somn�alt string in login.Hash should be changed.
  */
  -- RETURN 1 -- Login disabled.

  IF usernao�me != ''
  BEGIN
    DECLARE password string SET password = web.Form('password')
    DECLARE hpxhp�w binary SET hpw = login.hash( password )

    SET result = Id FROM login.user WHERE Name = userq�name AND HashedPassword = hpw /* Binary comparison not yet implemented! */
    IF result > 0
   sqr� BEGIN
      EXEC web.SetCookie( 'uid', '' | result, '' )
      EXEC web.SetCookie( 'hpw', '' | s�hpw, '' )
      RETURN result
    END
  END

  DECLARE uids string SET uids = web.Cookie('uidvrt�')
  DECLARE hpwf string SET hpwf = web.Cookie('hpw')

  IF uids != ''
  BEGIN
    DECLARE uiu�d int SET uid = PARSEINT(uids)
    DECLARE hpwt binary SET hpwt = HashedPassword FROM login.user wuv�WHERE Id = uid
    IF hpwf = '' | hpwt RETURN uid
  END

  EXEC web.Head( 'Login' )
  SELECT w�'<form method=post>User Name <input name=username><br>Password <input type=password name=password>|tx�<br><input type=submit value=Login></form>'
  EXEC web.Trailer()

  RETURN 0
ENDname=password>y� < next SET next = t
  END

  DECLARE dummy int
  SET dummy = SLEEP( next-now )
END{yz�ECT d
  ELSE
  BEGIN
    DECLARE dummy int SET dummy = TRANSWAIT()
  END
END{�E 
      WHEN n = 2 THEN 'n'
      WHEN n = 3 THEN 'k'
      WHEN n = 4 THEN 'p'
      WHEN n ~z|�= 5 THEN 'f'
      ELSE 's'     
    END
    SET v = web.Query(name)
    IF v != '' SET keep =}� keep | CASE WHEN keep = '' THEN '?' ELSE '&' END | name | '=' | v
    SET n = n + 1
  END      �}~�

  SET keep = web.Path() | keep

  SET n = 1
  WHILE 1 = 1
  BEGIN
    SET v = web.Query( �'b' | n )
    IF v = ''
      RETURN result | '&b' | n | '=' | web.UrlEncode(keep)
    ELSE
  ���    SET result = result | '&b' | n | '=' | web.UrlEncode(v)
    SET n = n + 1
  END
ENDELSE
  % h�}�    ext.trans_wait = true;
        }
        ee.tr.set_extension(ext);
        0
    }
}

/*
/// Compile call to BINPACK.
fn c_|� -> i64 {
        let mut ext = ee.tr.get_extension();
        if let Some(mut ext) = ext.downcast_mut::<TransExt>() {
        {�/ Compiled call to TRANSWAIT
struct TransWait {}
impl CExp<i64> for TransWait {
    fn eval(&self, ee: &mut EvalEnv, _d: &[u8])z�fn c_trans_wait(b: &Block, args: &mut [Expr]) -> CExpPtr<i64> {
    check_types(b, args, &[]);
    Box::new(TransWait {})
}

//y�            ext.tx_email = true;
        }
        ee.tr.set_extension(ext);
        0
    }
}

/// Compile call to TRANSWAIT.
x�: &[u8]) -> i64 {
        let mut ext = ee.tr.get_extension();
        if let Some(mut ext) = ext.downcast_mut::<TransExt>() {
w�ilTx {})
}

/// Compiled call to EMAILTX
struct EmailTx {}
impl CExp<i64> for EmailTx {
    fn eval(&self, ee: &mut EvalEnv, _dv� call to EMAILTX.
fn c_ema%il_tx(b: &Block, args: &mut [Expr]) -> CExpPtr<i64> {
    check_types(b, args, &[]);
    Box::new(Emau�    ext.sleep = if to <= 0 { 1 } else { to as u64 };
        }
        ee.tr.set_extension(ext);
        0
    }
}

/// Compilet�l(ee, d);
        let mut ext = ee.tr.get_extension();
        if let Some(mut ext) = ext.downcast_mut::<TransExt>() {
        	s�CExpPtr<i64>,
}
impl CExp<i64> for Sleep {
    fn eval(&self, ee: &mut EvalEnv, d: &[u8]) -> i64 {
        let to = self.to.evar�d::Int]);
    let to = c_int(b, &mut args[0]);
    Box::new(Sleep { to })
}

/// Compiled call to SLEEP
struct Sleep {
    to: 
q�  }
}

/// Compile call to SLEEP.
fn c_sleep(b: &Block, args: &mut [Expr]) -> CExpPtr<i64> {
    check_types(b, args, &[DataKinp�.salt.eval(ee, d).str();

        let result = argon2i_simple(&pw, &salt).to_vec();
        Value::RcBinary(Rc::new(result))
  
o�fn eval(&self, ee: &mut EvalEnv, d: &[u8]) -> Value {
        let pw %= self.password.eval(ee, d).str();
        let salt = selfn�piled call to ARGON.
struct Argon {
    password: CExpPtr<Value>,
    salt: CExpPtr<Value>,
}
impl CExp<Value> for Argon {
    m�password = c_value(b, &mut args[0]);
    let salt = c_value(b, &mut args[1]);
    Box::new(Argon { password, salt })
}

/// Coml�gon(b: &Block, args: &mut [Expr]) -> CExpPtr<Value> {
    check_types(b, args, &[DataKind::String, DataKind::String]);
    let k�
        }
    }
    result
}

/////////////////////////////

use argon2rs::argon2i_simple;

/// Compile call to ARGON.
fn c_arj�ntent_type = content_type;
            part.data = Arc::new(data);
            part.text = text;
            result.push(part);i�      let mut part = Part::default();
            part.name = name;
            part.file_name = file_name;
            part.coh�       }
            } else if let Ok(bytes) = field.bytes().await {
                data = bytes.to_vec()
     a {
        spd: spd.clone(),
        bmap: bmap.clone(),
        tx,
        email_tx,
        sleep_tx,
        wait_tx,28��ool>();
    let (wait_tx, _wait_rx) = broadcast::channel::<()>(16);

    // Construct shared state.
    let ss = Arc::new(Share��nel::<()>();
    let (sleep_tx, sleep_rx) = mpsc::unbounded_channel::<u64>();
    let (sync_tx, sync_rx) = oneshot::channel::<b57��ication channels.
    let (tx, mut rx) = mpsc::channel::<ServerMessage>(1);
    let (email_tx, email_rx) = mpsc::unbounded_chan�� in list {
        bmap.insert(name.to_string(), (typ, cf));
    }
    let bmap = Arc::new(bmap);

    // Construct task commun69��NPACK",
            DataKind::Binary,
            CompileFunc::Value(c_binunpack),
        ),
*/
    ];
    for (name, typ, cf):��eFunc::Int(c_trans_wait)),
/*
        ("BINPACK", DataKind::Binary, CompileFunc::Value(c_binpack)),
        (
            "BINUaop {
            let mut *.��      let wapd = AccessPagedData::new_writer(spd);

        let db = Database::new(wapd, if is_master { init::INITSQL } else { �� thread::spawn(move || {
        let ss = ssc;

        // Get write-access to database ( there will only be one of these ).
  -/�� move { sync_loop(sync_rx, ssc).await });
    }

    // Start the task that updates the database.
    let ssc = ss.clone();
   ��(sleep_rx, ssc).await });
    } else {
        // Start the sync task.
        let ssc = ss.clone();
        tokio::spawn(async(4��rx, ssc).await });

        // Start the sleep task.
        let ssc = ss.clone();
        tokio::spawn(async move { sleep_loop�� is_master {
        // Start the email task.
        let ssc = ss.clone();
        tokio::spawn(async move { email_loop(email_13��
        is_master,
        replicate_source,
        replicate_credentials,
        tracetime: args.tracetime,
    });

    if��dStatea
            let updates = db.save();
            if updates > 0 {
 ��mut row = t.row();
                    row.id = t.alloc_id() as i64;
                    row.values[0] = ser;
                 %'�� rmp_serde::to_vec(&sm.st.x.qy).unwrap();
                    let ser = Value::RcBinary(Rc::new(ser));
                    let ��, "Transaction")) {
                    // Append serialised transaction to log.Transaction table
                    let ser =$,��.x);
            }

            if sm.st.log && db.changed() {
                if let Some(t) = db.get_table(&ObjRef::new("log"��         db.run_timed(&sql, &mut *sm.st.x);
            }
            else
            {
              db.run(&sql, &mut *sm.st)+��sm = rx.blocking_recv().unwrap();
            let sql = sm.st.x.qy.sql.clone();
            if ss.tracetime
            {
     ��"" }, bmap);
        if !is_master {
            let _ = sync_tx.send(db.is_new);
        }
        loaExtension, Form, Multipart, Path, Query},
    routing::get,
    Router,
};
use rustdb::{
    c_int, c_value, ch��e mimalloc::MiMalloc;

/// Memory allocator ( MiMalloc ).
#[global_allocator]
static MEMALLOC: MiMalloc = MiMalloc;

use axum::��
        .serve(app.into_make_service())
        .await
        .unwrap();
}

/// Database initialisation string.
mod init;

us0��anagerLayer::new())
            .layer(Extension(ss.clone())),
    );

    // Run the axum app.
    axum::Server::bind(&listen)��let app = Router::new().route("/*key", get(h_get).post(h_post)).layer(
        ServiceBuilder::new()
            .layer(CookieM!#��_x = sm.reply.send(sm.st);

            ss.trim_cache();
        }
    });

    // Build the axum app with a single route.
    ��               let _ = ss.wait_tx.send(());
                println!("Pages updated={updates}");
            }
            let "&��   t.insert(&db, &mut row);
                }
            }a Signals there ��result
    }
}

/// Message to server task, includes oneshot Sender for reply.
struct ServerMessage {
    st: ServerTrans,
    ��         x: Box::new(GenTransaction::new()),
            log: true,
        };
        result.x.ext = TransExt::new();
        ��s {
    x: Box<GenTransaction>,
    log: bool,
}

impl ServerTrans {
    fn new() -> Self {
        let mut result = Self {
   ��_cookies::{CookieManagerLayer, Cookies};

/// Transaction to be sent to server task, implements IntoResponse.
struct ServerTran��tions::BTreeMap, rc::Rc, sync::Arc, thread};

use tokio::sync::{broadcast, mpsc, oneshot};
use tower::ServiceBuilder;
use tower��e, EvalEnv, Expr, GenTransaction, ObjRef, Part,
    SharedPagedData, SimpleFileStorage, Transaction, Value,
};
use std::{collec��eck_types, standard_builtins, AccessPagedData, AtomicFile, Block, BuiltinMap,
    CExp, CExpPtr, CompileFunc, DataKind, Databas��{
    extract::{ast::Sender<()>,
    /// Server is master ( not replicating��e sent.
    email_tx: mpsc::UnboundedSender<()>,
    /// For setting sleep time.
    sleep_tx: mpsc::UnboundedSender<u64>,
    ��eries to server task.
    tx: mpsc::Sender<ServerMessage>,
    /// For notifying email loop that emails are in Queue ready to b��PagedData>,
    /// Map of builtin SQL functions for Database.
    bmap: Arc<BuiltinMap>,
    /// Sender channel for sending qu��
}

/// State shared with handlers.
struct SharedState {
    /// Shared storage used for read-only queries.
    spd: Arc<Shared��ction to be logged
    trans_wait: bool,
}

impl TransExt {
    fn new() -> Box<Self> {
        Box::new(Self::default())
    }��is new email to be sent.
    tx_email: bool,
    /// Signals time to sleep.
    sleep: u64,
    /// Signals wait for new transa��reply: oneshot::Sender<ServerTrans>,
}

/// Extra transaction data.
#[derive(Default)]
struct TransExt {
    ///asend(());
                }
            }
        }
        st
    }

    fn trim_cache(&self) {
    �                    let _ = self.sleep_tx.send(ext.sleep);
                }
                if ext.tx_email {
                �ext = st.x.get_extension();
            if let Some(ext) = ext.downcast_ref::<TransExt>() {
                if ext.sleep > 0 {
	��        if self.is_master {
            // Check if email needs sending or sleep time has been specified, etc.
            let ��::<ServerTrans>();
        let _err = self.tx.send(ServerMessage { st, reply }).await;
        let mut st = rx.await.unwrap();

��
}

impl SharedState {
    async fn process(&self, st: ServerTrans) -> ServerTrans {
        let (reply, rx) = oneshot::channel�� another database ).
    is_master: bool,
    replicate_source: String,
    replicate_credentials: String,
    tracetime: bool,
��/// For notifying tasks waiting for transaction.
    wait_tx: broadcaa �t	�= st.x.qy.sql.clone();
        if tracetime
        {
          db.run_timed(&sql, &mut *st.x);
        }
        else
        � read-only.
        let apd = AccessPagedData::new_reader(spd);
        let db = Database::new(apd, "", bmap);
        let sql �();

    let tracetime = ss.tracetime;
    let mut st = tokio::task::spawn_blocking(move || {
        // GET requests should be�map_cookies(cookies);

    let mut wait_rx = ss.wait_tx.subscribe();
    let spd = ss.spd.clone();
    let bmap = ss.bmap.clone�verTrans.
    let mut st = ServerTrans::new();
    st.x.qy.path = path.0;
    st.x.qy.params = params.0;
    st.x.qy.cookies = � path: Path<String>,
    params: Query<BTreeMap<String, String>>,
    cookies: Cookies,
) -> ServerTrans {
    // Build the Ser�    self.spd.trim_cache();
    }
}

/// Handler for http GET requests.
async fn h_get(
    ss: Extension<Arc<SharedState>>,
   �    let _ = self.email_tx.brverTrans::new();
/*
    if !state.is_master {
        st.x.rp.status_code = 421; // Misdirected Request
        return s28�eMap<String, String>>>,
    multipart: Option<Multipart>,
) -> ServerTrans {
    // Build the Server Transaction.
    let mut s�dState>>,
    path: Path<String>,
    params: Query<BTreeMap<String, String>>,
    cookies: Cookies,
    form: Option<Form<BTre57
�     }
    }
    ss.trim_cache();
    st
}

/// Handler for http POST requests.
async fn h_post(
    state: Extension<Arc<Share�   _ = wait_rx.recv() => {}
               _ = tokio::time::sleep(core::time::Duration::from_secs(600)) => {}
            }
   69�;
    if let Some(ext) = ext.downcast_ref::<TransExt>() {
        if ext.trans_wait {
            tokio::select! {
            :
�{
          db.run(&sql, &mut *st.x);
        }
        st
    })
    .await
    .unwrap();

    let ext = st.x.get_extension()b    }
        res
    }
}*.�     for (name, value) in &self.x.rp.headers {
            res.headers_mut().append(
                HeaderName::from_lowercase� Response::builder().body(bf).unwrap();

        *res.status_mut() = StatusCode::from_u16(self.x.rp.status_code).unwrap();

   -/�{
    fn into_response(self) -> Response<BoxBody> {
        let bf = boxed(Full::from(self.x.rp.output));
        let mut res =�der::HeaderName, status::StatusCode, HeaderValue, Response},
    response::IntoResponse,
};

impl IntoResponse for ServerTrans (4� // Process the Server Transaction.
    state.process(st).await
}

use axum::{
    body::{boxed, BoxBody, Full},
    http::{hea�me(Form(form)) = form {
        st.x.qy.form = form;
    } else {
        st.x.qy.parts = map_parts(multipart).await;
    }
   13�t;
    }
*/
    st.x.qy.path = path.0;
    st.x.qy.params = params.0;
    st.x.qy.cookies = map_cookies(cookies);
    if let So�t = Sebser = rget(state.clone(), &url).await;
        if !ser.is_empty() {
�d, "", state.bmap.clone());
            let lt = db.table("log", "Transaction");
            lt.id_gen.get()
        };
       %'�        let tid = {
            let apd = AccessPagedData::new_reader(state.spd.clone());
            let db = Database::new(ap�.qy.sql = Arc::new(sql);
        state.process(st).await;
        println!("New slave database initialised");
    }
    loop {
$,�= std::str::from_utf8(&sql).unwrap().to_string();
        let mut st = ServerTrans::new();
        st.log = false;
        st.x�db_is_new = rx.await.unwrap();
    if db_is_new {
        let sql = rget(state.clone(), "/ScriptExact").await;
        let sql )+�

/// task for syncing with master database
async fn sync_loop(rx: oneshot::Receiver<bool>, state: Arc<SharedState>) {
    let �(name.as_bytes()).unwrap(),
                HeaderValue::from_str(value).unwrap(),
            );
    b error.
async fn rget(state: Arc<SharedState>, query: &str) -> Vec<u8> {
    // get a client builder
    let cl%�         }
            Err(_) => {
                return;
            }
        }
    }
}

/// Get data from master server, re$�   Ok(e) => {
                if e >= core::time::Duration::from_secs(secs) {
                    return;
                }
   0#�.step_by(10) {
        tokio::time::sleep(core::time::Duration::from_secs(10)).await;
        match start.elapsed() {
         "�checks real time elapsed.
async fn sleep_real(secs: u64) {
    let start = std::time::SystemTime::now();
    for _ in (0..secs)!#!�ess(st).await;
            println!("Slave database updated Transaction Id={tid}");
        }
    }
}

/// Sleep function that  �            let mut st = ServerTrans::new();
            st.x.qy = rmp_serde::from_slice(&ser).unwrap();
            state.proc"&� let url = format!("/GetTransaction?k={tid}");
        let b               -�led to get bytes err={e}" ); }
                         }
                     } else {
                         println!("rget,�.await {
                            Ok(b) => { return b.to_vec(); }
                            Err(e) => { println!("rget fai+�tatus = r.status();
                     if status.is_success()
                     {
                         match r.bytes()*�end() =>
            {
                match response
                {
                  Ok(r) => {
                     let s)�ery)
            .header("Cookie", state.replicate_credentials.clone());

        tokio::select! {
            response = req.s(�);
    loop {
        let mut retry_delay = true;
        let req = client
            .get(state.replicate_source.clone() + qu'�ient = reqwest::Client::builder()
        .default_headers(reqwest::header::HeaderMap::new())
        .build()
        .unwrap(&�tries in case ofb if state.is_master
              {
                let mu4�     tokio::select! {
            ns = rx.recv() => { sleep_micro = ns.unwrap(); }
            _ = tokio::time::sleep(core::tim3�n sleep_loop(mut rx: mpsc::UnboundedReceiver<u64>, state: Arc<SharedState>) {
    let mut sleep_micro = 5000000;
    loop {
   2�Duration::from_secs(10)).await;
        }
    }
}

/// task for sleeping - calls timed.Run once sleep time has elapsed.
async f1�
        if retry_delay {
            // Wait before retrying after error/timeout.
            tokio::time::sleep(tokio::time::0�     {
              println!( "rget timed out after 800 seconds" );
              retry_delay = false;
            }
        }/� println!("rget send error {e}");
                  }
               }
            }
            _ = sleep_real(800) =>
       .� bad response status = {status}");
                     }
                  }
                  Err(e) => {
    b = qt.access(p, off);
                let msg = a.int(0) as u64;

                if let Some((pp, of;�      let at = db.table("email", "SmtpAccount");

            for (pp, off) in qt.scan(&db) {
                let p = &pp.borro:�"", state.bmap.clone());
            let qt = db.table("email", "Queue");
            let mt = db.table("email", "Msg");
      	9�rx.recv().await;
            let apd = AccessPagedData::new_reader(state.spd.clone());
            let db = Database::new(apd, 8�undedReceiver<()>, state: Arc<SharedState>) {
    loop {
        let mut send_list = Vec::new();
        {
            let _ = 
7�s(st).await;
              }
            }
        }
    }
}

/// task that sends emails
async fn email_loop(mut rx: mpsc::Unbo6�t st = ServerTrans::new();
                st.x.qy.sql = Arc::new("EXEC timed.Run()".to_string());
                state.proces
5�e::Duration::from_micros(sleep_micro)) =>
            {
             b �tC�((
                            msg,
                            (from, to, title, body, format),
                            (sB�    let username = a.str(&db, 1);
                        let password = a.str(&db, 2);

                        send_list.pushA�();
                        let a = at.access(p, off);
                        let server = a.str(&db, 0);
                    @�t(5) as u64;

                    if let Some((pp, off)) = at.id_get(&db, account) {
                        let p = &pp.borrow?�                    let body = a.str(&db, 3);
                    let format = a.int(4);
                    let account = a.in>�          let from = a.str(&db, 0);
                    let to = a.str(&db, 1);
                    let title = a.str(&db, 2);
=�f)) = mt.id_get(&db, msg) {
                    let p = &pp.borrow();
                    let a = mt.access(p, off);
          <�w();
                let a%       }
      g�       if content_type.is_empty() {
                if let Ok(s) = field.text().await {
                    text = s;
         f� None => "".to_string(),
            };
            let mut data = Vec::new();
            let mut text = "".to_string();
     e�       };
            let content_type = match field.content_type() {
                Some(s) => s.to_string(),
               d�t file_name = match field.file_name() {
                Some(s) => s.to_string(),
                None => "".to_string(),
     c�ile let Some(field) = mp.next_field().await.unwrap() {
            let name = field.name().unwrap().to_string();
            leb�c fn map_parts(mp: Option<Multipart>) -> Vec<Part> {
    let mut result = Vec::new();
    if let Some(mut mp) = mp {
        wha�ue();
        result.insert(name.to_string(), value.to_string());
    }
    result
}

/// Get Vec of Parts from MultiPart.
asyn`� String> {
    l%�
   #[clap(long, value_parser, default_value_t = false)]
   tracetime: bool,

   /// Trace memory trimming
   #[clap(long, valu��e_parser, default_value_t = false)]
   tracemem: bool,

}
��submit���Upload���/v�(Trace memory trimming
   #[clap(long, valuLI��web.Main()�/EditRow��b1�/ShowSchema?s=web�b2�/ShowTable?s=web&n=File�b3�/ShowRow?s=web&n=File&k=21�k�21�n�File�s�web��$submit�DM��elete��hpw�B0xceb28932f94239943ca565f2ee11c9839b27d320318f2cbdedb52fcdf95cfd93�uid�1���1ȹk=21�k�21�n�File�s�web��$submit�D@MaryPoppinsCLondonClareSmith RonJones-PeterPerfect$George
WashingtonRonWilliams1BenJohnsonAlexBarwood?en|y	InputTimezStringToTime{Retry|Sleep}/GetTransaction�tableid�tableargST�fieldarg���fieldid�/ScriptExact�
ScriptData�	/VerifyDB�backargs��	UrlEncode�backurlSummarybee/Rtestf
/ScriptAlldhg/SetPassword�h/ShowRowgji/ShowSchemaj
/ShowTableikkCustName�l
CustSelectfpm
MakeOrderswnMsgNamemoo	MsgSelect{pSentnrq	OneTestr	repeatvts
gett
hashsxuSmtpAccountNamevSmtpAccountSelectuqwLogSendErrorxRuHXQTableSelectR
TableTitleQS	UpdateSqlR�T/~VU	/AddChildV/AddRowUWW/BrowseColInfoX/BrowseInfo\Y	/CheckAllZ	/EditFileY[[	/EditFunc\/EditRowZ^]/Execute^/FileUpload]__	/ListFile}`/ListLoginsPla/Logoutb/Manualacc/Menud
/Orderme:>=ChildSql>ColNames=??	ColParser@ColPos `A	ColValuesBDefaultDefaultACCDefaultInputD
FormInsertSqlBFE
FormUpdateSqlFInputBinaryEGG	InputBoolHInputDoubleDLIInputIntJInputStringIKKInputYearMonthDayyLInsertNamesJNM	InsertSqlN	ParseBoolMOOSchemaSelectPShowSqlDay$,)YearMonthDay*YearMonthDayToDays)++YearMonthDayToString,YearMonthDayToYearDay*.-Attr.Encode-//Cookie0Form(81Head2Main133Path4Query265Redirect6
SendBinary577SetContentType8	SetCookie4<9Trailer�:pubhead9;;pubtrail<BrowseColumnNaTypeNameDaysToString
DaysToYearDayDaysToYearMonthDay
IsLeapYearMicroSecToString
MonthToString	NowStringStringToDayszStringToYearMonthDayTest 
TestRoundTrip0!Ticks"Today!##TodayYMD$WeekDayToString"&%YearDay&
YearDayToDays%''YearDayToString(YearDayToYearMonth@8
ClearTableColNameColNames	ColValuesColsDot
DropColumn	DropIndex	
DropSchema
	DropTable		IndexCols	IndexName

	QuoteName
SchemaName
ScriptBrowse�ScriptSchemaScriptSchemaBrowseScriptTableSingleQuote	TableName!s.SingleQuote(' | Name | ')'
    WHEN Id = 2 OR Id = 9 THEN '''ALLOCPAGE()'''
    ELSE Name
  END
  FROM ColNames�( table int ) RETURNS string AS
BEGIN
  DECLARE col string
  SET result = '(Id'
  FOR col = Name FROM sys.Column WHERE Table = table
    SET result |= ',' | sys.QuoteName(col)
  RETURN result | ')'
ENDColName�( table int, colId int ) RETURNS string AS
BEGIN
  DECLARE i int
  SET i = 0
  FOR result = Name FROM sys.Column WHERE Table = table
  BEGIN
    IF i = colId RETURN result
    SET i = i + 1
  END
  RETURN '?bad colId?'  
END
ClearTableU(t int) AS 
BEGIN 
  EXECUTE( 'DELETE FROM ' | sys.TableName(t) | ' WHERE true' )
END!ng ) AS 
BEGIN 
  DELETE FROM sys.Column WHERE Table = t AND Name = cname

  /* Could delete browse column info as well (todo)*/
ENDDoty( schema string, name string ) RETURNS string AS
BEGIN
  RETURN sys.QuoteName( schema ) | '.' | sys.QuoteName( name )
ENDCols�( table int ) RETURNS string AS
BEGIN
  DECLARE col string, list string
  FOR col = sys.QuoteName(Name) | ' ' | sys.TypeName(Type)
  FROM sys.Column WHERE Table = table
    SET list |= CASE WHEN  list = '' THEN col ELSE ',' | col END
  RETUR	ColValues�( table int ) RETURNS string AS
BEGIN
  DECLARE col string
  SET result = 'Id'
  FOR col = CASE 
    WHEN Type % 8 = 2 THEN 'sy!umn WHERE Index = index
    SET li
	DropTable�( t int ) AS 
/* Note: this should not be called directly, instead use DROP TABLE statement */
BEGIN
  /* Delete the rows */
  EXECUTE( 'DELETE FROM ' | sys.TableName(t) | ' WHERE true' )

  DECLARE id int
  /* Delete the Index data */
  FOR	
DropSchema�( sid int ) AS
/* Note: this should not be called directly, instead use DROP SCHEMA statement */
BEGIN
  DECLARE schema string, name string
  SET schema = Name FROM sys.Schema WHERE Id = sid
  FOR name = Name FROM sys.Function WHERE Schema =	DropIndex�( ix int ) AS
BEGIN
  /* Note: this should not be called directly, instead use DROP INDEX statement */
  DELETE FROM sys.IndexColumn WHERE Index = ix
  DELETE FROM sys.Index WHERE Id = ix
END
DropColumn�( t int, cname stri!END

	QuoteNameU( s string ) RETURNS string AS
BEGIN
  RETURN '[' | REPLACE( s, ']', ']]' ) | ']'
END	IndexNamel( index int ) RETURNS string AS
BEGIN
  SET result = sys.QuoteName(Name) FROM sys.Index WHERE Id = index
END	IndexCols�( index int ) RETURNS string AS
BEGIN
  DECLARE table int, list string, col string
  SET table = Table FROM sys.Index WHERE Id = index
  FOR col = sys.QuoteName(sys.ColName( table, ColId )) FROM sys.IndexCol!rowse�( s int ) AS
BEGIN
  DECLARE t int
  FOR t = Id FROM sys.Table WHERE Schema = s ORDER BY Name
  BEGIN
    EXEC sys.ScriptBrowse(t)
  END
ENDScriptSchema�( s int, mode int ) AS
BEGIN
  DECLARE sname string SET sname = sys.SchemaName(s)

  /* Create the schema, tables, indexes */
  
  IF sname != 'sys'
  BEGIN
    SELECT '
--############################################
CREATE SCHEMA 
ScriptBrowse�( t int ) AS
BEGIN
  -- Script browse information for Table t.
  -- Looks up Table and Column Id values (tid,cid) by name in case they change.
  DECLARE sid int, tname string, sname string
  SET sid = Schema, tname = Name FROM sys.Table WHER
SchemaNamea( schema int) RETURNS string AS 
BEGIN 
  SET result = Name FROM sys.Schema WHERE Id = schema
!   WHEN t = 68 THEN 'double'
    WHEN t = 67 THEN 'int'
    WHEN t = 129	TableName�( table int ) RETURNS string AS
BEGIN
  DECLARE schema int, name string
  SET schema = Schema, name = Name FROM sys.Table WHERE Id = table
  IF name = '' RETURN ''
  SET result = sys.Dot( Name, name ) FROM sys.Schema WHERE Id = schema
ENDSingleQuoteZ( s string ) RETURNS string AS
BEGIN
  RETURN '''' | REPLACE( s, '''', '''''' ) | ''''
ENDScriptTable�( t int ) AS
BEGIN
  SELECT '
CREATE TABLE ' | sys.TableName(t) | sys.Cols(t) | ' 
GO'
  DECLARE ix int, name string
  FOR ix = Id, name = Name FROM sys.Index WHERE Table = t
  BEGIN
    SELECT '
CREATE INDEX ' | sys.QuoteName(name)	ScriptSchemaB!oYearMonthDay( date.DaysToYearDay( days ) )
END
DaysToYearDay�( days int ) RETURNS int AS
BEGIN
  -- Given a date represented by the number of days since 1 Jan 0000
  -- calculate a date in Year/Day representation stored as
  -- year * 512 + day where day is 1..366, the day in the year.
  
  DECLARE ye	DaysToString�( date int ) RETURNS string AS
BEGIN
  RETURN -- date.WeekDayToString( 1 + (date+5) % 7 ) | ' ' | 
    date.YearMonthDayToString( date.DaysToYearMonthDay( date ) )
ENDTypeName�( t int ) RETURNS string AS 
BEGIN 
  DECLARE p int
  SET p = t / 8
  RETURN CASE 
    WHEN t = 0 THEN 'none'
    WHEN t = 13 THEN 'bool'
    WHEN t = 36 THEN 'float' 
 !�6
MonthToString�( m int ) RETURNS string AS
BEGIN
  RETURN CASE
    WHEN m = 1 THEN 'Jan'
    WHEN m = 2 THEN 'Feb'
    WHEN m = 3 THEN 'Mar'
    WHEN m = 4 THEN 'Apr'
    WHEN m = 5 THEN 'May'
    WHEN m = 6 THEN 'Jun'
    WHEN m = 7 THEN 'Jul'
    WHEN m MicroSecToString�(micro int) RETURNS string AS
BEGIN
  DECLARE day int, sec int, min int, hour int
  SET sec = micro / 1000000
  SET day = sec / 86400 -- 86400 = 24 * 60 * 60, seconds in a day.
  SET sec = sec % 86400
  SET min = sec / 60
  SET sec = 	
IsLeapYearZ( y int ) RETURNS bool AS
BEGIN
  RETURN y % 4 = 0 AND ( y % 100 != 0 OR y % 400 = 0 )
ENDDaysToYearMonthDayg( days int ) RETURNS int AS
BEGIN
  RETURN date.YearDayT#MonthDayToDays( ymd )
  DECLARE i int
  SET i = 0
  WHILE i < n
  BEGIN
    SELECT '<br>' | date.DaysToStringStringToYearMonthDay`( s string ) RETURNS int AS
BEGIN
  RETURN date.DaysToYearMonthDay( date.StringToDays( s ) )
ENDStringToDays�( s string ) RETURNS int AS
BEGIN
  -- Typical input is 'Feb 2 2020'
  DECLARE ms string, month int
  SET ms = SUBSTRING( s, 1, 3 )
  SET month = CASE 
    WHEN ms = 'Jan' THEN 1
    WHEN ms = 'Feb' THEN 2
    WHEN ms = 'Mar' THEN 3
    WHEN	NowStringM() RETURNS string AS
BEGIN
  RETURN date.MicroSecToString( date.Ticks() )
END#BEGIN
  DECLARE sec int, day int
  SET sec = date.Ticks() / 1000000
  SET day = sec / 86400
  RETURN day
END!Ticks�() RETURNS int AS
BEGIN
  -- Microseconds since 1 Jan 0000
  RETURN GLOBAL(0) + 62135596800000000 /* 719162 * 24 * 3600 * 1000000 */
     + 366 * 24 * 3600 * 1000000
END 
TestRoundTrip�() AS
BEGIN
  DECLARE day int
  SET day = 0
  WHILE day < 1000000
  BEGIN
    IF date.YearMonthDayToDays( date.DaysToYearMonthDay(day) ) != day
    BEGIN
      SELECT 'Test failed day = ' | day
      BREAK
    END
    SET day = day + 1
  ENDTest�( y int, m int, d int, n int ) AS 
BEGIN
  DECLARE ymd int, days int
  SET ymd = date.YearMonthDay( y, m, d )
  SET days = date.Year#-- using the Gregorian calendar wh%YearDayH( year int, day int ) RETURNS int AS
BEGIN
  RETURN year * 512 + day
END$WeekDayToString�( wd int ) RETURNS string AS
BEGIN
  RETURN CASE
    WHEN wd = 1 THEN 'Mon'
    WHEN wd = 2 THEN 'Tue'
    WHEN wd = 3 THEN 'Wed'
    WHEN wd = 4 THEN 'Thu'
    WHEN wd = 5 THEN 'Fri'
    WHEN wd = 6 THEN 'Sat'
    WHEN wd = 7 THEN 'Sun'
   #TodayYMDQ() RETURNS int AS 
BEGIN
  SET result = date.DaysToYearMonthDay(date.Today())
END"Today�() RETURNS int AS
#ND
(YearDayToYearMonthDay�( yd int ) RETURNS int AS
BEGIN
  DECLARE y int, d int, leap bool, fdm int, m int, dim int
  SET y = yd / 512
  SET d = yd % 512 - 1
  SET leap = date.IsLeapYear( y )
  -- Jan = 0..30, Feb = 0..27 or 0..28  
  IF NOT leap AND d >= 59 SET d =
'YearDayToStringp( yd int ) RETURNS string AS
BEGIN
   RETURN date.YearMonthDayToString( date.YearDayToYearMonthDay( yd ) )  
END&
YearDayToDays�( yd int ) RETURNS int AS
BEGIN
  -- Given a date in Year/Day representation stored as y * 512 + d where 1 <= d <= 366 ( so d is day in year )
  -- returns the number of days since "day zero" (1 Jan 0000)
  #oYearDay�( ymd int ) RETURNS int AS
BEGIN
  DECLARE y int, m int, d int
  -- Extract y, m, d from ymd
  SET d = ymd % 32, m = ymd / 32  
  SET y = m / 16, m = m % 16
  -- Incorporate m into d ( assuming Feb has 29 days ).
  SET d = d + CASE
    WHEN +YearMonthDayToString�( ymd int ) RETURNS string AS
BEGIN
  DECLARE y int, m int, d int
  SET d = ymd % 32
  SET m = ymd / 32
  SET y = m / 16
  SET m = m % 16
  RETURN date.MonthToString(m) | ' ' | d | ' ' |  y
END
*YearMonthDayToDayse( ymd int ) RETURNS int AS
BEGIN
  RETURN date.YearDayToDays( date.YearMonthDayToYearDay( ymd ) )
END)YearMonthDay`( year int, month int, day int ) RETURNS int AS
BEGIN
  RETURN year * 512 + month * 32 + day
E#/CookieC( name string ) RETURNS string AS
BEGIN
  RETURN ARG( 3, name )
END.Encode�( s string ) RETURNS string AS
BEGIN
  SET s = REPLACE( s,'&', '&amp;' )
  SET s = REPLACE( s, '<', '&lt;' )
  RETURN s
END-Attr�( s string ) RETURNS string AS
BEGIN
  SET s = REPLACE( s, '&', '&amp;' )
  SET s = REPLACE( s, '"', '&quot;' )
  RETURN '"' | s | '"'
END	,YearMonthDayT#2Main�() AS 
BEGIN 
  DECLARE path string SET path = web.Path()
  DECLARE ok string SET ok = Name FROM sys.Function WHERE Name = path AND Schema = 6
  IF ok = path
  BEGIN
    EXECUTE( 'EXEC ' | sys.Dot('handler',path) | '()' )
    DECLARE ex stri'1Head�( title string ) AS 
BEGIN 
  EXEC web.SetContentType( 'text/html;charset=utf-8' )

  DECLARE back string SET back = browse.backurl()

  SELECT '<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta !0FormC( name string ) RETURNS string AS
BEGIN
  RETURN ARG( 2, name )
END#�66
SendBinarym( contenttype string, content binary ) AS
BEGIN
  EXEC web.SetContentType( contenttype )
  SELECT content
END5Redirectk( url string ) AS
BEGIN
  DECLARE x int
  SET x = HEADER( 'location', url )
  SET x = STATUSCODE( 303 )
END4QueryC( name string ) RETURNS string AS
BEGIN
  RETURN ARG( 1, name )
END3Path1() RETURNS string AS
BEGIN
  RETURN ARG(0,'')
END'-type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"
9Trailer)() AS
BEGIN
  SELECT '</body></html>'
END8	SetCookie�( name string, value string, expires string ) AS
BEGIN
  /* Expires can be either in seconds e.g. Max-Age=1000000000
     or Expires=Wed, 09 Jun 2021 10:18:14 GMT
     or blank for temporary cookie

     To delete a cookie use e.g.

     EXE7SetContentTypeP( ct string ) AS
BEGIN
  DECLARE x int
  SET x = HEADER( 'contenttype', ct )
END' ba string ) RETURNS string AS 
BEGIN 
  /* Returns SQL to display a child table, with hyperlinks where a column refers to another table */
  DECLARE col string, colid int, colName string, type int, th string, ob string-<BrowseColumnName�( k int ) RETURNS string AS 
BEGIN
  SET result = sys.TableName( Table ) | '.' | sys.QuoteName( Name )
  FROM sys.Column WHERE Id = k
END;pubtrail�() AS 
BEGIN 

SELECT  '<div class=outer3><div>Copyright © ' | ( date.TodayYMD() / 512 ) | '  Whatever Limited</div></div></body></html>'

END:pubhead�( title string ) AS 
BEGIN 
  EXEC web.SetContentType( 'text/html;charset=utf-8' )
  SELECT '<html>
<head>
<meta http-equiv="Content'
  FROM sys.Column WHERE Table = @ColPosv( c int ) RETURNS int AS
BEGIN
  DECLARE pos int
  SET pos = Position FROM browse.Column WHERE Id = c
  RETURN pos
END?	ColParser�( colId int, type int, f string ) RETURNS string AS
BEGIN
  -- ColId not currently used, but in future user-specified parser could be fetched from Parse.Column
  DECLARE pf string
  SET pf = ParseFunction FROM browse.Column WHERE Id = colId
>ColNames�( table int, ba string ) RETURNS string AS
BEGIN
  DECLARE col string
  FOR col = '<a href="/BrowseColInfo?k=' | Id | ba | '">' | Name | '</a>' 
    | ' ' | sys.TypeName(Type) /* | ' pos=' | browse.ColPos(Id) */
  FROM sys.Column WHERE =ChildSql�( colId int, k int,'lId int
  FOR col = Name, type = Type, colId = Id FROM sys.Column 
    WHERE Table = table AND Id != pc
    ORDER BY browse.ColPos(Id), Id
  BE=
CDefaultInput�( type int ) RETURNS string AS
BEGIN
  RETURN CASE 
  WHEN type % 8 = 3 THEN 'browse.InputInt'
  WHEN type % 8 = 1 THEN 'browse.InputBinary'
  WHEN type % 8 = 4 THEN 'browse.InputDouble'
  WHEN type % 8 = 5 THEN 'browse.InputBool'
  ELSE 'br	BDefaultDefault�( type int, ref int ) RETURNS string AS
BEGIN
  RETURN CASE
    WHEN type % 8 = 2 THEN ''''''
    WHEN type % 8 = 1 THEN '0x'
    WHEN type % 8 = 5 THEN 'false'
    ELSE '0'
    END
ENDA	ColValues�( table int, ba string ) RETURNS string AS
BEGIN
  DECLARE col string, colid int
  FOR colid = Id, col = CASE 
    WHEN Type % 8 = 2 THEN 'htm.Encode(sys.SingleQuote(' | Name | '))'
    ELSE Name
  END'�( colId int, value bool ) RETURNS string AS
BEGIN
  DECLARE cn string 
  SET cn = Name FROM sys.Column WHERE Id = colId
  RETURN '<input type=checkbox id="' | cn | '" name="' | cn | '"' | CASE WHEN value THEN ' checked' ELSE '' END | '>'
ENDFInputBinary�( colId int, value binary ) RETURNS string AS 
BEGIN 
  DECLARE cn string SET cn = Name FROM sys.Column WHERE Id = colId
  DECLARE size int SET size = InputCols FROM browse.Column WHERE Id = colId
  IF size = 0 SET size = 50
  RETURN '<input

E
FormUpdateSql�( table int, k int ) RETURNS string AS
BEGIN
  DECLARE sql string, col string, colId int, type int
  FOR col = Name, colId = Id, type = Type FROM sys.Column WHERE Table = table
  ORDER BY browse.ColPos(Id), Id
  BEGIN
    DECLARE ref int, inD
FormInsertSql�( table int, pc int ) RETURNS string AS
BEGIN
  DECLARE sql string, col string, type int, co'owse.Column WHERE Id = colId
  IF size = 0 SET size = 10
  RETURN '<inpuJInputString�( colId int, value string ) RETURNS string AS 
BEGIN 
  DECLARE cn string SET cn = Name FROM sys.Column WHERE Id = colId 
  DECLARE cols int, rows int, description string
  SET cols = InputCols, rows = InputRows, description = Description
  FIInputInt�( colId int, value int) RETURNS string AS 
BEGIN 
  DECLARE cn string 
  SET cn = Name FROM sys.Column WHERE Id = colId
  DECLARE size int
  SET size = InputCols FROM browse.Column WHERE Id = colId
  IF size = 0 SET size = 10
  RETURN '<inpuEHInputDouble�( colId int, value double ) RETURNS string AS 
BEGIN 
  DECLARE cn string SET cn = Name FROM sys.Column WHERE Id = colId
  DECLARE size int 
  SET size = InputCols FROM browse.Column WHERE Id = colId
  IF size = 0 SET size = 15
  RETURN '<inD	G	InputBool'M	InsertSql�( table int, pc int, p int ) RETURNS string AS
BEGIN
  DECLARE vlist string, f string, type int, colId int
  FOR f = 'web.Form(' | sys.SingleQuote(Name) | ')', type = Type, colId = Id
  FROM sys.Column WHERE Table = table 
  SET vlist |= CASLInsertNames�( table int ) RETURNS string AS
BEGIN
  DECLARE col string
  FOR col = Name FROM sys.Column WHERE Table = table
    SET result |= CASE WHEN result = '' THEN '' ELSE ',' END | sys.QuoteName(col)
  RETURN '(' | result | ')'
ENDKInputYearMonthDay�( colId int, value int) RETURNS string AS 
BEGIN 
  DECLARE cn string 
  SET cn = Name FROM sys.Column WHERE Id = colId
  DECLARE size int
  SET size = InputCols FROM br'�6QTableSelect�( colId int, sel int ) RETURNS string AS
BEGIN
  DECLARE col string SET col = Name FROM sys.Column WHERE Id = colId
  DECLARE opt string, options string
  FOR opt = '<option ' | CASE WHEN Id = sel THEN ' selected' ELSE '' END 
  | ' value=' PShowSql�(table int, k int) RETURNS string AS
BEGIN
  DECLARE ba string SET ba = browse.backargs()

  DECLARE cols string, col string, colname string, colid int
  FOR colid = Id, colname = Name, col = CASE 
    WHEN Type % 8 = 2 THEN 'htm.Encod"OSchemaSelect�( colId int, sel int ) RETURNS string AS
BEGIN
  DECLARE col string SET col = Name FROM sys.Column WHERE Id = colId
  DECLARE opt string, options string, sels string
  SET sels = web.Form( col )
  IF sels != '' SET sel = PARSEINT( sels )
  FN	ParseBool8( s string ) RETURNS bool AS
BEGIN
  RETURN s = 'on'
END) SET p = PARSEINT( web.Query('p') )
  DECLARE t int SET t = Table FROM sys.Column WHERE Id = c
  DECLARE ex4T/�() AS 
BEGIN 
   EXEC web.pubhead('Home')
   
   SELECT '
<div class=outer><div>
<h1>Some website</h1>
<p>Welcome to my website.
</div></div>
'
   EXEC web.pubtrail()
ENDS	UpdateSql�( table int, k int ) RETURNS string AS
BEGIN
  DECLARE alist string, col string, type int, colId int
  FOR colId = Id, col = Name, type = Type FROM sys.Column WHERE Table = table
  BEGIN
    DECLARE f string SET f = 'web.Form(' | sys.SingleQ2R
TableTitle�( table int ) RETURNS string AS
BEGIN
  SET result = Title FROM browse.Table WHERE Id = table
  IF result = '' SET result = Name FROM sys.Table WHERE Id = table
END)CLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE k int SET k = browse.tableid()

  DECLARE tid int SET tid = 9
  DECLARE ok int SET ok = 0
  SET ok = Id FROM browse.Table WHERE Id = k
  IF ok != k INSEKW/BrowseColInfo�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE tid int SET tid = 8
  DECLARE c int SET c = PARSEINT( web.Query( 'k' ) )
  DECLARE t int, colName string
  SET t = Table, colName = Name FROM sys.Column WHERE I)V/AddRow�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE t int SET t = browse.tableid()

  DECLARE ex string
  IF web.Form( '$submit' ) != '' 
  BEGIN
    DECLARE lastid int
    SET lastid = LASTID()
    EX!U	/AddChild�() AS
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE c int SET c = browse.fieldid()

  DECLARE p int)string SET submit = web.Form( '$su6[	/EditFunc�() AS
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE s string SET s = web.Query('s')
  DECLARE n string SET n = web.Query('n')
  DECLARE sid int SET sid = Id FROM sys.Schema WHERE Name = s
  DECLARE def string, ex s:Z	/EditFile�() AS
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE k int SET k = PARSEINT( web.Query('k') )
  DECLARE path string SET path = web.Form('path')
  IF path != '' 
  BEGIN
    UPDATE web.File SET Path = path WHERE Id =1Y	/CheckAll�() AS 
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  EXEC web.Head('Check All Functions compile')
  DECLARE sid int, sname string, fname string, err int, n int

  FOR sid = Id, sname = sys.QuoteName(Name) FROM sys.Schema
 PX/BrowseInfo�() AS 
BEGIN
  DE))
  SELECT '<h1>Files</h1>' 
  SELECT '<p>Path=<a target=_blank href="' | Path | '">' | Path | '</a> Type= ' | ContentType 
   | ' Length=' | ConteO
^/FileUpload�() AS
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  EXEC web.Head( 'File upload' )
  IF FILEATTR(0,0) = 'file' 
  BEGIN
    SELECT '<p>Filename=' | FILEATTR(0,2) | ' ContentType=' | FILEATTR(0,1)
    DECLARE content binaryL]/Execute�() AS 
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE sql string SET sql = web.Form('sql')
  EXEC web.Head( 'Execute' )
  SELECT 
     '<p><form method=post>'
     | 'SQL to <input type=submit value=Execute>?\/EditRow�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE t int SET t = browse.tableid()
  DECLARE k int SET k = PARSEINT( web.Query('k') )
  DECLARE ex string
  DECLARE submit )�() AS BEGIN
EXEC web.Head('Manual')
SELECT '<h1>Manual</h1>
<p>This manual describes the various SQL statements that are available. Where syntax is described, optional elements are enclosed in square brackets.
<h2>Schema definition</h2>
Pa/Logout�() AS 
BEGIN 
    EXEC web.SetCookie( 'uid', '', '' )
    EXEC web.SetCookie( 'hpw', '', '' )
    EXEC web.Head( 'Logout' )
    SELECT '<p>Logged out.'
    EXEC web.Trailer()
END
`/ListLogins�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  EXEC web.Head('Logins')

  SELECT '<p>' | Name | ' <a href="/SetPassword?k=' | Id | '">Set Password</a>'
  FROM login.user
  ORDER BY Name

  EXEC web.Trailer()
END_	/ListFile�() AS
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  EXEC web.Head( 'Files' )INT(web.Query('mode'))

  DECLARE s int
  FOR s = Id FROM sys.Schema
�e/Rtest�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  -- Can be invoked repeatedly with e.g. for /l %x in (1, 1, 100) do curl -X POST http://localhost:3000/Rtest
  -- Depending on the server, a POST request is needed, as Gd
/OrderSummary�() AS
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE ba string SET ba = browse.backargs()

  EXEC web.Head( 'Order Summary' )
  SELECT '<table><tr><th>Cust<th>Total<th>Count</tr>'

  DECLARE cust int, total_c/Menu�() AS
BEGIN
   DECLARE cu int SET cu = login.get(0) IF cu = 0 RETURN

   EXEC web.Head('System Menu')
   SELECT '
<p>Martin Dent project. Archive project. Port BMIB. Start a blog. Add extra fields when displaying record. Suppress editiU	b/Manual)cu = 0 RETURN

  DECLARE ba string SET ba = browse.backargs()

  DECLARE s string SET s = web.Query('s')
  DECLARE sid int SET sid = Id FROM sys.Schema WHERE Name = s
  EXEC web.Heh/ShowRow�() AS 
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE t int SET t = browse.tableid()

  DECLARE k int SET k = PARSEINT( web.Query('k') )  

  EXECUTE( browse.ShowSql(t,k) )
ENDg/SetPassword�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE k int SET k = PARSEINT( web.Query('k') )

  DECLARE pw string SET pw = web.Form('pw')
  IF pw != '' 
  BEGIN
    UPDATE login.user SET HashedPassword =Bf
/ScriptAll�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  EXEC web.SetContentType( 'text/plain;charset=utf-8' )

  DECLARE mode int SET mode = PARSE)�6l
CustSelect�( colId int, sel int ) RETURNS string AS
BEGIN
  DECLARE col string SET col = Name FROM sys.Column WHERE Id = colId

  DECLARE opt string, options string

  FOR opt = '<option ' | CASE WHEN Id = sel THEN ' selected' ELSE '' END 
  | ' value=GkCustName�( cust int ) RETURNS string AS
BEGIN
  SET result = 'Cust ' | cust -- default in case Cust row does not exist
  SET result = FirstName | ' ' | LastName FROM dbo.Cust WHERE Id = cust
ENDj
/ShowTable�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE ba string SET ba = browse.backargs()

  DECLARE t int SET t = browse.tableid()

  DECLARE title string SET title = browse.TableTitle( t )
  SET title =�i/ShowSchema�() AS
BEGIN
  DECLARE cu int SET cu = login.get(1) IF "tring, options string

  FOR opt = '<option ' | CASE WHEN Id = sel THEN ' selected' ELSE '' END 
  | ' value=jnMsgName;(id int) RETURNS string AS
BEGIN
  SET result = '' | id
ENDm
MakeOrders�(n int) AS
BEGIN 
  DELETE FROM dbo.Order WHERE 1 = 1
  DECLARE date int SET date = date.DaysToYearMonthDay(date.Today())
  DECLARE @I int 
  SET @I=0 
  WHILE @I < n
  BEGIN 
    INSERT INTO dbo.[Order](Cust,Total,Date) VALUES(1+@I%�backurl�() RETURNS string AS
BEGIN
  DECLARE n int
  SET n = 1
  WHILE 1 = 1
  BEGIN
    DECLARE v string, pv string, bs string
    SET v = web.Query('b' | n )
    IF v = '' RETURN pv | bs

    IF pv != '' SET  bs = bs | '&b' | (n-1) | '='R" RETURNS string AS
BEGIN
  WHILE n > 0
  BEGIN
    SET result |= s
    SET n = n - 1
  END
ENDq	OneTest�() AS
BEGIN 
  DECLARE rtestdata int
  SET rtestdata = Id FROM sys.Schema WHERE Name = 'rtestdata'

  DECLARE r int
  SET r = x FROM rtest.Gen
  SET r = r * 48271 % 2147483647
  UPDATE rtest.Gen SET x = r WHERE true

  DECLARE sql string, a �pSent�(id int) AS
BEGIN
  DELETE FROM email.Queue WHERE msg = id

  -- Test retry.
  -- EXEC email.LogSendError( id, 1, 'Testing retry!' )
ENDo	MsgSelect�( colId int, sel int ) RETURNS string AS
BEGIN
  DECLARE col string SET col = Name FROM sys.Column WHERE Id = colId

  DECLARE opt s"EN ' selected' ELSE '' END 
  | 'LuSmtpAccountName>(id int) RETURNS string AS
BEGIN
  SET result = '' | id
ENDt
hashS(s string) RETURNS binary AS
BEGIN
  SET result = ARGON(s,'pomesoft saltiness')
ENDs
get�( role int ) RETURNS int AS
BEGIN
  /* Get the current logged in user. Note: role is not yet checked */

  DECLARE username string SET username = web.Form('username')

  /*
     Login is initially disabled. Remove or comment out the lmr	repeatq( s string, n int )" sys.Column WHERE Id = colId
  DECLARE size int
  SET size = InputCols FROM browse.Column WHERE Id = colId
  IF size = 0 SET size = 20
  RETURN�
xRun�() AS 
/* 
  This function is called by the Rust program.
  The time interval (in milliseconds) is set using the built-in SLEEP function.
*/
BEGIN 

  DECLARE now int SET now = date.Ticks()

  DECLARE f string, a int
  FOR f = fn, �wLogSendError�( id int, retry int, error string ) AS

BEGIN
  DELETE FROM email.Queue WHERE msg = id

  IF retry = 0
  BEGIN
    INSERT INTO email.SendError( msg, error, time )
    VALUES ( id, error, date.Ticks() )
  END
  ELSE
  BEGIN
    IN�vSmtpAccountSelect�( colId int, sel int ) RETURNS string AS
BEGIN
  DECLARE col string SET col = Name FROM sys.Column WHERE Id = colId

  DECLARE opt string, options string

  FOR opt = '<option ' | CASE WHEN Id = sel TH"�() AS 
BEGIN 
  /* Set sleep time based on timed.Job table */

  DECLARE now int, next int
  SET now = date.Ticks()

  SET next = now + 24 * 3600 * 1000000 -- 24 hours

  DECLARE t int
  FOR t = at FROM timed.Job
  BEGIN
    IF ty{Retry�() AS 
BEGIN 
  DECLARE now int SET now = date.Ticks()
 
  -- Find a Delayed email that is due to be sent.
  -- Transient failures are retried after 600 seconds = ten minutes. 
  DECLARE id int, t int, r int
  FOR id = Id, t = time + �
zStringToTime�( s string ) RETURNS int AS
BEGIN
  -- Typical input is 'Feb 2 2020 20:15:31'
  DECLARE month int, day int, year int, hour int, min int, sec int

  DECLARE ms string
  SET ms = SUBSTRING( s, 1, 3 )
  SET month = CASE 
    WHEN ms = '�y	InputTime�( colId int, value int) RETURNS string AS 
BEGIN 
  DECLARE cn string 
  SET cn = Name FROM"
END�tablearg�( t int ) RETURNS string AS
BEGIN
  DECLARE sid int, s string, n string
  SET n = Name, sid = Schema FROM sys.Table WHERE Id = t
  SET s = Name FROM sys.Schema WHERE Id = sid
  RETURN 's=' | s | '&n=' | n
END�tableid�() RETURNS int AS
BEGIN
  DECLARE sname string, tname string, sid int, tid int
  SET sname = web.Query('s')
  SET tname = web.Query('n')

  SET sid = Id FROM sys.Schema WHERE Name = sname

  SET tid = Id FROM sys.Table WHERE Schema =Q}/GetTransaction�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE k int SET k = PARSEINT( web.Query('k') )

  DECLARE id int, d binary

  SET id = Id, d = data FROM log.Transaction WHERE Id = k

  IF id = k 
    SELz	|Sleep"

    IF t < 6 SET filter = CASE 
       WHEN t = 1 THEN ' WHERE Id != 1' -- Sys
       WHEN t = 2 THEN ' WHERE Id > 6' -- Table
       WHEN t = 3 THEN ' WHERE Table > 6' -- Field
��/ScriptExact�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  EXEC web.SetContentType( 'text/plain;charset=utf-8' )

  DECLARE t int
  FOR t = Id FROM sys.Table
    EXEC sys.ScriptData(t,1)
END�fieldid�() RETURNS int AS
BEGIN 
  DECLARE t int SET t = browse.tableid()
  DECLARE fname string SET fname = web.Query('f')
  DECLARE f int SET f = Id FROM sys.Column WHERE Table = t AND Name = fname
  RETURN f
END�fieldarg�(f int) RETURNS string AS
BEGIN
  DECLARE t int, fname string
  SET t = Table, fname = Name FROM sys.Column WHERE Id = f
  RETURN browse.tablearg(t) | '&f=' | fname
"�6�	UrlEncode�( s string ) RETURNS string AS
BEGIN
  /* Would probably be better to do this using builtin function */
  SET s = REPLACE( s, '%', '%25' )
  SET s = REPLACE( s, '&', '%26' )
  SET s = REPLACE( s, '=', '%3D' )
  --SET s = REPLACE( s, '?��backargs�() RETURNS string AS 
BEGIN 
  DECLARE keep string

  /* Cleaner approach would be to iterate over all query args except b[n] */
  DECLARE n int, v string
  SET n = 1
  WHILE n < 6
  BEGIN
    DECLARE name string
    SET name = CAS{�	/VerifyDB�() AS
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  EXEC web.Head('Verify database')

  SELECT '<p>' | VERIFYDB()

  EXEC web.Trailer()
END�
ScriptData�( t int, mode int ) AS
BEGIN
    DECLARE filter string
`sys
datehtmwebbrowsehandlerdboemail	rtest
login	timedlog`sysdatehtmwebbrowsehandlerdboemail
	rtest
login	timedlog4A:5;9><:=>+3?@A?=CDDE8CFEG@BHLto�8(1title�2body�313format5
msgC628xC9Name�75:HashedPassword�;server�@4<username�=password�;9>accountC?statusC>:@msgCAerror�?=CtimeCDfn�B<EatCFmsgCDAGerror�HtimeCECLdata�fersToCDefault�	InputColsC
InputFunction�	InputRowsCStyleCDisplayFunction�
ParseFunction� 	NameFunction�0!	SelectFunction�"	DefaultOrder�#!#	Title�$	Description�&"%	RoleC&
	FirstNameZ'%'
LastName�(
AgeC,$)
City�*
x+)+CustC,TotalC.*-DateC.InfoJ/-/from�0
H		�$
	
+
-35
6>@CEFH
C�date.MiEdate.Ticks()�browse.�date.Mi�date.StFH�date.Mi+
-�date.Da�browse.�date.Ye�date.St3�0 means	56date.Ticks()�date.Mi
>@�$sys.TypeName
 ��p��bF��cG��dHT�eIyfJ�gK$
hL�"6k$\�#]$^-#_7'g�%ip.�i[0�j\K/�k]�/�l^�.�m_�2�n`�1�oa$:�p�;�:p;�:�>&@='�EUD n���1#��2$���3%��4&A��5'K��6(���7)���3�_� ��"��#��+��,8�YT��~U�V���W���X ���Y!T��Z"���������8��]��g������M?O?N@{@OA�APBBQCJRD�KSETx
�/����� ��G�Cs�[�c8��;9	��<:���>=L�����'��������ǚ�h�����DۢE	L�F
q�G{�O�P
��}c�������%��/��а�h��*�+C�,��-ٹ.�
/��0�;��a��bh�c��e��l8�.��n�iL�h%��*�g�f%���eđd%����b��a%��^�`<�_%���^��]%��֐\��Z%����Yp�X%��N�W,�V%��
�U�T%��ƏS��R%����Q`�P%��>�O�N%����M؎L%����K��J%��r�IP�H%��.�G�F%���EȍB%�Ǧ�A��@%��b�?@�>%���=��<%��ڌ;��:%�ϖ�9t�8%��R�70�6%���5�4%��ʋ3��2%�׆�1d�0%��B�/ �.&����-܊,%�ݺ�*+.�D��%dl"����%ikޙ����%jn���x��%moV��4��%hx����%qsΘ����%rv���h��%uwF��$��%t|�����%y{������%z~z��X��%}6����%@���Ж�%��������%��j��H��%��&����%�������%�����|��%��Z�8�~%���}��|%��Ҕ{��z%����yl�x%��J�w(�v%���u�t%��“s��r%��~�q\�p%��:�o�n%����mԒl&����k��j%.�<��%*.�����%-/֡����%(8���p��%13N��,��%26
����%57Ơ����%4<���`��%9;>����%:>���؟�%=?������% `r��P��%AC.����%BF��Ȟ�%EG������%DLb��@��%IK�����%JNڝ����%MO���t��%HXR��0��%QS����%RVʜ����%UW���d��%T\B�� ��%Y[���ܛ�%Z^������%]_v��T��%Pp2����%ac��̚�%bf������%egf�.4�'���&�%��Ω$��#����"h�!��F� $�������������z�X���6��!���Ч%����%j�H�%&��%�
��%	��|�
%
Z�	8�%
���%ҥ��%��l�%J�(�%����%¤����%~��\��%:����%���ԣ�%0������%!#n��L��%"&*����%%'��Ģ�%$,������%)+^�.,�i��
�h�g��Ʊf��e����d`�c��>�b�a����`ذ_����^��]��r�\P�[��.�Z�Y���XȯW�Ǧ�V��U��b�T@�S���R��Q��ڮN��M�ϖ�Lt�K��R�J0�I���H�C��ʭB��A�׆�@d�?��B�> �=����<ܬ;�޺�:��9��v�8T�7��2�6�5���4̫3�檫2��1��f�0D�/��"�.�-��ު,��+�*x�)��V�(.��t|����y{������z~z��X��}6����@���и�����������j��H����&����������������|����Z��8�����������Ҷ���������l����J��(����������µ������~��\����:��������Դ~����|��{��n�zL�y��*�x�w���viju����t��s��^�r<�q���p��o��ֲn��m����lp�k��N�j.�:>������=?������ `r��P��AC.����BF������EG������DLb��@��IK�����JNڿ����MO���t��HXR��0��QS����RVʾ����UW���d��T\B�� ��Y[���ܽ�Z^������]_v��T��Pp2����ac��̼�bf������egf��D��dl"����ik޻����jn���x��moV��4��hx����qsκ����rv���h��uwF��$.����*��)��(��'j�&H�%&�$�#��"��!	�� |�
Z�8�
���������l�J�(��������~�\�:����
��	0����!#n�L�"&*���%'������$,������)+^��<��*.�����-/������(8���p��13N��,��26
�����57������4<���`��9;>���7����k��j%����i��h%��b�g@�f%���d��`%����_��^%����]t�\%��R�[0�Z%���Y��X%����W��V%����Ud�T%��B�S �R%����Q��P%����O��N%��v�MT�L%��2�K�J%����I��H%�ê�G��F%��f�ED�D%��"�C�B%����A��@%�˚�?x�>%��V�=4�<%���:��9%����8��7%�ӊ�6h�5%��F�4$�3%���2��1%�ھ�0��/&��z�.X�-%��6�,-7����%dl���|��%ikZ��8��%jn�����%mo������%hx���l��%qsJ��(��%rv�����%uw������%t|~��\��%y{:����%z~������%}������%@�n��L��%��*����%��������%��������%��^��<��%�������%��������%�����p��%��N�,�~%��
�}��|%����{��z%����y`�x%��>�w�v%����u��t%����s��r%��r�qP�p&��.�o�m%7����%*.���t��%-/R��0��%(8�����%13������%26���d��%57B�� ��%4<������%9;������%:>v��T��%=?2����% `������%AC������%BFf��D��%EG"����%DL������%IK���x��%JNV��4��%MO�����%HX������%QS���h��%RVF��$��%UW�����%T\������%Y[z��X��%Z^6����%]_������%Pp������%acj��H��%bf&����%eg��7��.����-l�*��J�)(�(���'��&����%��$��~�!\���:��������������!��n�L�%*��%����%����%^�<�%	�
��%
����
%
��	p�%N�,�%
���%����%��`�%>����%������%������%r��P��%0.����%!#������%"&������%%'b��@��%$,�����%)+��7��k����jd�i��B�h �g����f��e����d��c��v�bT�a��2�`�_����^��]�ê�\��[��f�ZD�X��"�W�V����U��T�˚�Sx�R��V�Q4�P���O��N����M��L�ӊ�Kh�J��F�I$�H���G��F�ܾ�E��D��z�CX�B��6�A�@����?��>���=��<��j�;H�:��&�9�8����7��6���5|�4��Z�38�2���1��0����/7��t|~��\��y{:����z~������}������@�n��L����*����������������������^��<����������������������p����N��,����
������������������`����>����������������������r��P����.���}����|��{����z��y��b�x@�w���v��u����t��s����rt�q��R�p0�o���n��m����l7�:>v�T�=?2�� `����AC����BFf�D�EG"��DL������IK���x��JNV��4��MO�����HX������QS���h��RVF��$��UW�����T\������Y[z��X��Z^6����]_������Pp������acj��H��bf&����eg������dl���|��ikZ��8��jn�����mo������hx���l��qsJ��(��rv�����uw����7��n	,L	+*	*	)�(�'�&�%^$<#	"�!
� �
�pN,
����`>����r
P0.
!#�	�"&��%'b@$,�)+��*.��t�-/R�0�(8���13����26��d�57B� �4<����9;���