{if:isSearch}
<h1>Search results:</h1>
<a href="{zoner}?target={target}">&lt;&lt; Back</a><br>
{else:}
<h1>Users list:</h1>
{end:}
<flexy:component name="users_pager" class="pager" source="user.list" param="page" order="id DESC">

<TABLE border=0>
<TR>
    <TD class=caption width=1%>
    <input type="checkbox" id="mcb" onclick="processCheckboxes()"></TD>
    <TD class=caption>E-mail</TD>
    <TD class=caption width=100%>Password</TD>
    <TD class=caption>&nbsp;</TD>
</TR>
{if:users_pager.data}
    <form action="admin.php" method=POST>
    <input type=hidden name=action value=delete>
    <flexy:component name="ff" class="fill_hidden" exclude="page">

    {foreach:users_pager.data,n}
    <TR>
        <TD><input id="ulcb" type=checkbox name="ids[{n[id]}]" flexy:ignore></TD>
        <TD>{n[email]}</TD>
        <TD>{n[password]}</TD>
        <TD><a href="admin.php?target=users&page={page}&mode=edit&id={n[id]}">Edit</a></TD>
    </TR>
    {end:}

    <TR>
        <TD colspan=5 class=caption>
        <input type=submit value=" Delete selected users ">
        </TD>
    </TR>

    </form>
{else:}
    <TR>
        <TD colspan=3>Empty list</TD>
{end:}
</TABLE>

<script language="javascript">
    function processCheckboxes() {
        var mcb = document.getElementById("mcb");
        var list = document.getElementsByTagName("input");
        for(var i in list) {
            if(list[i].id == "ulcb") {
                list[i].checked = mcb.checked;
            }
        }
    }
</script>