Beispiel #1
0
        private void btnedit_Click(object sender, EventArgs e)
        {
            int    commendreborn = int.Parse(base.Application["game.commendreborn"].ToString());
            string str           = new WebLogic().commendgift(base.Session["userid"].ToString(), moneyrate, goldrate, commendreborn);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #2
0
 private void btncreate_Click(object sender, EventArgs e)
 {
     if (this.tbverifycode.Text.ToString() != base.Session["verifycode"].ToString())
     {
         base.Response.Write("<script language=javascript>alert(\"驗證碼輸入錯誤,請重新核對\")</script>");
     }
     else
     {
         string userid  = new system().ChkSql(this.tbuserid.Text.ToString().Trim());
         string tradeno = this.createTradeno();
         int    money   = int.Parse(this.ddtradetype.SelectedValue.ToString());
         string str3    = this.ddtradetype.SelectedItem.ToString();
         string str4    = new WebLogic().alipaysubmit(userid, tradeno, money);
         if (str4 == "success")
         {
             this.lbltradeno.Visible  = true;
             this.btnpay.Visible      = true;
             this.btncreate.Visible   = false;
             this.tbverifycode.Text   = "";
             this.lbltradeno.Text     = "你的定單號是" + tradeno + ",購買物品:" + str3 + ",請抄下訂單號";
             base.Session["tradeurl"] = this.alipay(tradeno, str3, money);
         }
         else
         {
             base.Response.Write("<script language=javascript>alert('" + str4 + "')</script>");
         }
     }
 }
        public override async Task <string> BypassAd(string adUrl)
        {
            string code = null;

            var requestHandler = HttpRequestHandler.NewWithCookies();

            using (var response = await new HttpClient().GetResponse(adUrl, requestHandler))
            {
                var respContent = await response.Content.ReadAsStringAsync();

                var text = "document.getElementById(\"btd\").href = revC(\"";
                var ix   = respContent.IndexOf(text) + text.Length;

                code = respContent.Substring(ix, respContent.IndexOf('"', ix) - ix);
                code = WebLogic.Decode(code);
            }

            requestHandler.AllowRedirects = false;
            requestHandler.Referrer       = adUrl;
            // This magic cookie has to be present...
            requestHandler.Cookies.Add(new System.Net.Cookie("s32", "1", "/", DomainName));

            using (var response = await new HttpClient().GetResponse($"https://{DomainName}/{code}", requestHandler))
            {
                if (response.Headers.Location != null)
                {
                    return(response.Headers.Location.ToString());
                }
            }

            return(null);
        }
Beispiel #4
0
        private void btnLogin_ServerClick(object sender, EventArgs e)
        {
            DataProviders providers = new DataProviders();
            system        system    = new system();
            WebLogic      logic     = new WebLogic();
            string        agentid   = system.ChkSql(this.agent_id.Value.ToString());
            string        str2      = system.ChkSql(this.agent_pwd.Value.ToString());

            if (this.vcode.Value != this.Session["VerifyCode"].ToString())
            {
                base.Response.Write("<script language=javascript>alert(\"驗證碼錯誤!\")</script>");
            }
            else
            {
                SqlDataReader reader = providers.ExecuteSqlDataReader("select * from mhcmember..web_agent where userid='" + agentid + "' and password='******' and state=1");
                if (reader.Read())
                {
                    this.Session.Timeout       = 600;
                    this.Session["agent_id"]   = reader["userid"].ToString();
                    this.Session["agent_name"] = reader["name"].ToString();
                    this.Session["agent_ip"]   = system.GetClientIP();
                    logic.log("", agentid, "", 0, "代理後台登陸成功", system.GetClientIP(), "代理登陸日誌");
                    base.Response.Redirect("account.aspx");
                }
                else
                {
                    logic.log("", "", agentid, 0, "用戶名或密碼錯誤ID:" + agentid + "PW:" + str2, system.GetClientIP(), "代理登陸日誌");
                    base.Response.Write("<script language=javascript>alert(\"用戶名或密碼錯誤!\")</script>");
                }
            }
        }
Beispiel #5
0
        public bool Start()
        {
            try
            {
                //获取当前所有设备信息
                HttpResult <string> result = WebLogic.GetHttpResult <string>(CreateHttpItem(@"vetsync/v1/devices"));
                if (result.Success)
                {
                    string      ncResultXML = result.Result;
                    XmlDocument xml         = new XmlDocument();
                    xml.LoadXml(ncResultXML);
                    XmlNode DataDictionaryUpdateInfo = xml.SelectSingleNode("Devices");
                    foreach (XmlNode node in DataDictionaryUpdateInfo.ChildNodes)
                    {
                        if (node["Type"] != null && node["Type"].InnerText == abaxisDevice.FuseCode)
                        {
                            abaxisDevice.FuseID           = node["Id"].InnerText;
                            abaxisDevice.CommandsChanged += Vs2_CommandsChanged;
                            timer.Start();
                            return(true);
                        }
                    }
                }
            }
            catch (Exception)
            {
                return(false);
            }

            return(false);
        }
Beispiel #6
0
Datei: log.cs Projekt: tbs005/---
        private void DataGrid2_Delete(object sender, DataGridCommandEventArgs e)
        {
            int    id  = int.Parse(e.Item.Cells[0].Text);
            string str = new WebLogic().getbackgold(id);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #7
0
        private void btnregister_Click(object sender, EventArgs e)
        {
            string str = "";

            if ((this.tbkey.Text == this.tbuserid.Text) || (this.tbkey.Text == this.tbuserpwd.Text))
            {
                str = "二級密碼不可以與帳號或密碼相同";
            }
            else if ((this.tbverifycode.Text != base.Session["VerifyCode"].ToString()) && (base.Application["security.verifycode"].ToString() == "true"))
            {
                str = "驗證碼錯誤!";
            }
            else
            {
                system system   = new system();
                string userid   = system.ChkSql(this.tbuserid.Text.ToString());
                string userpwd  = system.ChkSql(this.tbuserpwd.Text.ToString());
                string email    = system.ChkSql(this.tbemail.Text.ToString());
                string key      = system.ChkSql(this.tbkey.Text.ToString());
                string commend  = system.ChkSql(this.tbcommend.Text.ToString());
                string sex      = this.rbfemale.Checked ? "美女" : "帥哥";
                int    webgold  = int.Parse(base.Application["register.givegold"].ToString());
                string clientIP = system.GetClientIP();
                str = new WebLogic().register(userid, userpwd, key, sex, email, commend, clientIP, webgold);
            }
            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #8
0
        private void btnLogin_ServerClick(object sender, EventArgs e)
        {
            DataProviders providers = new DataProviders();
            system        system    = new system();
            WebLogic      logic     = new WebLogic();
            string        adminid   = system.ChkSql(this.admin_id.Value.ToString());
            string        password  = system.ChkSql(this.admin_pwd.Value.ToString());

            if (this.vcode.Value != this.Session["VerifyCode"].ToString())
            {
                base.Response.Write("<script language=javascript>alert(\"驗證碼錯誤!\")</script>");
            }
            else
            {
                logic.log("", "", adminid, 0, "登陸後臺", this.Page.Request.UserHostAddress.ToString(), "後台登陸日誌");
                logic.log("", "", adminid, 0, "登陸後臺", system.GetClientIP(), "後台登陸日誌");
                SqlDataReader reader = providers.ExecuteSqlDataReader("select * from mhcmember..web_login where userid='" + adminid + "' and password='******' and state=1");
                if (reader.Read())
                {
                    this.Session.Timeout       = 600;
                    this.Session["admin_id"]   = reader["userid"].ToString();
                    this.Session["admin_name"] = reader["name"].ToString();
                    this.Session["admin_ip"]   = system.GetClientIP();
                    base.Response.Redirect("cpserverinfo.aspx");
                }
                else
                {
                    base.Response.Write("<script language=javascript>alert(\"用戶名或密碼錯誤!\")</script>");
                }
                providers.CloseConn();
            }
        }
Beispiel #9
0
        private void DataGrid1_Delete(object sender, DataGridCommandEventArgs e)
        {
            int    psid = int.Parse(e.Item.Cells[0].Text);
            string str  = new WebLogic().stoppublicsale(psid);

            base.Response.Write("<script>alert('" + str + "');</script>");
        }
Beispiel #10
0
        private void btnedit_Click(object sender, EventArgs e)
        {
            int    useridx = int.Parse(base.Session["useridx"].ToString());
            int    chaidx  = int.Parse(this.ddchalist.SelectedValue.ToString());
            string str     = new WebLogic().itemtogold(base.Session["userid"].ToString(), useridx, chaidx);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            WebLogic webLogic = await db.WebLogics.FindAsync(id);

            db.WebLogics.Remove(webLogic);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Beispiel #12
0
        private void btnlvup_Click(object sender, EventArgs e)
        {
            int    chaidx    = int.Parse(this.ddchalist.SelectedValue.ToString());
            int    mugongidx = int.Parse(this.ddmugong.SelectedValue.ToString());
            int    needmoney = int.Parse(base.Application["game.skilllvupmoney"].ToString());
            string str       = new WebLogic().skilllevelup(base.Session["userid"].ToString(), chaidx, mugongidx, needmoney);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #13
0
        private void btnchange_Click(object sender, EventArgs e)
        {
            int    useridx     = int.Parse(base.Session["useridx"].ToString());
            int    gold        = Math.Abs(int.Parse(this.tbgold.Text.ToString()));
            int    goldtomoney = int.Parse(base.Application["game.goldtomoney"].ToString());
            string str         = new WebLogic().goldtomoney(useridx, gold, goldtomoney);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #14
0
        private void btnedit_Click(object sender, EventArgs e)
        {
            string userid         = base.Session["userid"].ToString();
            string key            = new system().ChkSql(this.tbkey.Text.ToString());
            string email          = new system().ChkSql(this.tbemail.Text.ToString());
            int    changeinfogold = int.Parse(base.Application["game.changeinfogold"].ToString());
            string str4           = new WebLogic().changeinfo(userid, key, email, changeinfogold, new system().GetClientIP());

            base.Response.Write("<script language=javascript>alert('" + str4 + "')</script>");
        }
Beispiel #15
0
        private void btnedit_Click(object sender, EventArgs e)
        {
            double money    = Math.Abs(double.Parse(this.tbmoney.Text.ToString()));
            int    useridx  = int.Parse(base.Session["useridx"].ToString());
            int    chaidxs  = int.Parse(this.ddchalist.SelectedValue.ToString());
            int    opertype = this.rbget.Checked ? 1 : 0;
            string str      = new WebLogic().bank(base.Session["userid"].ToString(), useridx, chaidxs, money, opertype);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #16
0
        private void btnclear_Click(object sender, EventArgs e)
        {
            int    useridx  = int.Parse(base.Session["useridx"].ToString());
            int    chaidx   = int.Parse(this.ddchalist.SelectedValue.ToString());
            int    pknum    = Math.Abs(int.Parse(this.tbpk.Text.ToString()));
            int    needgold = int.Parse(base.Application["game.clearpkgold"].ToString());
            string str      = new WebLogic().clearpk(base.Session["userid"].ToString(), useridx, chaidx, pknum, needgold);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #17
0
        private void btnedit_Click(object sender, EventArgs e)
        {
            int    gold     = Math.Abs(int.Parse(this.tbgold.Text.ToString()));
            string playerid = new system().ChkSql(this.tbuserid.Text.ToString());
            string clientIP = new system().GetClientIP();
            string agentid  = this.Session["agent_id"].ToString();
            string str4     = new WebLogic().agentsellgold(agentid, playerid, clientIP, gold);

            base.Response.Write("<script language=javascript>alert('" + str4 + "')</script>");
        }
Beispiel #18
0
        private void btnedit_Click(object sender, EventArgs e)
        {
            int    useridx  = int.Parse(base.Session["useridx"].ToString());
            int    petdbidx = int.Parse(this.ddpetlist.SelectedValue.ToString());
            int    num3     = int.Parse(base.Application["game.petlvupgold2"].ToString());
            int    num4     = int.Parse(base.Application["game.petlvupgold3"].ToString());
            string str      = new WebLogic().petlevelup(base.Session["userid"].ToString(), useridx, petdbidx, num3, num4);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
        public async Task <ActionResult> Edit([Bind(Include = "Id,name,heapFreeCurrent,heapSizeCurrent,state,health,usedPhysicalMemory,activeThreadCount,jvmProcessorLoad,RunDate")] WebLogic webLogic)
        {
            if (ModelState.IsValid)
            {
                db.Entry(webLogic).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(webLogic));
        }
Beispiel #20
0
        private void btnadd_Click(object sender, EventArgs e)
        {
            int    chaidx  = int.Parse(this.ddchalist.SelectedValue);
            int    dex     = Math.Abs(int.Parse(this.tbdex.Text.ToString()));
            int    simmak  = Math.Abs(int.Parse(this.tbsimmak.Text.ToString()));
            int    gengoal = Math.Abs(int.Parse(this.tbgengoal.Text.ToString()));
            int    sta     = Math.Abs(int.Parse(this.tbsta.Text.ToString()));
            string str     = new WebLogic().addpoint(base.Session["userid"].ToString(), chaidx, dex, simmak, gengoal, sta);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #21
0
        private void btnreset_Click(object sender, EventArgs e)
        {
            int    useridx           = int.Parse(base.Session["useridx"].ToString());
            int    chaidx            = int.Parse(this.ddchalist.SelectedValue.ToString());
            int    resetpointmoney   = int.Parse(base.Application["game.resetpointmoney"].ToString());
            int    resetpointgold    = int.Parse(base.Application["game.resetpointgold"].ToString());
            int    charesetgivepoint = int.Parse(base.Application["game.charesetgivepoint"].ToString());
            string str = new WebLogic().resetpoint(base.Session["userid"].ToString(), useridx, chaidx, resetpointmoney, resetpointgold, charesetgivepoint);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #22
0
        private void btnlvup_Click(object sender, EventArgs e)
        {
            int    useridx  = int.Parse(base.Session["useridx"].ToString());
            int    chaidx   = int.Parse(this.ddchalist.SelectedValue.ToString());
            int    itemidx  = int.Parse(this.dditem.SelectedValue.ToString());
            int    needgold = int.Parse(base.Application["game.itemlvupgold"].ToString());
            Random random   = new Random();
            int    maxValue = int.Parse(base.Application["game.itemlvuprate"].ToString());
            int    rate     = random.Next(maxValue);
            string str      = new WebLogic().itemlevelup(base.Session["userid"].ToString(), useridx, chaidx, itemidx, needgold, rate);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
        // GET: WebLogic/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WebLogic webLogic = await db.WebLogics.FindAsync(id);

            if (webLogic == null)
            {
                return(HttpNotFound());
            }
            return(View(webLogic));
        }
Beispiel #24
0
        /// <summary>
        /// 取消请求
        /// </summary>
        /// <param name="cmd"></param>
        private void CancelCommand(Command cmd)
        {
            //----------http://192.168.0.104:8080/vetsync/v1/orders/7777 ????  7777是表示查检号吗?
            //按practiceref字段搜索

            HttpItem httpItem = CreateHttpItem(@"vetsync/v1/orders/" + cmd.Code);

            httpItem.Method = HttpMethod.Delete;
            HttpResult <string> result = WebLogic.GetHttpResult <string>(httpItem);

            if (result.Success)
            {
                //result.Result   //----------此字段为返回的数据! 返回什么表示成功????
            }
        }
Beispiel #25
0
        private void btnedit_Click(object sender, EventArgs e)
        {
            int    useridx   = int.Parse(base.Session["useridx"].ToString());
            int    chaidx    = int.Parse(this.ddchalist.SelectedValue.ToString());
            int    count     = int.Parse(base.Application["game.charesetcount"].ToString());
            int    point     = int.Parse(base.Application["game.charesetgivepoint"].ToString());
            int    flv       = int.Parse(base.Application["game.charesetflv"].ToString());
            int    lvstep    = int.Parse(base.Application["game.charesetlvstep"].ToString());
            int    fmoney    = int.Parse(base.Application["game.charesetfmoney"].ToString());
            int    moneystep = int.Parse(base.Application["game.charesetmoneystep"].ToString());
            int    paymode   = this.rbgold.Checked ? 1 : 0;
            string str       = new WebLogic().chareset(base.Session["userid"].ToString(), useridx, chaidx, count, point, flv, lvstep, fmoney, moneystep, paymode);

            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #26
0
        private void btnedit_Click(object sender, EventArgs e)
        {
            string str;

            if (!Regex.IsMatch(this.tbprice.Text.ToString(), @"^[+-]?\d*$"))
            {
                str = "請輸入大於0的正整數";
                base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
            }
            else
            {
                int psprice    = Math.Abs(int.Parse(this.tbprice.Text.ToString()));
                int pssigngold = int.Parse(base.Application["game.pssigngold"].ToString());
                str = new WebLogic().signpublicsale(base.Session["userid"].ToString(), pssigngold, psprice, id);
                base.Response.Write("<script>alert('" + str + "');</script>");
            }
        }
Beispiel #27
0
        private void btnedit_Click(object sender, EventArgs e)
        {
            int    useridx = int.Parse(base.Session["useridx"].ToString());
            int    chaidx  = int.Parse(this.ddchalist.SelectedValue.ToString());
            string str     = new system().ChkSql(new system().ConvertToBig5(this.tbnewname.Text.ToString().Trim(), 0x3a8));
            int    num3    = new system().getStrLen(str);

            if ((num3 < 4) | (num3 > 12))
            {
                base.Response.Write("<script language=javascript>alert('角色名長度不符合要求,名稱必需4至12的長度')</script>");
            }
            else
            {
                string str2 = new WebLogic().modifychaname(base.Session["userid"].ToString(), useridx, chaidx, str, int.Parse(base.Application["game.modifychanamecount"].ToString()), int.Parse(base.Application["game.modifychanamemoney"].ToString()));
                base.Response.Write("<script language=javascript>alert('" + str2 + "')</script>");
            }
        }
Beispiel #28
0
        private void btnreset_Click(object sender, EventArgs e)
        {
            string str = "";

            if (this.tbverifycode.Text != base.Session["VerifyCode"].ToString())
            {
                str = "驗證碼錯誤!";
            }
            else
            {
                system system = new system();
                string userid = system.ChkSql(this.tbuserid.Text.ToString());
                string key    = system.ChkSql(this.tbkey.Text.ToString());
                string email  = system.ChkSql(this.tbemail.Text.ToString());
                str = new WebLogic().forgetpassword(userid, key, email);
            }
            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #29
0
        private void btnmodify_Click(object sender, EventArgs e)
        {
            string str = "";

            if (this.tbverifycode.Text != base.Session["VerifyCode"].ToString())
            {
                str = "驗證碼錯誤!";
            }
            else
            {
                system system     = new system();
                string userid     = system.ChkSql(this.tbuserid.Text.ToString());
                string olduserpwd = system.ChkSql(this.tbolduserpwd.Text.ToString());
                string newuserpwd = system.ChkSql(this.tbnewuserpwd.Text.ToString());
                str = new WebLogic().modifypassword(userid, olduserpwd, newuserpwd);
            }
            base.Response.Write("<script language=javascript>alert('" + str + "')</script>");
        }
Beispiel #30
0
        /// <summary>
        /// 查询查一个检查是否完成
        /// </summary>
        /// <param name="cmd"></param>
        /// <returns></returns>
        private bool GetStatus(Command cmd)
        {
            //HttpItem httpItem = CreateHttpItem(@"vetsync/v1/orders/UNREQ-1708/status?rel=status");

            HttpItem            httpItem = CreateHttpItem(string.Format(@"vetsync/v1/orders/{0}/status?rel=status", cmd.Code));
            HttpResult <string> result   = WebLogic.GetHttpResult <string>(httpItem);

            if (result.Success)
            {
                XmlDocument xml = new XmlDocument();
                xml.LoadXml(result.Result);
                XmlNode node = xml.SelectSingleNode("order");
                if (node["status"] != null && node["status"].InnerText == "Done")
                {
                    return(true);
                }
            }
            return(false);
        }