Notify user if there is nobody to transfer to

svn path=/trunk/boinc/; revision=11711
This commit is contained in:
Rytis Slatkevičius 2006-12-20 18:49:54 +00:00
parent f81ca0036f
commit 3f791bf1a7
1 changed files with 19 additions and 10 deletions

View File

@ -50,21 +50,30 @@ while ($user = mysql_fetch_object($result)) {
if($user->id!=$team->userid) { //don't show current founder if($user->id!=$team->userid) { //don't show current founder
$user_total_credit = format_credit($user->total_credit); $user_total_credit = format_credit($user->total_credit);
$user_expavg_credit = format_credit($user->expavg_credit); $user_expavg_credit = format_credit($user->expavg_credit);
echo " echo '
<tr> <tr>
<td align=center><input type=radio name=change_$navailable_users value=$user->id> <td align="center"><input type="radio" name="change_'.$navailable_users.'" value="'.$user->id.'">
<td>$user->name</td> <td>'.$user->name.'</td>
<td>$user_total_credit</td> <td>'.$user_total_credit.'</td>
<td>$user_expavg_credit</td> <td>'.$user_expavg_credit.'</td>
"; </tr>
';
$navailable_users++; $navailable_users++;
} }
} }
echo "<input type=hidden name=navailable_users value=$navailable_users>"; if ($navailable_users > 0) {
mysql_free_result($result); echo "<input type=hidden name=navailable_users value=$navailable_users>";
end_table(); end_table();
echo "<input type=submit value=\"Change founder\">"; echo "<input type=submit value=\"Change founder\">";
} else {
echo '<tr>
<td colspan="4">There are no users to transfer team to.</td>
</tr>
';
end_table();
}
echo "</form>"; echo "</form>";
mysql_free_result($result);
page_tail(); page_tail();
?> ?>