﻿//用户访问历史相关类

function uac_get(toUserID, pageIndex, pageSize, context){

    DaShi.WebSite.Services.UserAccessHistories.List(toUserID, pageIndex, pageSize, uac_get_response, null, context);
}

function uac_get_response(list, context){

    if (!list || !context)
        return;
    
    var html = "";    
    for(var i = 0; i < list.length; i++){
    
        if(!list[i])
            continue;

        if (context.usertype == 32) {

            html += "<li style=\" width:110px; overflow:hidden;\"><nobr>· <a href=\"http://" + list[i].Domain + ".z6.cn/\" target=\"_blank\" title=\"" + list[i].NickName + "于" + list[i].JoinTime.toLocaleString() + "到此一游。\">" + list[i].NickName + "</a></nobr> </li>";
        }

        else if (context.usertype == 4) {

            html += '<li><a title="' + list[i].NickName + '于' + list[i].JoinTime.toLocaleString() + '到此一游。" href="http://' + list[i].Domain + '.z6.cn/" target="">' +
                '   <img height="48" src="http://www.z6img.cn/upload/face/users/' + list[i].Face + '" width="44" border="0" class="imageborder">' +
                '   </a>' +
                '   <a title="' + list[i].NickName + '于' + list[i].JoinTime.toLocaleString() + '到此一游。" href="http://' + list[i].Domain + '.z6.cn/" target="">' +
                            list[i].NickName +
                '   </a>' +
                '</li>';
        }
        else if (context.usertype == 8) {

            html += '<li>' +
                    '    <a class="text_two_a" href="http://' + list[i].Domain + '.z6.cn/" target="_blank">' +
                    '        <img class="imgborder" height="48" src="http://www.z6img.cn/upload/face/users/' + list[i].Face + '"' +
                    '            width="42" border="0" alt="' + list[i].NickName + '" /></a>' +
                    '    <a title="_tmpuser.NickName" href="http://' + list[i].Domain + '.z6.cn/" target="_blank">' +
                            list[i].NickName +
                    '    </a>' +
                    '</li>';
        }
        else if (context.usertype == 16) {
        html += '<li style="float: left; width: 70px; height: 89px; overflow: hidden">' +
                    '   <table cellspacing="0" cellpadding="0" width="60" border="0">' +
                    '       <tr>' +
                    '          <td align="center" width="60">' +
                    '               <a class="text_two_a" href="http://' + list[i].Domain + '.z6.cn/" target="_blank">' +
                    '                   <img class="imgborder" height="52" src="http://www.z6img.cn/upload/face/users/' + list[i].Face + '"' +
                    '                       width="60" border="0" alt="' + list[i].NickName + '-大师网z6.cn" /></a>' +
                    '           </td>' +
                    '       </tr>' +
                    '       <tr>' +
                    '           <td align="center" height="22">' +
                    '               <a class="text_two_a" href="http://' + list[i].Domain + '.z6.cn/" target="_blank" title="' + list[i].NickName + '">' +
                    '                   <nobr>' + list[i].RealName + '</nobr>' +
                    '               </a>' +
                    '           </td>' +
                    '       </tr>' +
                    '   </table>' +
                    '</li>';
        }
    }

    context.object.innerHTML = html;
}

