r2430 Add multiple objects are refactored to post-regirect-get pattern
[racktables] / inc / navigation.php
CommitLineData
b325120a 1<?php
e673ee24
DO
2/*
3*
4* This file implements generic navigation for RackTables.
5*
6*/
7
83dd1b15
DO
8$page = array();
9$tab = array();
83dd1b15
DO
10$trigger = array();
11$ophandler = array();
81bab70c 12$tabhandler = array();
2f48b72b
DO
13$tabextraclass = array();
14$delayauth = array();
baf37d01 15$msgcode = array();
83dd1b15 16
eebf9145 17$page['index']['title'] = 'Main page';
e673ee24
DO
18$page['index']['handler'] = 'renderIndex';
19
eebf9145 20$page['rackspace']['title'] = 'Rackspace';
e673ee24
DO
21$page['rackspace']['parent'] = 'index';
22$tab['rackspace']['default'] = 'Browse';
345fd640 23$tab['rackspace']['edit'] = 'Manage rows';
e673ee24 24$tab['rackspace']['history'] = 'History';
8b6ffe9c 25$tabhandler['rackspace']['default'] = 'renderRackspace';
345fd640 26$tabhandler['rackspace']['edit'] = 'renderRackspaceRowEditor';
8b6ffe9c 27$tabhandler['rackspace']['history'] = 'renderRackspaceHistory';
345fd640
AD
28$ophandler['rackspace']['edit']['addRow'] = 'addRow';
29$ophandler['rackspace']['edit']['updateRow'] = 'updateRow';
9f14a7ef 30$ophandler['rackspace']['edit']['delete'] = 'deleteRow';
135080d8
DO
31$msgcode['addRow']['OK'] = 74;
32$msgcode['addRow']['ERR'] = 100;
33$msgcode['updateRow']['OK'] = 75;
34$msgcode['updateRow']['ERR'] = 100;
8628ae44 35$msgcode['deleteRow']['OK'] = 77;
9f14a7ef 36$msgcode['deleteRow']['ERR'] = 100;
e673ee24 37
eebf9145 38$page['objects']['title'] = 'Objects';
e673ee24
DO
39$page['objects']['parent'] = 'index';
40$tab['objects']['default'] = 'View';
216c84bb 41$tab['objects']['addmore'] = 'Add more';
7cc02fc1 42$tabhandler['objects']['default'] = 'renderObjectSpace';
216c84bb 43$tabhandler['objects']['addmore'] = 'renderAddMultipleObjectsForm';
42d73cbf
DY
44$ophandler['objects']['addmore']['addObjects'] = 'addMultipleObjects';
45$ophandler['objects']['addmore']['addLotOfObjects'] = 'addLotOfObjects';
52b34485 46$ophandler['objects']['default']['deleteObject'] = 'deleteObject';
135080d8
DO
47$msgcode['deleteObject']['OK'] = 76;
48$msgcode['deleteObject']['ERR'] = 100;
e673ee24 49
eebf9145 50$page['row']['title_handler'] = 'dynamic_title_row';
e673ee24 51$page['row']['bypass'] = 'row_id';
8b6ffe9c 52$page['row']['bypass_type'] = 'uint';
e673ee24
DO
53$page['row']['parent'] = 'rackspace';
54$tab['row']['default'] = 'View';
55$tab['row']['newrack'] = 'Add new rack';
eb6ea26f 56$tab['row']['tagroller'] = 'Tag roller';
8b6ffe9c
DO
57$tabhandler['row']['default'] = 'renderRow';
58$tabhandler['row']['newrack'] = 'renderNewRackForm';
2f32cc32 59$tabhandler['row']['tagroller'] = 'renderTagRollerForRow';
eb6ea26f 60$ophandler['row']['tagroller']['rollTags'] = 'rollTags';
f19c75d6 61$ophandler['row']['newrack']['addRack'] = 'addRack';
135080d8
DO
62$msgcode['rollTags']['OK'] = 67;
63$msgcode['rollTags']['ERR'] = 149;
64$msgcode['addRack']['OK'] = 65;
65$msgcode['addRack']['ERR1'] = 171;
66$msgcode['addRack']['ERR2'] = 172;
e673ee24 67
eebf9145 68$page['rack']['title_handler'] = 'dynamic_title_rack';
e673ee24 69$page['rack']['bypass'] = 'rack_id';
8b6ffe9c 70$page['rack']['bypass_type'] = 'uint';
e673ee24 71$page['rack']['parent'] = 'row';
41bd8c87
DO
72$page['rack']['tagloader'] = 'loadRackTags';
73$page['rack']['autotagloader'] = 'loadRackAutoTags';
e673ee24
DO
74$tab['rack']['default'] = 'View';
75$tab['rack']['edit'] = 'Properties';
76$tab['rack']['design'] = 'Design';
77$tab['rack']['problems'] = 'Problems';
41bd8c87 78$tab['rack']['tags'] = 'Tags';
e1ae3fb4 79$tab['rack']['files'] = 'Files';
8b6ffe9c
DO
80$tabhandler['rack']['default'] = 'renderRackPage';
81$tabhandler['rack']['edit'] = 'renderEditRackForm';
82$tabhandler['rack']['design'] = 'renderRackDesign';
83$tabhandler['rack']['problems'] = 'renderRackProblems';
482c7f35
DO
84$tabhandler['rack']['tags'] = 'renderEntityTags';
85$tabhandler['rack']['files'] = 'renderFilesForEntity';
41bd8c87 86$trigger['rack']['tags'] = 'trigger_tags';
4fbb5a00
DY
87$ophandler['rack']['design']['updateRack'] = 'updateRackDesign';
88$ophandler['rack']['problems']['updateRack'] = 'updateRackProblems';
7056988c 89$ophandler['rack']['edit']['updateRack'] = 'updateRack';
3355ca56 90$ophandler['rack']['tags']['saveTags'] = 'saveEntityTags';
e1ae3fb4 91$ophandler['rack']['files']['addFile'] = 'addFileToEntity';
e1ae3fb4
AD
92$ophandler['rack']['files']['linkFile'] = 'linkFileToEntity';
93$ophandler['rack']['files']['unlinkFile'] = 'unlinkFile';
94$ophandler['rack']['files']['deleteFile'] = 'deleteFile';
135080d8
DO
95$msgcode['updateRack']['OK'] = 68;
96$msgcode['updateRack']['ERR'] = 177;
97$msgcode['addFileToEntity']['OK'] = 69;
98$msgcode['addFileToEntity']['ERR'] = 100;
99$msgcode['updateFile']['OK'] = 70;
100$msgcode['updateFile']['ERR'] = 100;
101$msgcode['linkFileToEntity']['OK'] = 71;
102$msgcode['linkFileToEntity']['ERR1'] = 178;
103$msgcode['linkFileToEntity']['ERR2'] = 100;
104$msgcode['unlinkFile']['OK'] = 72;
105$msgcode['unlinkFile']['ERR'] = 100;
106$msgcode['deleteFile']['OK'] = 73;
107$msgcode['deleteFile']['ERR'] = 100;
e673ee24 108
eebf9145 109$page['objgroup']['title_handler'] = 'dynamic_title_objgroup';
3aeb15f3 110$page['objgroup']['handler'] = 'renderObjectGroup';
e673ee24 111$page['objgroup']['bypass'] = 'group_id';
105cea6e 112$page['objgroup']['bypass_type'] = 'uint0';
e673ee24 113$page['objgroup']['parent'] = 'objects';
52b34485 114$ophandler['objgroup']['default']['deleteObject'] = 'deleteObject';
e673ee24 115
eebf9145 116$page['object']['title_handler'] = 'dynamic_title_object';
e673ee24 117$page['object']['bypass'] = 'object_id';
3bebaebd 118$page['object']['bypass_type'] = 'uint';
e673ee24 119$page['object']['parent'] = 'objgroup';
2fb24351
DO
120$page['object']['tagloader'] = 'loadRackObjectTags';
121$page['object']['autotagloader'] = 'loadRackObjectAutoTags';
e673ee24
DO
122$tab['object']['default'] = 'View';
123$tab['object']['edit'] = 'Properties';
124$tab['object']['rackspace'] = 'Rackspace';
125$tab['object']['ports'] = 'Ports';
72d8ced3
DO
126$tab['object']['ipv4'] = 'IPv4';
127$tab['object']['nat4'] = 'NATv4';
46f92ff7 128$tab['object']['livevlans'] = 'Live VLANs';
9c67f713 129$tab['object']['snmpportfinder'] = 'SNMP port finder';
0dfaea8e 130$tab['object']['editrspvs'] = 'RS pools';
c030232f 131$tab['object']['lvsconfig'] = 'LVS config';
118e4c38 132$tab['object']['autoports'] = 'AutoPorts';
2fb24351 133$tab['object']['tags'] = 'Tags';
e1ae3fb4 134$tab['object']['files'] = 'Files';
e45a78d7
DO
135$tabhandler['object']['default'] = 'renderRackObject';
136$tabhandler['object']['edit'] = 'renderEditObjectForm';
137$tabhandler['object']['rackspace'] = 'renderRackSpaceForObject';
138$tabhandler['object']['ports'] = 'renderPortsForObject';
72d8ced3
DO
139$tabhandler['object']['ipv4'] = 'renderIPv4ForObject';
140$tabhandler['object']['nat4'] = 'renderNATv4ForObject';
46f92ff7 141$tabhandler['object']['livevlans'] = 'renderVLANMembership';
e45a78d7 142$tabhandler['object']['snmpportfinder'] = 'renderSNMPPortFinder';
3ee1252b 143$tabhandler['object']['lvsconfig'] = 'renderLVSConfig';
118e4c38 144$tabhandler['object']['autoports'] = 'renderAutoPortsForm';
482c7f35
DO
145$tabhandler['object']['tags'] = 'renderEntityTags';
146$tabhandler['object']['files'] = 'renderFilesForEntity';
0dfaea8e 147$tabhandler['object']['editrspvs'] = 'renderObjectSLB';
08b16bf5
DO
148$tabextraclass['object']['snmpportfinder'] = 'attn';
149$tabextraclass['object']['autoports'] = 'attn';
72d8ced3
DO
150$trigger['object']['ipv4'] = 'trigger_ipv4';
151$trigger['object']['nat4'] = 'trigger_natv4';
46f92ff7 152$trigger['object']['livevlans'] = 'trigger_livevlans';
9c67f713 153$trigger['object']['snmpportfinder'] = 'trigger_snmpportfinder';
0dfaea8e 154$trigger['object']['editrspvs'] = 'trigger_natv4';
094bb33c 155$trigger['object']['lvsconfig'] = 'trigger_lvsconfig';
118e4c38 156$trigger['object']['autoports'] = 'trigger_autoports';
91dbb8a3 157$trigger['object']['tags'] = 'trigger_tags';
4fbb5a00 158$ophandler['object']['rackspace']['updateObjectAllocation'] = 'updateObjectAllocation';
e673ee24
DO
159$ophandler['object']['ports']['addPort'] = 'addPortForObject';
160$ophandler['object']['ports']['delPort'] = 'delPortFromObject';
161$ophandler['object']['ports']['editPort'] = 'editPortForObject';
162$ophandler['object']['ports']['linkPort'] = 'linkPortForObject';
163$ophandler['object']['ports']['unlinkPort'] = 'unlinkPortForObject';
164$ophandler['object']['ports']['addMultiPorts'] = 'addMultiPorts';
165$ophandler['object']['ports']['useup'] = 'useupPort';
72d8ced3
DO
166$ophandler['object']['ipv4']['updIPv4Allocation'] = 'updIPv4Allocation';
167$ophandler['object']['ipv4']['addIPv4Allocation'] = 'addIPv4Allocation';
168$ophandler['object']['ipv4']['delIPv4Allocation'] = 'delIPv4Allocation';
22bb04da 169$ophandler['object']['edit']['clearSticker'] = 'clearSticker';
22bb04da 170$ophandler['object']['edit']['update'] = 'updateObject';
72d8ced3
DO
171$ophandler['object']['nat4']['addNATv4Rule'] = 'addPortForwarding';
172$ophandler['object']['nat4']['delNATv4Rule'] = 'delPortForwarding';
173$ophandler['object']['nat4']['updNATv4Rule'] = 'updPortForwarding';
46f92ff7 174$ophandler['object']['livevlans']['setPortVLAN'] = 'setPortVLAN';
f3f0161f 175$ophandler['object']['autoports']['generate'] = 'generateAutoPorts';
3355ca56 176$ophandler['object']['tags']['saveTags'] = 'saveEntityTags';
e1ae3fb4 177$ophandler['object']['files']['addFile'] = 'addFileToEntity';
e1ae3fb4
AD
178$ophandler['object']['files']['linkFile'] = 'linkFileToEntity';
179$ophandler['object']['files']['unlinkFile'] = 'unlinkFile';
180$ophandler['object']['files']['deleteFile'] = 'deleteFile';
0dfaea8e
DO
181$ophandler['object']['editrspvs']['addLB'] = 'addLoadBalancer';
182$ophandler['object']['editrspvs']['delLB'] = 'deleteLoadBalancer';
183$ophandler['object']['editrspvs']['updLB'] = 'updateLoadBalancer';
2987fc1f 184$ophandler['object']['lvsconfig']['submitSLBConfig'] = 'submitSLBConfig';
7056988c 185$ophandler['object']['snmpportfinder']['querySNMPData'] = 'querySNMPData';
46f92ff7 186$delayauth['object']['livevlans']['setPortVLAN'] = TRUE;
135080d8
DO
187$msgcode['addPortForwarding']['OK'] = 2;
188$msgcode['addPortForwarding']['ERR'] = 100;
189$msgcode['delPortForwarding']['OK'] = 3;
190$msgcode['delPortForwarding']['ERR'] = 100;
191$msgcode['updPortForwarding']['OK'] = 4;
192$msgcode['updPortForwarding']['ERR'] = 100;
193$msgcode['addPortForObject']['OK'] = 5;
194$msgcode['addPortForObject']['ERR1'] = 101;
195$msgcode['addPortForObject']['ERR2'] = 100;
196$msgcode['editPortForObject']['OK'] = 6;
197$msgcode['editPortForObject']['ERR1'] = 101;
198$msgcode['editPortForObject']['ERR2'] = 100;
199$msgcode['delPortFromObject']['OK'] = 7;
200$msgcode['delPortFromObject']['ERR'] = 100;
201$msgcode['linkPortForObject']['OK'] = 8;
202$msgcode['linkPortForObject']['ERR'] = 100;
203$msgcode['unlinkPortForObject']['OK'] = 9;
204$msgcode['unlinkPortForObject']['ERR'] = 100;
205$msgcode['addMultiPorts']['OK'] = 10;
206$msgcode['addMultiPorts']['ERR'] = 123;
207$msgcode['useupPort']['OK'] = 11;
208$msgcode['useupPort']['ERR'] = 124;
209$msgcode['updIPv4Allocation']['OK'] = 12;
210$msgcode['updIPv4Allocation']['ERR'] = 100;
211$msgcode['addIPv4Allocation']['OK'] = 13;
212$msgcode['addIPv4Allocation']['ERR1'] = 170;
213$msgcode['addIPv4Allocation']['ERR2'] = 100;
214$msgcode['delIPv4Allocation']['OK'] = 14;
215$msgcode['delIPv4Allocation']['ERR'] = 100;
216$msgcode['clearSticker']['OK'] = 15;
217$msgcode['clearSticker']['ERR'] = 120;
218$msgcode['updateObject']['OK'] = 16;
219$msgcode['updateObject']['ERR'] = 121;
220$msgcode['addLoadBalancer']['OK'] = 18;
221$msgcode['addLoadBalancer']['ERR'] = 137;
222$msgcode['delLoadBalancer']['OK'] = 19;
223$msgcode['deleteLoadBalancer']['ERR'] = 129;
224$msgcode['updateLoadBalancer']['OK'] = 20;
225$msgcode['updateLoadBalancer']['ERR'] = 134;
226$msgcode['generateAutoPorts']['OK'] = 21;
227$msgcode['generateAutoPorts']['ERR'] = 142;
228$msgcode['setPortVLAN']['ERR1'] = 156;
229$msgcode['saveEntityTags']['OK'] = 22;
230$msgcode['saveEntityTags']['ERR'] = 143;
e673ee24 231
eebf9145 232$page['ipv4space']['title'] = 'IPv4 space';
e673ee24
DO
233$page['ipv4space']['parent'] = 'index';
234$tab['ipv4space']['default'] = 'Browse';
0bcdc163 235$tab['ipv4space']['newrange'] = 'Manage';
04d619d0
DO
236$tabhandler['ipv4space']['default'] = 'renderIPv4Space';
237$tabhandler['ipv4space']['newrange'] = 'renderIPv4SpaceEditor';
42023f03
DO
238$ophandler['ipv4space']['newrange']['addIPv4Prefix'] = 'addIPv4Prefix';
239$ophandler['ipv4space']['newrange']['delIPv4Prefix'] = 'delIPv4Prefix';
04d619d0 240$ophandler['ipv4space']['newrange']['updIPv4Prefix'] = 'updIPv4Prefix';
135080d8
DO
241$msgcode['addIPv4Prefix']['OK'] = 23;
242$msgcode['addIPv4Prefix']['ERR'] = 100;
243$msgcode['addIPv4Prefix']['ERR1'] = 173;
244$msgcode['addIPv4Prefix']['ERR2'] = 174;
245$msgcode['addIPv4Prefix']['ERR3'] = 175;
246$msgcode['addIPv4Prefix']['ERR4'] = 176;
247$msgcode['delIPv4Prefix']['OK'] = 24;
248$msgcode['delIPv4Prefix']['ERR'] = 100;
e673ee24 249
e1ae3fb4
AD
250$page['ipv4net']['title_handler'] = 'dynamic_title_ipv4net';
251$page['ipv4net']['parent'] = 'ipv4space';
252$page['ipv4net']['bypass'] = 'id';
253$page['ipv4net']['bypass_type'] = 'uint';
254$page['ipv4net']['autotagloader'] = 'loadIPv4PrefixAutoTags';
255$page['ipv4net']['tagloader'] = 'loadIPv4PrefixTags';
256$tab['ipv4net']['default'] = 'Browse';
257$tab['ipv4net']['properties'] = 'Properties';
258$tab['ipv4net']['liveptr'] = 'Live PTR';
259$tab['ipv4net']['tags'] = 'Tags';
260$tab['ipv4net']['files'] = 'Files';
261$tabhandler['ipv4net']['default'] = 'renderIPv4Network';
262$tabhandler['ipv4net']['properties'] = 'renderIPv4NetworkProperties';
263$tabhandler['ipv4net']['liveptr'] = 'renderLivePTR';
482c7f35
DO
264$tabhandler['ipv4net']['tags'] = 'renderEntityTags';
265$tabhandler['ipv4net']['files'] = 'renderFilesForEntity';
e1ae3fb4
AD
266$trigger['ipv4net']['tags'] = 'trigger_tags';
267$ophandler['ipv4net']['properties']['editRange'] = 'updIPv4Prefix';
268$ophandler['ipv4net']['liveptr']['importPTRData'] = 'importPTRData';
269$ophandler['ipv4net']['tags']['saveTags'] = 'saveEntityTags';
270$ophandler['ipv4net']['files']['addFile'] = 'addFileToEntity';
e1ae3fb4
AD
271$ophandler['ipv4net']['files']['linkFile'] = 'linkFileToEntity';
272$ophandler['ipv4net']['files']['unlinkFile'] = 'unlinkFile';
273$ophandler['ipv4net']['files']['deleteFile'] = 'deleteFile';
135080d8
DO
274$msgcode['updIPv4Prefix']['OK'] = 25;
275$msgcode['updIPv4Prefix']['ERR'] = 100;
276$msgcode['importPTRData']['OK'] = 26;
277$msgcode['importPTRData']['ERR'] = 141;
e673ee24 278
eebf9145 279$page['ipaddress']['title_handler'] = 'dynamic_title_ipaddress';
e1ae3fb4 280$page['ipaddress']['parent'] = 'ipv4net';
e673ee24 281$page['ipaddress']['bypass'] = 'ip';
1fbc9fd6 282$page['ipaddress']['bypass_type'] = 'inet4';
d817ba03 283$page['ipaddress']['autotagloader'] = 'loadIPv4AddressAutoTags';
e673ee24
DO
284$tab['ipaddress']['default'] = 'Browse';
285$tab['ipaddress']['properties'] = 'Properties';
286$tab['ipaddress']['assignment'] = 'Allocation';
7e13adfe 287$tab['ipaddress']['editrslist'] = '[SLB real servers]';
2d318652
DO
288$tabhandler['ipaddress']['default'] = 'renderIPv4Address';
289$tabhandler['ipaddress']['properties'] = 'renderIPv4AddressProperties';
290$tabhandler['ipaddress']['assignment'] = 'renderIPv4AddressAllocations';
1fbc9fd6 291$tabhandler['ipaddress']['editrslist'] = 'dragon';
e673ee24 292$ophandler['ipaddress']['properties']['editAddress'] = 'editAddress';
b4c1ef87
DO
293$ophandler['ipaddress']['assignment']['delIPv4Allocation'] = 'delIPv4Allocation';
294$ophandler['ipaddress']['assignment']['updIPv4Allocation'] = 'updIPv4Allocation';
295$ophandler['ipaddress']['assignment']['addIPv4Allocation'] = 'addIPv4Allocation';
135080d8
DO
296$msgcode['editAddress']['OK'] = 27;
297$msgcode['editAddress']['ERR'] = 100;
e673ee24 298
f973f491
DO
299$page['ipv4slb']['title'] = 'IPv4 SLB';
300$page['ipv4slb']['parent'] = 'index';
301$page['ipv4slb']['handler'] = 'renderIPv4SLB';
302
a239e016
DO
303$page['ipv4vslist']['title'] = 'Virtual services';
304$page['ipv4vslist']['parent'] = 'ipv4slb';
305$tab['ipv4vslist']['default'] = 'View';
306$tab['ipv4vslist']['edit'] = 'Edit';
307$tabhandler['ipv4vslist']['default'] = 'renderVSList';
308$tabhandler['ipv4vslist']['edit'] = 'renderVSListEditForm';
309$ophandler['ipv4vslist']['edit']['add'] = 'addVService';
310$ophandler['ipv4vslist']['edit']['del'] = 'deleteVService';
311$ophandler['ipv4vslist']['edit']['upd'] = 'updateVService';
135080d8
DO
312$msgcode['addVService']['OK'] = 28;
313$msgcode['addVService']['ERR1'] = 132;
314$msgcode['addVService']['ERR2'] = 100;
315$msgcode['deleteVService']['OK'] = 29;
316$msgcode['deleteVService']['ERR'] = 130;
317$msgcode['updateVService']['OK'] = 30;
318$msgcode['updateVService']['ERR'] = 135;
b3c50e6c 319
2bb798a3
DO
320$page['ipv4vs']['title_handler'] = 'dynamic_title_vservice';
321$page['ipv4vs']['parent'] = 'ipv4vslist';
49fb2686 322$page['ipv4vs']['bypass'] = 'vs_id';
2bb798a3
DO
323$page['ipv4vs']['bypass_type'] = 'uint';
324$page['ipv4vs']['tagloader'] = 'loadIPv4VSTags';
325$page['ipv4vs']['autotagloader'] = 'loadIPv4VSAutoTags';
326$tab['ipv4vs']['default'] = 'View';
c9890988 327$tab['ipv4vs']['edit'] = 'Edit';
49fb2686 328$tab['ipv4vs']['editlblist'] = 'Load balancers';
2bb798a3 329$tab['ipv4vs']['tags'] = 'Tags';
e1ae3fb4 330$tab['ipv4vs']['files'] = 'Files';
2bb798a3
DO
331$tabhandler['ipv4vs']['default'] = 'renderVirtualService';
332$tabhandler['ipv4vs']['edit'] = 'renderEditVService';
49fb2686 333$tabhandler['ipv4vs']['editlblist'] = 'renderVServiceLBForm';
482c7f35
DO
334$tabhandler['ipv4vs']['tags'] = 'renderEntityTags';
335$tabhandler['ipv4vs']['files'] = 'renderFilesForEntity';
e1ae3fb4 336$trigger['ipv4vs']['tags'] = 'trigger_tags';
e02e1941 337$ophandler['ipv4vs']['edit']['updIPv4VS'] = 'updateVService';
49fb2686
DO
338$ophandler['ipv4vs']['editlblist']['addLB'] = 'addLoadBalancer';
339$ophandler['ipv4vs']['editlblist']['delLB'] = 'deleteLoadBalancer';
340$ophandler['ipv4vs']['editlblist']['updLB'] = 'updateLoadBalancer';
e1ae3fb4
AD
341$ophandler['ipv4vs']['tags']['saveTags'] = 'saveEntityTags';
342$ophandler['ipv4vs']['files']['addFile'] = 'addFileToEntity';
e1ae3fb4
AD
343$ophandler['ipv4vs']['files']['linkFile'] = 'linkFileToEntity';
344$ophandler['ipv4vs']['files']['unlinkFile'] = 'unlinkFile';
345$ophandler['ipv4vs']['files']['deleteFile'] = 'deleteFile';
c9b4588f 346
ee437dab
DO
347$page['ipv4rsplist']['title'] = 'RS pools';
348$page['ipv4rsplist']['parent'] = 'ipv4slb';
349$tab['ipv4rsplist']['default'] = 'View';
350$tab['ipv4rsplist']['edit'] = 'Edit';
351$tabhandler['ipv4rsplist']['default'] = 'renderRSPoolList';
352$tabhandler['ipv4rsplist']['edit'] = 'editRSPools';
353$ophandler['ipv4rsplist']['edit']['add'] = 'addRSPool';
354$ophandler['ipv4rsplist']['edit']['del'] = 'deleteRSPool';
355$ophandler['ipv4rsplist']['edit']['upd'] = 'updateRSPool';
135080d8
DO
356$msgcode['addRSPool']['OK'] = 31;
357$msgcode['addRSPool']['ERR'] = 100;
358$msgcode['deleteRSPool']['OK'] = 32;
359$msgcode['deleteRSPool']['ERR'] = 138;
360$msgcode['updateRSPool']['OK'] = 33;
361$msgcode['updateRSPool']['ERR'] = 139;
e1ae3fb4
AD
362
363$page['ipv4rspool']['title_handler'] = 'dynamic_title_rspool';
364$page['ipv4rspool']['parent'] = 'ipv4rsplist';
365$page['ipv4rspool']['bypass'] = 'pool_id';
366$page['ipv4rspool']['bypass_type'] = 'uint';
367$page['ipv4rspool']['tagloader'] = 'loadIPv4RSPoolTags';
368$page['ipv4rspool']['autotagloader'] = 'loadIPv4RSPoolAutoTags';
369$tab['ipv4rspool']['default'] = 'View';
370$tab['ipv4rspool']['edit'] = 'Edit';
371$tab['ipv4rspool']['editlblist'] = 'Load Balancers';
372$tab['ipv4rspool']['editrslist'] = 'RS list';
373$tab['ipv4rspool']['rsinservice'] = 'RS in service';
374$tab['ipv4rspool']['tags'] = 'Tags';
375$tab['ipv4rspool']['files'] = 'Files';
376$trigger['ipv4rspool']['rsinservice'] = 'trigger_poolrscount';
377$trigger['ipv4rspool']['tags'] = 'trigger_tags';
378$tabhandler['ipv4rspool']['default'] = 'renderRSPool';
379$tabhandler['ipv4rspool']['edit'] = 'renderEditRSPool';
380$tabhandler['ipv4rspool']['editrslist'] = 'renderRSPoolServerForm';
381$tabhandler['ipv4rspool']['editlblist'] = 'renderRSPoolLBForm';
382$tabhandler['ipv4rspool']['rsinservice'] = 'renderRSPoolRSInServiceForm';
482c7f35
DO
383$tabhandler['ipv4rspool']['tags'] = 'renderEntityTags';
384$tabhandler['ipv4rspool']['files'] = 'renderFilesForEntity';
e1ae3fb4
AD
385$ophandler['ipv4rspool']['edit']['updIPv4RSP'] = 'updateRSPool';
386$ophandler['ipv4rspool']['editrslist']['addRS'] = 'addRealServer';
387$ophandler['ipv4rspool']['editrslist']['delRS'] = 'deleteRealServer';
388$ophandler['ipv4rspool']['editrslist']['updRS'] = 'updateRealServer';
389$ophandler['ipv4rspool']['editrslist']['addMany'] = 'addRealServers';
390$ophandler['ipv4rspool']['editlblist']['addLB'] = 'addLoadBalancer';
391$ophandler['ipv4rspool']['editlblist']['delLB'] = 'deleteLoadBalancer';
392$ophandler['ipv4rspool']['editlblist']['updLB'] = 'updateLoadBalancer';
393$ophandler['ipv4rspool']['rsinservice']['upd'] = 'updateRSInService';
394$ophandler['ipv4rspool']['tags']['saveTags'] = 'saveEntityTags';
395$ophandler['ipv4rspool']['files']['addFile'] = 'addFileToEntity';
e1ae3fb4
AD
396$ophandler['ipv4rspool']['files']['linkFile'] = 'linkFileToEntity';
397$ophandler['ipv4rspool']['files']['unlinkFile'] = 'unlinkFile';
398$ophandler['ipv4rspool']['files']['deleteFile'] = 'deleteFile';
135080d8
DO
399$msgcode['addRealServer']['OK'] = 34;
400$msgcode['addRealServer']['ERR'] = 126;
401$msgcode['deleteRealServer']['OK'] = 35;
402$msgcode['deleteRealServer']['ERR'] = 128;
403$msgcode['updateRealServer']['OK'] = 36;
404$msgcode['updateRealServer']['ERR'] = 133;
405$msgcode['addRealServers']['OK'] = 37;
406$msgcode['addRealServers']['ERR1'] = 131;
407$msgcode['addRealServers']['ERR2'] = 127;
408$msgcode['updateRSInService']['OK'] = 38;
409$msgcode['updateRSInService']['ERR'] = 140;
71b8bda1 410
8253d9f0 411$page['rservers']['title'] = 'Real servers';
f973f491 412$page['rservers']['parent'] = 'ipv4slb';
8253d9f0 413$page['rservers']['handler'] = 'renderRealServerList';
b3c50e6c 414
4b0932b6 415$page['lbs']['title'] = 'Load balancers';
f973f491 416$page['lbs']['parent'] = 'ipv4slb';
4b0932b6 417$page['lbs']['handler'] = 'renderLBList';
b3c50e6c 418
eebf9145 419$page['search']['title_handler'] = 'dynamic_title_search';
3aeb15f3 420$page['search']['handler'] = 'renderSearchResults';
e673ee24
DO
421$page['search']['parent'] = 'index';
422$page['search']['bypass'] = 'q';
423
eebf9145 424$page['config']['title'] = 'Configuration';
3aeb15f3 425$page['config']['handler'] = 'renderConfigMainpage';
e673ee24
DO
426$page['config']['parent'] = 'index';
427
82627005
DO
428$page['userlist']['title'] = 'Users';
429$page['userlist']['parent'] = 'config';
430$tab['userlist']['default'] = 'View';
431$tab['userlist']['edit'] = 'Edit';
432$tabhandler['userlist']['default'] = 'renderUserList';
433$tabhandler['userlist']['edit'] = 'renderUserListEditor';
434$ophandler['userlist']['edit']['updateUser'] = 'updateUser';
435$ophandler['userlist']['edit']['createUser'] = 'createUser';
135080d8
DO
436$msgcode['updateUser']['OK'] = 39;
437$msgcode['updateUser']['ERR1'] = 103;
438$msgcode['updateUser']['ERR1'] = 104;
439$msgcode['createUser']['OK'] = 40;
440$msgcode['createUser']['ERR'] = 102;
82627005
DO
441
442$page['user']['title_handler'] = 'dynamic_title_user';
443$page['user']['parent'] = 'userlist';
444$page['user']['bypass'] = 'user_id';
445$page['user']['bypass_type'] = 'uint';
446$page['user']['tagloader'] = 'loadUserTags';
da958e52 447$page['user']['autotagloader'] = 'getUserAutoTags';
82627005 448$tab['user']['default'] = 'View';
82627005 449$tab['user']['tags'] = 'Tags';
e1ae3fb4 450$tab['user']['files'] = 'Files';
82627005 451$tabhandler['user']['default'] = 'renderUser';
482c7f35
DO
452$tabhandler['user']['tags'] = 'renderEntityTags';
453$tabhandler['user']['files'] = 'renderFilesForEntity';
3355ca56 454$ophandler['user']['tags']['saveTags'] = 'saveEntityTags';
e1ae3fb4 455$ophandler['user']['files']['addFile'] = 'addFileToEntity';
e1ae3fb4
AD
456$ophandler['user']['files']['linkFile'] = 'linkFileToEntity';
457$ophandler['user']['files']['unlinkFile'] = 'unlinkFile';
458$ophandler['user']['files']['deleteFile'] = 'deleteFile';
e673ee24 459
eebf9145 460$page['perms']['title'] = 'Permissions';
e673ee24
DO
461$page['perms']['parent'] = 'config';
462$tab['perms']['default'] = 'View';
82627005
DO
463$tab['perms']['edit'] = 'Edit';
464$tabhandler['perms']['default'] = 'renderRackCodeViewer';
465$tabhandler['perms']['edit'] = 'renderRackCodeEditor';
466$ophandler['perms']['edit']['saveRackCode'] = 'saveRackCode';
135080d8
DO
467$msgcode['saveRackCode']['OK'] = 43;
468$msgcode['saveRackCode']['ERR1'] = 154;
469$msgcode['saveRackCode']['ERR2'] = 155;
e673ee24 470
eebf9145 471$page['portmap']['title'] = 'Port compatibility map';
e673ee24
DO
472$page['portmap']['parent'] = 'config';
473$tab['portmap']['default'] = 'View';
474$tab['portmap']['edit'] = 'Change';
17c32f4c
DO
475$tabhandler['portmap']['default'] = 'renderPortMapViewer';
476$tabhandler['portmap']['edit'] = 'renderPortMapEditor';
e673ee24 477$ophandler['portmap']['edit']['save'] = 'savePortMap';
135080d8
DO
478$msgcode['savePortMap']['OK'] = 44;
479$msgcode['savePortMap']['ERR'] = 108;
e673ee24 480
eebf9145 481$page['attrs']['title'] = 'Attributes';
e673ee24
DO
482$page['attrs']['parent'] = 'config';
483$tab['attrs']['default'] = 'View';
484$tab['attrs']['editattrs'] = 'Edit attributes';
485$tab['attrs']['editmap'] = 'Edit map';
8b6ffe9c
DO
486$tabhandler['attrs']['default'] = 'renderAttributes';
487$tabhandler['attrs']['editattrs'] = 'renderEditAttributesForm';
488$tabhandler['attrs']['editmap'] = 'renderEditAttrMapForm';
e673ee24
DO
489$ophandler['attrs']['editattrs']['add'] = 'createAttribute';
490$ophandler['attrs']['editattrs']['upd'] = 'changeAttribute';
491$ophandler['attrs']['editattrs']['del'] = 'deleteAttribute';
492$ophandler['attrs']['editmap']['add'] = 'supplementAttrMap';
493$ophandler['attrs']['editmap']['del'] = 'reduceAttrMap';
135080d8
DO
494$msgcode['createAttribute']['OK'] = 45;
495$msgcode['createAttribute']['ERR'] = 116;
496$msgcode['changeAttribute']['OK'] = 46;
497$msgcode['changeAttribute']['ERR'] = 115;
498$msgcode['deleteAttribute']['OK'] = 47;
499$msgcode['deleteAttribute']['ERR'] = 117;
500$msgcode['supplementAttrMap']['OK'] = 48;
501$msgcode['supplementAttrMap']['ERR'] = 118;
502$msgcode['reduceAttrMap']['OK'] = 49;
503$msgcode['reduceAttrMap']['ERR'] = 119;
e673ee24 504
eebf9145 505$page['dict']['title'] = 'Dictionary';
e673ee24
DO
506$page['dict']['parent'] = 'config';
507$tab['dict']['default'] = 'View';
e673ee24 508$tab['dict']['chapters'] = 'Manage chapters';
8b6ffe9c 509$tabhandler['dict']['default'] = 'renderDictionary';
8b6ffe9c 510$tabhandler['dict']['chapters'] = 'renderChaptersEditor';
e673ee24
DO
511$ophandler['dict']['chapters']['del'] = 'delChapter';
512$ophandler['dict']['chapters']['upd'] = 'updateChapter';
513$ophandler['dict']['chapters']['add'] = 'addChapter';
135080d8
DO
514$msgcode['delChapter']['OK'] = 53;
515$msgcode['delChapter']['ERR'] = 114;
516$msgcode['updateChapter']['OK'] = 54;
517$msgcode['updateChapter']['ERR'] = 113;
518$msgcode['addChapter']['OK'] = 55;
519$msgcode['addChapter']['ERR'] = 112;
e673ee24 520
4034ab9e
DO
521$page['chapter']['title_handler'] = 'dynamic_title_chapter';
522$page['chapter']['parent'] = 'dict';
523$page['chapter']['bypass'] = 'chapter_no';
524$page['chapter']['bypass_type'] = 'uint';
525$tab['chapter']['default'] = 'View';
526$tab['chapter']['edit'] = 'Edit';
527$tabhandler['chapter']['default'] = 'renderChapter';
528$tabhandler['chapter']['edit'] = 'renderChapterEditor';
529$ophandler['chapter']['edit']['del'] = 'reduceDictionary';
530$ophandler['chapter']['edit']['upd'] = 'updateDictionary';
531$ophandler['chapter']['edit']['add'] = 'supplementDictionary';
532$msgcode['reduceDictionary']['OK'] = 50;
533$msgcode['reduceDictionary']['ERR'] = 111;
534$msgcode['updateDictionary']['OK'] = 51;
535$msgcode['updateDictionary']['ERR'] = 109;
536$msgcode['supplementDictionary']['OK'] = 52;
537$msgcode['supplementDictionary']['ERR'] = 110;
538
eebf9145 539$page['ui']['title'] = 'User interface';
e673ee24 540$page['ui']['parent'] = 'config';
0a1b1268 541$tab['ui']['default'] = 'View';
4fe32e78 542$tab['ui']['edit'] = 'Change';
b07f617c 543$tab['ui']['reset'] = 'Reset';
8b6ffe9c
DO
544$tabhandler['ui']['default'] = 'renderUIConfig';
545$tabhandler['ui']['edit'] = 'renderUIConfigEditForm';
546$tabhandler['ui']['reset'] = 'renderUIResetForm';
4fe32e78 547$ophandler['ui']['edit']['upd'] = 'updateUI';
b07f617c 548$ophandler['ui']['reset']['go'] = 'resetUIConfig';
135080d8
DO
549$msgcode['updateUI']['OK'] = 56;
550$msgcode['updateUI']['ERR'] = 125;
551$msgcode['resetUIConfig']['OK'] = 57;
e673ee24 552
931bf334
DO
553$page['tagtree']['title'] = 'Tag tree';
554$page['tagtree']['parent'] = 'config';
555$tab['tagtree']['default'] = 'View';
49fb1027 556$tab['tagtree']['edit'] = 'Edit';
931bf334
DO
557$tabhandler['tagtree']['default'] = 'renderTagTree';
558$tabhandler['tagtree']['edit'] = 'renderTagTreeEditor';
fe7044ad
DO
559$ophandler['tagtree']['edit']['destroyTag'] = 'destroyTag';
560$ophandler['tagtree']['edit']['createTag'] = 'createTag';
561$ophandler['tagtree']['edit']['updateTag'] = 'updateTag';
135080d8
DO
562$msgcode['destroyTag']['OK'] = 58;
563$msgcode['destroyTag']['ERR'] = 144;
564$msgcode['createTag']['OK'] = 59;
565$msgcode['createTag']['ERR1'] = 145;
566$msgcode['createTag']['ERR2'] = 146;
567$msgcode['createTag']['ERR3'] = 147;
568$msgcode['updateTag']['OK'] = 60;
569$msgcode['updateTag']['ERR1'] = 145;
570$msgcode['updateTag']['ERR2'] = 148;
931bf334 571
9457ca59
DO
572$page['myaccount']['title'] = 'My account';
573$page['myaccount']['parent'] = 'config';
574$tab['myaccount']['default'] = 'Info';
0ac7e4b3
DO
575$tab['myaccount']['mypassword'] = 'Password change';
576$tab['myaccount']['myrealname'] = '[Real name change]';
577$trigger['myaccount']['mypassword'] = 'trigger_passwdchange';
9457ca59
DO
578$tabhandler['myaccount']['default'] = 'renderMyAccount';
579$tabhandler['myaccount']['mypassword'] = 'renderMyPasswordEditor';
0ac7e4b3 580$tabhandler['myaccount']['myrealname'] = 'dragon';
9457ca59 581$ophandler['myaccount']['mypassword']['changeMyPassword'] = 'changeMyPassword';
135080d8
DO
582$msgcode['changeMyPassword']['OK'] = 61;
583$msgcode['changeMyPassword']['ERR1'] = 150;
584$msgcode['changeMyPassword']['ERR2'] = 151;
585$msgcode['changeMyPassword']['ERR3'] = 152;
586$msgcode['changeMyPassword']['ERR4'] = 153;
9457ca59 587
eebf9145 588$page['reports']['title'] = 'Reports';
e673ee24 589$page['reports']['parent'] = 'index';
e5c4506d 590$tab['reports']['default'] = 'System';
88d513cd 591$tab['reports']['rackcode'] = 'RackCode';
09620506 592$tab['reports']['ipv4'] = 'IPv4';
e5c4506d
DO
593$tab['reports']['local'] = 'Local';
594$trigger['reports']['local'] = 'trigger_localreports';
595$tabhandler['reports']['default'] = 'renderSystemReports';
88d513cd 596$tabhandler['reports']['rackcode'] = 'renderRackCodeReports';
09620506 597$tabhandler['reports']['ipv4'] = 'renderIPv4Reports';
e5c4506d 598$tabhandler['reports']['local'] = 'renderLocalReports';
e673ee24 599
e1ae3fb4
AD
600$page['files']['title'] = 'Files';
601$page['files']['parent'] = 'index';
602$tab['files']['default'] = 'View';
603$tab['files']['addmore'] = 'Upload';
604$tabhandler['files']['default'] = 'renderFileSpace';
605$tabhandler['files']['addmore'] = 'renderFileUploadForm';
606$ophandler['files']['addmore']['addFile'] = 'addFileWithoutLink';
135080d8
DO
607$msgcode['addFileWithoutLink']['OK'] = 69;
608$msgcode['addFileWithoutLink']['ERR'] = 100;
e1ae3fb4
AD
609
610$page['filesbylink']['title_handler'] = 'dynamic_title_file';
611$page['filesbylink']['handler'] = 'renderFilesByLink'; //renderObjectGroup
612$page['filesbylink']['bypass'] = 'entity_type';
613$page['filesbylink']['bypass_type'] = 'string';
614$page['filesbylink']['parent'] = 'files';
615$ophandler['filesbylink']['default']['deleteFile'] = 'deleteFile';
616
cd35db83 617$page['file']['title_handler'] = 'dynamic_title_file';
e1ae3fb4
AD
618$page['file']['bypass'] = 'file_id';
619$page['file']['bypass_type'] = 'uint';
f4d879a9 620$page['file']['parent'] = 'files';
e1ae3fb4
AD
621$page['file']['tagloader'] = 'loadFileTags';
622$page['file']['autotagloader'] = 'loadFileAutoTags';
623$tab['file']['default'] = 'View';
6ee41bd4 624$tab['file']['edit'] = 'Properties';
e1ae3fb4 625$tab['file']['tags'] = 'Tags';
8628ae44 626$tab['file']['editText'] = 'Edit text';
e1ae3fb4 627$trigger['file']['tags'] = 'trigger_tags';
8628ae44 628$trigger['file']['editText'] = 'trigger_file_editText';
e1ae3fb4 629$tabhandler['file']['default'] = 'renderFile';
6ee41bd4
DO
630$tabhandler['file']['edit'] = 'renderFileProperties';
631$tabhandler['file']['tags'] = 'renderEntityTags';
8628ae44 632$tabhandler['file']['editText'] = 'renderTextEditor';
6ee41bd4
DO
633$ophandler['file']['default']['replaceFile'] = 'replaceFile';
634$ophandler['file']['edit']['updateFile'] = 'updateFile';
e1ae3fb4 635$ophandler['file']['tags']['saveTags'] = 'saveEntityTags';
8628ae44
DO
636$ophandler['file']['editText']['updateFileText'] = 'updateFileText';
637$msgcode['updateFileText']['OK'] = 78;
638$msgcode['updateFileText']['ERR'] = 179;
e1ae3fb4 639
e673ee24
DO
640// This function returns array if page numbers leading to the target page
641// plus page number of target page itself. The first element is the target
642// page number and the last element is the index page number.
643function getPath ($targetno)
644{
645 global $page;
646 $path = array();
647 // Recursion breaks at first parentless page.
648 if (!isset ($page[$targetno]['parent']))
649 $path = array ($targetno);
650 else
651 {
652 $path = getPath ($page[$targetno]['parent']);
653 $path[] = $targetno;
654 }
655 return $path;
656}
657
658function showPathAndSearch ($pageno)
659{
9c0b0016 660 global $root, $page;
e673ee24 661 // Path.
73635d32 662 echo "<td class=activemenuitem width='99%'>" . getConfigVar ('enterprise');
eebf9145
DO
663 $path = getPath ($pageno);
664 foreach ($path as $no)
e673ee24 665 {
eebf9145
DO
666 $title['params'] = array();
667 if (isset ($page[$no]['title']))
668 $title['name'] = $page[$no]['title'];
669 elseif (isset ($page[$no]['title_handler']))
670 $title = $page[$no]['title_handler']($no);
671 else
672 $title['name'] = '[N/A]';
52c836b1 673 echo ": <a href='${root}?page=${no}&tab=default";
eebf9145
DO
674 foreach ($title['params'] as $param_name => $param_value)
675 echo "&${param_name}=${param_value}";
676 echo "'>" . $title['name'] . "</a>";
e673ee24
DO
677 }
678 echo "</td>";
679 // Search form.
680 echo "<td><table border=0 cellpadding=0 cellspacing=0><tr><td>Search:</td>";
e09e31d5 681 echo "<form name=search method=get action='${root}'><td>";
e673ee24
DO
682 echo '<input type=hidden name=page value=search>';
683 // This input will be the first, if we don't add ports or addresses.
684 echo "<input type=text name=q size=20 tabindex=1000></td></form></tr></table></td>";
685}
686
687function getTitle ($pageno, $tabno)
688{
9c0b0016 689 global $page;
eebf9145
DO
690 if (isset ($page[$pageno]['title']))
691 return $page[$pageno]['title'];
692 elseif (isset ($page[$pageno]['title_handler']))
693 {
694 $tmp = $page[$pageno]['title_handler']($pageno);
695 return $tmp['name'];
696 }
697 else
9c0b0016 698 return getConfigVar ('enterprise');
e673ee24
DO
699}
700
701function showTabs ($pageno, $tabno)
702{
08b16bf5 703 global $tab, $root, $page, $remote_username, $trigger, $tabextraclass;
e673ee24
DO
704 if (!isset ($tab[$pageno]['default']))
705 return;
706 echo "<td><div class=greynavbar><ul id=foldertab style='margin-bottom: 0px; padding-top: 10px;'>";
707 foreach ($tab[$pageno] as $tabidx => $tabtitle)
708 {
709 // Hide forbidden tabs.
810e3422 710 if (!permitted ($pageno, $tabidx))
e673ee24 711 continue;
641fe9b0 712 // Dynamic tabs should only be shown in certain cases (trigger exists and returns true).
545eaaca
DO
713 if (isset ($trigger[$pageno][$tabidx]))
714 {
545eaaca 715 $ok = $trigger[$pageno][$tabidx] ();
545eaaca
DO
716 if (!$ok)
717 continue;
718 }
08b16bf5
DO
719 $class = ($tabidx == $tabno) ? 'current' : 'std';
720 $extra = (isset ($tabextraclass[$pageno][$tabidx])) ? $tabextraclass[$pageno][$tabidx] : '';
721 echo "<li><a class=${class}{$extra}";
e673ee24
DO
722 echo " href='${root}?page=${pageno}&tab=${tabidx}";
723 if (isset ($page[$pageno]['bypass']) and isset ($_REQUEST[$page[$pageno]['bypass']]))
724 {
725 $bpname = $page[$pageno]['bypass'];
726 $bpval = $_REQUEST[$bpname];
727 echo "&${bpname}=${bpval}";
728 }
729 echo "'>${tabtitle}</a></li>\n";
730 }
731 echo "</ul></div></td>\n";
732}
733
734// This function returns pages, which are direct children of the requested
735// page and are accessible by the current user.
736function getDirectChildPages ($pageno)
737{
738 global $page, $remote_username;
739 $children = array();
740 foreach ($page as $cpageno => $cpage)
741 if
742 (
743 isset ($cpage['parent']) and
00f887f4 744 $cpage['parent'] == $pageno
e673ee24
DO
745 )
746 $children[$cpageno] = $cpage;
747 return $children;
748}
749
750function getAllChildPages ($parent)
751{
752 global $page;
753 // Array pointer is global, so if we don't create local copies of
754 // the global array, we can't advance any more after nested call
755 // of getAllChildPages returns.
756 $mypage = $page;
757 $mykids = array();
758 foreach ($mypage as $ctitle => $cpage)
759 if (isset ($cpage['parent']) and $cpage['parent'] == $parent)
760 $mykids[] = array ('title' => $ctitle, 'kids' => getAllChildPages ($ctitle));
761 return $mykids;
762}
763
764?>