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