1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13:
14:
15: if (!defined('KLUTZ_BASE')) {
16: define('KLUTZ_BASE', dirname(__FILE__) . '/..');
17: }
18:
19: if (!defined('HORDE_BASE')) {
20: 21:
22: if (file_exists(KLUTZ_BASE . '/config/horde.local.php')) {
23: include KLUTZ_BASE . '/config/horde.local.php';
24: } else {
25: define('HORDE_BASE', KLUTZ_BASE . '/..');
26: }
27: }
28:
29: 30:
31: require_once HORDE_BASE . '/lib/core.php';
32:
33: class Klutz_Application extends Horde_Registry_Application
34: {
35: 36:
37: public $version = 'H4 (2.0.0-git)';
38:
39: 40: 41:
42: protected function _init()
43: {
44: $GLOBALS['registry']->setTimeZone();
45:
46: $GLOBALS['klutz'] = new Klutz();
47: $GLOBALS['klutz_driver'] = Klutz_Driver::factory();
48: }
49:
50: 51:
52: public function perms()
53: {
54: return array(
55: 'admin' => array(
56: 'title' => _("Administration"),
57: )
58: );
59: }
60:
61: 62:
63: public function ($menu)
64: {
65: global $conf, $injector;
66:
67: $today = Horde::url('comics.php');
68: $today = Horde_Util::addParameter($today, array('actionID' => 'day',
69: 'date' => mktime(0, 0, 0)));
70:
71: $me = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
72:
73:
74: $menu->add(Horde::url('comics.php'), _("_Browse"), 'klutz.png',
75: null, '', null, ($me == $today) ? '__noselection' : (basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null));
76:
77: $menu->add($today, _("_Today"), 'today.png', null, '', null,
78: ($me == $today) ? 'current' : '__noselection');
79:
80: if ($GLOBALS['registry']->isAdmin(array('permission' => 'klutz:admin'))) {
81: $menu->add(Horde::url('backend.php'), _("_Update"), 'klutz.png');
82: }
83: }
84:
85: public function prefsInit($ui)
86: {
87: }
88:
89: 90:
91: public function prefsGroup($ui)
92: {
93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114:
115: }
116:
117: 118:
119: public function prefsSpecial($ui, $item)
120: {
121: }
122:
123: 124:
125: public function prefsSpecialUpdate($ui, $item)
126: {
127: }
128: }
129: