- <tr>
- <th colspan="8" align="left">
- <h3><?php echo $wp_roles->role_names[$role]; ?></h3>
- </th></tr>
-
- <tr>
- <th><?php _e('ID') ?></th>
- <th><?php _e('Username') ?></th>
- <th><?php _e('Name') ?></th>
- <th><?php _e('E-mail') ?></th>
- <th><?php _e('Website') ?></th>
- <th><?php _e('Posts') ?></th>
- <th> </th>
- </tr>
- <?php
- $style = '';
- foreach ($roleclass as $user_object) {
- $email = $user_object->user_email;
- $url = $user_object->user_url;
- $short_url = str_replace('http://', '', $url);
- $short_url = str_replace('www.', '', $short_url);
- if ('/' == substr($short_url, -1))
- $short_url = substr($short_url, 0, -1);
- if (strlen($short_url) > 35)
- $short_url = substr($short_url, 0, 32).'...';
- $style = ('class="alternate"' == $style) ? '' : 'class="alternate"';
- $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$user_object->ID' and post_status = 'publish'");
- if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_object->ID' title='" . __('View posts') . "'>$numposts</a>";
- echo "
-<tr $style>
- <td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' value='{$user_object->ID}' /> <label for='user_{$user_object->ID}'>{$user_object->ID}</label></td>
- <td><label for='user_{$user_object->ID}'><strong>$user_object->user_login</strong></label></td>
- <td><label for='user_{$user_object->ID}'>$user_object->first_name $user_object->last_name</label></td>
- <td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
- <td><a href='$url' title='website: $url'>$short_url</a></td>";
- echo "<td align='right'>$numposts</td>";
- echo '<td>';
- if (current_user_can('edit_users'))
- echo "<a href='user-edit.php?user_id=$user_object->ID' class='edit'>".__('Edit')."</a>";
- echo '</td>';
- echo '</tr>';
- }
-
- ?>
-