diff options
Diffstat (limited to 'wp-admin')
-rw-r--r-- | wp-admin/users.php | 25 | ||||
-rw-r--r-- | wp-admin/wpmu-admin.php | 40 | ||||
-rw-r--r-- | wp-admin/wpmu-blogs.php | 179 | ||||
-rw-r--r-- | wp-admin/wpmu-edit.php | 24 | ||||
-rw-r--r-- | wp-admin/wpmu-options.php | 325 | ||||
-rw-r--r-- | wp-admin/wpmu-themes.php | 21 | ||||
-rw-r--r-- | wp-admin/wpmu-upgrade-site.php | 4 | ||||
-rw-r--r-- | wp-admin/wpmu-users.php | 194 |
8 files changed, 378 insertions, 434 deletions
diff --git a/wp-admin/users.php b/wp-admin/users.php index c58e3f7..b4b2e9d 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -506,24 +506,25 @@ foreach ( $wp_user_search->get_results() as $userid ) { <?php if( apply_filters('show_adduser_fields', true) ) {?> <div class="wrap"> -<h2 id="add-new-user"><?php _e('Add User From Community') ?></h2> +<h2 id="add-new-user"><?php _e('Add user from community') ?></h2> <div class="narrow"> <form action="" method="post" name="adduser" id="adduser"> <?php wp_nonce_field('add-user') ?> <input type='hidden' name='action' value='addexistinguser'> <p><?php _e('Type the e-mail address of another user to add them to your blog.')?></p> -<table> -<tr><th scope="row"><?php _e('User E-Mail:')?> </th><td><input type="text" name="newuser" id="newuser"></td></tr> - <tr> + +<table class="form-table"> + <tr class="form-field form-required"> + <th scope="row"><?php _e('User E-Mail')?></th> + <td><input type="text" name="newuser" id="newuser" /></td> + </tr> + <tr class="form-field"> <th scope="row"><?php _e('Role:') ?></th> - <td><select name="new_role" id="new_role"><?php - foreach($wp_roles->role_names as $role => $name) { - $selected = ''; - if( $role == 'subscriber' ) - $selected = 'selected="selected"'; - echo "<option {$selected} value=\"{$role}\">{$name}</option>"; - } - ?></select></td> + <td> + <select name="new_role" id="new_role"> + <?php wp_dropdown_roles('subscriber'); ?> + </select> + </td> </tr> </table> <p class="submit"> diff --git a/wp-admin/wpmu-admin.php b/wp-admin/wpmu-admin.php index 3079ea0..ac70271 100644 --- a/wp-admin/wpmu-admin.php +++ b/wp-admin/wpmu-admin.php @@ -3,28 +3,48 @@ require_once('admin.php'); $title = __('WordPress MU › Admin'); $parent_file = 'wpmu-admin.php'; + +function index_css() { + wp_admin_css( 'css/dashboard' ); +} +add_action( 'admin_head', 'index_css' ); + require_once('admin-header.php'); if( is_site_admin() == false ) { wp_die( __('<p>You do not have permission to access this page.</p>') ); } -if (isset($_GET['updated'])) { - ?> - <div id="message" class="updated fade"><p><?php _e('Options saved.') ?></p></div> - <?php -} +global $wpdb; +$c_users = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->users}"); +$c_blogs = $wpdb->get_var("SELECT COUNT(blog_id) FROM {$wpdb->blogs}"); + +$user_text = sprintf( __ngettext( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) ); +$blog_text = sprintf( __ngettext( '%s blog', '%s blogs', $c_blogs ), number_format_i18n( $c_blogs ) ); + +$sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text ); ?> <div class="wrap"> <h2><?php _e('WordPress MU : Admin') ?></h2> + + <div id="rightnow"> + <h3 class="reallynow"> + <span><?php _e('Right Now'); ?></span> + + <a href="wpmu-blogs.php#form-add-blog" class="rbutton"><strong><?php _e('Create a New Blog'); ?></strong></a> + <a href="wpmu-users.php#form-add-user" class="rbutton"><?php _e('Create a New User'); ?></a> + <br class="clear" /> + </h3> + + <p class="youhave"><?php echo $sentence; ?></p> <?php do_action('wpmuadminresult', ''); ?> <form name="searchform" action="wpmu-users.php" method="get"> <p> <input type="hidden" name="action" value="users" /> <input type="text" name="s" value="" size="17" /> - <input type="submit" name="submit" value="<?php _e("Search Users »"); ?>" /> + <input class="button" type="submit" name="submit" value="<?php _e("Search Users »"); ?>" /> </p> </form> @@ -32,9 +52,13 @@ if (isset($_GET['updated'])) { <p> <input type="hidden" name="action" value="blogs" /> <input type="text" name="s" value="" size="17" /> - <input type="submit" name="submit" value="<?php _e("Search Blogs »"); ?>" /> + <input class="button" type="submit" name="blog_name" value="<?php _e("Search Blogs »"); ?>" /> </p> </form> + + <?php do_action( 'mu_rightnow_end' ); ?> + <?php do_action( 'mu_activity_box_end' ); ?> + </div><!-- rightnow --> </div> -<?php include('admin-footer.php'); ?>
\ No newline at end of file +<?php include('admin-footer.php'); ?> diff --git a/wp-admin/wpmu-blogs.php b/wp-admin/wpmu-blogs.php index 9fc26c9..badf311 100644 --- a/wp-admin/wpmu-blogs.php +++ b/wp-admin/wpmu-blogs.php @@ -3,7 +3,10 @@ require_once('admin.php'); $title = __('WordPress MU › Admin › Blogs'); $parent_file = 'wpmu-admin.php'; + wp_enqueue_script( 'listman' ); +wp_enqueue_script( 'admin-forms' ); + require_once('admin-header.php'); if( is_site_admin() == false ) { wp_die( __('<p>You do not have permission to access this page.</p>') ); @@ -15,6 +18,9 @@ if ( $_GET['updated'] == 'true' ) { <div id="message" class="updated fade"><p> <?php switch ($_GET['action']) { + case 'all_notspam': + _e('Blogs mark as not spam !'); + break; case 'all_spam': _e('Blogs mark as spam !'); break; @@ -285,24 +291,24 @@ switch( $_GET['action'] ) { $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' "; - if( !empty($_GET['s']) ) { + if( isset($_GET['blog_name']) ) { $s = trim($_GET['s']); $query = "SELECT blog_id, {$wpdb->blogs}.domain, {$wpdb->blogs}.path, registered, last_updated FROM {$wpdb->blogs}, {$wpdb->site} WHERE site_id = '{$wpdb->siteid}' AND {$wpdb->blogs}.site_id = {$wpdb->site}.id AND ( {$wpdb->blogs}.domain LIKE '%{$s}%' OR {$wpdb->blogs}.path LIKE '%{$s}%' )"; - } elseif( !empty($_GET['blog_id']) ) { + } elseif( isset($_GET['blog_id']) ) { $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' - AND blog_id = '".intval($_GET['blog_id'])."'"; - } elseif( !empty($_GET['ip_address']) ) { + AND blog_id = '".intval($_GET['s'])."'"; + } elseif( isset($_GET['blog_ip']) ) { $query = "SELECT * FROM {$wpdb->blogs}, {$wpdb->registration_log} WHERE site_id = '{$wpdb->siteid}' AND {$wpdb->blogs}.blog_id = {$wpdb->registration_log}.blog_id - AND {$wpdb->registration_log}.IP LIKE ('%".$_GET['ip_address']."%')"; + AND {$wpdb->registration_log}.IP LIKE ('%".$_GET['s']."%')"; } if( isset( $_GET['sortby'] ) == false ) { @@ -321,7 +327,7 @@ switch( $_GET['action'] ) { $query .= ( $_GET['order'] == 'DESC' ) ? 'DESC' : 'ASC'; - if( !empty($_GET['s']) || !empty($_GET['blog_id']) || !empty($_GET['ip_address'])) { + if( !empty($_GET['s']) ) { $blog_list = $wpdb->get_results( $query, ARRAY_A ); $total = count($blog_list); } else { @@ -341,83 +347,52 @@ switch( $_GET['action'] ) { 'current' => $apage )); ?> - <script type="text/javascript"> - <!-- - var checkflag = "false"; - - function check_all_rows() { - var button1 = document.getElementById('check_all1'); - var button2 = document.getElementById('check_all2'); - - field = document.formlist; - if (checkflag == "false") { - for (i = 0; i < field.length; i++) { - if( field[i].name == 'allblogs[]' ) { - field[i].checked = true; - } - } - checkflag = "true"; - button1.value = "<?php _e('Uncheck All') ?>"; - button2.value = "<?php _e('Uncheck All') ?>"; - } else { - for (i = 0; i < field.length; i++) { - if( field[i].name == 'allblogs[]' ) { - field[i].checked = false; - } - } - checkflag = "false"; - button1.value = "<?php _e('Check All') ?>"; - button2.value = "<?php _e('Check All') ?>" - } - } - // --> - </script> - <div class="wrap"> + + <div class="wrap" style="position:relative;"> <h2><?php _e('Blogs') ?></h2> - <div style="float:right; padding:0 20px; margin-top:20px;"> - <?php if ( $blog_navigation ) echo "<p class='pagenav'>$blog_navigation</p>"; ?> - </div> - <form id="searchform" action="wpmu-blogs.php" method="get"> - <input type="hidden" name="action" value="blogs" /> - <fieldset> - <legend><?php _e('Search blogs by name…') ?></legend> - <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes(wp_specialchars($_GET['s'], 1)); ?>" size="17" /> - </fieldset> - - <fieldset> - <legend><?php _e('by blog ID…') ?></legend> - <input type="text" name="blog_id" value="<?php if (isset($_GET['blog_id'])) echo wp_specialchars($_GET['blog_id'], 1); ?>" size="10" /> - </fieldset> - - <fieldset> - <legend><?php _e('by IP address…') ?></legend> - <input type="text" name="ip_address" value="<?php if (isset($_GET['ip_address'])) echo wp_specialchars($_GET['ip_address'], 1); ?>" size="10" /> - </fieldset> - <input type="submit" name="submit" id="post-query-submit" value="<?php _e('Search') ?>" class="button" /> + <form id="searchform" action="wpmu-blogs.php" method="get" style="position:absolute;right:0;top:0;"> + <input type="hidden" name="action" value="blogs" /> + <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes(wp_specialchars($_GET['s'], 1)); ?>" size="17" /> + <input type="submit" class="button" name="blog_name" value="<?php _e('Search blogs by name') ?>" /> + <input type="submit" class="button" name="blog_id" value="<?php _e('by blog ID') ?>" /> + <input type="submit" class="button" name="blog_ip" value="<?php _e('by IP address') ?>" /> </form> - + + <form id="form-blog-list" action="wpmu-edit.php?action=allblogs" method="post"> - <br style="clear:both;" /> + <div class="tablenav"> + <?php if ( $blog_navigation ) echo "<div class='tablenav-pages'>$blog_navigation</div>"; ?> + + <div class="alignleft"> + <input type="submit" value="<?php _e('Delete') ?>" name="allblog_delete" class="button-secondary delete" /> + <input type="submit" value="<?php _e('Mark as Spam') ?>" name="allblog_spam" class="button-secondary" /> + <input type="submit" value="<?php _e('Not Spam') ?>" name="allblog_notspam" class="button-secondary" /> + <?php wp_nonce_field( 'allblogs' ); ?> + <br class="clear" /> + </div> + </div> + + <br class="clear" /> <?php if( isset($_GET['s']) && !empty($_GET['s']) ) : ?> <p><a href="wpmu-users.php?action=users&s=<?php echo stripslashes(wp_specialchars($_GET['s'], 1)) ?>"><?php _e('Search Users:') ?> <strong><?php echo stripslashes(wp_specialchars($_GET['s'], 1)); ?></strong></a></p> - <?php endif; ?> - + <?php endif; ?> + <?php // define the columns to display, the syntax is 'internal name' => 'display name' + $blogname_columns = ( constant( "VHOST" ) == 'yes' ) ? __('Domain') : __('Path'); $posts_columns = array( - 'id' => __('ID'), - 'blogname' => __('Blog Name'), - 'lastupdated' => __('Last Updated'), - 'registered' => __('Registered'), - 'users' => __('Users'), - 'plugins' => __('Actions') + 'id' => __('ID'), + 'blogname' => $blogname_columns, + 'lastupdated' => __('Last Updated'), + 'registered' => __('Registered'), + 'users' => __('Users'), + 'plugins' => __('Actions') ); $posts_columns = apply_filters('manage_posts_columns', $posts_columns); // you can not edit these at the moment - $posts_columns['control_view'] = ''; $posts_columns['control_edit'] = ''; $posts_columns['control_backend'] = ''; $posts_columns['control_deactivate']= ''; @@ -427,20 +402,21 @@ switch( $_GET['action'] ) { $sortby_url = "s=" . $_GET['s'] . "&ip_address=" . $_GET['ip_address']; ?> - <form name="formlist" action="wpmu-edit.php?action=allblogs" method="post"> - <input style="margin:5px 0;" id="check_all1" class="button" type="button" value="<?php _e('Check All') ?>" onclick="check_all_rows()" /> <table width="100%" cellpadding="3" cellspacing="3" class="widefat"> <thead> <tr> - <?php foreach($posts_columns as $column_id => $column_display_name) { ?> - <?php $column_link = "<a href='wpmu-blogs.php?{$sortby_url}&sortby={$column_id}&"; + <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('form-blog-list'));" /></th> + <?php foreach($posts_columns as $column_id => $column_display_name) { + $column_link = "<a href='wpmu-blogs.php?{$sortby_url}&sortby={$column_id}&"; if( $_GET['sortby'] == $column_id ) { $column_link .= $_GET[ 'order' ] == 'DESC' ? 'order=ASC&' : 'order=DESC&'; } $column_link .= "apage={$apage}'>{$column_display_name}</a>"; - $col_url = $column_id == 'users' || $column_id == 'plugins' ? $column_display_name : $column_link; - ?><th scope="col"><?php echo $col_url ?></th> + + $col_url = ($column_id == 'users' || $column_id == 'plugins') ? $column_display_name : $column_link; + ?> + <th scope="col"><?php echo $col_url ?></th> <?php } ?> </tr> </thead> @@ -465,15 +441,18 @@ switch( $_GET['action'] ) { foreach( $posts_columns as $column_name=>$column_display_name ) { switch($column_name) { case 'id': ?> + <th scope="row" class="check-column"> + <input type='checkbox' id='blog_<?php echo $blog['blog_id'] ?>' name='allblogs[]' value='<?php echo $blog['blog_id'] ?>' /> + </th> <th scope="row"> - <input type='checkbox' id='blog_<?php echo $blog['blog_id'] ?>' name='allblogs[]' value='<?php echo $blog['blog_id'] ?>' /> <label for='blog_<?php echo $blog['blog_id'] ?>'><?php echo $blog['blog_id'] ?></label> + <?php echo $blog['blog_id'] ?> </th> <?php break; case 'blogname': ?> <td valign="top"> - <label for='blog_<?php echo $blog['blog_id'] ?>'><?php echo $blogname ?></label> + <a href="http://<?php echo $blog['domain']. $blog['path']; ?>" rel="permalink"><?php echo $blogname; ?></a> </td> <?php break; @@ -507,12 +486,6 @@ switch( $_GET['action'] ) { </td> <?php break; - case 'control_view': ?> - <td valign="top"> - <a href="http://<?php echo $blog['domain']. $blog['path']; ?>" rel="permalink" class="edit"><?php _e('View'); ?></a> - </td> - <?php - break; case 'control_edit': ?> <td valign="top"> <?php echo "<a href='wpmu-blogs.php?action=editblog&id=".$blog['blog_id']."' class='edit'>" . __('Edit') . "</a>"; ?> @@ -596,31 +569,15 @@ switch( $_GET['action'] ) { </tbody> </table> - - <div style="float:right; padding:0 20px; margin-top:20px;"> - <?php if ( $blog_navigation ) echo "<p class='pagenav'>$blog_navigation</p>"; ?> - </div> - <input style="margin:5px 0;" id="check_all2" type="button" class="button" value="<?php _e('Check All') ?>" onclick="check_all_rows()" /> - - <h3><?php _e('Update selected blogs:') ?></h3> - <ul style="list-style:none;"> - <li><input type='radio' name='blogfunction' id='delete' value='delete' /> <label for='delete'><?php _e('Delete') ?></label></li> - <li><input type='radio' name='blogfunction' id='spam' value='spam' /> <label for='spam'><?php _e('Mark as Spam') ?></label></li> - </ul> - - <p class="submit" style="width: 220px"> - <?php wp_nonce_field( "allblogs" ); ?> - <input type='hidden' name='redirect' value='<?php echo $_SERVER['REQUEST_URI'] ?>' /> - <input type='submit' class="button" value='<?php _e('Apply Changes') ?>' /></p> - </form> + </form> </div> <div class="wrap"> <h2><?php _e('Add Blog') ?></h2> <form method="post" action="wpmu-edit.php?action=addblog"> <?php wp_nonce_field('add-blog') ?> - <table cellpadding="3" cellspacing="3"> - <tr> + <table class="form-table"> + <tr class="form-field form-required"> <th style="text-align:center;" scope='row'><?php _e('Blog Address') ?></th> <td> <?php if( constant( "VHOST" ) == 'yes' ) : ?> @@ -630,12 +587,20 @@ switch( $_GET['action'] ) { <?php endif; ?> </td> </tr> - <tr><th style="text-align:center;" scope='row'><?php _e('Blog Title') ?></th><td><input name="blog[title]" type="text" size="20" title="<?php _e('Title') ?>"/></td></tr> - <tr><th style="text-align:center;" scope='row'><?php _e('Admin Email') ?></th><td><input name="blog[email]" type="text" size="20" title="<?php _e('Email') ?>"/></td></tr> - <tr><td colspan='2'><?php _e('A new user will be created if the above email address is not in the database.') ?></td></tr> - <tr><td colspan='2'><?php _e('The username and password will be mailed to this email address.') ?></td></tr> + <tr class="form-field form-required"> + <th style="text-align:center;" scope='row'><?php _e('Blog Title') ?></th> + <td><input name="blog[title]" type="text" size="20" title="<?php _e('Title') ?>"/></td> + </tr> + <tr class="form-field form-required"> + <th style="text-align:center;" scope='row'><?php _e('Admin Email') ?></th> + <td><input name="blog[email]" type="text" size="20" title="<?php _e('Email') ?>"/></td> + </tr> + <tr class="form-field"> + <td colspan='2'><?php _e('A new user will be created if the above email address is not in the database.') ?><br /><?php _e('The username and password will be mailed to this email address.') ?></td> + </tr> </table> - <input class="button" type="submit" name="go" value="<?php _e('Add Blog') ?>" /> + <p class="submit"> + <input class="button" type="submit" name="go" value="<?php _e('Add Blog') ?>" /></p> </form> </div> <?php diff --git a/wp-admin/wpmu-edit.php b/wp-admin/wpmu-edit.php index 8af7fff..ff5e720 100644 --- a/wp-admin/wpmu-edit.php +++ b/wp-admin/wpmu-edit.php @@ -249,16 +249,22 @@ switch( $_GET['action'] ) { check_admin_referer('allblogs'); foreach ( (array) $_POST['allblogs'] as $key => $val ) { if( $val != '0' && $val != '1' ) { - if( $_POST['blogfunction'] == 'delete' ) { + if ( isset($_POST['allblog_delete']) ) { + $blogfunction = 'all_delete'; wpmu_delete_blog( $val, true ); - } elseif( $_POST['blogfunction'] == 'spam' ) { + } elseif ( isset($_POST['allblog_spam']) ) { + $blogfunction = 'all_spam'; update_blog_status( $val, "spam", '1', 0 ); set_time_limit(60); + } elseif ( isset($_POST['allblog_notspam']) ) { + $blogfunction = 'all_notspam'; + update_blog_status( $val, "spam", '0', 0 ); + set_time_limit(60); } } } - wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'all_'.$_POST['blogfunction']), $_SERVER['HTTP_REFERER'] ) ); + wp_redirect( add_query_arg( array('updated' => 'true', 'action' => $blogfunction), $_SERVER['HTTP_REFERER'] ) ); exit(); break; @@ -386,16 +392,20 @@ switch( $_GET['action'] ) { foreach ( (array) $_POST['allusers'] as $key => $val ) { if( $val != '' && $val != '0' && $val != '1' ) { $user_details = get_userdata( $val ); - if( $_POST['userfunction'] == 'delete' ) { + if ( isset($_POST['alluser_delete']) ) { wpmu_delete_user($val); - } elseif( $_POST['userfunction'] == 'spam' ) { + $userfunction = 'all_delete'; + } elseif ( isset($_POST['alluser_spam']) ) { + $userfunction = 'all_spam'; $blogs = get_blogs_of_user( $val, true ); foreach ( (array) $blogs as $key => $details ) { + if ( $details->userblog_id == 1 ) { continue; } // main blog not a spam ! update_blog_status( $details->userblog_id, "spam", '1' ); do_action( "make_spam_blog", $details->userblog_id ); } update_user_status( $val, "spam", '1', 1 ); - } elseif ( $_POST[ 'userfunction' ] == 'notspam' ) { + } elseif ( isset($_POST['alluser_notspam']) ) { + $userfunction = 'all_notspam'; $blogs = get_blogs_of_user( $val, true ); foreach ( (array) $blogs as $key => $details ) { update_blog_status( $details->userblog_id, "spam", '0' ); @@ -404,7 +414,7 @@ switch( $_GET['action'] ) { } } } - wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'all_'.$_POST['userfunction']), $_SERVER['HTTP_REFERER'] ) ); + wp_redirect( add_query_arg( array('updated' => 'true', 'action' => $userfunction), $_SERVER['HTTP_REFERER'] ) ); exit(); break; diff --git a/wp-admin/wpmu-options.php b/wp-admin/wpmu-options.php index fb8d897..ce539a5 100644 --- a/wp-admin/wpmu-options.php +++ b/wp-admin/wpmu-options.php @@ -21,181 +21,170 @@ if (isset($_GET['updated'])) { <form method="post" action="wpmu-edit.php?action=siteoptions"> <?php wp_nonce_field( "siteoptions" ); ?> - <fieldset class="options"> - <legend><?php _e('Operational Settings <em>(These settings cannot be modified by blog owners)</em>') ?></legend> - <table width="100%" cellspacing="2" cellpadding="5" class="editform"> - <tr valign="top"> - <th scope="row"><?php _e('Site Name:') ?></th> - <td> - <input name="site_name" type="text" id="site_name" style="width: 95%" value="<?php echo $current_site->site_name ?>" size="45" /> - <br /> - <?php _e('What you would like to call this website.') ?> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Site Admin Email:') ?></th> - <td> - <input name="admin_email" type="text" id="admin_email" style="width: 95%" value="<?php echo stripslashes( get_site_option('admin_email') ) ?>" size="45" /> - <br /> - <?php printf( __( 'Registration and support mails will come from this address. Make it generic like "support@%s"' ), $current_site->domain ); ?> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Allow new registrations') ?></th> - <?php - if( !get_site_option('registration') ) - update_site_option( 'registration', 'all' ); - ?> - <td> - <label><input name="registration" type="radio" id="registration1" value='none' <?php echo get_site_option('registration') == 'none' ? 'checked="checked"' : ''; ?> /> <?php _e('Disabled'); ?></label><br /> - <label><input name="registration" type="radio" id="registration2" value='all' <?php echo get_site_option('registration') == 'all' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for all. Blogs and user accounts can be created.'); ?></label><br /> - <label><input name="registration" type="radio" id="registration3" value='user' <?php echo get_site_option('registration') == 'user' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for users only. Only user account can be created.'); ?></label><br /> - <label><input name="registration" type="radio" id="registration4" value='blog' <?php echo get_site_option('registration') == 'blog' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for blogs only. Only logged in users can create new blogs.'); ?></label><br /> - <?php _e('Disable or enable registration and who or what can be registered. (Default=all)') ?> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Registration notification') ?></th> - <?php - if( !get_site_option('registrationnotification') ) - update_site_option( 'registrationnotification', 'yes' ); - ?> - <td> - <input name="registrationnotification" type="radio" id="registrationnotification1" value='yes' <?php echo get_site_option('registrationnotification') == 'yes' ? 'checked="checked"' : ''; ?> /> <?php _e('Yes'); ?><br /> - <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php echo get_site_option('registrationnotification') == 'no' ? 'checked="checked"' : ''; ?> /> <?php _e('No'); ?><br /> - <?php _e('Send the site admin an email notification every time someone registers a blog or user account.') ?> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Welcome Email:') ?></th> - <td> - <textarea name="welcome_email" id="welcome_email" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('welcome_email') ) ?></textarea> - <br /> - <?php _e('The welcome email sent to new blog owners.') ?> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('First Post:') ?></th> - <td> - <textarea name="first_post" id="first_post" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('first_post') ) ?></textarea> - <br /> - <?php _e('First post on a new blog.') ?> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Banned Names:') ?></th> - <td> - <input name="illegal_names" type="text" id="illegal_names" style="width: 95%" value="<?php echo implode( " ", get_site_option('illegal_names') ); ?>" size="45" /> - <br /> - <?php _e('Users are not allowed to register these blogs. Separate names by spaces.') ?> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Limited Email Registrations:') ?></th> - <td> - <input name="limited_email_domains" type="text" id="limited_email_domains" style="width: 95%" value="<?php echo get_site_option('limited_email_domains') == '' ? '' : @implode( " ", get_site_option('limited_email_domains') ); ?>" size="45" /> - <br /> - <?php _e('If you want to limit blog registrations to certain domains. Separate domains by spaces.') ?> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Banned Email Domains:') ?></th> - <td> - <textarea name="banned_email_domains" id="banned_email_domains" cols='40' rows='5'><?php echo get_site_option('banned_email_domains') == '' ? '' : @implode( "\n", get_site_option('banned_email_domains') ); ?></textarea> - <br /> - <?php _e('If you want to ban certain email domains from blog registrations. One domain per line.') ?> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Blog upload space:') ?></th> - <td><input name="blog_upload_space" type="text" id="blog_upload_space" value="<?php echo get_site_option('blog_upload_space', 10) ?>" size="3" /> MB</td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Upload File Types:') ?></th> - <td><input name="upload_filetypes" type="text" id="upload_filetypes" value="<?php echo get_site_option('upload_filetypes', 'jpg jpeg png gif') ?>" size="45" /></td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Max upload file size:') ?></th> - <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo get_site_option('fileupload_maxk', 300) ?>" size="5" /> KB</td> - </tr> - </table> - </fieldset> + <h3><?php _e('Operational Settings <em>(These settings cannot be modified by blog owners)</em>') ?></h3> + <table class="form-table"> + <tr valign="top"> + <th scope="row"><?php _e('Site Name') ?></th> + <td> + <input name="site_name" type="text" id="site_name" style="width: 95%" value="<?php echo $current_site->site_name ?>" size="45" /> + <br /> + <?php _e('What you would like to call this website.') ?> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Site Admin Email') ?></th> + <td> + <input name="admin_email" type="text" id="admin_email" style="width: 95%" value="<?php echo stripslashes( get_site_option('admin_email') ) ?>" size="45" /> + <br /> + <?php printf( __( 'Registration and support mails will come from this address. Make it generic like "support@%s"' ), $current_site->domain ); ?> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Allow new registrations') ?></th> + <?php + if( !get_site_option('registration') ) + update_site_option( 'registration', 'all' ); + ?> + <td> + <label><input name="registration" type="radio" id="registration1" value='none' <?php echo get_site_option('registration') == 'none' ? 'checked="checked"' : ''; ?> /> <?php _e('Disabled'); ?></label><br /> + <label><input name="registration" type="radio" id="registration2" value='all' <?php echo get_site_option('registration') == 'all' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for all. Blogs and user accounts can be created.'); ?></label><br /> + <label><input name="registration" type="radio" id="registration3" value='user' <?php echo get_site_option('registration') == 'user' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for users only. Only user account can be created.'); ?></label><br /> + <label><input name="registration" type="radio" id="registration4" value='blog' <?php echo get_site_option('registration') == 'blog' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for blogs only. Only logged in users can create new blogs.'); ?></label><br /> + <?php _e('Disable or enable registration and who or what can be registered. (Default=all)') ?> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Registration notification') ?></th> + <?php + if( !get_site_option('registrationnotification') ) + update_site_option( 'registrationnotification', 'yes' ); + ?> + <td> + <input name="registrationnotification" type="radio" id="registrationnotification1" value='yes' <?php echo get_site_option('registrationnotification') == 'yes' ? 'checked="checked"' : ''; ?> /> <?php _e('Yes'); ?><br /> + <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php echo get_site_option('registrationnotification') == 'no' ? 'checked="checked"' : ''; ?> /> <?php _e('No'); ?><br /> + <?php _e('Send the site admin an email notification every time someone registers a blog or user account.') ?> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Welcome Email') ?></th> + <td> + <textarea name="welcome_email" id="welcome_email" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('welcome_email') ) ?></textarea> + <br /> + <?php _e('The welcome email sent to new blog owners.') ?> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('First Post') ?></th> + <td> + <textarea name="first_post" id="first_post" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('first_post') ) ?></textarea> + <br /> + <?php _e('First post on a new blog.') ?> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Banned Names') ?></th> + <td> + <input name="illegal_names" type="text" id="illegal_names" style="width: 95%" value="<?php echo implode( " ", get_site_option('illegal_names') ); ?>" size="45" /> + <br /> + <?php _e('Users are not allowed to register these blogs. Separate names by spaces.') ?> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Limited Email Registrations') ?></th> + <td> + <input name="limited_email_domains" type="text" id="limited_email_domains" style="width: 95%" value="<?php echo get_site_option('limited_email_domains') == '' ? '' : @implode( " ", get_site_option('limited_email_domains') ); ?>" size="45" /> + <br /> + <?php _e('If you want to limit blog registrations to certain domains. Separate domains by spaces.') ?> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Banned Email Domains') ?></th> + <td> + <textarea name="banned_email_domains" id="banned_email_domains" cols='40' rows='5'><?php echo get_site_option('banned_email_domains') == '' ? '' : @implode( "\n", get_site_option('banned_email_domains') ); ?></textarea> + <br /> + <?php _e('If you want to ban certain email domains from blog registrations. One domain per line.') ?> + </td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Blog upload space') ?></th> + <td><input name="blog_upload_space" type="text" id="blog_upload_space" value="<?php echo get_site_option('blog_upload_space', 10) ?>" size="3" /> MB</td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Upload File Types') ?></th> + <td><input name="upload_filetypes" type="text" id="upload_filetypes" value="<?php echo get_site_option('upload_filetypes', 'jpg jpeg png gif') ?>" size="45" /></td> + </tr> + + <tr valign="top"> + <th scope="row"><?php _e('Max upload file size') ?></th> + <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo get_site_option('fileupload_maxk', 300) ?>" size="5" /> KB</td> + </tr> + </table> - <fieldset class="options"> - <legend><?php _e('Administration Settings') ?></legend> - <table width="100%" cellspacing="2" cellpadding="5" class="editform"> + <h3><?php _e('Administration Settings') ?></h3> + <table class="form-table"> + <tr valign="top"> + <th scope="row"><?php _e('Site Admins') ?></th> + <td> + <input name="site_admins" type="text" id="site_admins" style="width: 95%" value="<?php echo implode(' ', get_site_option( 'site_admins', array( 'admin' ) ) ) ?>" size="45" /> + <br /> + <?php _e('These users may login to the main blog and administer the site. Space separated list of usernames.') ?> + </td> + </tr> + </table> + + <h3><?php _e('Site Wide Settings <em>(These settings may be overridden by blog owners)</em>') ?></h3> + <table class="form-table"> + <?php + $lang_files = glob( ABSPATH . LANGDIR . '/*.mo' ); + $lang = get_site_option('WPLANG'); + if( is_array( $lang_files ) ) { + ?> <tr valign="top"> - <th scope="row"><?php _e('Site Admins:') ?></th> + <th width="33%"><?php _e('Default Language') ?></th> <td> - <input name="site_admins" type="text" id="site_admins" style="width: 95%" value="<?php echo implode(' ', get_site_option( 'site_admins', array( 'admin' ) ) ) ?>" size="45" /> - <br /> - <?php _e('These users may login to the main blog and administer the site. Space separated list of usernames.') ?> - </td> + <select name="WPLANG" id="WPLANG"> + <?php + echo '<option value=""'.((empty($lang)) ? ' selected="selected"' : '').'>'.__('English')."</option>"; + foreach ( (array) $lang_files as $key => $val ) { + $code_lang = basename( $val, '.mo' ); + echo '<option value="'.$code_lang.'"'.(($lang == $code_lang) ? ' selected="selected"' : '').'> '.format_code_lang($code_lang).'</option>'; + } + ?> + </select> + </td> </tr> - </table> - </fieldset> - - <fieldset class="options"> - <legend><?php _e('Site Wide Settings <em>(These settings may be overridden by blog owners)</em>') ?></legend> - <table width="100%" cellspacing="2" cellpadding="5" class="editform"> <?php - $lang_files = glob( ABSPATH . LANGDIR . '/*.mo' ); - $lang = get_site_option('WPLANG'); - if( is_array( $lang_files ) ) { - ?> - <tr valign="top"> - <th width="33%" scope="row"><?php _e('Default Language:') ?></th> - <td> - <select name="WPLANG" id="WPLANG"> - <?php - echo '<option value=""'.((empty($lang)) ? ' selected="selected"' : '').'>'.__('English')."</option>"; - foreach ( (array) $lang_files as $key => $val ) { - $code_lang = basename( $val, '.mo' ); - echo '<option value="'.$code_lang.'"'.(($lang == $code_lang) ? ' selected="selected"' : '').'> '.format_code_lang($code_lang).'</option>'; - } - ?> - </select> - </td> - </tr> - <?php - } // languages - ?> - </table> - </fieldset> + } // languages + ?> + </table> - <fieldset class="options"> - <legend><?php _e('Menus <em>(Enable or disable WP Backend Menus)</em>') ?></legend> - <table cellspacing="2" cellpadding="5" class="editform"> - <tr> - <th scope='row'><?php _e("Menu"); ?></th> - <th scope='row'><?php _e("Enabled"); ?></th> - </tr> - <?php - $menu_perms = get_site_option( "menu_items" ); - $menu_items = array('plugins'); - foreach ( (array) $menu_items as $key => $val ) { - $checked = ( $menu_perms[$val] == '1' ) ? ' checked="checked"' : ''; - echo "<tr><th scope='row'>" . ucfirst( $val ) . "</th><td><input type='checkbox' name='menu_items[" . $val . "]' value='1'" . $checked . " /></td></tr>"; - } - ?> - </table> - </fieldset> + <h3><?php _e('Menus <em>(Enable or disable WP Backend Menus)</em>') ?></h3> + <table class="form-table"> + <tr> + <th scope="row"><?php _e("Menu"); ?></th> + <th scope="row"><?php _e("Enabled"); ?></th> + </tr> + <?php + $menu_perms = get_site_option( "menu_items" ); + $menu_items = array('plugins'); + foreach ( (array) $menu_items as $key => $val ) { + $checked = ( $menu_perms[$val] == '1' ) ? ' checked="checked"' : ''; + echo "<tr><th scope='row'>" . ucfirst( $val ) . "</th><td><input type='checkbox' name='menu_items[" . $val . "]' value='1'" . $checked . " /></td></tr>"; + } + ?> + </table> - <?php - // Add more options here - do_action( 'wpmu_options' ); - ?> + <?php do_action( 'wpmu_options' ); // Add more options here ?> <p class="submit"> <input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p> diff --git a/wp-admin/wpmu-themes.php b/wp-admin/wpmu-themes.php index 512b7bb..a6a566c 100644 --- a/wp-admin/wpmu-themes.php +++ b/wp-admin/wpmu-themes.php @@ -22,28 +22,29 @@ $allowed_themes = get_site_allowed_themes(); <form action='wpmu-edit.php?action=updatethemes' method='post'> <h2><?php _e('Site Themes') ?></h2> <p><?php _e('Disable themes site-wide. You can enable themes on a blog by blog basis.') ?></p> - <table style="border:0; width:100%;" cellspacing="5" cellpadding="5"> + <table class="widefat"> <thead> - <tr> - <th style="width:15%;"><?php _e('Active') ?></th> - <th style="width:15%;"><?php _e('Theme') ?></th> - <th style="width:70%;"><?php _e('Description') ?></th> - </tr> + <tr> + <th style="width:15%;text-align:center;"><?php _e('Active') ?></th> + <th style="width:25%;"><?php _e('Theme') ?></th> + <th style="width:60%;"><?php _e('Description') ?></th> + </tr> </thead> - <tbody id="the-list"> + <tbody id="plugins"> <?php foreach( (array) $themes as $key => $theme ) : $theme_key = wp_specialchars($theme['Stylesheet']); - $class = ('alternate' == $class) ? '' : 'alternate'; - $enabled = $disabled = ''; + $class = ('alt' == $class) ? '' : 'alt'; + $class1 = $enabled = $disabled = ''; if( isset( $allowed_themes[ $theme_key ] ) == true ) { $enabled = 'checked="checked" '; + $class1 = ' active'; } else { $disabled = 'checked="checked" '; } ?> - <tr valign="top" class="<?php echo $class; ?>"> + <tr valign="top" class="<?php echo $class.$class1; ?>"> <td style="text-align:center;"> <label><input name="theme[<?php echo $theme_key ?>]" type="radio" id="disabled_<?php echo $theme_key ?>" value="disabled" <?php echo $disabled ?> /> <?php _e('No') ?></label> diff --git a/wp-admin/wpmu-upgrade-site.php b/wp-admin/wpmu-upgrade-site.php index 2d426b0..8a77113 100644 --- a/wp-admin/wpmu-upgrade-site.php +++ b/wp-admin/wpmu-upgrade-site.php @@ -43,7 +43,7 @@ switch( $_GET['action'] ) { } echo "</ul>"; ?> - <p><?php _e("If your browser doesn't start loading the next page automatically click this link:"); ?> <a href="wpmu-upgrade-site.php?action=upgrade&n=<?php echo ($n + 5) ?>"><?php _e("Next Blogs"); ?></a></p> + <p><?php _e("If your browser doesn't start loading the next page automatically click this link:"); ?> <a class="button" href="wpmu-upgrade-site.php?action=upgrade&n=<?php echo ($n + 5) ?>"><?php _e("Next Blogs"); ?></a></p> <script type='text/javascript'> <!-- function nextpage() { @@ -60,7 +60,7 @@ switch( $_GET['action'] ) { default: ?> <p><?php _e("You can upgrade all the blogs on your site through this page. It works by calling the upgrade script of each blog automatically. Hit the link below to upgrade."); ?></p> - <p><a href="wpmu-upgrade-site.php?action=upgrade"><?php _e("Upgrade Site"); ?></a></p> + <p><a class="button" href="wpmu-upgrade-site.php?action=upgrade"><?php _e("Upgrade Site"); ?></a></p> <?php break; } diff --git a/wp-admin/wpmu-users.php b/wp-admin/wpmu-users.php index 93714a9..806db35 100644 --- a/wp-admin/wpmu-users.php +++ b/wp-admin/wpmu-users.php @@ -3,7 +3,10 @@ require_once('admin.php'); $title = __('WordPress MU › Admin › Users'); $parent_file = 'wpmu-admin.php'; + wp_enqueue_script( 'listman' ); +wp_enqueue_script( 'admin-forms' ); + require_once('admin-header.php'); if( is_site_admin() == false ) { @@ -27,9 +30,6 @@ if ( $_GET['updated'] == 'true' ) { case 'add': _e('User added !'); break; - default: - _e('Options saved !'); - break; } ?> </p></div> @@ -37,7 +37,7 @@ if ( $_GET['updated'] == 'true' ) { } ?> -<div class="wrap"> +<div class="wrap" style="position:relative;"> <?php $apage = isset( $_GET['apage'] ) ? intval( $_GET['apage'] ) : 1; $num = isset( $_GET['num'] ) ? intval( $_GET['num'] ) : 15; @@ -87,84 +87,58 @@ if ( $_GET['updated'] == 'true' ) { )); ?> <h2><?php _e("Users"); ?></h2> - - <div style="float:right; padding:0 20px; margin-top:20px;"> - <?php if ( $user_navigation ) echo "<p class='pagenav'>$user_navigation</p>"; ?> - </div> - - <form action="wpmu-users.php" method="get" id="searchform"> - <fieldset> - <legend><?php _e('Search Users…') ?></legend> - <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes(wp_specialchars($_GET['s'], 1)); ?>" size="17" /> - </fieldset> - <input class="button" id="post-query-submit" type="submit" name="submit" value="<?php _e('Search') ?>" /> + <form action="wpmu-users.php" method="get" style="position:absolute;right:0;top:0;"> + <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes(wp_specialchars($_GET['s'], 1)); ?>" size="17" /> + <input type="submit" id="post-query-submit" value="<?php _e('Search Users') ?>" class="button" /> </form> - <br style="clear:both;" /> - - <?php if( isset($_GET['s']) && $_GET['s'] != '' ) : ?> - <p><a href="wpmu-blogs.php?action=blogs&s=<?php echo stripslashes(wp_specialchars($_GET['s'], 1)); ?>"><?php _e('Search Blogs:') ?> <strong><?php echo stripslashes(wp_specialchars($_GET['s'], 1)) ?></strong></a></p> - <?php endif; ?> - - <?php - // define the columns to display, the syntax is 'internal name' => 'display name' - $posts_columns = array( - 'id' => __('ID'), - 'login' => __('Login'), - 'email' => __('Email'), - 'name' => __('Name'), - 'registered' => __('Registered'), - 'blogs' => __('Blogs') - ); - $posts_columns = apply_filters('manage_posts_columns', $posts_columns); - - // you can not edit these at the moment - $posts_columns['control_edit'] = ''; - $posts_columns['control_delete'] = ''; + <form id="form-user-list" action='wpmu-edit.php?action=allusers' method='post'> + <div class="tablenav"> + <?php if ( $user_navigation ) echo "<div class='tablenav-pages'>$user_navigation</div>"; ?> + + <div class="alignleft"> + <input type="submit" value="<?php _e('Delete') ?>" name="alluser_delete" class="button-secondary delete" /> + <input type="submit" value="<?php _e('Mark as Spammers') ?>" name="alluser_spam" class="button-secondary" /> + <input type="submit" value="<?php _e('Not Spam') ?>" name="alluser_notspam" class="button-secondary" /> + <?php wp_nonce_field( 'allusers' ); ?> + <br class="clear" /> + </div> + </div> - ?> - <script type="text/javascript"> - <!-- - var checkflag = "false"; - function check_all_rows() { - field = document.formlist; - if (checkflag == "false") { - for (i = 0; i < field.length; i++) { - if( field[i].name == 'allusers[]' ) { - field[i].checked = true; - } - } - checkflag = "true"; - return "<?php _e('Uncheck All') ?>"; - } else { - for (i = 0; i < field.length; i++) { - if( field[i].name == 'allusers[]' ) { - field[i].checked = false; - } - } - checkflag = "false"; - return "<?php _e('Check All') ?>"; - } - } - // --> - </script> + <br class="clear" /> + + <?php if( isset($_GET['s']) && $_GET['s'] != '' ) : ?> + <p><a href="wpmu-blogs.php?action=blogs&s=<?php echo stripslashes(wp_specialchars($_GET['s'], 1)); ?>"><?php _e('Search Blogs:') ?> <strong><?php echo stripslashes(wp_specialchars($_GET['s'], 1)) ?></strong></a></p> + <?php endif; ?> - <form name="formlist" action='wpmu-edit.php?action=allusers' method='post'> + <?php + // define the columns to display, the syntax is 'internal name' => 'display name' + $posts_columns = array( + 'checkbox' => '', + 'id' => __('ID'), + 'login' => __('Login'), + 'email' => __('Email'), + 'name' => __('Name'), + 'registered' => __('Registered'), + 'blogs' => '' + ); + $posts_columns = apply_filters('manage_posts_columns', $posts_columns); + ?> <table class="widefat" cellpadding="3" cellspacing="3"> <thead> <tr> - <?php foreach( (array) $posts_columns as $column_id => $column_display_name) { ?> - <th scope="col"> - <?php if( $column_id == 'blogs' ) { - _e('Blogs'); - } else { ?> - <a href="wpmu-users.php?sortby=<?php echo $column_id ?>&<?php if( $_GET['sortby'] == $column_id ) { if( $_GET['order'] == 'DESC' ) { echo "order=ASC&" ; } else { echo "order=DESC&"; } } ?>apage=<?php echo $apage ?>"><?php echo $column_display_name; ?></a> - <?php } ?> - </th> + <?php foreach( (array) $posts_columns as $column_id => $column_display_name) { + if( $column_id == 'blogs' ) { + echo '<th scope="col">'.__('Blogs').'</th>'; + } elseif( $column_id == 'checkbox') { + echo '<th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById(\'form-user-list\'));" /></th>'; + } else { ?> + <th scope="col"><a href="wpmu-users.php?sortby=<?php echo $column_id ?>&<?php if( $_GET['sortby'] == $column_id ) { if( $_GET['order'] == 'DESC' ) { echo "order=ASC&" ; } else { echo "order=DESC&"; } } ?>apage=<?php echo $apage ?>"><?php echo $column_display_name; ?></a></th> + <?php } ?> <?php } ?> </tr> </thead> - <tbody id="the-list"> + <tbody id="users" class="list:user user-list"> <?php if ($user_list) { $bgcolor = ''; foreach ( (array) $user_list as $user) { @@ -175,13 +149,20 @@ if ( $_GET['updated'] == 'true' ) { <?php foreach( (array) $posts_columns as $column_name=>$column_display_name) : switch($column_name) { - case 'id': ?> - <th scope="row"><input type='checkbox' id='user_<?php echo $user['ID'] ?>' name='allusers[]' value='<?php echo $user['ID'] ?>' /> <label for='user_<?php echo $user['ID'] ?>'><?php echo $user['ID'] ?></label></th> + case 'checkbox': ?> + <th scope="row" class="check-column"><input type='checkbox' id='user_<?php echo $user['ID'] ?>' name='allusers[]' value='<?php echo $user['ID'] ?>' /></th> + <?php + break; + + case 'id': ?> + <td><?php echo $user['ID'] ?></td> <?php break; - case 'login': ?> - <td><label for='user_<?php echo $user['ID'] ?>'><?php echo $user['user_login'] ?></label></td> + case 'login': + $edit = clean_url( add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=".$user['ID'] ) ); + ?> + <td><strong><a href="<?php echo $edit; ?>" class="edit"><?php echo stripslashes($user['user_login']); ?></a></strong></td> <?php break; @@ -218,16 +199,6 @@ if ( $_GET['updated'] == 'true' ) { <?php break; - case 'control_edit': ?> - <td><a href="user-edit.php?user_id=<?php echo $user['ID']; ?>" class="edit"><?php _e('Edit'); ?></a></td> - <?php - break; - - case 'control_delete': ?> - <td><a href="wpmu-edit.php?action=confirm&action2=deleteuser&msg=<?php echo urlencode( __("You are about to delete this user.") ); ?>&id=<?php echo $user['ID']; ?>&redirect=<?php echo wpmu_admin_redirect_url(); ?>" class="delete" onclick="return deleteSomething( 'user', <?php echo $user['ID']; ?>, '<?php echo js_escape(sprintf(__("You are about to delete this user '%s'.\n'OK' to delete, 'Cancel' to stop."), $user['user_login'])); ?>' );"><?php _e('Delete'); ?></a></td> - <?php - break; - default: ?> <td><?php do_action('manage_users_custom_column', $column_name, $user['ID']); ?></td> <?php @@ -248,24 +219,6 @@ if ( $_GET['updated'] == 'true' ) { ?> </tbody> </table> - - <div style="float:right; padding:0 20px; margin-top:20px;"> - <?php if ( $user_navigation ) echo "<p class='pagenav'>$user_navigation</p>"; ?> - </div> - - <p><input class="button" type="button" value="<?php _e('Check All') ?>" onclick="this.value=check_all_rows()" /></p> - - <h3><?php _e('Selected Users:') ?></h3> - <ul style="list-style:none;"> - <li><input type='radio' name='userfunction' id='delete' value='delete' /> <label for='delete'><?php _e('Delete') ?></label></li> - <li><input type='radio' name='userfunction' id='spam' value='spam' /> <label for='spam'><?php _e('Mark as Spammers') ?></label></li> - <li><input type='radio' name='userfunction' id='notspam' value='notspam' /> <label for='spam'><?php _e('Not Spam') ?></label></li> - </ul> - - <p class="submit" style="width: 220px"> - <?php wp_nonce_field( "allusers" ); ?> - <input type='hidden' name='action' value='allusers' /> - <input class="button" type='submit' value='<?php _e('Apply Changes') ?>' /></p> </form> </div> @@ -273,23 +226,24 @@ if ( $_GET['updated'] == 'true' ) { if( apply_filters('show_adduser_fields', true) ) : ?> <div class="wrap"> + <h2><?php _e('Add user') ?></h2> <form action="wpmu-edit.php?action=adduser" method="post"> - <h2><?php _e('Add User') ?></h2> - - <table cellpadding="3" cellspacing="3"> - <tr> - <th style="text-align:center;" scope='row'><?php _e('Username') ?></th> - <td><input type="text" name="user[username]" /></td> - </tr> - <tr> - <th style="text-align:center;" scope='row'><?php _e('Email') ?></th> - <td><input type="text" name="user[email]" /></td> - </tr> - <tr><td colspan='2'><?php _e('Username and password will be mailed to the above email address.') ?></td></tr> - </table> - <p> - <?php wp_nonce_field('add-user') ?> - <input class="button" type="submit" name="Add user" value="<?php _e('Add user') ?>" /></p> + <table class="form-table"> + <tr class="form-field form-required"> + <th scope='row'><?php _e('Username') ?></th> + <td><input type="text" name="user[username]" /></td> + </tr> + <tr class="form-field form-required"> + <th scope='row'><?php _e('Email') ?></th> + <td><input type="text" name="user[email]" /></td> + </tr> + <tr class="form-field"> + <td colspan='2'><?php _e('Username and password will be mailed to the above email address.') ?></td> + </tr> + </table> + <p class="submit"> + <?php wp_nonce_field('add-user') ?> + <input class="button" type="submit" name="Add user" value="<?php _e('Add user') ?>" /></p> </form> </div> <?php endif; ?> |