Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = PLRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == PLEnums.ActionEnum.Edit.ToString())
            {
                this.action = PLEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = PLRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.article_attribute_field().Exists(this.id))
                {
                    JscriptMsg("记录不存在或已被删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel(" sys_channel_field", PLEnums.ActionEnum.View.ToString());                                                                          //检查权限
                dlIsPassWord.Visible = dlIsHtml.Visible = dlEditorType.Visible = dlDataType.Visible
                                                                                     = dlDataLength.Visible = dlDataPlace.Visible = dlItemOption.Visible = false; //隐藏相应控件
                if (action == PLEnums.ActionEnum.Edit.ToString())                                                                                                 //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Esempio n. 2
0
        protected int totalcount;                 //OUT数据总数

        /// <summary>
        /// 重写虚方法,此方法将在Init事件前执行
        /// </summary>
        protected override void ShowPage()
        {
            page    = PLRequest.GetQueryInt("page", 1);
            tags    = PLRequest.GetQueryString("tags").Replace("'", string.Empty);
            keyword = PLRequest.GetQueryString("keyword").Replace("'", string.Empty);
            channel = PLRequest.GetQueryString("channel").Replace("'", string.Empty);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     this.channel_id  = PLRequest.GetQueryInt("channel_id");
     this.category_id = PLRequest.GetQueryInt("category_id");
     this.area_id     = PLRequest.GetQueryInt("area_id");
     this.keywords    = PLRequest.GetQueryString("keywords");
     this.property    = PLRequest.GetQueryString("property");
     if (channel_id == 0)
     {
         JscriptMsg("频道参数不正确!", "back");
         return;
     }
     this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得频道名称
     this.pageSize     = GetPageSize(10);                                   //每页数量
     this.prolistview  = Utils.GetCookie("article_list_view");              //显示方式
     //获取页面所有操作权限
     auths               = GetAdminAuth("channel_" + this.channel_name + "_list");
     btnSave.Visible     = auths[PLEnums.ActionEnum.Edit];
     btnAudit.Visible    = auths[PLEnums.ActionEnum.Audit];
     btnReturned.Visible = auths[PLEnums.ActionEnum.Returned];
     btnDelete.Visible   = auths[PLEnums.ActionEnum.Delete];
     if (!Page.IsPostBack)
     {
         ChkAdminLevel("channel_" + this.channel_name + "_list", PLEnums.ActionEnum.View.ToString()); //检查权限
         TreeBind(this.channel_id);                                                                   //绑定类别
         TreeBindArea();                                                                              //绑定地区
         RptBind(this.channel_id, this.category_id, this.area_id, "id>0" + CombSqlTxt(this.keywords, this.property), "sort_id asc,add_time desc,id desc");
     }
 }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = PLRequest.GetQueryString("action");

            this.id = PLRequest.GetQueryInt("id");

            if (!string.IsNullOrEmpty(_action) && _action == PLEnums.ActionEnum.Edit.ToString())
            {
                this.action = PLEnums.ActionEnum.Edit.ToString();//修改类型
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.manager_role().Exists(this.id))
                {
                    JscriptMsg("角色不存在或已被删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("manager_role", PLEnums.ActionEnum.View.ToString()); //检查权限
                RoleTypeBind();                                                    //绑定角色类型
                NavBind();                                                         //绑定导航
                if (action == PLEnums.ActionEnum.Edit.ToString())                  //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Esempio n. 5
0
        private int id        = 0;                                 //公众账户ID

        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = PLRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == PLEnums.ActionEnum.Edit.ToString())
            {
                this.action = PLEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = PLRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.weixin_account().Exists(this.id))
                {
                    JscriptMsg("记录不存在或已删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("weixin_custom_menu", PLEnums.ActionEnum.View.ToString()); //检查权限
                TreeBind();                                                              //绑定公众账户
                if (action == PLEnums.ActionEnum.Edit.ToString())                        //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = PLRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == PLEnums.ActionEnum.Edit.ToString())
            {
                this.action = PLEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = PLRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.channel().Exists(this.id))
                {
                    JscriptMsg("记录不存在或已删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("sys_channel_manage", PLEnums.ActionEnum.View.ToString()); //检查权限
                TreeBind();                                                              //绑定类别
                FieldBind();                                                             //绑定扩展字段
                if (action == PLEnums.ActionEnum.Edit.ToString())                        //修改
                {
                    ShowInfo(this.id);
                }
                else
                {
                    txtName.Attributes.Add("ajaxurl", "../../tools/admin_ajax.ashx?action=channel_name_validate");
                }
            }
        }
Esempio n. 7
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = PLRequest.GetQueryInt("page", 1);
            if (this.status > 0)
            {
                this.ddlStatus.SelectedValue = this.status.ToString();
            }
            if (this.payment_status > 0)
            {
                this.ddlPaymentStatus.SelectedValue = this.payment_status.ToString();
            }
            if (this.express_status > 0)
            {
                this.ddlExpressStatus.SelectedValue = this.express_status.ToString();
            }
            txtKeywords.Text = this.keywords;
            BLL.orders bll = new BLL.orders();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("order_list.aspx", "status={0}&payment_status={1}&express_status={2}&keywords={3}&page={4}",
                                              this.status.ToString(), this.payment_status.ToString(), this.express_status.ToString(), this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
        private int id        = 0;            //公众账户ID

        protected void Page_Load(object sender, EventArgs e)
        {
            this.action = PLRequest.GetQueryString("action"); //获取消息类型
            this.id     = PLRequest.GetQueryInt("id", 0);     //获取公众账户ID
            if (action.ToLower() == "default")
            {
                ChkAdminLevel("weixin_subscribe_default", PLEnums.ActionEnum.View.ToString()); //检查权限
                hideReqestType.Value = "0";                                                    //默认回复
                litPosition1.Text    = litPosition2.Text = "默认回复";
            }
            else if (action.ToLower() == "cancel")
            {
                ChkAdminLevel("weixin_subscribe_cancel", PLEnums.ActionEnum.View.ToString()); //检查权限
                hideReqestType.Value = "7";                                                   //取消关注
                litPosition1.Text    = litPosition2.Text = "取消回复";
            }
            else
            {
                ChkAdminLevel("weixin_subscribe_subscribe", PLEnums.ActionEnum.View.ToString()); //检查权限
                hideReqestType.Value = "6";                                                      //关注回复
                litPosition1.Text    = litPosition2.Text = "关注回复";
            }

            if (!Page.IsPostBack)
            {
                TreeBind(); //绑定公众账户
                if (this.id > 0)
                {
                    ShowInfo(this.id);
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = PLRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == PLEnums.ActionEnum.Edit.ToString())
            {
                this.action = PLEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = PLRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.sms_template().Exists(this.id))
                {
                    JscriptMsg("记录不存在或已被删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("user_sms_template", PLEnums.ActionEnum.View.ToString()); //检查权限
                if (action == PLEnums.ActionEnum.Edit.ToString())                       //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Esempio n. 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.type_id  = PLRequest.GetQueryInt("type_id");
            this.keywords = PLRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("user_message", PLEnums.ActionEnum.View.ToString()); //检查权限
                RptBind("id>0" + CombSqlTxt(this.type_id, this.keywords), "post_time desc,id desc");
            }
        }
Esempio n. 11
0
        //页面加载事件
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = PLRequest.GetQueryString("action");

            if (this.channel_id == 0)
            {
                JscriptMsg("频道参数不正确!", "back");
                return;
            }
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得频道名称
            //如果是编辑或复制则检查信息是否存在
            if (_action == PLEnums.ActionEnum.Edit.ToString() || _action == PLEnums.ActionEnum.Copy.ToString())
            {
                this.action = _action;//修改或复制类型
                this.id     = PLRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.article().Exists(this.id))
                {
                    JscriptMsg("信息不存在或已被删除!", "back");
                    return;
                }
                //如果roletype==1即是超级管理组
                if (GetAdminInfo().role_type != 1 && new BLL.article().GetModel(this.id).user_id != GetAdminInfo().id)
                {
                    JscriptMsg("无权修改该信息!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("channel_" + this.channel_name + "_list", PLEnums.ActionEnum.View.ToString());      //检查权限
                ShowSysField(this.channel_id);                                                                    //显示相应的默认控件
                TreeBind(this.channel_id);                                                                        //绑定类别
                TreeBindArea();                                                                                   //绑定地区
                RptBind("parent_id=0", "sort_id asc,id desc");                                                    //绑定规格
                if (action == PLEnums.ActionEnum.Edit.ToString() || action == PLEnums.ActionEnum.Copy.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
                //所有操作以后都是待审核
                if (action == PLEnums.ActionEnum.Add.ToString() || action == PLEnums.ActionEnum.Copy.ToString() || action == PLEnums.ActionEnum.Edit.ToString())
                {
                    if (GetAdminInfo().role_type != 1)
                    {
                        rblStatus.Enabled = false;
                    }
                }
            }
        }
Esempio n. 12
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page             = PLRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            BLL.link bll = new BLL.link();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("index.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ChkAdminLevel("user_list", PLEnums.ActionEnum.View.ToString()); //检查权限
            this.group_id = PLRequest.GetQueryInt("group_id");
            this.keywords = PLRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                TreeBind("is_lock=0"); //绑定类别
                RptBind("id>0" + CombSqlTxt(this.group_id, this.keywords), "reg_time desc,id desc");
            }
        }
Esempio n. 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.site_id  = PLRequest.GetQueryInt("site_id");
            this.keywords = PLRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("sys_channel_manage", PLEnums.ActionEnum.View.ToString()); //检查权限
                TreeBind();                                                              //绑定类别
                RptBind("id>0" + CombSqlTxt(site_id, keywords), "sort_id asc,id desc");
            }
        }
Esempio n. 15
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = PLRequest.GetQueryInt("page", 1);
            ddlSiteId.SelectedValue = this.site_id.ToString();
            txtKeywords.Text        = this.keywords;
            BLL.channel bll = new BLL.channel();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("channel_list.aspx", "site_id={0}&keywords={1}&page={2}", this.site_id.ToString(), this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
        protected string channel_name = string.Empty; //频道名称

        protected void Page_Load(object sender, EventArgs e)
        {
            this.channel_id   = PLRequest.GetQueryInt("channel_id");
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得频道名称
            if (this.channel_id == 0)
            {
                JscriptMsg("频道参数不正确!", "back");
                return;
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("channel_" + this.channel_name + "_category", PLEnums.ActionEnum.View.ToString()); //检查权限
                RptBind();
            }
        }
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = PLRequest.GetQueryInt("page", 1);
            this.ddlControlType.SelectedValue = this.control_type;
            this.txtKeywords.Text             = this.keywords;
            BLL.article_attribute_field bll = new BLL.article_attribute_field();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("attribute_field_list.aspx", "control_type={0}&keywords={1}&page={2}", this.control_type, this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 18
0
 protected Model.article_category model = new Model.article_category(); //分类的实体
 /// <summary>
 /// 重写虚方法,此方法将在Init事件前执行
 /// </summary>
 protected override void ShowPage()
 {
     page        = PLRequest.GetQueryInt("page", 1);
     area_id     = PLRequest.GetQueryInt("area_id", 0);
     category_id = PLRequest.GetQueryInt("category_id");
     BLL.article_category bll = new BLL.article_category();
     model.title = "所有类别";
     if (category_id > 0) //如果ID获取到,将使用ID
     {
         if (bll.Exists(category_id))
         {
             model = bll.GetModel(category_id);
         }
     }
 }
Esempio n. 19
0
 /// <summary>
 /// 重写虚方法,此方法在Init事件执行
 /// </summary>
 protected override void InitPage()
 {
     id = PLRequest.GetQueryInt("id");
     BLL.user_message bll = new BLL.user_message();
     if (!bll.Exists(id))
     {
         HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode("出错了,您要浏览的页面不存在或已删除!")));
         return;
     }
     model = bll.GetModel(id);
     if (model.accept_user_name != userModel.user_name && model.post_user_name != userModel.user_name)
     {
         HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode("出错了,您所查看的并非自己的短消息!")));
         return;
     }
     //设为已阅读状态
     bll.UpdateField(id, "is_read=1,read_time='" + DateTime.Now + "'");
 }
Esempio n. 20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = PLRequest.GetQueryString("action");

            this.channel_id = PLRequest.GetQueryInt("channel_id");
            this.id         = PLRequest.GetQueryInt("id");

            if (this.channel_id == 0)
            {
                JscriptMsg("频道参数不正确!", "back");
                return;
            }
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得频道名称
            if (!string.IsNullOrEmpty(_action) && _action == PLEnums.ActionEnum.Edit.ToString())
            {
                this.action = PLEnums.ActionEnum.Edit.ToString();//修改类型
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.article_category().Exists(this.id))
                {
                    JscriptMsg("类别不存在或已被删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("channel_" + this.channel_name + "_category", PLEnums.ActionEnum.View.ToString()); //检查权限
                TreeBind(this.channel_id);                                                                       //绑定类别
                if (action == PLEnums.ActionEnum.Edit.ToString())                                                //修改
                {
                    ShowInfo(this.id);
                }
                else
                {
                    if (this.id > 0)
                    {
                        this.ddlParentId.SelectedValue = this.id.ToString();
                    }
                }
            }
        }
Esempio n. 21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.id = PLRequest.GetQueryInt("id");
     if (this.id == 0)
     {
         JscriptMsg("传输参数不正确!", "back");
         return;
     }
     if (!new BLL.feedback().Exists(this.id))
     {
         JscriptMsg("信息不存在或已被删除!", "back");
         return;
     }
     if (!Page.IsPostBack)
     {
         ChkAdminLevel("plugin_feedback", PLEnums.ActionEnum.View.ToString()); //检查权限
         ShowInfo(this.id);
     }
 }
Esempio n. 22
0
 /// <summary>
 /// 重写虚方法,此方法在Init事件执行
 /// </summary>
 protected override void InitPage()
 {
     action = PLRequest.GetQueryString("action");
     id     = PLRequest.GetQueryInt("id");
     if (action.ToLower() == PLEnums.ActionEnum.Edit.ToString().ToLower())
     {
         BLL.user_addr_book bll = new BLL.user_addr_book();
         if (!bll.Exists(id))
         {
             HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode("出错了,您要浏览的页面不存在或已删除!")));
             return;
         }
         model = bll.GetModel(id);
         if (model.user_id != userModel.id)
         {
             HttpContext.Current.Response.Redirect(linkurl("error", "error.aspx?msg=" + Utils.UrlEncode("出错了,您所要修改的并非自己的地址!")));
             return;
         }
     }
 }
Esempio n. 23
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.id = PLRequest.GetQueryInt("id");
     if (id == 0)
     {
         JscriptMsg("传输参数不正确!", "back");
         return;
     }
     if (!new BLL.article_comment().Exists(this.id))
     {
         JscriptMsg("记录不存在或已删除!", "back");
         return;
     }
     this.model        = new BLL.article_comment().GetModel(this.id);        //取得评论实体
     this.channel_name = new BLL.channel().GetChannelName(model.channel_id); //取得频道名称
     if (!Page.IsPostBack)
     {
         ShowInfo();
     }
 }
Esempio n. 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.status         = PLRequest.GetQueryInt("status");
            this.payment_status = PLRequest.GetQueryInt("payment_status");
            this.express_status = PLRequest.GetQueryInt("express_status");
            this.keywords       = PLRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                string getAdminInfo = "";
                //如果roletype==1即是超级管理组
                if (GetAdminInfo().role_type != 1)
                {
                    getAdminInfo = "and seller_id=" + GetAdminInfo().id;
                }
                ChkAdminLevel("order_list", PLEnums.ActionEnum.View.ToString()); //检查权限
                RptBind("id>0 " + getAdminInfo + CombSqlTxt(this.status, this.payment_status, this.express_status, this.keywords), "add_time desc,id desc,status asc");
            }
        }
Esempio n. 25
0
        private void RptBind(int _channel_id, int _category_id, int _area_id, string _strWhere, string _orderby)
        {
            Model.manager manage = GetAdminInfo();
            if (manage.role_type != 1)
            {
                _strWhere += "and user_id=" + manage.id;
            }
            this.page = PLRequest.GetQueryInt("page", 1);
            if (this.category_id > 0)
            {
                this.ddlCategoryId.SelectedValue = _category_id.ToString();
            }
            if (this.area_id > 0)
            {
                this.ddlAreaId.SelectedValue = _area_id.ToString();
            }
            this.ddlProperty.SelectedValue = this.property;
            this.txtKeywords.Text          = this.keywords;
            //图表或列表显示
            BLL.article bll = new BLL.article();
            switch (this.prolistview)
            {
            case "Txt":
                this.rptList2.Visible    = false;
                this.rptList1.DataSource = bll.GetList(_channel_id, _category_id, _area_id, this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
                this.rptList1.DataBind();
                break;

            default:
                this.rptList1.Visible    = false;
                this.rptList2.DataSource = bll.GetList(_channel_id, _category_id, _area_id, this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
                this.rptList2.DataBind();
                break;
            }
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("article_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}&area_id={5}",
                                              _channel_id.ToString(), _category_id.ToString(), this.keywords, this.property, "__id__", _area_id.ToString());

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 26
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.manager manage = GetAdminInfo();
            if (manage.role_type != 1)
            {
                _strWhere += "and pa.user_id=" + manage.id;
            }
            this.page = PLRequest.GetQueryInt("page", 1);
            this.ddlProperty.SelectedValue = this.property;
            this.txtKeywords.Text          = this.keywords;
            BLL.article_comment bll = new BLL.article_comment();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("comment_list.aspx", "channel_id={0}&keywords={1}&property={2}&page={3}",
                                              this.channel_id.ToString(), this.keywords, this.property, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Esempio n. 27
0
        /// <summary>
        /// 重写虚方法,此方法将在Init事件前执行
        /// </summary>
        protected override void ShowPage()
        {
            id   = PLRequest.GetQueryInt("id");
            page = PLRequest.GetQueryString("page");
            ud   = PLRequest.GetQueryString("ud");
            BLL.article bll = new BLL.article();

            if (id > 0) //如果ID获取到,将使用ID
            {
                if (!bll.Exists(id))
                {
                    HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode("出错啦,您要浏览的页面不存在或已删除!")));
                    return;
                }
                model = bll.GetModel(id);
            }
            else if (!string.IsNullOrEmpty(page)) //否则检查设置的别名
            {
                if (!bll.Exists(page))
                {
                    HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode("出错啦,您要浏览的页面不存在或已删除!")));
                    return;
                }
                model = bll.GetModel(page);
            }
            else
            {
                return;
            }
            //跳转URL
            if (model.link_url != null)
            {
                model.link_url = model.link_url.Trim();
            }
            if (!string.IsNullOrEmpty(model.link_url))
            {
                HttpContext.Current.Response.Redirect(model.link_url);
            }
        }
Esempio n. 28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = PLRequest.GetQueryString("action");

            this.id = PLRequest.GetQueryInt("id");

            if (!string.IsNullOrEmpty(_action) && _action == PLEnums.ActionEnum.Edit.ToString())
            {
                this.action = PLEnums.ActionEnum.Edit.ToString();//修改类型
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.navigation().Exists(this.id))
                {
                    JscriptMsg("导航不存在或已被删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("sys_navigation", PLEnums.ActionEnum.View.ToString()); //检查权限
                TreeBind(PLEnums.NavigationEnum.System.ToString());                  //绑定导航菜单
                ActionTypeBind();                                                    //绑定操作权限类型
                if (action == PLEnums.ActionEnum.Edit.ToString())                    //修改
                {
                    ShowInfo(this.id);
                }
                else
                {
                    if (this.id > 0)
                    {
                        this.ddlParentId.SelectedValue = this.id.ToString();
                    }
                    txtName.Attributes.Add("ajaxurl", "../../tools/admin_ajax.ashx?action=navigation_validate");
                }
            }
        }
Esempio n. 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.channel_id   = PLRequest.GetQueryInt("channel_id");
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得频道名称
            this.property     = PLRequest.GetQueryString("property");
            this.keywords     = PLRequest.GetQueryString("keywords");

            if (channel_id == 0)
            {
                JscriptMsg("频道参数不正确!", "back");
                return;
            }
            //获取页面所有操作权限by 赵成龙20160630
            auths             = GetAdminAuth("channel_" + this.channel_name + "_comment");
            btnAudit.Visible  = auths[PLEnums.ActionEnum.Audit];
            btnDelete.Visible = auths[PLEnums.ActionEnum.Delete];

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("channel_" + this.channel_name + "_comment", PLEnums.ActionEnum.View.ToString()); //检查权限
                RptBind("pc.channel_id=" + this.channel_id + CombSqlTxt(this.keywords, this.property), " pc.add_time desc");
            }
        }
Esempio n. 30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.id = PLRequest.GetQueryInt("id");
     if (this.id == 0)
     {
         JscriptMsg("传输参数不正确!", "back");
         return;
     }
     if (!new BLL.orders().Exists(this.id))
     {
         JscriptMsg("记录不存在或已被删除!", "back");
         return;
     }
     if (GetAdminInfo().role_type != 1 && new BLL.orders().GetModel(this.id).seller_id != GetAdminInfo().id)
     {
         JscriptMsg("无权修改该信息!", "back");
         return;
     }
     if (!Page.IsPostBack)
     {
         ChkAdminLevel("order_list", PLEnums.ActionEnum.View.ToString()); //检查权限
         ShowInfo(this.id);
     }
 }