/** * @see AbstractJob::execute() */ function execute() { MatchSimulationExecutor::simulateOpenMatches($this->_websoccer, $this->_db); }
} $formation["match_id"] = $matchId; $formation["type"] = $match["match_type"]; // update tactical parameters in match table $columnsPrefix = $teamPrefix == "guest" ? "gast" : "home"; $matchColumns = array($columnsPrefix . "_offensive" => $formation["offensive"], $columnsPrefix . "_longpasses" => $formation["longpasses"], $columnsPrefix . "_counterattacks" => $formation["counterattacks"]); // update substitutions for ($subNo = 1; $subNo <= 3; $subNo++) { $matchColumns[$columnsPrefix . "_w" . $subNo . "_raus"] = $formation[$teamPrefix . "_sub" . $subNo . "_out"]; $matchColumns[$columnsPrefix . "_w" . $subNo . "_rein"] = $formation[$teamPrefix . "_sub" . $subNo . "_in"]; $matchColumns[$columnsPrefix . "_w" . $subNo . "_minute"] = $formation[$teamPrefix . "_sub" . $subNo . "_minute"]; $matchColumns[$columnsPrefix . "_w" . $subNo . "_condition"] = $formation[$teamPrefix . "_sub" . $subNo . "_condition"]; } $db->queryUpdate($matchColumns, $website->getConfig("db_prefix") . "_spiel", "id = %d", array($matchId)); // create player records MatchSimulationExecutor::addPlayers($website, $db, $team, $formation, $teamPrefix); } $match = MatchesDataService::getMatchById($website, $db, $matchId, FALSE, FALSE); if (!count($match)) { throw new Exception("illegal match id"); } $positions = array('T', 'LV', 'IV', 'RV', 'LM', 'DM', 'ZM', 'OM', 'RM', 'LS', 'MS', 'RS'); // ******** form for adding players echo "<form action=\"" . $_SERVER['PHP_SELF'] . "\" class=\"form-horizontal\" method=\"post\">"; echo "<input type=\"hidden\" name=\"action\" value=\"create\">"; echo "<input type=\"hidden\" name=\"site\" value=\"{$site}\">"; echo "<input type=\"hidden\" name=\"match\" value=\"{$matchId}\">"; echo "<fieldset><legend>" . $i18n->getMessage("match_manage_createplayer_title") . "</legend>"; echo "<div class=\"control-group\">"; echo "<label class=\"control-label\" for=\"team_id\">" . $i18n->getMessage("entity_player_verein_id") . "</label>"; echo "<div class=\"controls\">";