Rev 279 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 279 | Rev 281 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
32 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
33 | 33 | ||
34 | if (!OIDplus::authUtils()::isAdminLoggedIn()) { |
34 | if (!OIDplus::authUtils()::isAdminLoggedIn()) { |
35 | $out['icon'] = 'img/error_big.png'; |
35 | $out['icon'] = 'img/error_big.png'; |
36 | $out['text'] = '<p>You need to <a '.OIDplus::gui()->link('oidplus:login').'>log in</a> as administrator.</p>'; |
36 | $out['text'] = '<p>You need to <a '.OIDplus::gui()->link('oidplus:login').'>log in</a> as administrator.</p>'; |
37 | return $out; |
37 | return; |
38 | } |
38 | } |
39 | 39 | ||
40 | $res = OIDplus::db()->query("select lo.id, lo.unix_ts, lo.addr, lo.event from ###log lo ". |
40 | $res = OIDplus::db()->query("select lo.id, lo.unix_ts, lo.addr, lo.event from ###log lo ". |
41 | "left join ###log_user lu on lu.log_id = lo.id ". |
41 | "left join ###log_user lu on lu.log_id = lo.id ". |
42 | //"where lu.username = 'admin' " . |
42 | //"where lu.username = 'admin' " . |
Line 65... | Line 65... | ||
65 | // TODO: Load only X events and then re-load new events via AJAX when the user scrolls down |
65 | // TODO: Load only X events and then re-load new events via AJAX when the user scrolls down |
66 | } |
66 | } |
67 | } |
67 | } |
68 | 68 | ||
69 | public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
69 | public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
- | 70 | if (!OIDplus::authUtils()::isAdminLoggedIn()) return false; |
|
- | 71 | ||
70 | if (file_exists(__DIR__.'/treeicon.png')) { |
72 | if (file_exists(__DIR__.'/treeicon.png')) { |
71 | $tree_icon = OIDplus::webpath(__DIR__).'treeicon.png'; |
73 | $tree_icon = OIDplus::webpath(__DIR__).'treeicon.png'; |
72 | } else { |
74 | } else { |
73 | $tree_icon = null; // default icon (folder) |
75 | $tree_icon = null; // default icon (folder) |
74 | } |
76 | } |