
{if $user.Gaestebuch==1}
<a name="eintraege"></a>
<div class="box_innerhead">
<strong>{#Profile_Guestbook_Guestbook_FromTitle#} {$user.Benutzername|koobispecialchars} </strong></div>
<div align="center">

<a href="#eintrag_neu"><img class="absmiddle" src="{$imgpath_page}comment_small.png" alt="" border="0" /></a> <a href="#eintrag_neu"><strong>{#Profile_Guestbook_EntryNow1#} {$user.Benutzername} {#Profile_Guestbook_EntryNow2#}</strong></a>
{if $smarty.session.benutzer_id==$smarty.request.id && $eintrag} | 
<a onclick="return confirm('{#Profile_Guestbook_DeleteAllC#}');" href="index.php?action=delete_all&amp;p=user&amp;id={$smarty.request.id}&amp;page={$smarty.request.page}&amp;area={$area}">{#Profile_Guestbook_DeleteAll#}</a>
{/if}
</div>

<br />

{if $eintrag}

{if $smarty.session.benutzer_id==$smarty.request.id}
<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>
{/if}












{foreach from=$eintrag item=e}
<a name="{$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}>
<div>
<strong>{$e.Titel|cleantext|default:'-'}</strong>
</div>
<div class="user_guestbook_subheader">
 {$e.Datum|date_format:$config_vars.DateFomatExtended}
 {#Profile_Guestbook_EntryFrom2#} {$e.Autor|cleantext} {if $e.Autor_Web}<a target="_blank" href="{$e.Autor_Web|sslash|escape:html}"><img class="absmiddle" src="{$imgpath_forums}homepage.gif" alt="" border="0" /></a>{/if}
 {if $e.Autor_Herkunft} {#Profile_Guestbook_EntryFrom3#} {$e.Autor_Herkunft|cleantext}{/if}
</div>

<div class="user_guestbook_text">
<div id="eintrag_{$e.Id}">{$e.Eintrag}</div>
{if $smarty.session.benutzer_id==$smarty.request.id}
<div id="eintrag_edit_{$e.Id}" style="display:none">
<form method="post" action="index.php?p=user">


<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|koobispecialchars}" /></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|koobispecialchars}" /></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|koobispecialchars}" /></td>
  </tr>
  <tr>
    <td width="160">{#Profile_Guestbook_Edit_Title#}</td>
    <td><input class="input" style="width:200px" name="E_Titel" type="text" value="{$e.Titel|koobispecialchars}" /></td>
  </tr>
  <tr>
    <td width="160">{#Profile_Guestbook_Edit_Comment#}</td>
    <td><textarea id="GbComment_{$e.Id}" class="input" cols="2" rows="2" style="width:99%; height:150px" name="E_Eintrag">{$e.Eintrag_Raw|koobispecialchars}</textarea></td>
  </tr>
  <tr>
  <td>&nbsp;</td>
   <td>
   <input type="hidden" name="id" value="{$smarty.request.id}" />
<input type="hidden" name="action" value="edit" />
<input type="hidden" name="gb_entry" value="{$e.Id}" />
<input type="hidden" name="page" value="{$smarty.request.page|default:1}" />
<input type="submit" class="button" value="{#Save#}" />
   </td>
  </tr>
</table>

</form>
</div>

<div align="right" style="padding:4px; clear:both">
<small>
{if $e.Aktiv!=1}<a href="index.php?p=user&amp;id={$smarty.request.id}&amp;page={$smarty.request.page}&amp;action=set_active&amp;gb_entry={$e.Id}&amp;area={$area}">{#Profile_Guestbook_SetActive#}</a> | {/if}
<a onclick="return confirm('{#Profile_Guestbook_DeleteC#}');" href="index.php?d=true&amp;p=user&amp;id={$smarty.request.id}&amp;page={$smarty.request.page}&amp;action=delete&amp;gb_entry={$e.Id}&amp;area={$area}">{#Profile_Guestbook_Delete#}</a> | 
<a href="javascript:void(0);" onclick="javascript:edit_entry('{$e.Id}');">{#Profile_Guestbook_Edit#}</a>
</small>
</div>
{/if}

</div>
</div>
{/foreach}

{if $pages}
<p>{$pages}</p>
{else}
<br />
{/if}
{else}
<h2>{#Profile_Guestbook_NoEntries#}</h2>
<p></p>
{/if}


<!-- // EINTRAG -->





<a name="eintrag_neu"></a>

<br />
{if $KeineGaeste==1}
<p>
{#Profile_Guestbook_NoGuests#}
</p>
{else}
{if $error}
<a name="error"></a>
<img src="{$imgpath}/page/pixel" alt="" width="1" height="1" style="display:none" onload="location.href='#error';" />
<div class="error_box">
<ul>
{foreach from=$error item=err}
<li>{$err}</li>
{/foreach}
</ul>
</div>
{/if}

<div class="clear"></div>

<!-- // EINTRAG -->
<script language="javascript" src="{$jspath}/jvalidate.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!-- //
{include file="$incpath/other/validate_conf.tpl"}
{include file="$incpath/other/koobicode.js"}
{literal}

$(document).ready(function()
{
	$('div.leave_comment').toggleElements ({ fxAnimation:'slide', fxSpeed:'normal', className:'togglerboxes',onClick:Panel_Comment_Closer,onHide:Panel_Comment_Opener} );
});
function Panel_Comment_Opener() {$.cookie('navpanel_newcomment','opened');}
function Panel_Comment_Closer() {$.cookie('navpanel_newcomment', '', { expires: -1 });}

$(document).ready(function() {
	var validator = $("#fe").validate(
	{ 
		rules: 
		{ 
			Autor: {required: true},
			Titel: {required: true},
			text: {required: true,minLength:10, maxLength:{/literal}{$user.Gaestebuch_Zeichen}{literal}}
			{/literal}
			{if $use_code==1},
			scode:{ldelim}required: true{if !get_active('img_captcha')},number:true, remote: "index.php?do=checkuserdata&p=register"{/if}{rdelim}
			{/if}
			{literal}
		},
		messages: 
		{
			scode: {remote:'{/literal}{#Validate_wrong#}{literal}'}
		},
			
		submitHandler: function() 
		{ 
			document.forms['f'].submit();
		},
		
		success: function(label) 
		{
			label.html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;").addClass("checked");
		}
	});
});
{/literal}
// -->
</script>

<p>&nbsp;</p>

<form method="post" action="index.php?p=user" name="f" id="fe"> 
<div class="round">
<div class="leave_comment{if $smarty.cookies.navpanel_newcomment=='opened'}{else} opened{/if}" title="{#Profile_Guestbook_NewInf#}">
<div class="comment_form">
<label><input class="input" style="width:200px" name="Autor" type="text" value="{$smarty.post.Autor|stripslashes|escape:html}" id="c_a" /> {#Profile_Guestbook_YName#}</label><br />
<label><input class="input" style="width:200px" name="Webseite" type="text" value="{$smarty.post.Webseite|stripslashes|escape:html}" id="c_w" /> {#Comment_YourWeb#}</label><br />
<label><input class="input" style="width:200px" name="Herkunft" type="text" value="{$smarty.post.Herkunft|stripslashes|escape:html}" id="c_h" /> {#Comment_YourFrom#}</label><br />
<label><input class="input" style="width:200px" name="Titel" type="text" value="{$smarty.post.Titel|stripslashes|escape:html}" /> {#Profile_Guestbook_YTitle#}</label><br />

{if $settings.KommentarFormat==1}
{if $settings.KoobiCode_Smilies == 1}{$listemos}{/if}
{include file="$incpath/comments/format.tpl"}
{/if}

<textarea name="text" cols="40" rows="5" class="input"  id="msgform"  style="width:99%; height:150px">{$smarty.post.text|stripslashes|escape:html}</textarea>


{if $use_code==1}
{if get_active('img_captcha')}
{else}
<br />
<br />
<p>
<strong>{#Reg_SmallQ#}</strong><br />
{#Reg_SmallH#}&nbsp;&nbsp;&nbsp;<strong style="font-size:130%">{$secureIMG}</strong> = 
<input class="input" name="scode" type="text" style="width:80px;font-size:17px;" value="{$smarty.request.scode|stripslashes|escape:html}" maxlength="5" />{$codeerror_t} 
</p>
{/if}

{/if}
<br />
<input type="hidden" name="Redir" value="{redir}" />
<input type="hidden" name="Eintrag" value="1" />
<input type="hidden" name="id" value="{$smarty.request.id|escape:html}" />
<input type="submit" class="button" onclick="koobi_style(-1);" value="{#Comment_ButtonSend#}" />


</div>
</div>
</div>
</form>
<!-- EINTRAG // -->

{/if}
{/if}
<p>&nbsp;</p>
