{include file="adm-header.tpl"}
<div class="content">
{if $error != null}<div class="error">{$error}</div>{/if}
{if $success != null}<div class="success">{$success}</div>{/if}
{if $num != 0}
<table width="100%" cellspacing="2" cellpadding="2" style="margin-top: 5px;">
<tr class="th_1"><td colspan="4" >Aktulaności </td></tr>
        <tr class="td_list_title">
                <td width="3%">lp</td>
                <td width="10%">tytuł</td>
                <td width="25%">adres</td>
                <td width="8%">opcje</td>
        </tr>
        {assign var='i' value='0'}
        {foreach from=$akt item=P}
        {assign var='i' value=$i+1}
        <tr class="{if $i%2 == 0}td_list_a{else}td_list_b{/if}" onmouseover="style.backgroundColor='#a9a7a7'" onmouseout="style.backgroundColor='#f6f4f4'">
                <td>{$i}</td>
                <td align="left">&nbsp; {$P.aktTitle}</td>
                <td align="left">&nbsp; <a href="{$adress}{$P.aktId},{nopl str=$P.aktTitle}.html" target="_blank">{$adress}{$P.aktId},{nopl str=$P.aktTitle}.html</a></td>
                <td>
                        <a onclick="location.href='administrator.php?mod=news&act=edit&id={$P.aktId}'" style="cursor: pointer;"><img src="../img/admin-edit.png" border="0" class="img" /></a>
                        <a onclick="javascript:if (confirm('Chcesz usunąć aktulaności!\n\n Aby potwierdzić, wciśnij [ OK ], aby anulować wciśnij [ Anuluj ]\n')) location.href='administrator.php?mod=news&act=delete&id={$P.aktId}'" style="cursor: pointer;"><img src="../img/admin-delete.png" border="0" class="img" /></a>
                </td>
        </tr>
        {/foreach}
</table>
{else}
<center>lista jest pusta...</center>
{/if}
<br />
{if isset($edit)}
{foreach from=$ed item=E}
<form action="administrator.php?mod=news&act=edit&id={$id}" method="post">
<table width="100%" cellspacing="2" cellpadding="2" >
<tr class="th_1"><td colspan="2" >Edycja news : {$E.pagesTitle} </td></tr>
        <tr>
                <td class="td_1">Tytuł news</td>
                <td class="td_2"><input type="text" name="title" value="{$E.aktTitle}" style="width: 400px;" /></td>
        </tr>
        <tr>
                <td class="td_1">Treść news</td>
                <td class="td_2"><textarea name="txt" rows="" cols="" style="width: 700px; height: 250px;">{$E.aktTxt}</textarea></td>
        </tr>
        <tr>
                <td><br /><input type="hidden" name="aktEd" value="" /><input type="submit" class="submit" value="Zapisz zmiany" /></td>
        </tr>
</table>
</form>
{/foreach}
{else}
<form action="administrator.php?mod=news" method="post">
<table width="100%" cellspacing="2" cellpadding="2" >
<tr class="th_1"><td colspan="2" >Nowa News  </td></tr>
        <tr>
                <td class="td_1">Tytuł podstrony</td>
                <td class="td_2"><input type="text" name="title" value="{$title}" style="width: 400px;" /></td>
        </tr>
        <tr>
                <td class="td_1">Treść podstrony</td>
                <td class="td_2"><textarea name="txt" rows="" cols="" style="width: 700px; height: 250px;">{$txt}</textarea></td>
        </tr>
        <tr>
                <td><br /><input type="hidden" name="aktAdd" value="" /><input type="submit" class="submit" value="Zapisz" /></td>
        </tr>
</table>
</form>
{/if}
<br />

</div>
{include file="adm-footer.tpl"}
