Modified the pages to search users and profiles so that the results

display a bit more info about the users (date joined project, country,
total credit, RAC)..

svn path=/trunk/boinc/; revision=9149
This commit is contained in:
Bruce Allen 2005-12-26 20:03:06 +00:00
parent f3d1e4e71d
commit 90bec63406
3 changed files with 15 additions and 4 deletions

View File

@ -14810,3 +14810,14 @@ David 24 Dec 2005
client/
gui_rpc_server.C,h
gui_rpc_server_ops.C
Bruce 26 Dec 2005
- Modified the pages to search users and profiles so that the results
display a bit more info about the users (date joined project, country,
total credit, RAC)..
html/
user/
user_search_action.php
profile_search_action.php

View File

@ -5,7 +5,7 @@ require_once("../inc/util.inc");
function show_profile_link($profile, $n) {
$user = lookup_user_id($profile->userid);
echo "<br>". user_links($user)."\n";
echo "<tr><td align=\"center\">".user_links($user)."</td><td align=\"center\">".date_str($user->create_time)."</td><td align=\"center\">".$user->country."</td><td align=\"center\">".(int)$user->total_credit."</td><td align=\"center\">".(int)$user->expavg_credit."</td></tr>\n";
}
db_init();
@ -20,7 +20,7 @@ page_head("Profile search results");
echo "<h2>Profiles containing '$search_string'</h2>\n";
$q = "select * from profile where match(response1, response2) against ('$search_string') limit $offset,$count";
$result = mysql_query($q);
echo "<table>";
echo "<table align=\"center\" cellpadding=\"1\" border=\"1\" width=\"90%\"><tr><th align=\"center\">User name</th><th align=\"center\">Joined project</th><th align=\"center\">Country</th><th align=\"center\">Total credit</th><th align=\"center\">Recent credit</th></tr>";
$n = 0;
while ($profile = mysql_fetch_object($result)) {
show_profile_link($profile, $n+$offset+1);

View File

@ -4,7 +4,7 @@ require_once("../inc/db.inc");
require_once("../inc/util.inc");
function show_user($user, $n) {
echo "<br>". user_links($user)."\n";
echo "<tr><td align=\"center\">".user_links($user)."</td><td align=\"center\">".date_str($user->create_time)."</td><td align=\"center\">".$user->country."</td><td align=\"center\">".(int)$user->total_credit."</td><td align=\"center\">".(int)$user->expavg_credit."</td></tr>\n";
}
db_init();
@ -23,7 +23,7 @@ $search_string = str_replace('%', '\\\\%', $search_string);
$q = "select * from user where name like '$search_string%' limit $offset,$count";
$result = mysql_query($q);
echo "<table>";
echo "<table align=\"center\" cellpadding=\"2\" border=\"1\" width=\"90%\"><tr><th align=\"center\">User name</th><th align=\"center\">Joined project</th><th align=\"center\">Country</th><th align=\"center\">Total credit</th><th align=\"center\">Recent credit</th></tr>";
$n = 0;
while ($user = mysql_fetch_object($result)) {
show_user($user, $n+$offset+1);