{assign var="page_title" value="Vendoren bearbeiten"}
{assign var="page_title_long" value="Mitglieder Bereich &raquo; Vendoren bearbeiten &raquo; Eintrag bearbeiten"}
{assign var="page_title_site" value="Vendoren bearbeiten"}

{form_errors error_list=$form_errors}
<form method="post" action="vendoren.php">
    <input type="hidden" name="sid" value="{$SID_SHORT}" />
    <input type="hidden" name="edit" value="{$formvalues.edit}" />
    <table>
        <tr>
        	<th colspan="2" bgcolor="{$style.bg_2}">Neuer Eintrag</th>
        </tr>
        <tr>
	        <td align="right" bgcolor="{$style.bg_a}"><b>NPC</b></td>
	        <td bgcolor="{$style.bg_a}">
	        	<select name="npc_type_id" class="list_form">
	        		{html_options options=$npcs selected=$formvalues.npc_type_id}
                </select>
	        </td>
	    </tr>
	    <tr>
	        <td align="right" bgcolor="{$style.bg_b}"><b>KI Überschreiben</b></td>
	        <td bgcolor="{$style.bg_b}">
	        	<select name="kis_override_id" class="list_form">
	        		{html_options options=$kiids selected=$formvalues.kis_override_id}
                </select>
	        </td>
	    </tr>
        <tr>
	        <td align="right" bgcolor="{$style.bg_a}"><b>Name</b></td>
	        <td bgcolor="{$style.bg_a}"><input type="text" name="name" size="30" maxlength="30" class="input_form" value="{$formvalues.name}" /></td>
	    </tr>
	    <tr>
	        <td align="right" bgcolor="{$style.bg_b}"><b>Titel</b></td>
	        <td bgcolor="{$style.bg_b}"><input type="text" name="titel" size="30" maxlength="30" class="input_form" value="{$formvalues.titel}" /></td>
	    </tr>
	    <tr>
	        <td align="right" bgcolor="{$style.bg_a}"><b>Profil</b></td>
	        <td bgcolor="{$style.bg_a}"><textarea name="profil" cols="40" rows="6">{$formvalues.profil}</textarea></td>
	    </tr>
	     <tr>
	        <td align="right" bgcolor="{$style.bg_b}"><b>Start</b></td>
	        <td bgcolor="{$style.bg_b}">
				X=<input type="text" name="startx" size="5" maxlength="5" class="input_form" value="{$formvalues.startx}" />
				;
				Y=<input type="text" name="starty" size="5" maxlength="5" class="input_form" value="{$formvalues.starty}" />
				;
				Z=<input type="text" name="startz" size="5" maxlength="5" class="input_form" value="{$formvalues.startz}" />
	        </td>
	    </tr>
	    <tr>
	        <td align="right" bgcolor="{$style.bg_a}"><b>Startmap</b></td>
	        <td bgcolor="{$style.bg_a}"><input type="text" name="startmap" size="3" maxlength="1" class="input_form" value="{$formvalues.startmap}" /></td>
	    </tr>
	    <tr>
	        <td align="right" bgcolor="{$style.bg_b}"><b>Restocktyp</b></td>
	        <td bgcolor="{$style.bg_b}">
	        	<select name="restock_typ" class="list_form">
                    <option value="nachts"{if $formvalues.restock_typ == "nachts"} selected="selected"{/if}>nachts</option>
                    <option value="tags"{if $formvalues.restock_typ == "tags"} selected="selected"{/if}>tags</option>
                    <option value="immer"{if $formvalues.restock_typ == "immer"} selected="selected"{/if}>immer</option>
                    <option value="manuell"{if $formvalues.restock_typ == "manuell"} selected="selected"{/if}>manuell</option>
                </select>
	        </td>
	    </tr>
	    <tr>
	        <td align="right" bgcolor="{$style.bg_a}"><b>Verkaufszeiten</b></td>
	        <td bgcolor="{$style.bg_a}">
	        	<select name="verkaufszeiten" class="list_form">
                    <option value="nachts"{if $formvalues.verkaufszeiten == "nachts"} selected="selected"{/if}>nachts</option>
                    <option value="tags"{if $formvalues.verkaufszeiten == "tags"} selected="selected"{/if}>tags</option>
                    <option value="24h"{if $formvalues.verkaufszeiten == "24h"} selected="selected"{/if}>24h</option>
                    <option value="script"{if $formvalues.verkaufszeiten == "script"} selected="selected"{/if}>script</option>
                </select>
	        </td>
	    </tr>
	    <tr>
	        <td align="right" bgcolor="{$style.bg_b}"><b>Notizen</b></td>
	        <td bgcolor="{$style.bg_b}"><textarea name="notizen" cols="40" rows="6">{$formvalues.notizen}</textarea></td>
	    </tr>
	    <tr>
	        <td align="right" bgcolor="{$style.bg_a}"><b>Max. Distanz zum Start</b></td>
	        <td bgcolor="{$style.bg_a}"><input type="text" name="max_distanz_zu_start" size="5" maxlength="5" class="input_form" value="{$formvalues.max_distanz_zu_start}" /></td>
	    </tr>
    </table>
    <br />
    <input type="submit" name="send_form" class="button_form" value="Ändern..." />
</form>

<br /><br />
<fieldset>
	<legend>Verkaufslisten-Verknüpfungen</legend>
	
	<p>
		<a href="vendoren.php?newlink=1&amp;edit={$formvalues.edit}&amp;{$SID}">Neue Verknüpfung</a><br />
	</p>
	
	<table>
	    <tr bgcolor="{$style.bg_2}">
	    	<th>Verkaufsliste</th>
	        <th>Aktion</th>
	    </tr>
	    {foreach from=$links item=row}
	    <tr>
	    	<td><a href="vendoren.php?editlink={$row.sellbuy_lists_id}&amp;edit={$row.vendoren_id}&amp;{$SID}">{$row.name}</a></td>
	        <td><a href="vendoren.php?dellink={$row.sellbuy_lists_id}&amp;edit={$row.vendoren_id}&amp;{$SID}">Löschen</a></td>
	    </tr>
	    {/foreach}
	</table>
</fieldset>

<br /><br />
<fieldset>
	<legend>Questbaustein-Verknüpfungen</legend>
	
	<p>
		<a href="vendoren.php?newqlink=1&amp;edit={$formvalues.edit}&amp;{$SID}">Neue Verknüpfung</a><br />
	</p>
	
	<table>
	    <tr bgcolor="{$style.bg_2}">
	    	<th>Questbaustein</th>
	        <th>Aktion</th>
	    </tr>
	    {foreach from=$qlinks item=row}
	    <tr>
	    	<td><a href="vendoren.php?editqlink={$row.questbausteine_id}&amp;edit={$row.vendoren_id}&amp;{$SID}">{$row.name}</a></td>
	        <td><a href="vendoren.php?delqlink={$row.questbausteine_id}&amp;edit={$row.vendoren_id}&amp;{$SID}">Löschen</a></td>
	    </tr>
	    {/foreach}
	</table>
</fieldset>