webinterface => /webinterface
bernd authored 17 years ago
|
1) <?php
2)
3) if (! defined("TOP_INCLUDED"))
4) {
5)
6) define("TOP_INCLUDED", true);
7)
|
Menü-Includes sinnvoller /...
bernd authored 17 years ago
|
8) include("config.php");
|
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) {
|
Menü-Includes sinnvoller /...
bernd authored 17 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);
|
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))
|
Neues Modul für "Kunde werden"
bernd authored 17 years ago
|
31) $weighted_menuitem[$weight] = array_merge($weighted_menuitem[$weight], array($key => $menu[$key]));
|
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"] = "Ü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 ändern";
56) $menuitem["chpass"]["file"] = "chpass.php";
57)
58)
59) $menuitem["logout"]["label"] = "Abmelden";
60) $menuitem["logout"]["file"] = "logout.php";
61)
62) */
63)
64)
|
MIME-Type konfigurierbar
bernd authored 17 years ago
|
65) header("Content-Type: {$config['mime_type']}");
|
webinterface => /webinterface
bernd authored 17 years ago
|
66) ?>
|
Neues Modul für "Kunde werden"
bernd authored 17 years ago
|
67) <?php echo '<?xml version="1.0" encoding="utf-8"?>'."\n"; ?>
|
webinterface => /webinterface
bernd authored 17 years ago
|
68) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
69) "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
70)
71) <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
72) <head>
73)
74) <?php
75) if ($title != "")
76) echo '<title>Administration - '.$title.'</title>';
77) else
78) echo '<title>Administration</title>';
79)
80) echo '
81) <link rel="stylesheet" href="'.$prefix.'css/admin.css" type="text/css" media="screen" title="Normal" />'
82) ?>
83)
84) </head>
85) <body>
86)
87)
88) <div class="menu">
|
Neues Logo
bernd authored 17 years ago
|
89) <img src="<?php echo $prefix; ?>images/schokokeks.png" width="190" height="140" alt="schokokeks.org" />
|
webinterface => /webinterface
bernd authored 17 years ago
|
90)
|
Usability: User sieht immer...
bernd authored 17 years ago
|
91)
|
webinterface => /webinterface
bernd authored 17 years ago
|
92) <?php
|
Usability: User sieht immer...
bernd authored 17 years ago
|
93) $role = $_SESSION['role'];
94)
|
webinterface => /webinterface
bernd authored 17 years ago
|
95)
96) foreach ($weighted_menuitem as $key => $menuitem)
97) foreach ($menuitem as $key => $item)
98) {
99) if ($key == $section)
100) {
101) echo '<a href="'.$item['file'].'" class="menuitem active">'.$item['label'].'</a>'."\n";
102) if (isset($submenu[$key]))
103) {
104) echo "\n";
105) foreach ($submenu[$key] as $item)
106) {
107) if (basename($_SERVER['PHP_SELF']) == basename($item['file']))
108) echo '<a href="'.$item['file'].'" class="submenuitem subactive">'.$item['label'].'</a>'."\n";
109) else
110) echo '<a href="'.$item['file'].'" class="submenuitem">'.$item['label'].'</a>'."\n";
111) }
112) echo "\n";
113) }
114) }
115) else
116) echo '<a href="'.$item['file'].'" class="menuitem">'.$item['label'].'</a>'."\n";
117)
118) }
119)
|
Hanno mag mein tolles Bildc...
bernd authored 17 years ago
|
120) if ($role != ROLE_ANONYMOUS) {
121) echo '<p class="userinfo">Angemeldet als:<br />';
122) if ($role & ROLE_SYSTEMUSER) {
123) echo '<strong>'.$_SESSION['userinfo']['username'].'</strong>';
124) echo '<br />'.$_SESSION['userinfo']['name'];
125) echo '<br />(Benutzer'.(($role & ROLE_CUSTOMER) ? ', Kunde' : '').')';
126) }
127) elseif ($role & ROLE_CUSTOMER) {
128) echo '<strong>'.$_SESSION['customerinfo']['customerno'].'</strong>';
129) echo '<br />'.$_SESSION['customerinfo']['name'];
130) echo '<br />(Kunde)';
131) }
132) elseif ($role & ROLE_MAILACCOUNT) {
133) echo '<strong>'.$_SESSION['mailaccount'].'</strong><br />(E-Mail-Account)';
134) }
135) echo '</p>';
136) }
|