Log in with username/password: lyceum/lyceum

Changeset 1067

Show
Ignore:
Timestamp:
08/17/07 01:23:20 (1 year ago)
Author:
jjb
Message:

First version of live user searching. Whoo hoo! Contributed by Will Mitchell, http://freepizza.cc.

#681

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/lyceum/wp-admin/users.php

    r1006 r1067  
    146146   include ('admin-header.php'); 
    147147    
    148    $userids = $wpdb->get_col("SELECT DISTINCT u.ID FROM $wpdb->users u ORDER BY u.user_registered DESC;");// in the future it might also be necessary to do meta_key = prefix.user_level -jjb 
     148   $userids = $wpdb->get_col("SELECT DISTINCT u.ID FROM $wpdb->users u, $wpdb->usermeta um WHERE um.blog = '$blog' and u.ID = um.user_id ORDER BY u.user_registered DESC;"); 
    149149    
    150150   foreach($userids as $userid) { 
     
    156156    
    157157   ?> 
     158 
     159   <script src="<?php echo WEBROOT ?>/wp-includes/js/prototype.js" type="text/javascript"></script> 
    158160 
    159161   <?php  
     
    262264  </table> 
    263265 
     266  <h3>No Privileges</h3> 
     267    
     268   <p> 
     269   <label>Search Users:</label> <input type="text" name="user_filter" value="" id="user_filter"><input type="button" name="user_search" id="user_search" value="Go" id="search"> 
     270   </p> 
     271    
     272   <script type="text/javascript" charset="utf-8"> 
     273     search_users = function () { 
     274        $('user_search').onclick = new Ajax.Updater('noprivs', 'user-list.php', { method:'get', parameters: { filter: $('user_filter').value } }); 
     275     } 
     276     Event.observe('user_search', 'click', search_users, false); 
     277   </script> 
     278    
     279  <table cellpadding="3" cellspacing="3" width="100%" id="noprivs"> 
     280    
     281  </table> 
    264282 
    265283   <h2><?php _e('Update Users'); ?></h2> 
Log in with username/password: lyceum/lyceum