Rev 800 | Rev 1050 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 800 | Rev 801 | ||
---|---|---|---|
Line 57... | Line 57... | ||
57 | 57 | ||
58 | public function gui($id, &$out, &$handled) { |
58 | public function gui($id, &$out, &$handled) { |
59 | if (explode('$',$id)[0] == 'oidplus:edit_config') { |
59 | if (explode('$',$id)[0] == 'oidplus:edit_config') { |
60 | $handled = true; |
60 | $handled = true; |
61 | $out['title'] = _L('System configuration'); |
61 | $out['title'] = _L('System configuration'); |
62 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
62 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png' : ''; |
63 | 63 | ||
64 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
64 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
65 | $out['icon'] = 'img/error.png'; |
65 | $out['icon'] = 'img/error.png'; |
66 | $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>'; |
66 | $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>'; |
67 | return; |
67 | return; |
Line 99... | Line 99... | ||
99 | $output .= '</table>'; |
99 | $output .= '</table>'; |
100 | $output .= '</div></div>'; |
100 | $output .= '</div></div>'; |
101 | 101 | ||
102 | $output .= '<br><p>'._L('See also').':</p>'; |
102 | $output .= '<br><p>'._L('See also').':</p>'; |
103 | $output .= '<ul>'; |
103 | $output .= '<ul>'; |
104 | $output .= '<li><a href="'.OIDplus::webpath().'setup/">'._L('Setup part 1: Create %1 (contains database settings, CAPTCHA, admin password and SSL enforcement)','userdata/baseconfig/config.inc.php').'</a></li>'; |
104 | $output .= '<li><a href="'.OIDplus::webpath(null,OIDplus::PATH_RELATIVE).'setup/">'._L('Setup part 1: Create %1 (contains database settings, CAPTCHA, admin password and SSL enforcement)','userdata/baseconfig/config.inc.php').'</a></li>'; |
105 | $oobePlugin = OIDplus::getPluginByOid('1.3.6.1.4.1.37476.2.5.2.4.3.50'); // OIDplusPageAdminOOBE |
105 | $oobePlugin = OIDplus::getPluginByOid('1.3.6.1.4.1.37476.2.5.2.4.3.50'); // OIDplusPageAdminOOBE |
106 | if (!is_null($oobePlugin)) { |
106 | if (!is_null($oobePlugin)) { |
107 | $output .= '<li><a href="'.OIDplus::webpath($oobePlugin->getPluginDirectory()).'oobe.php">'._L('Setup part 2: Basic settings (they are all available above, too)').'</a></li>'; |
107 | $output .= '<li><a href="'.OIDplus::webpath($oobePlugin->getPluginDirectory(),OIDplus::PATH_RELATIVE).'oobe.php">'._L('Setup part 2: Basic settings (they are all available above, too)').'</a></li>'; |
108 | } else { |
108 | } else { |
109 | $output .= '<li>'._L('Setup part 2 requires plugin %1 (the basic settings are all available above, too)','OIDplusPageAdminOOBE').'</a></li>'; |
109 | $output .= '<li>'._L('Setup part 2 requires plugin %1 (the basic settings are all available above, too)','OIDplusPageAdminOOBE').'</a></li>'; |
110 | } |
110 | } |
111 | $output .= '</ul>'; |
111 | $output .= '</ul>'; |
112 | 112 | ||
Line 116... | Line 116... | ||
116 | 116 | ||
117 | public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
117 | public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
118 | if (!OIDplus::authUtils()->isAdminLoggedIn()) return false; |
118 | if (!OIDplus::authUtils()->isAdminLoggedIn()) return false; |
119 | 119 | ||
120 | if (file_exists(__DIR__.'/img/main_icon16.png')) { |
120 | if (file_exists(__DIR__.'/img/main_icon16.png')) { |
121 | $tree_icon = OIDplus::webpath(__DIR__,true).'img/main_icon16.png'; |
121 | $tree_icon = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png'; |
122 | } else { |
122 | } else { |
123 | $tree_icon = null; // default icon (folder) |
123 | $tree_icon = null; // default icon (folder) |
124 | } |
124 | } |
125 | 125 | ||
126 | $json[] = array( |
126 | $json[] = array( |