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