.
require_once("../inc/boinc_db.inc");
require_once("../inc/util.inc");
function show_profile_link2($profile, $n) {
$user = lookup_user_id($profile->userid);
echo "
".user_links($user)." | ".date_str($user->create_time)." | $user->country | ".(int)$user->total_credit." | ".(int)$user->expavg_credit." |
\n";
}
$search_string = get_str('search_string');
$search_string = strip_tags($search_string);
$search_string = boinc_real_escape_string($search_string);
$offset = get_int('offset', true);
if (!$offset) $offset=0;
$count = 10;
page_head("Profiles containing '$search_string'");
$profiles = BoincProfile::enum("match(response1, response2) against ('$search_string') limit $offset,$count");
start_table();
echo "
User name |
Joined project |
Country |
Total credit |
Recent credit |
";
$n = 0;
foreach($profiles as $profile) {
show_profile_link2($profile, $n+$offset+1);
$n += 1;
}
end_table();
if ($offset==0 && $n==0) {
echo "No profiles found containing '$search_string'";
}
if ($n==$count) {
$s = urlencode($search_string);
$offset += $count;
echo "
Next $count
";
}
page_tail();
?>