{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="9">Lista nieruchomości</td></tr>
        <tr class="td_list_title">
                <td width="2%">lp</td>
                <td width="20%">nazwa obiektu</td>
                <td width="10%">dodał</td>
                <td width="15%">rodzaj</td>
                <td width="15%">region</td>
                <td width="10%">wysłany<br>formularz</td>
								<td width="10%">oglądane<br>ogłoszenie</td>
                <td width="5%">status</td>
                <td width="8%">opcje</td>
        </tr>
        {assign var='i' value='0'}
        {foreach from=$object item=O}
        {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; {$O.obName|substr:0:50} ...</td>
                <td align="left">&nbsp; {$O.userName}</td>
                <td align="left">&nbsp; {$O.typeName}</td>
                <td align="left">&nbsp; {$O.stateName}</td>
                <td align="left">&nbsp; {$O.clicked }</td>
                <td align="left">&nbsp; {$O.wizyt}</td>
                <td>{if $O.obConfirm == '1'}<img src="../img/admin-object-ok.png" border="0" class="img" />{else}<img src="../img/admin-object-no.png" border="0" class="img" />{/if}</td>
                <td>
                        {if $O.obConfirm == '0'}
                        <a onclick="location.href='administrator.php?mod=object&act=accept&id={$O.obId}'" style="cursor: pointer;"><img src="../img/admin-accept.png" border="0" class="img" /></a>
                        {/if}
                        <a onclick="location.href='administrator.php?mod=edit&id={$O.obId}'" style="cursor: pointer;"><img src="../img/admin-edit.png" border="0" class="img" /></a>
                        <a onclick="javascript:if (confirm('Chcesz usunąć obiekt!\n\n Aby potwierdzić, wciśnij [ OK ], aby anulować wciśnij [ Anuluj ]\n')) location.href='{$url}&act=delete&id={$O.obId}'" style="cursor: pointer;"><img src="../img/admin-delete.png" border="0" class="img" /></a>
                </td>
        </tr>
        {/foreach}
</table>
<center>{$str}</center>
{else}
<center>lista jest pusta...</center><br />
{/if}
</div>
{include file="adm-footer.tpl"}
