{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="7">Użytkownicy</td></tr>
        <tr class="td_list_title">
                <td width="2%">lp</td>
                <td width="15%">login</td>
                <td width="15%">email</td>
                <td width="10%">miejscowo¶ć</td>
                <td width="10%">data rejestracji</td>
                <td width="5%">status</td>
                <td width="5%">opcje</td>
        </tr>
        {assign var='i' value='0'}
        {foreach from=$users item=U}
        {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'">
        {if isset($edit) && $id == $U.userId}
        <form action="{$formUrl}&id={$U.userId}" method="post" style="margin: 0px; padding: 0px;">
                <td width="2%">{$i}</td>
                <td width="15%" align="left">&nbsp; <input type="text" name="login" value="{$U.userName}" style="width: 95%" /></td>
                <td width="15%" align="left">&nbsp; <input type="text" name="email" value="{$U.userEmail}" style="width: 95%" /></td>
                <td width="10%" align="left">&nbsp; <input type="text" name="from" value="{$U.userFrom}" style="width: 93%" /></td>
                <td width="10%">{$U.userDate}</td>
                <td width="5%"><input type="checkbox" name="confirm" value="1" {if $U.userConfirm == '1'}CHECKED{/if} /></td>
                <td width="5%"><input type="hidden" name="edit" value="" /><input type="submit" value="zapisz" /></td>
        </form>
        {else}
                <td width="2%">{$i}</td>
                <td width="15%" align="left">&nbsp; {$U.userName}</td>
                <td width="15%" align="left">&nbsp; {$U.userEmail}</td>
                <td width="10%" align="left">&nbsp; {$U.userFrom}</td>
                <td width="10%">{$U.userDate}</td>
                <td width="5%">{if $U.userConfirm == '1'}<img src="../img/admin-user-ok.png" border="0" class="img" />{else}<img src="../img/admin-user-no.png" border="0" class="img" />{/if}</td>
                <td width="5%"><a onclick="location.href='{$url}&act=edit&id={$U.userId}'" style="cursor: pointer;"><img src="../img/admin-edit.png" border="0" class="img" /></a> <a onclick="javascript:if (confirm('Chcesz usun±ć użytkownika!\n\n Aby potwierdzić, wci¶nij [ OK ], aby anulować wci¶nij [ Anuluj ]\n')) location.href='{$url}&act=delete&id={$U.userId}'" style="cursor: pointer;"><img src="../img/admin-delete.png" border="0" class="img" /></a></td>
        {/if}
        </tr>
        {/foreach}
</table>
<center>{$str}</center>
{else}
<center>lista jest pusta...</center><br />
{/if}
</div>
{include file="adm-footer.tpl"}
