User TotCred: " . format_credit($user->total_credit) . "
"; $retstr .= "User AvgCred: " . format_credit($user->expavg_credit) . "
"; /* if ($user->seti_nresults) { row2("SETI@home classic workunits", number_format($user->seti_nresults)); } if ($user->seti_total_cpu) { $x = number_format($user->seti_total_cpu/3600)." hours"; row2("SETI@home classic CPU time", $x); } */ return $retstr; } function show_user_wap($user) { wap_begin(); if (!$user) { echo "
User not found!
"; wap_end(); return; } // keep a 'running tab' in wapstr in case exceeds 1K WAP limit $wapstr = PROJECT . "
Account Data
for $user->name
Time: " . wap_timestamp(); $wapstr .= show_credit($user); if ($user->teamid) { $result = mysql_query("select name, total_credit, expavg_credit from team where id = $user->teamid"); $team = mysql_fetch_object($result); $wapstr .= "
Team: $team->name
"; $wapstr .= "Team TotCred: " . format_credit($team->total_credit) . "
"; $wapstr .= "Team AvgCred: " . format_credit($team->expavg_credit) . "
"; mysql_free_result($result); } else { $wapstr .= "
Team: None
"; } // finally get last 5 trickles for user //$wapstr .= show_trickles("u", $user->id, 5, 1); // don't want to send more than 1KB probably? if (strlen($wapstr)>1024) echo substr($wapstr,0,1024); else echo $wapstr; wap_end(); } ?>