
<br />
<table width="100%"  border="0" cellpadding="3" cellspacing="1" class="box_inner">
  <tr>
    <td><div align="center"><a href="index.php?p=pn&amp;goto=inbox&amp;area={$area}">
        {$lang.inbox}
        </a> | <a href="index.php?p=pn&amp;goto=outbox&amp;area={$area}">
        {$lang.outbox}
        </a> | <a href="index.php?p=pn&amp;action=new&amp;area={$area}">
        {$lang.newpn}
        </a></div></td>
  </tr>
</table>
<!-- // INBOX / OUTBOX -->
<!-- // NO MESSAGES -->
{if $nomessages == 1}
<table width="100%"  border="0" cellspacing="1" cellpadding="4">
  <tr>
    <td><div align="center"> <br>
        {$lang.nopns}
        <br>
        <br>
      </div></td>
  </tr>
</table>
{/if}
<!-- NO MESSAGES // -->
{if $outin == 1}
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div align="center"><br />
        <b>
        {$lang.$view}
        </b><br />
        <br />
        <table width="80%" border="0" align="center" cellpadding="4" cellspacing="1" class="box_inner">
          <tr>
            <td width="1%" class="row_first"><table width="15%" border="0"  cellpadding="2" cellspacing="0" class="">
                <tr>
                  <td nowrap="nowrap"><div align="center">0 % </div></td>
                </tr>
              </table></td>
            <td width="70%"  align="left">
              <table width="{$inoutwidth}%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td background="templates/{$theme}/img/page/pn_bar.gif" ><img src="templates/{$theme}/img/page/pn_bar.gif" alt="" /></td>
                </tr>
              </table></td>
            <td width="1%" class="row_first"><table width="15%" border="0"  cellpadding="2" cellspacing="0" class="">
                <tr>
                  <td nowrap="nowrap"><div align="center">100 % </div></td>
                </tr>
              </table></td>
          </tr>
        </table>
        <br />
        {$pnioutnall}
        (
        {$inoutpercent}
        %)
        {$pnmax}
        <span class="errorfont">
        {$warningpnfull}
        </span></div></td>
  </tr>
</table>
<br />
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td ><table width="100%" border="0" cellpadding="5" cellspacing="1" class="box_inner">
        <tr class="box_innerhead">
          <td height="30" colspan="4" class="row_first"><div align="center">
              <!-- ANZAHLWAHL -->
              <form  method="post" action="index.php?p=pn&goto={$goto}" name="psel" id="psel">
                <select name="pp" id="pp">
                  {$pp_l}
                </select>
                <select name="porder" id="porder">
                  {$sel_topic_read_unread}
                </select>
                <select name="sort" id="sort">
                  <option value="DESC" {$sel1}>
                  {$lang.desc_t}
                  </option>
                  <option value="ASC" {$sel2}>
                  {$lang.asc_t}
                  </option>
                </select>
                <input type="submit" class="button" value="{$lang.showbutt}" />
                <input name="page" type="hidden" id="page" value="{$page}" />
              </form>
              <!-- ANZAHLWAHL -->
            </div></td>
        </tr>
        <form  method="post" action="index.php?p=pn&del=yes" name="kform" id="kform" onsubmit="return confirm('{$pndel_confirm}   ');">
          <tr class="row_second">
            <td height="30" colspan="2" nowrap="nowrap" class="row_second">
              <input name="allbox" type="checkbox" id="d" onclick="selall();" value="" />
            </td>
            <td colspan="2"  nowrap="nowrap"><div align="right"> <a href="{$normmodus_link}">
                {$lang.t_listpn_n}</a> | <a href="{$katmodus_link}">
                {$lang.t_listpn}
                </a> </div></td>
          </tr>
          {foreach from=$table_data item=data}
          {$data.tbody_start}
          <tr class="{cycle name="c0" values="row_first,row_second"}">
            <td width="1%" nowrap="nowrap"><div align="center">
                <input name="pn_{$data.pnid}" type="checkbox" id="d" value="1" />
              </div></td>
            <td nowrap="nowrap"><div align="center">
                {$data.icon}
            </div></td>
            <td width="100%" nowrap="nowrap"><a class="title" href="{$data.mlink}">{$data.title}
              </a> <br>
              <a class="light" href="{$data.toid}">
              <small>{$data.von}</small>
            </a> </td>
            <td width="10%" valign="top" nowrap="nowrap"><div align="right"><span class="time">
                {$data.pntime}
                </span></div></td>
          </tr>
          {$data.tbody_end}
          {/foreach}
          <tr>
            <td colspan="4" nowrap="nowrap" class="row_first"><div align="right">
                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="left">{$nav}</td>
                    <td><div align="right">
                        {$dlpnas}
                        <a href="{$pndl_text}">
                        {$pndl_text_link}</a> | <a href="{$pndl_html}">{$pndl_html_link}</a></div></td>
                  </tr>
                </table>
              </div></td>
          </tr>
          <tr>
            <td colspan="4" nowrap="nowrap" ><div align="center">
                <input name="area" type="hidden" id="area" value="{$smarty.request.area}">
                <input name="goto" type="hidden" id="goto" value="{$goto}" />
                <input type="submit" class="button" value="{$lang.delmarked}" />
              </div></td>
          </tr>
        </form>
      </table></td>
  </tr>
</table>
{/if}
<!-- INBOX / OUTBOX // -->
<!-- // NEW MESSAGE -->
{if $neu == 1}
<br>
<script language="JavaScript" type="text/javascript">
<!--
function chkf() {ldelim}
	errors = "";

	if (document.f.tofromname.value == "") {ldelim}
		alert("{$lang.error_norecipient}  ");
		document.f.tofromname.focus();
		errors = "1";
		return false;
	{rdelim}
		
	if (document.f.title.value == "") {ldelim}
		alert("{$lang.error_notopic}  ");
		document.f.title.focus();
		errors = "1";
		return false;
	{rdelim}
	
	if (document.f.text.value.length <=  1 ) {ldelim}
		alert("{$lang.error_notext}  ");
		document.f.text.focus();
		errors = "1";
		return false;
	{rdelim}
	
	if (document.f.text.value.length > "{$max_post_length}" ) {ldelim}
		alert("{$lang.error_once} {$lang.error_tomuchtext} "+f.text.value.length+"  {$max_post_length_t} {$max_post_length}  ");
		document.f.text.focus();
		errors = "1";
		return false;
	{rdelim}
	
	if (errors == "") {ldelim}
		document.f.sendmessage.disabled = true;
		return true;
	{rdelim}
}

var postmaxchars = "{$max_post_length}";

function beitrag(theform) {ldelim}
	if (postmaxchars != 0) message = " {$lang.max_post_length_t} "+postmaxchars+"";
	else message = "";
	alert("{$lang.post_length_t} "+theform.text.value.length+" "+message);
{rdelim}

var formfeld = "";
var maxlang = "{$max_post_length}";
				
function zaehle() {ldelim} 
	if (window.document.f.text.value.length>"5000") {ldelim}
		window.document.newc.f.value=formfeld;
		return;
	{rdelim} else {ldelim}
		formfeld=window.document.f.text.value;
		window.document.f.zeichen.value=maxlang-window.document.f.text.value.length;
	{rdelim}
{rdelim}
//-->
</script>
{if $preview == 1}
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td ><table width="100%"  border="0" cellpadding="5" cellspacing="1" class="box_inner">
        <tr>
          <td class="box_innerhead">{$postpreview}</td>
        </tr>
        <tr>
          <td class="row_second">{$preview_text}</td>
        </tr>
      </table></td>
  </tr>
</table>
<br />
{/if}
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td ><table width="100%" border="0" cellpadding="7" cellspacing="1" class="box_inner">
        <form action="index.php?p=pn&action=new" method="post" name="f" id="f" onsubmit="return chkf();">
          <tr>
            <td colspan="2" class="box_innerhead">
			{if $smarty.request.forward == 2}
              {$lang.replytopn}
              {else}
              {$lang.newpn}
            {/if}
			</td>
          </tr>
          <tr>
            <td colspan="2" class="row_second">{$newpn_t}
              <br />
              {if $iserror == 1}
              <br>
              {$title_error}
              <ul>
                {$error}
              </ul>
              {/if}
            </td>
          </tr>
          <tr>
            <td width="20%" nowrap="nowrap" class="row_first">{$lang.to_t}</td>
            <td valign="top" class="row_second"><input name="tofromname"  type="text" class="inputfield" id="tofromname" value="{$tofromname}" size="40" />
              <input onclick="popup('?p=misc&do=searchuser','400','200','yes');" type="button" class="button" value="{$lang.searchuser}" />
            </td>
          </tr>
          <tr>
            <td nowrap="nowrap" class="row_first">{$lang.topic_t}</td>
            <td valign="top" class="row_second"><input name="title"  type="text" class="inputfield" id="title" value="{$title}" size="40" />
            </td>
          </tr>
          <tr>
            <td nowrap="nowrap" class="row_first">{$lang.format_t}
              <span class="td1"> </span></td>
            <td valign="top" class="row_second">{include file="comments/format.tpl"}
            </td>
          </tr>
          <tr>
            <td valign="top" nowrap="nowrap" class="row_first">{if $smilie == 1}
              <fieldset class="fieldset">
              <legend>
              {$lang.smilies_t}
              </legend>
              {$smilies2}
              {$listemos}
              </fieldset>
              {/if}
            </td>
            <td valign="top" class="row_second"><textarea onkeyup="javascript:zaehle()" style="width:99%" class="inputfield" name="text" rows="15" onfocus="getActiveText(this)" onclick="getActiveText(this)"  onchange="getActiveText(this)">{$text}</textarea>
            </td>
          </tr>
          <tr>
            <td rowspan="2" valign="top" nowrap="nowrap" class="row_first">{$lang.pnoptions}</td>
            <td valign="top" class="row_second"><input name="use_smilies" type="checkbox" id="use_smilies" value="yes" checked="checked" />&nbsp;&nbsp;{$lang.usesmilies}
              <br />
              <input name="parseurl" type="checkbox" id="parseurl" value="yes" checked="checked" />&nbsp;&nbsp;{$lang.parseurl_t}
              <br />
              <input name="savecopy" type="checkbox" id="savecopy" value="yes" checked="checked" />&nbsp;&nbsp;{$lang.savecopy}
            </td>
          </tr>
          <tr>
            <td valign="top" class="row_second"><input name="send" type="radio" value="2" checked="checked" />&nbsp;&nbsp;{$lang.sendform}
              <input type="radio" name="send" value="1" />&nbsp;&nbsp;{$lang.postpreview}</td>
          </tr>
          <tr>
            <td nowrap="nowrap" class="row_first">&nbsp;</td>
            <td valign="top" class="row_second"><input  name="sendmessage" type="submit" class="button" id="sendmessage"  value="{$lang.send}" />
              <input onclick="beitrag(document.f);" class="button" type="button"  value="{$lang.checklength}" />
            </td>
          </tr>
        </form>
      </table></td>
  </tr>
</table>
{/if}
<!-- NEW MESSAGE // -->
<br />
{if $showmessage == 1}
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td ><table width="100%"  border="0" cellpadding="5" cellspacing="1" class="box_inner">
        <tr>
          <td colspan="2" class="box_innerhead">{$pntitle}</td>
        </tr>
        <tr>
          <td width="150" class="row_first"><a class="light"  href="{$tofromname_link}">
            {$tofromname}
            </a></td>
          <td class="row_second">{$lang.send_dt}:
            <span class="time">
            {$pntime}
            </span></td>
        </tr>
        <tr valign="top">
          <td width="150" height="120" class="row_first">{$group_t}
            :
            {$groupname}
            <br />
            {$posts}
            :
            {$posts_num}
            <br />
            {$membersince}
            :
            {$membersince_date}
          </td>
          <td class="row_second">{$message}</td>
        </tr>
        <tr valign="top">
          <td class="row_first">&nbsp;</td>
          <td class="row_second">{if $answerok == 1}
            <a href="{$relink}" target="_self"><img src="templates/{$theme}/img/pn/answer.gif" alt="{$lang.relink_t}" border="0" /></a>
            {/if}
            <a href="{$forwardlink}" target="_self"><img src="templates/{$theme}/img/pn/forward.gif" alt="{$lang.forwardlink_t}" border="0" /></a>&nbsp;&nbsp;<a href="{$delpn}" target="_self" onclick="return confirm('{$lang.delpn_t}');"><img src="templates/{$theme}/img/pn/delpn.gif" alt="{$lang.delpn_t}" border="0" /></a></td>
        </tr>
      </table></td>
  </tr>
</table>
{/if}