#!/usr/bin/perl
use strict;
use CGI;
my $query=new CGI;
use Bugzilla;
my $dbhandle=Bugzilla->dbh;


my $param=$query->param("prefix");
my $statement=$dbhandle->prepare("select login_name from profiles 
				where login_name REGEXP \'$param\' or
					realname REGEXP \'$param\';"); 
$statement->execute;
my @arr;
while(my @row=$statement->fetchrow_array){
	push @arr,$row[0];
}

print $query->header("text/html");
print $query->start_html;

print $query->scrolling_list(-name=>"menu",-id=>"menu",-values=>\@arr
			,-size=>4,-style=>"width:279px",-onclick=>"parent.suggest_selected();");
print $query->end_html;

