rustweb2 0.27.0

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
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445

.����������+������A9s�*R &/+G,_-'�;HIJKLMNOPQRSTUV�_sys��
\]`c(
6Ql"�(`sys�
'^���!���������@��������C/favicon.icoimage/x-icon�?#/favicon.ico����������&abcdefgh��hXYZ��date.Ticks()�browse.f�[�W����������./012345�$ !"#$%�yz{|}~��&'()*+,-�qrstuvwx#�:` ?@ABCDEFG3/6789:;<=>����ijklmnopT6���������������"#$%����` ���������` ���������` ��������� (�Name�RootCSchemaCName�IdGenCTableCName�TypeC	RootC
TableC	Name�IndexC

ColIdCSchemaC
NameDef�Path�ContentType�Content�PositionCLabel�Description�RefersToCDe(�
	


	2	$	  	!
-"
##
$
%"%
&&
'(/())*+,*,-'1./0.01
+32!<34456�&SchemaTableColumnFIndex	IndexColumn	Function�FileColumnF	Datatype
Table	DelayedMsg

Queue 	SendError
!SmtpAccount#user$Job%Transaction)
Person��&SchemaTableColumnIndexIndexColumnFunctionFileColumn	Datatype

TableDelayed	
Msg
Queue	SendErrorSmtpAccountuserJobTransaction
PersonP		

P		

@
ByNameBySchemaNameByTable
ByTableByIndexBySchemaNameByNameByPath
@��� THEN '''ALLOCPAGE()'''
    ELSE Name
  END
  FROM sys.Column WHERE Table = table
    SET result |= '|'',''|' | col
  RETURN result
ENDYN '(' | list | ')'
ENDR sid EXECUTE( 'DROP FN ' | sys.Dot(schema,name) )
  FOR name = Name FROM sys.Table WHERE Schema = sid EXECUTE( 'DROP TABLE ' | sys.Dot(schema,name) )
  DELETE F	ROM sys.Schema WHERE Id = sid
ENDG	
' | sys.TableName(t) | sys.IndexCols(ix) | '
GO
'
  END
ENDU
= 8 THEN 'Aug'
    WHEN m = 9 THEN 'Sep'

    WHEN m = 10 THEN 'Oct'
    WHEN m =
 11 THEN 'Nov'
    WHEN m = 12 THEN 'Dec'
    ELSE '???'
  END
ENDN( days + i )
    SET i = i + 1
  END
END@
  SELECT 'Finished test day=' | day | ' date=' | date.DaysToString(day)
ENDD ELSE '?weekday?'
    END
ENDKlink rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<title>' | title | '</title>
<style>
   body{font-family:sans-serif;}
</style>
</head>
<body>
'
ENDcC web.SetCookie('username','','Max-Age=0')
  */
  DECLARE x int
  SET x = HEADER( 'set-cookie', name | '=' | value | '; ' | expires )
ENDWsplayFunction[' | k | ba | '">Add</a>'

  EXECUTE( browse.ChildSql( colid, k, ba ) )

ENDE0 e = table
  ORDER BY browse.ColPos(Id), !Id
  BEGIN
    SET result |= CASE WHEN r#!"esult = '' THEN '' ELSE ', ' END | col
 # END
END`&"$   WHEN type % 8 = 4 THEN 8 /* float */
%       ELSE 0
    END
ENDO'%&    WHEN type % 8 = 5 THEN 6 /* bool */
'       WHEN type % 8 = 1 THEN 9 /* binar,$(y - todo */
       WHEN type % 8 = 4 THE)N 8 /* float */
       ELSE 0
    END
  +)*END
ENDa+ ELSE '' END | '>'
ENDR.*,l(colId) | '<input id="' | cn | '" name=-"' | cn | '" size=' | size | ' value=' |/-. web.Attr(date.MicroSecToString(value)) /| '>'
END_8(0.Label(colId) | '<input id="' | cn | '" 1name="' | cn | '" size=' | size | ' valu312e=' | web.Attr(date.YearMonthDayToString3(value)) | '>'
ENDV624EATTR(x,1)
    IF name = '' BREAK
    SE5T x = x + 1
  END    
  RETURN ''
ENDC756ql = CASE 
      WHEN colid = pc THEN ''7 | p
      ELSE browse.Sql( 5, colid, br<48owse.GetDatatype(type,colid) )
    END

9    IF sql != '' 
    BEGIN
       SET v;9:list |= CASE WHEN vlist = '' THEN '' ELS;E ' , ' END | sql
       SET names |= CA>:<SE WHEN names = '' THEN '' ELSE ' , ' EN=D | name
    END
  END

  RETURN 'INSERT?=> INTO ' | sys.TableName( table ) | '(' |? names | ') VALUES (' | vlist | ')'
ENDA` @ name | '>' | label | '</label>: '
ENDBATURN old
END\CAB ' END
      | sys.QuoteName(col) | ' = C' 
      | browse.Sql( 6, colId, browse.FBDGetDatatype(type,colId) )
  END
  RETURNE 'UPDATE ' | sys.TableName( table ) | ' GEFSET ' | alist | ' WHERE Id =' | k
ENDCGEncode(pv)
    SET pv = v

    SET n = nLDH + 1
  END
ENDZI Name = tname

  RETURN tid
ENDIKIJSqlInteger^KSqlString_NJLSqlPassword]MSqlBinary_OMNSqlContentTypeZOSqlFileName]XHPSqlVersionCheckYQnext = t
  END

  DECLARE dummy int
  SESQRT dummy = SLEEP( next-now )
ENDISE
  BEGIN
    DECLARE dummy int SET dummVRTy = TRANSWAIT()
  END
ENDOU FOR s = Id FROM sys.Schema
    EXEC sysWUV.ScriptSchemaBrowse(s)
ENDNW
  DECLARE mode int SET mode = CASE WHEN\TX sys.IncludeSchema(1,sname) THEN 1 ELSE Y2 END

  EXEC sys.ScriptSchema(s,mode)

[YZ  EXEC sys.ScriptSchemaBrowse(s)

ENDC[
    EXEC sys.ScriptSchema(s,mode)
  FOR^Z\ s = Id FROM sys.Schema WHERE sys.Includ]eSchema(mode,Name)
    EXEC sys.ScriptSc_]^hemaBrowse(s)
ENDW_SchemaSelect\pP`TableSelect]aDatatypeName\cabDatatypeSelectZc body is plain text, 1 means HTML.FfbdmtpAccountNameZemtpAccountSelectXgefInputTime_gGordon FairbrotherVldh me. Married August 11, 1991.Ki: Hannah Lindo ( New Zealand )JkijFairbrother]k Towcester ( Alzheimers ). Born Fakenhamnjl.gmys House, Everdon, Daventry, Northamptonomnshire, NN11 BBLYoRichard Smale[xhp a second time to Lucy nee Dumpleton.

q
Her children from previous marriage Edwsqrard, Robin ( partner Amanda ) + daughters Kate married to Tyrone with sons Nathanvrt and ...`u  ��atherine Decem 2d 1723;
Lady Charlotte, Sept 21, 1726.��0th 1708;
Lady Mary, Febr 6th 1712;
Lady Anne June 5th, 1713;
Lady Elizabeth Febr 14, 1717;
Lady Jean Jan 28, 1719;
Lady K�20;
Lord Charles, July 7th, 1721;
Lord Lewis, December 22d 1724;
Lord Adam, January 10th, 1728;
Lady Henrietta born March 1�on Gordon
1713–1791

Cosmo George Gordon
1720–1752

11 children

Cosmos George, Marquis of Huntly,born April 27, 17�7–1709

Siblings
Henry Mordaunt
unknown–1710

John Mordaunt
1681–1710

George Mordaunt
1685–1685

Anne Gord�/www.findagrave.com/memorial/133355131/henrietta-gordon

Parents
Charles Mordaunt
1658–1735

Carey Fraser Mordaunt
165�Stephen Hedley b. 1895. and 5 sisters:
Ethel b. 1885, Margaret b. 1889, Sarah b. 1892, Elspith b. 1900, Muriel b. 1909
F�shop Auckland, Durham.

Married 15th April 1914.

1939 census : unpaid domestic duties, Threeways, Morpeth.

Had brother �fe. Arrived 30 June, Southampton.

��, was on boat (Dutch ship Piepercorneliszoonhooft, Netherland Royal Mail Line) from Surabaya, Indonesia to England, with his wi	�ather Robert Gordon, age 47. Living in Elgin, Moray, Scotland.

Freemason, Waterloo Lodge, Blythe.

Born Edinburgh.

1928�rthumberland

Lived Blythe, Morpeth, Doctor.

Left £47,489.

Married 1914, Sunderland, Durham.

1891 census : age 7, f
�urner per 1891 census. 

Born January 1847, Thetford, Norfolk.

Died March 1923, Norwich.b�mary Edinburgh ).Registered to vote 1955, Stert Street, Abingdon.( 65 Stert Street )k
� April 1946. TynemouthQualified as a nurse, 23 June 1944 ( registered with General Nursing Council for Scotland, at Royal Infir�   | options 
    | '<option ' | CASE WHEN sel = 0 THEN ' selected' ELSE '' END | ' value=0></option>'
    | '</select>'
END@;�le
  ORDER BY Firstname, Surname
  SET options = options | opt

  RETURN '<select id="' | col | '" name="' | col | '">' 
 �SE '' END 
    | ' value=' | Id | '>' | web.Encode( famt.PersonName(Id) ) | '</option>'
  FROM famt.Person
  WHERE Male = ma�= '' SET k = Id FROM famt.Person WHERE Id = PARSEINT(ks)  
  
  FOR opt = '<option ' | CASE WHEN Id = sel THEN ' selected' EL�wString() | ' UTC</div>'
END��ef=/login-logout>Logout</a>
| <a target=_blank href="/admin-EditFunc?s=' | sname | '&n=' | web.Path() | '">Code</a> ' | date.No�END | '
<a href=/admin>Admin Home</a> 
| <a target=_blank href=/admin>New Window</a>
| <a href=/admin-Manual>Manual</a>
| <a hr�yle="color:white;background:lightblue;padding:4px;">
' | CASE WHEN back != '' THEN '<a href="' | back| '">Back</a> | ' ELSE '' �title>' | title | '</title>
<style>
   body{font-family:sans-serif;}
   body{ max-width:60em; }
</style>
</head>
<body>
<div st�-equiv="Content-type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<�RE Name = path
  DECLARE sname string SET sname = Name FROM sys.Schema WHERE Id = schema
  

  SELECT '<html>
<head>
<meta http�  END
  SELECT '<p>' | n | ' functions checked, errors=' | err | '.'
  EXEC admin.Trailer()
END`�'' 
      BEGIN
        SELECT '<br>Error : ' | web.Encode(ex)
        SET err = err + 1
      END
      SET n = n + 1
    END
�name | '.' | fname
      EXECUTE( 'CHECK ' | sname | '.' | fname )
      DECLARE ex string SET ex = EXCEPTION()
      IF ex != �
  BEGIN
    FOR fname = sys.QuoteName(Name) FROM sys.Function WHERE Schema = sid
    BEGIN
      -- SELECT '<br>Checking ' | s� | ' FROM sys.Schema ORDER BY Name

   EXEC admin.Trailer()
END��heckAll>Check all functions compile ok</a> 
<h3>Schemas</h3>'

   SELECT '<a href=/admin-Schema?s=' | Name | '>' | Name | '</a>0�arget=_blank href=/admin-ScriptSystem>Script System</a>    
  | <a target=_blank href=/log-getall>Exact</a>
<p><a href=/admin-C�r>Logins</a>
<p><a href=/browse-Table?s=web&n=File>Files</a>
<p><a target=_blank href=/admin-ScriptAll>Script All</a> 
  | <a t!#�M timed.Job
  BEGIN
    IF now >= a
      EXECUTE( 'EXEC ' | f | '()' )
  END
   
  EXEC timed.Sleep()
ENDU�(uid) = 0 RETURN 0
      RETURN uid
    END
  END
  RETURN 0
END"&�ARE hpwt binary SET hpwt = HashedPassword FROM login.user WHERE Id = uid
    IF hpwf = '' | hpwt 
    BEGIN
      IF web.SetDos�Cookie('uid')
  DECLARE hpwf string SET hpwf = web.Cookie('hpw')

  IF uids != ''
  BEGIN
    SET uid = PARSEINT(uids)
    DECL%'�pw', '' | hpw, '' )
      IF web.SetDos(uid) = 0 RETURN 0
      RETURN uid
    END
  END

  DECLARE uids string SET uids = web.� AND HashedPassword = hpw
    IF uid > 0
    BEGIN
      EXEC web.SetCookie( 'uid', '' | uid, '' )
      EXEC web.SetCookie( 'h$,�me = username
    DECLARE hpw binary SET hpw = login.hash( password|result )
    SET uid = Id FROM login.user WHERE Id = result�'
    EXEC admin.Trailer()
  END
  RETURN uid
END�)+�=post>User Name <input name=username><br>Password <input type=password name=password><br><input type=submit value=Login></form>�abled.

  DECLARE uid int
  SET uid = login.user()
  IF uid = 0
  BEGIN
    EXEC admin.Head( 'Login' )
    SELECT '<form method*.�d has been setup for some user.
     In addition, the salt string in login.Hash should be changed.
  */
  RETURN 1 -- Login dis�ext = now + 10 * 1000000

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

ENDg-/� < next SET next = t
  END
 
  -- Minimum time for next call to email.Retry is 10 seconds.
  IF next < now + 10 * 1000000 SET n�try.
  DECLARE next int SET next = now + 24 * 3600 * 1000000
  FOR t = time + 600 * 1000000 FROM email.Delayed
  BEGIN
    IF t(4�l.Queue( msg ) VALUES ( m )
    DECLARE dummy int SET dummy = EMAILTX()
  END

  -- Calculate time to for next call to email.Re�  DECLARE m int
    SET m = msg FROM email.Delayed WHERE Id = r
    DELETE FROM email.Delayed WHERE Id = r
    INSERT INTO emai13�000000 FROM email.Delayed 
  BEGIN
    IF now >= t
    BEGIN
      SET r = id
      BREAK
    END
  END

  IF r != 0
  BEGIN
  �th time for next retry.
    EXEC timed.Sleep() -- Set sleep time based on timed.Job table.
  END
END[28�ail.Delayed( msg, error, time )
    VALUES ( id, error, date.Ticks() )
    EXEC email.Retry() -- Will update timed.Job table wi�e RETURN FILEATTR(x,1)
    IF name = '' BREAK
    SET x = x + 1
  END    
  RETURN old
ENDe57�s.SingleQuote(Name) | ')))' 
     ELSE 'SqlIntegerBADKIND'
   END

   FROM sys.Column WHERE Id = colid
ENDU�)' 
     WHEN kind = 5 THEN  'date.Ticks()'
     WHEN kind = 6 THEN  'browse.VersionCheck(' | Name | ',PARSEINT(web.Form(' | sy69�String(' | Name | ')'
     WHEN kind = 3 THEN  ''
     WHEN kind = 4 THEN  'browse.InputVersionCheck(' | colid | ',' | Name | ':�(web.Form(' | sys.SingleQuote(Name) | '))' 
     ELSE 'SqlTimeBADKIND'
   END

   FROM sys.Column WHERE Id = colid
ENDI�ps://www.findagrave.com/memorial/186435802/jessie-robertson

"Natural daughter of Alexander, Duke of Gordon (FES, Vol 6, p 31?�0)."

and

https://archive.org/stream/fastiecclesiaesc06scot#page/310/mode/2upm�/www.telegraph.co.uk/news/obituaries/2979212/Group-Captain-Tony-Barwood.html

Daughters Kate 1947 and Netta 31 Mar 1949.

M><�arried Nora Cotton in 1946.

Had previous wife, Nancy, married briefly in 1939.n� Sarah Robinson, b. 1773 Helmdon, d. 1816 Helmdon.

Married Sarah, 1830, Helmdon, b. 1790 d. 1845.[A=�rnstable.

Baby due in September 2020.

Olivia Grace, born 3:42am on Oct 3, 2020. 7lb 7oz.

Mother Vicky.P�A degree in 1898, Royal Holloway and Bedford College, London University.

First women's college, founded 1849. 

Probate : C@�18 Mar 1938, £2,458 9s 1p

Executors: Winnifred Dorathea Phillips and Frank Edgar Barwood ( brother ).V� Audrey Jean Scott in 1957. Sons Iain Scott Cullen (b. Jun 14, 1959), and Derek. Died in Malahyde, Co. Dublin, IrelandIDB� Mebrat Yemane (b. Jan 24 1933) on Feb 28 1970. Children Daniel Mikail (b. Apr 23, 1972) and Peter Mark (b. Aug 8, 1974)G�try.
  DECLARE next int SET next = now + 24 * 3600 * 1000000
  FOR t = time + 600 * 1000000 FROM email.Delayed
  BEGIN
    IF tFD� < next SET next = t
  END
 
  -- Minimum time for next call to email.Retry is 10 seconds.
  IF next < now + 10 * 1000000 SET n�ext = now + 10 * 1000000

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

ENDgIE�d has been setup for some user.
     In addition, the salt string in login.Hash should be changed.
  */
  RETURN 1 -- Login dis�abled.

  DECLARE uid int
  SET uid = login.user()
  IF uid = 0
  BEGIN
    EXEC admin.Head( 'Login' )
    SELECT '<form methodJH�* �t�    WHEN kind = 4 THEN   'browse.InputTime(' | colid | ',' | Name | ')'
     WHEN kind = 5 OR kind = 6 THEN  'date.StringToTime�nd = 2 THEN 'date.MicroSecToString(' | Name | ')'
     WHEN kind = 3 THEN   'browse.InputTime(' | colid | ',' | default | ')'
 � '' THEN 'date.Ticks()' ELSE Default END
   FROM browse.Column WHERE Id = colid
 
   SET result = CASE
     WHEN kind = 1 OR ki�| '))' 
     ELSE 'SqlIntegerBADKIND'
   END

   FROM sys.Column WHERE Id = colid
ENDj�rowse.InputInt(' | colid | ',' | Name | ')' 
     WHEN kind = 5 OR kind = 6 THEN  'PARSEINT(web.Form(' | sys.SingleQuote(Name) � 1 OR kind = 2 THEN Name 
     WHEN kind = 3 THEN  'browse.InputInt(' | colid | ',' | default | ')'
     WHEN kind = 4 THEN  'b�ault FROM browse.Column WHERE Id = colid
      IF default = '' SET default = '0'
   END
 
   SET result = CASE
     WHEN kind =�s.SingleQuote(Name) | ',' |* Name | ')' 
     ELSE 'SqlFileBADKIND'
   END

   FROM sys.Column WHERE Id = colid
ENDM�     WHEN kind = 5 THEN  'browse.InsertFile(' | sys.SingleQuote(Name) | ')' 
     WHEN kind = 6 THEN  'browse.UpdateFile(' | sy�HEN kind = 2 THEN 'browse.ShowImage(Id,' | colid | ')'
     WHEN kind = 3 OR kind = 4 THEN   'browse.InputFile(' | colid | ')'
	�' | sys.SingleQuote(Name) | '))' 
     ELSE 'SqlFloatBADKIND'
   END

   FROM sys.Column WHERE Id = colid
ENDR�HEN kind = 4 THEN  'browse.InputDouble(' | colid | ',' | Name | ')' 
     WHEN kind = 5 OR kind = 6 THEN  'PARSEFLOAT(web.Form(
�E
     WHEN kind = 1 OR kind = 2 THEN Name 
     WHEN kind = 3 THEN  'browse.InputDouble(' | colid | ',' | default | ')'
     W�ault FROM browse.Column WHERE Id = colid
      IF default = '' SET default = 'PARSEFLOAT(''0.0'')'
   END
 
   SET result = CAS
� | ')' 
     ELSE 'SqlFileBADKIND'
   END

   FROM sys.Column WHERE Id* = colid
ENDm�.InsertFile(' | sys.SingleQuote(Name) | ')' 
     WHEN kind = 6 THEN  'browse.UpdateFile(' | sys.SingleQuote(Name) | ',' | Name�ink(Id,' | colid | ')'
     WHEN kind = 3 OR kind = 4 THEN   'browse.InputFile(' | colid | ')'
     WHEN kind = 5 THEN  'browse�entType(' | colid | ',' | Name | ')'
     ELSE 'SqlContentTypeBADKIND'
   END

   FROM sys.Column WHERE Id = colid
ENDI�nd = 4 THEN  '' 
     WHEN kind = 5 THEN  'browse.InsertContentType(' | colid | ')'
     WHEN kind = 6 THEN  'browse.UpdateCont�eQuote(web.Encode(' | Name | '))' 
     WHEN kind = 2 THEN 'web.Encode(' | Name | ')' 
     WHEN kind = 3 THEN  ''
     WHEN ki�owse.Column WHERE Id = colid

   IF default = '' SET default = ''''''
 
   SET result = CASE
     WHEN kind = 1 THEN 'sys.Singl�gleQuote(Name) | '))' 
     ELSE 'SqlBoolBADKIND'
   END

   FROM sys.Column WHERE Id = colid
END*^�EN  'browse.InputBool(' | colid | ',' | Name | ')' 
     WHEN kind = 5 OR kind = 6 THEN  'browse.ParseBool(web.Form(' | sys.Sin�nd = 1 OR kind = 2 THEN Name 
     WHEN kind = 3 THEN  'browse.InputBool(' | colid | ',' | default | ')' 
     WHEN kind = 4 TH�ault FROM browse.Column WHERE Id = colid
      IF default = '' SET default = 'false'
   END
 
   SET result = CASE
     WHEN ki� 
     ELSE 'SqlBinaryBADKIND'
   END

   FROM sys.Column WHERE Id = colid
ENDq�browse.InputString(' | colid | ',' | Name | ')' 
     WHEN kind = 5 OR kind = 6 THEN  'web.Form(' | sys.SingleQuote(Name) | ')'�WHEN kind = 2 THEN Name
     WHEN kind = 3 THEN  'browse.InputString(' | colid | ',' | default | ')'
     WHEN kind = 4 THEN  '�owse.Column WHERE Id = colid

   IF default = '' SET default = ''''''
 
   SET result = CASE
     WHEN kind = 1 THEN Name
     �me(kind,colid)
   �tsl(colId) | '<input type=number id="' | cn | '" name="' | cn | '" size=' | size | ' value=' | value | '>'
ENDSrse.Label(colid) | '<input id="' | cn | '" name="' | cn | '" size="' | size | '"' | ' value="' | value | '">'
ENDOqLabel(colid) | '<input id="' | cn | '" name="' | cn | '" size=' | size | ' value="' | value | '">'
ENDYp   END
  END
  RETURN CASE WHEN sql = '' THEN '' ELSE 'SELECT ' | sql END
ENDro',' | default | ')'
        END

    IF inp != '' 
    BEGIN
      SET sql |= CASE WHEN sql = '' THEN '' ELSE ' | ' END | inp
 nHEN browse.Sql( 3, colId, browse.GetDatatype(type,colId) )
        ELSE 'browse.Label(' | colId | ') | ' | inf | '(' | colId | mle WHERE Id = ref
    IF default = '' SET default = '0'   
 
    DECLARE inp string
    SET inp = CASE WHEN inf = '' 
        Tlion, default = Default FROM browse.Column WHERE Id = colId
    IF ref > 0 AND inf = '' SET inf = SelectFunction FROM browse.Tabk  DECLARE ref int, inf string, default string
    SET ref = 0, inf = '', default = ''
    SET ref = RefersTo,  inf = InputFunctj| CASE WHEN ob != '' THEN ' ORDER BY ' | ob ELSE '' END
   | ' SELECT ''</TABLE>'''
ENDh	ile) | '&k=''| Id | ''' | ba | '">Show</a> '''
     | result | ' FROM ' | sys.TableName( table ) | ' WHERE ' | kcol | ' = ' | k hd
  RETURN 
   'SELECT ''<TABLE><TR><TH>' | th | ''' '
   | 'SELECT ' | '''<TR><TD><a href="/browse-Row?' | browse.tablearg(tab
gel != '' THEN label ELSE colName END
  END
  DECLARE kcol string SET kcol = sys.QuoteName(Name) FROM sys.Column WHERE Id = colIf'</a>''' 
        ELSE browse.Sql(2,colid,browse.GetDatatype(type,colid))
        END,
        th = th | '<TH>' | CASE WHEN lab
e= '' THEN '''<a href="/browse-Row?' | browse.tablearg(ref) | '&k=''|' | col | '|''' | ba | '">''|' | nf | '(' | col | ')' | '|'df
    SET result |= '|''<TD' | CASE WHEN type % 8 != 2 THEN ' align=right' ELSE '' END | '>''|'
      | CASE 
        WHEN nf !c    IF ref > 0 SET nf = NameFunction FROM browse.Table WHERE Id = ref
    SET ob = DefaultOrder FROM browse.Table WHERE Id = rebg, label string
    SET ref = 0, nf = '', label = ''
    SET ref = RefersTo, label = Label FROM browse.Column WHERE Id = colid
ame
  FROM sys.Column WHERE Table = table AND Id != colId
  ORDER BY browse.ColPos(Id), Id
  BEGIN
    DECLARE ref int, nf strin`ble
  FOR colid = Id, type = Type,
    col = CASE WHEN Type % 8 = 2 THEN 'web.Encode(' | Name | ')' ELSE Name END, colName = Na_DECLARE table int SET table = Table FROM sys.Column WHERE Id = colId
  
  SET ob = DefaultOrder FROM browse.Table WHERE Id = ta^  RETURN CASE ' | f | '
    ELSE ''browseSqlInvalidDatatype'' 
    END 
END
'
  EXECUTE( sql )
END]]EC admin.Trailer()
END�\Id)
    | CASE WHEN orderBy != '' THEN ' ORDER BY ' | orderBy ELSE '' END
  FROM sys.Table WHERE Id = t

  EXECUTE( sql )

  EX[se-Row?' | browse.tablearg(t)
    | '&k=''| Id | ''' | ba |'">Show</a> '''
    | colvalues
    | ' FROM ' 
    | sys.TableName(ZrBy string SET orderBy = DefaultOrder FROM browse.Table WHERE Id = t
  DECLARE sql string SET sql ='SELECT ''<br><a href="/browYE colvalues string SET colvalues = browse.ColValues(t,ba)
  IF colvalues != '' SET colvalues = '|' | colvalues 

  DECLARE ordeXs.Index WHERE Table = t
*/
  SELECT '<p><b>Rows</b> <a href="/browse-AddRow?' | browse.tablearg(t) | ba | '">Add</a>'

  DECLARW | '">New Column</a>'
/*
  SELECT '<p><b>Indexes</b>'
  SELECT '<br>' | sys.QuoteName(Name) | ' ' | sys.IndexCols(Id)
  FROM syVs</a>'   
    | '<p><b>Columns:</b> ' | browse.ColNames( t, ba )
    | ' <a href="/browse-NewColumn?' | browse.tablearg(t) | baU' Table'
  EXEC admin.Head( title )
  SELECT '<b>' | title | '</b> <a href=/browse-Info?' | browse.tablearg(t) | ba | '>SettingTp>New Table Name: <input name=n> <input type=submit value="Ok"></form>' 

  EXEC admin.Trailer()

ENDZ0Sedirect( '/browse-Table?s=' | s | '&n=' | n )
    RETURN
  END

  EXEC admin.Head( 'New Table' )

  SELECT '<form method=post><Rpe=submit value=Save></form>'
    EXEC admin.Trailer()
  END
END!#Qame(k) )
    SELECT '<form method=post>' 
    EXECUTE( browse.FormUpdateSql( tid, k ) )
    SELECT '<p><input name="$submit" tyPweb.Redirect( '/browse-Table?' | browse.tablearg(k) )
  END
  ELSE
  BEGIN
    EXEC admin.Head( 'Browse Info for ' | sys.TableN"&O browse.Table( Id ) VALUES ( k )
  IF web.Form( '$submit' ) != '' 
  BEGIN
    EXECUTE( browse.UpdateSql( tid, k ) ) 
    EXEC Ne=submit value=Delete></form>'
  EXEC admin.Trailer()
END�%'Mk ) )
  SELECT '<p><input name="$submit" type=submit value=Save></form>'

  SELECT '<form method=post><input name="$submit" typLp>Error: ' | web.Encode(ex)

  SELECT '<form method=post enctype="multipart/form-data">'  
  EXECUTE( browse.FormUpdateSql( t, $,Kse.backurl() )
      RETURN
    END      
  END
 
  EXEC admin.Head( 'Edit ' | browse.TableTitle( t ) )
  IF ex != '' SELECT '<Jmit = 'Delete'
    BEGIN
      EXECUTE( 'DELETE FROM ' | sys.TableName( t ) | ' WHERE Id =' | k )
      EXEC web.Redirect( brow)+I()
      IF ex = '' 
      BEGIN
        EXEC web.Redirect( browse.backurl() )
        RETURN
      END
    END
    ELSE IF subH  IF submit != '' 
  BEGIN
    IF submit = 'Save'
    BEGIN
      EXECUTE( browse.UpdateSql( t, k ) ) 
      SET ex = EXCEPTION*.G	��	����	�����F��������	����`�7�7�`���-/E�]�����Z	���1�5	��D���(�*��	���R	�U��(4C���(�*������B�\�����X	���R	�U��13A��������	���3�7	��@�����������	���b	�8	�8�b	���28? ((  >F' )
  --SET s = REPLACE( s, '/', '%2F' )
  --SET s = REPLACE( s, '#', '%23' )
  RETURN s
ENDb57=   ELSE 335 -- Dec
    END
  SET dim = d - fdm
  SET m = ( d - dim + 28 ) / 31
  RETURN date.YearMonthDay( y, m+1, dim+1 )
ENDA<EN d < 244 THEN 213 -- Aug
    WHEN d < 274 THEN 244 -- Sep
    WHEN d < 305 THEN 274 -- Oct
    WHEN d < 335 THEN 305 -- Nov
 69; < 121 THEN 91 -- Apr
    WHEN d < 152 THEN 121 -- May
    WHEN d < 182 THEN 152 -- Jun
    WHEN d < 213 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 �t9, month, day ) )
  SET result = result * 24 * 60 * 60 + hour * 3600 + min * 60 + sec
  SET result = result * 1000000
ENDG8W 'Secondss must be 0..59 parsing time ' | web.Attr(''|sec)
  

  SET result = date.YearMonthDayToDays( date.YearMonthDay( year7utes must be 0..59 parsing time ' | web.Attr(''|min)
  SET sec = PARSEINT( SUBSTRING( s, six + 1, LEN(s) ) )
  IF sec > 59 THRO6..23 parsing time ' | web.Attr(''|hour)
  SET min = PARSEINT( SUBSTRING( s, mix + 1, six - mix - 1 ) )
  IF min > 59 THROW 'Min5yix + 1, hix - yix - 1 ) )
  SET hour = PARSEINT( SUBSTRING( s, hix + 1, mix - hix - 1 ) )
  IF hour > 23 THROW 'Hour must be 04 1) )
  IF day < 1 OR day > 31 THROW 'Day must be 1..31 parsing date ' | web.Attr(''|day)
  SET year = PARSEINT( SUBSTRING( s, 3
    IF SUBSTRING( s, six, 1 ) = ':' BREAK
    SET six = six + 1
  END
 
  SET day = PARSEINT( SUBSTRING( s, dix+1, yix - dix -2END

  DECLARE six int -- Index of colon before seconds string
  SET six = mix+1
  WHILE true
  BEGIN
    IF six > LEN(s) BREAK1T mix = hix+1
  WHILE true
  BEGIN
    IF mix > LEN(s) BREAK
    IF SUBSTRING( s, mix, 1 ) = ':' BREAK
    SET mix = mix + 1
  0 IF SUBSTRING( s, hix, 1 ) = ' ' BREAK
    SET hix = hix + 1
  END

  DECLARE mix int -- Index of colon before hour string
  SE	/ND

  DECLARE hix int -- Index of space before hour string
  SET hix = yix+1
  WHILE true
  BEGIN
    IF hix > LEN(s) BREAK
   . yix = dix+1
  WHILE true
  BEGIN
    IF yix > LEN(s) BREAK
    IF SUBSTRING( s, yix, 1 ) = ' ' BREAK
    SET yix = yix + 1
  E
- IF SUBSTRING( s, dix, 1 ) = ' ' BREAK
    SET dix = dix + 1
  END
  DECLARE yix int -- Index of space before year string
  SET,ttr(ms)
  DECLARE dix int -- Index of space beforee day string
  SET dix = 4
  WHILE true
  BEGIN
    IF dix > LEN(s) BREAK
   
+EN ms = 'Nov' THEN 11
    WHEN ms = 'Dec' THEN 12
    ELSE 0
  END  
  IF month = 0 THROW 'Unknown month parsing date ' | web.A*Jun' THEN 6
    WHEN ms = 'Jul' THEN 7
    WHEN ms = 'Aug' THEN 8
    WHEN ms = 'Sep' THEN 9
    WHEN ms = 'Oct' THEN 10
    WH)N 1
    WHEN ms = 'Feb' THEN 2
    WHEN ms = 'Mar' THEN 3
    WHEN ms = 'Apr' THEN 4
    WHEN ms = 'May' THEN 5
    WHEN ms = '(0
  SET hour = min / 60
  SET min = min % 60
  RETURN date.DaysToString(  day ) | ' ' | hour | ':' | min | ':' | sec
ENDG'day + 1
END�& - 1
    SET day = day + CASE WHEN date.IsLeapYear( year ) THEN 366 ELSE 365 END
  END
  RETURN 512 * ( cycle * 400 + year ) + % ..
  SET day = day - ( year + 3 ) / 4 + ( year + 99 ) / 100 - ( year + 399 ) / 400
  
  IF day < 0
  BEGIN
    SET year = year$... 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#65 -- Same as days % 365
  -- Need to adjust day to allow for leap years.
  -- Leap years are 0, 4, 8, 12 ... 96, not 100, 104 "= days / 146097
  SET days = days - 146097 * cycle -- Same as days % 146097
  SET year = days / 365
  SET day = days - year * 3!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  N t % 8 = 2 THEN 'string(' | (p-1) | ')'
       WHEN t % 8 = 3 THEN 'int(' | p | ')'
       ELSE '???'
    END
  END
ENDG THEN 'binary'
    WHEN t = 130 THEN 'string'
    ELSE 
    CASE 
       WHEN t % 8 = 1 THEN 'binary(' | (p-1) | ')'
       WHER t = Id FROM sys.Table WHERE Schema = s ORDER BY Name
      EXEC sys.ScriptData(t,mode)
  END
END]
GO
' 
  FROM sys.Function  WHERE Schema = s ORDER BY Name

  /******* Script Data *******/

  IF sname != 'sys'
  BEGIN
    FOsys.ScriptTable(t)
    END
  END

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

  SELECT '
CREATE FN ' | sys.Dot( sname,Name) | Def | 'oteName( sname ) | '
GO
'

    DECLARE t int
    FOR t = Id FROM sys.Table WHERE Schema = s ORDER BY Name
    BEGIN
      EXEC  

    EXECUTE( 'SELECT ''(''|' | sys.ColValues(t) | '|'')
''' | ' FROM ' | sys.TableName(t) | filter )

    SELECT 'GO
'
ENDB0ERE false'
        ELSE '' END
    END    

    SELECT '
INSERT INTO ' | sys.TableName(t) | sys.ColNames(t) | ' VALUES 
'       'email' OR sname = 'login' OR sname = 'timed'
          OR tname = '[browse].[Column]' OR tname = '[browse].[Table]' THEN ' WH!#M sys.Table WHERE Id = t
      SET sname = sys.SchemaName(schema)
      SET filter = CASE
        WHEN sname = 'log' OR sname =
        ELSE '' END
    END  
    ELSE IF mode = 2
    BEGIN
      SET tname = sys.TableName(t) 
      SET schema = Schema FRO"&  WHEN tname = '[log].[Transaction]'
          OR tname = '[browse].[Column]' OR tname = '[browse].[Table]' THEN ' WHERE false'ndexColumn
       ELSE '' END
    ELSE IF mode = 1
    BEGIN
      SET tname = sys.TableName(t) 
      SET filter = CASE
      %'THEN ' WHERE Table > 6' -- Field
       WHEN t = 4 THEN ' WHERE Id > 7' -- Index
       WHEN t = 5 THEN ' WHERE Index > 7' -- Isys.SingleQuote(ChildDisplayFunction)|','|Datatype|')'
    FROM browse.Column WHERE Id = cid
  END
  SELECT '
GO'
ENDJ$,leQuote(Description)
      |',rt,'|sys.SingleQuote(Default)|','|InputCols|','|InputRows|','|sys.SingleQuote(InputFunction)|','|ows],[InputFunction],[ChildDisplayFunction],[Datatype]) 
VALUES (cid, '
      |Position|','|sys.SingleQuote(Label)|','|sys.Sing)+SingleQuote(rtname) | '

INSERT INTO browse.Column(Id,[Position],[Label],[Description],[RefersTo],[Default],[InputCols],[InputRSchema WHERE Name = ' | sys.SingleQuote(rsname) | ' 
SET rt = 0 SET rt =Id FROM sys.Table WHERE Schema = rs AND Name = ' | sys.*.
SELECT '
SET cid=Id FROM sys.Column WHERE Table = tid AND Name = ' | sys.SingleQuote(cname) | '
SET rs = 0 SET rs =Id FROM sys.ame = Name, rs = Schema FROM sys.Table WHERE Id = ref
    SET rsname = '' SET rsname = Name FROM sys.Schema WHERE Id = rs

    -/n WHERE Table = t
  BEGIN
    SET ref= 0 SET ref = RefersTo FROM browse.Column WHERE Id = cid
    SET rtname = '', rs=0 SET rtn
 Id = t

  DECLARE cid int, cname string, ref int, rtname string, rs int, rsname string
  FOR cid=Id, cname=Name FROM sys.Colum(4	ultOrder) | ',' | sys.SingleQuote(Title) | ',' 
    | sys.SingleQuote(Description) | ',' | Role | ')'
  FROM browse.Table WHERERole) 
VALUES (tid,'
    | sys.SingleQuote(NameFunction) |','|sys.SingleQuote(SelectFunction) 
    | ',' | sys.SingleQuote(Defa13| sys.SingleQuote(tname) 
SELECT '
INSERT INTO browse.Table(Id,NameFunction, SelectFunction, DefaultOrder, Title, Description, d = Id FROM sys.Schema WHERE Name = ' | sys.SingleQuote(sname) | '
SET tid = Id FROM sys.Table WHERE Schema = sid AND Name = ' 28E Id = t
  SET sname = Name FROM sys.Schema WHERE Id = sid

  SELECT '
DECLARE tid int, sid int, cid int, rs int, rt int
SET sist |= CASE WHEN  list = '' THEN col ELSE ',' | col END
  RETURN '(' | list | ')'
ENDk57 = t
  DELETE FROM sys.Table WHERE Id = t
END�lumn WHERE Id = id
  END
  /* Delete other data */
  DELETE FROM browse.Table WHERE Id = t
  DELETE FROM sys.Column WHERE Table69WHERE Table = t
   /* Delete the column data */
  FOR id = Id FROM sys.Column WHERE Table = t
  BEGIN
    DELETE FROM browse.Co: id = Id FROM sys.Index WHERE Table = t
  BEGIN
    DELETE FROM sys.IndexColumn WHERE Index = id
  END
  DELETE FROM sys.Index 'Fv19130117661)
(134,false,121,0,'Cullen','Christopher Roderick Gordon','Married Mebrat Yemane (b. Jan 24 1933) on Feb 28 1970. Children Daniel Mikail (b. Apr 23, 1972) and Peter Mark (b. Aug 8, 1974)',990614,0,63843518807049814)
(135,false,29,35,'Gordon','Ada Mary','Born in China',961024,0,63843519483320034)
(136,false,29,35,'Gordu701744)
(132,false,122,130,'Band','Louisa Margaret','Born Hong Kong, died Wantage, Oxfordshire',982581,1016453,63843512669878670)
(133,true,121,0,'Cullen','Stephen William Theodore','Married Audrey Jean Scott in 1957. Sons Iain Scott Cullen (b. Jun 14, 1959), and Derek. Died in Malahyde, Co. Dublin, Ireland',989899,1005255,638435t
(130,true,0,0,'Band','Rev Stephen','',961705,993824,63843512110665119)
(131,true,122,130,'Band','Robert William Ingram (Robin)','Married Gabrielle Gosset,(  b. May 1, 1921 Australia, d.  27 Apr 1984, Gloucestershire, Rodborough Common) on 18 Oct 1941, Chatswood, Australia. POW. Died in Gloucestershire',976'662,1022030,63844638272s'',984618,1027713,63843439972017414)
(127,true,124,103,'Gordon','Keith Otto','',997636,0,63843441003050353)
(128,true,124,103,'Gordon','Eric Ingram','',997084,0,63843441085409267)
(129,false,122,130,'Band','Mary Frances Mollie','Born 29 Sep 1908 in Hong Kong, China. Died Camden House, Faringdon',977213,1020001,63843512894434881)rphen Band. Died in Singapore 1939',960032,992800,63843511302173427)
(123,true,124,103,'Gordon','John Edward','',999251,0,63843439625709372)
(124,false,0,0,'Hjersing','Marit Elise','Norwegian',983845,1029765,63843439563427950)
(125,false,126,102,'Gordon','Madeline','',996765,0,63843439989243078)
(126,false,0,0,'Cammock','Joyce',qns','Vicky','',0,0,63862711250978110)
(121,false,122,130,'Band','Ada Dorothy','Married Alec Cullen (b. Feb 28, 1905, died Jun 25, 1943 in Kanyu prison camp,Thailand). Lived in Sutton Courtenay, had lovely garden with swimming pool (George) ',978167,1018528,63843518892199101)
(122,false,29',35,'Gordon','Helen Jane','Married Rev Step
School-teacher in Nottinghamshire. Per Sarah.',960000,989280,0)
(117,false,27,26,'Barwood','Bessie','',966144,999611,0)
(118,false,24,23,'Stansfield','Mabel','Mabel, became a nurse, married Rex Stansfield, who was surgeon at Barts.',0,0,0)
(119,false,120,93,'Gilbert','Olivia','',1034563,0,63862711363660409)
(120,false,0,0,'Joho26,'Barwood','Frank Edgar','Feed and Barley Merchant. Left £60,000.',961536,1007659,0)
(115,true,27,26,'Barwood','Albert','',963188,1009248,0)
(116,false,27,26,'Barwood','Kate Louise','Married 8 Mar 1900 at St Faiths, Norfolk to Horatio Carter, mariner.

Had a daughter Kathleen Carter, who knew Sarah and visited frequently.

nhen','',893440,932352,0)
(113,false,27,26,'Barwood','May','Got a BA degree in 1898, Royal Holloway and Bedford College, London University.

First women''s college, founded 1849. 

Probate : 18 Mar 1938, £2,458 9s 1p

Executors: Winnifred Dorathea Phillips and Fran'k Edgar Barwood ( brother ).',961536,992299,0)
(114,true,27,mBarwood was executor, £32,388.
Lived at 33 Heath Drive, Hampstead, London.

Married Eleanor Gwendolen Chaloner Smith, b. 1902, d. May 22, 1963.

John, son?
Peggy = Eleanor or Elanor''s daughter.',967245,1000858,0)
(111,false,27,0,'Barwood','Bessie','Born Norwich. Died Tonbridge.',966144,999611,0)
(112,true,0,0,'Swan','Step	ls, India, Dec 31, 1921',965632,0,63843520104842200)
(109,false,29,35,'Gordon','Frances','Born in China. Died in Aberdeen, Mar 25, 1959. May 2, 1921 passed midwifry exam.',963584,1003129,63843519977527975)
(110,true,24,23,'Fairbrother','James','Per Sarah

James, a doctor, b. 13 Feb, 1889, m. April 1923, d. 26 Dec, 1954 
Philip k
(105,true,0,0,'Test','Test','',0,0,0)
(106,false,105,0,'Test','Test','',0,0,0)
(107,true,29,35,'Gordon','Robert Douglas','Born in China, died in South Africa. Married Louisa Mary Smith.',964096,1007229,63843519832033649)
(108,true,29,35,'Gordon','Ch'arles Lennox','Born Elgin. Banker, Married Fanny Caroline Shank in Kanoor, Madra
jdical student, living in Morpeth ( Threeways ).£27,749 probate.',981314,1006346,63844481480397099)
(104,false,38,30,'Gordon','Mary (May) Isabelle','Mary Isabelle Born Knaresborough, Yorkshire 29 Jan 1914.

Birth not registered until 1915.

Died Faringdon, Wantage, Berkshire.

Worked as schools inspector.',980029,1023584,0)
ine daughter??

Died in Barnstaple ( Witheridge, Devon ).

Lived in St Kitts / Nevis for some time ( agricultural commissioner?? ).',985381,1022140,0)
(103,true,38,30,'Gordon','Theodore (Ted) Ingram','Married Marit b. 5 Sep 1921, d. 5 Apr 2011 ( Norwegian, m. 22 Feb 1946 ) Children: John, Keith, Eric.Doctor.On 1939 census as me
h(101,false,99,98,'Gilbert','Barbara','Married Thomas Roy Dinis Griffin Children Roy Gilbert ( married Susan Avery, child Benjamin Robert, Aspergers )Brian ( lives in FOD, children ... )',986989,1034240,63844482194461167)
(102,true,38',30,'Gordon','Ian Robert','Born Tynemouth

Married Joyce Cammock, Whitby, Yorkshire, 1945. Madelig
(97,false,0,0,'','Anna','',0,0,0)
(98,true,0,0,'Gilbert','Richard William','',968503,1017698,63844482007137146)
(99,false,0,0,'Smale','Louisa','',971462,1010688,63844482030057319)
(100,false,99,98,'Gilbert','Marion','Married Arnold Robbins.Children Beverley, Phillip, Patricia Robbins (twins)',988202,1028812,63844482113789251)
f93,true,92,13,'Gilbert','Jack','Born Barnstable.

Baby due in September 2020.

Olivia Grace, born 3:42am on Oct 3, 2020. 7lb 7oz.

Mother Vicky.',1020685,0,0)
(94,false,92,13,'Gilbert','Mollie','Born Barnstable',1021610,0,0)
(95,true,92,13,'Gilbert','Harry','',1022269,0,0)
(96,true,92,13,'Gilbert','Samuel','',1023225,0,0)
ee,87,14,'Gilbert','Sebastian','Born Bankok',1030713,0,0)
(89,true,87,14,'Gilbert','Tristan','Born Bankok',1032013,0,0)
(90,true,91,12,'Gilbert','Alex','',1029699,0,0)
(91,false,0,0,'Schneider','Miriam','Born in W'iesbaden, Germany

Married 28 May 2011',1009480,0,0)
(92,false,0,0,'Askew','Sherrie','June 1, 1991',1009055,0,0)
(d,0)
(82,true,77,80,'Vinnie','Ruben','',1022644,0,0)
(83,true,77,80,'Vinnie','Jack','',1025907,0,0)
(84,true,77,80,'Vinnie','Jasmin','',1028135,0,0)
(85,false,97,79,'Stuart-Pennink','Mia','',0,0,0)
(86,true,97,79,'Stuart-Pennink','Tom','',0,0,0)
(87,false,0,0,'Lynch','Alicia J','Born Melbourne, Australia',1013826,0,0)
(88,trucrt','',0,0,0)
(76,true,0,0,'Stuart-Pennink','Richard','',0,0,0)
(77,false,36,76,'Stuart-Pennink','Lucy','',0,0,0)
(78,true,36,76,'Stuart-Pennink','Emily','Married Stefan Dessler 2018',0,0,0)
(79,true,36,76,'Stuart-Pennink','James','',0,0,0)
(80,true,0,0,'Vinnie','Laurence','',0,0,0)
(81,true,77,80,'Vinnie','Thai','',1023681,0barried Sarah Robinson, b. 1773 Helmdon, d. 1816 Helmdon.

Married Sarah, 1830, Helmdon, b. 1790 d. 1845.',911872,950272,0)
(71,false,0,72,'Russell','Elizabeth','',0,0,0)
(72,true,0,0,'Russell'','Henry','',0,0,0)
(73,true,71,8,'Barwood','Harry','',0,0,0)
(74,false,71,8,'Barwood','Sophie','',0,0,0)
(75,true,71,8,'Barwood','Rupeaied briefly in 1939.',980609,1028382,0)
(69,true,0,70,'Fairbrother','James','Born and died Helmdon, Northants.

Yeoman farmer, widower.

Married 2/12/1841 to Sarah Freeman, Helmdon, Northampton.
Born 1801, d. Dec 14, 1884.

Father Charles Fairbrother, yeoman.


',924160,964751,0)
(70,true,0,22,'Fairbrother','Charles','M`on','George','https://en.wikipedia.org/wiki/George_Gordon,_1st_Duke_of_Gordon',841216,878983,0)
(68,true,25,28,'Barwood','Anthony John','https://www.telegraph.co.uk/news/obituaries/2979212/Group-Captain-Tony-Barwood.html

Daughters Kate 1947 and Netta 31 Mar 1949.

Married Nora Cotton in 1946.

Had previous wife, Nancy, marrwon','Rosie','',961536,963584,63843519557006712)
(137,true,64,138,'Puccini Guerrero','Mateo','',1036087,0,63862768769115944)
(138,true,0,137,'Puccini Guerrero','Juliano','Venez'ualean',1020563,0,63862711127061106)
(139,true,120,93,'Gilbert','Archie','',1035958,0,63862711235266699)
GO

DECLARE tid int, sid int, cid int, rs int, xrt int
SET sid = Id FROM sys.Schema WHERE Name = 'famt'
SET tid = Id FROM sys.Table WHERE Schema = sid AND Name = 'Person'
INSERT INTO browse.Table(Id,NameFunction, SelectFunction, DefaultOrder, Title, Description, Role) 
VALUES (tid,'famt.PersonName','','BirthDate DESC','','',0)
SET cid=Id FROM sys.Column WHERE Table = tid ANyD Name = 'Mother'
SET rs = 0 SET rs =Id FROM sys.Schema WHERE Name = 'famt' 
SET rt = 0 SET rt =Id FROM sys.Table WHERE Schema = rs AND Name = 'Person'

INSERT INTO browse.Column(Id,[Position],[Label],[Description],[RefersTo],[Default],[InputCols],[InputRows],[InputFunction],[ChildDisplayFunction],[Datatype]) 
VALUES (cid, 120z,'','',rt,'',0,0,'famt.MotherSelect','famt.MotherDisplay',0)
SET cid=Id FROM sys.Column WHERE Table = tid AND Name = 'Father'
SET rs = 0 SET rs =Id FROM sys&�0f string
    SET ref = 0, inf = ''
    SET ref = RefersTo, inf = InputFunction FROM browse.Column WHERE Id = colId
    IF ref > 0 AND inf = '' SET inf = SelectFunction FROM browse.Table WHERE Id = ref

    DECLARE inp string
    SET inp = CASE WHEN inf = '' 
        THEN browse.Sql( 4, colId, browse.GetDatatype(type,colId) )
      | Id | '>' | web.Encode( browse.DatatypeName(Id) ) | '</option>'
  FROM browse.Datatype
  ORDER BY browse.DatatypeName(Id)
  SET options |= opt
  RETURN '<select id="' | col | '" name="' | col | '">' | options | 
     '<option ' | CASE WHEN sel = 0 THEN ' selected' ELSE '' END | ' value=0></option>'
     | '</select>'
ENDJFROM browse.Table WHERE Id = ref

    SET result |= CASE WHEN result = '' THEN '' ELSE '|'', ''|' END | 
      CASE 
      WHEN nf != '' 
      THEN '''<a href="/browse-Row?' | browse.tablearg(ref) | '&k=''|' | col | '|'''|ba|'">''|' | nf | '(' | col | ')' | '|''</a>''' 

      ELSE browse.Sql(1,colid,datatyp&e)
      END
  END
ENDAWHERE Table = table 
  ORDER BY browse.ColPos(Id), Id
  BEGIN
    DECLARE ref int, nf string, datatype int
    SET ref = 0, nf = '', datatype = 0
    SET ref = RefersTo, datatype = Datatype
    FROM browse.Column WHERE Id = colid

    IF datatype = 0 SET datatype = browse.DefaultDataType(type)

    IF ref > 0 SET nf = NameFunction >New Column Name: <input name=cn>
<p>Datatype: <select name=dt>' | options | '<select> 
<p><input type=submit value="Ok">
</form>' 
  EXEC admin.Trailer()
  
END�t )
    EXEC web.Redirect( browse.backurl() )
    RETURN
  END

  EXEC admin.Head( 'New Column' )

  DECLARE opt string, options string
  FOR opt = '<option '  | ' value=' | Id | '>' | browse.DatatypeName(Id) | '</option>'
  FROM browse.Datatype
  ORDER BY browse.DatatypeName(Id)
  SET opti&ons |= opt

  SELECT '<form method=post><pBLE' | sys.Dot(s,n) | ' ADD ' | cn | ' ' | t )
    DECLARE sid int, tid int, colid int
    SET sid = Id FROM sys.Schema WHERE Name = s
    SET tid = Id FROM sys.Table WHERE Schema = sid AND Name = n
    SET colid = Id FROM sys.Column WHERE Table = tid AND Name = cn    
    INSERT INTO browse.Column( Id, Datatype ) VALUES ( colid, dSET dt = PARSEINT( web.Form('dt') )
    DECLARE dk int SET dk = DataKind FROM browse.Datatype WHERE Id = dt


    DECLARE t string SET t = CASE
    WHEN dk = 1 THEN 'binary'
    WHEN dk = 2 THEN 'string'
    WHEN dk = 3 THEN 'int'
    WHEN dk = 4 THEN 'float'
    WHEN dk = 5 THEN 'bool'
    ELSE '??'
    END

    EXECUTE( 'ALTER TALARE content binary
DECLARE ct string
SET content = ' | cname | ', ct=' | ctname | ' 
FROM ' | sys.TableName(t) | '
WHERE Id = ' | k | '
EXEC web.SetContentType(ct)
SELECT content
'

   EXECUTE( sql )
   
END&� Id = c

   FOR id = Id FROM sys.Column WHERE Table = t
   BEGIN
     DECLARE def string SET def = ''
     SET def = Default FROM browse.Column WHERE Id = id AND Datatype = 10
     IF def = cname 
     BEGIN
       SET ctname = Name FROM sys.Column WHERE Id = id
       BREAK
     END
   END

   DECLARE sql string
   SET sql = '
DEC	
D

   DECLARE sql string
   SET sql = '
DECLARE content binary
DECLARE ct string
SET content = ' | cname | ', ct=' | ctname | ' 
FROM ' | sys.TableName(t) | '
WHERE Id = ' | k | '
EXEC web.SetContentType(ct)
SELECT content
'

   EXECUTE( sql )
   
END�= Table, cname = Name FROM sys.Column WHERE Id = c

   FOR id = Id FROM sys.Column WHERE Table = t
   BEGIN
     DECLARE def string SET def = ''
     SET def = Default FROM browse.Column WHERE Id = id AND Datatype = 10
     IF def = cname 
     BEGIN
  &     SET ctname = Name FROM sys.Column WHERE Id = id
       BREAK
     END
   EN
    SELECT '<h1>Column ' | colName | '</h1><form method=post>' 
    EXECUTE( browse.FormUpdateSql( tid, c ) )
    SELECT '<p><input name="$submit" type=submit value=Save></form>'
    EXEC admin.Trailer()
  END
END�
d = c

  DECLARE ok int SET ok = 0
  SET ok = Id FROM browse.Column WHERE Id = c
  IF ok != c INSERT INTO browse.Column( Id ) VALUES ( c )

  IF web.Form( '$submit' ) != '' 
  BEGIN
    EXECUTE( browse.UpdateSql( tid, c ) ) 
    EXEC web.Redirect( browse.backurl() )  
  END
  ELSE
  BEGIN
    EXEC admin.Head( 'Column ' | colName )

	| web.Encode( ex )
  SELECT '<form method=post enctype="multipart/form-data">' 
  EXECUTE( browse.FormInsertSql( t, 0 ) )

  SELECT '<p><input name="$submit" type=submit value=Save></form>'
  EXEC admin.Trailer()
END&�se.InsertSql( t, 0, 0 ) ) 
    SET ex = EXCEPTION()
    IF ex = '' 
    BEGIN
      DECLARE ba string SET ba = browse.backargs()
      EXEC web.Redirect( '/browse-Row?' | browse.tablearg(t) | '&k=' | LASTID() | ba )
      RETURN
    END
  END
  
  EXEC admin.Head( 'Add ' | browse.TableTitle( t ) )
  IF ex != '' SELECT '<p>Error: ' e | '</b><br>'
  IF ex != '' SELECT '<p>Error: ' | ex
  SELECT '<form method=post>' 
  EXECUTE( browse.FormInsertSql( t, c ) )
  SELECT '<p><input name="$submit" type=submit value=Save></form>'
  EXEC admin.Trailer()
END�  IF web.Form( '$submit' ) != '' 
  BEGIN
    EXECUTE( browse.InsertSql( t, c, p ) ) 
    SET ex = EXCEPTION()
    IF ex = '' 
    BEGIN
      EXEC web.Redirect( browse.backurl() )       
      RETURN 
    END
  END&
 
  DECLARE title string SET title = 'Add ' | browse.TableTitle( t )
  EXEC admin.Head( title )
  SELECT '<b>' | titlontent = Content FROM web.File WHERE Path = path
    IF ok = path
    BEGIN
      EXEC web.SendBinary( ct, content )
    END    
    ELSE
    BEGIN
      EXEC web.ErrHead( 'Unknown page')
      SELECT 'Unknown page Path=' | path
      EXEC web.ErrTrail()
    END
  END
END} '()' )
    DECLARE ex string
    SET ex = EXCEPTION()
    IF ex != ''
    BEGIN
      EXEC web.ErrHead( 'Error' )
      SELECT '<h1>Error</h1><pre>'
      SELECT web.Encode( ex )
      SELECT '</pre>'
      EXEC web.ErrTrail()
    END
  END
  ELSE
  BEGIN
    DECLARE ct string, content binary
    SET ok = Path, ct = ContentType, cN m = 9 THEN 244 -- Sep
    WHEN m = 10 THEN 274 -- Oct
    WHEN m = 11 THEN 305 -- Nov
    ELSE 335 -- Dec
    END
  -- Allow for Feb being only 28 days in a non-leap-year.
  IF m >= 3 AND NOT da&te.IsLeapYear( y ) SET d = d - 1
  RETURN date.YearDay( y, d )
END�d = 1 

  -- Incorporate m into d ( assuming Feb has 29 days ).
  SET d = d + CASE
    WHEN 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 THEN 121 -- May
    WHEN m = 6 THEN 152 -- Jun
    WHEN m = 7 THEN 182 -- Jul
    WHEN m = 8 THEN 213 -- Aug
    WHEving 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 cycle * 146097 
    + y * 365 
    + ( y + 3 ) / 4 - ( y + 99 ) / 100 + ( y + 399 ) / 400
    + d
END�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 / 51&2, d = yd % 512 - 1
  SET cycle = y / 400, y = y % 400 -- The Gregorian calendar repeats every 400 years.
 
  -- Result days come from cycles, from years hax'Mar' THEN 3
    WHEN 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
    WHEN ms = '???' THEN 0
    ELSE -1
  END  
  IF month < 0 THROW 'Unknown month parsing date ' | web.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 < 0 OR day > 31 THROW 'Day must be 1..31 parsing date ' | web.Attr(''|day)
  SET year = PARSEINT( SUBSTRING( s, ssix + 1, LEN(s) ) )
  RETURN date.YearMonthDay( year, month, day )
ENDXclosed in square brackets.
<h2>Schema definition</h2>
<h3>CREATE SCHEMA</h3>
<p>CREATE SCHEMA name
<p>Creates a new schema. Every database object (Table, Function) has an associated schema. Schemas are used to organise database objects into logical categories.
<h2>Table definition</h2>
<h3>CREATE TABLE</h3><p>CREATE TABLE schema.tablename ( Colname1 Coltype1, Colname2 Coltype2, ... )
<p>Creates a new base table. Every base table is automatically given an Id column, which auto-increments on INSERT ( if no explicit value is supplied).<p>The data types are as follows:
<ul>
<li>int(n), 1 <= n <= 8. Signed n-byte integer. Default is 8 bytes.</li>
<li>float, double : floating point numbers of size 4 and 8 bytes respectively.</li>
<li>string(n) : a variable length string of unicode characters. n (optional, default 15) specifies number of bytes stored inline.</li>
<li>binary(n) : a variable length string of bytes. n (optional, default 15) specifies number of bytes stored inline.</li>
<li>bool : boolean ( true or false ).</li>
</ul>

<p>Each data type has a default value : zero for numbers, a zero length string for string and binary, and false for the boolean type. The variable length data types are stored in a special system table if the length exceeds the reserved inline storage, meaning they are slightly slower to store and retrieve. Local float and integer variables and arithmetic operations are all 64 bits (8 bytes). The lower precision only applies when a value is stored in column of a table.
<h3>ALTER TABLE</h3>
<p>ALTER TABLE schema.tablename action1, action2 .... <p>The actions are as follows:
<ul>
<li>ADD Colname Coltype : a new column is added to the table.</li>
<li>MODIFY Colname Coltype : the datatype of an existing column is changed. The only changes allowed are between the different sizes of integers, between float and double, and modification of the number of bytes stored inline for binary and string.</li>
<li>DROP Colname : the column is removed from the table.</li>
</ul>
<p>Note: currently, any indexes that have been added to a table need to be dropped before using ALTER TABLE. They can be added again afterwards.
</ul>
<h2>Data manipulation statements</h2>
<h3>INSERT</h3>
<p>INSERT INTO schema.tablename ( Colname1, Colname2 ... ) VALUES ( Val1, Val2... ) [,] ( Val3, Val4 ...) ...
<p>The specified values are inserted into the table. The values may be any expressions ( possibly involving local variables or function calls ).
<h3>SELECT</h3><p>SELECT expressions FROM source-table [WHERE bool-exp ] [ORDER BY expressions]
<p>A new table is computed, based on the list of expressions and the WHERE and ORDER BY clauses.
<p>If the keyword DESC is placed after an ORDER BY expression, the order is reversed ( descending order ).
<p>The SELECT expressions can be given names using AS.
<p>When used as a stand-alone statement, the results are passed to the code that invoked the batch, and may be displayed to a user or sent to a client for further processing and eventual display. 
<h3>UPDATE</h3><p>UPDATE schema.tablename SET Colname1 = Exp1, Colname2 = Exp2 .... WHERE bool-exp
<p>Rows in the table which satisfy the WHERE condition are updated.
<h3>DELETE</h3><p>DELETE FROM schema.tablename WHERE bool-exp
<p>Rows in the table which satisfy the WHERE condition are removed.
<h2>Local variable declaration and assignment statements</h2>
<h3>DECLARE</h3><p>DECLARE name1 type1, name2 type2 ....
<p>Local variables are declared with the specified types. The variables are initialised to default values ( but only once, not each time the DECLARE is encountered if there is a loop ).
<h3>SET</h3>
<p>SET name1 = exp1, name2 = exp2 .... [ FROM table ] [ WHERE bool-exp ]
<p>Local variables are assigned. If the FROM clause is specified, the values are taken from a table row which satisfies the WHERE condition. If there is no such row, the values of the local variables remain unchanged.
<h3>FOR</h3><p>FOR name1 = exp1, name2 = exp2 .... FROM table [ WHERE bool-exp ] [ORDER BY expressions] Statement
<p>Statement is repeatedly executed for each row from the table which satisfies the WHERE condition, with the named local variables being assigned expressions which depend on the rows.
<h2>Control flow statements</h2>
<h3>BEGIN .. END</h3><p>BEGIN Statement1 Statement2 ... END
<p>The statements are executed in order. A BEGIN..END compound statement can be used whenever a single statement is allowed.
<h3>IF .. THEN ... ELSE ...</h3>
<p>IF bool-exp THEN Statement1 [ ELSE Statement2 ]
<p>If bool-exp evaluates to true Statement1 is executed, otherwise Statement2 ( if specified ) is executed.
<h3>WHILE</h3><p>WHILE bool-exp Statement
<p>Statement is repeatedly executed as long as bool-exp evaluates to true. See also BREAK.
<h3>GOTO</h3><p>GOTO label
<p>Control is transferred to the labelled statement. A label consists of a name followed by a colon (:)
<h3>BREAK</h3><p>BREAK
<p>Execution of the enclosing FOR or WHILE loop is terminated.
<h2>Batch execution</h2><p>EXECUTE ( string-expression )
<p>Evaluates the string expression, and then executes the result ( which should be a list of SQL statements ).
<p>Note that database objects ( tables, function ) must be created in a prior batch before being used. A GO statement may be used to signify the start of a new batch.
<h2>Stored Functions</h2>
<h3>CREATE FN</h3><p>CREATE FN schema.name ( param1 type1, param2 type2... ) AS BEGIN statements END
<p>A stored function ( no return value ) is created, which can later be called by an EXEC statement.
<h3>EXEC</h3><p>EXEC schema.name( exp1, exp2 ... )
<p>The stored function is called with the supplied parameters.
<h3>Exceptions</h3><p>An exception will terminate the execution of a function or batch. EXCEPTION() can be used to obtain a string describing the most recent exception (and clears the exception string). If any exception occurs, the database is left unchanged.
<h3>THROW</h3>
<p>THROW string-expression 
<p>An exception is raised, with the error message being set to the string.
<h3>CREATE FN</h3><p>CREATE FN schema.name ( param1 type1, param2 type2... ) RETURNS type AS BEGIN statements END
<p>A stored function is created which can later be used in expressions.
<h3>RETURN</h3>
<p>RETURN expression
<p>Returns a value from a stored function. RETURN with no expression returns from a stored function with no return value.
<p>The pre-defined local variable result can be assigned instead to set the return value.
<h3>CHECK</h3>
<p>CHECK schema.name
<p>Checks that a function compiles ok. EXCEPTION() should be used to check if there is any error.

<h2>Expressions</h2>
<p>Expressions are composed from literals, named local variables, local parameters and named columns from tables. These may be combined using operators, stored functions, pre-defined functions. There is also the CASE expression, which has syntax CASE WHEN bool1 THEN exp1 WHEN bool2 THEN exp2 .... ELSE exp END - the result is the expression associated with the first bool expression which evaluates to true.
<h3>Literals</h3>
<p>String literals are written enclosed in single quotes. If a single quote is needed in a string literal, it is written as two single quotes. Binary literals are written in hexadecimal preceded by 0x. Integers are a list of digits (0-9). The bool literals are true and false.
<h3>Names</h3><p>Names are enclosed in square brackets and are case sensitive ( although language keywords such as CREATE SELECT are case insensitive, and are written without the square brackets, often in upper case only by convention ). The square brackets can be omitted if the name consists of only letters (A-Z,a-z).
<h3>Operators</h3>
<p>The operators ( all binary, except for - which can be unary, and NOT which is only unary ) in order of precedence, high to low, are as follows:
<ul>
<li>*  / % : multiplication, division and remainder (after division) of numbers. Remainder only applies to integers.</li>
<li>+ - : addition, subtraction of numbers.</li>
<li>| : concatenation of string/binary values. The second expression is automatical	ly converted to string/binary if necessary.</li>
<li>= != > < >= <= : comparison of any data type.</li>
<li>NOT : boolean negation ( result is true if arg is false, false if arg is true ).</li>
<li>AND : boolean operator ( result is true if both args are true )</li>
<li>OR : boolean operator  ( result is true if either arg is true )</li>
</ul>
<p>Brackets can be used where necessary, for example ( a + b ) * c.
<h3>Pre-defined functions</h3>
<ul>
<li>LEN( s string ) : returns the length of s, which must be a string expression.</li>
<li>BINLEN( s binary ) : returns the length of s, which must be a binary expression.</li> 
<li>SUBSTRING( s string, start int, len int ) : returns the substring of s from start (1-based) length len.</li>
<li>BINSUBSTRING( s binary, start int, len int ) : binary version of SUBSTRING.</li>
<li>REPLACE( s string, pat string, sub string ) : returns a copy of s where every occurrence of pat is replaced with sub.</li>
<li>LASTID() : returns the last Id value allocated by an I	
NSERT statement.</li>
<li>PARSEINT( s string ) : parses an integer from s.</li>
<li>PARSEFLOAT( s string ) : parses a floating point number from s.</li>
<li>EXCEPTION() returns a string with any error that occurred during an EXECUTE statement.</li>
<li>REPACKFILE(k,schema,table) : A file is re-packed to free up pages. The result is an integer, the number of pages freed, 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>VERIFYDB() : verifies the logical page structure of the database. , the result is a string. Note: this needs exclusive access to the database to give consistent results, as it can observe update activity in shared data structures. Calling it while another process is updating the database may result in an exception.
<li>See the web schema for functions that can be used to access http requests.</li>
</ul>
<h3>Conversions</h3>
<p>To be decided. Currently the only implicit conversion is to string for operands of string concatenation.
<h2>Indexes
<h3>CREATE INDEX</h3><p>CREATE INDEX indexname ON schema.tablename( Colname1, Colname2 ... )<p>Creates a new index. Indexes allow efficient access to rows other than by Id values. 
<p>For example, <br>CREATE INDEX ByCust ON dbo.Order(Cust) 
<br>creates an index allowing the orders associated with a particular customer to be efficiently retrieved without scanning the entire order table.
<h2>Drop</h2>
<h3>DROP object-type object-name</h3><p>object-type can be any one of SCHEMA,TABLE or FUNCTION.
<p>The specified object is removed from the database. In the case of a SCHEMA, all objects 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 INDEX indexname ON schema.tablename<p>The specified index is removed from the database.
<h2>Comments</h2>
<p>There are two kinds of comments. Single line comments start with -- and extend to the end of the line. Delimited comments start with /* and are terminated b
y */. Comments have no effect, they are simply to help document the code.
<h2>Comparison with other SQL implementations</h2><p>There is a single variable length string datatype "string" for unicode strings ( equivalent to nvarchar(max) in MSSQL ), no fixed length strings.
<p>Similarly there is a single binary datatype "binary" equivalent to varbinary(max) in MSSQL.
<p>Every table automatically gets an integer Id field ( it does not have to be specified ), which is automatically filled in if not specified in an INSERT statement. Id values must be unique ( an attempt to insert or assign a duplicate Id will raise an exception ). 
<p>WHERE condition is not optional in UPDATE and DELETE statements - WHERE true can be used if you really want to UPDATE or DELETE all rows. This is a "safety" feature.
<p>Local variables cannot be assigned with SELECT, instead SET or 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 FOR instead ).

<p>Local variables cannot be assigned in a DECLARE statement.
<p>No default schemas. Schema of tables and functions must always be stated explicitly.
<p>No nulls. Columns are initialised to default a value if not specified by INSERT, or when new columns are added to a table by ALTER TABLE.
<p>No triggers. No joins. No outer references.

<h2>Guide to the system schemas</h2>
<h3>admin</h3><p>System administration.
<h3>browse</h3><p>Functions for displaying, editing arbitrary tables in the database.
<h3>date</h3><p>Functions for manipulating dates - conversions between Days ( from year 0 ), Year-Day, Year-Month-Day and string.
<h3>email</h3><p>Tables and functions for sending email.
<h3>log</h3><p>Transaction logging for database replication.
<h3>sys</h3><p>Core system tables for language objects and related functions.
<h3>timed</h3><p>Timed jobs.
<h3>web</h3><p>Functions for handling web requests including main entry point ( web.main ).
' 
EXEC admin.Trailer()
ENDc
 Helmdon.Died Sussex.


On Felicity's FT, Giles is father, but seems father was James, whose father was Charles Fairbrother 1781 - 1856.

In 1871 census, age 28. Farmer 280 acres, employs 8 men, 3 boys.

Age 48 in 1891 census => born 1844.

Mabel daughter age 7, Alice age 5, James son age 2.

Living in Radmore, Wappenham, Northampton.

http://helmdonhistory.com/history/Reading_Room_100_Years_Old.htm

"The Fairbrothers had farmed in Helmdon for I don’t know how long; and then in the nineteenth century they moved away. In 1887 Charles Fairbrother, then of Wappenham, built the Reading Room on land he owned in Church Street, and gave it to the village “to be forever hereafter used as a Reading Room by all the inhabitants of … Helmdon, and also of … Stutchbury, Astwell and Falcutt”, in memory of his parents James and Sarah Fairbrother and others of his family who had li8
sys.IndexNamesys.SchemaName�browse._
sys.TableName�browse.`	�browse.a�browse.b
email.MsgNameemail.MsgSelect�email.Sd�email.Sefamt.PersonNameBirthDate DESC@
ContentContent

��������d
	��������	n').�0 meansc/12349Password;hInteger�browse.JString�browse.KTimebrowse.SqlTimeDatebrowse.SqlDateFilebrowse.SqlFileBoolbrowse.SqlBoolPassword�browse.LFloatbrowse.SqlFloat
	Binary�browse.M
ContentType�browse.N	Imagebrowse.SqlImageFileName�browse.O

VersionCheck�browse.Pfault�	InputColsC
InputFunction�	InputRowsCDatatypeC�ChildDi�	Name�	DataKindC 	SqlFn�0!
NameFunction�"
SelectFunction�#!#
DefaultOrder�$
Title�&"%
Description�&
RoleC'%'msgC(error�,$)timeC*from�+)+to�,title�.*-body�.format/-/accountC0statusC8(1
msgC2msgC313error�4timeC625server�6username�757password�8Name�@49HashedPassword�:fn�;9;atC<data�>:=Male
>MotherC?=?FatherC@Surname�B<A	Firstname�BNotes�DAC	BirthDateCD	DeathDateCECEVersionC757896;:;8:<9@=>?=?@B>ABDACDECEPsysdatewebbrowseemaillogintimedlog		admin

famt
Psysdatewebbrowse	emaillogintimedlog
	admin
famtB�	Head�( title string ) AS 
BEGIN 
  EXEC web.SetContentType( 'text/html;charset=utf-8' )

  DECLARE back string SET back = browse.backurl()

  DECLARE path string SET path = web.Path()
  DECLARE schema int SET schema = Schema FROM sys.Function WHE��	/admin-ScriptSystem�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(0) IF cu = 0 RETURN

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

  DECLARE mode int SET mode = 2

  DECLARE s int
  FOR s = Id FROM sys.Schema WHERE sys.IncludeSchema(mode,Name)[�	/admin-ScriptSchema�() AS BEGIN 

  DECLARE cu int SET cu = login.get(0) IF cu = 0 RETURN

  DECLARE sname string SET sname = web.Query('s')
  DECLARE s int SET s = Id FROM sys.Schema WHERE Name = sname

  EXEC web.SetContentType( 'text/plain; charset=utf-8' )
W�	/admin-ScriptAll�() AS 
BEGIN 
  DECLARE cu int SET cu = login.get(0) IF cu = 0 RETURN

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

  DECLARE mode int SET mode = 1

  DECLARE s int
  FOR s = Id FROM sys.Schema
    EXEC sys.ScriptSchema(s,mode)
 U�	
/admin-Schema�() AS
BEGIN
  DECLARE cu int SET cu = login.get(1) IF 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 admin.Head( '.�	/admin-NewFunc�() 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.Form('n')

  IF n != '' 
  BEGIN
    EXECUTE( 'CREATE FN ' | sys.Dot(s,n) | '() RETURNS string AS 
-�	
/admin-Manual�() AS BEGIN

DECLARE cu int SET cu = login.get(0) IF cu = 0 RETURN

EXEC admin.Head('Manual')
SELECT '<h1>Manual</h1>
<p>This manual describes the various SQL statements that are available. Where syntax is described, optional elements are en�	/admin-Execute�() AS 
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE sql string SET sql = web.Form('sql')
  EXEC admin.Head( 'Execute' )
  SELECT 
     '<p><form method=post>'
     | 'SQL to <input type=submit value=Execute>'
    (�	/admin-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&�	/admin-CheckAll�() AS 
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  EXEC admin.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�	�	/admin�() AS
BEGIN
   DECLARE cu int SET cu = login.get(0) IF cu = 0 RETURN

   EXEC admin.Head('Admin Home')

   SELECT '
<p><a target=_blank href="/">Domain Home</a>
<p><a href=/admin-Execute>Execute SQL</a>
<p><a href=/browse-Table?s=login&n=use��/log-getall�() 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,3)
END
�/log-get�() 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 
    SELECT d
  ELSS�Sleep�() 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 t < next SET Q
�Run�() 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, a = at FRO��user�() RETURNS int AS
BEGIN
  DECLARE username string SET username = web.Form('username')
  DECLARE uid int

  IF username != ''
  BEGIN
    DECLARE password string SET password = web.Form('password')
    SET result = Id FROM login.user WHERE Na��hashV(s string) RETURNS binary AS
BEGIN
  SET result = ARGON(s,'Sep 14 2022 saltiness')
END�get�( role int ) RETURNS int AS
BEGIN
  /* Get the current logged in user, if none, output login form. Note: role is not yet checked */

  /*
     Login is initially disabled. Remove or comment out the line below enable Login after Login passwor��Update�( old binary, new string, id int ) RETURNS binary AS
BEGIN
   RETURN
   CASE 
   WHEN new = '' THEN old
   ELSE login.hash(new | id)
   END
END�
/login-logout�() AS 
BEGIN 
    EXEC web.SetCookie( 'uid', '', '' )
    EXEC web.SetCookie( 'hpw', '', '' )
    EXEC admin.Head( 'Logout' )
    SELECT '<p>Logged out.'
    EXEC admin.Trailer()
END�SmtpAccountSelect�( 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=%�SmtpAccountName;(id int) RETURNS string AS
BEGIN
  SET result = '' | id
END�Sent�(id int) AS
BEGIN
  DELETE FROM email.Queue WHERE msg = id

  -- Test retry.
  -- EXEC email.LogSendError( id, 1, 'Testing retry!' )
END�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 + 600 * 1��	MsgSelect�( 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=$�MsgName;(id int) RETURNS string AS
BEGIN
  SET result = '' | id
END�	Trailer)() AS
BEGIN
  SELECT '</body></html>'
END(�6�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
    INSERT INTO em��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 = sid ANDI�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�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
END�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) | '=' | web.UrlG�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 = CASE 
      W"�VersionCheck�( latest int, check int ) RETURNS int AS
BEGIN
   IF check != latest THROW 'Version check error - record has been changed by another user'
   RETURN date.Ticks()
END	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
    SET alist |= CASE WHEN alist = '' THEN '' ELSE ' ,B~
UpdateFile�( cname string, old binary ) RETURNS binary AS 
BEGIN
  DECLARE x int
  WHILE true
  BEGIN
    DECLARE name string
    SET name = FILEATTR(x,0)
    IF name = cname RETURN FILECONTENT(x)
    IF name = '' BREAK
    SET x = x + 1
  END    
  REA	}UpdateContent(Type�( colid int, old string ) RETURNS string AS 
BEGIN
  DECLARE cname string
  SET cname = Default FROM browse.Column WHERE Id = colid

  DECLARE x int
  WHILE true
  BEGIN
    DECLARE name string
    SET name = FILEATTR(x,0)
    IF name = cnam�|
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
{TableSelect�( 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=' !zSqlVersionCheck�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Inpu(t(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */


   SET result = CASE
     WHEN kind = 1 OR kind = 2 THEN 'date.MicroSecTo�
ySqlTime�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */

   DECLARE default string
   IF kind = 3 SET default = CASE WHEN Default =�x	SqlString�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */

   DECLARE default string
   IF kind = 3 SET default = Default 
   FROM brwSqlPassword�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */

   DECLARE default string
   IF kind = 3( SET default = Default 
   FROM brv
SqlInteger�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */

   DECLARE default string
   IF kind = 3 
   BEGIN
      SET default = Def�uSqlImage�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */

   SET result = CASE
     WHEN kind = 1 THEN 'BINLEN(' | Name | ')'
     W�tSqlFloat�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */

   DECLARE default string
   IF kind = 3 
   BEGIN
      SET default = Def�sSqlFileName�( kind int, colid i(nt ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */

   DECLARE default string
   IF kind = 3 SET default = Default 
   FROM brrSqlFile�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */

   SET result = CASE
     WHEN kind = 1 OR kind = 2 THEN 'browse.DownloadL�qSqlDate�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */

   DECLARE default string
   IF kind = 3 SET default = CASE WHEN Default =pSqlContentType�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(in(sert)=5, Parse(update) = 6 
   */

   DECLARE default string
   IF kind = 3 SET default = Default 
   FROM br�oSqlBool�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */

   DECLARE default string
   IF kind = 3 
   BEGIN
      SET default = Def�n	SqlBinary�( kind int, colid int ) RETURNS string AS
BEGIN
   /* kind values: 
      List=1, Show=2, Input(insert)=3, Input(update)=4, Parse(insert)=5, Parse(update) = 6 
   */

   DECLARE default string
   IF kind = 3 SET default = Default 
   FROM br�mSql�( kind int, colid int, t int ) RETURNS string AS
BEGIN
  RETURN CASE 
    WHEN t=1 THEN browse.SqlInteger(kind,colid)
    WHEN t=2 THEN browse.SqlString(kind,colid)
    WHEN t=3 THEN browse.SqlTime(kind,colid)
    WHEN t=4 THEN browse.SqlDat�"�6lShowSql�(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 'web.Encode(' | |k	ShowImage�(id int,colid int) RETURNS string AS
BEGIN 
   RETURN '<img style="max-width:300px;" src="/browse-File?k=' | id | '&c=' | colid |'">'
ENDj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 )
  Fyi	ParseBool8( s string ) RETURNS bool AS
BEGIN
  RETURN s = 'on'
END"hLabel�( colid int ) RETURNS string AS
BEGIN
  DECLARE name string, label string
  SET name = Name FROM sys.Column WHERE Id = colid
  SET label = Label FROM browse.Column WHERE Id = colid
  IF label = '' SET label = name
  RETURN '<p><label for=' |@g	InsertSql�( table int, pc int, p int ) RETURNS string AS
BEGIN
  DECLARE vlist string, names string, type int, colid int, name string

  FOR type = Type, colid = Id, name = Name FROM sys.Column WHERE Table = table 
  BEGIN
    DECLARE sql string SET s6fInsertNames�( 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 | ')'
ENDeInsertFileName�( colid int ) RETURNS string AS 
BEGIN
  DECLARE cname string
  SET cname = Default FROM browse.Column WHERE Id = colid

  DECLARE x int
  WHILE true
  BEGIN
    DECLARE name string
    SET name = FILEATTR(x,0)
    IF name = cname RETURN '/'xd
InsertFile�( cname string ) RETURNS binary AS 
BEGIN
  DECLARE x int
  WHILE true
  BEGIN
    DECLARE name string
    SET name = FILEATTR(x,0)
    IF name = cname RETURN FILECONTENT(x)
    IF name = '' BREAK
    SET x = x + 1
  END    
  RETURN 0x
ENDcInsertContentType�( colid int ) RETURNS string AS 
BEGIN
  DECLARE cname string
  SET cname = Default FROM browse.Column WHERE Id = colid

  DECLARE x int
  WHILE true
  BEGIN
    DECLARE name string
    SET name = FILEATTR(x,0)
    IF name = cname RETURN FIL4	bInputYearMont"hDay�( 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 browse0aInputVersionCheck�( colid int, value int ) RETURNS string AS
BEGIN
   SET result = '<input type=hidden name=' | Name | ' value=' | value | '>'
   FROM sys.Column WHERE Id = colid
END
`	InputTime�( 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 = 20
  RETURN browse.Labe,_InputString�( colId int, value string ) RETURNS string AS 
BEGIN 
  DECLARE cn string SET cn = Name FROM s"ys.Column WHERE Id = colId 
  DECLARE cols int, rows int, description string
  SET cols = InputCols, rows = InputRows, description = Description
  t
^InputInt�( 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 browse.Labes]	InputFile�( colid int ) RETURNS string AS 
BEGIN 
  DECLARE cn string 
  SET cn = Name FROM sys.Column WHERE Id = colid

  RETURN browse.Label(colid) | '<input type=file id="' | cn | '" name="' | cn | '">'
END\InputDouble�( 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 si"ze = 0 SET size = 15
  RETURN browr[	InputBool�( colId int, value bool ) RETURNS string AS
BEGIN
  DECLARE cn string 
  SET cn = Name FROM sys.Column WHERE Id = colId
  RETURN browse.Label(colId) | '<input type=checkbox id="' | cn | '" name="' | cn | '"' | CASE WHEN value THEN ' checked'+ZInputBinary�( 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 browse.qYGetDatatype�( type int, colid int ) RETURNS int AS
BEGIN
  SET result = Datatype FROM browse.Column WHERE Id = colid
  IF result = 0
  BEGIN
    SET result = CASE
       WHEN type % 8 = 3 THEN 1 /* int */
       WHEN type % 8 = 2 THEN 2 /* string */
   &X
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, inW
FormInsertSql�( table int, pc int ) RETURNS string AS
BEGIN
  DECLARE sql string, col string, type int, colId int
  FOR col = Name, type = Type, colId = Id FROM sys.Column 
    WHERE Table = table AND Id != pc
    ORDER BY browse.ColPos(Id), Id
  BEGIN
  kVDownloadLink�(id int,colid int) RETURNS string AS
BEGIN 
   RETURN '<a target=_blank href="/browse-File?k=' | id | '&c=' | colid |'">Download</a>'
ENDUDefaultDataType�(type int) RETURNS int AS 
BEGIN
    SET result = CASE
       WHEN type % 8 = 3 THEN 1 /* int */
       WHEN type % 8 = 2 THEN 2 /* "string */
       WHEN type % 8 = 5 THEN 6 /* bool */
       WHEN type % 8 = 1 THEN 9 /* binary - todo */
    $TDatatypeSelect�( 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=' SDatatypeNamei( datatype int ) RETURNS string AS
BEGIN
  SET result = Name FROM browse.Datatype WHERE Id = datatype
ENDR	ColValues�( table int, ba string ) RETURNS string AS
BEGIN
  DECLARE col string, colid int, type int
  FOR colid = Id, type=Type, col = CASE 
    WHEN Type % 8 = 2 THEN 'web.Encode(sys.SingleQuote(' | Name | '))'
    ELSE Name
  END
  FROM sys.Column �6QColPosv( c int ) RETURNS int AS
BEGIN
  DECLARE pos int
  SET pos = Position FROM browse.Column WHERE Id = c
  RETURN pos
ENDPColNames�( table int, ba string ) RETURNS string AS
BEGIN
  DECLARE col string
  FOR col = '<a href="/browse-ColInfo?k=' | Id | ba | '">' | Name | '</a>' 
    | ' ' | sys.TypeName(Type) /* | ' pos=' | browse.ColPos(Id) */
  FROM sys.Column WHERE Tabl OChildSql�( colId int, k int, 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
  _NChildDisplay�( colid int, k int, ba string ) AS 
BEGIN

  DECLARE table int
  SET table = Table FROM sys.Column WHERE Id = colid

  SELECT '<p><b>' | browse.TableTitle( table ) | '</b>'
     | ' <a href="/browse-AddChild?' | browse.fieldarg(colid) | '&p=MBrowseColumnName�( k int ) RETURNS string AS 
BEGIN
  SET result = sys.TableName( Table ) | '.' | sys.QuoteName( Name )
  FROM sys.Column WHERE Id = k
ENDLAlterSql�() AS 
BEGIN
  DECLARE f string, sql string

  FOR 
     f |= '
    WHEN t=' | Id | ' THEN ' | SqlFn | '(kind,colid)' FROM browse.Datatype
  BEGIN
  END

 SET sql = 
'ALTER FN browse.Sql( kind int, colid int, t int ) RETURNS string AS
BEGIN
^K
/browse-Table�() 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 = title | UJ/browse-Row�() 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) )
ENDI/browse-NewTable�() 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.Form('n')

  IF n != '' 
  BEGIN
    EXECUTE( 'CREATE TABLE' | sys.Dot(s,n) | '()' )
    EXEC web.RSH/browse-NewColumn�() 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 cn string SET cn = web.Form('cn')

  IF cn != '' 
  BEGIN
    DECLARE dt int 	G/browse-Info�() AS 
BEGIN
  DECLARE cu int SET cu = login.get(1) IF cu = 0 RETURN

  DECLARE k int SET k = browse.tableid()

  DECLARE tid int SET tid = 10

  DECLARE ok int SET ok = 0
  SET ok = Id FROM browse.Table WHERE Id = k
  IF ok != k INSERT INTOOF
/browse-Image�() AS 
BEGIN
   DECLARE k int SET k = PARSEINT( web.Query('k'))
   DECLARE c int SET c = PARSEINT( web.Query('c'))
   DECLARE t int
   DECLARE cname string, ctname string
   DECLARE id int
   SET t = Table, cname = Name FROM sys.Column WHERE
E/browse-File�() AS 
BEGIN
   DECLARE uid int SET uid = login.user()

   DECLARE k int SET k = PARSEINT( web.Query('k'))
   DECLARE c int SET c = PARSEINT( web.Query('c'))
   DECLARE t int
   DECLARE cname string, ctname string
   DECLARE id int
   SET t D/browse-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 string SET submit = web.Form( '$submit' )
H
C/browse-ColInfo�() 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
B/browse-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()
    EXECUTE( browA/browse-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 SET p = PARSEINT( web.Query('p') )
  DECLARE t int SET t = Table FROM sys.Column WHERE Id = c
  DECLARE ex string
@	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, '?', '%3>?SetUser@() AS 
BEGIN 
  DECLARE dummy int
  SET dummy = login.user()
END>SetDos�( uid int ) RETURNS int AS
BEGIN
  DECLARE ok int
  SET ok = SETDOS
  ( 'u' | uid, 
     1000, 
     1000000000000, 
     1000000000,
     1000000000000 
  )
  IF ok = 0
  BEGIN
     DECLARE x int
     SET x = STATUSCODE( 429 )
  END
  RETURN ok
END=	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.

     EXE<SetContentTypeQ( ct string ) AS
BEGIN
  DECLARE x int
  SET x = HEADER( 'Content-Type', ct )
END;
SendBinary�( contenttype string, content binary ) AS
BEGIN
  DECLARE cu int SET cu = login.user()
  EXEC web.SetContentType( contenttype )
  SELECT content
END:Redirectk( url string ) AS
BEGIN
  DECLARE x int
  SET x = HEADER( 'location', url )
  SET x = STATUSCODE( 303 )
END9QueryC( name string ) RETURNS string AS
BEGIN
  RETURN ARG( 1, name )
END8Path1() RETURNS string AS
BEGIN
  RETURN ARG(0,'')
END7Main�() AS 
BEGIN 
  DECLARE path string SET path = web.Path()
  DECLARE ok string, schema int SET ok = Name, schema = Schema FROM sys.Function WHERE Name = path
  IF ok = path
  BEGIN
    EXECUTE( 'EXEC ' | sys.Dot(sys.SchemaName(schema),path) |�66FormC( name string ) RETURNS string AS
BEGIN
  RETURN ARG( 2, name )
END5ErrTrailC() AS 
BEGIN 

SELECT  '<p><a href="/">Home</a></body></html>'

END4ErrHead�(title string) AS
BEGIN 
  EXEC web.SetContentType( 'text/html;charset=utf-8' )
  SELECT '<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<3Encode{( s string ) RETURNS string AS
BEGIN
  SET s = REPLACE( s,'&', '&amp;' )
  SET s = REPLACE( s, '<', '&lt;' )
  RETURN s
END2CookieC( name string ) RETURNS string AS
BEGIN
  RETURN ARG( 3, name )
END1Attr�( s string ) RETURNS string AS
BEGIN
  SET s = REPLACE( s, '&', '&amp;' )
  SET s = REPLACE( s, '"', '&quot;' )
  RETURN '"' | s | '"'
END0YearMonthDayToYearDay�( 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

  -- If month or day is zero assume Jan / 1st.
  IF m = 0 SET m = 1
  IF d = 0 SET /YearMonthDayToString�( ymd int ) RETURNS string AS
BEGIN
  IF ymd = 0 RETURN ''
  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
END	,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)
  -- 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
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
  END#Test�( 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.YearMonthDayToDays( ymd )
  DECLARE i int
  SET i = 0
  WHILE i < n
  BEGIN
    SELECT '<br>' | date.DaysToString"StringToYearMonthDay�( s string ) RETURNS int AS
BEGIN
  IF s = '' RETURN 0
  -- 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 = !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 = 'Jan' THE) StringToDays{( s string ) RETURNS int AS
BEGIN
  IF s = '' RETURN 0
  RETURN date.YearMonthDayToDays( date.StringToYearMonthDay(s) )
END	NowStringM() RETURNS string AS
BEGIN
  RETURN date.MicroSecToString( date.Ticks() )
END
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 = sec % 6(
IsLeapYearZ( y int ) RETURNS bool AS
BEGIN
  RETURN y % 4 = 0 AND ( y % 100 != 0 OR y % 400 = 0 )
END�6DaysToYearMonthDayg( days int ) RETURNS int AS
BEGIN
  RETURN date.YearDayToYearMonthDay( 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' 
    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
ENDSingleQuoteZ( 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) | ' ON 
ScriptSchemaBrowse�( 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 ' | sys.Qu
ScriptData�( t int, mode int ) AS
BEGIN
    DECLARE filter string, tname string, schema int, sname string

    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 	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
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.IndexColumn WHERE Index = index
    SET li
IncludeSchema�( mode int, s string ) RETURNS bool AS 
BEGIN
  IF s = 'sys' OR s = 'date' OR s = 'web' OR s = 'log' OR s = 'admin' OR s = 'browse'
    OR s = 'email' OR s = 'timed' OR s = 'login'
  RETURN mode = 2

  ELSE
  RETURN mode = 1
ENDFloatLiteralb( x float ) RETURNS string AS 
BEGIN
   RETURN 'PARSEFLOAT(' | sys.SingleQuote( '' | x ) | ')'
END
	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 string ) 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 'sys.SingleQuote(' | Name | ')'
    WHEN Type % 8 = 4 THEN 'sys.FloatLiteral(' | Name | ')'
    WHEN Id = 2 OR Id = 9ColNames�( 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@@P
ClearTableColNameColNames	ColValuesColsDot
DropColumn	DropIndex	
DropSchema
	DropTable	FloatLiteral
IncludeSchema

	IndexCols	IndexName
	QuoteName
SchemaNameScriptBrowse
ScriptDataScriptSchemaScriptSchemaBrowseScriptTableSingleQuote	TableNameTypeNameDaysToString
DaysToYearDayDaysToYearMonthDay
IsLeapYearMicroSecToString
MonthToString	NowString StringToDays0!StringToTime"StringToYearMonthDay!##Test$
TestRoundTrip"&%Ticks&Today%''TodayYMD(WeekDayToString$,)YearDay*
YearDayToDays)++YearDayToString,YearDayToYearMonthDay*.-YearMonthDay.YearMonthDayToDays-//YearMonthDayToString0YearMonthDayToYearDay(81Attr2Cookie133Encode4ErrHead265ErrTrail6Form577Main8Path4<9Query:Redirect9;;
SendBinary<SetContentType:>=	SetCookie>SetDos=??SetUser@	UrlEncode �A/browse-AddChildB/browse-AddRowACC/browse-ColInfoD/browse-EditRowBFE/browse-FileF
/browse-ImageEGG/browse-InfoH/browse-NewColumnDLI/browse-NewTableJ/browse-RowIKK
/browse-TableLAlterSqlJNMBrowseColumnNameNChildDisplayMOOChildSqlPColNamesHXQColPosR	ColValuesQSSDatatypeNameTDatatypeSelectRVUDefaultDataTypeVDownloadLinkUWW
FormInsertSqlX
FormUpdateSqlT\YGetDatatypeZInputBinaryY[[	InputBool\InputDoubleZ^]	InputFile^InputInt]__InputString`	InputTimePpaInputVersionCheckbInputYearMonthDayaccInsertContentTyped
InsertFilebfeInsertFileNamefInsertNamesegg	InsertSqlhLabeldli	ParseBooljSchemaSelectikk	ShowImagelShowSqljnmSqln	SqlBinarymooSqlBoolpSqlContentTypehxqSqlDaterSqlFileqssSqlFileNametSqlFloatrvuSqlImagev
SqlIntegeruwwSqlPasswordx	SqlStringt|ySqlTimezSqlVersionChecky{{TableSelect|
TableTitlez~}UpdateContentType~
UpdateFile}	UpdateSql�VersionCheck`��backargs�backurl���fieldarg�fieldid���tablearg�tableid���LogSendError�MsgName���	MsgSelect�Retry���Sent�SmtpAccountName���SmtpAccountSelect�
/login-logout���Update�get���hash�user���Run�Sleep���/log-get�/log-getall���	/admin�	/admin-CheckAll���	/admin-EditFunc�	/admin-Execute���	
/admin-Manual�	/admin-NewFunc���	
/admin-Schema�	/admin-ScriptAll���	/admin-ScriptSchema�	/admin-ScriptSystem���	Head�	Trailer���

FatherDisplay�
FatherSelect���

MotherDisplay�
MotherSelect���
ParentSelect��

PersonName@P
ClearTableNPColNameColNames	ColValuesColsDot
DropColumnV	DropIndex1`	
DropSchema
	DropTable	3FloatLiteral4W
IncludeSchema]
	IndexCols	IndexName
	QuoteName
SchemaName ScriptBrowsej
ScriptDataScriptSchemaScriptSchemaBrowse;ScriptTableSingleQuote�	TableName!$TypeName'�DaysToString
DaysToYearDay2DaysToYearMonthDayU
IsLeapYearg�MicroSecToStringf9
MonthToString	NowString�i StringToDays=)!StringToTime""StringToYearMonthDay#Test$
TestRoundTrip|%%Ticks&Today}'TodayYMD�(WeekDayToString�)YearDay&�*
YearDayToDays+YearDayToString*,,YearDayToYearMonthDay-YearMonthDay+/.YearMonthDayToDays/YearMonthDayToString.00YearMonthDayToYearDay1AttrF2CookieT3Encode4ErrHead
�5ErrTrail6Form7Main8Path�9Query::Redirect�;
SendBinary<<SetContentType�=	SetCookieo>SetDos?SetUser>k@	UrlEncode~(A/browse-AddChildB/browse-AddRow�DC/browse-ColInfoD/browse-EditRowCEE/browse-FileF
/browse-Image�JG/browse-InfoH/browse-NewColumnGII/browse-NewTableJ/browse-RowH�K
/browse-TableLAlterSqlMBrowseColumnNameNChildDisplayMOOChildSqlPColNamesQQColPosRR	ColValuesSDatatypeNameTDatatypeSelectSUDefaultDataTypeVDownloadLinkW
FormInsertSql6YX
FormUpdateSqlYGetDatatypeX�ZInputBinary\[	InputBool\InputDouble[]	InputFileZ_^InputInt_InputString^`	InputTimeaInputVersionCheckbInputYearMonthDayacInsertContentTypebed
InsertFileeInsertFileNamedfInsertNamescg	InsertSqlhLabeli	ParseBool�8jSchemaSelectk	ShowImagelShowSql?�mSql�nn	SqlBinaryoSqlBoollspSqlContentTypeqSqlDateprrSqlFilesSqlFileNameqwtSqlFloatuSqlImagetvv
SqlIntegerwSqlPassworduyx	SqlStringySqlTimexzzSqlVersionCheck{TableSelect|
TableTitle{#}UpdateContentType@~
UpdateFile	UpdateSql�VersionCheck�backargs-��backurl�fieldarg��fieldid���tablearg���tableid��LogSendErrorh7�MsgName���	MsgSelect�Retry��Sent�SmtpAccountNamem�SmtpAccountSelect�
/login-logout�L�Update�get��hash�user�Run�Sleep�/log-getK��/log-getall�/admin�/admin-CheckAll���/admin-EditFunc�/admin-Execute���
/admin-Manual�/admin-NewFunc�B�
/admin-Schema�/admin-ScriptAll���/admin-ScriptSchema�/admin-ScriptSystem�A�Head�Trailer�
FatherDisplay5��FatherSelect�
MotherDisplay��ine Olive_wuvhers, sisters.Zwin Brisbane, 2020W|txarpenhoe, Bedfordshire. Died Brighton, Syussex.


Married 22 Nov 1882, Icklefo{yzrd, Hertford, Age 23

Father James Kid{man

Spouse Charles FairbrotherG~z| probate._} Eva Moriaty\}~e of Gordon. Extensive biography on Wikipedia. Interred in aisle at Trinity Chur�@�ch, Elgin

https://en.wikipedia.org/wi�ki/Alexander_Gordon,_2nd_Duke_of_GordonA���/en.wikipedia.org/wiki/Cosmo_Gordon,_3rd�_Duke_of_GordonY���/en.wikipedia.org/wiki/Alexander_Gordon,�_4th_Duke_of_Gordon

Married to

htt���ps://en.wikipedia.org/wiki/Jane_Gordon,_�Duchess_of_GordonW���ry Baker, b. 1791, they had 13 children.�

Gardener, "tree farmer".

She was ���a laundress.

Per census 1851.

Agri�cultural labourer in 1861 census.G��� Marian MoriartyX� Moriarty_��� is fiance, married July 9, 2022.G� gf from Germany.W���/en.wikipedia.org/wiki/George_Gordon,_1s�t_Duke_of_GordonX���d died Helmdon, Northants.

Yeoman far�mer, widower.

Married 2/12/1841 to Sa���rah Freeman, Helmdon, Northampton.
Born� 1801, d. Dec 14, 1884.

Father Charle���s Fairbrother, yeoman.


L� Stefan Dessler 2018T���lbourne, AustraliaV� Wiesbaden, Germany

Married 28 May 20���11f� Arnold Robbins.Children Beverley, Phill���ip, Patricia Robbins (twins)L� Thomas Roy Dinis Griffin Children Roy G���ilbert ( married Susan Avery, child Benj�amin Robert, Aspergers )Brian ( lives in��� FOD, children ... )T�nemouth

Married Joyce Cammock, Whitby���, Yorkshire, 1945. Madeline daughter??
�
Died in Barnstaple ( Witheridge, Devon��� ).

Lived in St Kitts / Nevis for som�e time ( agricultural commissioner?? ).A���e (Ted) IngramZ� Marit b. 5 Sep 1921, d. 5 Apr 2011 ( No���rwegian, m. 22 Feb 1946 ) Children: John�, Keith, Eric.Doctor.On 1939 census as m���edical student, living in Morpeth ( Thre�eways ).£27,749 probate.O���ay) Isabelle\�abelle Born Knaresborough, Yorkshire 29 ���Jan 1914.

Birth not registered until �1915.

Died Faringdon, Wantage, Berksh���ire.

Worked as schools inspector.D� China, died in South Africa. Married Lo���uisa Mary Smith.X�gin. Banker, Married Fanny Caroline Shan���k in Kanoor, Madras, India, Dec 31, 1921@� China. Died in Aberdeen, Mar 25, 1959. ���May 2, 1921 passed midwifry exam.G�rwich. Died Tonbridge.R���d Barley Merchant. Left £60,000.G� 8 Mar 1900 at St Faiths, Norfolk to Hor���atio Carter, mariner.

Had a daughter �Kathleen Carter, who knew Sarah and visi���ted frequently.

School-teacher in Not�tinghamshire. Per Sarah.P���became a nurse, married Rex Stansfield, �who was surgeon at Barts.Oа� Alec Cullen (b. Feb 28, 1905, died Jun �25, 1943 in Kanyu prison camp,Thailand).��� Lived in Sutton Courtenay, had lovely g�arden with swimming pool (George) F��� Rev Stephen Band. Died in Singapore 193�9g���ances Mollie\� Sep 1908 in Hong Kong, China. Died Camd���en House, FaringdonU�William Ingram (Robin)R��� Gabrielle Gosset,(  b. May 1, 1921 Aust�ralia, d.  27 Apr 1984, Gloucestershire,��� Rodborough Common) on 18 Oct 1941, Chat�swood, Australia. POW. Died in Glouceste���rshireb�ng Kong, died Wantage, OxfordshireF��� William TheodoreW�pher Roderick GordonT��� Guerrero_� Guerrero_���therSelect^�therDisplay]���therSelect^��therDisplay]*  WHEN t=13 THEN browse.SqlVersionCheck(kind,colid)
    ELSE 'browseSqlInvalidDatatype' 
    END 
ENDI� t=10 THEN browse.SqlContentType(kind,colid)
    WHEN t=11 THEN browse.SqlImage(kind,colid)
    WHEN t=12 THEN browse.SqlFileNa�e.SqlPassword(kind,colid)
    WHEN t=8 THEN browse.SqlFloat(kind,colid)
    WHEN t=9 THEN browse.SqlBinary(kind,colid)
    WHEN0�e(kind,colid)
    WHEN t=5 THEN browse.SqlFile(kind,colid)
    WHEN t=6 THEN browse.SqlBool(kind,colid)
    WHEN t=7 THEN brows�)
  END
  ELSE
  BEGIN
    EXEC web.Redirect( browse.backurl() )
  END
'
ENDs!#�CT ''<p><a href="/browse-Table?'' | browse.tablearg(t) | ''">'' | browse.TableTitle(t) | '' Table</a>''
    EXEC admin.Trailer(�SET sql = ''EXEC '' | cd | ''('' | col | '','' | k | '','' | sys.SingleQuote(ba) | '')''
      EXECUTE( sql )
    END

    SELE"&� browse.Column WHERE RefersTo = t
    BEGIN
      IF cd = ''*'' SET cd = ''browse.ChildDisplay''
      DECLARE sql string
      � | ''&k='' | k | '''| ba |'">Edit</a>'''
  | '

    DECLARE col int, cd string
    FOR col = Id, cd = ChildDisplayFunction FROM%'�' | cols | ' FROM ' | sys.TableName(table) | ' WHERE Id = k'
  | ' SELECT ''<p><a href="/browse-EditRow?'' | browse.tablearg(t)� '' | ' | namefunc | '(k)' END | '
      EXEC admin.Head( title )
      SELECT ''<b>'' | title | ''</b><br>''
  '
  | ' SELECT $,�    BEGIN
      DECLARE title string SET title = browse.TableTitle( t )' 
        | CASE WHEN namefunc = '' THEN '' ELSE ' | ''� SET ba = '|sys.SingleQuote(ba)|'

    DECLARE ok int SET ok = Id FROM ' | sys.TableName(table) | ' WHERE Id = k
    IF ok = k
)+�.Table WHERE Id = table

  RETURN '  
    DECLARE t int SET t = '|table|'
    DECLARE k int SET k = '|k|'
    DECLARE ba string�| col | ')' | '|''</a>''' 
        ELSE col
        END
  END
  DECLARE namefunc string SET namefunc = *NameFunction FROM browse*.�
        WHEN nf != '' THEN '''<a href="/browse-Row?' | browse.tablearg(ref)| '&k=''|' | col | '|''' | ba | '">''|' | nf | '(' �' ELSE ' | ' END
      | '''<p>' | label | ': '' | '
      | CASE 
        WHEN datatype != 0 THEN browse.Sql(2,colid,datatype)-/f > 0 SET nf = NameFunction FROM browse.Table WHERE Id = ref ELSE SET nf = ''
    SET cols |= 
      CASE WHEN cols = '' THEN '~ datatype = Datatype, label = CASE WHEN Label != '' THEN Label ELSE label END
    FROM browse.Column WHERE Id = colid
    IF re(4}f int, nf string, datatype int, label string SET label = colname
    SET ref = 0, nf = '', datatype = 0
    SET ref = RefersTo,|Name | ')'
    ELSE Name
    END
  FROM sys.Column WHERE Table = table 
  ORDER BY browse.ColPos(Id), Id
  BEGIN
    DECLARE re13{
     '<option ' | CASE WHEN sel = 0 THEN ' selected' ELSE '' END | ' value=0></option>'
     | '</select>'
ENDPzn>'
  F*ROM sys.Schema
  ORDER BY Name
  SET options |= opt
  RETURN '<select id="' | col | '" name="' | col | '">' | options | 28yOR opt = '<option ' | CASE WHEN Id = sel THEN ' selected' ELSE '' END 
  | ' value=' | Id | '>' | web.Encode( Name ) | '</optiox | FILEATTR(x,2)
    IF name = '' BREAK
    SET x = x + 1
  END    
  RETURN ''
ENDl57we="' | cn | '" size="' | cols | '"' | ' value=' | web.Attr(value) | '>'
ENDtvLSE '' END
      | '">' | web.Encode(value) | '</textarea>'
  ELSE
    RETURN browse.Label(colId) | '<input id="' | cn | '" nam69un | '" cols="' | cols | '"' | '" rows="' | rows |'"'
      | CASE WHEN value = '' THEN 'placeholder=' | web.Attr(description) E:tFROM browse.Column WHERE Id = colId
  IF cols = 0 SET cols = 50
  IF rows > 0
    RETURN '<textarea id="' | cn | '" name="' | c'.Schema WHERE Name = 'famt' 
SET rt = 0 SET rt =Id FROM sys.Table WHERE Schema = rs AND Name = 'Person'

INSERT INTO browse.Column(Id,[Position],[Label],[Description],[Refe{rsTo],[Default],[InputCols],[InputRows],[InputFunction],[ChildDisplayFunction],[Datatype]) 
VALUES (cid, 100,'','',rt,'',0,0,'famt.FatherSelect','famt.FatherDisplay',0)
SET cid=Id FROM sys.Column WHERE Table = tid AND Name = 'Surname'
SET rs = 0 SET rs =Id FROM sys.Schema WHERE Name = '' 
SET rt = 0 SET rt =Id FROM sys.Table WH |ERE Schema = rs AND Name = ''

INSERT INTO browse.Column(Id,[Position],[Label],[Description],[RefersTo],[Default],[InputCols],[InputRows],[InputFunction],[ChildDisplayFunction],[Datatype]) 
VALUES (cid, 20,'','',rt,'',0,0,'','',0)
SET cid=Id FROM sys.Column WHERE Table = tid AND Name = 'Firstname'
SET rs = 0 SET rs =Id FROM sy}s.Schema WHERE Name = '' 
SET rt = 0 SET rt =Id FROM sys.Table WHERE Schema = rs AND Name = ''

INSERT INTO browse.Column(Id,[Position],'[Label],[Description],[RefersTo],[Default],[InputCols],[InputRows],[InputFunction],[ChildDisplayFunction],[Datatype]) 
VALUES (cid, 10,'','',rt,'',0,0,'','',0)
SET cid=Id FROM sys.Column WHERE~ Table = tid AND Name = 'Notes'
SET rs = 0 SET rs =Id FROM sys.Schema WHERE Name = '' 
SET rt = 0 SET rt =Id FROM sys.Table WHERE Schema = rs AND Name = ''

INSERT INTO browse.Column(Id,[Position],[Label],[Description],[RefersTo],[Default],[InputCols],[InputRows],[InputFunction],[ChildDisplayFunction],[Datatype]) 
VALUES (cid, 1000,'','',rt,'',0,0,'','',0)
SET cid=Id FROM sys.Column WHERE Table = tid AND Name = 'BirthDate'
SET rs = 0 SET rs =Id FROM sys.Schema WHERE Name = '' 
SET rt = 0 SET rt =Id FROM sys.Table WHERE Schema = rs AND Name = ''

INSERT INTO browse.Column(Id,[Position],[Label],[Description],[RefersTo],[Default],[InputCols],[InputRow"�s],[InputFunction],[ChildDisplayFunction],[Datatype]) 
VALUES (cid, 30,'','',rt,'',0,0,'','',4)
SET cid=Id FROM sys.Co'lumn WHERE Table = tid AND Name = 'DeathDate'
SET rs = 0 SET rs =Id FROM sys.Schema WHERE Name = '' 
SET rt = 0 SET rt =Id FROM sys.Table WHERE Schema = rs AND Name = ''

INSERT INTO browse.Column(Id,[Position�],[Label],[Description],[RefersTo],[Default],[InputCols],[InputRows],[InputFunction],[ChildDisplayFunction],[Datatype]) 
VALUES (cid, 40,'','',rt,'0',0,0,'','',4)
SET cid=Id FROM sys.Column WHERE Table = tid AND Name = 'Version'
SET rs = 0 SET rs =Id FROM sys.Schema WHERE Name = '' 
SET rt = 0 SET rt =Id FROM sys.Table WHERE Sc#!�hema = rs AND Name = ''

INSERT INTO browse.Column(Id,[Position],[Label],[Description],[RefersTo],[Default],[InputCols],[InputRows],[InputFunction],[ChildDisplayFunction],[Datatype]) 
VALUES (cid, 1001,'','',rt,'',0,0,'','',13)
GOhpwuid�o��	e-�0_ne','',934912,0,0)
(63,false,62,0,'Robinson','Sarah Isabella','',954368,0,0)
(64,false,9,12,'Gilbert','Elizabeth','Juliano is fiance, married July 9, 2022.',1018949,0,63862710970890409)
(65,true,9,12,'Gilbert','Nicholas','',1020232,0,0)
(66,true,9,12,'Gilbert','Thomas','Jane is gf from Germany.',1022223,0,0)
(67,true,0,0,'Gord^m Marian Moriarty','',930304,951808,0)
(57,true,0,0,'Thompson','Stephen','',0,0,0)
(58,true,0,0,'(Thompson)','Elizabeth','',918528,0,0)
(59,false,58,57,'Thompson','Margaret Eliza','',935936,0,0)
(60,true,59,56,'Swan','Stephen Moriarty','',952320,0,0)
(61,true,0,0,'Robinson','Jonathan','',932864,0,0)
(62,false,0,0,'Newton','Ja]son','John','',912384,949760,0)
(54,false,50,53,'Robertson','Helen Gordon','',929280,976384,0)
(55,true,0,112,'Swan','William','Wife Mary Baker, b. 1791, they had 13 children.

Gardener, "tree farmer".

She was a laundress.

Per census 1851.

Agricultural labourer in 1861 census.',914432,0,0)
(56,t-rue,0,55,'Swan','Willia\.findagrave.com/memorial/186435802/jessie-robertson

"Natural daughter of Alexander, Duke of Gordon (FES, Vol 6, p 310)."

and

https://archive.org/stream/fastiecclesiaesc06scot#page/310/mode/2up',922197,955171,0)
(51,true,0,0,'Robertson','Charles','',0,0,0)
(52,false,0,0,'Paterson','Helen','',0,0,0)
(53,true,52,51,'Robert[3rd_Duke_of_Gordon',880795,897024,0)
(48,true,43,47,'Gordon','Alexander','https://en.wikipedia.org/wiki/Alexander_Gordon,_4th_Duke_of_Gordon

Married to

https://en.wikipedia.org/wiki/Jane_Gordon,_Duchess_of_Gordon',892626,935633,0)
(49,false,0,0,'Reid','Janet','',0,0,0)
(50,false,49,48,'Gordon','Jessie Ann','See https://wwwZ, 1726.',861315,901419,0)
(46,true,0,67,'Gordon','Alexander','2nd Duke of Gordon. Extensive biography on Wikipedia. Interred in aisle at Trinity Church, Elgin

https://en.wikipedia.org/wiki/Alexander_Gordon,_2nd_Duke_of_Gordon',858284,885116,0)
(47,true,45,46,'Gordon','Cosmo George','ht-tps://en.wikipedia.org/wiki/Cosmo_Gordon,_Yuis of Huntly,born April 27, 1720;
Lord Charles, July 7th, 1721;
Lord Lewis, December 22d 1724;
Lord Adam, January 10th, 1728;
Lady Henrietta born March 10th 1708;
Lady Mary, Febr 6th 1712;
Lady Anne June 5th, 1713;
Lady Elizabeth Febr 14, 1717;
Lady Jean Jan 28, 1719;
Lady Katherine Decem 2d 1723;
Lady Charlotte, Sept 21Xom/memorial/133355131/henrietta-gordon

Parents
Charles Mordaunt
1658–1735

Carey Fraser Mordaunt
1657–1709

Siblings
Henry Mordaunt
unknown–1710

John Mordaunt
1681–1710

George Mordaunt
1685–1685

Anne Gordon Gordon
1713–1791

Cosmo George Gordon
1720–1752

11 children

Cosmos George, MarqWorge','',0,880640,0)
(40,true,0,39,'Gordon','William','',0,893440,0)
(41,true,0,0,'Murray','John','',0,0,0)
(42,false,0,41,'Murray','Susan','',0,893440,0)
(43,false,42,40,'Gordon','Katherine','',879616,910848,0)
(44,true,0,0,'(Peterborough)','(Earl of)','',0,0,0)
(4-5,false,0,44,'Mordaunt','Henrietta','https://www.findagrave.cV0,'Swan','Frances Eva Moriaty','Born Bishop Auckland, Durham.

Married 15th April 1914.

1939 census : unpaid domestic duties, Threeways, Morpeth.

Had brother Stephen Hedley b. 1895. and 5 sisters:
Ethel b. 1885, Margaret b. 1889, Sarah b. 1892, Elspith b. 1900, Muriel b. 1909
',965959,1004032,0)
(39,true,0,0,'Gordon','Ge	Uds and relatives, and was presented with a
silver rose bowl by the Session Clerk on behalf of the congregation and
friends. Robert Gordon died in 1923 aged 80 and is buried in
Pluscarden churchyard."',943616,984925,0)
(36,false,6,5,'Barwood','Sarah','',998400,0,0)
(37,true,6,5,'Barwood','Richard','',999641,0,0)
(38,false,63,6T up a family of six on a stipend of
£60 p.a., but the manse had a well-stocked garden, a glebe, a cow and
two maids! Robert Gordon retired in 1914, having ministered in the
valley for 30 years, and went to live in Huntly. He celebrated his
minister-ial Jubilee in 1922 with his family, his Pluscarden
congregation and many frien
Slth, and he was forced to return
to Scotland in 1883.
In 1884, Robert Gordon was called to minister to the Free Church
congregation in Pluscarden, then meeting in the Priory which it
continued to do for fourteen years, until given notice to quit in January
1898 following the change of ownership.
Robert and Mary Gordon broughtR as a minister in 1872,
and in the same year ordained as a missionary. He spent 10 years in
China which was being opened up as a mission field following the
conclusion of the Opium wars. He married his childhood sweetheart
and several children were born in China before repeated attacks of
cholera and malaria undermined his hea
Qed Free Church.

See https://www.birnie-pluscarden-church.org.uk/wp-content/uploads/2019/02/A-Brief-History-of-Pluscarden-Church.pdf

"The first minister to serve the newly-built church was the Rev
Robert Gordon, and fortunately -we have access to plenty of
information about his life.
Bom in 1843 in Rothiemay, he was licensedP64735,998577,0)
(31,true,0,0,'Gordon','Alexander','',0,0,0)
(32,false,0,0,'Keith','Isobel','',0,0,0)
(33,true,32,31,'Gordon','William','',915968,950272,0)
(34,false,0,0,'Gordon','Jane','',0,0,0)
(35,true,34,33,'Gordon','Robert','Huntley, Aberdeenshire.

Born Rothiemay, Banffsh, per 1891 census.

Minister in Pluscarden UnitOland, Durham.

1891 census : age 7, father Robert Gordon, age 47. Living in Elgin, Moray, Scotland.

Freemason, Waterloo Lodge, Blythe.

Born Edinburgh.

1928, was on boat (Dutch ship Piepercorneliszoonhooft, Netherland Royal Mail Line) from Surabaya, Indonesia to England, with his wife. Arrived 30 June, Southampton.

',9Nford, Norfolk.

Died March 1923, Norwich.',945664,984576,0)
(28,true,27,26,'Barwood','Frederick John','£6,368 probate.',964781,1004683,0)
(29,false,54,21,'Ingram','Mary','',946176,989184,0)
(30,true,29,35,'Gor-don','William Ingram','Died Northumberland

Lived Blythe, Morpeth, Doctor.

Left £47,489.

Married 1914, SunderMied April 1873, Norwich.

Six children, Kate L, 1875, d. 1932 Aylesham, Norfolk.
May F.E. 1878, d. 1938 Nottingham.
Frank Edgar b. 1878, d. 1968 
Albert Edward b. 1881 d. 1971
Freddy
Bessie b. 1887 d. 1952, May 27
',942080,983719,0)
(27,false,0,0,'(Barwood)','Gwen','Susan Turner per 1891 census. 

Born January 1847, ThetLk, near Norwich. Father was a butcher, James, in Great Yarmouth.

Mill burned down ( according to Sarah ). https://en.wikipedia.org/wiki/Horstead_with_Stanninghall

http://www.norfolkmills.co.uk/Watermills/horstead.html

1901 census, miller and merchant, 

Born Clippesby, Norfolk.

Death date is from ancestry.com.

MarrK'Kidman','Elizabeth Jane','Born Tharpenhoe, Bedfordshire. Died Brighton, Sussex.


Married 22 Nov 1882, Ickleford, Hertford, Age 23

Father James Kidman

Spouse Charles Fairbrother',951808,-992014,0)
(25,false,24,23,'Fairbrother','Alice','',965474,1005056,0)
(26,true,0,0,'Barwood','Benjamin','Miller and a merchant in NorfolJhe owned in Church Street, and gave it to the village “to be forever hereafter used as a Reading Room by all the inhabitants of … Helmdon, and also of … Stutchbury, Astwell and Falcutt”, in memory of his parents James and Sarah Fairbrother and others of his family who had lived here."


',943616,989556,0)
(24,false,0,0,Iames son age 2.

Living in Radmore, Wappenham, Northampton.

http://helmdonhistory.com/history/Reading_Room_100_Years_Old.htm

"The Fairbrothers had farmed in Helmdon for I don’t know how long; and then in the nineteenth century they moved away. In 1887 Charles Fairbrother, then of Wappenham, built the Reading Room on land H(23,true,0,69,'Fairbrother','Charles','Born in Helmdon.Died Sussex.


On Felicity''s FT, Giles is father, but seems father was James, whose father was Charles Fairbrother 178-1 - 1856.

In 1871 census, age 28. Farmer 280 acres, employs 8 men, 3 boys.

Age 48 in 1891 census => born 1844.

Mabel daughter age 7, Alice age 5, J,�0G. 1772, Helmdon. 
Married Nov 1, 1742 to Marjorie Gubbins, who died 1780 Helmdon.
Two children at least, George and John.
John was baptised 1705, d. 1756. Buried in wool only.

===

Father of George and John was John Fairbrother d. 1729, married Mary Wyatt.

Three generations of John Fairbrother - confusing.',892416,0,0)
Fgram','William','',927744,972800,0)
(22,true,0,0,'Fairbrother','George','Felicity family tree has Giles, b. 1949.

Son of John Fairbrother and Margory.

Baptised August 1743.

Died 13 Nov, 1803, Helmdon.

Married Jane.

Five children : John, Mary, George, Charles, Suzanna.

===

John Brother was born 1705, Helmdon. dEisbane, 2020',1007747,0,0)
(15,true,0,0,'Ingram','William','',877568,0,0)
(16,false,0,0,'Spence','Elspet','',875520,0,0)
(17,true,16,15,'Ingram','William','',896512,0,0)
(18,false,0,0,'Thompson','Jean','',901632,0,0)
(19,true,18,17,'Ingram','William','',913920,0,0)
(20,false,0,0,'Roy','Mary','',916992,0,,0)
(21,true,20,19,'InDAmanda ) + daughter Kate married to Tyrone with sons Nathan and ...',986238,0,0)
(11,false,0,0,'Hancock','Gwendoline Olive','No brothers, sisters.',987968,0,0)
(12,true,11,10,'Gilbert','Geoff Hancock','',1002748,0,0)
(13,true,11,10,'Gilbert','Michael Richard','',1006431,0,0)
(14,true,11,10,'Gilbert','Kenneth John','Living in BrC
(8,true,6,5,'Barwood','Giles Stephen','Threeways House, Everdon, Daventry, Northamptonshire, NN11 BBL',997641,1027072,0)
(9,false,6,5,'Barwood','Alice Eva','',1004203,0,0)
(10,true,99,98,'Gilbert','Lesley Richard Smale','Married a second time to Lucy nee Dumpleton.

Her children from previous marriage Edward, Robin ( partner B38,30,'Gordon','Phyllis Eva','Married April 1946. TynemouthQualified as a nurse, 23 June 1944 ( registered with General Nursing Council for Scotland, at Royal Infirmary Edinburgh ).Registered to vote 1955, Stert Street, Abingdon.( 65 Stert Street )',982082,1024618,63844481279916392)
(7,fal,se,6,5,'Barwood','Felicity','',996480,0,0)A1,10,'Gilbert','Marilyn Lesley','',1003899,0,0)
(3,false,2,1,'Barwood','Clare Jane','',1020263,0,0)
(4,true,2,1,'Barwood','Ross Phillip','Partner: Hannah Lindo ( New Zealand )',1021197,0,0)
(5,true,25,28,'Barwood','Philip Fairbrother','Died in Towcester ( Alzheimers ). Born Fakenham.',979334,1026096,63844481376081317)
(6,false,@MonthDayToString(DeathDate)
  FROM famt.Person WHERE Id = id
END
GO

INSERT INTO [famt].[Person](Id,[Male],[Mother],[Father],[Surname],[Firstname],[Notes],[BirthDate],[DeathDate],[Version]) VALUES 
(1,true,6,5,'Barwood','George Gordon Fairbrother','This is me. Married August 11, 1991.',1002693,0,63843441331331382)
(2,false,1? col | '">' 
    | options 
    | '<option ' | CASE WHEN sel = 0 THEN ' selected' ELSE '' END | ' value=0></option>'
    | '</select>'
END
GO

CREATE FN [famt].[PersonName]( id int ) RETURNS string AS
BEGIN
  SET result = Firstname | ' ' | Surname | ' ' 
   | da,te.YearMonthDayToString(BirthDate)
   | '-' 
   | date.Year>WHERE Id = PARSEINT(ks)  
  
  FOR opt = '<option ' | CASE WHEN Id = sel THEN ' selected' ELSE '' END 
    | ' value=' | Id | '>' | web.Encode( famt.PersonName(Id) ) | '</option>'
  FROM famt.Person
  WHERE Male = male
  ORDER BY Firstname, Surname
  SET options = options | opt

  RETURN '<select id="' | col | '" name="' |	=id, sel, false)
END
GO

CREATE FN [famt].[ParentSelect]( colid int, sel int, male bool ) RETURNS string AS
BEGIN
  DECLARE col string SET col = Name FROM sys.Column WHERE Id = colid
  DECLARE opt string, options string

  DECLARE by int, k int, ks string SET ks = web.Query( 'k' )
  IF ks != '' SET k = Id FROM famt.Person <

CREATE FN [famt].[MotherDisplay]( colid int, k int, ba string ) AS 
BEGIN
  DECLARE female bool
  SET female = NOT Male FROM famt.Person WHERE Id = k
  IF female EXEC browse.ChildDisplay( colid, k, ba )
END
GO

CREATE FN [famt].[MotherSelect,]( colid int, sel int ) RETURNS string AS
BEGIN
  RETURN famt.ParentSelect(col
; [famt].[FatherDisplay]( colid int, k int, ba string ) AS 
BEGIN
  DECLARE male bool
  SET male = Male FROM famt.Person WHERE Id = k
  IF male EXEC browse.ChildDisplay( colid, k, ba )
END
GO

CREATE FN [famt].[FatherSelect]( colid int, sel int ) RETURNS string AS
BEGIN
  RETURN famt.ParentSelect(colid, sel, true)
END
GO:EXEC web.Main()/admin-ExecutesqlI^
--############################################
CREATE SCHEMA [famt]
GO

CREATE TABLE [famt].[Person]([Male] bool,[Mother] int,[Father] int,[Surname] string,[Firstname] string,[Notes] string,[BirthDate] int,[DeathDate] int,[Version] int) 
GO

CREATE FN
9ah

James, a doctor, b. 13 Feb, 1889, m. April 1923, d. 26 Dec, 1954 
Philip Barwood was executor, £32,388.
Lived at 33 Heath Drive, Hampstead, London.

Married Eleanor Gwendolen Chaloner Smith, b. 1902, d. May 22, 1963.

Joh,n, son?
Peggy = Eleanor or Elanor's daughter.u8is
ministerial Jubilee in 1922 with his family, his Pluscarden
congregation and many friends and relatives, and was presented with a
silver rose bowl by the Session Clerk on behalf of the congregation and
friends. Robert Gordon died in 1923 aged 80 and is buried in
Pluscarden churchyard."g7 to quit in January
1898 following the change of ownership.
Robert and Mary Gordon brought up a family of six on a stipend of
£60 p.a., but the manse had a well-stocked garden, a glebe, a cow and
two maids! Robert Gordon retired in 1914, having ministered in the
valley for 30 years, and went to live in Huntly. He celebrated h6ildren were born in China before repeated attacks of
cholera and malaria undermined his health, and he was forced to return
to Scotland in 1883.
In 1884, Robert Gordon was called to minister to the Free Church
c,ongregation in Pluscarden, then meeting in the Priory which it
continued to do for fourteen years, until given notice5 access to plenty of
information about his life.
Bom in 1843 in Rothiemay, he was licensed as a minister in 1872,
and in the same year ordained as a missionary. He spent 10 years in
China which was being opened up as a mission field following the
conclusion of the Opium wars. He married his childhood sweetheart
and several ch4, Aberdeenshire.

Born Rothiemay, Banffsh, per 1891 census.

Minister in Pluscarden United Free Church.

See https://www.birnie-pluscarden-church.org.uk/wp-content/uploads/2019/02/A-Brief-History-of-Pluscarden-Church.pdf

"The first minister to serve the newly-built church was the Rev
Robert Gordon, and fortunately we have3om ancestry.com.

Married April 1873, Norwich.

Six children, Kate L, 1875, d. 1932 Aylesham, Norfolk.
May F.E. 1878, d. 1938 Nottingham.
Frank Edgar b. 1878, d. 1968 
Albert Edward b. 1881, d. 1971
Freddy
Bessie b. 1887 d. 1952, May 27
�2and a merchant in Norfolk, near Norwich. Father was a butcher, James, in Great Yarmouth.

Mill burned down ( according to Sarah ). https://en.wikipedia.org/wiki/Horstead_with_Stanninghall

http://www.norfolkmills.co.uk/Watermills/horstead.html

1901 census, miller and merchant, 

Born Clippesby, Norfolk.

Death date is fr1.
Two children at least, George and John.
John was baptised 1705, d. 1756. Buried in wool only.

===

Father of George and John was John Fairbrother d. 1729, married Mary Wyatt.

Three generations of John Fairbrother - confusing.�0y family tree has Giles, b. 1949.

Son of John Fairbrother and Margory.

Baptised August 1743.

Died 13 Nov, 1803, Helmdon.

Married Jane.

Five children : John, Mary,, George, Charles, Suzanna.

===

John Brother was born 1705, Helmdon. d. 1772, Helmdon. 
Married Nov 1, 1742 to Marjorie Gubbins, who died 1780 Helmdon+�0/chema = sid ORDER BY Name

  SELECT '<h3>Functions <a href="/admin-NewFunc?s=' | s | ba | '">New Function</a></h3>' 
  SELECT '<p><a href="/admin-EditFunc?s=' | s | '&n=' | Name | ba | '">' | Name | '</a>'
  FROM sys.Function WHERE Schema = sid ORDER BY Name
  EXEC admin.Trailer()
ENDp.Schema ' | s )
  SELECT '<h1>Schema ' | s | '</h1>'

  SELECT '<p><a target=_blank href="/admin-ScriptSchema?s=' | s | '">Script</a>'
 
  SELECT '<h3>Tables <a href="/browse-NewTable?s=' | s | ba | '">New Table</a></h3>'
  SELECT '<p><a href="/browse-Table?' | browse.tablearg(Id) | ba | '">' | Name | '</a>'
  FROM sys.Table WHERE S-BEGIN
  RETURN ''ToDo''
END
' )
    EXEC web.Redirect( '/admin-EditFunc?s=' | s | '&n=' | n )
  END

  EXEC admin.Head( 'New Function' )

  SELECT '<form method=post><p>New Function Name: <input name=n> <input type=submit value="Ok"></form>' 
  EXEC admin.Trailer()

END+, | '<br>DROP TABLE dbo.Cust'
     | '<br>SELECT VERIFYDB()'
     | '<br>SELECT REPACKFILE(0,''dbo'',''Order'')'
     | '<br>EXEC dbo.MakeOrders(50000)'
     | '<br>DELETE FROM dbo.Order WHERE true'
     | '<br>SELECT ''&lt;p>Id='' | Id | '' Len='' | BINLEN(data) FROM log.Transaction'

   EXEC admin.Trailer()
ENDT+kie(''username'',''fred'',''Max-Age=1000000000'')'
     | '<br>EXEC rtest.OneTest()'
     | '<br>CREATE INDEX ByCust ON dbo.Order(Cust)'
     | '<br>DROP INDEX ByCust ON dbo.Order'  
     | '<br>ALTER TABLE dbo.Cust MODIFY FirstName string(20), ADD [City] string, PostCode string'
     | '<br>ALTER TABLE dbo.Cust DROP Postcode'
    *     | '<br>SELECT EMAILTX()'
     | '<br>EXEC date.Test( 2020, 1, 1, 60 )'
     | '<br>EXEC date.TestRoundTrip()'
     | '<br>CREATE TABLE dbo.Cust( LastName string, Age int )'
     | '<br>CREATE FN admin.[/MyPage]() AS BEGIN END'
     | '<br>SELECT ''hash='' | ARGON( ''argon2i!'', ''delic+ious salt'' )'
     | '<br>EXEC web.SetCoo)SETMODE( 0 )
    DECLARE ex string SET ex = EXCEPTION()
    IF ex != '' SELECT '<p>Error : ' | web.Encode(ex)
  END
  SELECT '<p>Example SQL:'
     | '<br>SELECT ''&lt;p>'' | Id | '' '' | sys.TableName(Id) FROM sys.Table'
     | '<br>SELECT dbo.CustName(Id) AS Name, Age FROM dbo.Cust'
     | '<br>SELECT Cust, Total FROM dbo.Order'
( | '<br><textarea name=sql rows=20 cols=100' | CASE WHEN sql='' THEN ' placeholder="Enter SQL here. See Manual for details."' ELSE '' END | '>' | web.Encode(sql) | '</textarea>' 
     | '</form>' 
  IF sql != '' 
  BEGIN
    -- EXEC SETMODE( 1 ) -- Causes result tables to be displayed as HTML tables
    EXECUTE( sql ) 
    -- EXEC '    | '<input type=submit value="ALTER"> <a href=/admin-Schema?s=' | s | '>' | s | '</a> . ' | n 
     | CASE WHEN SUBSTRING(n,1,1) = '/' THEN ' <a href=' | n | '>Go</a>' ELSE '' END
     | '<br><textarea name=def rows=40 cols=150>' | web.Encode(def) | '</textarea>' 
    + | '</form>' 
  EXEC admin.Trailer()
ENDU&tring SET def = web.Form('def')
  IF def != '' 
  BEGIN
    EXECUTE( 'ALTER FN ' | sys.Dot(s,n) | def )
    SET ex = EXCEPTION()
  END
  ELSE SET def = Def FROM sys.Function WHERE Schema = sid AND Name = n 
  EXEC admin.Head( 'Edit ' | n )
  IF ex != '' SELECT '<p>Error: ' | web.Encode( ex )
  SELECT 
     '<p><form method=post>'
 	%' | Id | '>' | web.Encode( email.SmtpAccountName(Id) ) | '</option>'
  FROM email.SmtpAccount
  ORDER BY Id
  SET options |= opt

  RETURN '<select id="' | col | '" name="' | col | '">' | options 
    | '<option ' | CASE WHEN sel = 0 THEN ' selected' ELSE '' END | ' value=0></option>'
    | '</select>'
ENDZ$' | Id | '>' | web.Encode( email.MsgName(Id) ) | '</option>'
  FROM email.Msg
  ORDER BY Id
  SET options |= opt

  RETURN '<select id="' | col | '" name="' | col | '">' | options 
    | '<option ' | CASE WHEN sel = 0 THEN ' selected' ELSE '' END | ' va+lue=0></option>'
    | '</select>'
ENDj
#
  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
END�"HEN n = 2 THEN 'n'
      WHEN n = 3 THEN 'k'
      WHEN n = 4 THEN 'p'
      WHEN n = 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
!| Id | '>' | web.Encode( sys.TableName(Id) ) | '</option>'
  FROM sys.Table
  ORDER BY sys.TableName(Id)
  SET options |= opt
  RETURN '<select id="' | col | '" name="' | col | '">' | options | 
     '<option ' | CASE WHEN sel = 0 THE+N ' selected' ELSE '' END | ' value=0></option>'
     | '</select>'
END\ ng(' | colid | ',' | Name | ')' 
     WHEN kind = 5 OR kind = 6 THEN  'web.Form(' | sys.SingleQuote(Name) | ')' 
     ELSE 'SqlStringBADKIND'
   END

   FROM sys.Column WHERE Id = colid
END�owse.Column WHERE Id = colid

   IF default = '' SET default = ''''''
 
   SET result = CASE
     WHEN kind = 1 THEN 'sys.SingleQuote(web.Encode(' | Name | '))' 
     WHEN kind = 2 THEN 'web.Encode(' | Name | ')' 
     WHEN kind = 3 THEN  'browse.InputString(' | colid | ',' | default | ')'
     WHEN kind = 4 THEN  'browse.InputStri  /* If no new password is entered, leave password unchanged */
     WHEN kind = 6 THEN  'login.Update( ' | Name | ', web.Form(' | sys.SingleQuote(Name) | '),Id)' 
     ELSE 'SqlPasswordBADKIND'
   END

   FROM sys.+Column WHERE Id = colid
END�owse.Column WHERE Id = colid

   IF default = '' SET default = ''''''
 
   SET result = CASE
     WHEN kind = 1 OR kind = 2 THEN Name

     WHEN kind = 3 OR kind = 5 THEN  '' /* Password has to be set after creating user as Id is included as salt */ 

     WHEN kind = 4 THEN  'browse.InputString(' | colid | ',' | '''''' | ')' 

    5 THEN  'browse.InsertFileName(' | colid | ')'
     WHEN kind = 6 THEN  'web.Form(' | sys.SingleQuote(Name) | ')' 
     ELSE 'SqlFileNameBADKIND'
   END

   FROM sys.Column WHERE Id = colid
END�owse.Column WHERE Id = colid

   IF default = '' SET default = ''''''
 
   SET result = CASE
     WHEN kind = 1 THEN 'sys.SingleQuote(web.Encode(' | Name | '))' 
     WHEN kind = 2 THEN 'web.Encod+e(' | Name | ')' 
     WHEN kind = 3 THEN  ''
     WHEN kind = 4 THEN  'browse.InputString(' | colid | ',' | Name | ')' 
     WHEN kind =MonthDay(' | colid | ',' | Name | ')'
     WHEN kind = 5 OR kind = 6 THEN  'date.StringToYearMonthDay(web.Form(' | sys.SingleQuote(Name) | '))' 
     ELSE 'SqlDateBADKIND'
   END

   FROM sys.Column WHERE Id = colid
END� '' THEN 'date.DaysToYearMonthDay(date.Today())' ELSE Default END
   FROM browse.Column WHERE Id = colid
  
   SET result = CASE
     WHEN kind = 1 OR kind = 2 THEN 'date.YearMonthDayToString(' | Name | ')' 
     WHEN kind = 3 THEN  'browse.InputYearMonthDay(' | colid | ',' | default | ')'
     WHEN kind = 4 THEN  'browse.InputYear  ELSE 'browse.Label(' | colId | ') | ' | inf | '(' | colId | ',' | sys.QuoteName(col) | ')'
        END

    IF inp != ''
    BEGIN
      SET sql |= CASE WHEN sql = '' THEN '' +ELSE ' | ' END | inp
    END
  END
  RETURN 'SELECT ' | sql | ' FROM ' | sys.TableName( table ) | ' WHERE Id =' | k
ENDeved here."


�)@XBarwood�George g�This ish�L6�ʉE��
GilbertMarilyn Lesley{QBarwood
Clare Janeg�BarwoodRoss Phillip�Partneri
�Barwood�Philip j�Died ink��0��UJ�7��&GordonPhyllis Eva�Married�B�j�h���7��BarwoodFelicity�4Barwood
Giles Stephen�Threewam	9�	Barwood	Alice Eva�R
cbGilbert�Lesley o�Marriedp~	)Hancock�Gwendolu�No brotv@
Gilbert
Geoff Hancock�L


GilbertMichael Richard_[
GilbertKenneth John�Living w�`
IngramWilliamd
SpenceElspet\
IngramWilliam�
ThompsonJean�
IngramWilliam�
RoyMary�
)IngramWilliam(�FairbrotherGeorge�Felicit0�
EFairbrotherCharles�Born inftKidmanElizabeth Jane�Born Thx�#FairbrotherAliceb�VBarwoodBenjamin�Miller 2`�	(Barwood)Gwen�Susan T�nBarwoodFrederick John�£6,368|���T6IngramMaryp#GordonWilliam Ingram�Died No���<Gordon)	Alexander KeithIsobel0! GordonWilliam�
�"GordonJane#!#"!GordonRobert�Huntley4f]$BarwoodSarah<&"%BarwoodRichard�@&?<Swan�Frances}�Born Bi�G�R'%'GordonGeorgep
('GordonWilliam�
,$)MurrayJohn)*)MurraySusan�
+)+*(Gordon	Katherinel
�
,(Peterborough)	(Earl of).*-,Mordaunt	Henrietta�https:/��$
+�
.CGordon	Alexander�2nd Duk~�
|�
/-/-.GordonCosmo George�https:/��p
�
0+/Gordon	Alexander�https:/�Ҟ
�F8(1ReidJanet210Gordon
Jessie Ann�See htt�U#�313	RobertsonCharles)4PatersonHelen62543	RobertsonJohn�
~625	RobertsonHelen Gordon.�757pSwanWilliam�Wife Ma��
87Swan�William�2�<49ThompsonStephen:
(Thompson)	Elizabeth;9;:9ThompsonMargaret ElizaH<;8Swan�Stephen��>:=RobinsonJonathan<)>NewtonJaneD?=?>RobinsonSarah Isabella�@	Gilbert	Elizabeth�Juliano�E��8����` A	GilbertNicholasH�B	GilbertThomas�Jane is��CACGordonGeorge�https:/���i
DBarwoodAnthony John�https:/����FBEFFairbrotherJames�Born an���FFairbrotherCharles�Married��
�GEGHRussell	ElizabethH)RussellHenryLDIGBarwoodHarryJGBarwoodSophieKIKGBarwoodRupertLStuart-PenninkRichardNJM$LStuart-PenninkLucyN$LStuart-PenninkEmily�Married�OMO$LStuart-PenninkJamesPVinnieLaurenceXHQMPVinnieThai��RMP)VinnieRuben��SQSMPVinnieJacks�TMPVinnieJasmin'�VRUaOStuart-PenninkMiaVaOStuart-PenninkTomWUWLynchAlicia J�Born Me�BxXWGilbert	SebastianBorn Bankok9�\TYWGilbertTristanBorn BankokM�Z[GilbertAlexC�[Y[	SchneiderMiriam�Born in�Hg\Askew)SherrieJune 1, 1991�e^Z]\
GilbertJack�Born Ba�
�^\
GilbertMollieBorn Barnstable��_]_\
GilbertHarry=�`\
GilbertSamuel��pPaAnnabGilbertRichard William7�b�z{��7��cacSmaleLouisa��lg7E�7��dcbGilbertMarion�Married�*̲C�B�7��fbecbGilbertBarbara�Married�m����7��f&Gordon
Ian Robert)�Born Ty�%	��geg&Gordon�Theodor��Married�B�
[+��7��h&Gordon�Mary (M��Mary Is�=�`�ldiTestTestjiTestTestkik#GordonRobert Douglas�Born in��}^q���W��l#GordonCharles Lennox�Born El���C�W��njm#GordonFrances�Born in��yN��x�W��nFairbrotherJames�Per Sar9M��EomoBarwoodBessie�Born No���@pSwanStephen)�
:�hqBarwoodMay�Got a B��+$rBarwoodFrank Edgar�Feed an��+`sqsBarwoodAlbertt�`ftBarwoodKate Louise�Married��`vruBarwoodBessie��@v
StansfieldMabel�Mabel, �wuwx]GilbertOliviaC�yj91���xJohnsVicky>�*���|tyz�BandAda Dorothy�Married�������ǘW��z#Gordon
Helen Jane�Married� � &)�2a�U��{y{|gGordonJohn EdwardS?<'!$E��|HjersingMarit Elise	Norwegian%��n�j E��~z}~fGordonMadeline�5�<�9E��~CammockJoyce*��e�8E��}|gGordon
Keith Otto9q�9vE���|gGordonEric Ingram�6�g"{E���x�z�Band�Mary Fr��Born 29�=�a�A.I3V���BandRev Stephen�� *�͑V�����z�Band�Robert ��Married��N�0�9\���z�BandLouisa Margaret�Born Ho�5������%V����)�yCullen�Stephen��Married���V&��W���yCullen�Christo��Married��V���W�����#GordonAda Mary
Born in China���W���#GordonRosie��x�g�W�����@��Puccini�Mateo7�('ێ������Puccini�JulianoVenezualean��r2#������x]GilbertArchie���H�)���date.Ticks()�browse.f>x�famt.Mo��famt.Mo�?d�famt.Fa��famt.Fa�@A
B�CD(0 E�
�

FatherDisplay�( colid int, k int, ba string ) AS 
BEGIN
  DECLARE male bool
  SET male = Male FROM famt.Person WHERE Id = k
  IF male EXEC browse.ChildDisplay( colid, k, ba )
END�
FatherSelectb( colid int, sel int ) RETURNS string AS
BEGIN
  RETURN famt.ParentSelect(colid, sel, true)
END�

MotherDisplay�( colid int, k int, ba string ) AS 
BEGIN
  DECLARE female bool
  SET female = NOT Male FROM famt.Person WHERE Id = k
  IF female EXEC browse.ChildDisplay( colid, k, ba )
END�
MotherSelectc( colid int, sel int ) RETURNS string AS
BEGIN
  RETURN famt.ParentSelect(colid, sel, false)
END �
ParentSelect�( colid int, sel int, male bool ) RETURNS string AS
BEGIN
  DECLARE col string SET col = Name FROM sys.Column WHERE Id = colid
  DECLARE opt string, options string

  DECLARE by int, k int, ks string SET ks = web.Query( 'k' )
  IF ks !�!�

PersonName�( id int ) RETURNS string AS
BEGIN
  SET result = Firstname | ' ' | Surname | ' ' 
   | date.YearMonthDayToString(BirthDate)
   | '-' 
   | date.YearMonthDayToString(DeathDate)
  FROM famt.Person WHERE Id = id
ENDMotherSelect�ParentSelect�
PersonName