public string SubmitCouplet(HttpContext context)
        {
            string up         = "";
            string down       = "";
            string horizontal = "";

            if (!string.IsNullOrEmpty(context.Request.Form["_u"]) &&
                !string.IsNullOrEmpty(context.Request.Form["_d"]) &&
                !string.IsNullOrEmpty(context.Request.Form["_h"]))
            {
                up         = De(context.Request.Form["_u"]);
                down       = De(context.Request.Form["_d"]);
                horizontal = De(context.Request.Form["_h"]);

                BCtrl_Couplet bll       = new BCtrl_Couplet();
                int           coupletid = bll.Add(up, down, horizontal);
                if (coupletid > 0)
                {
                    return(string.Format(Entity.G.JSON_OK_STATE_STRING, coupletid.ToString()));
                }
                else
                {
                    return(string.Format(Entity.G.JSON_ERROR_STATE_STRING, "服务器繁忙,请您稍后再试"));
                }
            }
            else
            {
                return(string.Format(Entity.G.JSON_PMSERROR_STATE_STRING, "获取参数失败"));
            }
        }
        public string ShareCount(HttpContext context)
        {
            string share       = string.IsNullOrEmpty(context.Request.QueryString["s"]) ? "0" : De(context.Request.QueryString["s"]);
            string machinecode = string.IsNullOrEmpty(context.Request.QueryString["m"]) ? "" : De(context.Request.QueryString["m"]);
            string sharetype   = string.IsNullOrEmpty(context.Request.QueryString["st"]) ? "0" : De(context.Request.QueryString["st"]);
            string verson      = string.IsNullOrEmpty(context.Request.QueryString["v"]) ? "" : De(context.Request.QueryString["v"]);
            string systemname  = verson.IndexOf('_') > 0 ? verson.Substring(0, verson.IndexOf('_')) : "";
            string ip          = context.Request.UserHostAddress;
            string agent       = context.Request.UserAgent;

            string         coupletid = string.IsNullOrEmpty(context.Request.QueryString["c"]) ? "28" : De(context.Request.QueryString["c"]);
            string         imageid   = string.IsNullOrEmpty(context.Request.QueryString["i"]) ? "1" : De(context.Request.QueryString["i"]);
            string         isview    = string.IsNullOrEmpty(context.Request.QueryString["iv"]) ? "1" : De(context.Request.QueryString["iv"]);
            BCtrl_Couplet  bll       = new BCtrl_Couplet();
            ShareLogEntity item      = new ShareLogEntity()
            {
                CreateTime  = DateTime.Now,
                ExInfo      = agent,
                IPAddress   = ip,
                MachineCode = machinecode,
                ShareTypeID = int.Parse(sharetype),
                ShareUserID = int.Parse(share),
                SystemName  = systemname,
                Verson      = verson,
                CoupletID   = int.Parse(coupletid),
                ImageID     = int.Parse(imageid),
            };

            bll.AddShareLog(item);

            return(string.Empty);
        }
Beispiel #3
0
        private void InitPageData()
        {
            BCtrl_Couplet             bll  = new BCtrl_Couplet();
            List <CoupletGroupEntity> list = bll.GetCoupletGroupEntityListWithCache();

            this.hid_coupletlist.Value = JsonObj <List <CoupletGroupEntity> > .ToJsonString(list);

            List <FuImageEntity> imgList = bll.GetFuImageEntityListWithCache();

            this.hid_fuImagelist.Value = JsonObj <List <FuImageEntity> > .ToJsonString(imgList);
        }
Beispiel #4
0
        private void InitPageData()
        {
            BCtrl_Couplet bll = new BCtrl_Couplet();

            item      = bll.GetCoupletGroupEntity(cid);
            imageItem = bll.GetFuImageEntity(imgType);
            if (item == null)
            {
                item = new CoupletGroupEntity()
                {
                    CoupletID         = 28,
                    CoupletTypeID     = 1,
                    UpCouplet         = "开年大吉书卷飘香",
                    DownCouplet       = "日子红火历久弥新",
                    HorizontalCouplet = "开卷日历"
                };
            }
            else
            {
                if (item.CoupletID > 29)
                {
                    //同步
                    //wordcss = "<script type=\"text/javascript\" src=\"http://api.youziku.com/webfont/FastJS/yzk_CE1B5D52F855A6C4\"></script>";
                    //异步
                    //wordcss = "<script type=\"text/javascript\" src=\"http://youzikuwebfont.oss-cn-beijing.aliyuncs.com/api.lib.min.js\"></script>";
                    wordstyle = "write_text";
                    //同步
                    //worddraw = "<script type=\"text/javascript\">$youziku.load(\".csswordw\",\"ac5dc40c8ca34e608ca8ed12d7a1aa4f\",\"jdxingkaifan\");$youziku.draw();</script>";
                    //异步
                    //worddraw = "<script type=\"text/javascript\">$youzikuapi.asyncLoad(\"http://api.youziku.com/webfont/FastJS/yzk_CE1B5D52F855A6C4\", function () { $youziku.load(\".csswordw\", \"ac5dc40c8ca34e608ca8ed12d7a1aa4f\", \"jdxingkaifan\");$youziku.draw(); }) ;</script>";
                }
            }
            if (imageItem == null)
            {
                imageItem = new FuImageEntity()
                {
                    ImageID  = 1,
                    ImageUrl = "images/newyear/happiness.png"
                };
            }
            shareCount = bll.GetShareCount().ToString();
        }