mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-26 17:27:58 +02:00
Changement confinement
This commit is contained in:
@ -78,12 +78,24 @@ class MyTeam
|
||||
|
||||
public function updateTeam()
|
||||
{
|
||||
global $URL_BASE;
|
||||
global $URL_BASE, $DB;
|
||||
|
||||
$this->team->setName($this->name);
|
||||
$this->team->setTrigram($this->trigram);
|
||||
$this->team->setTournamentId($this->tournament_id);
|
||||
|
||||
$DB->prepare("UPDATE `documents` SET `tournament` = ? WHERE `team` = ?;")->execute([$this->tournament_id, $this->team->getId()]);
|
||||
$DB->prepare("UPDATE `solutions` SET `tournament` = ? WHERE `team` = ?;")->execute([$this->tournament_id, $this->team->getId()]);
|
||||
$DB->prepare("UPDATE `syntheses` SET `tournament` = ? WHERE `team` = ?;")->execute([$this->tournament_id, $this->team->getId()]);
|
||||
foreach ($this->team->getParticipants() as $user) {
|
||||
if ($user != null)
|
||||
$DB->prepare("UPDATE `payments` SET `tournament` = ? WHERE `user` = ?;")->execute([$this->tournament_id, $user]);
|
||||
}
|
||||
foreach ($this->team->getEncadrants() as $user) {
|
||||
if ($user != null)
|
||||
$DB->prepare("UPDATE `payments` SET `tournament` = ? WHERE `user` = ?;")->execute([$this->tournament_id, $user]);
|
||||
}
|
||||
|
||||
$_SESSION["tournament"] = $this->tournament;
|
||||
|
||||
header("Location: $URL_BASE/mon-equipe");
|
||||
|
Reference in New Issue
Block a user