<!-- Header -->
<{includeq file="db:system_header.html"}>
<script type="text/javascript">
    IMG_ON = '<{xoAdminIcons success.png}>';
    IMG_OFF = '<{xoAdminIcons cancel.png}>';
</script>
<{if $view_cat}>
<!-- Display Avatar header for switch between system & custom category -->
<table class="outer" cellspacing="1">
    <thead>
        <tr>
            <th class="txtcenter"><{$smarty.const._AM_SYSTEM_AVATAR_SYSTEM}></th>
            <th class="txtcenter"><{$smarty.const._AM_SYSTEM_AVATAR_CUSTOM}></th>
        </tr>
    </thead>
    <tbody>
        <tr class="odd">
            <td class="txtcenter">
                <a class="tooltip" href="admin.php?fct=avatars&amp;op=listavt&amp;type=s" title="<{$smarty.const._AM_SYSTEM_AVATAR_SYSTEM}>">
                    <img src="<{xoAdminIcons avatar_system.png}>" alt="<{$smarty.const._AM_SYSTEM_AVATAR_SYSTEM}>" />
                </a>
                <div class="spacer"><{$smarty.const._AM_SYSTEM_AVATAR_SYSTEM}>&nbsp;:&nbsp;<strong><{$count_system}></strong></div>
            </td>
            <td class="txtcenter">
                <a class="tooltip" href="admin.php?fct=avatars&amp;op=listavt&amp;type=c" title="<{$smarty.const._AM_SYSTEM_AVATAR_CUSTOM}>">
                    <img src="<{xoAdminIcons avatar_custom.png}>" alt="<{$smarty.const._AM_SYSTEM_AVATAR_CUSTOM}>" />
                </a>
                <div class="spacer"><{$smarty.const._AM_SYSTEM_AVATAR_CUSTOM}>&nbsp;:&nbsp;<strong><{$count_custom}></strong></div>
            </td>
        </tr>
    </tbody>
</table>
<br />
<{/if}>
<!-- Display Avatar list for each category -->
<{if $avatars_list}>
<{foreach item=avatar from=$avatars_list}>
<div class="floatleft">
    <div class="ui-corner-all xo-thumb txtcenter">
        <div class="xo-thumbimg">
            <img class="tooltip" src="class/thumbs/phpThumb.php?src=<{$xoops_rootpath}>/uploads/<{$avatar.avatar_file}>&amp;h=120&amp;w=120" alt="<{$avatar.avatar_name}>" title="<{$avatar.avatar_name}>" />
        </div>
        <div class="xo-actions txtcenter">
            <div class="spacer bold"><{$avatar.avatar_name}></div>
            <img id="loading_avt<{$avatar.avatar_id}>" src="images/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img class="tooltip" id="avt<{$avatar.avatar_id}>" onclick="system_setStatus( { fct: 'avatars', op: 'display', avatar_id: <{$avatar.avatar_id}> }, 'avt<{$avatar.avatar_id}>', 'admin.php' )" src="<{if $avatar.avatar_display}><{xoAdminIcons success.png}><{else}><{xoAdminIcons cancel.png}><{/if}>" alt="<{$smarty.const._IMGDISPLAY}>" title="<{$smarty.const._IMGDISPLAY}>" />
            <{if $avatar.type == 'c'}>
            <a href="<{$xoops_url}>/modules/profile/userinfo.php?uid=<{$avatar.user}>" title="<{$smarty.const._AM_SYSTEM_AVATAR_USERS}>">
                <img src="<{xoAdminIcons user_edit.png}>" alt="<{$smarty.const._AM_SYSTEM_AVATAR_USERS}>" />
            </a>
            <{else}>
            <img class="cursorhelp tooltip" src="<{xoAdminIcons forum.png}>" alt="<{$avatar.count}> <{$smarty.const._AM_SYSTEM_AVATAR_USERS}>" title="<{$avatar.count}> <{$smarty.const._AM_SYSTEM_AVATAR_USERS}>" />
            <{/if}>
            <a class="tooltip" href="admin.php?fct=avatars&amp;op=edit&amp;avatar_id=<{$avatar.avatar_id}>" title="<{$smarty.const._EDIT}>">
                <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._EDIT}>" />
            </a>
            <{if $avatar.type == 's'}>
            <a class="tooltip" href="admin.php?fct=avatars&amp;op=delfile&amp;avatar_id=<{$avatar.avatar_id}>" title="<{$smarty.const._DELETE}>">
                <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._DELETE}>" />
            </a>
            <{/if}>
        </div>
    </div>
</div>
<{/foreach}>
<!-- Display Avatars navigation -->
<div class="clear">&nbsp;</div>
<{if $nav_menu}><div class="xo-pagenav floatright"><{$nav_menu}></div><div class="clear spacer"></div><{/if}>
<{/if}>
<!-- Display Avatar form (add,edit) -->
<{if $form}>
<div class="spacer"><{$form}></div>
<{/if}>
<!-- Display Avatar images on edit page -->
