Ticket #982: profile_host.diff
File profile_host.diff, 22.9 KB (added by , 14 years ago) |
---|
-
inc/host.inc
21 21 require_once("../inc/boinc_db.inc"); 22 22 23 23 function link_to_results($host) { 24 if (!$host) return "No host";24 if (!$host) return tra("No host"); 25 25 $config = get_config(); 26 if (!parse_bool($config, "show_results")) return "Unavailable";26 if (!parse_bool($config, "show_results")) return tra("Unavailable"); 27 27 $nresults = host_nresults($host); 28 28 if (!$nresults) return "0"; 29 29 return "<a href=results.php?hostid=$host->id>$nresults</a>"; … … 52 52 <input type=hidden name=hostid value=$host->id> 53 53 <select name=venue> 54 54 <option value=\"\" $none>--- 55 <option value=home $h> Home56 <option value=work $w> Work57 <option value=school $s> School55 <option value=home $h>".tra("Home")." 56 <option value=work $w>".tra("Work")." 57 <option value=school $s>".tra("School")." 58 58 </select> 59 <input type=submit value= Update>59 <input type=submit value=".tra("Update")."> 60 60 </form> 61 61 "; 62 62 return $x; … … 80 80 // 81 81 function show_host($host, $user, $ipprivate) { 82 82 start_table(); 83 row1( "Computer information");83 row1(tra("Computer information")); 84 84 $anonymous = false; 85 85 if ($user) { 86 86 if ($ipprivate) { 87 row2( "IP address", "$host->last_ip_addr<br>(same the last $host->nsame_ip_addr times)");87 row2(tra("IP address"), "$host->last_ip_addr<br>".tra("(same the last %1 times)", $host->nsame_ip_addr)); 88 88 if ($host->last_ip_addr != $host->external_ip_addr) { 89 row2( "External IP address", $host->external_ip_addr);89 row2(tra("External IP address"), $host->external_ip_addr); 90 90 } 91 91 } else { 92 row2( "IP address", "<a href=show_host_detail.php?hostid=$host->id&ipprivate=1>Show IP address</a>");92 row2(tra("IP address"), "<a href=show_host_detail.php?hostid=$host->id&ipprivate=1>".tra("Show IP address")."</a>"); 93 93 } 94 row2( "Domain name", $host->domain_name);94 row2(tra("Domain name"), $host->domain_name); 95 95 $x = $host->timezone/3600; 96 96 if ($x >= 0) $x="+$x"; 97 row2( "Local Standard Time", "UTC $x hours");98 row2( "Name", $host->domain_name);97 row2(tra("Local Standard Time"), tra("UTC %1 hours", $x)); 98 row2(tra("Name"), $host->domain_name); 99 99 } else { 100 100 $owner = lookup_user_id($host->userid); 101 101 if ($owner && $owner->show_hosts) { 102 row2( "Owner", user_links($owner));102 row2(tra("Owner"), user_links($owner)); 103 103 } else { 104 row2( "Owner", "Anonymous");104 row2(tra("Owner"), tra("Anonymous")); 105 105 $anonymous = true; 106 106 } 107 107 } 108 row2( "Created", time_str($host->create_time));109 row2( "Total credit", format_credit_large($host->total_credit));110 row2( "Average credit", format_credit($host->expavg_credit));108 row2(tra("Created"), time_str($host->create_time)); 109 row2(tra("Total credit"), format_credit_large($host->total_credit)); 110 row2(tra("Average credit"), format_credit($host->expavg_credit)); 111 111 if (!$anonymous) { 112 row2( "Cross project credit", cross_project_links($host));112 row2(tra("Cross project credit"), cross_project_links($host)); 113 113 } 114 row2( "CPU type", "$host->p_vendor <br> $host->p_model");115 row2( "Number of processors", $host->p_ncpus);114 row2(tra("CPU type"), "$host->p_vendor <br> $host->p_model"); 115 row2(tra("Number of processors"), $host->p_ncpus); 116 116 if ($host->serialnum) { 117 row2( "Coprocessors", gpu_desc($host->serialnum));117 row2(tra("Coprocessors"), gpu_desc($host->serialnum)); 118 118 } 119 row2( "Operating System", "$host->os_name <br> $host->os_version");119 row2(tra("Operating System"), "$host->os_name <br> $host->os_version"); 120 120 $v = boinc_version($host->serialnum); 121 121 if ($v) { 122 row2( "BOINC client version", $v);122 row2(tra("BOINC client version"), $v); 123 123 } 124 124 $x = $host->m_nbytes/(1024*1024); 125 125 $y = round($x, 2); 126 row2( "Memory", "$y MB");126 row2(tra("Memory"), tra("%1 MB", $y)); 127 127 $x = $host->m_cache/1024; 128 128 $y = round($x, 2); 129 row2( "Cache", "$y KB");129 row2(tra("Cache"), tra("%1 KB", $y)); 130 130 131 131 if ($user) { 132 132 $x = $host->m_swap/(1024*1024); 133 133 $y = round($x, 2); 134 row2( "Swap space", "$y MB");134 row2(tra("Swap space"), tra("%1 MB", $y)); 135 135 $x = $host->d_total/(1024*1024*1024); 136 136 $y = round($x, 2); 137 row2( "Total disk space", "$y GB");137 row2(tra("Total disk space"), tra("%1 GB", $y)); 138 138 $x = $host->d_free/(1024*1024*1024); 139 139 $y = round($x, 2); 140 row2( "Free Disk Space", "$y GB");140 row2(tra("Free Disk Space"), tra("%1 GB", $y)); 141 141 } 142 142 $x = $host->p_fpops/(1000*1000); 143 143 $y = round($x, 2); 144 row2( "Measured floating point speed", "$y million ops/sec");144 row2(tra("Measured floating point speed"), tra("%1 million ops/sec", $y)); 145 145 $x = $host->p_iops/(1000*1000); 146 146 $y = round($x, 2); 147 row2( "Measured integer speed", "$y million ops/sec");147 row2(tra("Measured integer speed"), tra("%1 million ops/sec", $y)); 148 148 $x = $host->n_bwup/(1024); 149 149 $y = round($x, 2); 150 150 if ($y > 0) { 151 row2( "Average upload rate", "$y KB/sec");151 row2(tra("Average upload rate"), tra("%1 KB/sec", $y)); 152 152 } else { 153 row2( "Average upload rate", "Unknown");153 row2(tra("Average upload rate"), tra("Unknown")); 154 154 } 155 155 $x = $host->n_bwdown/(1024); 156 156 $y = round($x, 2); 157 157 if ($y > 0) { 158 row2( "Average download rate", "$y KB/sec");158 row2(tra("Average download rate"), tra("%1 KB/sec", $y)); 159 159 } else { 160 row2( "Average download rate", "Unknown");160 row2(tra("Average download rate"), tra("Unknown")); 161 161 } 162 162 $x = $host->avg_turnaround/86400; 163 row2( "Average turnaround time", round($x, 2)." days");163 row2(tra("Average turnaround time"), tra("%1 days", round($x, 2))); 164 164 $mrd= $host->max_results_day; 165 row2( "Maximum daily WU quota per CPU", $mrd."/day");165 row2(tra("Maximum daily WU quota per CPU"), tra("%1/day", $mrd)); 166 166 $config = get_config(); 167 167 if (parse_bool($config, "show_results")) { 168 168 $nresults = host_nresults($host); … … 171 171 } else { 172 172 $results = "0"; 173 173 } 174 row2( "Tasks", $results);174 row2(tra("Tasks"), $results); 175 175 } 176 176 177 177 if ($user) { 178 row2( "Number of times client has contacted server", $host->rpc_seqno);179 row2( "Last time contacted server", sched_log_link($host->rpc_time));180 row2( "% of time BOINC client is running", 100*$host->on_frac." %");178 row2(tra("Number of times client has contacted server"), $host->rpc_seqno); 179 row2(tra("Last time contacted server"), sched_log_link($host->rpc_time)); 180 row2(tra("% of time BOINC client is running"), 100*$host->on_frac." %"); 181 181 if ($host->connected_frac > 0) { 182 row2( "While BOINC running, % of time host has an Internet connection", 100*$host->connected_frac." %");182 row2(tra("While BOINC running, % of time host has an Internet connection"), 100*$host->connected_frac." %"); 183 183 } 184 row2( "While BOINC running, % of time work is allowed", 100*$host->active_frac." %");184 row2(tra("While BOINC running, % of time work is allowed"), 100*$host->active_frac." %"); 185 185 if ($host->cpu_efficiency) { 186 row2( "Average CPU efficiency", $host->cpu_efficiency);186 row2(tra("Average CPU efficiency"), $host->cpu_efficiency); 187 187 } 188 188 if ($host->duration_correction_factor) { 189 row2( "Task duration correction factor", $host->duration_correction_factor);189 row2(tra("Task duration correction factor"), $host->duration_correction_factor); 190 190 } 191 row2( "Location", location_form($host));191 row2(tra("Location"), location_form($host)); 192 192 if ($nresults == 0) { 193 $x = " | <a href=host_delete.php?hostid=$host->id".url_tokens($user->authenticator)."> Delete this computer</a> ";193 $x = " | <a href=host_delete.php?hostid=$host->id".url_tokens($user->authenticator).">".tra("Delete this computer")."</a> "; 194 194 } else { 195 195 $x = ""; 196 196 } 197 row2( "Click to", "<a href=host_edit_form.php?hostid=$host->id>Merge this computer</a> $x");197 row2(tra("Click to"), "<a href=host_edit_form.php?hostid=$host->id>".tra("Merge this computer")."</a> $x"); 198 198 //row2("Click to", "<a href=host_update_credit.php?hostid=$host->id>recompute credit</a>"); 199 199 } 200 200 echo "</table>\n"; … … 208 208 shuffle($host_sites); 209 209 start_table(); 210 210 echo "<tr>"; 211 echo "<th> Computer info</th>\n";212 echo "<th> Rank</th>";213 echo "<th> Owner</th>\n";211 echo "<th>".tra("Computer info")."</th>\n"; 212 echo "<th>".tra("Rank")."</th>"; 213 echo "<th>".tra("Owner")."</th>\n"; 214 214 if ($sort_by == 'total_credit') { 215 215 echo " 216 <th><a href=top_hosts.php?sort_by=expavg_credit> Avg. credit</a></th>217 <th> Total credit</th>216 <th><a href=top_hosts.php?sort_by=expavg_credit>".tra("Avg. credit")."</a></th> 217 <th>".tra("Total credit")."</th> 218 218 "; 219 219 } else { 220 220 echo " 221 <th> Recent average credit</th>222 <th><a href=top_hosts.php?sort_by=total_credit> Total credit</a></th>221 <th>".tra("Recent average credit")."</th> 222 <th><a href=top_hosts.php?sort_by=total_credit>".tra("Total credit")."</a></th> 223 223 "; 224 224 } 225 225 echo " 226 <th> BOINC version</th>227 <th> CPU</th>228 <th> GPU</th>229 <th> Operating system</th>226 <th>".tra("BOINC version")."</th> 227 <th>".tra("CPU")."</th> 228 <th>".tra("GPU")."</th> 229 <th>".tra("Operating system")."</th> 230 230 </tr> 231 231 "; 232 232 } … … 278 278 } 279 279 280 280 function cpu_desc($host) { 281 return "$host->p_vendor<br>$host->p_model<br> ($host->p_ncpus processors)\n";281 return "$host->p_vendor<br>$host->p_model<br>".tra("(%1 processors)", $host->p_ncpus)."\n"; 282 282 } 283 283 284 284 // If private is true, we're showing the host to its owner, … … 298 298 } 299 299 } 300 300 echo "<tr class=row$j><td>ID: $host->id 301 <br><a href=show_host_detail.php?hostid=$host->id> Details</a> |302 <a href=results.php?hostid=$host->id> Tasks</a>301 <br><a href=show_host_detail.php?hostid=$host->id>".tra("Details")."</a> | 302 <a href=results.php?hostid=$host->id>".tra("Tasks")."</a> 303 303 "; 304 304 if (!$anonymous) { 305 305 echo " 306 <br><nobr><span class=note> Cross-project stats:</span></nobr><br>".cross_project_links($host);306 <br><nobr><span class=note>".tra("Cross-project stats:")."</span></nobr><br>".cross_project_links($host); 307 307 } 308 308 echo " 309 309 </td> … … 315 315 echo "<td>$i</td>\n"; 316 316 if ($show_owner) { 317 317 if ($anonymous) { 318 echo "<td> Anonymous</td>\n";318 echo "<td>".tra("Anonymous")."</td>\n"; 319 319 } else { 320 320 echo "<td>", user_links($user), "</td>\n"; 321 321 } … … 363 363 echo "</tr>\n"; 364 364 } 365 365 366 // return true if fit's possible that the hosts are actually366 // return true if it's possible that the hosts are actually 367 367 // the same machine 368 368 // 369 369 function ghz($x) { … … 457 457 $r1 = date_str($host1->rpc_time); 458 458 $c2 = date_str($host2->create_time); 459 459 $r2 = date_str($host2->rpc_time); 460 echo "<br> Host $host2->id has overlapping lifetime($c1 - $r1), ($c2 - $r2)";460 echo "<br>".tra("Host %1 has overlapping lifetime:", $host2->id)." ($c1 - $r1), ($c2 - $r2)"; 461 461 } 462 462 return false; 463 463 } 464 464 } 465 465 if (!os_compatible($host1, $host2)) { 466 466 if ($show_detail) { 467 echo "<br> Host $host2->id has incompatible OS:($host1->os_name, $host2->os_name)\n";467 echo "<br>".tra("Host %1 has an incompatible OS:", $host2->id)." ($host1->os_name, $host2->os_name)\n"; 468 468 } 469 469 return false; 470 470 } 471 471 if (!cpus_compatible($host1, $host2)) { 472 472 if ($show_detail) { 473 echo "<br> Host $host2->id: CPU not compatible($host1->p_vendor $host1->p_model, $host2->p_vendor $host2->p_model)\n";473 echo "<br>".tra("Host %1 has an incompatible CPU:", $host2->id)." ($host1->p_vendor $host1->p_model, $host2->p_vendor $host2->p_model)\n"; 474 474 } 475 475 return false; 476 476 } … … 537 537 // 538 538 function merge_hosts($old_host, $new_host) { 539 539 if ($old_host->id == $new_host->id) { 540 return "same host";540 return tra("same host"); 541 541 } 542 542 if (!hosts_compatible($old_host, $new_host, false)) { 543 return "Can't merge host $old_host->id into $new_host->id - they're incompatible";543 return tra("Can't merge host %1 into %2 - they're incompatible", $old_host->id, $new_host->id); 544 544 } 545 545 546 echo "<br> Merging host $old_host->id into host $new_host->id\n";546 echo "<br>".tra("Merging host %1 into host %2", $old_host->id, $new_host->id)."\n"; 547 547 548 548 // decay the average credit of both hosts 549 549 // … … 560 560 $recent_credit = $old_host->expavg_credit + $new_host->expavg_credit; 561 561 $result = $new_host->update("total_credit=$total_credit, expavg_credit=$recent_credit, expavg_time=$now"); 562 562 if (!$result) { 563 return "Couldn't update credit of new computer";563 return tra("Couldn't update credit of new computer"); 564 564 } 565 565 $result = BoincResult::update_aux("hostid=$new_host->id where hostid=$old_host->id"); 566 566 if (!$result) { 567 return "Couldn't update results";567 return tra("Couldn't update results"); 568 568 } 569 569 570 570 $result = $old_host->update("total_credit=0, expavg_credit=0, userid=0, rpc_seqno=$new_host->id"); 571 571 if (!$result) { 572 return "Couldn't retire old computer";572 return tra("Couldn't retire old computer"); 573 573 } 574 echo "<br> Retired old computer $old_host->id\n";574 echo "<br>".tra("Retired old computer %1", $old_host->id)."\n"; 575 575 return 0; 576 576 } 577 577 … … 594 594 echo "<p>"; 595 595 if ($show_all) { 596 596 $url = link_url($sort, $rev, 0); 597 echo "Show: All computers | <a href=$url>Only computers active in past 30 days</a>";597 echo tra("Show:")." ".tra("All computers")." | <a href=$url>".tra("Only computers active in past 30 days")."</a>"; 598 598 } else { 599 599 $url = link_url($sort, $rev, 1); 600 echo "Show: <a href=$url>All computers</a> | Only computers active in past 30 days";600 echo tra("Show:")." <a href=$url>".tra("All computers")."</a> | ".tra("Only computers active in past 30 days"); 601 601 } 602 602 echo "<p>"; 603 603 } … … 606 606 start_table(); 607 607 echo "<tr>"; 608 608 $url = link_url_rev($sort, "id", $rev, $show_all); 609 echo "<th><a href=$url> Computer ID</a></th>\n";609 echo "<th><a href=$url>".tra("Computer ID")."</a></th>\n"; 610 610 if ($private) { 611 611 $url = link_url_rev($sort, "name", $rev, $show_all); 612 echo "<th><a href=$url> Name</a></th>\n";612 echo "<th><a href=$url>".tra("Name")."</a></th>\n"; 613 613 $url = link_url_rev($sort, "venue", $rev, $show_all); 614 echo "<th><a href=$url> Location</th>\n";614 echo "<th><a href=$url>".tra("Location")."</th>\n"; 615 615 } else { 616 echo "<th> Rank</th>";616 echo "<th>".tra("Rank")."</th>"; 617 617 } 618 618 $url = link_url_rev($sort, "expavg_credit", $rev, $show_all); 619 echo "<th><a href=$url> Avg. credit</a></th>\n";619 echo "<th><a href=$url>".tra("Avg. credit")."</a></th>\n"; 620 620 $url = link_url_rev($sort, "total_credit", $rev, $show_all); 621 echo "<th><a href=$url> Total credit</a></th>\n";622 echo "<th> BOINC<br>version</th>\n";621 echo "<th><a href=$url>".tra("Total credit")."</a></th>\n"; 622 echo "<th>".tra("BOINC<br>version")."</th>\n"; 623 623 $url = link_url_rev($sort, "cpu", $rev, $show_all); 624 echo "<th><a href=$url> CPU</a></th>\n";625 echo "<th> GPU</th>\n";624 echo "<th><a href=$url>".tra("CPU")."</a></th>\n"; 625 echo "<th>".tra("GPU")."</th>\n"; 626 626 $url = link_url_rev($sort, "os", $rev, $show_all); 627 echo "<th><a href=$url> Operating System</a></th>\n";627 echo "<th><a href=$url>".tra("Operating System")."</a></th>\n"; 628 628 $url = link_url_rev($sort, "rpc_time", $rev, $show_all); 629 echo "<th><a href=$url> Last contact</a></th>\n";629 echo "<th><a href=$url>".tra("Last contact")."</a></th>\n"; 630 630 } 631 631 632 632 function show_user_hosts($userid, $private, $show_all, $sort, $rev) { … … 675 675 676 676 if ($private) { 677 677 echo " 678 <a href=merge_by_name.php> Merge computers by name</a>678 <a href=merge_by_name.php>".tra("Merge computers by name")."</a> 679 679 "; 680 680 } 681 681 } -
inc/profile.inc
83 83 if ($verify_flag == 0) { 84 84 return " 85 85 <font size='+2' color='#33cc33'> 86 Your profile will be made visible to other people<br> 87 as soon as it has been approved by the project.<br> 88 This may take up to a few days.<br> 86 ".tra("Your profile will be made visible to other people as soon as it has been approved by the project. This may take up to a few days.")." 89 87 </font> 90 88 "; 91 89 } else if ($verify_flag == -1) { 92 90 return " 93 91 <font size='+2' color='#ff3333'> 94 Your profile has been marked as unacceptable.<br> 95 It is not visible to other people. Please change it.<br> 92 ".tra("Your profile has been marked as unacceptable. It is not visible to other people. Please change it.")." 96 93 </font> 97 94 "; 98 95 } … … 167 164 $user = get_user_from_id($profile->userid); 168 165 169 166 if (!$user || !$profile) { 170 e cho "Database error!"; // Change this to a standard error page.167 error_page(tra("Database error")); 171 168 exit(); 172 169 } 173 170 … … 187 184 $min_credit = parse_config(get_config(), "<profile_min_credit>"); 188 185 if (!$logged_in_user && $min_credit && $user->expavg_credit < $min_credit ) { 189 186 error_page( 190 "To prevent spam, profiles of users with an average credit of less than $min_credit are displayed only to logged-in users. We apologize for this inconvenience."187 tra("To prevent spam, profiles of users with an average credit of less than %1 are displayed only to logged-in users. We apologize for this inconvenience.", $min_credit) 191 188 ); 192 189 } 193 190 if (is_banished($user)) { 194 error_page( "User is banished");191 error_page(tra("User is banished")); 195 192 } 196 193 197 194 } … … 205 202 BoincForumPrefs::lookup($user); 206 203 $profile = BoincProfile::lookup("userid = $user->id"); 207 204 if (!$profile) { 208 row1( "No profile exists for that user ID.");205 row1(tra("No profile exists for that user ID.")); 209 206 $user->update("has_profile = 0"); 210 207 return; 211 208 } -
user/view_profile.php
41 41 set_cache_data(serialize($community_links_object), $cache_args); 42 42 } 43 43 44 page_head( "Profile: $user->name");44 page_head(tra("Profile: %1", $user->name)); 45 45 46 46 start_table(); 47 47 echo "<tr><td valign=\"top\">"; -
user/validate_email_addr.php
27 27 $user->update("signature='$x2'"); 28 28 send_email( 29 29 $user, 30 "Validate BOINC email address", 31 "Please visit the following link to validate the email address\n" 32 ."of your ".PROJECT." account:\n" 33 .$master_url."validate_email_addr.php?validate=1&u=$user->id&x=$x2" 30 tra("Validate BOINC email address"), 31 tra("Please visit the following link to validate the email address of your %1 account:", PROJECT) 32 ."\n".$master_url."validate_email_addr.php?validate=1&u=$user->id&x=$x2" 34 33 ); 35 page_head("Validate email sent"); 36 echo " 37 An email has been sent to $user->email_addr. 38 Visit the link it contains to validate your email address. 39 "; 34 page_head(tra("Validate email sent")); 35 echo tra("An email has been sent to %1. Visit the link it contains to validate your email address.", $user->email_addr); 40 36 page_tail(); 41 37 } 42 38 … … 45 41 $u = get_int("u"); 46 42 $user = lookup_user_id($u); 47 43 if (!$user) { 48 error_page( "No such user.\n");44 error_page(tra("No such user.")); 49 45 } 50 46 51 47 $x2 = $user->signature; 52 48 if ($x2 != $x) { 53 error_page( "Error in URL data - can't validate email address");49 error_page(tra("Error in URL data - can't validate email address")); 54 50 } 55 51 56 52 $result = $user->update("email_validated=1"); 57 53 if (!$result) { 58 error_page( "Database update failed - please try again later.");54 error_page(tra("Database update failed - please try again later.")); 59 55 } 60 56 61 page_head("Validate email address"); 62 echo " 63 The email address of your account has been validated. 64 "; 57 page_head(tra("Validate email address")); 58 echo tra("The email address of your account has been validated."); 65 59 page_tail(); 66 60 } 67 61 -
user/userw.php
32 32 function show_user_wap($user) { 33 33 wap_begin(); 34 34 if (!$user) { 35 echo "<br/> User not found!<br/>";35 echo "<br/>".tra("User not found!")."<br/>"; 36 36 wap_end(); 37 37 return; 38 38 } 39 39 40 40 // keep a 'running tab' in wapstr in case exceeds 1K WAP limit 41 41 42 $wapstr = PROJECT . "<br/> Account Data<br/>for $user->name<br/>Time:" . wap_timestamp();42 $wapstr = PROJECT . "<br/>".tra("Account Data<br/>for %1<br/>Time:", $user->name)." " . wap_timestamp(); 43 43 $wapstr .= show_credit_wap($user); 44 44 if ($user->teamid) { 45 45 $team = BoincTeam::lookup_id($user->teamid); 46 $wapstr .= "<br/> Team:$team->name<br/>";47 $wapstr .= "Team TotCred:" . format_credit($team->total_credit) . "<br/>";48 $wapstr .= "Team AvgCred:" . format_credit($team->expavg_credit) . "<br/>";46 $wapstr .= "<br/>".tra("Team:")." $team->name<br/>"; 47 $wapstr .= tra("Team TotCred:")." " . format_credit($team->total_credit) . "<br/>"; 48 $wapstr .= tra("Team AvgCred:")." " . format_credit($team->expavg_credit) . "<br/>"; 49 49 50 50 } else { 51 $wapstr .= "<br/> Team: None<br/>";51 $wapstr .= "<br/>".tra("Team: None")."<br/>"; 52 52 } 53 53 54 54 // don't want to send more than 1KB probably? … … 67 67 start_cache(USER_PAGE_TTL, $cache_args); 68 68 69 69 $user = BoincUser::lookup_id($userid); 70 if (!$user) {71 error_page("No such user");72 }73 70 show_user_wap($user); 74 71 75 72 end_cache(USER_PAGE_TTL, $cache_args);