<?php
	if ($auth->userdata["acclevel"] < 80) die ("Access denied!");

	$edlist = new EditList("teamId", "hlstats_Teams", "team");
	$edlist->columns[] = new EditListColumn("game", "Game", 0, true, "hidden", $gamecode);
	$edlist->columns[] = new EditListColumn("code", "Team Code", 20, true, "text", "", 32);
	$edlist->columns[] = new EditListColumn("name", "Team Name", 20, true, "text", "", 64);
	$edlist->columns[] = new EditListColumn("hidden", "<center>Hide Team</center>", 0, false, "checkbox");
	
	
	if ($HTTP_POST_VARS)
	{
		if ($edlist->update())
			message("success", "Operation successful.");
		else
			message("warning", $edlist->error());
	}
?>

You can specify descriptive names for each game's team codes.<p>

<?php $result = $db->query("
		SELECT
			teamId,
			code,
			name,
			hidden
		FROM
			hlstats_Teams
		WHERE
			game='$gamecode'
		ORDER BY
			code ASC
	");
	
	$edlist->draw($result);
?>

<table width="75%" border=0 cellspacing=0 cellpadding=0>
<tr>
	<td align="center"><input type="submit" value="  Apply  " class="submit"></td>
</tr>
</table>

