/// <summary> /// 返回一组类型并排除授权之外的类型 /// </summary> /// <param name="class_"></param> /// <returns></returns> public static List <Lebi_Type> GetTypes(string class_, string wheresql = "") { string where = "Class='" + class_ + "' " + wheresql; if (!Shop.LebiAPI.Service.Instanse.Check("plugin_gongyingshang")) { where += " and id !=102 and id !=103"; } List <Lebi_Type> models = B_Lebi_Type.GetList(where, "Sort desc"); return(models); }
public string SearchTab() { string str = ""; List <Lebi_Type> ts = B_Lebi_Type.GetList("Class='CardType'", "id asc"); foreach (Lebi_Type t in ts) { string sel = ""; if (cardtype == t.id) { sel = "class=\"selected\""; } str += "<li " + sel + "><a href=\"?cardtype=" + t.id + "\"><span>" + Tag(t.Name) + "</span></a></li>"; } return(str); }
protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode) { if (CurrentUser.id == 0) { Response.Redirect(URL("P_Login", "" + HttpUtility.UrlEncode(RequestTool.GetRequestUrlNonDomain()) + "," + GetUrlToken(RequestTool.GetRequestUrlNonDomain()) + "")); } LoadTheme(themecode, siteid, languagecode, pcode); path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">»</em><a href=\"" + URL("P_UserCenter", "") + "\"><span>" + Tag("会员中心") + "</span></a><em>»</em><a href=\"" + URL("P_UserAsk", "") + "\"><span>" + Tag("商品咨询") + "</span></a>"; key = Rstring("key"); dateFrom = Rstring("dateFrom"); dateTo = Rstring("dateTo"); DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom"); DateTime lbsql_dateTo = RequestTool.RequestDate("dateTo"); status = RequestTool.RequestInt("status", 0); types = B_Lebi_Type.GetList("Class='AskStatus'", "sort desc"); pageindex = RequestTool.RequestInt("page", 1); where = "Parentid = 0 and TableName = 'Product_Ask' and User_id=" + CurrentUser.id + ""; if (key != "") { where += " and (Content like lbsql{'%" + key + "%'})"; } if (dateFrom != "" && dateTo != "") { where += " and (datediff(d,Time_Add,'" + lbsql_dateFrom + "')<=0 and datediff(d,Time_Add,'" + lbsql_dateTo + "')>=0)"; } if (status > 0) { where += " and (Status = " + status + ")"; } comments = B_Lebi_Comment.GetList(where, "id desc", PageSize, pageindex); foreach (Shop.Model.Lebi_Comment c in comments) { c.IsRead = 1; B_Lebi_Comment.Update(c); } int recordCount = B_Lebi_Comment.Counts(where); PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&key=" + key + "&status=" + status + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "", pageindex, PageSize, recordCount, CurrentLanguage); }