id); row("created", time_str($platform->create_time)); row("name", $platform->name); echo ""; } function show_app($app) { start_table(); row("ID", $app->id); row("created", time_str($app->create_time)); row("name", $app->name); row("alpha version", $app->alpha_vers); row("beta version", $app->beta_vers); row("production version", $app->prod_vers); row("result template", "
".htmlspecialchars($app->result_xml_template)."
"); echo ""; } function show_app_version($app_version) { start_table(); row("ID", $app_version->id); row("created", time_str($app_version->create_time)); row("app ID", $app_version->appid); row("version num", $app_version->version_num); row("platform ID", $app_version->platformid); row("XML doc", "
".htmlspecialchars($app_version->xml_doc)."
"); row("min_core_version", $app_version->min_core_version); row("max_core_version", $app_version->max_core_version); row("message", $app_version->message); row("deprecated", $app_version->deprecated); echo ""; } function show_host($host) { echo TABLE2."\n"; echo "Below is information on all the hosts you have running the BOINC core client."; echo "

"; echo "".TD2.LG_FONT."Host Information:\n"; row("IP address: ", "$host->last_ip_addr
(same the last $host->nsame_ip_addr times)"); row("Domain name: ", $host->domain_name); $x = $host->timezone/3600; row("Time zone: ", "UTC - $x hours"); row("Created: ", time_str($host->create_time)); row("CPU: ", "$host->p_vendor $host->p_model"); row("Number of CPUs: ", $host->p_ncpus); row("Operating System: ", "$host->os_name $host->os_version"); $x = $host->m_nbytes/(1024*1024); $y = round($x, 2); row("Memory: ", "$y MB"); $x = $host->m_cache/1024; $y = round($x, 2); row("Cache: ", "$y KB"); $x = $host->m_swap/(1024*1024); $y = round($x, 2); row("Swap Space: ", "$y MB"); $x = $host->d_total/(1024*1024*1024); $y = round($x, 2); row("Total Disk Space: ", "$y GB"); $x = $host->d_free/(1024*1024*1024); $y = round($x, 2); row("Free Disk Space: ", "$y GB"); row("Avg network bandwidth:
(upstream)
", "$host->n_bwup bytes/sec"); row("Avg network bandwidth:
(downstream)
", "$host->n_bwdown bytes/sec"); row("Number of times client has contacted server: ", $host->rpc_seqno); row("Last time contacted server: ", time_str($host->rpc_time)); row("% of time client on: ", 100*$host->on_frac." %"); row("% of time host connected: ", 100*$host->connected_frac." %"); row("% of time user active: ", 100*$host->active_frac." %"); echo "\n"; } function show_workunit($wu) { start_table(); row("created", time_str($wu->create_time)); row("name", $wu->name); row("XML doc", "

".htmlspecialchars($wu->xml_doc)."
"); row("app ID", $wu->appid); row("batch", $wu->batch); row("FP operations", $wu->rsc_fpops); row("integer operations", $wu->rsc_iops); row("memory requirement", $wu->rsc_memory); row("disk requirement", $wu->rsc_disk); row("dynamic results", $wu->dynamic_results?"yes":"no"); row("max_results", $wu->max_results); row("nresults", $wu->nresults); row("nresults_unsent", $wu->nresults_unsent); row("nresults_done", $wu->nresults_done); row("nresults_fail", $wu->nresults_fail); echo ""; } function res_state_string($s) { switch($s) { case 1: return "inactive"; case 2: return "unsent"; case 3: return "in progress"; case 4: return "done"; case 5: return "timeout"; case 6: return "error"; } } function show_result($result) { start_table(); row("created", time_str($result->create_time)); row("name", $result->name); row("workunit ID", $result->workunitid); row("state", res_state_string($result->state)); row("host ID", $result->hostid); row("sent", time_str($result->sent_time)); row("received", time_str($result->received_time)); row("exit status", $result->exit_status); row("CPU time", $result->cpu_time); row("XML doc in", "
".htmlspecialchars($result->xml_doc_in)."
"); row("XML doc out", "
".htmlspecialchars($result->xml_doc_out)."
"); row("stderr out", "
".htmlspecialchars($result->stderr_out)."
"); row("batch", $result->batch); row("validated", $result->validated); echo ""; } function show_user_stats($user, $project) { echo TABLE2."\n"; echo "".TD2.LG_FONT."User Stats:\n"; row("User ID: ", $user->id); $row = sprintf("%s user since: ", $project); row($row, time_str($user->create_time)); row("Total credit: ", $user->total_credit); row("Recent averaged credit: ", $user->expavg_credit); if ($user->teamid) { $result = mysql_query("select * from team where id = $user->teamid"); $team = mysql_fetch_object($result); row("Member of team: ", "id>$team->name"); } else { row("Member of team: ", "You are currently not part of a team"); } echo "\n"; } function show_user_profile($user) { echo TABLE2."\n"; echo "".TD2.LG_FONT."User Information:\n"; row("User name: ", $user->name); row("Email address: ", $user->email_addr); row("Country: ", $user->country); row("Postal (ZIP) code: ", $user->postal_code); echo "Edit User Information\n"; echo "Change Password\n"; echo "\n"; } function show_team($team) { start_table(); row("ID", $team->id); row("founder", $team->userid); row("name", $team->name); row("url", $team->url); row("type", $team->type); row("name_html", $team->name_html); row("description", $team->description); } ?>