Turinio valdymo sistema

Prisijungimas partneriams
Jūsų slaptažodis

Dirbame su:










results

<h2>{$question.name}</h2>

<div>
<table width="80%" cellpadding="4">
    {foreach from=$answers item="answer"}
    <tr>
        <td>{$answer.name}</td>
        <td align="right">{$answer.votes|default:"0"}</td>
    </tr>
    {/foreach}
    <tr>
        <td colspan="2" align="right">viso balsavo: {$total}</td>
    </tr>
</table>
</div>

<h3>Komentarai</h3>

{_voting->getComments question_id=$question.id comments_page_nr=$comments_page_nr assign="comments"}
{foreach from=$comments item="com"}
{_clients->getClient id=$com.client_id assign=client}

<div>{format_date timestamp=$com.time}</div>
<div>{$com.content|escape:"html"|nl2br}</div>
<div><a href="/narys?login={$client.login}">{$client.login}</a></div>
<br>
{foreachelse}
<div>Komentarų dar nėra</div>
{/foreach}

{_voting->getCommentsPaging assign="_comments_paging"}
{foreach from=$_comments_paging item=el}
{if $el.comments_selected==1}
    {if $el.comments_from!=$el.comments_to}
        <b>{$el.comments_from}-{$el.comments_to}</b>
    {else}
        <b>{$el.comments_from}</b>
    {/if}
{else}
    {if $el.comments_from!=$el.comments_to}
        <a href="{$_http_path}?cid={$system.cid}&amp;question_id={$question.id}&amp;comments_page_nr={$el.comments_page_nr}&amp;page_nr={$page_nr}">{$el.comments_from}-{$el.comments_to}</a>
    {else}
        <a href="{$_http_path}?cid={$system.cid}&amp;question_id={$question.id}&amp;comments_page_nr={$el.comments_page_nr}&amp;page_nr={$page_nr}">{$el.comments_from}</a>
    {/if}
{/if}
{/foreach}

{if !$commented}
    {if $error[1]}
             <div style="color:red;">Įveskite komentarą!</div>
        {elseif $error[2]}
             <div style="color:red;">Įveskite savo vardą!</div>
        {elseif $error[3]}
             <div style="color:red;">Įveskite savo el. pašto adresą!</div>
        {elseif $error[4]}
             <div style="color:red;">Komentuoti gali tik prisijungęs vartotojas!</div>
    {/if}
    <br>
    <form action="{$_http_path}/index.php?cid={$_item_id}" method="POST">
    <input type="hidden" name="action" value="voting2.addComment">
    <input type="hidden" name="question_id" value="{$question.id}">
    <input type="hidden" name="page_nr" value="{$page_nr}">
    <textarea name="content" style="width: 80%;">{$smarty.post.content|escape:"html"}</textarea><br>
    <input class="formButton" type="Submit" value="Komentuoti">
    </form>
{else}
    <div align="center">Ačiū, kad palikote komentarą!</div>
{/if}