diff --git a/html/user/team_founder_transfer_action.php b/html/user/team_founder_transfer_action.php index 25fd3d58fa..ccff932eac 100644 --- a/html/user/team_founder_transfer_action.php +++ b/html/user/team_founder_transfer_action.php @@ -1,5 +1,7 @@ ping_user == 0) && ($team->ping_time < $now - 60 * 86400)) || - ($team->ping_time < $now - 90 * 86400)) { - - mysql_query("UPDATE team SET ping_user=".$user->id.", ping_time=".$now." WHERE id=".$team->id); - send_founder_transfer_email($team, $user); - - echo "

An email with your request to transfer the team to you has been - sent to the team founder.

-

If the team founder does not react within two months you will be - given an option to become the founder yourself.

- "; - + ($team->ping_time < $now - 90 * 86400)) { + + mysql_query("UPDATE team SET ping_user=".$user->id.", ping_time=".$now." WHERE id=".$team->id); + send_founder_transfer_email($team, $user); + + echo "

An email with your request to transfer the team to you has been + sent to the team founder.

+

If the team founder does not react within two months you will be + given an option to become the founder yourself.

+ "; } else { - if ($team->ping_user) { - if ($user->id == $team->ping_user) { - if ($team->ping_time > $now - 60 * 86400) { - echo "

You have already requested to change the founder - position of $team->name.

-

Team founder has been notified about your request. - If he/she does not respond until ".date_str($team->ping_time+60*86400)." - you will be given an option to take over the team founder - position.

"; - } else { - mysql_query("UPDATE team SET userid=".$user->id." WHERE id=".$team->id); - echo "

Congratulations, you are now the new founder of team ".$team->name." - Go to Your Account page - to find the Team Management options.

"; - } - } else { - $ping_user = lookup_user_id($team->ping_user); - echo "

Founder change has already been initiated by ". - user_links($ping_user)." on ".date_str($team->ping_time)."

"; - } - } else { - echo "

Founder change has already been initiated in the last three - months and is currently disabled.

"; - } + if ($team->ping_user) { + if ($user->id == $team->ping_user) { + if ($team->ping_time > $now - 60 * 86400) { + echo "

You have already requested to change the founder + position of $team->name.

+

Team founder has been notified about your request. + If he/she does not respond until ".time_str($team->ping_time + 60 * 86400)." + you will be given an option to take over the team founder + position.

"; + } else { + mysql_query("UPDATE team SET userid=".$user->id." WHERE id=".$team->id); + echo "

Congratulations, you are now the new founder of team ".$team->name." + Go to Your Account page + to find the Team Management options.

"; + } + } else { + $ping_user = lookup_user_id($team->ping_user); + echo "

Founder change has already been initiated by ". + user_links($ping_user)." on ".time_str($team->ping_time)."

"; + } + } else { + echo "

Founder change has already been initiated in the last three + months and is currently disabled.

"; + } } } else if ($action == "decline") { $teamid = post_int("teamid"); @@ -63,15 +64,15 @@ if ($action == "transfer") { page_head("Decline founder change request"); if ($team->ping_user) { - $ping_user = lookup_user_id($team->ping_user); - - mysql_query("UPDATE team SET ping_user=0 WHERE id=".$team->id); - send_founder_transfer_decline_email($team, $ping_user); - echo "

Team founder change from team member ".user_links($ping_user) - ." has been declined.

- "; + $ping_user = lookup_user_id($team->ping_user); + + mysql_query("UPDATE team SET ping_user=0 WHERE id=".$team->id); + send_founder_transfer_decline_email($team, $ping_user); + echo "

Team founder change from team member ".user_links($ping_user) + ." has been declined.

+ "; } else { - echo "

There were no founder change requests at this time.

"; + echo "

There were no founder change requests at this time.

"; } }