diff --git a/admin/judges_teams.php b/admin/judges_teams.php index 654d1a76..ab902506 100644 --- a/admin/judges_teams.php +++ b/admin/judges_teams.php @@ -43,6 +43,12 @@ function delbuttonclicked(team_id,team_num,judge) document.forms.judges.submit(); } +function saveteamnamesbuttonclicked() +{ + document.forms.judges.action.value="saveteamnames"; + document.forms.judges.submit(); +} + @@ -93,6 +99,19 @@ function delbuttonclicked(team_id,team_num,judge) + } + + if($_POST['action']=="saveteamnames") + { + if(count($_POST['teamname'])) + { + foreach($_POST['teamname'] AS $team_id=>$team_name) + { + mysql_query("UPDATE judges_teams SET name='".mysql_escape_string(stripslashes($team_name))."' WHERE id='$team_id'"); + } + echo happy(i18n("Team names successfully saved")); + } + } echo "