{if $comments==1}
{if $eintrag}
<p>&nbsp;</p>
<a name="comments"></a>
<div class="box_innerhead"><img class="absmiddle" src="{$imgpath_page}comment_small.png" border="0" alt="" /> 
{#Comments#}
</div>

<div class="comments">
<script language="javascript" type="text/javascript">
<!-- //
function edit_entry(ID)
 {ldelim}
 {foreach from=$eintrag item=e}
  document.getElementById('eintrag_edit_' + {$e.Id}).style.display = 'none';
  document.getElementById('eintrag_' + {$e.Id}).style.display = '';
 {/foreach}
  document.getElementById('eintrag_' + ID).style.display = 'none';
  document.getElementById('eintrag_edit_' + ID).style.display = '';
{rdelim}
// -->
</script>
{foreach from=$eintrag item=e}
<a name="comment_{$e.Id}"></a>

<div class="{cycle name='gb' values='comment_box,comment_box_second'}"{if $e.Aktiv!=1} style="border:2px solid red; padding:2px; padding:1px"{/if}>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" style="width:75px">{if $e.Avatar!=''}{$e.Avatar}{else}<img class="comment_avatar" src="{$imgpath}/comment/message.gif" alt="" />{/if}</td>
<td valign="top">


<div class="">

<div class="comment_head">
 Am {$e.Datum|date_format:$config_vars.DateFomatExtended}
 schrieb {if $e.Autor_Id}<a href="index.php?p=user&amp;id={$e.Autor_Id}&amp;area={$area}">{$e.Autor|cleantext}</a>{else}{$e.Autor|cleantext}{/if}
 {if $e.Autor_Web}<a target="_blank" href="{$e.Autor_Web|sslash|escape:html}"><img class="absmiddle" src="{$imgpath}/comment/home_small.png" alt="" border="0" /></a>{/if}
 {if $e.Autor_Herkunft} {#Profile_Guestbook_EntryFrom3#} {$e.Autor_Herkunft|cleantext}{/if}
</div>

<div class="comment_entry">
<div id="eintrag_{$e.Id}">
{$e.Eintrag}
</div>
{if permission('edit_comments')}
<div id="eintrag_edit_{$e.Id}" style="display:none">
<form method="post" action="{redir}">


<table width="100%" border="0" cellpadding="0" cellspacing="1">
  <tr>
    <td width="160">{#Profile_Guestbook_Edit_Name#}</td>
    <td><input class="input" style="width:200px" name="E_Autor" type="text" value="{$e.Autor|sslash|escape:html}" /></td>
  </tr>
  <tr>
    <td width="160">{#Profile_Guestbook_Edit_Web#}</td>
    <td><input class="input" style="width:200px" name="E_Webseite" type="text" value="{$e.Autor_Web|sslash|escape:html}" /></td>
  </tr>
  <tr>
    <td width="160">{#Profile_Guestbook_Edit_From#}</td>
    <td><input class="input" style="width:200px" name="E_Herkunft" type="text" value="{$e.Autor_Herkunft|sslash|escape:html}" /></td>
  </tr>
 
  <tr>
    <td width="160">{#Profile_Guestbook_Edit_Comment#}</td>
    <td><textarea id="GbComment" class="input" style="width:99%; height:150px" name="E_Eintrag">{$e.Eintrag_Raw}</textarea></td>
  </tr>
  <tr>
  <td>&nbsp;</td>
   <td>

<input type="hidden" name="id" value="{$smarty.request.id}" />
<input type="hidden" name="comment_action" value="edit" />
<input type="hidden" name="comment_id" value="{$e.Id}" />
<input type="hidden" name="page" value="{$smarty.get.page|default:1}" />
<input type="submit" class="button" value="{#Save#}" />
   </td>
  </tr>
</table>

</form>
</div>

<div align="right">
{if $e.Aktiv!=1}
<a href="index.php?p=comments&amp;action=switch_online&amp;page={$smarty.request.page|default:'1'}&amp;id={$e.Id}">{#Comment_SetActive#}</a>  {/if}
<a onclick="return confirm('{#Comment_DeleteC#}');" href="index.php?p=comments&amp;action=delete_comment&amp;page={$smarty.request.page|default:'1'}&amp;id={$e.Id}"><img class="absmiddle" src="{$imgpath}/comment/delete_small.png" alt="" border="" /></a><a href="javascript:void(0);" onclick="javascript:edit_entry('{$e.Id}');"><img class="absmiddle" src="{$imgpath}/comment/edit_small.png" alt="" border="" /></a>
</div>
{/if}

</div>
</div>


</td>
</tr>
</table>
</div>


{/foreach}
</div>
{/if}
{if $pages}
<br />
<div align="right">
{$pages}
</div>
{/if}
<br />
<a name="comment_new"></a>
{if  permission('comments')}

<br />
{if $noComment!=1}
<form method="post" action="" name="f" id="cf" onsubmit="koobi_style(-1);"> 

<div class="round">
<div class="leave_comment{if $smarty.cookies.navpanel_newcomment=='opened'}{else} opened{/if}" title="{#CommentNew#}">
<div class="comment_form">
{include file="$incpath/comments/form.tpl"}
</div>
</div>
</div>
</form>
{/if}

{else}
{#Comment_NoPerm#}
{/if}
{/if}


