Location: PHPKode > projects > Jarida > jarida_1.0/templates/default/admin/comment.tpl
{* if the $_get['do'] is empty we are dealing with  
the display of all articles with links to edit and delete *}



{if !$smarty.get.do}
<div class="admin_content">
<table width="100%" cellspacing="2px">
<tr class="admin_title"><td>{$lang.title}</td><td>{$lang.name}</td>
<td>{$lang.edit}</td><td>{$lang.delete}</td><td>{$lang.ip_address}</td></tr>
{section name=comments loop=$comments}
<tr class="{cycle values="admin_row1, admin_row2"}">
<td>{$comments[comments].title}</td>
<td>{$comments[comments].name}</td>
<td><a href="{$smarty.server.SCRIPT_NAME}?do=edit&amp;{$comments[comments].type_link}&amp;id={$comments[comments].id}">
{$lang.edit}</a></td>
<td><a href="{$smarty.server.SCRIPT_NAME}?do=delete&amp;{$comments[comments].type_link}&amp;id={$comments[comments].id}">
{$lang.delete}</a></td>
<td>{$comments[comments].ip}(<a href="./ban.php?do=ban&amp;ip={$comments[comments].ip}">{$lang.ban_ban}</a>)</td></tr>
{/section}
</table>
</div>
{/if}



{* if the $_get['do'] == "edit" we are dealing with  
an editing of an article *}

{if $smarty.get.do == "edit"}
<div class="admin_heading">
{$lang.comment_edit_head}
</div>
{if $smarty.post.submit}
<div class="admin_confirm">
{$confirm_message}
</div>
{else}
<div class="admin_form">
<form name="admin_form" id="admin_form" method="post" action="{$smarty.server.SCRIPT_NAME}?do=edit&{$comment.type_link}">
<table cellspacing="0" cellpadding="0" width="100%">
<tr><td class="admin_form_label">{$lang.comment_name}:</td>
<td class="admin_form_input"><input type="text" name="name" size="50" value="{$comment.name}" /></td></tr>
<tr><td class="admin_form_label">{$lang.comment_web}:</td>
<td class="admin_form_input"><input type="text" name="web" size="50" value="{$comment.web}" /></td></tr>
<tr><td class="admin_form_label">{$lang.comment_title}:</td>
<td class="admin_form_input"><input type="text" name="title" size="50" value="{$comment.title}" /></td></tr>
<tr><td class="admin_form_label">{$lang.comment_body}:</td>
<td class="admin_form_input"><textarea name="body" cols="50" rows="15">{$comment.body}</textarea>
<p>{section name=smilies loop=$smilies}
<img border="0" src="../img/{$smilies[smilies].file}" alt="{$smilies[smilies].code}" 
title="{$smilies[smilies].code}" onClick="writeImgTag('admin_form','{$smilies[smilies].code}')"
style="cursor:pointer " />
{/section}
<input type="hidden" name="id" value="{$smarty.get.id}" />
</p></td></tr>
<tr><td colspan="2" align="center"><input type="submit" name="submit" value="{$lang.submit}" /></td></tr>
</table>
</form>
</div>
{/if}
{/if}

{* if the $_get['do'] == "delete" we are dealing with  
the deleting of an comment *}

{if $smarty.get.do == "delete"}

<div class="admin_heading">
{$lang.comment_delete_head}
</div>

<div class="admin_confirm">
{$confirm_message}
</div>

{/if}
Return current item: Jarida