| @@ -1,18 +1,34 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * options-page in wp-admin |
| 4 | 4 | */ |
| 5 | + | |
| 6 | +// export options | |
| 7 | +if ( isset( $_GET['_mw_adminimize_export'] ) ) { | |
| 8 | + _mw_adminimize_export(); | |
| 9 | + die(); | |
| 10 | +} | |
| 11 | + | |
| 12 | +//include( 'adminimize_admin_bar.php' ); | |
| 13 | + | |
| 5 | 14 | function _mw_adminimize_options() { |
| 15 | + global $wpdb, $_wp_admin_css_colors, $wp_version, $wp_roles, $table_prefix; | |
| 6 | 16 | |
| 17 | + $_mw_adminimize_user_info = ''; | |
| 18 | + | |
| 19 | + //get array with userroles | |
| 20 | + $user_roles = get_all_user_roles(); | |
| 21 | + $user_roles_names = get_all_user_roles_names(); | |
| 22 | + | |
| 7 | 23 | // update options |
| 8 | - if ( ($_POST['_mw_adminimize_action'] == '_mw_adminimize_insert') && $_POST['_mw_adminimize_save'] ) { | |
| 9 | - | |
| 10 | - if ( function_exists('current_user_can') && current_user_can('edit_plugins') ) { | |
| 11 | - check_admin_referer($_mw_adminimize_nonce); | |
| 24 | + if ( ( isset($_POST['_mw_adminimize_action']) && $_POST['_mw_adminimize_action'] == '_mw_adminimize_insert') && $_POST['_mw_adminimize_save'] ) { | |
| 12 | 25 | |
| 26 | + if ( function_exists('current_user_can') && current_user_can('manage_options') ) { | |
| 27 | + check_admin_referer('mw_adminimize_nonce'); | |
| 28 | + | |
| 13 | 29 | _mw_adminimize_update(); |
| 14 | - | |
| 30 | + | |
| 15 | 31 | } else { |
| 16 | 32 | $myErrors = new _mw_adminimize_message_class(); |
| 17 | 33 | $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_access_denied') . '</p></div>'; |
| 18 | 34 | wp_die($myErrors); |
| @@ -17,25 +33,56 @@ | ||
| 17 | 33 | $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_access_denied') . '</p></div>'; |
| 18 | 34 | wp_die($myErrors); |
| 19 | 35 | } |
| 20 | 36 | } |
| 37 | + | |
| 38 | + // import options | |
| 39 | + if ( ( isset($_POST['_mw_adminimize_action']) && $_POST['_mw_adminimize_action'] == '_mw_adminimize_import') && $_POST['_mw_adminimize_save'] ) { | |
| 21 | 40 | |
| 22 | - // deinstall options | |
| 23 | - if ( ($_POST['_mw_adminimize_action'] == '_mw_adminimize_deinstall') && ($_POST['_mw_adminimize_deinstall_yes'] != '_mw_adminimize_deinstall') ) { | |
| 41 | + if ( function_exists('current_user_can') && current_user_can('manage_options') ) { | |
| 42 | + check_admin_referer('mw_adminimize_nonce'); | |
| 43 | + | |
| 44 | + _mw_adminimize_import(); | |
| 45 | + | |
| 46 | + } else { | |
| 24 | 47 | $myErrors = new _mw_adminimize_message_class(); |
| 25 | - $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_deinstall_yes') . '</p></div>'; | |
| 48 | + $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_access_denied') . '</p></div>'; | |
| 26 | 49 | wp_die($myErrors); |
| 50 | + } | |
| 27 | 51 | } |
| 28 | 52 | |
| 29 | - if ( ($_POST['_mw_adminimize_action'] == '_mw_adminimize_deinstall') && $_POST['_mw_adminimize_deinstall'] && ($_POST['_mw_adminimize_deinstall_yes'] == '_mw_adminimize_deinstall') ) { | |
| 53 | + // deinstall options | |
| 54 | + if ( ( isset($_POST['_mw_adminimize_action']) && $_POST['_mw_adminimize_action'] == '_mw_adminimize_deinstall') && ($_POST['_mw_adminimize_deinstall_yes'] != '_mw_adminimize_deinstall') ) { | |
| 30 | 55 | |
| 31 | - if ( function_exists('current_user_can') && current_user_can('edit_plugins') ) { | |
| 32 | - check_admin_referer($_mw_adminimize_nonce); | |
| 33 | - | |
| 56 | + $myErrors = new _mw_adminimize_message_class(); | |
| 57 | + $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_deinstall_yes') . '</p></div>'; | |
| 58 | + wp_die($myErrors); | |
| 59 | + } | |
| 60 | + | |
| 61 | + if ( ( isset($_POST['_mw_adminimize_action']) && $_POST['_mw_adminimize_action'] == '_mw_adminimize_deinstall') && $_POST['_mw_adminimize_deinstall'] && ($_POST['_mw_adminimize_deinstall_yes'] == '_mw_adminimize_deinstall') ) { | |
| 62 | + | |
| 63 | + if ( function_exists('current_user_can') && current_user_can('manage_options') ) { | |
| 64 | + check_admin_referer('mw_adminimize_nonce'); | |
| 65 | + | |
| 34 | 66 | _mw_adminimize_deinstall(); |
| 67 | + | |
| 68 | + $myErrors = new _mw_adminimize_message_class(); | |
| 69 | + $myErrors = '<div id="message" class="updated fade"><p>' . $myErrors->get_error('_mw_adminimize_deinstall') . '</p></div>'; | |
| 70 | + echo $myErrors; | |
| 71 | + } else { | |
| 72 | + $myErrors = new _mw_adminimize_message_class(); | |
| 73 | + $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_access_denied') . '</p></div>'; | |
| 74 | + wp_die($myErrors); | |
| 75 | + } | |
| 76 | + } | |
| 77 | + | |
| 78 | + // load theme user data | |
| 79 | + if ( ( isset($_POST['_mw_adminimize_action']) && $_POST['_mw_adminimize_action'] == '_mw_adminimize_load_theme') && $_POST['_mw_adminimize_load'] ) { | |
| 80 | + if ( function_exists('current_user_can') && current_user_can('edit_users') ) { | |
| 81 | + check_admin_referer('mw_adminimize_nonce'); | |
| 35 | 82 | |
| 36 | 83 | $myErrors = new _mw_adminimize_message_class(); |
| 37 | - $myErrors = '<div id="message" class="updated fade"><p>' . $myErrors->get_error('_mw_adminimize_deinstall') . '</p></div>'; | |
| 84 | + $myErrors = '<div id="message" class="updated fade"><p>' . $myErrors->get_error('_mw_adminimize_load_theme') . '</p></div>'; | |
| 38 | 85 | echo $myErrors; |
| 39 | 86 | } else { |
| 40 | 87 | $myErrors = new _mw_adminimize_message_class(); |
| 41 | 88 | $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_access_denied') . '</p></div>'; |
| @@ -42,11 +89,11 @@ | ||
| 42 | 89 | wp_die($myErrors); |
| 43 | 90 | } |
| 44 | 91 | } |
| 45 | 92 | |
| 46 | - if ( ($_POST['_mw_adminimize_action'] == '_mw_adminimize_set_theme') && $_POST['_mw_adminimize_save'] ) { | |
| 93 | + if ( ( isset($_POST['_mw_adminimize_action']) && $_POST['_mw_adminimize_action'] == '_mw_adminimize_set_theme') && $_POST['_mw_adminimize_save'] ) { | |
| 47 | 94 | if ( function_exists('current_user_can') && current_user_can('edit_users') ) { |
| 48 | - check_admin_referer($_mw_adminimize_nonce); | |
| 95 | + check_admin_referer('mw_adminimize_nonce'); | |
| 49 | 96 | |
| 50 | 97 | _mw_adminimize_set_theme(); |
| 51 | 98 | |
| 52 | 99 | $myErrors = new _mw_adminimize_message_class(); |
| @@ -57,564 +104,216 @@ | ||
| 57 | 104 | $myErrors = '<div id="message" class="error"><p>' . $myErrors->get_error('_mw_adminimize_access_denied') . '</p></div>'; |
| 58 | 105 | wp_die($myErrors); |
| 59 | 106 | } |
| 60 | 107 | } |
| 61 | - | |
| 62 | 108 | ?> |
| 63 | 109 | <div class="wrap"> |
| 64 | - <h2><?php _e('Adminimize', 'adminimize'); ?></h2> | |
| 65 | - <br class="clear" /> | |
| 66 | - <div id="poststuff" class="dlm"> | |
| 67 | - <div class="postbox closed" > | |
| 68 | - <h3><?php _e('Backend Einstellungen', 'adminimize'); ?></h3> | |
| 69 | - <div class="inside"> | |
| 110 | + <?php | |
| 111 | + // Backend Options for all roles | |
| 112 | + require_once('inc-options/minimenu.php'); | |
| 113 | + ?> | |
| 70 | 114 | |
| 71 | - <form name="backend_option" method="post" id="_mw_adminimize_options" action="<?php echo $location; ?>" > | |
| 72 | - <?php _mw_adminimize_nonce_field($_mw_adminimize_nonce); ?> | |
| 73 | - <br class="clear" /> | |
| 74 | - <table summary="config" class="widefat"> | |
| 75 | - <thead> | |
| 76 | - <tr> | |
| 77 | - <th><?php _e('Backend Einstellungen', 'adminimize'); ?></th> | |
| 78 | - <th> </th> | |
| 79 | - </tr> | |
| 80 | - </thead> | |
| 81 | - <tbody> | |
| 82 | - <tr valign="top"> | |
| 83 | - <td><?php _e('Sidebar Width', 'adminimize'); ?></td> | |
| 84 | - <td> | |
| 85 | - <?php $_mw_adminimize_sidebar_wight = get_option('_mw_adminimize_sidebar_wight'); ?> | |
| 86 | - <select name="_mw_adminimize_sidebar_wight"> | |
| 87 | - <option value="0"<?php if ($_mw_adminimize_sidebar_wight == '0') { echo ' selected="selected"'; } ?>><?php _e('Standard', 'adminimize'); ?></option> | |
| 88 | - <option value="300"<?php if ($_mw_adminimize_sidebar_wight == '300') { echo ' selected="selected"'; } ?>>300px</option> | |
| 89 | - <option value="400"<?php if ($_mw_adminimize_sidebar_wight == '400') { echo ' selected="selected"'; } ?>>400px</option> | |
| 90 | - <option value="20"<?php if ($_mw_adminimize_sidebar_wight == '20') { echo ' selected="selected"'; } ?>>20%</option> | |
| 91 | - <option value="30"<?php if ($_mw_adminimize_sidebar_wight == '30') { echo ' selected="selected"'; } ?>>30%</option> | |
| 92 | - </select> <?php _e('Der Sidebar am rechten Rand des Bereich <em>Schreiben</em> kann konfiguriert werden. Standard sind 200 Pixel im WordPress Theme <em>Classic</em> und <em>Fresh</em>', 'adminimize'); ?> | |
| 93 | - </td> | |
| 94 | - </tr> | |
| 95 | - <tr valign="top"> | |
| 96 | - <td><?php _e('User-Info', 'adminimize'); ?></td> | |
| 97 | - <td> | |
| 98 | - <?php $_mw_adminimize_user_info = get_option('_mw_adminimize_user_info'); ?> | |
| 99 | - <select name="_mw_adminimize_user_info"> | |
| 100 | - <option value="0"<?php if ($_mw_adminimize_user_info == '0') { echo ' selected="selected"'; } ?>><?php _e('Standard', 'adminimize'); ?></option> | |
| 101 | - <option value="1"<?php if ($_mw_adminimize_user_info == '1') { echo ' selected="selected"'; } ?>><?php _e('Ausblenden', 'adminimize'); ?></option> | |
| 102 | - <option value="2"<?php if ($_mw_adminimize_user_info == '2') { echo ' selected="selected"'; } ?>><?php _e('nur Logout', 'adminimize'); ?></option> | |
| 103 | - </select> <?php _e('Der "User-Info-Bereich" ist im oberen rechten Bereich zu finden und kann ausgeblendet oder reduziert dargestellt werden.', 'adminimize'); ?> | |
| 104 | - </td> | |
| 105 | - </tr> | |
| 106 | - <?php if ($_mw_adminimize_user_info != '2') $disabled_item = ' disabled="disabled"' ?> | |
| 107 | - <tr valign="top"> | |
| 108 | - <td><?php _e('User Info geändert, Weiterleitung nach', 'adminimize'); ?></td> | |
| 109 | - <td> | |
| 110 | - <?php $_mw_adminimize_ui_redirect = get_option('_mw_adminimize_ui_redirect'); ?> | |
| 111 | - <select name="_mw_adminimize_ui_redirect" <?php echo $disabled_item ?>> | |
| 112 | - <option value="0"<?php if ($_mw_adminimize_ui_redirect == '0') { echo ' selected="selected"'; } ?>><?php _e('Standard', 'adminimize'); ?></option> | |
| 113 | - <option value="1"<?php if ($_mw_adminimize_ui_redirect == '1') { echo ' selected="selected"'; } ?>><?php _e('Startseite des Blog', 'adminimize'); ?> | |
| 114 | - </select> <?php _e('Wenn der "User-Info-Bereich" geändert wird, dann kann die die Weiterleitung nach einem Logout geändert werden.', 'adminimize'); ?> | |
| 115 | - </td> | |
| 116 | - </tr> | |
| 117 | - <tr valign="top"> | |
| 118 | - <td><?php _e('Footer', 'adminimize'); ?></td> | |
| 119 | - <td> | |
| 120 | - <?php $_mw_adminimize_footer = get_option('_mw_adminimize_footer'); ?> | |
| 121 | - <select name="_mw_adminimize_footer"> | |
| 122 | - <option value="0"<?php if ($_mw_adminimize_footer == '0') { echo ' selected="selected"'; } ?>><?php _e('Standard', 'adminimize'); ?></option> | |
| 123 | - <option value="1"<?php if ($_mw_adminimize_footer == '1') { echo ' selected="selected"'; } ?>><?php _e('Ausblenden', 'adminimize'); ?></option> | |
| 124 | - </select> <?php _e('Der Footer-Bereich kann deaktiviert werden, inklusive aller Links und Hinweise.', 'adminimize'); ?> | |
| 125 | - </td> | |
| 126 | - </tr> | |
| 127 | - <tr valign="top"> | |
| 128 | - <td><?php _e('WriteScroll', 'adminimize'); ?></td> | |
| 129 | - <td> | |
| 130 | - <?php $_mw_adminimize_writescroll = get_option('_mw_adminimize_writescroll'); ?> | |
| 131 | - <select name="_mw_adminimize_writescroll"> | |
| 132 | - <option value="0"<?php if ($_mw_adminimize_writescroll == '0') { echo ' selected="selected"'; } ?>><?php _e('Standard', 'adminimize'); ?></option> | |
| 133 | - <option value="1"<?php if ($_mw_adminimize_writescroll == '1') { echo ' selected="selected"'; } ?>><?php _e('Aktiv', 'adminimize'); ?></option> | |
| 134 | - </select> <?php _e('Automatisches Scrollen zum Editor beim Aufruf der Seite Schreiben in Beiträge und Seite.', 'adminimize'); ?> | |
| 135 | - </td> | |
| 136 | - </tr> | |
| 137 | - <tr valign="top"> | |
| 138 | - <td><?php _e('Timestamp', 'adminimize'); ?></td> | |
| 139 | - <td> | |
| 140 | - <?php $_mw_adminimize_timestamp = get_option('_mw_adminimize_timestamp'); ?> | |
| 141 | - <select name="_mw_adminimize_timestamp"> | |
| 142 | - <option value="0"<?php if ($_mw_adminimize_timestamp == '0') { echo ' selected="selected"'; } ?>><?php _e('Standard', 'adminimize'); ?></option> | |
| 143 | - <option value="1"<?php if ($_mw_adminimize_timestamp == '1') { echo ' selected="selected"'; } ?>><?php _e('Aktiv', 'adminimize'); ?></option> | |
| 144 | - </select> <?php _e('Das Feld zum Ändern des Veröffentlichungsdatum ist immer geöffnet.', 'adminimize'); ?> | |
| 145 | - </td> | |
| 146 | - </tr> | |
| 147 | - <tr valign="top"> | |
| 148 | - <td><?php _e('Thickbox FullScreen', 'adminimize'); ?></td> | |
| 149 | - <td> | |
| 150 | - <?php $_mw_adminimize_tb_window = get_option('_mw_adminimize_tb_window'); ?> | |
| 151 | - <select name="_mw_adminimize_tb_window"> | |
| 152 | - <option value="0"<?php if ($_mw_adminimize_tb_window == '0') { echo ' selected="selected"'; } ?>><?php _e('Standard', 'adminimize'); ?></option> | |
| 153 | - <option value="1"<?php if ($_mw_adminimize_tb_window == '1') { echo ' selected="selected"'; } ?>><?php _e('Aktiv', 'adminimize'); ?></option> | |
| 154 | - </select> <?php _e('Alle Thickbox-Funktionen nutzen den kompletten Raum des Browsers, zum Beispiel beim uploaden von Bildern.', 'adminimize'); ?> | |
| 155 | - </td> | |
| 156 | - </tr> | |
| 157 | - <tr valign="top"> | |
| 158 | - <td><?php _e('Hinweis im Footer', 'adminimize'); ?></td> | |
| 159 | - <td> | |
| 160 | - <?php $_mw_adminimize_advice = get_option('_mw_adminimize_advice'); ?> | |
| 161 | - <select name="_mw_adminimize_advice"> | |
| 162 | - <option value="0"<?php if ($_mw_adminimize_advice == '0') { echo ' selected="selected"'; } ?>><?php _e('Standard', 'adminimize'); ?></option> | |
| 163 | - <option value="1"<?php if ($_mw_adminimize_advice == '1') { echo ' selected="selected"'; } ?>><?php _e('Aktiv', 'adminimize'); ?></option> | |
| 164 | - </select> | |
| 165 | - <textarea style="width: 85%;" class="code" rows="1" cols="60" name="_mw_adminimize_advice_txt" id="_mw_adminimize_advice_txt" ><?php echo htmlspecialchars(stripslashes(get_option('_mw_adminimize_advice_txt'))); ?></textarea><br /><?php _e('Im Footer kann ein Hinweis auf die aktive Veränderung des Standard-Layout gesetzt werden, (x)HTML erlaubt.', 'adminimize'); ?> | |
| 166 | - </td> | |
| 167 | - </tr> | |
| 168 | - <?php | |
| 169 | - // when remove dashboard | |
| 170 | - $disabled_menu = get_option('mw_adminimize_disabled_menu'); | |
| 171 | - $disabled_submenu = get_option('mw_adminimize_disabled_submenu'); | |
| 172 | - $disabled_menu_adm = get_option('mw_adminimize_disabled_menu_adm'); | |
| 173 | - $disabled_submenu_adm = get_option('mw_adminimize_disabled_submenu_adm'); | |
| 115 | + <form name="backend_option" method="post" id="_mw_adminimize_options" action="?page=<?php echo $_GET['page'];?>" > | |
| 116 | + <?php | |
| 117 | + // Backend Options for all roles | |
| 118 | + require_once('inc-options/backend_options.php'); | |
| 174 | 119 | |
| 175 | - if ($disabled_menu != '') { | |
| 176 | - if ( in_array('index.php', $disabled_menu) || | |
| 177 | - in_array('index.php', $disabled_submenu) || | |
| 178 | - in_array('index.php', $disabled_menu_adm) || | |
| 179 | - in_array('index.php', $disabled_submenu_adm) | |
| 180 | - ) { | |
| 181 | - ?> | |
| 182 | - <tr valign="top" class="form-invalid"> | |
| 183 | - <td><?php _e('Dashboard inaktiv, Weiterleitung nach', 'adminimize'); ?></td> | |
| 184 | - <td> | |
| 185 | - <?php $_mw_adminimize_db_redirect = get_option('_mw_adminimize_db_redirect'); ?> | |
| 186 | - <select name="_mw_adminimize_db_redirect"> | |
| 187 | - <option value="0"<?php if ($_mw_adminimize_db_redirect == '0') { echo ' selected="selected"'; } ?>><?php _e('Standard', 'adminimize'); ?> (profile.php)</option> | |
| 188 | - <option value="1"<?php if ($_mw_adminimize_db_redirect == '1') { echo ' selected="selected"'; } ?>><?php _e('Verwalten Beiträge', 'adminimize'); ?> (edit.php)</option> | |
| 189 | - <option value="2"<?php if ($_mw_adminimize_db_redirect == '2') { echo ' selected="selected"'; } ?>><?php _e('Verwalten Seiten', 'adminimize'); ?> (edit-pages.php)</option> | |
| 190 | - <option value="3"<?php if ($_mw_adminimize_db_redirect == '3') { echo ' selected="selected"'; } ?>><?php _e('Schreiben Beitrag', 'adminimize'); ?> (post-new.php)</option> | |
| 191 | - <option value="4"<?php if ($_mw_adminimize_db_redirect == '4') { echo ' selected="selected"'; } ?>><?php _e('Schreiben Seite', 'adminimize'); ?> (page-new.php)</option> | |
| 192 | - <option value="5"<?php if ($_mw_adminimize_db_redirect == '5') { echo ' selected="selected"'; } ?>><?php _e('Kommentare', 'adminimize'); ?> (edit-comments.php)</option> | |
| 193 | - </select> <?php _e('Du hast das Dashboard deaktivert, wohin soll der Nutzer weitergeleitet werden?', 'adminimize'); ?> | |
| 194 | - </td> | |
| 195 | - </tr> | |
| 196 | - <?php | |
| 197 | - } | |
| 198 | - } | |
| 199 | - ?> | |
| 200 | - </tbody> | |
| 201 | - </table> | |
| 202 | - <p id="submitbutton"> | |
| 203 | - <input class="button" type="submit" name="_mw_adminimize_save" value="<?php _e('Einstellungen aktualisieren', 'adminimize'); ?> »" /><input type="hidden" name="page_options" value="'dofollow_timeout'" /> | |
| 204 | - </p> | |
| 205 | - | |
| 206 | - </div> | |
| 207 | - </div> | |
| 208 | - </div> | |
| 209 | - | |
| 210 | - <div id="poststuff" class="dlm"> | |
| 211 | - <div class="postbox closed" > | |
| 212 | - <h3 id="config_menu"><?php _e('Menu Einstellungen', 'adminimize'); ?></h3> | |
| 213 | - <div class="inside"> | |
| 214 | - <br class="clear" /> | |
| 215 | - <table summary="config_menu" class="widefat"> | |
| 216 | - <thead> | |
| 217 | - <tr> | |
| 218 | - <th><?php _e('Menu Einstellungen - Menu, <span style="font-weight: 400;">Submenu</span>', 'adminimize'); ?></th> | |
| 219 | - <th><?php _e('Deaktivieren < User Level 10 (Admin)', 'adminimize'); ?></th> | |
| 220 | - <th><?php _e('Deaktivieren für Admin\'s', 'adminimize'); ?></th> | |
| 221 | - </tr> | |
| 222 | - </thead> | |
| 223 | - <tbody> | |
| 224 | - <?php | |
| 225 | - $menu = get_option('mw_adminimize_default_menu'); | |
| 226 | - $submenu = get_option('mw_adminimize_default_submenu'); | |
| 227 | - $disabled_menu = get_option('mw_adminimize_disabled_menu'); | |
| 228 | - $disabled_submenu = get_option('mw_adminimize_disabled_submenu'); | |
| 229 | - $disabled_menu_adm = get_option('mw_adminimize_disabled_menu_adm'); | |
| 230 | - $disabled_submenu_adm = get_option('mw_adminimize_disabled_submenu_adm'); | |
| 231 | - | |
| 232 | - $disabled_metaboxes_post = get_option('mw_adminimize_disabled_metaboxes_post'); | |
| 233 | - $disabled_metaboxes_page = get_option('mw_adminimize_disabled_metaboxes_page'); | |
| 234 | - $disabled_metaboxes_post_adm = get_option('mw_adminimize_disabled_metaboxes_post_adm'); | |
| 235 | - $disabled_metaboxes_page_adm = get_option('mw_adminimize_disabled_metaboxes_page_adm'); | |
| 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 | - | |
| 262 | - $metaboxes_names = array( | |
| 263 | - __('Permalink', 'adminimize'), | |
| 264 | - __('Tags', 'adminimize'), | |
| 265 | - __('Kategorien', 'adminimize'), | |
| 266 | - __('Neue Kategorie hinzufügen', 'adminimize'), | |
| 267 | - __('Auszug', 'adminimize'), | |
| 268 | - __('Trackbacks', 'adminimize'), | |
| 269 | - __('Benutzerdefinierte Felder', 'adminimize'), | |
| 270 | - __('Kommentare & Pings', 'adminimize'), | |
| 271 | - __('Diesen Artikel durch ein Passwort schützen', 'adminimize'), | |
| 272 | - __('Autor', 'adminimize'), | |
| 273 | - __('Post Revisions', 'adminimize'), | |
| 274 | - __('Siehe auch, Tastaturkürzel', 'adminimize'), | |
| 275 | - __('Mitteilungen', 'adminimize'), | |
| 276 | - __('h2: Erweiterte Einstellungen', 'adminimize'), | |
| 277 | - __('Media Buttons (alle)', 'adminimize') | |
| 278 | - ); | |
| 279 | - | |
| 280 | - if (class_exists('SimpleTagsAdmin')) | |
| 281 | - array_push($metaboxes_names, __('Suggested tags from')); | |
| 282 | - if (function_exists('tc_post')) | |
| 283 | - array_push($metaboxes_names, __('Text Control')); | |
| 284 | - if (class_exists('HTMLSpecialCharactersHelper')) | |
| 285 | - array_push($metaboxes_names, __('HTML Special Characters')); | |
| 286 | - | |
| 287 | - $metaboxes_page = array( | |
| 288 | - '#pageslugdiv', | |
| 289 | - '#pagepostcustom, #pagecustomdiv', | |
| 290 | - '#pagecommentstatusdiv', | |
| 291 | - '#pagepassworddiv', | |
| 292 | - '#pageparentdiv', | |
| 293 | - '#pagetemplatediv', | |
| 294 | - '#pageorderdiv', | |
| 295 | - '#pageauthordiv', | |
| 296 | - '#revisionsdiv', | |
| 297 | - '.side-info', | |
| 298 | - '#notice', | |
| 299 | - '#post-body h2', | |
| 300 | - 'media_buttons' | |
| 301 | - ); | |
| 302 | - | |
| 303 | - if (class_exists('SimpleTagsAdmin')) | |
| 304 | - array_push($metaboxes_page, '#suggestedtags'); | |
| 305 | - if (class_exists('HTMLSpecialCharactersHelper')) | |
| 306 | - array_push($metaboxes_page, '#htmlspecialchars'); | |
| 307 | - | |
| 308 | - $metaboxes_names_page = array( | |
| 309 | - __('Permalink', 'adminimize'), | |
| 310 | - __('Benutzerdefinierte Felder', 'adminimize'), | |
| 311 | - __('Kommentare & Pings', 'adminimize'), | |
| 312 | - __('Diese Seite mit einem Passwort versehen', 'adminimize'), | |
| 313 | - __('Übergeordnete Seite', 'adminimize'), | |
| 314 | - __('Seiten-Template', 'adminimize'), | |
| 315 | - __('Reihenfolge', 'adminimize'), | |
| 316 | - __('Seitenautor', 'adminimize'), | |
| 317 | - __('Page Revisions', 'adminimize'), | |
| 318 | - __('Siehe auch', 'adminimize'), | |
| 319 | - __('Mitteilungen', 'adminimize'), | |
| 320 | - __('h2: Erweiterte Einstellungen', 'adminimize'), | |
| 321 | - __('Media Buttons (alle)', 'adminimize') | |
| 322 | - ); | |
| 120 | + // global options on all pages in backend for diffferent roles | |
| 121 | + require_once('inc-options/global_options.php'); | |
| 323 | 122 | |
| 324 | - if (class_exists('SimpleTagsAdmin')) | |
| 325 | - array_push($metaboxes_names_page, __('Suggested tags from', 'adminimize')); | |
| 326 | - if (class_exists('HTMLSpecialCharactersHelper')) | |
| 327 | - array_push($metaboxes_names_page, __('HTML Special Characters')); | |
| 328 | - | |
| 329 | - // print menu, submenu | |
| 330 | - if ($menu != '') { | |
| 331 | - | |
| 332 | - $i = 0; | |
| 333 | - $x = 0; | |
| 334 | - foreach ($menu as $item) { | |
| 335 | - | |
| 336 | - // menu items | |
| 337 | - // items disabled for user | |
| 338 | - if ( $item[2] == 'examble.php' ) { | |
| 339 | - $disabled_item = ' disabled="disabled"'; | |
| 340 | - } else { | |
| 341 | - $disabled_item = ''; | |
| 342 | - } | |
| 343 | - | |
| 344 | - // checkbox checked | |
| 345 | - if ( in_array($item[2], $disabled_menu) ) { | |
| 346 | - $checked = ' checked="checked"'; | |
| 347 | - } else { | |
| 348 | - $checked = ''; | |
| 349 | - } | |
| 123 | + // Menu Submenu Options | |
| 124 | + require_once('inc-options/menu_options.php'); | |
| 350 | 125 | |
| 351 | - // checkbox checked for admin | |
| 352 | - if ( in_array($item[2], $disabled_menu_adm) ) { | |
| 353 | - $checked_adm = ' checked="checked"'; | |
| 354 | - } else { | |
| 355 | - $checked_adm = ''; | |
| 356 | - } | |
| 357 | - | |
| 358 | - echo '<tr class="form-invalid">' . "\n"; | |
| 359 | - echo '<th>' . $item[0] . ' <span style="color:#ccc; font-weight: 400;">(' . $item[2] . ')</span> </th>'; | |
| 360 | - 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"; | |
| 361 | - 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"; | |
| 362 | - echo '</tr>'; | |
| 363 | - $x++; | |
| 364 | - if ( !isset($submenu[$item[2]]) ) | |
| 365 | - continue; | |
| 126 | + // Write Page Options | |
| 127 | + require_once('inc-options/write_post_options.php'); | |
| 366 | 128 | |
| 367 | - // submenu items | |
| 368 | - foreach ( $submenu[ $item[2] ] as $subitem ) { | |
| 369 | - | |
| 370 | - // submenu items | |
| 371 | - // items disabled for adm | |
| 372 | - if ( $subitem[2] == 'adminimize/adminimize.php' ) { | |
| 373 | - $disabled_subitem_adm = ' disabled="disabled"'; | |
| 374 | - } else { | |
| 375 | - $disabled_subitem_adm = ''; | |
| 376 | - } | |
| 377 | - | |
| 378 | - echo '<tr>' . "\n"; | |
| 379 | - | |
| 380 | - $checked = (in_array($subitem[2], $disabled_submenu)) ? ' checked="checked"' : ''; | |
| 381 | - $checked_adm = (in_array($subitem[2], $disabled_submenu_adm)) ? ' checked="checked"' : ''; | |
| 382 | - | |
| 383 | - echo '<td> — ' . $subitem[0] . ' <span style="color:#ccc; font-weight: 400;">(' . $subitem[2] . ')</span> </td>' . "\n"; | |
| 384 | - echo '<td class="num"><input id="check_menu'. $x .'" type="checkbox"' . $checked . ' name="mw_adminimize_disabled_submenu_items[]" value="' . $subitem[2] . '" /></td>' . "\n"; | |
| 385 | - 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"; | |
| 386 | - echo '</tr>' . "\n"; | |
| 387 | - $x++; | |
| 388 | - } | |
| 389 | - $i++; | |
| 390 | - $x++; | |
| 391 | - } | |
| 392 | - echo '<tr>' . "\n"; | |
| 393 | - echo '<th>' . __('Alle wählen', 'adminimize') . '</th>'; | |
| 394 | - echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_menu" onClick="toggleCheckboxes_menu();"><a id="atoggleCheckboxes_menu" href="javascript:toggleCheckboxes_menu();"> ' . __('Alle', 'adminimize') . '</a></td>'; | |
| 395 | - echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_menuadm" onClick="toggleCheckboxes_menuadm();"><a id="atoggleCheckboxes_menuadm" href="javascript:toggleCheckboxes_menuadm();"> ' . __('Alle', 'adminimize') . '</a></td>'; | |
| 396 | - echo '</tr>' . "\n"; | |
| 397 | - | |
| 398 | - } else { | |
| 399 | - $myErrors = new _mw_adminimize_message_class(); | |
| 400 | - $myErrors = '<tr><td style="color: red;">' . $myErrors->get_error('_mw_adminimize_get_option') . '</td></tr>'; | |
| 401 | - echo $myErrors; | |
| 402 | - } ?> | |
| 403 | - </tbody> | |
| 404 | - </table> | |
| 405 | - <p id="submitbutton"> | |
| 406 | - <input class="button" type="submit" name="_mw_adminimize_save" value="<?php _e('Einstellungen aktualisieren', 'adminimize'); ?> »" /><input type="hidden" name="page_options" value="'dofollow_timeout'" /> | |
| 407 | - </p> | |
| 408 | - | |
| 409 | - </div> | |
| 410 | - </div> | |
| 411 | - </div> | |
| 129 | + // Write Page Options | |
| 130 | + require_once('inc-options/write_page_options.php'); | |
| 131 | + | |
| 132 | + // Links Options | |
| 133 | + require_once('inc-options/links_options.php'); | |
| 412 | 134 | |
| 413 | - <div id="poststuff" class="dlm"> | |
| 414 | - <div class="postbox closed" > | |
| 415 | - <h3 id="config_edit"><?php _e('Schreiben Einstellungen', 'adminimize'); ?></h3> | |
| 135 | + // WP Nav Menu Options | |
| 136 | + require_once('inc-options/wp_nav_menu_options.php'); | |
| 137 | + ?> | |
| 138 | + </form> | |
| 139 | + | |
| 140 | + <div id="poststuff" class="ui-sortable meta-box-sortables"> | |
| 141 | + <div class="postbox"> | |
| 142 | + <div class="handlediv" title="<?php _e('Click to toggle'); ?>"><br/></div> | |
| 143 | + <h3 class="hndle" id="set_theme"><?php _e('Set Theme', FB_ADMINIMIZE_TEXTDOMAIN ) ?></h3> | |
| 416 | 144 | <div class="inside"> |
| 417 | 145 | <br class="clear" /> |
| 418 | - <table summary="config_edit" class="widefat"> | |
| 419 | - <thead> | |
| 420 | - <tr> | |
| 421 | - <th><?php _e('Schreiben Einstellungen - Beiträge', 'adminimize'); ?></th> | |
| 422 | - <th><?php _e('Schreiben Einstellungen - Seiten', 'adminimize'); ?></th> | |
| 423 | - </tr> | |
| 424 | - </thead> | |
| 425 | - | |
| 426 | - <tbody> | |
| 427 | - <tr valign="top"> | |
| 428 | - <td> | |
| 429 | - <table summary="config_edit_post" class="widefat"> | |
| 430 | - <thead> | |
| 431 | - <tr> | |
| 432 | - <th> </th> | |
| 433 | - <th><?php _e('< Admin (Level 10)', 'adminimize'); ?></th> | |
| 434 | - <th><?php _e('Admin (Level 10)', 'adminimize'); ?></th> | |
| 435 | - </tr> | |
| 436 | - </thead> | |
| 146 | + | |
| 147 | + <?php if ( !isset($_POST['_mw_adminimize_action']) || !($_POST['_mw_adminimize_action'] == '_mw_adminimize_load_theme') ) { ?> | |
| 148 | + <form name="set_theme" method="post" id="_mw_adminimize_set_theme" action="?page=<?php echo $_GET['page'];?>" > | |
| 149 | + <?php wp_nonce_field('mw_adminimize_nonce'); ?> | |
| 150 | + <p><?php _e('For better peformance with many users on your blog; load only userlist, when you will change the theme options for users.', FB_ADMINIMIZE_TEXTDOMAIN ); ?></p> | |
| 151 | + <p id="submitbutton"> | |
| 152 | + <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_load_theme" /> | |
| 153 | + <input type="submit" name="_mw_adminimize_load" value="<?php _e('Load User Data', FB_ADMINIMIZE_TEXTDOMAIN ); ?> »" class="button button-primary" /> | |
| 154 | + </p> | |
| 155 | + </form> | |
| 156 | + <?php } | |
| 157 | + if ( isset($_POST['_mw_adminimize_action']) && ($_POST['_mw_adminimize_action'] == '_mw_adminimize_load_theme') ) { ?> | |
| 158 | + <form name="set_theme" method="post" id="_mw_adminimize_set_theme" action="?page=<?php echo $_GET['page'];?>" > | |
| 159 | + <?php wp_nonce_field('mw_adminimize_nonce'); ?> | |
| 160 | + <table class="widefat"> | |
| 161 | + <thead> | |
| 162 | + <tr class="thead"> | |
| 163 | + <th> </th> | |
| 164 | + <th class="num"><?php _e('User-ID') ?></th> | |
| 165 | + <th><?php _e('Username') ?></th> | |
| 166 | + <th><?php _e('Display name publicly as') ?></th> | |
| 167 | + <th><?php _e('Admin-Color Scheme') ?></th> | |
| 168 | + <th><?php _e('User Level') ?></th> | |
| 169 | + <th><?php _e('Role') ?></th> | |
| 170 | + </tr> | |
| 171 | + </thead> | |
| 172 | + <tbody id="users" class="list:user user-list"> | |
| 173 | + <?php | |
| 174 | + $wp_user_search = $wpdb->get_results("SELECT ID, user_login, display_name FROM $wpdb->users ORDER BY ID"); | |
| 175 | + | |
| 176 | + $style = ''; | |
| 177 | + foreach ( $wp_user_search as $userid ) { | |
| 178 | + $user_id = (int) $userid->ID; | |
| 179 | + $user_login = stripslashes($userid->user_login); | |
| 180 | + $display_name = stripslashes($userid->display_name); | |
| 181 | + $current_color = get_user_option('admin_color', $user_id); | |
| 182 | + $user_level = (int) get_user_option($table_prefix . 'user_level', $user_id); | |
| 183 | + $user_object = new WP_User($user_id); | |
| 184 | + $roles = $user_object->roles; | |
| 185 | + $role = array_shift($roles); | |
| 186 | + if ( function_exists('translate_user_role') ) | |
| 187 | + $role_name = translate_user_role( $wp_roles->role_names[$role] ); | |
| 188 | + elseif ( function_exists('before_last_bar') ) | |
| 189 | + $role_name = before_last_bar( $wp_roles->role_names[$role], 'User role' ); | |
| 190 | + else | |
| 191 | + $role_name = strrpos( $wp_roles->role_names[$role], '|' ); | |
| 437 | 192 | |
| 438 | - <tbody> | |
| 439 | - <?php | |
| 440 | - $x = 0; | |
| 441 | - foreach ($metaboxes as $index => $metabox) { | |
| 442 | - $checked = (in_array($metabox, $disabled_metaboxes_post)) ? ' checked="checked"' : ''; | |
| 443 | - $checked_adm = (in_array($metabox, $disabled_metaboxes_post_adm)) ? ' checked="checked"' : ''; | |
| 444 | - | |
| 445 | - echo '<tr>' . "\n"; | |
| 446 | - echo '<td>' . $metaboxes_names[$index] . ' <span style="color:#ccc; font-weight: 400;">(' . $metabox . ')</span> </td>' . "\n"; | |
| 447 | - echo '<td class="num"><input id="check_post'. $x .'" type="checkbox"' . $checked . ' name="mw_adminimize_disabled_metaboxes_post_items[]" value="' . $metabox . '" /></td>' . "\n"; | |
| 448 | - 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"; | |
| 449 | - echo '</tr>' . "\n"; | |
| 450 | - $x++; | |
| 451 | - } | |
| 452 | - ?> | |
| 453 | - <tr> | |
| 454 | - <th><?php _e('Alle wählen', 'adminimize'); ?></th> | |
| 455 | - <?php | |
| 456 | - echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_post" onClick="toggleCheckboxes_post();"><a id="atoggleCheckboxes_post" href="javascript:toggleCheckboxes_post();"> ' . __('Alle', 'adminimize') . '</a></td>'; | |
| 457 | - echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_postadm" onClick="toggleCheckboxes_postadm();"><a id="atoggleCheckboxes_postadm" href="javascript:toggleCheckboxes_postadm();"> ' . __('Alle', 'adminimize') . '</a></td>'; | |
| 458 | - ?> | |
| 459 | - </tr> | |
| 460 | - </tbody> | |
| 461 | - </table> | |
| 462 | - </td> | |
| 463 | - <td> | |
| 464 | - <table summary="config_edit_page" class="widefat"> | |
| 465 | - <thead> | |
| 466 | - <tr> | |
| 467 | - <th> </th> | |
| 468 | - <th><?php _e('< Admin (Level 10)', 'adminimize'); ?></th> | |
| 469 | - <th><?php _e('Admin (Level 10)', 'adminimize'); ?></th> | |
| 470 | - </tr> | |
| 471 | - </thead> | |
| 472 | - | |
| 473 | - <tbody> | |
| 474 | - <?php | |
| 475 | - $x = 0; | |
| 476 | - foreach ($metaboxes_page as $index => $metabox) { | |
| 477 | - $checked = (in_array($metabox, $disabled_metaboxes_page)) ? ' checked="checked"' : ''; | |
| 478 | - $checked_adm = (in_array($metabox, $disabled_metaboxes_page_adm)) ? ' checked="checked"' : ''; | |
| 479 | - | |
| 480 | - echo '<tr>' . "\n"; | |
| 481 | - echo '<td>' . $metaboxes_names_page[$index] . ' <span style="color:#ccc; font-weight: 400;">(' . $metabox . ')</span> </td>' . "\n"; | |
| 482 | - echo '<td class="num"><input id="check_page'. $x .'" type="checkbox"' . $checked . ' name="mw_adminimize_disabled_metaboxes_page_items[]" value="' . $metabox . '" /></td>' . "\n"; | |
| 483 | - 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"; | |
| 484 | - echo '</tr>' . "\n"; | |
| 485 | - $x++; | |
| 486 | - } | |
| 487 | - ?> | |
| 488 | - <tr> | |
| 489 | - <th><?php _e('Alle wählen', 'adminimize'); ?></th> | |
| 490 | - <?php | |
| 491 | - echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_page" onClick="toggleCheckboxes_page();"><a id="atoggleCheckboxes_page" href="javascript:toggleCheckboxes_page();"> ' . __('Alle', 'adminimize') . '</a></td>'; | |
| 492 | - echo '<td class="num"><input type="checkbox" id="ctoggleCheckboxes_pageadm" onClick="toggleCheckboxes_pageadm();"><a id="atoggleCheckboxes_pageadm" href="javascript:toggleCheckboxes_pageadm();"> ' . __('Alle', 'adminimize') . '</a></td>'; | |
| 493 | - ?> | |
| 494 | - </tr> | |
| 495 | - </tbody> | |
| 496 | - </table> | |
| 497 | - </td> | |
| 498 | - </tr> | |
| 499 | - </tbody> | |
| 500 | - </table> | |
| 193 | + $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; | |
| 194 | + $return = ''; | |
| 195 | + $return .= '<tr>' . "\n"; | |
| 196 | + $return .= "\t" . '<td><input type="checkbox" name="mw_adminimize_theme_items[]" value="' . $user_id . '" /></td>' . "\n"; | |
| 197 | + $return .= "\t" . '<td class="num">'. $user_id .'</td>' . "\n"; | |
| 198 | + $return .= "\t" . '<td>'. $user_login .'</td>' . "\n"; | |
| 199 | + $return .= "\t" . '<td>'. $display_name .'</td>' . "\n"; | |
| 200 | + $return .= "\t" . '<td>'. $current_color . '</td>' . "\n"; | |
| 201 | + $return .= "\t" . '<td class="num">'. $user_level . '</td>' . "\n"; | |
| 202 | + $return .= "\t" . '<td>'. $role_name . '</td>' . "\n"; | |
| 203 | + $return .= '</tr>' . "\n"; | |
| 204 | + | |
| 205 | + echo $return; | |
| 206 | + } | |
| 207 | + ?> | |
| 208 | + <tr valign="top"> | |
| 209 | + <td> </td> | |
| 210 | + <td> </td> | |
| 211 | + <td> </td> | |
| 212 | + <td> </td> | |
| 213 | + <td> | |
| 214 | + <select name="_mw_adminimize_set_theme"> | |
| 215 | + <?php foreach ( $_wp_admin_css_colors as $color => $color_info ): ?> | |
| 216 | + <option value="<?php echo $color; ?>"><?php echo $color_info->name . ' (' . $color . ')' ?></option> | |
| 217 | + <?php endforeach; ?> | |
| 218 | + </select> | |
| 219 | + </td> | |
| 220 | + <td> </td> | |
| 221 | + <td> </td> | |
| 222 | + </tr> | |
| 223 | + </tbody> | |
| 224 | + </table> | |
| 225 | + <p id="submitbutton"> | |
| 226 | + <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_set_theme" /> | |
| 227 | + <input type="hidden" name="_mw_adminimize_load" value="_mw_adminimize_load_theme" /> | |
| 228 | + <input type="submit" name="_mw_adminimize_save" value="<?php _e('Set Theme', FB_ADMINIMIZE_TEXTDOMAIN ); ?> »" class="button button-primary" /> | |
| 229 | + </p> | |
| 230 | + </form> | |
| 231 | + <?php } ?> | |
| 501 | 232 | |
| 502 | - <p id="submitbutton"> | |
| 503 | - <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_insert" /> | |
| 504 | - <input class="button" type="submit" name="_mw_adminimize_save" value="<?php _e('Einstellungen aktualisieren', 'adminimize'); ?> »" /><input type="hidden" name="page_options" value="'dofollow_timeout'" /> | |
| 505 | - </p> | |
| 506 | - </form> | |
| 507 | - | |
| 233 | + <p><a class="alignright button" href="javascript:void(0);" onclick="window.scrollTo(0,0);" style="margin:3px 0 0 30px;"><?php _e('scroll to top', FB_ADMINIMIZE_TEXTDOMAIN); ?></a><br class="clear" /></p> | |
| 508 | 234 | </div> |
| 509 | 235 | </div> |
| 510 | 236 | </div> |
| 511 | 237 | |
| 512 | - <div id="poststuff" class="dlm"> | |
| 513 | - <div class="postbox closed" > | |
| 514 | - <h3 id="set_theme"><?php _e('Theme setzen', 'adminimize') ?></h3> | |
| 238 | + <div id="poststuff" class="ui-sortable meta-box-sortables"> | |
| 239 | + <div class="postbox"> | |
| 240 | + <div class="handlediv" title="<?php _e('Click to toggle'); ?>"><br/></div> | |
| 241 | + <h3 class="hndle" id="import"><?php _e('Export/Import Options', FB_ADMINIMIZE_TEXTDOMAIN ) ?></h3> | |
| 515 | 242 | <div class="inside"> |
| 516 | 243 | <br class="clear" /> |
| 517 | - <form name="set_theme" method="post" id="_mw_adminimize_set_theme" action="<?php echo $location; ?>" > | |
| 518 | - <?php _mw_adminimize_nonce_field($_mw_adminimize_nonce); ?> | |
| 519 | - <table class="widefat"> | |
| 520 | - <thead> | |
| 521 | - <tr class="thead"> | |
| 522 | - <th> </th> | |
| 523 | - <th class="num"><?php _e('User-ID') ?></th> | |
| 524 | - <th><?php _e('Benutzername') ?></th> | |
| 525 | - <th><?php _e('Name im Blog') ?></th> | |
| 526 | - <th><?php _e('Aktuelles Theme') ?></th> | |
| 527 | - <th><?php _e('User Level') ?></th> | |
| 528 | - <th><?php _e('Rolle') ?></th> | |
| 529 | - </tr> | |
| 530 | - </thead> | |
| 531 | - <tbody id="users" class="list:user user-list"> | |
| 532 | - <?php | |
| 533 | - global $wpdb, $_wp_admin_css_colors;; | |
| 534 | - | |
| 535 | - $wp_user_search = $wpdb->get_results("SELECT ID, user_login, display_name FROM $wpdb->users ORDER BY ID"); | |
| 536 | - | |
| 537 | - $style = ''; | |
| 538 | - foreach ( $wp_user_search as $userid ) { | |
| 539 | - $user_id = (int) $userid->ID; | |
| 540 | - $user_login = stripslashes($userid->user_login); | |
| 541 | - $display_name = stripslashes($userid->display_name); | |
| 542 | - $current_color = get_user_option('admin_color', $user_id); | |
| 543 | - $user_level = (int) get_user_option($table_prefix . 'user_level', $user_id); | |
| 544 | - $user_object = new WP_User($user_id); | |
| 545 | - $roles = $user_object->roles; | |
| 546 | - $role = array_shift($roles); | |
| 547 | - | |
| 548 | - $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; | |
| 549 | - $return = ''; | |
| 550 | - $return .= '<tr>'; | |
| 551 | - $return .= '<td><input type="checkbox" name="mw_adminimize_theme_items[]" value="' . $user_id . '" /></td>'; | |
| 552 | - $return .= '<td class="num">'. $user_id .'</td>'; | |
| 553 | - $return .= '<td>'. $user_login .'</td>'; | |
| 554 | - $return .= '<td>'. $display_name .'</td>'; | |
| 555 | - $return .= '<td>'. $current_color . '</td>'; | |
| 556 | - $return .= '<td class="num">'. $user_level . '</td>'; | |
| 557 | - $return .= '<td>'. $role . '</td>'; | |
| 558 | - $return .= '</tr>'; | |
| 559 | - | |
| 560 | - print($return); | |
| 561 | - } | |
| 562 | - ?> | |
| 563 | - <tr valign="top"> | |
| 564 | - <td> </td> | |
| 565 | - <td> </td> | |
| 566 | - <td> </td> | |
| 567 | - <td> </td> | |
| 568 | - <td> | |
| 569 | - <select name="_mw_adminimize_set_theme"> | |
| 570 | - <?php foreach ( $_wp_admin_css_colors as $color => $color_info ): ?> | |
| 571 | - <option value="<?php echo $color; ?>"><?php echo $color_info->name . ' (' . $color . ')' ?></option> | |
| 572 | - <?php endforeach; ?> | |
| 573 | - </select> | |
| 574 | - </td> | |
| 575 | - <td> </td> | |
| 576 | - <td> </td> | |
| 577 | - </tr> | |
| 578 | - </tbody> | |
| 579 | - </table> | |
| 244 | + | |
| 245 | + <h4><?php _e('Export', FB_ADMINIMIZE_TEXTDOMAIN ) ?></h4> | |
| 246 | + <form name="export_options" method="get" action=""> | |
| 247 | + <p><?php _e('You can save a .seq file with your options.', FB_ADMINIMIZE_TEXTDOMAIN ) ?></p> | |
| 580 | 248 | <p id="submitbutton"> |
| 581 | - <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_set_theme" /> | |
| 582 | - <input class="button" type="submit" name="_mw_adminimize_save" value="<?php _e('Theme zuweisen', 'adminimize'); ?> »" /> | |
| 583 | - <input type="hidden" name="page_options" value="'dofollow_timeout'" /> | |
| 249 | + <input type="hidden" name="_mw_adminimize_export" value="true" /> | |
| 250 | + <input type="submit" name="_mw_adminimize_save" value="<?php _e('Export »', FB_ADMINIMIZE_TEXTDOMAIN ) ?>" class="button" /> | |
| 584 | 251 | </p> |
| 585 | 252 | </form> |
| 586 | - | |
| 253 | + | |
| 254 | + <h4><?php _e('Import', FB_ADMINIMIZE_TEXTDOMAIN ) ?></h4> | |
| 255 | + <form name="import_options" enctype="multipart/form-data" method="post" action="?page=<?php echo $_GET['page'];?>"> | |
| 256 | + <?php wp_nonce_field('mw_adminimize_nonce'); ?> | |
| 257 | + <p><?php _e('Choose a Adminimize (<em>.seq</em>) file to upload, then click <em>Upload file and import</em>.', FB_ADMINIMIZE_TEXTDOMAIN ) ?></p> | |
| 258 | + <p> | |
| 259 | + <label for="datei_id"><?php _e('Choose a file from your computer', FB_ADMINIMIZE_TEXTDOMAIN ) ?>: </label> | |
| 260 | + <input name="datei" id="datei_id" type="file" /> | |
| 261 | + </p> | |
| 262 | + <p id="submitbutton"> | |
| 263 | + <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_import" /> | |
| 264 | + <input type="submit" name="_mw_adminimize_save" value="<?php _e('Upload file and import »', FB_ADMINIMIZE_TEXTDOMAIN ) ?>" class="button" /> | |
| 265 | + </p> | |
| 266 | + </form> | |
| 267 | + <p><a class="alignright button" href="javascript:void(0);" onclick="window.scrollTo(0,0);" style="margin:3px 0 0 30px;"><?php _e('scroll to top', FB_ADMINIMIZE_TEXTDOMAIN); ?></a><br class="clear" /></p> | |
| 268 | + | |
| 587 | 269 | </div> |
| 588 | 270 | </div> |
| 589 | 271 | </div> |
| 590 | 272 | |
| 591 | - <div id="poststuff" class="dlm"> | |
| 592 | - <div class="postbox closed" > | |
| 593 | - <h3 id="uninstall"><?php _e('Deinstallation der Einstellungen', 'adminimize') ?></h3> | |
| 273 | + <div id="poststuff" class="ui-sortable meta-box-sortables"> | |
| 274 | + <div class="postbox"> | |
| 275 | + <div class="handlediv" title="<?php _e('Click to toggle'); ?>"><br/></div> | |
| 276 | + <h3 class="hndle" id="uninstall"><?php _e('Deinstall Options', FB_ADMINIMIZE_TEXTDOMAIN ) ?></h3> | |
| 594 | 277 | <div class="inside"> |
| 595 | - | |
| 596 | - <p><?php _e('Nutze diese Option, um die Einstellungen für das Plugin in der Datenbank zu löschen. Das Plugin entfernt die Einträge <strong>nicht</strong>, wenn es deaktiviert wird!', 'adminimize'); ?></p> | |
| 597 | - <form name="form2" method="post" id="_mw_adminimize_options_deinstall" action="<?php echo $location; ?>"> | |
| 598 | - <?php _mw_adminimize_nonce_field($_mw_adminimize_nonce); ?> | |
| 599 | - <p id="submitbutton> | |
| 278 | + | |
| 279 | + <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.', FB_ADMINIMIZE_TEXTDOMAIN ); ?></p> | |
| 280 | + <form name="deinstall_options" method="post" id="_mw_adminimize_options_deinstall" action="?page=<?php echo $_GET['page'];?>"> | |
| 281 | + <?php wp_nonce_field('mw_adminimize_nonce'); ?> | |
| 282 | + <p id="submitbutton"> | |
| 283 | + <input type="submit" name="_mw_adminimize_deinstall" value="<?php _e('Delete Options', FB_ADMINIMIZE_TEXTDOMAIN ); ?> »" class="button-secondary" /> | |
| 284 | + <input type="checkbox" name="_mw_adminimize_deinstall_yes" value="_mw_adminimize_deinstall" /> | |
| 600 | 285 | <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_deinstall" /> |
| 601 | - <input class="button-secondary" type="submit" name="_mw_adminimize_deinstall" value="<?php _e('Einstellungen löschen', 'adminimize'); ?> »" /> | |
| 602 | - <input name="_mw_adminimize_deinstall_yes" value="_mw_adminimize_deinstall" type="checkbox" /> | |
| 603 | 286 | </p> |
| 604 | 287 | </form> |
| 288 | + <p><a class="alignright button" href="javascript:void(0);" onclick="window.scrollTo(0,0);" style="margin:3px 0 0 30px;"><?php _e('scroll to top', FB_ADMINIMIZE_TEXTDOMAIN); ?></a><br class="clear" /></p> | |
| 605 | 289 | |
| 606 | 290 | </div> |
| 607 | 291 | </div> |
| 608 | 292 | </div> |
| 609 | 293 | |
| 610 | - <div id="poststuff" class="dlm"> | |
| 611 | - <div class="postbox closed" > | |
| 612 | - <h3 id="uninstall"><?php _e('Über das Plugin', 'adminimize') ?></h3> | |
| 294 | + <div id="poststuff" class="ui-sortable meta-box-sortables"> | |
| 295 | + <div class="postbox" > | |
| 296 | + <div class="handlediv" title="<?php _e('Click to toggle'); ?>"><br/></div> | |
| 297 | + <h3 class="hndle" id="about"><?php _e('About the plugin', FB_ADMINIMIZE_TEXTDOMAIN ) ?></h3> | |
| 613 | 298 | <div class="inside"> |
| 614 | - | |
| 615 | - <p><?php _e('Weitere Information: Besuche die <a href=\'http://bueltge.de/wordpress-admin-theme-adminimize/674/\'>Plugin Webseite</a> für weitere Informationen oder hole die aktuelle Version des Plugins.', 'adminimize'); ?><br />© Copyright 2008 - <?php echo date("Y"); ?> <a href="http://bueltge.de">Frank Bültge</a> | <?php _e('Du willst Danke sagen? Besuche meine <a href=\'http://bueltge.de/wunschliste/\'>Wunschliste</a>.', 'adminimize'); ?></p> | |
| 616 | - | |
| 299 | + | |
| 300 | + <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.', FB_ADMINIMIZE_TEXTDOMAIN); ?></p> | |
| 301 | + <p> | |
| 302 | + <span style="float: left;"> | |
| 303 | + <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> | |
| 304 | + <input type="hidden" name="cmd" value="_s-xclick"> | |
| 305 | + <input type="hidden" name="hosted_button_id" value="4578111"> | |
| 306 | + <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="<?php _e('PayPal - The safer, easier way to pay online!', FB_ADMINIMIZE_TEXTDOMAIN); ?>"> | |
| 307 | + <img alt="" border="0" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1"> | |
| 308 | + </form> | |
| 309 | + </span> | |
| 310 | + <?php _e('You want to thank me? Visit my <a href="http://bueltge.de/wunschliste/">wishlist</a> or donate.', FB_ADMINIMIZE_TEXTDOMAIN); ?> | |
| 311 | + </p> | |
| 312 | + <p>© Copyright 2008 - <?php echo date('Y'); ?> <a href="http://bueltge.de">Frank Bültge</a></p> | |
| 313 | + <p class="textright" style="color:#ccc"><small><?php echo $wpdb->num_queries; ?>q, <?php timer_stop(1); ?>s</small></p> | |
| 314 | + <p><a class="alignright button" href="javascript:void(0);" onclick="window.scrollTo(0,0);" style="margin:3px 0 0 30px;"><?php _e('scroll to top', FB_ADMINIMIZE_TEXTDOMAIN); ?></a><br class="clear" /></p> | |
| 315 | + | |
| 617 | 316 | </div> |
| 618 | 317 | </div> |
| 619 | 318 | </div> |
| 620 | 319 | |
| @@ -619,16 +318,19 @@ | ||
| 619 | 318 | </div> |
| 620 | 319 | |
| 621 | 320 | <script type="text/javascript"> |
| 622 | 321 | <!-- |
| 322 | + <?php if ( version_compare( $wp_version, '2.7alpha', '<' ) ) { ?> | |
| 623 | 323 | jQuery('.postbox h3').prepend('<a class="togbox">+</a> '); |
| 624 | - //jQuery('.togbox').click( function() { jQuery(jQuery(this).parent().parent().get(0)).toggleClass('closed'); } ); | |
| 324 | + <?php } ?> | |
| 625 | 325 | jQuery('.postbox h3').click( function() { jQuery(jQuery(this).parent().get(0)).toggleClass('closed'); } ); |
| 626 | - jQuery('.postbox.close-me').each(function(){ | |
| 326 | + jQuery('.postbox .handlediv').click( function() { jQuery(jQuery(this).parent().get(0)).toggleClass('closed'); } ); | |
| 327 | + jQuery('.postbox.close-me').each(function() { | |
| 627 | 328 | jQuery(this).addClass("closed"); |
| 628 | 329 | }); |
| 629 | 330 | //--> |
| 630 | 331 | </script> |
| 332 | + | |
| 631 | 333 | </div> |
| 632 | 334 | <?php |
| 633 | 335 | } |
| 634 | -?> | |
| 336 | +?> | |