<{include file="db:system_header.tpl"}>
<script type="text/javascript">
    IMG_ON = "<{xoAdminIcons 'success.png'}>";
    IMG_OFF = "<{xoAdminIcons 'cancel.png'}>";
</script>
<!--User rank-->
<{if isset($userrank_count) && $userrank_count == true}>
    <div class="floatright">
        <div class="xo-buttons">
            <a class="ui-corner-all tooltip" href="admin.php?fct=userrank&amp;op=userrank_new" title="<{$smarty.const._AM_SYSTEM_USERRANK_ADD}>">
                <img src="<{xoAdminIcons 'add.png'}>" alt="<{$smarty.const._AM_SYSTEM_USERRANK_ADD}>"/>
                <{$smarty.const._AM_SYSTEM_USERRANK_ADD}>
            </a>
        </div>
    </div>
    <table id="xo-rank-sorter" cellspacing="1" class="outer tablesorter">
        <thead>
        <tr>
            <th class="txtcenter"><{$smarty.const._AM_SYSTEM_USERRANK_IMAGE}></th>
            <th class="txtcenter"><{$smarty.const._AM_SYSTEM_USERRANK_TITLE}></th>
            <th class="txtcenter"><{$smarty.const._AM_SYSTEM_USERRANK_MINPOST}></th>
            <th class="txtcenter"><{$smarty.const._AM_SYSTEM_USERRANK_MAXPOST}></th>
            <th class="txtcenter"><{$smarty.const._AM_SYSTEM_USERRANK_SPECIAL}></th>
            <th class="txtcenter width10"><{$smarty.const._AM_SYSTEM_USERRANK_ACTION}></th>
        </tr>
        </thead>
        <tbody>
        <{foreach item=rankinfo from=$userrank|default:null}>
            <tr class="<{cycle values='even,odd'}> alignmiddle">
                <td class="txtcenter"><{$rankinfo.rank_image}></td>
                <td class="txtcenter"><{$rankinfo.rank_title}></td>
                <td class="txtcenter"><{$rankinfo.rank_min}></td>
                <td class="txtcenter"><{$rankinfo.rank_max}></td>
                <td class="xo-actions txtcenter"><img id="loading_sml<{$rankinfo.rank_id}>" src="images/spinner.gif" style="display:none;"
                                                      alt="<{$smarty.const._AM_SYSTEM_LOADING}>"/><img class="cursorpointer tooltip"
                                                                                                       id="sml<{$rankinfo.rank_id}>"
                                                                                                       onclick="system_setStatus( { fct: 'userrank', op: 'userrank_update_special', rank_id: <{$rankinfo.rank_id}> }, 'sml<{$rankinfo.rank_id}>', 'admin.php' )"
                                                                                                       src="<{if $rankinfo.rank_special}><{xoAdminIcons 'success.png'}><{else}><{xoAdminIcons 'cancel.png'}><{/if}>"
                                                                                                       alt="<{if $rankinfo.rank_special}><{$smarty.const._AM_SYSTEM_USERRANK_OFF}><{else}><{$smarty.const._AM_SYSTEM_USERRANK_ON}><{/if}>"
                                                                                                       title="<{if $rankinfo.rank_special}><{$smarty.const._AM_SYSTEM_USERRANK_OFF}><{else}><{$smarty.const._AM_SYSTEM_USERRANK_ON}><{/if}>"/>
                </td>
                <td class="xo-actions txtcenter">
                    <a class="tooltip" href="admin.php?fct=userrank&amp;op=userrank_edit&amp;rank_id=<{$rankinfo.rank_id}>"
                       title="<{$smarty.const._AM_SYSTEM_USERRANK_EDIT}>">
                        <img src="<{xoAdminIcons 'edit.png'}>" alt="<{$smarty.const._AM_SYSTEM_USERRANK_EDIT}>"/></a>
                    <a class="tooltip" href="admin.php?fct=userrank&amp;op=userrank_delete&amp;rank_id=<{$rankinfo.rank_id}>"
                       title="<{$smarty.const._AM_SYSTEM_USERRANK_DELETE}>">
                        <img src="<{xoAdminIcons 'delete.png'}>" alt="<{$smarty.const._AM_SYSTEM_USERRANK_DELETE}>"/></a>
                </td>
            </tr>
        <{/foreach}>
        </tbody>
    </table>
    <!-- Display rank navigation -->
    <div class="clear spacer"></div>
    <{if !empty($nav_menu)}>
        <div class="xo-avatar-pagenav floatright"><{$nav_menu}></div>
        <div class="clear spacer"></div>
    <{/if}>
<{/if}>
<!--Display rank form (add,edit)-->
<{if !empty($form)}>
    <div class="spacer"><{$form}></div>
<{/if}>

