Rev 704 | Rev 801 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 704 | Rev 800 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | $parts = explode('.',$tmp[0],2); |
31 | $parts = explode('.',$tmp[0],2); |
32 | if (!isset($parts[1])) $parts[1] = ''; |
32 | if (!isset($parts[1])) $parts[1] = ''; |
33 | if ($parts[0] != 'oidplus:system_plugins') return; |
33 | if ($parts[0] != 'oidplus:system_plugins') return; |
34 | $handled = true; |
34 | $handled = true; |
35 | $out['title'] = _L('Installed plugins'); |
35 | $out['title'] = _L('Installed plugins'); |
36 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
36 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
37 | 37 | ||
38 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
38 | if (!OIDplus::authUtils()->isAdminLoggedIn()) { |
39 | $out['icon'] = 'img/error_big.png'; |
39 | $out['icon'] = 'img/error.png'; |
40 | $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>'; |
40 | $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>'; |
41 | return; |
41 | return; |
42 | } |
42 | } |
43 | 43 | ||
44 | if (!is_null($classname)) { |
44 | if (!is_null($classname)) { |
45 | $plugin = OIDplus::getPluginByClassName($classname); |
45 | $plugin = OIDplus::getPluginByClassName($classname); |
46 | if (is_null($plugin)) { |
46 | if (is_null($plugin)) { |
47 | $out['icon'] = 'img/error_big.png'; |
47 | $out['icon'] = 'img/error.png'; |
48 | $out['text'] = '<p>'._L('Plugin %1 not found.',$classname).'</p>'; |
48 | $out['text'] = '<p>'._L('Plugin %1 not found.',$classname).'</p>'; |
49 | return; |
49 | return; |
50 | } |
50 | } |
51 | 51 | ||
52 | $out['title'] = empty($plugin->getManifest()->getName()) ? htmlentities($classname) : htmlentities($plugin->getManifest()->getName()); |
52 | $out['title'] = empty($plugin->getManifest()->getName()) ? htmlentities($classname) : htmlentities($plugin->getManifest()->getName()); |
53 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
53 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
54 | 54 | ||
55 | $back_link = 'oidplus:system_plugins'; |
55 | $back_link = 'oidplus:system_plugins'; |
56 | if (get_parent_class($classname) == 'OIDplusPagePluginPublic') $back_link = 'oidplus:system_plugins.pages.public'; |
56 | if (get_parent_class($classname) == 'OIDplusPagePluginPublic') $back_link = 'oidplus:system_plugins.pages.public'; |
57 | if (get_parent_class($classname) == 'OIDplusPagePluginRa') $back_link = 'oidplus:system_plugins.pages.ra'; |
57 | if (get_parent_class($classname) == 'OIDplusPagePluginRa') $back_link = 'oidplus:system_plugins.pages.ra'; |
58 | if (get_parent_class($classname) == 'OIDplusPagePluginAdmin') $back_link = 'oidplus:system_plugins.pages.admin'; |
58 | if (get_parent_class($classname) == 'OIDplusPagePluginAdmin') $back_link = 'oidplus:system_plugins.pages.admin'; |
Line 93... | Line 93... | ||
93 | $show_captcha_active = false; |
93 | $show_captcha_active = false; |
94 | $show_captcha_inactive = false; |
94 | $show_captcha_inactive = false; |
95 | 95 | ||
96 | if ($parts[1] == '') { |
96 | if ($parts[1] == '') { |
97 | $out['title'] = _L('Installed plugins'); |
97 | $out['title'] = _L('Installed plugins'); |
98 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
98 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
99 | $show_pages_public = true; |
99 | $show_pages_public = true; |
100 | $show_pages_ra = true; |
100 | $show_pages_ra = true; |
101 | $show_pages_admin = true; |
101 | $show_pages_admin = true; |
102 | $show_db_active = true; |
102 | $show_db_active = true; |
103 | $show_db_inactive = true; |
103 | $show_db_inactive = true; |
Line 112... | Line 112... | ||
112 | $show_design_inactive = true; |
112 | $show_design_inactive = true; |
113 | $show_captcha_active = true; |
113 | $show_captcha_active = true; |
114 | $show_captcha_inactive = true; |
114 | $show_captcha_inactive = true; |
115 | } else if ($parts[1] == 'pages') { |
115 | } else if ($parts[1] == 'pages') { |
116 | $out['title'] = _L('Page plugins'); |
116 | $out['title'] = _L('Page plugins'); |
117 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
117 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
118 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
118 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
119 | $show_pages_public = true; |
119 | $show_pages_public = true; |
120 | $show_pages_ra = true; |
120 | $show_pages_ra = true; |
121 | $show_pages_admin = true; |
121 | $show_pages_admin = true; |
122 | } else if ($parts[1] == 'pages.public') { |
122 | } else if ($parts[1] == 'pages.public') { |
123 | $out['title'] = _L('Public page plugins'); |
123 | $out['title'] = _L('Public page plugins'); |
124 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
124 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
125 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins.pages').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
125 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins.pages').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
126 | $show_pages_public = true; |
126 | $show_pages_public = true; |
127 | } else if ($parts[1] == 'pages.ra') { |
127 | } else if ($parts[1] == 'pages.ra') { |
128 | $out['title'] = _L('RA page plugins'); |
128 | $out['title'] = _L('RA page plugins'); |
129 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
129 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
130 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins.pages').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
130 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins.pages').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
131 | $show_pages_ra = true; |
131 | $show_pages_ra = true; |
132 | } else if ($parts[1] == 'pages.admin') { |
132 | } else if ($parts[1] == 'pages.admin') { |
133 | $out['title'] = _L('Admin page plugins'); |
133 | $out['title'] = _L('Admin page plugins'); |
134 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
134 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
135 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins.pages').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
135 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins.pages').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
136 | $show_pages_admin = true; |
136 | $show_pages_admin = true; |
137 | } else if ($parts[1] == 'objects') { |
137 | } else if ($parts[1] == 'objects') { |
138 | $out['title'] = _L('Object type plugins'); |
138 | $out['title'] = _L('Object type plugins'); |
139 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
139 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
140 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
140 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
141 | $show_obj_active = true; |
141 | $show_obj_active = true; |
142 | $show_obj_inactive = true; |
142 | $show_obj_inactive = true; |
143 | } else if ($parts[1] == 'objects.enabled') { |
143 | } else if ($parts[1] == 'objects.enabled') { |
144 | $out['title'] = _L('Object type plugins (enabled)'); |
144 | $out['title'] = _L('Object type plugins (enabled)'); |
145 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
145 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
146 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
146 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
147 | $show_obj_active = true; |
147 | $show_obj_active = true; |
148 | } else if ($parts[1] == 'objects.disabled') { |
148 | } else if ($parts[1] == 'objects.disabled') { |
149 | $out['title'] = _L('Object type plugins (disabled)'); |
149 | $out['title'] = _L('Object type plugins (disabled)'); |
150 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
150 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
151 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
151 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
152 | $show_obj_inactive = true; |
152 | $show_obj_inactive = true; |
153 | } else if ($parts[1] == 'database') { |
153 | } else if ($parts[1] == 'database') { |
154 | $out['title'] = _L('Database provider plugins'); |
154 | $out['title'] = _L('Database provider plugins'); |
155 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
155 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
156 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
156 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
157 | $show_db_active = true; |
157 | $show_db_active = true; |
158 | $show_db_inactive = true; |
158 | $show_db_inactive = true; |
159 | } else if ($parts[1] == 'database.enabled') { |
159 | } else if ($parts[1] == 'database.enabled') { |
160 | $out['title'] = _L('Database provider plugins (active)'); |
160 | $out['title'] = _L('Database provider plugins (active)'); |
161 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
161 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
162 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
162 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
163 | $show_db_active = true; |
163 | $show_db_active = true; |
164 | } else if ($parts[1] == 'database.disabled') { |
164 | } else if ($parts[1] == 'database.disabled') { |
165 | $out['title'] = _L('Database provider plugins (inactive)'); |
165 | $out['title'] = _L('Database provider plugins (inactive)'); |
166 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
166 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
167 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
167 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
168 | $show_db_inactive = true; |
168 | $show_db_inactive = true; |
169 | } else if ($parts[1] == 'sql') { |
169 | } else if ($parts[1] == 'sql') { |
170 | $out['title'] = _L('SQL slang plugins'); |
170 | $out['title'] = _L('SQL slang plugins'); |
171 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
171 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
172 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
172 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
173 | $show_sql_active = true; |
173 | $show_sql_active = true; |
174 | $show_sql_inactive = true; |
174 | $show_sql_inactive = true; |
175 | } else if ($parts[1] == 'sql.enabled') { |
175 | } else if ($parts[1] == 'sql.enabled') { |
176 | $out['title'] = _L('SQL slang plugins (active)'); |
176 | $out['title'] = _L('SQL slang plugins (active)'); |
177 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
177 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
178 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
178 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
179 | $show_sql_active = true; |
179 | $show_sql_active = true; |
180 | } else if ($parts[1] == 'sql.disabled') { |
180 | } else if ($parts[1] == 'sql.disabled') { |
181 | $out['title'] = _L('SQL slang plugins (inactive)'); |
181 | $out['title'] = _L('SQL slang plugins (inactive)'); |
182 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
182 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
183 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
183 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
184 | $show_sql_inactive = true; |
184 | $show_sql_inactive = true; |
185 | } else if ($parts[1] == 'auth') { |
185 | } else if ($parts[1] == 'auth') { |
186 | $out['title'] = _L('RA authentication'); |
186 | $out['title'] = _L('RA authentication'); |
187 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
187 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
188 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
188 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
189 | $show_auth = true; |
189 | $show_auth = true; |
190 | } else if ($parts[1] == 'logger') { |
190 | } else if ($parts[1] == 'logger') { |
191 | $out['title'] = _L('Logger'); |
191 | $out['title'] = _L('Logger'); |
192 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
192 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
193 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
193 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
194 | $show_logger = true; |
194 | $show_logger = true; |
195 | } else if ($parts[1] == 'language') { |
195 | } else if ($parts[1] == 'language') { |
196 | $out['title'] = _L('Languages'); |
196 | $out['title'] = _L('Languages'); |
197 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
197 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
198 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
198 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
199 | $show_language = true; |
199 | $show_language = true; |
200 | } else if ($parts[1] == 'design') { |
200 | } else if ($parts[1] == 'design') { |
201 | $out['title'] = _L('Designs'); |
201 | $out['title'] = _L('Designs'); |
202 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
202 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
203 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
203 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
204 | $show_design_active = true; |
204 | $show_design_active = true; |
205 | $show_design_inactive = true; |
205 | $show_design_inactive = true; |
206 | } else if ($parts[1] == 'captcha') { |
206 | } else if ($parts[1] == 'captcha') { |
207 | $out['title'] = _L('CAPTCHA plugins'); |
207 | $out['title'] = _L('CAPTCHA plugins'); |
208 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
208 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
209 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
209 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
210 | $show_captcha_active = true; |
210 | $show_captcha_active = true; |
211 | $show_captcha_inactive = true; |
211 | $show_captcha_inactive = true; |
212 | } else if ($parts[1] == 'captcha.enabled') { |
212 | } else if ($parts[1] == 'captcha.enabled') { |
213 | $out['title'] = _L('CAPTCHA plugins (active)'); |
213 | $out['title'] = _L('CAPTCHA plugins (active)'); |
214 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
214 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
215 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
215 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
216 | $show_captcha_active = true; |
216 | $show_captcha_active = true; |
217 | } else if ($parts[1] == 'captcha.disabled') { |
217 | } else if ($parts[1] == 'captcha.disabled') { |
218 | $out['title'] = _L('CAPTCHA plugins (inactive)'); |
218 | $out['title'] = _L('CAPTCHA plugins (inactive)'); |
219 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
219 | $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : ''; |
220 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
220 | $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
221 | $show_captcha_inactive = true; |
221 | $show_captcha_inactive = true; |
222 | } else { |
222 | } else { |
223 | $out['title'] = _L('Error'); |
223 | $out['title'] = _L('Error'); |
224 | $out['icon'] = 'img/error_big.png'; |
224 | $out['icon'] = 'img/error.png'; |
225 | $out['text'] = '<p>'._L('Invalid arguments').'</p>'; |
225 | $out['text'] = '<p>'._L('Invalid arguments').'</p>'; |
226 | $out['text'] .= '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
226 | $out['text'] .= '<p><a '.OIDplus::gui()->link('oidplus:system_plugins').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Go back').'</a></p>'; |
227 | return; |
227 | return; |
228 | } |
228 | } |
229 | 229 | ||
Line 557... | Line 557... | ||
557 | } |
557 | } |
558 | 558 | ||
559 | public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
559 | public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
560 | if (!OIDplus::authUtils()->isAdminLoggedIn()) return false; |
560 | if (!OIDplus::authUtils()->isAdminLoggedIn()) return false; |
561 | 561 | ||
562 | if (file_exists(__DIR__.'/treeicon.png')) { |
562 | if (file_exists(__DIR__.'/img/main_icon16.png')) { |
563 | $tree_icon = OIDplus::webpath(__DIR__).'treeicon.png'; |
563 | $tree_icon = OIDplus::webpath(__DIR__,true).'img/main_icon16.png'; |
564 | } else { |
564 | } else { |
565 | $tree_icon = null; // default icon (folder) |
565 | $tree_icon = null; // default icon (folder) |
566 | } |
566 | } |
567 | 567 | ||
568 | $tree_icon_pages = $tree_icon; // TODO |
568 | $tree_icon_pages = $tree_icon; // TODO |