16b7937e54d66ad01af80bd8b609438f34255d52
[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
14 $page['index']['title'] = 'Main page';
15 $page['index']['handler'] = 'renderIndex';
16
17 $page['rackspace']['title'] = 'Rackspace';
18 $page['rackspace']['parent'] = 'index';
19 $tab['rackspace']['default'] = 'Browse';
20 $tab['rackspace']['history'] = 'History';
21 $tab['rackspace']['firstrow'] = 'Click me!';
22 $trigger['rackspace']['firstrow'] = 'trigger_emptyRackspace';
23 $tabhandler['rackspace']['default'] = 'renderRackspace';
24 $tabhandler['rackspace']['history'] = 'renderRackspaceHistory';
25 $tabhandler['rackspace']['firstrow'] = 'renderFirstRowForm';
26 $tabextraclass['rackspace']['firstrow'] = 'attn';
27
28 $page['objects']['title'] = 'Objects';
29 $page['objects']['parent'] = 'index';
30 $tab['objects']['default'] = 'View';
31 $tab['objects']['newobj'] = 'Add an object';
32 $tab['objects']['newmulti'] = 'Add multiple objects';
33 $tabhandler['objects']['default'] = 'renderObjectGroupSummary';
34 $tabhandler['objects']['newobj'] = 'renderNewObjectForm';
35 $tabhandler['objects']['newmulti'] = 'renderAddMultipleObjectsForm';
36
37 $page['row']['title_handler'] = 'dynamic_title_row';
38 $page['row']['bypass'] = 'row_id';
39 $page['row']['bypass_type'] = 'uint';
40 $page['row']['parent'] = 'rackspace';
41 $tab['row']['default'] = 'View';
42 $tab['row']['newrack'] = 'Add new rack';
43 $tabhandler['row']['default'] = 'renderRow';
44 $tabhandler['row']['newrack'] = 'renderNewRackForm';
45
46 $page['rack']['title_handler'] = 'dynamic_title_rack';
47 $page['rack']['bypass'] = 'rack_id';
48 $page['rack']['bypass_type'] = 'uint';
49 $page['rack']['parent'] = 'row';
50 $page['rack']['tagloader'] = 'loadRackTags';
51 $page['rack']['autotagloader'] = 'loadRackAutoTags';
52 $tab['rack']['default'] = 'View';
53 $tab['rack']['edit'] = 'Properties';
54 $tab['rack']['design'] = 'Design';
55 $tab['rack']['problems'] = 'Problems';
56 $tab['rack']['tags'] = 'Tags';
57 $tabhandler['rack']['default'] = 'renderRackPage';
58 $tabhandler['rack']['edit'] = 'renderEditRackForm';
59 $tabhandler['rack']['design'] = 'renderRackDesign';
60 $tabhandler['rack']['problems'] = 'renderRackProblems';
61 $tabhandler['rack']['tags'] = 'renderRackTags';
62 $trigger['rack']['tags'] = 'trigger_tags';
63 $ophandler['rack']['tags']['save'] = 'saveRackTags';
64
65 $page['objgroup']['title_handler'] = 'dynamic_title_objgroup';
66 $page['objgroup']['handler'] = 'renderObjectGroup';
67 $page['objgroup']['bypass'] = 'group_id';
68 $page['objgroup']['bypass_type'] = 'uint';
69 $page['objgroup']['parent'] = 'objects';
70
71 $page['object']['title_handler'] = 'dynamic_title_object';
72 $page['object']['bypass'] = 'object_id';
73 $page['object']['bypass_type'] = 'uint';
74 $page['object']['parent'] = 'objgroup';
75 $page['object']['tagloader'] = 'loadRackObjectTags';
76 $page['object']['autotagloader'] = 'loadRackObjectAutoTags';
77 $tab['object']['default'] = 'View';
78 $tab['object']['edit'] = 'Properties';
79 $tab['object']['rackspace'] = 'Rackspace';
80 $tab['object']['ports'] = 'Ports';
81 $tab['object']['network'] = 'IPv4';
82 $tab['object']['portfwrd'] = 'NATv4';
83 $tab['object']['switchvlans'] = 'Live VLANs';
84 $tab['object']['snmpportfinder'] = 'SNMP port finder';
85 $tab['object']['slb'] = '[SLB]';
86 $tab['object']['lvsconfig'] = 'LVS configuration';
87 $tab['object']['autoports'] = 'AutoPorts';
88 $tab['object']['tags'] = 'Tags';
89 $tabhandler['object']['default'] = 'renderRackObject';
90 $tabhandler['object']['edit'] = 'renderEditObjectForm';
91 $tabhandler['object']['rackspace'] = 'renderRackSpaceForObject';
92 $tabhandler['object']['ports'] = 'renderPortsForObject';
93 $tabhandler['object']['network'] = 'renderNetworkForObject';
94 $tabhandler['object']['portfwrd'] = 'renderIPAddressPortForwarding';
95 $tabhandler['object']['switchvlans'] = 'renderVLANMembership';
96 $tabhandler['object']['snmpportfinder'] = 'renderSNMPPortFinder';
97 $tabhandler['object']['lvsconfig'] = 'renderLVSConfig';
98 $tabhandler['object']['autoports'] = 'renderAutoPortsForm';
99 $tabhandler['object']['tags'] = 'renderObjectTags';
100 $tabextraclass['object']['snmpportfinder'] = 'attn';
101 $tabextraclass['object']['autoports'] = 'attn';
102 $trigger['object']['network'] = 'trigger_ipv4';
103 $trigger['object']['portfwrd'] = 'trigger_natv4';
104 $trigger['object']['switchvlans'] = 'trigger_switchvlans';
105 $trigger['object']['snmpportfinder'] = 'trigger_snmpportfinder';
106 $trigger['object']['slb'] = 'trigger_natv4';
107 $trigger['object']['lvsconfig'] = 'trigger_lvsconfig';
108 $trigger['object']['autoports'] = 'trigger_autoports';
109 $trigger['object']['tags'] = 'trigger_tags';
110 $ophandler['object']['ports']['addPort'] = 'addPortForObject';
111 $ophandler['object']['ports']['delPort'] = 'delPortFromObject';
112 $ophandler['object']['ports']['editPort'] = 'editPortForObject';
113 $ophandler['object']['ports']['linkPort'] = 'linkPortForObject';
114 $ophandler['object']['ports']['unlinkPort'] = 'unlinkPortForObject';
115 $ophandler['object']['ports']['addMultiPorts'] = 'addMultiPorts';
116 $ophandler['object']['ports']['useup'] = 'useupPort';
117 $ophandler['object']['network']['editAddressFromObject'] = 'editAddressFromObject';
118 $ophandler['object']['network']['addAddrFObj'] = 'addAddressToObject';
119 $ophandler['object']['network']['delAddrFObj'] = 'delAddressFromObject';
120 $ophandler['object']['edit']['del'] = 'resetAttrValue';
121 $ophandler['object']['edit']['upd'] = 'updateAttrValues';
122 $ophandler['object']['portfwrd']['forwardPorts'] = 'addPortForwarding';
123 $ophandler['object']['portfwrd']['delPortForwarding'] = 'delPortForwarding';
124 $ophandler['object']['portfwrd']['updPortForwarding'] = 'updPortForwarding';
125 $ophandler['object']['autoports']['generate'] = 'generateAutoPorts';
126 $ophandler['object']['tags']['save'] = 'saveObjectTags';
127
128 $page['ipv4space']['title'] = 'IPv4 space';
129 $page['ipv4space']['parent'] = 'index';
130 $tab['ipv4space']['default'] = 'Browse';
131 $tab['ipv4space']['newrange'] = 'Manage';
132 $tabhandler['ipv4space']['default'] = 'renderAddressspace';
133 $tabhandler['ipv4space']['newrange'] = 'renderAddNewRange';
134 $ophandler['ipv4space']['newrange']['addRange'] = 'addNewrange';
135 $ophandler['ipv4space']['newrange']['delRange'] = 'delRange';
136
137 $page['iprange']['title_handler'] = 'dynamic_title_iprange';
138 $page['iprange']['parent'] = 'ipv4space';
139 $page['iprange']['bypass'] = 'id';
140 $page['iprange']['bypass_type'] = 'uint';
141 $page['iprange']['autotagloader'] = 'loadIPv4PrefixAutoTags';
142 $page['iprange']['tagloader'] = 'loadIPv4PrefixTags';
143 $tab['iprange']['default'] = 'Browse';
144 $tab['iprange']['properties'] = 'Properties';
145 $tab['iprange']['liveptr'] = 'Live PTR';
146 $tab['iprange']['tags'] = 'Tags';
147 $tabhandler['iprange']['default'] = 'renderIPRange';
148 $tabhandler['iprange']['properties'] = 'renderIPRangeProperties';
149 $tabhandler['iprange']['liveptr'] = 'renderLivePTR';
150 $tabhandler['iprange']['tags'] = 'renderIPv4PrefixTags';
151 $trigger['iprange']['tags'] = 'trigger_tags';
152 $ophandler['iprange']['properties']['editRange'] = 'editRange';
153 $ophandler['iprange']['liveptr']['import'] = 'importPTRData';
154 $ophandler['iprange']['tags']['save'] = 'saveIPv4PrefixTags';
155
156 $page['ipaddress']['title_handler'] = 'dynamic_title_ipaddress';
157 $page['ipaddress']['parent'] = 'iprange';
158 $page['ipaddress']['bypass'] = 'ip';
159 $page['ipaddress']['autotagloader'] = 'loadIPv4AddressAutoTags';
160 $tab['ipaddress']['default'] = 'Browse';
161 $tab['ipaddress']['properties'] = 'Properties';
162 $tab['ipaddress']['assignment'] = 'Allocation';
163 $tab['ipaddress']['editrslist'] = '[SLB real servers]';
164 $tabhandler['ipaddress']['default'] = 'renderIPAddress';
165 $tabhandler['ipaddress']['properties'] = 'renderIPAddressProperties';
166 $tabhandler['ipaddress']['assignment'] = 'renderIPAddressAssignment';
167 $ophandler['ipaddress']['properties']['editAddress'] = 'editAddress';
168 $ophandler['ipaddress']['assignment']['delIpAssignment'] = 'delIpAssignment';
169 $ophandler['ipaddress']['assignment']['editBondForAddress'] = 'editIpAssignment';
170 $ophandler['ipaddress']['assignment']['bindObjectToIp'] = 'addIpAssignment';
171
172 $page['ipv4slb']['title'] = 'IPv4 SLB';
173 $page['ipv4slb']['parent'] = 'index';
174 $page['ipv4slb']['handler'] = 'renderIPv4SLB';
175
176 $page['vservices']['title'] = 'Virtual services';
177 $page['vservices']['parent'] = 'ipv4slb';
178 $tab['vservices']['default'] = 'View';
179 $tab['vservices']['edit'] = 'Edit';
180 $tabhandler['vservices']['default'] = 'renderVSList';
181 $tabhandler['vservices']['edit'] = 'renderVSListEditForm';
182 $ophandler['vservices']['edit']['add'] = 'addVService';
183 $ophandler['vservices']['edit']['del'] = 'deleteVService';
184 $ophandler['vservices']['edit']['upd'] = 'updateVService';
185
186 $page['vservice']['title_handler'] = 'dynamic_title_vservice';
187 $page['vservice']['parent'] = 'vservices';
188 $page['vservice']['bypass'] = 'id';
189 $page['vservice']['bypass_type'] = 'uint';
190 $page['vservice']['tagloader'] = 'loadIPv4VSTags';
191 $page['vservice']['autotagloader'] = 'loadIPv4VSAutoTags';
192 $tab['vservice']['default'] = 'View';
193 $tab['vservice']['edit'] = '[Edit]';
194 $tab['vservice']['editlblist'] = '[Load balancers]';
195 $tab['vservice']['tags'] = 'Tags';
196 $tabhandler['vservice']['default'] = 'renderVirtualService';
197 $tabhandler['vservice']['tags'] = 'renderIPv4VSTags';
198 $trigger['vservice']['tags'] = 'trigger_tags';
199
200 $page['rspools']['title'] = 'RS pools';
201 $page['rspools']['parent'] = 'ipv4slb';
202 $tab['rspools']['default'] = 'View';
203 $tab['rspools']['edit'] = 'Edit';
204 $tabhandler['rspools']['default'] = 'renderRSPoolList';
205 $tabhandler['rspools']['edit'] = 'editRSPools';
206 $ophandler['rspools']['edit']['add'] = 'addRSPool';
207 $ophandler['rspools']['edit']['del'] = 'deleteRSPool';
208 $ophandler['rspools']['edit']['upd'] = 'updateRSPool';
209
210 $page['rspool']['title_handler'] = 'dynamic_title_rspool';
211 $page['rspool']['parent'] = 'rspools';
212 $page['rspool']['bypass'] = 'id';
213 $page['rspool']['bypass_type'] = 'uint';
214 $page['rspool']['tagloader'] = 'loadIPv4RSPoolTags';
215 $page['rspool']['autotagloader'] = 'loadIPv4RSPoolAutoTags';
216 $tab['rspool']['default'] = 'View';
217 $tab['rspool']['edit'] = '[Edit]';
218 $tab['rspool']['editlblist'] = 'Load Balancers';
219 $tab['rspool']['editrslist'] = 'RS list';
220 $tab['rspool']['rsinservice'] = 'RS in service';
221 $tab['rspool']['tags'] = 'Tags';
222 $trigger['rspool']['rsinservice'] = 'trigger_poolrscount';
223 $trigger['rspool']['tags'] = 'trigger_tags';
224 $tabhandler['rspool']['default'] = 'renderRSPool';
225 $tabhandler['rspool']['editrslist'] = 'renderRSPoolServerForm';
226 $tabhandler['rspool']['editlblist'] = 'renderRSPoolLBForm';
227 $tabhandler['rspool']['rsinservice'] = 'renderRSPoolRSInServiceForm';
228 $tabhandler['rspool']['tags'] = 'renderIPv4RSPoolTags';
229 $ophandler['rspool']['editrslist']['addRS'] = 'addRealServer';
230 $ophandler['rspool']['editrslist']['delRS'] = 'deleteRealServer';
231 $ophandler['rspool']['editrslist']['updRS'] = 'updateRealServer';
232 $ophandler['rspool']['editrslist']['addMany'] = 'addRealServers';
233 $ophandler['rspool']['editlblist']['addLB'] = 'addLoadBalancer';
234 $ophandler['rspool']['editlblist']['delLB'] = 'deleteLoadBalancer';
235 $ophandler['rspool']['editlblist']['updLB'] = 'updateLoadBalancer';
236 $ophandler['rspool']['rsinservice']['upd'] = 'updateRSInService';
237
238 $page['rservers']['title'] = 'Real servers';
239 $page['rservers']['parent'] = 'ipv4slb';
240 $page['rservers']['handler'] = 'renderRealServerList';
241
242 $page['lbs']['title'] = 'Load balancers';
243 $page['lbs']['parent'] = 'ipv4slb';
244 $page['lbs']['handler'] = 'renderLBList';
245
246 $page['search']['title_handler'] = 'dynamic_title_search';
247 $page['search']['handler'] = 'renderSearchResults';
248 $page['search']['parent'] = 'index';
249 $page['search']['bypass'] = 'q';
250
251 $page['config']['title'] = 'Configuration';
252 $page['config']['handler'] = 'renderConfigMainpage';
253 $page['config']['parent'] = 'index';
254
255 $page['accounts']['title'] = 'Accounts';
256 $page['accounts']['parent'] = 'config';
257 $tab['accounts']['default'] = 'View';
258 $tab['accounts']['edit'] = 'Change';
259 $tabhandler['accounts']['default'] = 'renderAccounts';
260 $tabhandler['accounts']['edit'] = 'renderAccountsEditForm';
261 $ophandler['accounts']['edit']['updateAccount'] = 'updateUserAccount';
262 $ophandler['accounts']['edit']['createAccount'] = 'createUserAccount';
263 $ophandler['accounts']['edit']['disableAccount'] = 'disableUserAccount';
264 $ophandler['accounts']['edit']['enableAccount'] = 'enableUserAccount';
265
266 $page['perms']['title'] = 'Permissions';
267 $page['perms']['parent'] = 'config';
268 $tab['perms']['default'] = 'View';
269 $tab['perms']['edit'] = 'Change';
270 $tabhandler['perms']['default'] = 'renderPermissions';
271 $tabhandler['perms']['edit'] = 'renderPermissionsEditForm';
272 $ophandler['perms']['edit']['revoke'] = 'revokePermission';
273 $ophandler['perms']['edit']['grant'] = 'grantPermission';
274
275 $page['portmap']['title'] = 'Port compatibility map';
276 $page['portmap']['parent'] = 'config';
277 $tab['portmap']['default'] = 'View';
278 $tab['portmap']['edit'] = 'Change';
279 $tabhandler['portmap']['default'] = 'renderPortMapViewer';
280 $tabhandler['portmap']['edit'] = 'renderPortMapEditor';
281 $ophandler['portmap']['edit']['save'] = 'savePortMap';
282
283 $page['attrs']['title'] = 'Attributes';
284 $page['attrs']['parent'] = 'config';
285 $tab['attrs']['default'] = 'View';
286 $tab['attrs']['editattrs'] = 'Edit attributes';
287 $tab['attrs']['editmap'] = 'Edit map';
288 $tabhandler['attrs']['default'] = 'renderAttributes';
289 $tabhandler['attrs']['editattrs'] = 'renderEditAttributesForm';
290 $tabhandler['attrs']['editmap'] = 'renderEditAttrMapForm';
291 $ophandler['attrs']['editattrs']['add'] = 'createAttribute';
292 $ophandler['attrs']['editattrs']['upd'] = 'changeAttribute';
293 $ophandler['attrs']['editattrs']['del'] = 'deleteAttribute';
294 $ophandler['attrs']['editmap']['add'] = 'supplementAttrMap';
295 $ophandler['attrs']['editmap']['del'] = 'reduceAttrMap';
296
297 $page['dict']['title'] = 'Dictionary';
298 $page['dict']['parent'] = 'config';
299 $tab['dict']['default'] = 'View';
300 $tab['dict']['edit'] = 'Edit words';
301 $tab['dict']['chapters'] = 'Manage chapters';
302 $tabhandler['dict']['default'] = 'renderDictionary';
303 $tabhandler['dict']['edit'] = 'renderDictionaryEditor';
304 $tabhandler['dict']['chapters'] = 'renderChaptersEditor';
305 $ophandler['dict']['edit']['del'] = 'reduceDictionary';
306 $ophandler['dict']['edit']['upd'] = 'updateDictionary';
307 $ophandler['dict']['edit']['add'] = 'supplementDictionary';
308 $ophandler['dict']['chapters']['del'] = 'delChapter';
309 $ophandler['dict']['chapters']['upd'] = 'updateChapter';
310 $ophandler['dict']['chapters']['add'] = 'addChapter';
311
312 $page['ui']['title'] = 'User interface';
313 $page['ui']['parent'] = 'config';
314 $tab['ui']['default'] = 'View';
315 $tab['ui']['edit'] = 'Change';
316 $tab['ui']['reset'] = 'Reset';
317 $tabhandler['ui']['default'] = 'renderUIConfig';
318 $tabhandler['ui']['edit'] = 'renderUIConfigEditForm';
319 $tabhandler['ui']['reset'] = 'renderUIResetForm';
320 $ophandler['ui']['edit']['upd'] = 'updateUI';
321 $ophandler['ui']['reset']['go'] = 'resetUIConfig';
322
323 $page['tagtree']['title'] = 'Tag tree';
324 $page['tagtree']['parent'] = 'config';
325 $tab['tagtree']['default'] = 'View';
326 $tab['tagtree']['edit'] = 'Change';
327 $tabhandler['tagtree']['default'] = 'renderTagTree';
328 $tabhandler['tagtree']['edit'] = 'renderTagTreeEditor';
329 $ophandler['tagtree']['edit']['destroyTag'] = 'destroyTag';
330 $ophandler['tagtree']['edit']['createTag'] = 'createTag';
331 $ophandler['tagtree']['edit']['updateTag'] = 'updateTag';
332
333 $page['reports']['title'] = 'Reports';
334 $page['reports']['parent'] = 'index';
335 $page['reports']['handler'] = 'renderReportSummary';
336
337 // This function returns array if page numbers leading to the target page
338 // plus page number of target page itself. The first element is the target
339 // page number and the last element is the index page number.
340 function getPath ($targetno)
341 {
342 global $page;
343 $path = array();
344 // Recursion breaks at first parentless page.
345 if (!isset ($page[$targetno]['parent']))
346 $path = array ($targetno);
347 else
348 {
349 $path = getPath ($page[$targetno]['parent']);
350 $path[] = $targetno;
351 }
352 return $path;
353 }
354
355 function showPathAndSearch ($pageno)
356 {
357 global $root, $page;
358 // Path.
359 echo "<td class=activemenuitem width='99%'>" . getConfigVar ('enterprise');
360 $path = getPath ($pageno);
361 foreach ($path as $no)
362 {
363 $title['params'] = array();
364 if (isset ($page[$no]['title']))
365 $title['name'] = $page[$no]['title'];
366 elseif (isset ($page[$no]['title_handler']))
367 $title = $page[$no]['title_handler']($no);
368 else
369 $title['name'] = '[N/A]';
370 echo ": <a href='${root}?page=${no}";
371 foreach ($title['params'] as $param_name => $param_value)
372 echo "&${param_name}=${param_value}";
373 echo "'>" . $title['name'] . "</a>";
374 }
375 echo "</td>";
376 // Search form.
377 echo "<td><table border=0 cellpadding=0 cellspacing=0><tr><td>Search:</td>";
378 echo "<form method=get action='${root}'><td>";
379 echo '<input type=hidden name=page value=search>';
380 // This input will be the first, if we don't add ports or addresses.
381 echo "<input type=text name=q size=20 tabindex=1000></td></form></tr></table></td>";
382 }
383
384 function getTitle ($pageno, $tabno)
385 {
386 global $page;
387 if (isset ($page[$pageno]['title']))
388 return $page[$pageno]['title'];
389 elseif (isset ($page[$pageno]['title_handler']))
390 {
391 $tmp = $page[$pageno]['title_handler']($pageno);
392 return $tmp['name'];
393 }
394 else
395 return getConfigVar ('enterprise');
396 }
397
398 function showTabs ($pageno, $tabno)
399 {
400 global $tab, $root, $page, $remote_username, $trigger, $tabextraclass;
401 if (!isset ($tab[$pageno]['default']))
402 return;
403 echo "<td><div class=greynavbar><ul id=foldertab style='margin-bottom: 0px; padding-top: 10px;'>";
404 foreach ($tab[$pageno] as $tabidx => $tabtitle)
405 {
406 // Hide forbidden tabs.
407 if (authorized ($remote_username, $pageno, $tabidx) == FALSE)
408 continue;
409 // Dynamic tabs should only be shown in certain cases (trigger exists and returns true).
410 if
411 (
412 isset ($trigger[$pageno][$tabidx]) &&
413 $trigger[$pageno][$tabidx] () != TRUE
414 )
415 continue;
416 $class = ($tabidx == $tabno) ? 'current' : 'std';
417 $extra = (isset ($tabextraclass[$pageno][$tabidx])) ? $tabextraclass[$pageno][$tabidx] : '';
418 echo "<li><a class=${class}{$extra}";
419 echo " href='${root}?page=${pageno}&tab=${tabidx}";
420 if (isset ($page[$pageno]['bypass']) and isset ($_REQUEST[$page[$pageno]['bypass']]))
421 {
422 $bpname = $page[$pageno]['bypass'];
423 $bpval = $_REQUEST[$bpname];
424 echo "&${bpname}=${bpval}";
425 }
426 echo "'>${tabtitle}</a></li>\n";
427 }
428 echo "</ul></div></td>\n";
429 }
430
431 // This function returns pages, which are direct children of the requested
432 // page and are accessible by the current user.
433 function getDirectChildPages ($pageno)
434 {
435 global $page, $remote_username;
436 $children = array();
437 foreach ($page as $cpageno => $cpage)
438 if
439 (
440 isset ($cpage['parent']) and
441 $cpage['parent'] == $pageno and
442 authorized ($remote_username, $cpageno, 'default') == TRUE
443 )
444 $children[$cpageno] = $cpage;
445 return $children;
446 }
447
448 function getAllChildPages ($parent)
449 {
450 global $page;
451 // Array pointer is global, so if we don't create local copies of
452 // the global array, we can't advance any more after nested call
453 // of getAllChildPages returns.
454 $mypage = $page;
455 $mykids = array();
456 foreach ($mypage as $ctitle => $cpage)
457 if (isset ($cpage['parent']) and $cpage['parent'] == $parent)
458 $mykids[] = array ('title' => $ctitle, 'kids' => getAllChildPages ($ctitle));
459 return $mykids;
460 }
461
462 ?>