//protected string ShowDebateAspxRewrite(string topicid) //{ // return this.ShowDebateAspxRewrite(topicid.ToInt(0)); //} //protected string ShowDebateAspxRewrite(int topicid) //{ // return Urls.ShowDebateAspxRewrite(topicid); //} //protected string ShowBonusAspxRewrite(string topicid, int pageid) //{ // return this.ShowBonusAspxRewrite(topicid.ToInt(0), (pageid <= 0) ? 0 : pageid); //} //protected string ShowBonusAspxRewrite(int topicid, int pageid) //{ // return Urls.ShowBonusAspxRewrite(topicid, pageid); //} protected string UserInfoAspxRewrite(int userid) { return(Urls.UserInfoAspxRewrite(userid)); }
public static string GetUserRankHtml(IUser[] users, string type, int maxrows) { var sb = new StringBuilder(); string text = ""; int num = maxrows; //int i = 0; //while (i < users.Length) for (int i = 0; i < users.Length; i++, num--) { var user = users[i]; if (user == null) { continue; } string str = string.Empty; if (type != null) { switch (type) { case "credits": str = user.Credits + ""; break; case "extcredits1": str = user.ExtCredits1 + ""; text = Scoresets.GetValidScoreUnit()[1]; break; case "extcredits2": str = user.ExtCredits2 + ""; text = Scoresets.GetValidScoreUnit()[2]; break; case "extcredits3": str = user.ExtCredits3 + ""; text = Scoresets.GetValidScoreUnit()[3]; break; case "extcredits4": str = user.ExtCredits4 + ""; text = Scoresets.GetValidScoreUnit()[4]; break; case "extcredits5": str = user.ExtCredits5 + ""; text = Scoresets.GetValidScoreUnit()[5]; break; case "extcredits6": str = user.ExtCredits6 + ""; text = Scoresets.GetValidScoreUnit()[6]; break; case "extcredits7": str = user.ExtCredits7 + ""; text = Scoresets.GetValidScoreUnit()[7]; break; case "extcredits8": str = user.ExtCredits8 + ""; text = Scoresets.GetValidScoreUnit()[8]; break; case "digestposts": str = user.DigestPosts + ""; break; case "onlinetime": str = Math.Round(user["OnlineTime"].ToDouble() / 60.0, 2).ToString(); text = "小时"; break; default: //goto IL_259; break; } } //IL_259: str = user.Posts.ToString(); // goto IL_26A; //IL_26A: sb.AppendFormat("<li><em>{0}</em><a href=\"{1}\" target=\"_blank\">{2}</a></li>", str + ((text == string.Empty) ? string.Empty : (" " + text)), Urls.UserInfoAspxRewrite(user.ID), user.Name); //num--; //i++; //continue; } for (int j = 0; j < num; j++) { sb.Append("<li> </li>"); } return(sb.ToString()); }