{assign var="page_title" value="Account bearbeiten"}
{assign var="page_title_long" value="Mitglieder Bereich &raquo; Account-Administration &raquo; Account bearbeiten"}
{assign var="page_title_site" value="Account bearbeiten"}

{form_errors error_list=$form_errors}

{if $saved}
Die Accountdaten wurden erfolgreich gespeichert.
{/if}

<form method="post" action="accounts_admin.php">
    <input type="hidden" name="sid" value="{$SID_SHORT}" />
    <input type="hidden" name="edit_account" value="{$eaccount->ID}" />
    <table>
        <tr>
        	<th colspan="3" bgcolor="{$style.bg_2}">
            	Allgemein
            </th>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Benutzername</b></td>
            <td bgcolor="{$style.bg_a}"><input type="text" name="name" size="30" maxlength="20" class="input_form" value="{$formvalues.name}" /></td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Password</b></td>
            <td bgcolor="{$style.bg_b}"><input type="button" value="Passwort ändern" class="button_form" onClick="open_popup( 'accounts_admin.php?change_password={$eaccount->ID}&{$SID}', 'change_password', 400, 150 )" /></td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Foren-Account</b></td>
            <td bgcolor="{$style.bg_a}"><input type="button" value="Verknüpfung ändern" class="button_form" onClick="open_popup( 'accounts_admin.php?change_boardlink={$eaccount->ID}&{$SID}', 'change_boardlink', 400, 150 )" /></td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>eMail-Adresse</b></td>
            <td bgcolor="{$style.bg_b}"><input type="text" name="email" size="30" maxlength="150" class="input_form" value="{$formvalues.email}" /></td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>eMail-Adresse anzeigen?</b></td>
            <td bgcolor="{$style.bg_a}"><input type="checkbox" name="show_email" value="1"{if $formvalues.show_email == true}checked="checked"{/if} /></td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>ICQ Nummer</b></td>
            <td bgcolor="{$style.bg_b}"><input type="text" name="icq" size="30" maxlength="12" class="input_form" value="{$formvalues.icq}" /></td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Newsletter erhalten?</b></td>
            <td bgcolor="{$style.bg_a}"><input type="checkbox" name="get_newsletter" value="1"{if $formvalues.get_newsletter == true}checked="checked"{/if} /></td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Homepage-Style</b></td>
            <td bgcolor="{$style.bg_b}">
                <select name="style" class="list_form">
                {html_options options=$styles selected=$formvalues.style}
                </select>
            </td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Abwesenheits-Nachricht</b></td>
            <td bgcolor="{$style.bg_a}"><input type="text" name="away_msg" size="30" maxlength="255" class="input_form" value="{$formvalues.away_msg}" /></td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Block</b></td>
            <td bgcolor="{$style.bg_b}">
                <select name="block" class="list_form">
                {html_options options=$block_opts selected=$formvalues.block}
                </select>
            </td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Aktivierung</b></td>
            <td bgcolor="{$style.bg_a}">
                <select name="activation" class="list_form">
                {html_options options=$activation_opts selected=$formvalues.activation}
                </select>
            </td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Benutzerbild löschen?</b></td>
            <td bgcolor="{$style.bg_b}"><input type="checkbox" name="delete_user_picture" value="1" {if $no_user_picture}disabled="disabled"{/if} /></td>
        </tr>
    </table>
    <p></p>
    <table>
        <tr>
        	<th colspan="3" bgcolor="{$style.bg_2}">
            Charaktereinstellungen
            </th>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Anzahl Spielercharaktere</b></td>
            <td bgcolor="{$style.bg_a}">
                <select name="player_chars" class="list_form">
                    {html_options options=$char_dropdown selected=$formvalues.player_chars}
                </select>
            </td>
            <td bgcolor="{$style.bg_a}">
            	Genutzt: {$num_playerchars.0}
            </td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Anzahl Questcharaktere</b></td>
            <td bgcolor="{$style.bg_b}" align="center">
            	{$num_questchars.0}
            </td>
            <td bgcolor="{$style.bg_b}">
            	&nbsp;
            </td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Anzahl Staffcharaktere</b></td>
            <td bgcolor="{$style.bg_a}">
                <select name="staff_chars" class="list_form">
                    {html_options options=$char_dropdown selected=$formvalues.staff_chars}
                </select>
            </td>
            <td bgcolor="{$style.bg_a}">
            	Genutzt: {$num_staffchars.0}
            </td>
        </tr>
    </table>
    <p></p>
    <table>
        <tr>
        	<th colspan="3" bgcolor="{$style.bg_2}">
            Staff- und Rangeinstellungen
            </th>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Rang</b></td>
            <td bgcolor="{$style.bg_a}" colspan="2">
                <select name="rank" class="list_form">
                    {html_options options=$user->ranknames selected=$formvalues.rank}
                </select>
            </td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Bereich</b></td>
            <td bgcolor="{$style.bg_b}" colspan="2">
                <select name="group" class="list_form">
                    {html_options options=$user->groups selected=$formvalues.group}
                </select>
            </td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Extra-Zugriff</b></td>
            <td bgcolor="{$style.bg_a}">
                <select name="access[]" class="list_form" multiple="multiple">
		    <option label="Root-Zugriff [Homepage]" value="root"{if $formvalues.access.root} selected="selected"{/if}>Root-Zugriff [Homepage]</option>
		    <option label="Beschr. Account-Admin" value="accounts_admin_restricted"{if $formvalues.access.accounts_admin_restricted} selected="selected"{/if}>Beschr. Account-Admin</option>
		    <option label="Downloads" value="files"{if $formvalues.access.files} selected="selected"{/if}>Downloads</option>
		    <option label="Template-Bearbeitung" value="templates"{if $formvalues.access.templates} selected="selected"{/if}>Template-Bearbeitung</option>
		    <option label="Screenshot-Bearbeitung" value="screenshots"{if $formvalues.access.screenshots} selected="selected"{/if}>Screenshot-Bearbeitung</option>
		    <option label="FAQ-Bearbeitung" value="faq"{if $formvalues.access.faq} selected="selected"{/if}>FAQ-Bearbeitung</option>
		    <option label="Bibliothek-Bearbeitung" value="library"{if $formvalues.access.library} selected="selected"{/if}>Bibliothek-Bearbeitung</option>
		    <option label="Bewerbungen" value="applications"{if $formvalues.access.applications} selected="selected"{/if}>Bewerbungen</option>
		    <option label="Patch-Administration" value="patcher"{if $formvalues.access.patcher} selected="selected"{/if}>Patch-Administration</option>
			<option label="WEP" value="wep"{if $formvalues.access.wep} selected="selected"{/if}>WEP-Admin</option>
			<option label="Teamspeak" value="teamspeak"{if $formvalues.access.teamspeak} selected="selected"{/if}>Teamspeak-Zugriff</option>
			<option label="Gamesystem" value="gamesys"{if $formvalues.access.gamesys} selected="selected"{/if}>Gamesystem-Admin</option>
			<option label="Char-Freischaltung" value="activation"{if $formvalues.access.activation} selected="selected"{/if}>Char-Freischaltung</option>
			<option label="Questitems authorisieren" value="questitems_authorisieren"{if $formvalues.access.questitems_authorisieren} selected="selected"{/if}>Questitems authorisieren</option>
			<option label="Testserverzugriff" value="testserver"{if $formvalues.access.testserver} selected="selected"{/if}>Testserverzugriff</option>
			<option label="Logzugriff" value="logs"{if $formvalues.access.logs} selected="selected"{/if}>Logzugriff</option>
			<option label="Charansicht" value="viewchars"{if $formvalues.access.viewchars} selected="selected"{/if}>Charansicht</option>
			<option label="Charadministration" value="charadministration"{if $formvalues.access.charadministration} selected="selected"{/if}>Charadministration</option>
			<option label="Questchars administrieren" value="questcharadministration"{if $formvalues.access.questcharadministration} selected="selected"{/if}>Questchars administrieren</option>
			<option label="Aktenschrank" value="badguys"{if $formvalues.access.badguys} selected="selected"{/if}>Aktenschrank</option>
			<option label="Mieter-Übersicht" value="miete"{if $formvalues.access.miete} selected="selected"{/if}>Mieter-Übersicht</option>
			<option label="Vendoren" value="vendoren"{if $formvalues.access.vendoren} selected="selected"{/if}>Vendoren</option>
			<option label="NPCs" value="npcs"{if $formvalues.access.npcs} selected="selected"{/if}>NPCs</option>
			<option label="Rohstoffe" value="rohstoffe"{if $formvalues.access.rohstoffe} selected="selected"{/if}>Rohstoffe</option>
			<option label="Spawns" value="spawns"{if $formvalues.access.spawns} selected="selected"{/if}>Spawns</option>
			<option label="Engine-Quests" value="enginequests"{if $formvalues.access.spawns} selected="selected"{/if}>Engine-Quests</option>
                </select>
            </td>
            <td bgcolor="{$style.bg_a}">
            	<b>ACHTUNG!</b>	Root-Zugriff erlaubt Zugang zu <b>allen</b> Funktionen auf der Website!
            </td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Foren-Freischaltung</b></td>
            <td bgcolor="{$style.bg_b}" colspan="2">
                (Mit Komma getrennte Foren-IDs): <input type="text" name="wbb_access" size="20" maxlength="50" class="input_form" value="{$formvalues.wbb_access}" />
            </td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_a}"><b>Interne eMail-Adresse</b></td>
            <td bgcolor="{$style.bg_a}" colspan="2"><input type="text" name="intern_email" size="30" maxlength="150" class="input_form" value="{$formvalues.intern_email}" /></td>
        </tr>
        <tr>
            <td align="right" bgcolor="{$style.bg_b}"><b>Interne ICQ Nummer</b></td>
            <td bgcolor="{$style.bg_b}" colspan="2"><input type="text" name="intern_icq" size="30" maxlength="12" class="input_form" value="{$formvalues.intern_icq}" /></td>
        </tr>
    </table>
    <br />
    <input type="submit" value="Daten speichern" name="send_form" class="button_form" />
    <input type="submit" value="Account löschen" name="delete_user" class="button_form" onclick="return confirm_link( this, 'ACHTUNG! Benutzer wird inklusive RunUO-Account (falls vorhanden) gelöscht.\nForfahren?' )" />
</form>