<script type="text/javascript" src="{$htmlBase}/frontend/wui/js/ManageMaps.js"></script>
<form name="map_create" id="map_create" method="POST" action="javascript:submitFrontendForm('{$htmlBase}/server/core/ajax_handler.php?mod=Map&amp;act=doAdd', 'map_create');" onsubmit="return check_create_map();">
	<table name="mytable" class="mytable" id="table_map_create">
		<tr>
			<th class="cat" colspan="2"><h2>{$langCreateMap}</h2></th>
		</tr>
		<tr>
			<td class="tdlabel">{$langMapName}</td><td class="tdfield"><input type="text" name="map" /></td>
		</tr>
		<tr>
			<td class="tdlabel">{$langMapIconset}</td><td class="tdfield">
				<select name="map_iconset">
					{foreach $availableIconsets name}<option value="{$name}">{$name}</option>{/foreach}
				</select>
			</td>
		</tr>
		<script>document.map_create.map_iconset.value="std_medium";</script>
		<tr>
			<td class="tdlabel">{$langBackground}</td><td class="tdfield">
				<select name="map_image">
					<option value="" selected></option>
					{foreach $availableBackgrounds name}<option value="{$name}">{$name}</option>{/foreach}
				</select>
			</td>
		</tr>
		<tr>
			<td class="tdlabel" colspan="2" align="center">
				<input class="submit" type="submit" name="submit" value="{$langCreate}" />
			</td>
		</tr>
	</table>
</form>

<form name="map_rename" id="map_rename" method="POST" action="javascript:submitFrontendForm('{$htmlBase}/server/core/ajax_handler.php?mod=Map&amp;act=doRename', 'map_rename');" onsubmit="return check_map_rename();">
	<input type="hidden" name="map_current" value="" />
	<script>document.map_rename.map_current.value = mapname;</script>
	<table name="mytable" class="mytable" id="table_map_rename">
		<tr>
			<th class="cat" colspan="2"><h2>{$langRenameMap}</h2></th>
		</tr>
		<tr>
			<td class="tdlabel">{$langChooseMap}</td><td class="tdfield">
				<select name="map">
					<option value="" selected></option>
					{foreach $availableMaps name}<option value="{$name}">{$name}</option>{/foreach}
				</select>
			</td>
		</tr>
		<tr>
			<td class="tdlabel">{$langNewMapName}</td><td class="tdfield"><input type="text" name="map_new_name" /></td>
		</tr>
		<tr>
			<td class="tdlabel" colspan="2" align="center">
				<input class="submit" type="submit" name="submit" value="{$langRename}" />
			</td>
		</tr>
	</table>
</form>

<form name="map_delete" id="map_delete" method="POST" action="javascript:submitFrontendForm('{$htmlBase}/server/core/ajax_handler.php?mod=Map&amp;act=doDelete', 'map_delete');" onsubmit="return check_map_delete();">
	<input type="hidden" name="map_current" value="" />
	<script>document.map_delete.map_current.value = mapname;</script>
	<table name="mytable" class="mytable" id="table_map_delete">
		<tr><th class="cat" colspan="2"><h2>{$langDeleteMap}</h2></th></tr>
		<tr><td class="tdlabel">{$langChooseMap}</td><td class="tdfield">
				<select name="map">
					<option value="" selected></option>
					{foreach $availableMaps name}<option value="{$name}">{$name}</option>{/foreach}
				</select>
			</td>
		</tr>
		<tr>
			<td class="tdlabel" colspan="2" align="center">
				<input class="submit" type="submit" name="submit" id="commit" value="{$langDelete}" />
			</td>
		</tr>
	</table>
</form>

<form name="map_export" id="map_export" method="POST" action="{$htmlBase}/server/core/ajax_handler.php?mod=Map&amp;act=doExportMap" onsubmit="return check_map_export();">
	<table name="mytable" class="mytable" id="table_map_export">
		<tr><th class="cat" colspan="2"><h2>{$langExportMap}</h2></th></tr>
		<tr>
			<td class="tdlabel">{$langChooseMap}</td><td class="tdfield">
				<select name="map">
					<option value="" selected></option>
					{foreach $availableMaps name}<option value="{$name}">{$name}</option>{/foreach}
				</select>
			</td>
		</tr>
		<tr>
			<td class="tdlabel" colspan="2" align="center">
				<input class="submit" type="submit" name="submit" value="{$langExport}" />
			</td>
		</tr>
	</table>
</form>

<form name="map_import" id="map_import" method="POST" action="{$htmlBase}/server/core/ajax_handler.php?mod=Map&amp;act=doImportMap" enctype="multipart/form-data" onsubmit="return check_map_import();">
	<input type="hidden" id="MAX_FILE_SIZE" name="MAX_FILE_SIZE" value="1000000" />
	<table name="mytable" class="mytable" id="table_map_import">
		<tr><th class="cat" colspan="2"><h2>{$langImportMap}</h2></th></tr>
		<tr>
			<td class="tdlabel">{$langChooseMapFile}</td>
			<td class="tdfield"><input type="file" name="map_file" /></td>
		</tr>
		<tr>
			<td class="tdlabel" colspan="2" align="center">
				<input class="submit" type="submit" name="submit" id="commit" value="{$langImport}" />
			</td>
		</tr>
	</table>
</form>
