<%-- --%>
<% var lens = activityList.Count; if (lens == 0) { %> <% } else if (lens <= 5) { %>
<%for (int i = 0; i < activityList.Count; i++) { var temp = activityList[i]; %> <% } %>
<% } else {%>
<%for (int i = 0; i < 5; i++) { var temp = activityList[i]; var maskUrl = string.Empty; var display = ""; var url = string.Empty; switch ((NebulaSamadi.Entity.MaterialType)temp.MaterialType) { case NebulaSamadi.Entity.MaterialType.PictureText: display = "display:none;"; url = string.Format("http://wx-dafan.sharing8.cn/hdtz.php?ID={0}",temp.ID); break; case NebulaSamadi.Entity.MaterialType.PictureAlbum: maskUrl = "img/fscy/pictures.png"; url = string.Format("{0}", temp.Link); break; case NebulaSamadi.Entity.MaterialType.Voice: maskUrl = "img/fscy/audio.png"; if (!string.IsNullOrEmpty(temp.Voice)) { if (temp.Voice.Contains("cyzsmusic.aspx") || temp.Voice.Contains("mzzymusic.aspx")) { url = string.Format("{0}", temp.Voice); } else { url = string.Format("http://wx-dafan.sharing8.cn/music.aspx?ObjectID={0}&ObjectType{1}&Link={2}", temp.ID, (int)NebulaSamadi.Entity.ObjectType.Activity, temp.Voice); } } break; case NebulaSamadi.Entity.MaterialType.Video: maskUrl = "img/fscy/video.png"; if (!string.IsNullOrEmpty(temp.Video)) { if (temp.Video.Contains("mryj.aspx")) { url = string.Format("{0}", temp.Video); } else { url = string.Format("http://wx-dafan.sharing8.cn/video.aspx?Type=Mobile&ObjectID={0}&ObjectType{1}&Link={2}", temp.ID, (int)NebulaSamadi.Entity.ObjectType.Activity, temp.Video); } } break; case NebulaSamadi.Entity.MaterialType.Music: maskUrl = "img/fscy/audio.png"; if (!string.IsNullOrEmpty(temp.Music)) { if (temp.Music.Contains("cyzsmusic.aspx") || temp.Music.Contains("mzzymusic.aspx")) { url = string.Format("{0}", temp.Music); } else { url = string.Format("http://wx-dafan.sharing8.cn/music.aspx?ObjectID={0}&ObjectType{1}&Link={2}", temp.ID, (int)NebulaSamadi.Entity.ObjectType.Activity, temp.Music); } } break; default: display = "display:none;"; break; } %> <% } %>
<%--end for --%>
<%for (int i = 5; i < activityList.Count; i++) { var temp = activityList[i]; var maskUrl = string.Empty; var display = ""; var url = string.Empty; switch ((NebulaSamadi.Entity.MaterialType)temp.MaterialType) { case NebulaSamadi.Entity.MaterialType.PictureText: display = "display:none;"; url = string.Format("http://wx-dafan.sharing8.cn/hdtz.php?ID={0}", temp.ID); break; case NebulaSamadi.Entity.MaterialType.PictureAlbum: maskUrl = "img/fscy/pictures.png"; url = string.Format("{0}", temp.Link); break; case NebulaSamadi.Entity.MaterialType.Voice: maskUrl = "img/fscy/audio.png"; if (!string.IsNullOrEmpty(temp.Voice)) { if (temp.Voice.Contains("cyzsmusic.aspx") || temp.Voice.Contains("mzzymusic.aspx")) { url = string.Format("{0}", temp.Voice); } else { url = string.Format("http://wx-dafan.sharing8.cn/music.aspx?ObjectID={0}&ObjectType{1}&Link={2}", temp.ID, (int)NebulaSamadi.Entity.ObjectType.Activity, temp.Voice); } } break; case NebulaSamadi.Entity.MaterialType.Video: maskUrl = "img/fscy/video.png"; if (!string.IsNullOrEmpty(temp.Video)) { if (temp.Video.Contains("mryj.aspx")) { url = string.Format("{0}", temp.Video); } else { url = string.Format("http://wx-dafan.sharing8.cn/video.aspx?Type=Mobile&ObjectID={0}&ObjectType{1}&Link={2}", temp.ID, (int)NebulaSamadi.Entity.ObjectType.Activity, temp.Video); } } break; case NebulaSamadi.Entity.MaterialType.Music: maskUrl = "img/fscy/audio.png"; if (!string.IsNullOrEmpty(temp.Music)) { if (temp.Music.Contains("cyzsmusic.aspx") || temp.Music.Contains("mzzymusic.aspx")) { url = string.Format("{0}", temp.Music); } else { url = string.Format("http://wx-dafan.sharing8.cn/music.aspx?ObjectID={0}&ObjectType{1}&Link={2}", temp.ID, (int)NebulaSamadi.Entity.ObjectType.Activity, temp.Music); } } break; default: display = "display:none;"; break; } %> <% } %>
<% }%>