예제 #1
0
        private void reply(HttpContext context)
        {
            //检查用户是否登录
            CMS.Model.users umodel = new CMS.Web.UI.BasePage().GetUserInfo();
            if (umodel == null)
            {
                context.Response.Write("{\"status\":0, \"msg\":\"请登录后再提交!\"}");
                return;
            }
            BLL.forum_posts   bll   = new BLL.forum_posts();
            Model.forum_posts model = new Model.forum_posts();

            string _title   = DTRequest.GetFormString("txtTitle");
            string _content = DTRequest.GetFormString("txtContent");
            int    board_id = DTRequest.GetFormInt("txtBoardID");
            int    post_id  = DTRequest.GetFormInt("txtPostID");


            int    _userid = umodel.id;
            string _userip = System.Web.HttpContext.Current.Request.UserHostAddress;

            model.title          = Utils.DropHTML(_title);
            model.content        = _content;
            model.user_id        = _userid;
            model.user_ip        = _userip;
            model.board_id       = board_id;
            model.parent_post_id = post_id;
            model.post_type      = 2;//回帖


            Model.forum_posts pmodel = bll.GetModel(post_id);
            pmodel.reply_time    = DateTime.Now;
            pmodel.reply_user_id = _userid;
            pmodel.reply_count  += 1;

            if (bll.Add(model) > 0 && bll.Update(pmodel))
            {
                context.Response.Write("{\"status\": 1, \"msg\": \"恭喜您,回帖成功!\"}");
                return;
            }
            context.Response.Write("{\"status\": 0, \"msg\": \"对不起,保存过程中发生错误!\"}");
            return;
        }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.id = DTRequest.GetQueryInt("id");
     if (this.id == 0)
     {
         JscriptMsg("传输参数不正确!", "back", "Error");
         return;
     }
     if (!new BLL.orders().Exists(this.id))
     {
         JscriptMsg("记录不存在或已被删除!", "back", "Error");
         return;
     }
     if (!Page.IsPostBack)
     {
         ChkAdminLevel("order_list", DTEnums.ActionEnum.View.ToString()); //检查权限
         ShowInfo(this.id);
     }
 }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.channel_id  = DTRequest.GetQueryInt("channel_id");
     this.category_id = DTRequest.GetQueryInt("category_id");
     this.keywords    = DTRequest.GetQueryString("keywords");
     this.property    = DTRequest.GetQueryString("property");
     if (channel_id == 0)
     {
         JscriptMsg("频道参数不正确!", "back", "Error");
         return;
     }
     this.pageSize = GetPageSize(15); //每页数量
     if (!Page.IsPostBack)
     {
         ChkAdminLevel(channel_id, DTEnums.ActionEnum.View.ToString()); //检查权限
         TreeBind(this.channel_id);                                     //绑定类别
         RptBind("id>0" + CombSqlTxt(this.channel_id, this.category_id, this.keywords, this.property), "sort_id asc,add_time desc");
     }
 }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Url = Request.Url.ToString();
            if (string.IsNullOrEmpty(Utils.GetCookie("UserCheckPwd")))
            {
                Response.Redirect("RePw.aspx?Url=" + Url + "");
            }

            this.group_id = DTRequest.GetQueryInt("group_id");
            this.keywords = DTRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(15); //每頁數量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("users", DTEnums.ActionEnum.View.ToString()); //檢查許可權
                TreeBind("is_lock=0");                                      //綁定類別
                RptBind("id>0" + CombSqlTxt(this.group_id, this.keywords), "  order by id desc");
            }
        }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            risk_id    = DTRequest.GetQueryInt("risk_id");
            channel_id = DTRequest.GetQueryString("channel_id");
            project_id = DTRequest.GetQueryString("project_id");
            pageName   = DTRequest.GetQueryString("pageName");

            if (channel_id == "" || project_id == "")
            {
                JscriptMsg("传输参数不正确!", "back", "Error");
                return;
            }

            if (!Page.IsPostBack)
            {
                var model = context.li_risks.FirstOrDefault(q => q.id == risk_id) ?? new li_risks();
                ShowInfo(model);
            }
        }
예제 #6
0
 /// <summary>
 /// 重写父类的虚方法,此方法将在Init事件前执行
 /// </summary>
 protected override void ShowPage()
 {
     action = DTRequest.GetQueryString("action");
     if (action == "mobile")
     {
         username = DTRequest.GetQueryString("username");
     }
     else if (action == "email")
     {
         code = DTRequest.GetQueryString("code");
         Model.user_code model = new BLL.user_code().GetModel(code);
         if (model == null)
         {
             HttpContext.Current.Response.Redirect(linkurl("repassword", "?action=error"));
             return;
         }
         username = model.user_name;
     }
 }
예제 #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     flag           = DTRequest.GetString("flag");
     _cusName       = DTRequest.GetString("txtCusName");
     _cid           = DTRequest.GetString("hCusId");
     _contractPrice = DTRequest.GetString("ddlContractPrice");
     _sdate         = DTRequest.GetString("txtsDate");
     _edate         = DTRequest.GetString("txteDate");
     _sdate1        = DTRequest.GetString("txtsDate1");
     _edate1        = DTRequest.GetString("txteDate1");
     _status        = DTRequest.GetString("ddlstatus");
     _dstatus       = DTRequest.GetString("ddldstatus");
     _pushstatus    = DTRequest.GetString("ddlispush");
     _flag          = DTRequest.GetString("ddlflag");
     _lockstatus    = DTRequest.GetString("ddllock");
     _oid           = DTRequest.GetString("txtOrderID");
     _area          = DTRequest.GetString("ddlarea");
     _orderarea     = DTRequest.GetString("ddlorderarea");
     _person        = DTRequest.GetString("txtPerson");
     if (string.IsNullOrEmpty(flag))
     {
         flag = "0";
     }
     manager       = GetAdminInfo();
     this.pageSize = GetPageSize(10); //每页数量
     if (!Page.IsPostBack)
     {
         InitData();
         if (flag == "0")
         {
             _edate1     = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
             _status     = "3";
             _dstatus    = "4";
             _flag       = "2";
             _lockstatus = "0";
         }
         labUnCheckCount.Text = new BLL.Order().getUnCheckOrderCount(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"), "3", "4", "2").ToString();
         labUnLockCount.Text  = new BLL.Order().getUnLockOrderCount().ToString();
         labUnDealCount.Text  = new BLL.Order().getUnDealOrderCount().ToString();
         ChkAdminLevel("sys_checkOrder", DTEnums.ActionEnum.View.ToString()); //检查权限
         RptBind("1=1" + CombSqlTxt(), "o_addDate desc,o_id desc");
     }
 }
예제 #8
0
        /// <summary>
        /// 重写虚方法,此方法在Init事件执行
        /// </summary>
        protected override void InitPage()
        {
            action   = DTRequest.GetQueryString("action");
            board_id = DTRequest.GetQueryInt("board_id");
            post_id  = DTRequest.GetQueryInt("post_id");

            if (action == "edit")
            {
                Model.forum_posts post = new BLL.forum_posts().GetModel(post_id);

                //判断权限
                if (!new ajax().IsModerator(board_id, userModel.id) && userModel.id != post.user_id)
                {
                    HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode("对不起,你无权编辑此帖!!")));
                    return;
                }

                title    = post.title;
                content  = post.content;
                board_id = post.board_id;
                post_id  = post.id;
            }


            if (action == "reply")
            {
                Model.forum_posts post = new BLL.forum_posts().GetModel(post_id);

                title = "回复:" + post.title;
            }

            rurl = linkurl("forumpostlist", board_id);
            if (HttpContext.Current.Request.Url != null && HttpContext.Current.Request.UrlReferrer != null)
            {
                string currUrl = HttpContext.Current.Request.Url.ToString().ToLower();         //当前页面
                string refUrl  = HttpContext.Current.Request.UrlReferrer.ToString().ToLower(); //上一页面
                string regPath = linkurl("register").ToLower();                                //注册页面
                if (currUrl != refUrl && refUrl.IndexOf(regPath) == -1)
                {
                    rurl = HttpContext.Current.Request.UrlReferrer.ToString();
                }
            }
        }
예제 #9
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            if (this.group_id > 0)
            {
                this.ddlGroupId.SelectedValue = this.group_id.ToString();
            }
            this.txtKeywords.Text = this.keywords;
            BLL.users bll = new BLL.users();
            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("user_list.aspx", "group_id={0}&keywords={1}&page={2}",
                                              this.group_id.ToString(), this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //取得返回参数
            string state = DTRequest.GetQueryString("state");
            string code  = DTRequest.GetQueryString("code");

            string access_token = string.Empty;
            string expires_in   = string.Empty;
            string openid       = string.Empty;

            if (Session["oauth_state"] == null || Session["oauth_state"].ToString() == "" || state != Session["oauth_state"].ToString())
            {
                Response.Write("出错啦,state未初始化!");
                return;
            }
            if (string.IsNullOrEmpty(code))
            {
                Response.Write("授权被取消,相关信息:" + DTRequest.GetQueryString("error"));
                return;
            }

            //获取Access Token
            Dictionary <string, object> dic = renren_helper.get_access_token(code);

            if (dic == null)
            {
                Response.Write("错误代码:,无法获取Access Token,请检查App Key是否正确!");
            }

            access_token = dic["access_token"].ToString();
            expires_in   = dic["expires_in"].ToString();
            Dictionary <string, object> dic1 = dic["user"] as Dictionary <string, object>;

            openid = dic1["id"].ToString();
            //储存获取数据用到的信息
            Session["oauth_name"]         = "renren";
            Session["oauth_access_token"] = access_token;
            Session["oauth_openid"]       = openid;

            //跳转到指定页面
            Response.Redirect(new Web.UI.BasePage().linkurl("oauth_login"));
            return;
        }
예제 #11
0
        protected string skinName = string.Empty; //模板目录

        protected void Page_Load(object sender, EventArgs e)
        {
            skinName = DTRequest.GetQueryString("skin");
            if (string.IsNullOrEmpty(skinName))
            {
                JscriptMsg("传输参数不正确!", "back");
                return;
            }
            if (skinName.IndexOf("..") != -1)
            {
                JscriptMsg("模板目录名有误!", "back");
                return;
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("sys_site_templet", DTEnums.ActionEnum.View.ToString()); //检查权限
                RptBind(skinName);
            }
        }
예제 #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BLL.menu bll = new BLL.menu();
            this.id = DTRequest.GetQueryInt("id");

            string _action = DTRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == DTEnums.ActionEnum.Edit.ToString())
            {
                this.id     = DTRequest.GetQueryInt("id");
                this.action = DTEnums.ActionEnum.Edit.ToString();//修改类型
                if (id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!bll.Exists(this.id))
                {
                    JscriptMsg("记录不存在或已被删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                //检查权限
                ChkAdminLevel("plugin_menu", DTEnums.ActionEnum.Show.ToString());

                //上一页地址
                this.backUrl = DTRequest.GetUrlReferrer();

                //绑定类别
                TreeBind();

                if (action == DTEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
                else
                {
                    ddlParentId.SelectedValue = this.id.ToString();
                }
            }
        }
예제 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.channel_id  = DTRequest.GetQueryInt("channel_id");
            this.category_id = DTRequest.GetQueryInt("category_id");
            this.keywords    = DTRequest.GetQueryString("keywords");
            this.property    = DTRequest.GetQueryString("property");

            if (channel_id == 0)
            {
                JscriptMsg("频道参数不正确!", "back");
                return;
            }
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得频道名称
            this.pageSize     = GetPageSize(10);                                   //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("channel_" + this.channel_name + "_recycle", DTEnums.ActionEnum.View.ToString()); //检查权限

                //审核权限
                if (!ChkAuthority("channel_" + this.channel_name + "_recycle", DTEnums.ActionEnum.Audit.ToString()))
                {
                    this.auditBtnPannel.Visible = false;
                }
                //删除权限
                if (!ChkAuthority("channel_" + this.channel_name + "_recycle", DTEnums.ActionEnum.Delete.ToString()))
                {
                    this.delBtnPannel.Visible = false;
                }

                string return_term = string.Empty;
                TreeBind(this.channel_id, out return_term); //绑定类别

                if (!string.IsNullOrEmpty(return_term))
                {
                    return_term = "status=2 and category_id in (" + return_term + ")";
                }
                else
                {
                    return_term = "status=2";
                }
                RptBind(this.channel_id, this.category_id, return_term + CombSqlTxt(this.keywords, this.property), "sort_id asc,add_time desc,id desc");
            }
        }
예제 #14
0
        Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig(); //系统配置信息

        public void ProcessRequest(HttpContext context)
        {
            //检查管理员是否登录
            if (!new ManagePage().IsAdminLogin())
            {
                context.Response.Write("{\"status\": 0, \"msg\": \"尚未登录或已超时,请登录后操作!\"}");
                return;
            }
            //取得处事类型
            string action = DTRequest.GetQueryString("action");

            switch (action)
            {
            case "get_map":     //验证用户名
                string keywords  = DTRequest.GetFormStringValue("keywords", "");
                string areacode  = DTRequest.GetFormStringValue("areacode", "");
                int    page      = DTRequest.GetFormIntValue("page", 1);
                int    pageSize  = DTRequest.GetFormIntValue("pageSize", 1);
                string returnstr = getmap(areacode, keywords, page, pageSize);
                context.Response.ContentType = "text/plain";
                context.Response.Write(returnstr);
                break;

            case "navigation_validate":     //验证导航菜单别名是否重复
                navigation_validate(context);
                break;

            case "manager_validate":     //验证管理员用户名是否重复
                manager_validate(context);
                break;

            case "get_navigation_list":     //获取后台导航字符串
                get_navigation_list(context);
                break;

            case "getJsonImgData":    //获取图表数据
                int    id   = DTRequest.GetFormIntValue("id", 0);
                string Date = DTRequest.GetFormStringValue("Date");
                getJsonImgData(context, id, Date);
                break;
            }
        }
예제 #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = DTRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == ActionEnum.Edit.ToString())
            {
                this.action = ActionEnum.Edit.ToString();//修改类型
                this.id     = DTRequest.GetQueryInt("id");
                if (this.id < 1)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.advert_banner().Exists(this.id))
                {
                    JscriptMsg("信息不存在或已被删除!", "back", "Error");
                    return;
                }
            }
            else
            {
                this.aid = DTRequest.GetQueryInt("aid");
                if (this.aid < 1)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.advert().Exists(this.aid))
                {
                    JscriptMsg("广告位不存在或已删除!", "back", "Error");
                    return;
                }
                LitTitle.Text = new BLL.advert().GetTitle(aid);
            }
            if (!Page.IsPostBack)
            {
                if (action == ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
예제 #16
0
    private void RptBind(string _strWhere, string _orderby)
    {
        this.page        = DTRequest.GetQueryInt("page", 1);
        txtKeywords.Text = this.keywords;
        DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

        if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
        {
            DataRow  dr;
            DateTime begin = new DateTime();
            DateTime end   = new DateTime();
            int      count = ds.Tables[0].Rows.Count;
            for (int i = 0; i < count; i++)
            {
                dr    = ds.Tables[0].Rows[i];
                begin = MyCommFun.Obj2DateTime(dr["beginDate"]);
                end   = MyCommFun.Obj2DateTime(dr["endDate"]);
                if (begin > DateTime.Now)
                {
                    dr["status_s"] = "<span class=\"act_before\">未开始</span>";
                }
                else if (end <= DateTime.Now)
                {
                    dr["status_s"] = "<span class=\"act_end\">已结束</span>";
                }
                else
                {
                    dr["status_s"] = "<span class=\"act_in\">进行中</span>";
                }
                dr["url"] = MyCommFun.getWebSite() + "/shop/dzp/index.aspx?aid=" + dr["id"].ToString();
            }
            ds.AcceptChanges();
        }
        this.rptList.DataSource = ds;
        this.rptList.DataBind();

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

        PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
예제 #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //读取站点配置信息
            Model.sysconfig             sysConfig       = new BLL.sysconfig().loadConfig();
            int                         site_payment_id = 0; //站点支付方式ID
            Dictionary <string, string> sPara           = GetRequestGet();

            if (sPara.Count > 0)                                                 //判断是否有带返回参数
            {
                string order_no = DTRequest.GetString("out_trade_no").ToUpper(); //获取订单号
                string trade_no = DTRequest.GetString("trade_no");               //支付宝交易号
                string result   = DTRequest.GetString("result");                 //交易状态
                if (order_no.StartsWith("R"))                                    //充值订单
                {
                    site_payment_id = new BLL.user_recharge().GetPaymentId(order_no);
                }
                else if (order_no.StartsWith("B")) //商品订单
                {
                    site_payment_id = new BLL.orders().GetPaymentId(order_no);
                }

                //找到站点支付方式ID开始验证
                if (site_payment_id > 0)
                {
                    Notify aliNotify    = new Notify(site_payment_id);
                    bool   verifyResult = aliNotify.VerifyReturn(sPara, Request.QueryString["sign"]);

                    if (verifyResult)//验证成功
                    {
                        if (result == "success")
                        {
                            //成功状态
                            Response.Redirect(new Web.UI.BasePage().linkurl("payment", "?action=succeed&order_no=" + order_no));
                            return;
                        }
                    }
                }
            }
            //失败状态
            Response.Redirect(new Web.UI.BasePage().linkurl("payment", "?action=error"));
            return;
        }
예제 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = DTRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == DTEnums.ActionEnum.Edit.ToString())
            {
                this.action = DTEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = DTRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.carbll().Exists(this.id))
                {
                    JscriptMsg("信息不存在或已被删除!", "back", "Error");
                    return;
                }
            }
            admin_info = GetAdminInfo();
            if (!Page.IsPostBack)
            {
                car_typebll cartypebll = new car_typebll();
                DataTable   tb         = cartypebll.GetList(1000, " 1=1 ", " id").Tables[0];
                this.ddlCar_Type.Items.Clear();
                foreach (DataRow dr in tb.Rows)
                {
                    this.ddlCar_Type.Items.Add(new ListItem(dr["Type_Name"].ToString(), dr["Type_Code"].ToString()));
                }
                car_driverbll cardriverbll = new car_driverbll();
                DataTable     tbdriver     = cardriverbll.GetList(1000, " 1=1 ", " id").Tables[0];
                this.ddlDriver.Items.Clear();
                foreach (DataRow dr in tbdriver.Rows)
                {
                    this.ddlDriver.Items.Add(new ListItem(dr["Driver_Name"].ToString(), dr["Driver_Code"].ToString()));
                }
                if (action == DTEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
예제 #19
0
        /**
         *
         * 测速上报接口实现
         * @param WxPayData inputObj 提交给测速上报接口的参数
         * @param int timeOut 测速上报接口超时时间
         * @throws WxPayException
         * @return 成功时返回测速上报接口返回的结果,其他抛异常
         */
        public static WxPayData Report(WxPayData inputObj, int timeOut = 1)
        {
            JsApiConfig jsApiConfig = new JsApiConfig();
            string      url         = "https://api.mch.weixin.qq.com/payitil/report";

            //检测必填参数
            if (!inputObj.IsSet("interface_url"))
            {
                throw new WxPayException("接口URL,缺少必填参数interface_url!");
            }
            if (!inputObj.IsSet("return_code"))
            {
                throw new WxPayException("返回状态码,缺少必填参数return_code!");
            }
            if (!inputObj.IsSet("result_code"))
            {
                throw new WxPayException("业务结果,缺少必填参数result_code!");
            }
            if (!inputObj.IsSet("user_ip"))
            {
                throw new WxPayException("访问接口IP,缺少必填参数user_ip!");
            }
            if (!inputObj.IsSet("execute_time_"))
            {
                throw new WxPayException("接口耗时,缺少必填参数execute_time_!");
            }

            inputObj.SetValue("appid", jsApiConfig.AppId);                      //公众账号ID
            inputObj.SetValue("mch_id", jsApiConfig.Partner);                   //商户号
            inputObj.SetValue("user_ip", DTRequest.GetIP());                    //终端ip
            inputObj.SetValue("time", DateTime.Now.ToString("yyyyMMddHHmmss")); //商户上报时间
            inputObj.SetValue("nonce_str", GenerateNonceStr());                 //随机字符串
            inputObj.SetValue("sign", inputObj.MakeSign(jsApiConfig.Key));      //签名
            string xml = inputObj.ToXml();

            string response = HttpService.Post(xml, url, false, timeOut);

            WxPayData result = new WxPayData();

            result.FromXml(response, jsApiConfig.Key);
            return(result);
        }
예제 #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = DTRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == DTEnums.ActionEnum.Edit.ToString())
            {
                this.action = DTEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = DTRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.advert_banner().Exists(this.id))
                {
                    JscriptMsg("信息不存在或已被删除!", "back");
                    return;
                }
            }
            else
            {
                this.aid = DTRequest.GetQueryInt("aid");
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("plugin_advert_bar", DTEnums.ActionEnum.View.ToString()); //检查权限

                TreeBind();                                                             //绑定广告位

                //上一页地址
                this.backUrl = DTRequest.GetUrlReferrer();

                if (action == DTEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
                else if (this.aid > 0)
                {
                    ddlAdvertId.SelectedValue = this.aid.ToString();
                }
            }
        }
예제 #21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.action = DTRequest.GetQueryString("action");
     if (string.IsNullOrEmpty(action))
     {
         action = DTEnums.ActionEnum.Add.ToString();
     }
     ChkAdminLevel("sys_order_add", action); //检查权限
     manager = GetAdminInfo();
     if (!string.IsNullOrEmpty(action) && action == DTEnums.ActionEnum.Edit.ToString())
     {
         this.action = DTEnums.ActionEnum.Edit.ToString();//修改类型
         this.oID    = DTRequest.GetQueryString("oID");
         if (string.IsNullOrEmpty(this.oID))
         {
             JscriptMsg("传输参数不正确!", "back");
             return;
         }
     }
     if (!Page.IsPostBack)
     {
         initData();
         if (string.IsNullOrEmpty(oID))
         {
             uploadDiv.Visible  = false;
             uploadDiv2.Visible = false;
         }
         else
         {
             uploadDiv.Visible  = true;
             uploadDiv2.Visible = true;
         }
         if (action == DTEnums.ActionEnum.Add.ToString())//添加
         {
             NewShowInfo();
         }
         if (action == DTEnums.ActionEnum.Edit.ToString()) //修改
         {
             ShowInfo(this.oID);
         }
     }
 }
예제 #22
0
        public void ProcessRequest(HttpContext context)
        {
            //取得处事类型
            string action = DTRequest.GetQueryString("action");

            switch (action)
            {
            case "EditorFile":     //编辑器文件
                EditorFile(context);
                break;

            case "ManagerFile":     //管理文件
                ManagerFile(context);
                break;

            default:     //普通上传
                UpLoadFile(context);
                break;
            }
        }
예제 #23
0
        private void RptBind(int _board_id, string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            if (this.board_id > 0)
            {
                this.ddlCategoryId.SelectedValue = _board_id.ToString();
            }
            this.ddlProperty.SelectedValue = this.property;
            this.txtKeywords.Text          = this.keywords;

            BLL.forum_posts bll = new BLL.forum_posts();
            this.rptList1.DataSource = bll.GetList(_board_id, this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList1.DataBind();

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

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.channel_id   = DTRequest.GetQueryInt("channel_id");
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得频道名称
            this.property     = DTRequest.GetQueryString("property");
            this.keywords     = DTRequest.GetQueryString("keywords");

            if (channel_id == 0)
            {
                JscriptMsg("频道参数不正确!", "back");
                return;
            }

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("channel_" + this.channel_name + "_comment", DTEnums.ActionEnum.View.ToString()); //检查权限
                RptBind("channel_id=" + this.channel_id + CombSqlTxt(this.keywords, this.property), "add_time desc");
            }
        }
예제 #25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.id = DTRequest.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.site_channel().GetChannelName(model.channel_id); //取得频道名称
     if (!Page.IsPostBack)
     {
         ShowInfo();
     }
 }
예제 #26
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            if (this.category_id > 0)
            {
                this.ddlCategoryId.SelectedValue = this.category_id.ToString();
            }
            this.ddlProperty.SelectedValue = this.property;
            this.txtKeywords.Text          = this.keywords;
            BLL.article bll = new BLL.article();
            this.rptList.DataSource = bll.GetContentList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //綁定頁碼
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}",
                                              this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #27
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            BLL.Customer bll = new BLL.Customer();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, manager, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = backUrl();

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);

            txtCusName.Text         = _cusName;
            hCusId.Value            = _cid;
            ddlcheck1.SelectedValue = _check1;
            ddltype.SelectedValue   = _type;
            ddlisUse.SelectedValue  = _isUse;
            txtOwner1.Text          = _owner1;
        }
예제 #28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _cusName      = DTRequest.GetString("txtCusName");
     _cid          = DTRequest.GetString("hCusId");
     _sforedate    = DTRequest.GetString("txtsforedate");
     _eforedate    = DTRequest.GetString("txteforedate");
     this.pageSize = GetPageSize(10); //每页数量
     manager       = GetAdminInfo();
     if (!Page.IsPostBack)
     {
         //_eforedate = DateTime.Now.ToString("yyyy-MM-dd");
         initData();
         ChkAdminLevel("sys_payment_detail0", DTEnums.ActionEnum.View.ToString()); //检查权限
         RptBind("rpd_id>0" + CombSqlTxt(), "c_name");
     }
     txtCusName.Text   = _cusName;
     hCusId.Value      = _cid;
     txtsforedate.Text = _sforedate;
     txteforedate.Text = _eforedate;
 }
예제 #29
0
        private void RptBind(string _strWhere, string _orderby)
        {
            if (!this.isSearch)
            {
                this.page = DTRequest.GetQueryInt("page", 1);
            }
            else
            {
                this.page = 1;
            }
            BLL.finance bll = new BLL.finance();
            this.rptList.DataSource = bll.GetList1(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("selfFinance_list.aspx", "page={0}&ddltype={1}&txtOrder={2}&txtCusName={3}&hCusId={4}&ddlcheck={5}&txtsDate={6}&txteDate={7}", "__id__", _type, _ordernum, _cusname, _cusid, _status, _smonth, _emonth);

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #30
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            BLL.daikuan_repay bll = new BLL.daikuan_repay();
            var list = bll.GetList("daikuan_id=" + this.id);

            rptList.DataSource = list;
            rptList.DataBind();

            var albumsList = new List <Model.daikuan_repay_albums>();
            var dt         = list.Tables[0];

            foreach (DataRow item in dt.Rows)
            {
                var model = bll.GetModel(Utils.StrToInt(item["id"].ToString(), 0));
                albumsList.AddRange(model.albums);
            }
            this.rptList2.DataSource = albumsList;
            this.rptList2.DataBind();
        }