Subversion Repositories oidplus

Rev

Rev 790 | Rev 801 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 790 Rev 800
Line 26... Line 26...
26
 
26
 
27
        public function gui($id, &$out, &$handled) {
27
        public function gui($id, &$out, &$handled) {
28
                if ($id == 'oidplus:system_log') {
28
                if ($id == 'oidplus:system_log') {
29
                        $handled = true;
29
                        $handled = true;
30
                        $out['title'] = _L('All log messages');
30
                        $out['title'] = _L('All log messages');
31
                        $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : '';
31
                        $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : '';
32
 
32
 
33
                        if (!OIDplus::authUtils()->isAdminLoggedIn()) {
33
                        if (!OIDplus::authUtils()->isAdminLoggedIn()) {
34
                                $out['icon'] = 'img/error_big.png';
34
                                $out['icon'] = 'img/error.png';
35
                                $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>';
35
                                $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>';
36
                                return;
36
                                return;
37
                        }
37
                        }
38
 
38
 
39
                        $res = OIDplus::db()->query("select lo.id, lo.unix_ts, lo.addr, lo.event from ###log lo ".
39
                        $res = OIDplus::db()->query("select lo.id, lo.unix_ts, lo.addr, lo.event from ###log lo ".
Line 75... Line 75...
75
        }
75
        }
76
 
76
 
77
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
77
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
78
                if (!OIDplus::authUtils()->isAdminLoggedIn()) return false;
78
                if (!OIDplus::authUtils()->isAdminLoggedIn()) return false;
79
 
79
 
80
                if (file_exists(__DIR__.'/treeicon.png')) {
80
                if (file_exists(__DIR__.'/img/main_icon16.png')) {
81
                        $tree_icon = OIDplus::webpath(__DIR__).'treeicon.png';
81
                        $tree_icon = OIDplus::webpath(__DIR__,true).'img/main_icon16.png';
82
                } else {
82
                } else {
83
                        $tree_icon = null; // default icon (folder)
83
                        $tree_icon = null; // default icon (folder)
84
                }
84
                }
85
 
85
 
86
                $json[] = array(
86
                $json[] = array(