deedc3e35d94c0d716ccb63996c7d4cafd95267d
bernd webinterface => /webinterface

bernd authored 17 years ago

1) <?php
2) 
3) if (! defined("TOP_INCLUDED"))
4) {
5) 
6) define("TOP_INCLUDED", true);
7) 
bernd Menü-Includes sinnvoller /...

bernd authored 16 years ago

8) include("config.php");
bernd webinterface => /webinterface

bernd authored 17 years ago

9) require_once("inc/error.php");
10) global $prefix;
11) 
12) $menuitem = array();
13) $weighted_menuitem = array();
14) 
15) foreach ($config['modules'] as $module)
16) {
bernd Menü-Includes sinnvoller /...

bernd authored 16 years ago

17)   include("modules/{$module}/menu.php");
18)   if ($menu === false)
19)   {
20)     DEBUG("Modul {$module} hat keine Menüeinträge");
21)     continue;
22)   }
23)   DEBUG("<h4>$module</h4>");
24)   DEBUG($menu);
bernd webinterface => /webinterface

bernd authored 17 years ago

25)   // $menu["foo"]["file"] enthält den Link
26)   foreach (array_keys($menu) as $key)
27)   {
28)     $menu[$key]["file"] = $prefix."go/".$module."/".$menu[$key]["file"];
29)     $weight = $menu[$key]["weight"];
30)     if (array_key_exists($weight, $weighted_menuitem))
bernd Neues Modul für "Kunde werden"

bernd authored 16 years ago

31)       $weighted_menuitem[$weight] = array_merge($weighted_menuitem[$weight], array($key => $menu[$key]));
bernd webinterface => /webinterface

bernd authored 17 years ago

32)     else
33)       $weighted_menuitem[$weight] = array($key => $menu[$key]);
34)   }
35)   $menuitem = array_merge($menuitem, $menu);
36) }
37) 
38) ksort($weighted_menuitem);
39) DEBUG(print_r($weighted_menuitem, true));
40) 
41) 
42) 
43) /*
44) $menuitem["index"]["label"] = "&Uuml;bersicht";
45) $menuitem["index"]["file"] = "index.php";
46) 
47) 
48) $menuitem["domains"]["label"] = "Domains";
49) $menuitem["domains"]["file"] = "domains.php";
50) 
51) 
52) $menuitem["mail"]["label"] = "E-Mail";
53) $menuitem["mail"]["file"] = "mail.php";
54) 
55) $menuitem["chpass"]["label"] = "Passwort &auml;ndern";
56) $menuitem["chpass"]["file"] = "chpass.php";
57) 
58) 
59) $menuitem["logout"]["label"] = "Abmelden";
60) $menuitem["logout"]["file"] = "logout.php";
61) 
62) */
63) 
64) 
65) ?>
bernd Neues Modul für "Kunde werden"

bernd authored 16 years ago

66) <?php echo '<?xml version="1.0" encoding="utf-8"?>'."\n"; ?>