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

<table>
    <tr bgcolor="{$style.bg_2}">
        <th>Titel</th>
        <th>Start-Datum</th>
        <th>Thumbnail</th>
        <th>Bearbeiten</th>
        <th>Löschen</th>
    </tr>
    {foreach from=$weps item=row}
    <tr>
        <td>{$row.title}</td>
        <td>{$row.starttime|date_format:"%d.%m.%Y"}</td>
        <td><img src="{$row.thumbpath}" /></td>
        <td><a href="wep_admin.php?edit={$row.wepID}&amp;&amp;{$SID}">Bild bearbeiten</a></td>
        <td><a href="wep_admin.php?delete={$row.wepID}&amp;page_num={$page_num}&amp;{$SID}">Bild löschen</a></td>
    </tr>
    {/foreach}
</table>
<br />
{$page_navigation}
<p></p>
{form_errors error_list=$form_errors}
<form method="post" enctype="multipart/form-data" action="wep_admin.php">
    <input type="hidden" name="sid" value="{$SID_SHORT}" />
    <input type="hidden" name="page_num" value="{$page_num}" />
    <table>
        <tr>
        	<th colspan="2" bgcolor="{$style.bg_2}">WEP hinzufügen</th>
        </tr>
        <tr>
	        <td align="right" bgcolor="{$style.bg_a}"><b>Titel</b></td>
	        <td bgcolor="{$style.bg_a}"><input type="text" name="title" size="30" maxlength="50" class="input_form" value="{$formvalues.title}" /></td>
	    </tr>
        <tr>
	        <td align="right" bgcolor="{$style.bg_b}"><b>Beschreibung</b></td>
	        <td bgcolor="{$style.bg_b}"><input type="text" name="description" size="30" maxlength="250" class="input_form" value="{$formvalues.description}" /></td>
	    </tr>
        <tr>
	        <td align="right" bgcolor="{$style.bg_b}"><b>Sichtbar ab</b><br /> ( DD.MM.YYYY )</td>
	        <td bgcolor="{$style.bg_b}">
            	<input type="text" name="starttime_DD" size="2" maxlength="2" class="input_form" value="{$formvalues.starttime_DD}" />.
                <input type="text" name="starttime_MM" size="2" maxlength="2" class="input_form" value="{$formvalues.starttime_MM}" />.
                <input type="text" name="starttime_YYYY" size="4" maxlength="4" class="input_form" value="{$formvalues.starttime_YYYY}" />
            </td>
	    </tr>
        <tr>
	        <td align="right" bgcolor="{$style.bg_a}"><b>Datei</b></td>
	        <td bgcolor="{$style.bg_a}"><input type="file" name="file" size="30" class="input_form" /></td>
	    </tr>
    </table>
    <br />
    <input type="submit" name="send_form" class="button_form" value="WEP hochladen" />
</form>