protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode) { LoadTheme(themecode, siteid, languagecode, pcode); if (CurrentUser.id == 0) { Response.Redirect(URL("P_Login", "" + HttpUtility.UrlEncode(RequestTool.GetRequestUrlNonDomain()) + "," + GetUrlToken(RequestTool.GetRequestUrlNonDomain()) + "")); } 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_UserMessage", "0") + "\"><span>" + Tag("收件箱") + "</span></a><em>»</em><a class=\"text\"><span>" + Tag("发信息") + "</span></a>"; message_types = B_Lebi_Message_Type.GetList("Type_id_MessageTypeClass = 350", "id desc"); }
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); CurrentPage = B_Lebi_Theme_Page.GetModel("Code='P_UserMessage'"); type = Rint_Para("0"); 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>"; if (type == 0) { path += "<a href=\"" + URL("P_UserMessage", "0") + "\"><span>" + Tag("收件箱") + "</span></a>"; } else { path += "<a href=\"" + URL("P_UserMessage", "1") + "\"><span>" + Tag("发件箱") + "</span></a>"; } CurrentPage = B_Lebi_Theme_Page.GetModel("Code='P_UserMessage'"); key = Rstring("key"); type_id = Rstring("type_id"); dateFrom = Rstring("dateFrom"); dateTo = Rstring("dateTo"); DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom"); DateTime lbsql_dateTo = RequestTool.RequestDate("dateTo"); pageindex = RequestTool.RequestInt("page", 1); if (type == 0) { where = "User_id_To=" + CurrentUser.id + ""; } if (type == 1) { where = "User_id_From=" + CurrentUser.id + ""; } if (key != "") { where += " and (Title like lbsql{'%" + key + "%'})"; } if (type_id != "") { where += " and Message_Type_id = " + type_id; } if (dateFrom != "" && dateTo != "") { where += " and (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(lbsql_dateTo) + "')>=0)"; } messages = B_Lebi_Message.GetList(where, "id desc", PageSize, pageindex); int recordCount = B_Lebi_Message.Counts(where); PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}&type=" + type + "&type_id=" + type_id + "&key=" + key + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "", pageindex, PageSize, recordCount, CurrentLanguage); NextPage = "?page=" + (pageindex + 1) + "&type=" + type + "&type_id=" + type_id + "&key=" + key + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + ""; message_types = B_Lebi_Message_Type.GetList("Type_id_MessageTypeClass = 350", "id desc"); }
protected void Page_Load(object sender, EventArgs e) { if (!EX_Admin.Power("supplier_message_type_list", "类别列表")) { PageReturnMsg = PageNoPowerMsg(); } PageSize = RequestTool.getpageSize(25); key = RequestTool.RequestString("key"); string where = "Type_id_MessageTypeClass = 351"; if (key != "") { where += " and Name like lbsql{'%" + key + "%'}"; } models = B_Lebi_Message_Type.GetList(where, "Sort desc", PageSize, page); int recordCount = B_Lebi_Message_Type.Counts(where); PageString = Pager.GetPaginationString("?page={0}&key=" + key, page, PageSize, recordCount); }
public string Message_TypeOption(string type_id, string lang) { if (lang == "") { lang = CurrentLanguage.Code; } List <Lebi_Message_Type> models = B_Lebi_Message_Type.GetList("", ""); string str = ""; foreach (Lebi_Message_Type model in models) { string sel = ""; if (type_id == "" + model.id + "") { sel = "selected"; } str += "<option value=\"" + model.id + "\" " + sel + ">" + Shop.Bussiness.Language.Content(model.Name, lang) + "</option>"; } return(str); }