{include file="$gentemplates/_header.tpl" pagetitle="$contentheader"}
{include file="$gentemplates/_navi.tpl" pagetitle="$contentheader"}
	
<table border="0" cellpadding="0" cellspacing="0" width="80%">
	<tr><td class="lines2" height="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="2" hspace="0" vspace="0" border="0"></td></tr>
	<tr>
		<td class="tab" width="30">&nbsp;</td>
		<td class="tab" height="23" width="130"><a href="index.php?mod=notes&amp;obj=note&amp;view=list&amp;{$SESSION}">{$back}</a></td>
		<td class="tab">&nbsp;</td>
	</tr>
	<tr><td class="lines2" height="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr>
		<td class="tab" height="40">&nbsp;</td>
		<td class="formhead">{$title}:</td>
		<td class="tab">{$td.title}</td>
	</tr>
	<tr>
		<td class="tab" height="40">&nbsp;</td>
		<td class="formhead">{$lastchange}:</td>
		<td class="tab">{$td.lu_update|mgw_datetime} ({$td.lu_username})</td>
	</tr>
	<tr><td class="lines" height="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr>
	        <td class="tab" height="40">&nbsp;</td>
		<td class="formhead">{$category}:</td>
		<td class="tab">{$td.catname}</td>
	</tr>
	<tr><td class="lines" height="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr>
		<td class="tab">&nbsp;</td>
		<td class="formhead"><br />{$content}<br /><br /></td>
		<td class="tab"><br />{$td.content|mgw_linkalize|smarty:nodefaults}<br /><br /></td>
	</tr>
	<tr><td class="lines2" height="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	{if $enable_comments}
	{section name=c loop=$comments}
	<tr><td class="lines" height="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr>
		<td class="tab">&nbsp;</td>
		<td class="tab">{$comments[c].lu_username}<br />
		{$comments[c].lu_update|mgw_datetime}</td>
{if $comments[c].lu_user eq $userid && $comments[c].id eq $cidtoedit}
		<td class="tab"><br />
		  <form action="index.php" method="POST">
		  <textarea name="comment" rows="5" cols="35" />{$comments[c].comment}</textarea><br />
		  <input type="hidden" name="op" value="editcomment" />
		  <input type="hidden" name="cid" value="{$comments[c].id}" />
		  <input type="hidden" name="note_id" value="{$td.id}" />
		  <input type="submit" value="{$edit}" />
		  </form>
		</td>
{elseif $comments[c].lu_user eq $userid}
		<td class="tab"><br />{$comments[c].comment|smarty:nodefaults|mgw_linkalize}<br /><br /><a href="index.php?part=notes&amp;view=details&amp;id={$id}&amp;cidtoedit={$comments[c].id}">{$edit}</a><br /></td>
{else}
		<td class="tab"><br />{$comments[c].comment|mgw_linkalize}<br /><br /></td>
{/if}
	</tr>
        {/section}
	<tr><td class="lines2" height="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	<tr>
		<td class="tab">&nbsp;</td>
		<td class="formhead"><br />{$addcomment}</td>
		<form action="index.php" method="POST">
		<td class="tab"><br />
		  <form action="index.php" method="POST">
		  <textarea name="comment" rows="5" cols="35" /></textarea><br />
		  <input type="hidden" name="op" value="docomment" />
		  <input type="hidden" name="note_id" value="{$td.id}" />
		  <input type="submit" value="{$save}" />
		  </form>
		</td>
	</tr>
	<tr><td class="lines2" height="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>
	{/if}
	<tr>
		<td class="tab">&nbsp;</td>
		<td class="tab" height="23"><a href="index.php?mod=notes&amp;obj=note&amp;view=list&amp;{$SESSION}">{$back}</a></td>
		<td class="tab">&nbsp;</td>
	</tr>
	<tr><td class="lines" height="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" hspace="0" vspace="0" border="0"></td></tr>	
</table>

{include file="$gentemplates/_footer.tpl" aktUser=$username}