PluginProbe
Adminimize / 1.4.7
Adminimize v1.4.7
1.11.14 1.11.13 1.11.1 1.11.10 1.11.11 1.11.12 1.11.2 1.11.3 1.11.4 1.11.5 1.11.6 1.11.7 1.11.8 1.11.9 1.3 1.4.7 1.6 1.7.12 1.7.13 1.7.14 1.7.15 1.7.16 1.7.17 1.7.18 1.7.19 All 53 releases
adminimize / adminimize_page.php

adminimize_page.php in Adminimize 1.4.7, at adminimize_page.php

648 lines 32.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * options-page in wp-admin
4 */
5 function _mw_adminimize_options() {
6 global $wpdb, $_wp_admin_css_colors;
7
8 _mw_adminimize_user_info == '';
9
10 // update options
11 if ( ($_POST['_mw_adminimize_action'] == '_mw_adminimize_insert') && $_POST['_mw_adminimize_save'] ) {
12
13 if ( function_exists('current_user_can') && current_user_can('edit_plugins') ) {
14 check_admin_referer('mw_adminimize_nonce');
15
16 _mw_adminimize_update();
17
18 } else {
19 $myErrors = new _mw_adminimize_message_class();
20 $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_access_denied') . '</p></div>';
21 wp_die($myErrors);
22 }
23 }
24
25 // deinstall options
26 if ( ($_POST['_mw_adminimize_action'] == '_mw_adminimize_deinstall') && ($_POST['_mw_adminimize_deinstall_yes'] != '_mw_adminimize_deinstall') ) {
27 $myErrors = new _mw_adminimize_message_class();
28 $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_deinstall_yes') . '</p></div>';
29 wp_die($myErrors);
30 }
31
32 if ( ($_POST['_mw_adminimize_action'] == '_mw_adminimize_deinstall') && $_POST['_mw_adminimize_deinstall'] && ($_POST['_mw_adminimize_deinstall_yes'] == '_mw_adminimize_deinstall') ) {
33
34 if ( function_exists('current_user_can') && current_user_can('edit_plugins') ) {
35 check_admin_referer('mw_adminimize_nonce');
36
37 _mw_adminimize_deinstall();
38
39 $myErrors = new _mw_adminimize_message_class();
40 $myErrors = '<div id="message" class="updated fade"><p>' . $myErrors->get_error('_mw_adminimize_deinstall') . '</p></div>';
41 echo $myErrors;
42 } else {
43 $myErrors = new _mw_adminimize_message_class();
44 $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_access_denied') . '</p></div>';
45 wp_die($myErrors);
46 }
47 }
48
49 if ( ($_POST['_mw_adminimize_action'] == '_mw_adminimize_set_theme') && $_POST['_mw_adminimize_save'] ) {
50 if ( function_exists('current_user_can') && current_user_can('edit_users') ) {
51 check_admin_referer('mw_adminimize_nonce');
52
53 _mw_adminimize_set_theme();
54
55 $myErrors = new _mw_adminimize_message_class();
56 $myErrors = '<div id="message" class="updated fade"><p>' . $myErrors->get_error('_mw_adminimize_set_theme') . '</p></div>';
57 echo $myErrors;
58 } else {
59 $myErrors = new _mw_adminimize_message_class();
60 $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_access_denied') . '</p></div>';
61 wp_die($myErrors);
62 }
63 }
64
65 ?>
66 <div class="wrap">
67 <h2><?php _e('Adminimize', 'adminimize'); ?></h2>
68 <br class="clear" />
69 <div id="poststuff" class="dlm">
70 <div class="postbox closed" >
71 <h3><?php _e('Backend options', 'adminimize'); ?></h3>
72 <div class="inside">
73
74 <form name="backend_option" method="post" id="_mw_adminimize_options" action="?page=<?php echo $_GET['page'];?>" >
75 <?php wp_nonce_field('mw_adminimize_nonce'); ?>
76 <br class="clear" />
77 <table summary="config" class="widefat">
78 <thead>
79 <tr>
80 <th><?php _e('Backend options', 'adminimize'); ?></th>
81 <th>&nbsp;</th>
82 </tr>
83 </thead>
84 <tbody>
85 <tr valign="top">
86 <td><?php _e('Sidebar Width', 'adminimize'); ?></td>
87 <td>
88 <?php $_mw_adminimize_sidebar_wight = _mw_adminimize_getOptionValue('_mw_adminimize_sidebar_wight'); ?>
89 <select name="_mw_adminimize_sidebar_wight">
90 <option value="0"<?php if ($_mw_adminimize_sidebar_wight == '0') { echo ' selected="selected"'; } ?>><?php _e('Default', 'adminimize'); ?></option>
91 <option value="300"<?php if ($_mw_adminimize_sidebar_wight == '300') { echo ' selected="selected"'; } ?>>300px</option>
92 <option value="400"<?php if ($_mw_adminimize_sidebar_wight == '400') { echo ' selected="selected"'; } ?>>400px</option>
93 <option value="20"<?php if ($_mw_adminimize_sidebar_wight == '20') { echo ' selected="selected"'; } ?>>20%</option>
94 <option value="30"<?php if ($_mw_adminimize_sidebar_wight == '30') { echo ' selected="selected"'; } ?>>30%</option>
95 </select> <?php _e('The sidebar on the right side in the area <em>Edit</em> is configurable. Default is 200 pixel in the WordPress Theme <em>Classic</em> and <em>Fresh</em>', 'adminimize'); ?>
96 </td>
97 </tr>
98 <tr valign="top">
99 <td><?php _e('User-Info', 'adminimize'); ?></td>
100 <td>
101 <?php $_mw_adminimize_user_info = _mw_adminimize_getOptionValue('_mw_adminimize_user_info'); ?>
102 <select name="_mw_adminimize_user_info">
103 <option value="0"<?php if ($_mw_adminimize_user_info == '0') { echo ' selected="selected"'; } ?>><?php _e('Default', 'adminimize'); ?></option>
104 <option value="1"<?php if ($_mw_adminimize_user_info == '1') { echo ' selected="selected"'; } ?>><?php _e('Hide', 'adminimize'); ?></option>
105 <option value="2"<?php if ($_mw_adminimize_user_info == '2') { echo ' selected="selected"'; } ?>><?php _e('Only logout', 'adminimize'); ?></option>
106 <option value="3"<?php if ($_mw_adminimize_user_info == '3') { echo ' selected="selected"'; } ?>><?php _e('User &amp; Logout', 'adminimize'); ?></option>
107 </select> <?php _e('The &quot;User-Info-area&quot; is on the top right side of the backend. You can hide or reduced show.', 'adminimize'); ?>
108 </td>
109 </tr>
110 <?php if ( ($_mw_adminimize_user_info == '') || ($_mw_adminimize_user_info == '1') || ($_mw_adminimize_user_info == '0') ) $disabled_item = ' disabled="disabled"' ?>
111 <tr valign="top">
112 <td><?php _e('Change User-Info, redirect to', 'adminimize'); ?></td>
113 <td>
114 <?php $_mw_adminimize_ui_redirect = _mw_adminimize_getOptionValue('_mw_adminimize_ui_redirect'); ?>
115 <select name="_mw_adminimize_ui_redirect" <?php echo $disabled_item ?>>
116 <option value="0"<?php if ($_mw_adminimize_ui_redirect == '0') { echo ' selected="selected"'; } ?>><?php _e('Default', 'adminimize'); ?></option>
117 <option value="1"<?php if ($_mw_adminimize_ui_redirect == '1') { echo ' selected="selected"'; } ?>><?php _e('Frontpage of the Blog', 'adminimize'); ?>
118 </select> <?php _e('When the &quot;User-Info-area&quot; change it, then it is possible to change the redirect.', 'adminimize'); ?>
119 </td>
120 </tr>
121 <tr valign="top">
122 <td><?php _e('Footer', 'adminimize'); ?></td>
123 <td>
124 <?php $_mw_adminimize_footer = _mw_adminimize_getOptionValue('_mw_adminimize_footer'); ?>
125 <select name="_mw_adminimize_footer">
126 <option value="0"<?php if ($_mw_adminimize_footer == '0') { echo ' selected="selected"'; } ?>><?php _e('Default', 'adminimize'); ?></option>
127 <option value="1"<?php if ($_mw_adminimize_footer == '1') { echo ' selected="selected"'; } ?>><?php _e('Hide', 'adminimize'); ?></option>
128 </select> <?php _e('The Footer-area kann hide, include all links and details.', 'adminimize'); ?>
129 </td>
130 </tr>
131 <tr valign="top">
132 <td><?php _e('WriteScroll', 'adminimize'); ?></td>
133 <td>
134 <?php $_mw_adminimize_writescroll = _mw_adminimize_getOptionValue('_mw_adminimize_writescroll'); ?>
135 <select name="_mw_adminimize_writescroll">
136 <option value="0"<?php if ($_mw_adminimize_writescroll == '0') { echo ' selected="selected"'; } ?>><?php _e('Default', 'adminimize'); ?></option>
137 <option value="1"<?php if ($_mw_adminimize_writescroll == '1') { echo ' selected="selected"'; } ?>><?php _e('Activate', 'adminimize'); ?></option>
138 </select> <?php _e('With the WriteScroll option active, these pages will automatically scroll to an optimal position for editing, when you visit Write Post or Write Page.', 'adminimize'); ?>
139 </td>
140 </tr>
141 <tr valign="top">
142 <td><?php _e('Timestamp', 'adminimize'); ?></td>
143 <td>
144 <?php $_mw_adminimize_timestamp = _mw_adminimize_getOptionValue('_mw_adminimize_timestamp'); ?>
145 <select name="_mw_adminimize_timestamp">
146 <option value="0"<?php if ($_mw_adminimize_timestamp == '0') { echo ' selected="selected"'; } ?>><?php _e('Default', 'adminimize'); ?></option>
147 <option value="1"<?php if ($_mw_adminimize_timestamp == '1') { echo ' selected="selected"'; } ?>><?php _e('Activate', 'adminimize'); ?></option>
148 </select> <?php _e('Opens the post timestamp editing fields without you having to click the "Edit" link every time.', 'adminimize'); ?>
149 </td>
150 </tr>
151 <tr valign="top">
152 <td><?php _e('Thickbox FullScreen', 'adminimize'); ?></td>
153 <td>
154 <?php $_mw_adminimize_tb_window = _mw_adminimize_getOptionValue('_mw_adminimize_tb_window'); ?>
155 <select name="_mw_adminimize_tb_window">
156 <option value="0"<?php if ($_mw_adminimize_tb_window == '0') { echo ' selected="selected"'; } ?>><?php _e('Default', 'adminimize'); ?></option>
157 <option value="1"<?php if ($_mw_adminimize_tb_window == '1') { echo ' selected="selected"'; } ?>><?php _e('Activate', 'adminimize'); ?></option>
158 </select> <?php _e('All Thickbox-function use the full area of the browser. Thickbox is for examble in upload media-files.', 'adminimize'); ?>
159 </td>
160 </tr>
161 <tr valign="top">
162 <td><?php _e('Advice in Footer', 'adminimize'); ?></td>
163 <td>
164 <?php $_mw_adminimize_advice = _mw_adminimize_getOptionValue('_mw_adminimize_advice'); ?>
165 <select name="_mw_adminimize_advice">
166 <option value="0"<?php if ($_mw_adminimize_advice == '0') { echo ' selected="selected"'; } ?>><?php _e('Default', 'adminimize'); ?></option>
167 <option value="1"<?php if ($_mw_adminimize_advice == '1') { echo ' selected="selected"'; } ?>><?php _e('Activate', 'adminimize'); ?></option>
168 </select>
169 <textarea style="width: 85%;" class="code" rows="1" cols="60" name="_mw_adminimize_advice_txt" id="_mw_adminimize_advice_txt" ><?php echo htmlspecialchars(stripslashes(_mw_adminimize_getOptionValue('_mw_adminimize_advice_txt'))); ?></textarea><br /><?php _e('In the Footer kann you display a advice for change the Default-design, (x)HTML is possible.', 'adminimize'); ?>
170 </td>
171 </tr>
172 <?php
173 // when remove dashboard
174 $disabled_menu = _mw_adminimize_getOptionValue('mw_adminimize_disabled_menu_items');
175 $disabled_submenu = _mw_adminimize_getOptionValue('mw_adminimize_disabled_submenu_items');
176 $disabled_menu_adm = _mw_adminimize_getOptionValue('mw_adminimize_disabled_menu_adm_items');
177 $disabled_submenu_adm = _mw_adminimize_getOptionValue('mw_adminimize_disabled_submenu_adm_items');
178
179 if ($disabled_menu != '') {
180 if ( in_array('index.php', $disabled_menu) ||
181 in_array('index.php', $disabled_submenu) ||
182 in_array('index.php', $disabled_menu_adm) ||
183 in_array('index.php', $disabled_submenu_adm)
184 ) {
185 ?>
186 <tr valign="top" class="form-invalid">
187 <td><?php _e('Dashboard deaktivate, redirect to', 'adminimize'); ?></td>
188 <td>
189 <?php $_mw_adminimize_db_redirect = _mw_adminimize_getOptionValue('_mw_adminimize_db_redirect'); ?>
190 <select name="_mw_adminimize_db_redirect">
191 <option value="0"<?php if ($_mw_adminimize_db_redirect == '0') { echo ' selected="selected"'; } ?>><?php _e('Default', 'adminimize'); ?> (profile.php)</option>
192 <option value="1"<?php if ($_mw_adminimize_db_redirect == '1') { echo ' selected="selected"'; } ?>><?php _e('Manage Posts', 'adminimize'); ?> (edit.php)</option>
193 <option value="2"<?php if ($_mw_adminimize_db_redirect == '2') { echo ' selected="selected"'; } ?>><?php _e('Manage Pages', 'adminimize'); ?> (edit-pages.php)</option>
194 <option value="3"<?php if ($_mw_adminimize_db_redirect == '3') { echo ' selected="selected"'; } ?>><?php _e('Write Post', 'adminimize'); ?> (post-new.php)</option>
195 <option value="4"<?php if ($_mw_adminimize_db_redirect == '4') { echo ' selected="selected"'; } ?>><?php _e('Write Page', 'adminimize'); ?> (page-new.php)</option>
196 <option value="5"<?php if ($_mw_adminimize_db_redirect == '5') { echo ' selected="selected"'; } ?>><?php _e('Comments', 'adminimize'); ?> (edit-comments.php)</option>
197 </select> <?php _e('You have deaktivate the Dashboard, please select a page for redirect?', 'adminimize'); ?>
198 </td>
199 </tr>
200 <?php
201 }
202 }
203 ?>
204 </tbody>
205 </table>
206 <p id="submitbutton">
207 <input class="button" type="submit" name="_mw_adminimize_save" value="<?php _e('Update options', 'adminimize'); ?> &raquo;" /><input type="hidden" name="page_options" value="'dofollow_timeout'" />
208 </p>
209
210 </div>
211 </div>
212 </div>
213
214 <div id="poststuff" class="dlm">
215 <div class="postbox closed" >
216 <h3 id="config_menu"><?php _e('Menu Options', 'adminimize'); ?></h3>
217 <div class="inside">
218 <br class="clear" />
219 <table summary="config_menu" class="widefat">
220 <thead>
221 <tr>
222 <th><?php _e('Menu options - Menu, <span style=\"font-weight: 400;\">Submenu</span>', 'adminimize'); ?></th>
223 <th><?php _e('Deactivate &lt; User Level 10 (Admin)', 'adminimize'); ?></th>
224 <th><?php _e('Deactivate for Admin\'s', 'adminimize'); ?></th>
225 </tr>
226 </thead>
227 <tbody>
228 <?php
229 $menu = _mw_adminimize_getOptionValue('mw_adminimize_default_menu');
230 $submenu = _mw_adminimize_getOptionValue('mw_adminimize_default_submenu');
231
232 $disabled_metaboxes_post = _mw_adminimize_getOptionValue('mw_adminimize_disabled_metaboxes_post_items');
233 $disabled_metaboxes_page = _mw_adminimize_getOptionValue('mw_adminimize_disabled_metaboxes_page_items');
234 $disabled_metaboxes_post_adm = _mw_adminimize_getOptionValue('mw_adminimize_disabled_metaboxes_post_adm_items');
235 $disabled_metaboxes_page_adm = _mw_adminimize_getOptionValue('mw_adminimize_disabled_metaboxes_page_adm_items');
236
237 $metaboxes = array(
238 '#pageslugdiv',
239 '#tagsdiv,#tagsdivsb',
240 '#categorydiv,#categorydivsb',
241 '#category-add-toggle',
242 '#postexcerpt',
243 '#trackbacksdiv',
244 '#postcustom',
245 '#commentstatusdiv',
246 '#passworddiv',
247 '#authordiv',
248 '#revisionsdiv',
249 '.side-info',
250 '#notice',
251 '#post-body h2',
252 'media_buttons'
253 );
254
255 if (class_exists('SimpleTagsAdmin'))
256 array_push($metaboxes, '#suggestedtags');
257 if (function_exists('tc_post'))
258 array_push($metaboxes, '#textcontroldiv');
259 if (class_exists('HTMLSpecialCharactersHelper'))
260 array_push($metaboxes, '#htmlspecialchars');
261 if (class_exists('All_in_One_SEO_Pack'))
262 array_push($metaboxes, '#postaiosp');
263 if (function_exists('tdomf_edit_post_panel_admin_head'))
264 array_push($metaboxes, '#tdomf');
265
266 $metaboxes_names = array(
267 __('Permalink', 'adminimize'),
268 __('Tags', 'adminimize'),
269 __('Categories', 'adminimize'),
270 __('Add New Category', 'adminimize'),
271 __('Excerpt', 'adminimize'),
272 __('Trackbacks', 'adminimize'),
273 __('Custom Fields', 'adminimize'),
274 __('Comments &amp; Pings', 'adminimize'),
275 __('Password Protect This Post', 'adminimize'),
276 __('Post Author', 'adminimize'),
277 __('Post Revisions', 'adminimize'),
278 __('Related, Shortcuts', 'adminimize'),
279 __('Messenges', 'adminimize'),
280 __('h2: Advanced Options', 'adminimize'),
281 __('Media Buttons (all)', 'adminimize')
282 );
283
284 if (class_exists('SimpleTagsAdmin'))
285 array_push($metaboxes_names, __('Suggested tags from'));
286 if (function_exists('tc_post'))
287 array_push($metaboxes_names, __('Text Control'));
288 if (class_exists('HTMLSpecialCharactersHelper'))
289 array_push($metaboxes_names, __('HTML Special Characters'));
290 if (class_exists('All_in_One_SEO_Pack'))
291 array_push($metaboxes_names, 'All in One SEO Pack');
292 if (function_exists('tdomf_edit_post_panel_admin_head'))
293 array_push($metaboxes_names, 'TDOMF');
294
295 $metaboxes_page = array(
296 '#pageslugdiv',
297 '#pagepostcustom, #pagecustomdiv',
298 '#pagecommentstatusdiv',
299 '#pagepassworddiv',
300 '#pageparentdiv',
301 '#pagetemplatediv',
302 '#pageorderdiv',
303 '#pageauthordiv',
304 '#revisionsdiv',
305 '.side-info',
306 '#notice',
307 '#post-body h2',
308 'media_buttons'
309 );
310
311 if (class_exists('SimpleTagsAdmin'))
312 array_push($metaboxes_page, '#suggestedtags');
313 if (class_exists('HTMLSpecialCharactersHelper'))
314 array_push($metaboxes_page, '#htmlspecialchars');
315 if (class_exists('All_in_One_SEO_Pack'))
316 array_push($metaboxes_page, '#postaiosp');
317 if (function_exists('tdomf_edit_post_panel_admin_head'))
318 array_push($metaboxes_page, '#tdomf');
319
320 $metaboxes_names_page = array(
321 __('Permalink', 'adminimize'),
322 __('Custom Fields', 'adminimize'),
323 __('Comments &amp; Pings', 'adminimize'),
324 __('Password Protect This Page', 'adminimize'),
325 __('Page Parent', 'adminimize'),
326 __('Page Template', 'adminimize'),
327 __('Page Order', 'adminimize'),
328 __('Page Author', 'adminimize'),
329 __('Page Revisions', 'adminimize'),
330 __('Related', 'adminimize'),
331 __('Messenges', 'adminimize'),
332 __('h2: Advanced Options', 'adminimize'),
333 __('Media Buttons (all)', 'adminimize')
334 );
335
336 if (class_exists('SimpleTagsAdmin'))
337 array_push($metaboxes_names_page, __('Suggested tags from', 'adminimize'));
338 if (class_exists('HTMLSpecialCharactersHelper'))
339 array_push($metaboxes_names_page, __('HTML Special Characters'));
340 if (class_exists('All_in_One_SEO_Pack'))
341 array_push($metaboxes_names_page, 'All in One SEO Pack');
342 if (function_exists('tdomf_edit_post_panel_admin_head'))
343 array_push($metaboxes_names_page, 'TDOMF');
344
345 // print menu, submenu
346 if ($menu != '') {
347
348 $i = 0;
349 $x = 0;
350 foreach ($menu as $item) {
351
352 // menu items
353 // items disabled for user
354 if ( $item[2] == 'examble.php' ) {
355 $disabled_item = ' disabled="disabled"';
356 } else {
357 $disabled_item = '';
358 }
359
360 // checkbox checked
361 if ( in_array($item[2], $disabled_menu) ) {
362 $checked = ' checked="checked"';
363 } else {
364 $checked = '';
365 }
366
367 // checkbox checked for admin
368 if ( in_array($item[2], $disabled_menu_adm) ) {
369 $checked_adm = ' checked="checked"';
370 } else {
371 $checked_adm = '';
372 }
373
374 echo '<tr class="form-invalid">' . "\n";
375 echo '<th>' . $item[0] . ' <span style="color:#ccc; font-weight: 400;">(' . $item[2] . ')</span> </th>';
376 echo '<td class="num"><input id="check_menu'. $x .'" type="checkbox"' . $disabled_item . $checked . ' name="mw_adminimize_disabled_menu_items[]" value="' . $item[2] . '"/></td>' . "\n";
377 echo '<td class="num"><input id="check_menuadm'. $x .'" type="checkbox"' . $disabled_item . $checked_adm . ' name="mw_adminimize_disabled_menu_adm_items[]" value="' . $item[2] . '"/></td>' . "\n";
378 echo '</tr>';
379 $x++;
380 if ( !isset($submenu[$item[2]]) )
381 continue;
382
383 // submenu items
384 foreach ( $submenu[ $item[2] ] as $subitem ) {
385
386 // submenu items
387 // items disabled for adm
388 if ( $subitem[2] == 'adminimize/adminimize.php' ) {
389 $disabled_subitem_adm = ' disabled="disabled"';
390 } else {
391 $disabled_subitem_adm = '';
392 }
393
394 echo '<tr>' . "\n";
395
396 $checked = (in_array($subitem[2], $disabled_submenu)) ? ' checked="checked"' : '';
397 $checked_adm = (in_array($subitem[2], $disabled_submenu_adm)) ? ' checked="checked"' : '';
398
399 echo '<td> &mdash; ' . $subitem[0] . ' <span style="color:#ccc; font-weight: 400;">(' . $subitem[2] . ')</span> </td>' . "\n";
400 echo '<td class="num"><input id="check_menu'. $x .'" type="checkbox"' . $checked . ' name="mw_adminimize_disabled_submenu_items[]" value="' . $subitem[2] . '" /></td>' . "\n";
401 echo '<td class="num"><input id="check_menuadm'. $x .'" type="checkbox"' . $disabled_subitem_adm . $checked_adm . ' name="mw_adminimize_disabled_submenu_adm_items[]" value="' . $subitem[2] . '" /></td>' . "\n";
402 echo '</tr>' . "\n";
403 $x++;
404 }
405 $i++;
406 $x++;
407 }
408 echo '<tr>' . "\n";
409 echo '<th>' . __('All items', 'adminimize') . '</th>';
410 echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_menu" onClick="toggleCheckboxes_menu();"><a id="atoggleCheckboxes_menu" href="javascript:toggleCheckboxes_menu();"> ' . __('All', 'adminimize') . '</a></td>';
411 echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_menuadm" onClick="toggleCheckboxes_menuadm();"><a id="atoggleCheckboxes_menuadm" href="javascript:toggleCheckboxes_menuadm();"> ' . __('All', 'adminimize') . '</a></td>';
412 echo '</tr>' . "\n";
413
414 } else {
415 $myErrors = new _mw_adminimize_message_class();
416 $myErrors = '<tr><td style="color: red;">' . $myErrors->get_error('_mw_adminimize_get_option') . '</td></tr>';
417 echo $myErrors;
418 } ?>
419 </tbody>
420 </table>
421 <p id="submitbutton">
422 <input class="button" type="submit" name="_mw_adminimize_save" value="<?php _e('Update options', 'adminimize'); ?> &raquo;" /><input type="hidden" name="page_options" value="'dofollow_timeout'" />
423 </p>
424
425 </div>
426 </div>
427 </div>
428
429 <div id="poststuff" class="dlm">
430 <div class="postbox closed" >
431 <h3 id="config_edit"><?php _e('Write options', 'adminimize'); ?></h3>
432 <div class="inside">
433 <br class="clear" />
434 <table summary="config_edit" class="widefat">
435 <thead>
436 <tr>
437 <th><?php _e('Write options - Post', 'adminimize'); ?></th>
438 <th><?php _e('Write options - Page', 'adminimize'); ?></th>
439 </tr>
440 </thead>
441
442 <tbody>
443 <tr valign="top">
444 <td>
445 <table summary="config_edit_post" class="widefat">
446 <thead>
447 <tr>
448 <th>&nbsp;</th>
449 <th><?php _e('Deactivate for &lt; Admin\'s (level 1-9)', 'adminimize'); ?></th>
450 <th><?php _e('Deactivate for Admin\'s (level 10)', 'adminimize'); ?></th>
451 </tr>
452 </thead>
453
454 <tbody>
455 <?php
456 $x = 0;
457 foreach ($metaboxes as $index => $metabox) {
458 $checked = (in_array($metabox, $disabled_metaboxes_post)) ? ' checked="checked"' : '';
459 $checked_adm = (in_array($metabox, $disabled_metaboxes_post_adm)) ? ' checked="checked"' : '';
460
461 echo '<tr>' . "\n";
462 echo '<td>' . $metaboxes_names[$index] . ' <span style="color:#ccc; font-weight: 400;">(' . $metabox . ')</span> </td>' . "\n";
463 echo '<td class="num"><input id="check_post'. $x .'" type="checkbox"' . $checked . ' name="mw_adminimize_disabled_metaboxes_post_items[]" value="' . $metabox . '" /></td>' . "\n";
464 echo '<td class="num"><input id="check_postadm'. $x .'" type="checkbox"' . $checked_adm . ' name="mw_adminimize_disabled_metaboxes_post_adm_items[]" value="' . $metabox . '" /></td>' . "\n";
465 echo '</tr>' . "\n";
466 $x++;
467 }
468 ?>
469 <tr>
470 <th><?php _e('All items', 'adminimize'); ?></th>
471 <?php
472 echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_post" onClick="toggleCheckboxes_post();"><a id="atoggleCheckboxes_post" href="javascript:toggleCheckboxes_post();"> ' . __('All', 'adminimize') . '</a></td>';
473 echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_postadm" onClick="toggleCheckboxes_postadm();"><a id="atoggleCheckboxes_postadm" href="javascript:toggleCheckboxes_postadm();"> ' . __('All', 'adminimize') . '</a></td>';
474 ?>
475 </tr>
476 </tbody>
477 </table>
478 </td>
479 <td>
480 <table summary="config_edit_page" class="widefat">
481 <thead>
482 <tr>
483 <th>&nbsp;</th>
484 <th><?php _e('Deactivate for &lt; Admin\'s (level 1-9)', 'adminimize'); ?></th>
485 <th><?php _e('Deactivate for Admin\'s (level 10)', 'adminimize'); ?></th>
486 </tr>
487 </thead>
488
489 <tbody>
490 <?php
491 $x = 0;
492 foreach ($metaboxes_page as $index => $metabox) {
493 $checked = (in_array($metabox, $disabled_metaboxes_page)) ? ' checked="checked"' : '';
494 $checked_adm = (in_array($metabox, $disabled_metaboxes_page_adm)) ? ' checked="checked"' : '';
495
496 echo '<tr>' . "\n";
497 echo '<td>' . $metaboxes_names_page[$index] . ' <span style="color:#ccc; font-weight: 400;">(' . $metabox . ')</span> </td>' . "\n";
498 echo '<td class="num"><input id="check_page'. $x .'" type="checkbox"' . $checked . ' name="mw_adminimize_disabled_metaboxes_page_items[]" value="' . $metabox . '" /></td>' . "\n";
499 echo '<td class="num"><input id="check_pageadm'. $x .'" type="checkbox"' . $checked_adm . ' name="mw_adminimize_disabled_metaboxes_page_adm_items[]" value="' . $metabox . '" /></td>' . "\n";
500 echo '</tr>' . "\n";
501 $x++;
502 }
503 ?>
504 <tr>
505 <th><?php _e('All items', 'adminimize'); ?></th>
506 <?php
507 echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_page" onClick="toggleCheckboxes_page();"><a id="atoggleCheckboxes_page" href="javascript:toggleCheckboxes_page();"> ' . __('All', 'adminimize') . '</a></td>';
508 echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_pageadm" onClick="toggleCheckboxes_pageadm();"><a id="atoggleCheckboxes_pageadm" href="javascript:toggleCheckboxes_pageadm();"> ' . __('All', 'adminimize') . '</a></td>';
509 ?>
510 </tr>
511 </tbody>
512 </table>
513 </td>
514 </tr>
515 </tbody>
516 </table>
517
518 <p id="submitbutton">
519 <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_insert" />
520 <input class="button" type="submit" name="_mw_adminimize_save" value="<?php _e('Update options', 'adminimize'); ?> &raquo;" /><input type="hidden" name="page_options" value="'dofollow_timeout'" />
521 </p>
522 </form>
523
524 </div>
525 </div>
526 </div>
527
528 <div id="poststuff" class="dlm">
529 <div class="postbox closed" >
530 <h3 id="set_theme"><?php _e('Set Theme', 'adminimize') ?></h3>
531 <div class="inside">
532 <br class="clear" />
533 <form name="set_theme" method="post" id="_mw_adminimize_set_theme" action="?page=<?php echo $_GET['page'];?>" >
534 <?php wp_nonce_field('mw_adminimize_nonce'); ?>
535 <table class="widefat">
536 <thead>
537 <tr class="thead">
538 <th>&nbsp;</th>
539 <th class="num"><?php _e('User-ID') ?></th>
540 <th><?php _e('Username') ?></th>
541 <th><?php _e('Display name publicly as') ?></th>
542 <th><?php _e('Admin Color Scheme') ?></th>
543 <th><?php _e('User Level') ?></th>
544 <th><?php _e('Role') ?></th>
545 </tr>
546 </thead>
547 <tbody id="users" class="list:user user-list">
548 <?php
549 $wp_user_search = $wpdb->get_results("SELECT ID, user_login, display_name FROM $wpdb->users ORDER BY ID");
550
551 $style = '';
552 foreach ( $wp_user_search as $userid ) {
553 $user_id = (int) $userid->ID;
554 $user_login = stripslashes($userid->user_login);
555 $display_name = stripslashes($userid->display_name);
556 $current_color = get_user_option('admin_color', $user_id);
557 $user_level = (int) get_user_option($table_prefix . 'user_level', $user_id);
558 $user_object = new WP_User($user_id);
559 $roles = $user_object->roles;
560 $role = array_shift($roles);
561
562 $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
563 $return = '';
564 $return .= '<tr>';
565 $return .= '<td><input type="checkbox" name="mw_adminimize_theme_items[]" value="' . $user_id . '" /></td>';
566 $return .= '<td class="num">'. $user_id .'</td>';
567 $return .= '<td>'. $user_login .'</td>';
568 $return .= '<td>'. $display_name .'</td>';
569 $return .= '<td>'. $current_color . '</td>';
570 $return .= '<td class="num">'. $user_level . '</td>';
571 $return .= '<td>'. $role . '</td>';
572 $return .= '</tr>';
573
574 print($return);
575 }
576 ?>
577 <tr valign="top">
578 <td>&nbsp;</td>
579 <td>&nbsp;</td>
580 <td>&nbsp;</td>
581 <td>&nbsp;</td>
582 <td>
583 <select name="_mw_adminimize_set_theme">
584 <?php foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
585 <option value="<?php echo $color; ?>"><?php echo $color_info->name . ' (' . $color . ')' ?></option>
586 <?php endforeach; ?>
587 </select>
588 </td>
589 <td>&nbsp;</td>
590 <td>&nbsp;</td>
591 </tr>
592 </tbody>
593 </table>
594 <p id="submitbutton">
595 <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_set_theme" />
596 <input type="submit" name="_mw_adminimize_save" value="<?php _e('Set Theme', 'adminimize'); ?> &raquo;" class="button" />
597 </p>
598 </form>
599
600 </div>
601 </div>
602 </div>
603
604 <div id="poststuff" class="dlm">
605 <div class="postbox closed" >
606 <h3 id="uninstall"><?php _e('Deinstall options', 'adminimize') ?></h3>
607 <div class="inside">
608
609 <p><?php _e('Use this option for clean your database from all entries of this plugin. When you deactivate the plugin, the deinstall of the plugin <strong>clean not</strong> all entries in the database.', 'adminimize'); ?></p>
610 <form name="deinstall_options" method="post" id="_mw_adminimize_options_deinstall" action="?page=<?php echo $_GET['page'];?>">
611 <?php wp_nonce_field('mw_adminimize_nonce'); ?>
612 <p id="submitbutton">
613 <input type="submit" name="_mw_adminimize_deinstall" value="<?php _e('Delete options', 'adminimize'); ?> &raquo;" class="button-secondary" />
614 <input type="checkbox" name="_mw_adminimize_deinstall_yes" value="_mw_adminimize_deinstall" />
615 <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_deinstall" />
616 </p>
617 </form>
618
619 </div>
620 </div>
621 </div>
622
623 <div id="poststuff" class="dlm">
624 <div class="postbox closed" >
625 <h3 id="uninstall"><?php _e('About the plugin', 'adminimize') ?></h3>
626 <div class="inside">
627
628 <p><?php _e('Further information: Visit the <a href="http://bueltge.de/wordpress-admin-theme-adminimize/674/">plugin homepage</a> for further information or to grab the latest version of this plugin.', 'adminimize'); ?><br />&copy; Copyright 2008 - <?php echo date("Y"); ?> <a href="http://bueltge.de">Frank B&uuml;ltge</a> | <?php _e('You want to thank me? Visit my <a href="http://bueltge.de/wunschliste/">wishlist</a>.', 'adminimize'); ?></p>
629 <p class="textright"><?php echo $wpdb->num_queries; ?>q, <?php timer_stop(1); ?>s</p>
630 </div>
631 </div>
632 </div>
633
634 <script type="text/javascript">
635 <!--
636 jQuery('.postbox h3').prepend('<a class="togbox">+</a> ');
637 //jQuery('.togbox').click( function() { jQuery(jQuery(this).parent().parent().get(0)).toggleClass('closed'); } );
638 jQuery('.postbox h3').click( function() { jQuery(jQuery(this).parent().get(0)).toggleClass('closed'); } );
639 jQuery('.postbox.close-me').each(function(){
640 jQuery(this).addClass("closed");
641 });
642 //-->
643 </script>
644
645 </div>
646 <?php
647 }
648 ?>