. require_once("../inc/boinc_db.inc"); require_once("../inc/util.inc"); if (DISABLE_PROFILES) error_page("Profiles are disabled"); check_get_args(array("search_string", "offset")); function show_profile_link2($profile, $n) { $user = BoincUser::lookup_id($profile->userid); echo "".user_links($user, BADGE_HEIGHT_SMALL)."".date_str($user->create_time)."$user->country".(int)$user->total_credit."".(int)$user->expavg_credit."\n"; } $search_string = get_str('search_string'); $search_string = sanitize_tags($search_string); $search_string = BoincDb::escape_string($search_string); $offset = get_int('offset', true); if (!$offset) $offset=0; $count = 10; page_head(tra("Profiles containing '%1'", $search_string)); $profiles = BoincProfile::enum("match(response1, response2) against ('$search_string') limit $offset,$count"); start_table(); echo " ".tra("User name")." ".tra("Joined project")." ".tra("Country")." ".tra("Total credit")." ".tra("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 tra("No profiles found containing '%1'", $search_string); } if ($n==$count) { $s = urlencode($search_string); $offset += $count; echo " ".tra("Next %1", $count)." "; } page_tail(); ?>