<legend><?php 
    echo $i18n->getMessage("schedulegenerator_label");
    ?>
</legend>
    
	<?php 
    $formFields = array();
    $seasonDefaultName = date("Y");
    $formFields["league"] = array("type" => "foreign_key", "labelcolumns" => "land,name", "jointable" => "liga", "entity" => "league", "value" => "", "required" => "true");
    $formFields["seasonname"] = array("type" => "text", "value" => $seasonDefaultName, "required" => "true");
    $formFields["rounds"] = array("type" => "number", "value" => 2, "required" => "true");
    $formFields["firstmatchday"] = array("type" => "timestamp", "value" => "");
    $formFields["timebreak"] = array("type" => "number", "value" => 5);
    $formFields["timebreak_rounds"] = array("type" => "number", "value" => 0);
    foreach ($formFields as $fieldId => $fieldInfo) {
        echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo["value"], "schedulegenerator_label_");
    }
    ?>
	</fieldset>
	<div class="form-actions">
		<input type="submit" class="btn btn-primary" accesskey="s" title="Alt + s" value="<?php 
    echo $i18n->getMessage("generator_button");
    ?>
"> 
		<input type="reset" class="btn" value="<?php 
    echo $i18n->getMessage("button_reset");
    ?>
">
	</div>    
  </form>
?>
">
	<input type="hidden" name="round" value="<?php 
echo $roundid;
?>
">
	
	<fieldset>
    <legend><?php 
echo $i18n->getMessage("managecuprounds_groups_label_create");
?>
</legend>
    
	<?php 
foreach ($formFields as $fieldId => $fieldInfo) {
    echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo["value"], "managecuprounds_group_label_");
}
?>
	<div>
	<label><?php 
echo $i18n->getMessage("managecuprounds_groups_label_selectteams");
?>
</label>
	</div>
	
		<div style="width: 600px; height: 300px; overflow: auto; border: 1px solid #cccccc;">
			<table class="table table-striped table-hover">
				<colgroup>
					<col style="width: 30px">
					<col>
					<col>
echo "<input type=\"hidden\" name=\"site\" value=\"{$site}\">";
echo "<input type=\"hidden\" name=\"match\" value=\"{$matchId}\">";
echo "<fieldset><legend>" . $i18n->getMessage("match_manage_createmessage_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\">";
echo "<select name=\"team_id\" id=\"team_id\">";
echo "<option value=\"" . $match["match_home_id"] . "\">" . escapeOutput($match["match_home_name"]) . "</option>";
echo "<option value=\"" . $match["match_guest_id"] . "\">" . escapeOutput($match["match_guest_name"]) . "</option>";
echo "</select>";
echo "</div>";
echo "</div>";
echo FormBuilder::createFormGroup($i18n, "message_id", array("type" => "foreign_key", "jointable" => "spiel_text", "entity" => "matchtext", "labelcolumns" => "aktion,nachricht"), "", "match_manage_reportmsg_");
echo FormBuilder::createFormGroup($i18n, "playernames", array("type" => "text"), "", "match_manage_reportmsg_");
echo FormBuilder::createFormGroup($i18n, "minute", array("type" => "number"), "", "match_manage_reportmsg_");
echo FormBuilder::createFormGroup($i18n, "intermediateresult", array("type" => "text"), "", "match_manage_reportmsg_");
echo "</fieldset>";
echo "<div class=\"form-actions\">";
echo "<button type=\"submit\" class=\"btn btn-primary\">" . $i18n->getMessage("button_save") . "</button>";
echo "</div></form>";
// ******** list items
$reportItems = MatchesDataService::getMatchReportMessages($website, $db, $i18n, $matchId);
// no items
if (!count($reportItems)) {
    echo createInfoMessage("", $i18n->getMessage("match_manage_reportitems_noitems"));
    // list items
} else {
    echo "<table class=\"table table-bordered table-striped table-hover\">";
    echo "<thead>";
    echo "<tr>";
    echo "<th>" . $i18n->getMessage("match_manage_reportmsg_minute") . "</th>";
    <input type="hidden" name="lang" value="<?php 
    echo escapeOutput($selectedLang);
    ?>
">
	<input type="hidden" name="site" value="<?php 
    echo $site;
    ?>
">
	
	<fieldset>
	<?php 
    $formFields = array();
    $terms = (string) $termsConfig[0];
    $formFields["content"] = array("type" => "html", "value" => $terms, "required" => "true");
    foreach ($formFields as $fieldId => $fieldInfo) {
        echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo["value"], "imprint_label_");
    }
    ?>
	</fieldset>
	<div class="form-actions">
		<input type="submit" class="btn btn-primary" accesskey="s" title="Alt + s" value="<?php 
    echo $i18n->getMessage("button_save");
    ?>
"> 
		<input type="reset" class="btn" value="<?php 
    echo $i18n->getMessage("button_reset");
    ?>
">
	</div>    
  </form>
        echo escapeOutput($_REQUEST["page"]);
        ?>
">
	<?php 
    }
    ?>
	<fieldset>
    <legend><?php 
    echo $i18n->getMessage("manage_edit_title");
    ?>
</legend>
	
	<?php 
    foreach ($formFields as $fieldId => $fieldInfo) {
        $fieldValue = $action == "save" && isset($_POST[$fieldId]) ? $_POST[$fieldId] : $row[$fieldId];
        echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldValue, $labelPrefix);
    }
    ?>
	</fieldset>
	<div class="form-actions">
		<input type="submit" class="btn btn-primary" accesskey="s" title="Alt + s" value="<?php 
    echo $i18n->getMessage("button_save");
    ?>
"> 
		<a class="btn" href="?site=<?php 
    echo $site;
    ?>
&entity=<?php 
    echo $entity;
    ?>
"><?php 
Ejemplo n.º 6
0
        $formFields['option_RM'] = array('type' => 'number', 'value' => 1);
        $formFields['option_LS'] = array('type' => 'number', 'value' => 1);
        $formFields['option_MS'] = array('type' => 'number', 'value' => 1);
        $formFields['option_RS'] = array('type' => 'number', 'value' => 1);
        $formFields['player_age'] = array('type' => 'number', 'value' => 25);
        $formFields['player_age_deviation'] = array('type' => 'number', 'value' => 3);
        $formFields['entity_player_vertrag_gehalt'] = array('type' => 'number', 'value' => 10000);
        $formFields['entity_player_vertrag_spiele'] = array('type' => 'number', 'value' => 60);
        $formFields['entity_player_w_staerke'] = array('type' => 'percent', 'value' => 50);
        $formFields['entity_player_w_technik'] = array('type' => 'percent', 'value' => 50);
        $formFields['entity_player_w_kondition'] = array('type' => 'percent', 'value' => 70);
        $formFields['entity_player_w_frische'] = array('type' => 'percent', 'value' => 80);
        $formFields['entity_player_w_zufriedenheit'] = array('type' => 'percent', 'value' => 80);
        $formFields['playersgenerator_label_deviation'] = array('type' => 'percent', 'value' => 10);
        foreach ($formFields as $fieldId => $fieldInfo) {
            echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo['value'], '');
        }
        ?>
	</fieldset>
	<div class='form-actions'>
		<input type='submit' class='btn btn-primary' accesskey='s' title='Alt + s' value='<?php 
        echo $i18n->getMessage('firemanagers_dismiss_button');
        ?>
'> 
		<a class='btn' href='?site=<?php 
        echo $site;
        ?>
'><?php 
        echo $i18n->getMessage('button_cancel');
        ?>
</a>
	<fieldset>
	<legend><?php 
    echo escapeOutput($season['name']);
    ?>
</legend>
    
	<?php 
    $formFields = array();
    $formFields['playerdisableage'] = array('type' => 'number', 'value' => 35, 'required' => 'false');
    $formFields['target_missed_firemanager'] = array('type' => 'boolean', 'value' => 0, 'required' => 'false');
    $formFields['target_missed_popularityreduction'] = array('type' => 'percent', 'value' => 20, 'required' => 'false');
    $formFields['target_missed_penalty'] = array('type' => 'number', 'value' => 0, 'required' => 'false');
    $formFields['target_accomplished_reward'] = array('type' => 'number', 'value' => 0, 'required' => 'false');
    $formFields['youthplayers_age_delete'] = array('type' => 'number', 'value' => 19, 'required' => 'false');
    foreach ($formFields as $fieldId => $fieldInfo) {
        echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo['value'], 'season_complete_label_');
    }
    ?>
	</fieldset>
	<div class='form-actions'>
		<input type='submit' class='btn btn-primary' accesskey='s' title='Alt + s' value='<?php 
    echo $i18n->getMessage('season_complete_submit');
    ?>
'> 
		<input type='reset' class='btn' value='<?php 
    echo $i18n->getMessage('button_reset');
    ?>
'>
	</div>    
  </form>
	<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="get">
					<input type="hidden" name="site" value="<?php 
echo $site;
?>
"> 
					<input type="hidden" name="entity" value="<?php 
echo $entity;
?>
">

					<?php 
foreach ($filterFields as $filterFieldId => $filterFieldInfo) {
    if ($filterFieldInfo["type"] !== "timestamp" && $filterFieldInfo["type"] !== "date") {
        echo FormBuilder::createFormGroup($i18n, $filterFieldId, $filterFieldInfo, $filterFieldInfo["value"], "");
    }
}
?>
					
					<div class="control-group">
						<div class="controls">
							<button type="submit" class="btn btn-primary"><?php 
echo $i18n->getMessage("button_search");
?>
</button>
							<a href="?site=<?php 
echo $site;
?>
&entity=<?php 
echo $entity;
Ejemplo n.º 9
0
    ?>
	</ul>	
	
	<div class='tab-content'>
	
	<?php 
    // tab content
    $firstTab = TRUE;
    foreach ($tabs as $tabId => $settings) {
        echo '<div class=\'tab-pane';
        if ($firstTab) {
            echo ' active';
        }
        echo '\' id=\'' . $tabId . '\'>';
        foreach ($settings as $settingId => $settingInfo) {
            echo FormBuilder::createFormGroup($i18n, $settingId, $settingInfo, $website->getConfig($settingId), 'settings_label_');
        }
        echo '</div>';
        $firstTab = FALSE;
    }
    ?>
	
	 
	</div>	
	
	<div class='form-actions'>
		<input type='submit' class='btn btn-primary' accesskey='s' title='Alt + s' value='<?php 
    echo $i18n->getMessage('button_save');
    ?>
'> 
		<input type='reset' class='btn' value='<?php 
Ejemplo n.º 10
0
">
	
	<fieldset>
    <legend><?php 
    echo escapeOutput($admin['name']);
    ?>
</legend>
    
	<?php 
    $formFields = array();
    $formFields["email"] = array("type" => "email", "value" => $admin['email'], "required" => "true");
    $formFields["newpassword"] = array("type" => "password", "value" => "");
    $formFields["repeatpassword"] = array("type" => "password", "value" => "");
    $formFields["language"] = array("type" => "select", "value" => $admin["lang"], "selection" => $website->getConfig("supported_languages"));
    foreach ($formFields as $fieldId => $fieldInfo) {
        echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo["value"], "profile_label_");
    }
    ?>
	</fieldset>
	<div class="form-actions">
		<input type="submit" class="btn btn-primary" accesskey="s" title="Alt + s" value="<?php 
    echo $i18n->getMessage("button_save");
    ?>
"> 
		<input type="reset" class="btn" value="<?php 
    echo $i18n->getMessage("button_reset");
    ?>
">
	</div>    
  </form>
Ejemplo n.º 11
0
    <input type='hidden' name='show' value='save'>
	<input type='hidden' name='site' value='<?php 
    echo $site;
    ?>
'>
	
	<fieldset>
	<?php 
    $formFields = array();
    $filecontent = '';
    if (file_exists(IMPRINT_FILE)) {
        $filecontent = file_get_contents(IMPRINT_FILE);
    }
    $formFields['content'] = array('type' => 'html', 'value' => $filecontent, 'required' => 'true');
    foreach ($formFields as $fieldId => $fieldInfo) {
        echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo['value'], 'imprint_label_');
    }
    ?>
	</fieldset>
	<div class='form-actions'>
		<input type='submit' class='btn btn-primary' accesskey='s' title='Alt + s' value='<?php 
    echo $i18n->getMessage('button_save');
    ?>
'> 
		<input type='reset' class='btn' value='<?php 
    echo $i18n->getMessage('button_reset');
    ?>
'>
	</div>    
  </form>
echo "</fieldset>";
echo "<div class=\"form-actions\">";
echo "<button type=\"submit\" class=\"btn btn-primary\">" . $i18n->getMessage("button_save") . "</button>";
echo "</div></form>";
// ******** list players and enable editing
echo "<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"post\">";
echo "<input type=\"hidden\" name=\"site\" value=\"{$site}\"/>";
echo "<input type=\"hidden\" name=\"action\" value=\"update\"/>";
echo "<input type=\"hidden\" name=\"match\" value=\"{$matchId}\"/>";
foreach ($teamPrefixes as $teamPrefix) {
    echo "<h2><a href=\"" . $website->getInternalUrl("team", "id=" . $match["match_" . $teamPrefix . "_id"]) . "\" target=\"_blank\">" . escapeOutput($match["match_" . $teamPrefix . "_name"]) . "</a></h2>";
    // tactic
    echo "<div class=\"form-horizontal\">";
    echo FormBuilder::createFormGroup($i18n, $teamPrefix . "_offensive", array("type" => "number", "value" => $match["match_" . $teamPrefix . "_offensive"]), $match["match_" . $teamPrefix . "_offensive"], "formation_");
    echo FormBuilder::createFormGroup($i18n, $teamPrefix . "_longpasses", array("type" => "boolean", "value" => $match["match_" . $teamPrefix . "_longpasses"]), $match["match_" . $teamPrefix . "_longpasses"], "formation_");
    echo FormBuilder::createFormGroup($i18n, $teamPrefix . "_counterattacks", array("type" => "boolean", "value" => $match["match_" . $teamPrefix . "_counterattacks"]), $match["match_" . $teamPrefix . "_counterattacks"], "formation_");
    echo "</div>";
    // get existing players
    $playerTable = $website->getConfig("db_prefix") . "_spiel_berechnung SB";
    $playerTable .= " INNER JOIN " . $website->getConfig("db_prefix") . "_spieler S ON S.id = SB.spieler_id";
    $result = $db->querySelect("SB.*", $playerTable, "spiel_id = %d AND team_id = %d ORDER BY feld ASC, field(SB.position_main, 'T', 'LV', 'IV', 'RV', 'DM', 'LM', 'ZM', 'RM', 'OM', 'LS', 'MS', 'RS')", array($matchId, $match["match_" . $teamPrefix . "_id"]));
    $playersCount = $result->num_rows;
    // no player records
    if (!$playersCount) {
        echo createInfoMessage("", $i18n->getMessage("match_manage_playerstatistics_noitems"));
        // check if any formation is available
        $fresult = $db->querySelect("COUNT(*) AS hits", $website->getConfig("db_prefix") . "_aufstellung", "verein_id = %d", $match["match_" . $teamPrefix . "_id"]);
        $formationCount = $fresult->fetch_array();
        $fresult->free();
        if ($formationCount && $formationCount["hits"]) {
            echo "<p><a href=\"?site={$site}&match={$matchId}&team={$teamPrefix}&action=generate\" class=\"btn\"><i class=\"icon-hand-right\"></i> " . $i18n->getMessage("match_manage_playerstatistics_createfromfrmation") . "</a></p>";
Ejemplo n.º 13
0
function renderRound($roundNode)
{
    global $i18n;
    global $website;
    global $hierarchy;
    global $site;
    global $cupid;
    global $cup;
    global $action;
    global $db;
    echo "<div class=\"cupround\">";
    $showEditForm = FALSE;
    if ($action == "edit" && $_REQUEST["id"] == $roundNode["round"]["id"]) {
        $showEditForm = TRUE;
        // save changes of edit
    } elseif ($action == "edit-save" && $_REQUEST["id"] == $roundNode["round"]["id"]) {
        if (isset($admin["r_demo"]) && $admin["r_demo"]) {
            throw new Exception($i18n->getMessage("validationerror_no_changes_as_demo"));
        }
        $showEditForm = TRUE;
        $columns = array();
        $columns["name"] = $_POST["name"];
        $columns["finalround"] = isset($_POST["finalround"]) && $_POST["finalround"] == "1" ? 1 : 0;
        $columns["groupmatches"] = isset($_POST["groupmatches"]) && $_POST["groupmatches"] == "1" ? 1 : 0;
        $firstDateObj = DateTime::createFromFormat($website->getConfig("date_format") . ", H:i", $_POST["firstround_date_date"] . ", " . $_POST["firstround_date_time"]);
        $columns["firstround_date"] = $firstDateObj->getTimestamp();
        if (isset($_POST["secondround_date_date"])) {
            $secondDateObj = DateTime::createFromFormat($website->getConfig("date_format") . ", H:i", $_POST["secondround_date_date"] . ", " . $_POST["secondround_date_time"]);
            $columns["secondround_date"] = $secondDateObj->getTimestamp();
        }
        $db->queryUpdate($columns, $website->getConfig("db_prefix") . "_cup_round", "id = %d", $roundNode["round"]["id"]);
        // name has changed, so also update already existing matches
        if ($roundNode["round"]["name"] !== $_POST["name"]) {
            $db->queryUpdate(array("pokalrunde" => $_POST["name"]), $website->getConfig("db_prefix") . "_spiel", "pokalname = '%s' AND pokalrunde = '%s'", array($cup["name"], $roundNode["round"]["name"]));
        }
        // update local instance
        $result = $db->querySelect("*", $website->getConfig("db_prefix") . "_cup_round", "id = %d", $roundNode["round"]["id"]);
        $roundNode["round"] = $result->fetch_array();
        $result->free();
        $showEditForm = FALSE;
    }
    // display edit form
    if ($showEditForm) {
        ?>
		
		  <form action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
" method="post" class="form-horizontal">
	    <input type="hidden" name="action" value="edit-save">
		<input type="hidden" name="site" value="<?php 
        echo $site;
        ?>
">
		<input type="hidden" name="cup" value="<?php 
        echo $cupid;
        ?>
">
		<input type="hidden" name="id" value="<?php 
        echo $roundNode["round"]["id"];
        ?>
">
		
		<?php 
        $formFields = array();
        $formFields["name"] = array("type" => "text", "value" => $roundNode["round"]["name"], "required" => "true");
        $formFields["firstround_date"] = array("type" => "timestamp", "value" => $roundNode["round"]["firstround_date"], "required" => "true");
        if ($roundNode["round"]["secondround_date"]) {
            $formFields["secondround_date"] = array("type" => "timestamp", "value" => $roundNode["round"]["secondround_date"], "required" => "false");
        }
        $formFields["finalround"] = array("type" => "boolean", "value" => $roundNode["round"]["finalround"]);
        $formFields["groupmatches"] = array("type" => "boolean", "value" => $roundNode["round"]["groupmatches"]);
        foreach ($formFields as $fieldId => $fieldInfo) {
            echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo["value"], "managecuprounds_label_");
        }
        ?>
		<div class="control-group">
			<div class="controls">
				<input type="submit" class="btn btn-primary" accesskey="s" title="Alt + s" value="<?php 
        echo $i18n->getMessage("button_save");
        ?>
"> 
				<a href="<?php 
        echo "?site=" . $site . "&cup=" . $cupid;
        ?>
" class="btn"><?php 
        echo $i18n->getMessage("button_cancel");
        ?>
</a>
			</div>    
		</div>
	  </form>
		
		<?php 
        // display details
    } else {
        echo "<p><strong>";
        if ($roundNode["round"]["finalround"] == "1") {
            echo "<em>";
        }
        echo escapeOutput($roundNode["round"]["name"]);
        if ($roundNode["round"]["finalround"] == "1") {
            echo "</em>";
        }
        echo "</strong>";
        echo " <a href=\"?site=" . $site . "&cup=" . $cupid . "&action=edit&id=" . $roundNode["round"]["id"] . "\" title=\"" . $i18n->getMessage("manage_edit") . "\"><i class=\"icon-pencil\"></i></a>";
        echo " <a class=\"deleteLink\" href=\"?site=" . $site . "&cup=" . $cupid . "&action=delete&id=" . $roundNode["round"]["id"] . "\" title=\"" . $i18n->getMessage("manage_delete") . "\"><i class=\"icon-trash\"></i></a>";
        echo "</p>";
        echo "<ul>";
        echo "<li><em>" . $i18n->getMessage("managecuprounds_label_firstround_date") . ":</em> " . date($website->getFormattedDatetime($roundNode["round"]["firstround_date"])) . "</li>";
        if ($roundNode["round"]["secondround_date"]) {
            echo "<li><em>" . $i18n->getMessage("managecuprounds_label_secondround_date") . ":</em> " . date($website->getFormattedDatetime($roundNode["round"]["secondround_date"])) . "</li>";
        }
        // show matches link
        $matchesUrl = "?site=manage&entity=match&" . http_build_query(array("entity_match_pokalname" => escapeOutput($cup["name"]), "entity_match_pokalrunde" => escapeOutput($roundNode["round"]["name"])));
        echo "<li><a href=\"{$matchesUrl}\">" . $i18n->getMessage("managecuprounds_show_matches") . "</a></li>";
        echo "</ul>";
        // add matches links
        $addMatchUrl = "?site=manage&entity=match&show=add&" . http_build_query(array("pokalname" => escapeOutput($cup["name"]), "pokalrunde" => escapeOutput($roundNode["round"]["name"]), "spieltyp" => "Pokalspiel"));
        if (!$roundNode["round"]["groupmatches"]) {
            echo "<p><a href=\"{$addMatchUrl}\" class=\"btn btn-mini\"><i class=\"icon-plus-sign\"></i> " . $i18n->getMessage("managecuprounds_add_match") . "</a>";
            echo " <a href=\"?site=managecuprounds-generate&round=" . $roundNode["round"]["id"] . "\" class=\"btn btn-mini\"><i class=\"icon-random\"></i> " . $i18n->getMessage("managecuprounds_generate_matches") . "</a>";
            echo "</p>";
        } else {
            echo "<p><a href=\"?site=managecuprounds-groups&round=" . $roundNode["round"]["id"] . "\" class=\"btn btn-mini\"><i class=\"icon-list\"></i> " . $i18n->getMessage("managecuprounds_manage_groups") . "</a>";
            echo "</p>";
        }
        if (isset($roundNode["winnerround"])) {
            echo "<p><em>" . $i18n->getMessage("managecuprounds_next_round_winners") . ":</em></p>\n";
            renderRound($hierarchy[$roundNode["winnerround"]]);
        }
        if (isset($roundNode["looserround"])) {
            echo "<p><em>" . $i18n->getMessage("managecuprounds_next_round_loosers") . ":</em></p>\n";
            renderRound($hierarchy[$roundNode["looserround"]]);
        }
    }
    echo "</div>";
}
        $columns["M.gast_w" . $subNo . "_condition"] = "guest_sub_" . $subNo . "_condition";
    }
    $result = $db->querySelect($columns, $fromTable, "M.id = %d", $matchId);
    $matchinfo = $result->fetch_array();
    $result->free();
    // init default simulation strategry in order to include dependend constants. Yeah, refactor this once having to much time...
    $dummyVar = new DefaultSimulationStrategy($website);
    $matchModel = SimulationStateHelper::loadMatchState($website, $db, $matchinfo);
    // compute audience
    if ($website->getRequestParameter("computetickets")) {
        SimulationAudienceCalculator::computeAndSaveAudience($website, $db, $matchModel);
    }
    if ($matchinfo["type"] == "Pokalspiel") {
        SimulationCupMatchHelper::checkIfExtensionIsRequired($website, $db, $matchModel);
    }
    // complete match
    $observer = new DataUpdateSimulatorObserver($website, $db);
    $observer->onMatchCompleted($matchModel);
    // show success message
    echo createSuccessMessage($i18n->getMessage("match_manage_complete_success"), "");
}
echo "<h3><a href=\"" . $website->getInternalUrl("team", "id=" . $match["match_home_id"]) . "\" target=\"_blank\">" . escapeOutput($match["match_home_name"]) . "</a> - <a href=\"" . $website->getInternalUrl("team", "id=" . $match["match_guest_id"]) . "\" target=\"_blank\">" . escapeOutput($match["match_guest_name"]) . "</a></h3>";
echo "<div class=\"well\">" . $i18n->getMessage("match_manage_complete_intro") . "</div>";
echo "<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"post\" class=\"form-horizontal\">";
echo "<input type=\"hidden\" name=\"site\" value=\"{$site}\"/>";
echo "<input type=\"hidden\" name=\"action\" value=\"complete\"/>";
echo "<input type=\"hidden\" name=\"match\" value=\"{$matchId}\"/>";
echo FormBuilder::createFormGroup($i18n, "computetickets", array("type" => "boolean", "value" => "1"), "1", "match_manage_complete_");
echo "<div class=\"form-actions\">";
echo "<button type=\"submit\" class=\"btn btn-primary\">" . $i18n->getMessage("match_manage_complete_button") . "</button>";
echo "</div></form>";