Example #1
0
        public string QuestionName(int id)
        {
            Lebi_User_Question model = B_Lebi_User_Question.GetModel(id);

            if (model != null)
            {
                return(Lang(model.Name));
            }
            return("");
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!EX_Admin.Power("user_edit", "编辑会员"))
     {
         WindowNoPower();
     }
     id             = RequestTool.RequestInt("id", 0);
     user_questions = B_Lebi_User_Question.GetList("", "Sort desc");
     where          = "User_id=" + id + "";
     user_answers   = B_Lebi_User_Answer.GetList(where, "id asc", 20, 1);
     recordCount    = B_Lebi_User_Answer.Counts(where);
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = RequestTool.RequestInt("id", 0);

            if (!EX_Admin.Power("question_list", "安全问题"))
            {
                PageNoPower();
            }
            model = B_Lebi_User_Question.GetModel(id);
            if (model == null)
            {
                model = new Lebi_User_Question();
            }
        }
Example #4
0
 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_UserQuestion'");
     type           = Rint_Para("0");
     path           = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">&raquo;</em><a href=\"" + URL("P_UserCenter", "") + "\"><span>" + Tag("会员中心") + "</span></a><em>&raquo;</em><a class=\"text\"><span>" + Tag("安全问题") + "</span></a>";
     user_questions = B_Lebi_User_Question.GetList("", "Sort desc");
     where          = "User_id=" + CurrentUser.id + "";
     user_answers   = B_Lebi_User_Answer.GetList(where, "id asc", 20, 1);
     recordCount    = B_Lebi_User_Answer.Counts(where);
 }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("question_list", "安全问题"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize = RequestTool.getpageSize(25);
            lang     = RequestTool.RequestString("lang");
            key      = RequestTool.RequestString("key");
            if (lang == "")
            {
                lang = "CN";
            }
            string where = "1=1";
            if (key != "")
            {
                where += " and Name like lbsql{'%" + key + "%'}";
            }
            models = B_Lebi_User_Question.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_User_Question.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&lang=" + lang + "&key=" + key, page, PageSize, recordCount);
        }