﻿//用户访问浏览量

 

//案例 浏览量
function case_get(currentUserID, context) {

    DaShi.WebSite.Services.Cases.List2(currentUserID,case_get_response,null,context);
   
}
function case_get_response(list, context) {
 
    if (list!=null&&context!=null) {
       
            var html = "";
            var Host = context.Host;
           
            if (context.usertype == 1) {
                for (var i = 0; i < list.length; i++) {
                
                    if (list[i] != null&&i<20) {
                        html += "<li><span>浏览(" + list[i].Hits + ")</span>";
                        html += "<a href=\"http://" + Host + "/home/" + list[i].UrlName + " \" >";
                        html += list[i].Title;
                        html += "</a></li>";
                    }
                }
            }
           else  if (context.usertype == 2) {
                    for (var i = 0; i < list.length; i++) {
                        if (list[i] != null && i < 20) {
                            html += "<li><span>浏览:" + list[i].Hits + "</span>";
                            html += "<a href=\"http://" + Host + "/home/" + list[i].UrlName + " \" >";
                            html += list[i].Title;
                            html += "</a></li>";
                        }
                    }
                }
            else if(context.usertype==3)
            {
               for (var i = 0; i < list.length; i++) {
                   if (list[i] != null && i < 20) {
                            html += "<li class='new_phli'> ";
                            html += "<a href=\"http://" + Host + "/team/" + list[i].UrlName + " \" >";
                            html += list[i].Title;
                            html += "</a>";
                            html+="<span width='120px' align='right'>浏览(" + list[i].Hits + ")</span>";
                            html+="</li>";
                        }
                    }
                }
                else if (context.usertype == 4) {
                
                    for (var i = 0; i < list.length; i++) {
                        if (list[i] != null && i < 20) {
                            html += "<li> ";
                            html += " <img src='http://www.z6img.cn/home/images/AlbumsPowerPoint_tjal2.gif' width='12' height='9' border='0' />";
                            html += "<a href=\"http://" + Host + "/home/" + list[i].UrlName + " \" >";
                            html += list[i].Title;
                            html += "</a>";
                            html += "(" + list[i].Hits + ")";
                            html += "</li>";
                        }
                    }
                    //html += "<li>"+"<img src='images/AlbumsPowerPoint_db.gif' width='201' height='18' border='0' alt='' />"+"</li>";
                }
               
            context.object.innerHTML = html;
     }

 }

 //作品访问量
 function photo_get(currentUserID, context) {

     DaShi.WebSite.Services.Photo_List(currentUserID, photo_get_response, null, context);

 }
 function photo_get_response(list, context) {
     if (list != null && context != null) {

         var html = "";
         var Host = context.Host;

         if (context.usertype == 1) {
             for (var i = 0; i < list.length; i++) {
                 if (list[i] != null) {
                     
                 }
             }
         }
       
         context.object.innerHTML = html;
     }

 }