Ticket #421: profile_patch.patch
File profile_patch.patch, 6.2 KB (added by , 17 years ago) |
---|
-
profile.inc
41 41 // 42 42 function show_combo_box($name, $filename, $selection=null) { 43 43 if (!file_exists($filename)) { 44 echo "ERROR: $filename does not exist! 44 echo "ERROR: $filename does not exist! Cannot create combo box.<br>"; 45 45 exit(); 46 46 } 47 47 echo "<select name=\"$name\">\n"; … … 114 114 rowify("<br>"); 115 115 show_textarea("response1", stripslashes($profile->response1)); 116 116 rowify("<br>"); 117 row1( 118 rowify( 117 row1(show_profile_heading2()); 118 rowify(show_profile_question2().html_info()); 119 119 rowify("<br>"); 120 120 show_textarea("response2", stripslashes($profile->response2)); 121 121 rowify("<br>"); … … 124 124 } 125 125 126 126 function show_textarea($name, $text) { 127 rowify("<textarea name=\"$name\" cols= 80 rows=20>" . $text . "</textarea>");127 rowify("<textarea name=\"$name\" cols=\"80\" rows=\"20\">" . $text . "</textarea>"); 128 128 } 129 129 130 130 // When passed profile->verification, this function is used to tell the … … 133 133 function offensive_profile_warning($verify_flag) { 134 134 if ($verify_flag == 0) { 135 135 return " 136 <font size= '+2' color='33cc33'>136 <font size=\"+2\" color=\"33cc33\"> 137 137 Your profile will be made visible to other people<br> 138 138 as soon as it has been approved by the project.<br> 139 139 This may take up to a few days.<br> … … 141 141 "; 142 142 } else if ($verify_flag == -1) { 143 143 return " 144 <font size= '+2' color='ff3333'>144 <font size=\"+2\" color=\"ff3333\"> 145 145 Your profile has been marked as unacceptable.<br> 146 146 It is not visible to other people. Please change it.<br> 147 147 </font> … … 160 160 161 161 if ($profile->has_picture) { 162 162 echo " 163 <tr><td colspan= 2>164 <table border= 0 cellpadding=5163 <tr><td colspan=\"2\"> 164 <table border=\"0\" cellpadding=\"5\"> 165 165 <tr> 166 <td valign= top><a href=\"" . IMAGE_URL . $profile->userid . '.jpg' . "\"><img src=\"" . IMAGE_URL . $profile->userid . '_sm.jpg' . "\"></a>166 <td valign=\"top\"><a href=\"" . IMAGE_URL . $profile->userid . '.jpg' . "\"><img src=\"" . IMAGE_URL . $profile->userid . '_sm.jpg' . "\"></a> 167 167 </td> 168 <td valign= top> $warning Your profile picture is shown at left.168 <td valign=\"top\"> $warning Your profile picture is shown at left. 169 169 <p> 170 To replace it, 171 click the \"Browse\" button and select a JPEG or PNG file (50KB or less). 172 <input name=picture type=file><br> 170 To replace it, click the \"Browse\" button and select a JPEG or PNG file (50KB or less). 171 <input name=\"picture\" type=\"file\"><br> 173 172 <p> 174 173 To remove it from your profile, check this box: 175 <input type= checkbox name=delete_pic>174 <input type=\"checkbox\" name=\"delete_pic\"> 176 175 <p> 177 176 </td></tr>"; 178 177 rowify("<br>"); … … 184 183 click the \"Browse\" button and select a JPEG or PNG file. 185 184 Please select images of 50KB or less. 186 185 <p> 187 <input name= picture type=file>186 <input name=\"picture\" type=\"file\"> 188 187 "); 189 188 rowify("<br>"); 190 189 } … … 207 206 208 207 function show_submit() { 209 208 row1("Submit profile"); 210 rowify("<p><input type= submit value=OK name=submit>");209 rowify("<p><input type=\"submit\" value=\"OK\" name=\"submit\">"); 211 210 } 212 211 213 212 // If the user with id = $userid has uploaded a picture his/herself, … … 400 399 echo " 401 400 <h2>Congratulations!</h2><p> 402 401 Your profile was successfully entered into our database.<br><br> 403 <a href= view_profile.php?userid=$user->id>View your profile</a><br>402 <a href=\"view_profile.php?userid=$user->id\">View your profile</a><br> 404 403 "; 405 404 406 405 page_tail(); … … 415 414 // $descriptor is an optional file descriptor to write the table to. 416 415 417 416 function show_user_table($members, $offset, $numToDisplay, $cols) { 418 echo "<table class= bordered border=1 cellpadding=5>\n";417 echo "<table class=\"bordered\" border=\"1\" cellpadding=\"5\">\n"; 419 418 420 419 $rows = ceil($numToDisplay / $cols); 421 420 $count = $offset; … … 436 435 continue; 437 436 } 438 437 439 echo "<td class=bordered width= 7% height=64><center>";438 echo "<td class=bordered width=\"7%\" height=\"64\"><center>"; 440 439 441 440 $show_picture = $profile->has_picture; 442 441 if (profile_screening() && $profile->verification != 1) { … … 448 447 echo " "; 449 448 } 450 449 451 echo "</center></td><td class= bordered width=33% height=64>\n", get_profile_summary($profile), "</td>";450 echo "</center></td><td class=\"bordered\" width=\"33%\" height=\"64\">\n", get_profile_summary($profile), "</td>"; 452 451 $count++; 453 452 } else { 454 echo "<td width= 7% height=64></td><td width=33% height=64></td>";453 echo "<td width=\"7%\" height=\"64\"></td><td width=\"33%\" height=\"64\"></td>"; 455 454 } 456 455 } 457 456 echo "</tr>\n"; … … 515 514 start_table(); 516 515 517 516 if ($can_edit) { 518 row1("<a href= create_profile.php>Edit your profile</a>");517 row1("<a href=\"create_profile.php\">Edit your profile</a>"); 519 518 } 520 519 521 522 520 // If doing screening, only show picture in certain situations 523 521 // 524 522 $show_picture = $profile->has_picture; … … 562 560 row1("Your feedback on this profile"); 563 561 row2( 564 562 "Recommend this profile for User of the Day:", 565 "I <a href= profile_rate.php?userid=$userid&vote=recommend>like</a> this profile"563 "I <a href=\"profile_rate.php?userid=$userid&vote=recommend\">like</a> this profile" 566 564 ); 567 565 row2( 568 566 "Alert administrators to an offensive profile:", 569 "I <a href= profile_rate.php?userid=$userid&vote=reject>don't like</a> this profile"567 "I <a href=\"profile_rate.php?userid=$userid&vote=reject\">don't like</a> this profile" 570 568 ); 571 569 } 572 570 … … 578 576 } 579 577 if (isset($caching) && $caching) end_cache(USER_PROFILE_TTL,$cache_args); 580 578 } 581 ?> 579 ?> 580 No newline at end of file