Ticket #708: util.inc.patch
File util.inc.patch, 6.4 KB (added by , 16 years ago) |
---|
-
util.inc
77 77 function show_login($user) { 78 78 if ($user) { 79 79 echo "Logged in as %s.\n", $user->name; 80 echo "<br><a href= login_form.php>Log in as someone else.</a>\n";80 echo "<br><a href=\"login_form.php\">Log in as someone else.</a>\n"; 81 81 } else { 82 echo "Not logged in ";82 echo "Not logged in."; 83 83 } 84 84 } 85 85 … … 120 120 </head> 121 121 "; 122 122 if ($java_onload){ 123 echo "<body bgcolor=\"#ffffff\"onload=\"".$java_onload."\">";123 echo "<body onload=\"".$java_onload."\">"; 124 124 } else { 125 echo "<body bgcolor=\"#ffffff\">";125 echo "<body>"; 126 126 } 127 127 display_cvs_versions(); 128 128 project_banner($title, $prefix); … … 158 158 echo "A database error occurred while handling your request. 159 159 <br>Please try again later. 160 160 <br>If the error persists, please submit a 161 <a href= bug_report_form.php>problem report</a>.161 <a href=\"bug_report_form.php\">problem report</a>. 162 162 "; 163 163 page_tail(); 164 164 } … … 282 282 } 283 283 284 284 function row3($x, $y, $z) { 285 echo "<tr><td width= 30% valign=top align=right>$x</td><td>$y</td><td>$z</td></tr>\n";285 echo "<tr><td width=\"30%\" valign=\"top\" align=\"right\">$x</td><td>$y</td><td>$z</td></tr>\n"; 286 286 } 287 287 288 288 function row4($xx, $xy, $yx, $yy) { 289 echo "<tr><td width= 25% valign=top>$xx</td><td width=25%>$xy</td>"290 . "<td width= 25% >$yx</td><td width=%25>$yy</td></tr>289 echo "<tr><td width=\"25%\" valign=\"top\">$xx</td><td width=\"25%\">$xy</td>" 290 . "<td width=\"25%\">$yx</td><td width=\"%25\">$yy</td></tr> 291 291 "; 292 292 } 293 293 … … 306 306 function row_heading_array($x) { 307 307 echo "<tr>"; 308 308 foreach ($x as $h) { 309 echo "<th class= heading>$h</th>";309 echo "<th class=\"heading\">$h</th>"; 310 310 } 311 311 echo "</tr>\n"; 312 312 } … … 349 349 function check_tokens($auth) { 350 350 if (valid_tokens($auth)) return; 351 351 error_page( 352 "Link has timed out. 352 "Link has timed out. Please click Back, refresh the page, 353 353 and try again." 354 354 ); 355 355 } 356 356 357 357 function print_login_form_aux($next_url, $user) { 358 358 echo " 359 <form name= f method=post action=login_action.php>360 <input type= hidden name=next_url value='$next_url'>359 <form name=\"f\" method=\"post\" action=\"login_action.php\"> 360 <input type=\"hidden\" name=\"next_url\" value=\"$next_url\"> 361 361 "; 362 362 start_table(); 363 363 row2("Email address:", '<input name="email_addr" size="40" tabindex="1">'); 364 row2("Password:<br><font size= -2><a href=get_passwd.php>Forgot password?</a>",364 row2("Password:<br><font size=\"-2\"><a href=\"get_passwd.php\">Forgot password?</a>", 365 365 '<input type="password" name="passwd" size="40" tabindex="2">' 366 366 ); 367 367 row2("Stay logged in on this computer", 368 "<input type=checkbox name=stay_logged_in checked>"368 '<input type="checkbox" name="stay_logged_in" checked>' 369 369 ); 370 370 $x = urlencode($next_url); 371 371 row2("", 372 "<input type= submit name=mode value=\"Log in\" tabindex=\"3\"><br><br>or <a href=create_account_form.php?next_url=$x>create an account</a>"372 "<input type=\"submit\" name=\"mode\" value=\"Log in\" tabindex=\"3\"><br><br>or <a href=\"create_account_form.php?next_url=$x\">create an account</a>/." 373 373 ); 374 374 if ($user) { 375 375 row1("Log out"); 376 376 row2("You are logged in as $user->name", 377 "<a href= logout.php?".url_tokens($user->authenticator).">Log out</a>"377 "<a href=\"logout.php?".url_tokens($user->authenticator)."\">Log out</a>" 378 378 ); 379 379 } 380 380 end_table(); … … 449 449 if (is_banished($user)) { 450 450 return ""; 451 451 } 452 $x = "<table height= 100 width=150 border=0 cellpadding=4><tr><td bgcolor=#e8e8e8>";452 $x = "<table height=\"100\" width=\"150\" border=\"0\" cellpadding=\"4\"><tr><td class=\"friend\">"; 453 453 if ($user->has_profile) { 454 454 $profile = BoincProfile::lookup_fields("has_picture", "userid=$user->id"); 455 455 if ($profile && $profile->has_picture) { … … 457 457 } else { 458 458 $img_url = URL_BASE."img/head_20.png"; 459 459 } 460 $x .= ' <a href="'.URL_BASE.'view_profile.php?userid='.$user->id.'"><img title="View the profile of '.$user->name.'" border="0" align=topsrc="'.$img_url.'" alt="Profile"></a><br>';460 $x .= ' <a href="'.URL_BASE.'view_profile.php?userid='.$user->id.'"><img class="userimg" title="View the profile of '.$user->name.'" align="top" src="'.$img_url.'" alt="Profile"></a><br>'; 461 461 } 462 462 $x .= " <a href=\"".URL_BASE."show_user.php?userid=".$user->id."\">".$user->name."</a>"; 463 463 if ($user->donated == 1) { … … 476 476 $x = ""; 477 477 if ($user->has_profile) { 478 478 $img_url = URL_BASE."img/head_20.png"; 479 $x .= ' <a href="'.URL_BASE.'view_profile.php?userid='.$user->id.'"><img title="View the profile of '.$user->name.'" border="0" align=topsrc="'.$img_url.'" alt="Profile"></a>';479 $x .= ' <a href="'.URL_BASE.'view_profile.php?userid='.$user->id.'"><img class="userimg" title="View the profile of '.$user->name.'" align="top" src="'.$img_url.'" alt="Profile"></a>'; 480 480 } 481 481 $x .= " <a href=\"".URL_BASE."show_user.php?userid=".$user->id."\">".$user->name."</a>"; 482 482 if ($user->donated == 1) { … … 488 488 489 489 function host_link($hostid) { 490 490 if ($hostid) { 491 return "<a href= show_host_detail.php?hostid=$hostid>$hostid</a>";491 return "<a href=\"show_host_detail.php?hostid=$hostid\">$hostid</a>"; 492 492 } else { 493 493 return "---"; 494 494 } … … 668 668 $desc_esc = addslashes($desc); 669 669 echo " 670 670 <script> 671 document.write('<input onClick=\"document.location.href=\'$url\'\" class= btn type=buttonvalue=\"$text_esc\" title=\"$desc_esc\">')671 document.write('<input onClick=\"document.location.href=\'$url\'\" class=\"btn\" type=\"button\" value=\"$text_esc\" title=\"$desc_esc\">') 672 672 </script> 673 673 <noscript> 674 <a href= $url title=$desc>$text</a>674 <a href=\"$url\" title=\"$desc\">$text</a> 675 675 </noscript> 676 676 "; 677 677 } … … 681 681 if ($height) { 682 682 $h = "height=\"$height\""; 683 683 } 684 echo "<img border= 0title=\"$title\" alt=\"$alt\" src=\"$src\" $h>";684 echo "<img border=\"0\" title=\"$title\" alt=\"$alt\" src=\"$src\" $h>"; 685 685 } 686 686 687 687 function check_web_stopped() {