


<input type="hidden" name="p_id" value="{$smarty.request.p_id|default:$smarty.request.pid}" />
<input type="hidden" name="action" value="{$smarty.request.action}" />
<input type="hidden" name="num_pages" value="{$smarty.request.num_pages}" />
<div class="forum_container">
<fieldset>
<strong>{#Forums_Field_subject#}</strong><br />
<input class="input"  type="text" name="subject" value="{$message->title|default:$smarty.post.subject}" maxlength="200" size="50" />
<br />

{if $bbcodes}
<br />
<span class="td1"></span>
{if $smilie == 1}{$listemos}{/if}{include file="$incpath/forums/format.tpl"}
<br />
{/if}

<div style="height:475px;">
<textarea id="msgform" class="input" name="text" rows="25" style="width: 98%; height:450px; font-size:110%"  onfocus="getActiveText(this)" onclick="getActiveText(this)"  onchange="getActiveText(this)">{if $message->message!=''}{$message->message|default:$preview_text_form|escape:"html"}{else}{$message->text|default:$preview_text_form|escape:"html"}{/if}</textarea>
</div>
<br />
<strong>{#Forums_Field_options#}</strong><br />
<label><input class="noborder" type="checkbox" name="parseurl" value="1" checked="checked"> {#Forums_Label_urlconvert#}</label><br />
{if $ugroup!=2}<label><input class="noborder" type="checkbox" name="notification" value="1" {if ( $notification==1 ) || ($smarty.request.notification==1) }checked="checked"{/if}>{#Forums_Label_notification#}</label><br />{/if}
<label><input class="noborder" type="checkbox" name="disablebb" value="1" {if $smarty.request.disablebb==1 }checked="checked"{/if}>{#Forums_Label_disablebbcode#}</label><br />
<label><input class="noborder" type="checkbox" name="disablesmileys" value="1" {if $smarty.request.disablesmileys==1 }checked="checked"{/if}>{#Forums_Label_disablesmilies#}</label><br />
{if $ugroup!=2}<label><input class="noborder" type="checkbox" name="usesig" value="1" checked="checked">{#Forums_Label_usesig#}</label><br />{/if}



{if $permissions.8 == 1}
<br />
{if ($smarty.request.action=='edit') || ($pre_error==1) || ($nooon != 1) || $smarty.request.p=='addtopic'}
{if $h_attachments_only_show}
<fieldset>
<legend>{#Forums_ThisAttachments#}</legend>
{foreach name=attachments from=$h_attachments_only_show item=at}
{assign var="counter" value=$counter+1}
{$at}
{/foreach}
</fieldset>

{/if}
{/if}
		
    {assign var=fileCount value=$smarty.foreach.attachments.total}
    <input type="hidden" id="hidden_count" value="{$counter}" />
    <script language="javascript" type="text/javascript">
    <!--
    function attachment_window(att_count){ldelim}
        var attcount = document.getElementById('hidden_count').value;
        var left = {$maxattachment} - attcount;
        if (attcount >= {$maxattachment}){ldelim}
            alert('{#Forums_EDelattFirst#}');
        {rdelim} else {ldelim}
    {if $smarty.request.toid != ""}
        open_window('index.php?p=misc&do=attachment&toid={$smarty.request.toid}&fid={$smarty.request.fid}&left='+ left +'&p_id={if $smarty.request.pid != ""}{$smarty.request.pid}{else}-1{/if}', 'moo', '400','400','0');
        {else}
        open_window('index.php?p=misc&do=attachment&fid={$smarty.request.fid}&left='+ left +'&p_id={if $smarty.request.pid != ""}{$smarty.request.pid}{else}-1{/if}', 'moo', '400','400','0');
        {/if}
        {rdelim}
    {rdelim}
    //-->
    </script>
    <input type="hidden" id="fileCount" name="fileCount" value="{$fileCount}" />
    
    <fieldset id="attachments_fieldset" style="display:none">
    <legend>{#Forums_ThisAttachments#}</legend>
    <div id="attachments"></div>
    </fieldset>
    <br />
    <input class="button" type="button" onclick="return attachment_window('{$fileCount}');" value="{#Forums_AddNewAttachments#}" />
    <iframe style="width:1px; height:1px; display:none" name="attachment_frame"></iframe>
{/if}
</fieldset>
</div>
<!-- THREADFORM ENDE -->