From 9be8585fc14daea767bb1debc744c5b4f844ca72 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 27 Oct 2003 17:49:05 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2578 --- checkin_notes | 14 ++++++++++++- html/user/host.inc | 4 ++-- html/user/results.php | 42 ++++++++++++++++++++++++++++++++++++++ html/user/results_host.php | 33 ------------------------------ html/user/user.inc | 14 ++++++------- py/Boinc/setup_project.py | 5 ++--- 6 files changed, 66 insertions(+), 46 deletions(-) create mode 100644 html/user/results.php delete mode 100644 html/user/results_host.php diff --git a/checkin_notes b/checkin_notes index 3929542c7b..8f421e90c4 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7121,4 +7121,16 @@ David 27 Oct 2003 Oliver 27 Oct 2003 - Fixed efficiency bugs in starfield api/ - gutil.C,h \ No newline at end of file + gutil.C,h + +David 27 Oct 2003 + - let users see list of all their results + - added db_dump to list of programs updated by update_project + + html_user/ + host.inc + results.php (new) + results_host.php (deleted) + user.inc + py/Boinc/ + setup_project.py diff --git a/html/user/host.inc b/html/user/host.inc index 24763f377b..341a7ea09b 100644 --- a/html/user/host.inc +++ b/html/user/host.inc @@ -80,7 +80,7 @@ function show_host($host, $private) { $nresults = host_nresults($host); $nresults_success = host_nresults_success($host); $nresults_valid = host_nresults_valid($host); - $results = "$nresults_valid valid / $nresults_success successful / id>$nresults total"; + $results = "$nresults_valid valid / $nresults_success successful / id>$nresults total"; if ($last_result) { $time_last_result = time_str($last_result->received_time); $results .= "
Last received: $time_last_result"; @@ -188,7 +188,7 @@ function show_host_row($host, $i, $private) { $nresults = host_nresults($host); $nresults_success = host_nresults_success($host); $nresults_valid = host_nresults_valid($host); - echo "$nresults_valid / $nresults_success / id>$nresults"; + echo "$nresults_valid / $nresults_success / id>$nresults"; if ($last_result) { $date_last_result = date_str($last_result->received_time); echo " [$date_last_result]"; diff --git a/html/user/results.php b/html/user/results.php new file mode 100644 index 0000000000..2089da2721 --- /dev/null +++ b/html/user/results.php @@ -0,0 +1,42 @@ +Results for $type\n"; + result_table_start(true, false); + $i = 1; + $query = "select * from result where $clause order by id desc limit $results_per_page offset $offset"; + $result = mysql_query($query); + while ($res = mysql_fetch_object($result)) { + show_result_row($res, true, false); + $i++; + } + mysql_free_result($result); + echo "\n"; + if ($i > $results_per_page) { + $offset = $offset+$results_per_page; + echo " +
Next $results_per_page results
+ "; + } + + page_tail(); +?> diff --git a/html/user/results_host.php b/html/user/results_host.php deleted file mode 100644 index 882f201069..0000000000 --- a/html/user/results_host.php +++ /dev/null @@ -1,33 +0,0 @@ -Results for host\n"; - result_table_start(true, false); - $i = 1; - $result = mysql_query("select * from result where hostid=$hostid order by id desc limit $results_per_page offset $offset"); - while ($res = mysql_fetch_object($result)) { - show_result_row($res, true, false); - $i++; - } - mysql_free_result($result); - echo "\n"; - if ($i > $results_per_page) { - $offset = $offset+$results_per_page; - echo " -
Next $results_per_page results
- "; - } - - page_tail(); -?> diff --git a/html/user/user.inc b/html/user/user.inc index 00018f7579..89e9ae401e 100644 --- a/html/user/user.inc +++ b/html/user/user.inc @@ -3,12 +3,11 @@ // show dynamic user info (private) // function show_user_stats_private($user) { - row1("Your account statistics"); + row1("Account statistics"); row2(PROJECT." member since", time_str($user->create_time)); row2("Total credit", format_credit($user->total_credit)); row2("Recent average credit", format_credit($user->expavg_credit)); - $team_header = "Team
-Change"; + $team_header = "Team
Change"; if ($user->teamid) { $result = mysql_query("select * from team where id = $user->teamid"); $team = mysql_fetch_object($result); @@ -17,6 +16,7 @@ function show_user_stats_private($user) { row2($team_header, "None"); } row2("Computers", "View"); + row2("Results", "id>View"); } // show static user info (private) @@ -28,9 +28,9 @@ function show_user_profile_private($user) { $email_text = "Verification pending"; } - row1("Your account information"); + row1("Account information"); row2("Email address
- Edit", + Edit", $email_text ); row2("Name", $user->name); @@ -39,7 +39,7 @@ function show_user_profile_private($user) { row2("Postal code", $user->postal_code); row2("", "Edit account info"); - row1("Your profile"); + row1("Profile"); $sql = "SELECT * FROM profile WHERE userid = ".$user->id; $result = mysql_query($sql); @@ -50,7 +50,7 @@ function show_user_profile_private($user) { row2("", "Create"); } - row1("Your preferences"); + row1("Preferences"); row2("General", "View / Edit"); row2(PROJECT, "View / Edit"); } diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py index 3acf340b41..1f2076c42a 100644 --- a/py/Boinc/setup_project.py +++ b/py/Boinc/setup_project.py @@ -273,10 +273,9 @@ def install_boinc_files(dest_dir): [ 'cgi', 'file_upload_handler']) map(lambda (s): install(builddir('sched',s), dir('bin',s)), [ 'make_work', 'feeder', 'transitioner', 'validate_test', - 'file_deleter', 'assimilator' ]) + 'file_deleter', 'assimilator', 'db_dump' ]) map(lambda (s): install(srcdir('sched',s), dir('bin',s)), - [ 'start', 'stop', 'status', - 'grep_logs' ]) + [ 'start', 'stop', 'status', 'grep_logs' ]) map(lambda (s): install(srcdir('tools',s), dir('bin',s)), [ 'boinc_path_config.py', 'add', 'dbcheck_files_exist', 'update_versions', 'upgrade' ])