1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:
16: class IMP_Ui_Mimp
17: {
18: 19: 20: 21: 22: 23: 24: 25: 26: 27:
28: public function ($page, $items = array())
29: {
30: if (!in_array($page, array('mailbox', 'message')) ||
31: (IMP::$mailbox != 'INBOX')) {
32: $items[] = array(_("Inbox"), IMP_Mailbox::get('INBOX')->url('mailbox-mimp.php'));
33: }
34:
35: if (!in_array($page, array('compose', 'search')) && IMP::canCompose()) {
36: $items[] = array(_("New Message"), Horde::url('compose-mimp.php')->unique());
37: }
38:
39: if (!in_array($page, array('folders', 'search')) &&
40: $GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_FOLDERS)) {
41: $items[] = array(_("Folders"), Horde::url('folders-mimp.php'));
42: }
43:
44: $items[] = array(_("Log out"), Horde::getServiceLink('logout', 'imp'));
45:
46: $menu = new Horde_Menu();
47: foreach ($menu->getSiteLinks() as $menuitem) {
48: if ($menuitem != 'separator') {
49: $items[] = array($menuitem['text'], $menuitem['url']);
50: }
51: }
52:
53: $out = '<ul>';
54: foreach ($items as $val) {
55: $out .= '<li><a href="' . $val[1] . '">' . htmlspecialchars($val[0]) . '</a></li>';
56: }
57: return $out . '</ul>';
58: }
59:
60: }
61: