Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (WebConfig.GetAppSettingsInt("OnlinePayType", 2) == 2)
     {
         base.Response.Redirect("../Alipay02/Default.aspx", true);
     }
 }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.BuyID = _Convert.StrToLong(Utility.GetRequest("BuyID"), 0L);
     if (WebConfig.GetAppSettingsInt("OnlinePayType", 2) == 1)
     {
         base.Response.Redirect("../Alipay01/Default.aspx", true);
     }
 }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     AjaxPro.Utility.RegisterTypeForAjax(typeof(Home_Room_OnlinePay_Alipay02_Send_CFT), this.Page);
     if (base._User != null)
     {
         this.Balance  = base._User.Balance.ToString();
         this.UserName = base._User.Name.ToString();
     }
     if (WebConfig.GetAppSettingsInt("OnlinePayType", 2) == 1)
     {
         base.Response.Redirect("../Alipay01/Default.aspx", true);
     }
     else
     {
         this.BuyID = _Convert.StrToLong(Shove._Web.Utility.GetRequest("BuyID"), 0L);
     }
 }
Exemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (base._User != null)
     {
         this.Balance  = base._User.Balance.ToString();
         this.UserName = base._User.Name.ToString();
     }
     this.so["OnlinePay_Alipay_Status_ON"].ToBoolean(false);
     if (WebConfig.GetAppSettingsInt("OnlinePayType", 2) == 2)
     {
         base.Response.Redirect("../Alipay02/Default.aspx", true);
     }
     else
     {
         this.Money        = _Convert.StrToDouble(this.PayMoney.Text, 0.0);
         this.RealPayMoney = this.Money;
         double num2 = this.so["OnlinePay_Alipay_PayFormalitiesFeesScale"].ToDouble(0.0) / 100.0;
         double num3 = Math.Round((double)(this.Money * num2), 2);
         this.Money        += num3;
         this.PayMoney.Text = this.Money.ToString();
         this.BindDataForPayList(this.RealPayMoney);
         string text1 = "金额:" + ((this.Money - num3)).ToString() + " ";
     }
 }
Exemplo n.º 5
0
    protected override void OnLoad(EventArgs e)
    {
        if (!base.IsPostBack)
        {
            new FirstUrl().Save();
        }
        this.PageUrl = base.Request.Url.AbsoluteUri;
        this._Site   = new Sites()[1L];
        if (this._Site == null)
        {
            PF.GoError(1, "域名无效,限制访问", base.GetType().FullName);
        }
        else
        {
            this._User = Users.GetCurrentUser(this._Site.ID);
            if (this.isRequestLogin && (this._User == null))
            {
                PF.GoLogin(this.RequestLoginPage);
            }
            else
            {
                try
                {
                    PlaceHolder holder = this.Page.FindControl("phHead") as PlaceHolder;
                    if (holder != null)
                    {
                        UserControl child = this.Page.LoadControl("~/Home/Room/UserControls/WebHead.ascx") as UserControl;
                        holder.Controls.Add(child);
                    }
                    PlaceHolder holder2 = this.Page.FindControl("phFoot") as PlaceHolder;
                    if (holder2 != null)
                    {
                        UserControl control2 = this.Page.LoadControl("~/Home/Room/UserControls/WebFoot.ascx") as UserControl;
                        holder2.Controls.Add(control2);
                    }
                }
                catch
                {
                }
                string str = ((base.Request.Url.Query == "") ? base.Request.Url.AbsoluteUri : base.Request.Url.AbsoluteUri.Replace(base.Request.Url.Query, "")).Replace(Utility.GetUrl(), "").Replace("/", "_").Replace(".aspx", "");
                if (str.StartsWith("_"))
                {
                    str = str.Remove(0, 1);
                }
                if (FloatNotifyPageList.IndexOf("," + str + ",") > -1)
                {
                    StringBuilder builder          = new StringBuilder();
                    string        key              = "FloatNotifyContent";
                    DataTable     cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);
                    if (cacheAsDataTable == null)
                    {
                        cacheAsDataTable = new Tables.T_FloatNotify().Open("", "", "[Order] asc,[DateTime] desc");
                        if ((cacheAsDataTable != null) && (cacheAsDataTable.Rows.Count > 0))
                        {
                            Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0xea60);
                        }
                    }
                    bool   flag = false;
                    int    num  = this._Site.SiteOptions["Opt_FloatNotifiesTime"].ToInt(3);
                    string name = "LastLoginShowFloatNotifyUserID";
                    switch (num)
                    {
                    case 1:
                    {
                        HttpCookie cookie = base.Request.Cookies[name];
                        if ((cookie != null) && !string.IsNullOrEmpty(cookie.Value))
                        {
                            flag = true;
                        }
                        break;
                    }

                    case 2:
                        flag = DateTime.Now.Minute == 0;
                        break;

                    case 3:
                        flag = true;
                        break;
                    }
                    if (((cacheAsDataTable != null) && (cacheAsDataTable.Rows.Count > 0)) && flag)
                    {
                        DataRow[] rowArray = cacheAsDataTable.Select("isShow=1");
                        for (int i = 0; i < rowArray.Length; i++)
                        {
                            if (i == 2)
                            {
                                break;
                            }
                            int num4 = i + 1;
                            builder.Append("<font color='" + rowArray[i]["Color"].ToString() + "'>").Append(num4.ToString()).Append(".</font>").Append("<a href='").Append(rowArray[i]["Url"].ToString()).Append("' target='_blank' style='text-decoration: none;color:").Append(rowArray[i]["Color"].ToString()).Append(";' onmouseover=\"this.style.color='#ff6600';\" onmouseout=\"this.style.color='").Append(rowArray[i]["Color"].ToString()).Append("';\">").Append(rowArray[i]["Title"].ToString()).Append("</a><br />");
                        }
                        string html  = HmtlManage.GetHtml(AppDomain.CurrentDomain.BaseDirectory + "Home/Web/Template/FloatNotify.html");
                        Label  label = new Label();
                        int    num5  = FloatNotifyTimeOut * 100;
                        label.Text = html.Replace("$FloatNotifyTimeOut$", num5.ToString()).Replace("$FloatNotifyContent$", builder.ToString());
                        try
                        {
                            base.Form.Controls.AddAt(0, label);
                        }
                        catch (Exception exception)
                        {
                            new Log("Page").Write(str + exception.Message);
                        }
                        HttpCookie cookie2 = new HttpCookie(name)
                        {
                            Value   = "",
                            Expires = DateTime.Now.AddYears(-20)
                        };
                        try
                        {
                            HttpContext.Current.Response.Cookies.Add(cookie2);
                        }
                        catch
                        {
                        }
                    }
                }
                string fullName = base.GetType().FullName;
                try
                {
                    fullName = fullName.Substring(4, fullName.Length - 9);
                }
                catch
                {
                }
                int appSettingsInt = WebConfig.GetAppSettingsInt(fullName, -1);
                if (appSettingsInt > 0)
                {
                    base.Response.Cache.SetExpires(DateTime.Now.AddSeconds((double)appSettingsInt));
                    base.Response.Cache.SetCacheability(HttpCacheability.Server);
                    base.Response.Cache.VaryByParams["*"] = true;
                    base.Response.Cache.SetValidUntilExpires(true);
                    base.Response.Cache.SetVaryByCustom("SitePage");
                }
                base.OnLoad(e);
            }
        }
    }
Exemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.so["OnlinePay_Alipay_Status_ON"].ToBoolean(false);
     if (WebConfig.GetAppSettingsInt("OnlinePayType", 2) == 2)
     {
         base.Response.Redirect("../Alipay02/Default.aspx", true);
     }
     else
     {
         double num2    = _Convert.StrToDouble(Utility.GetRequest("PayMoney"), 0.0);
         string request = Utility.GetRequest("BankCode");
         if (!base.IsPostBack)
         {
             if (base._User.Competences.CompetencesList.IndexOf("Administrator") > 0)
             {
                 if (num2 < 0.01)
                 {
                     base.Response.Write("<script type=\"text/javascript\">alert(\"请输入正确的充值金额!再提交,谢谢!\"); window.close();</script>");
                     return;
                 }
             }
             else if (num2 < 1.0)
             {
                 base.Response.Write("<script type=\"text/javascript\">alert(\"请输入正确的充值金额!再提交,谢谢!\"); window.close();</script>");
                 return;
             }
             double num3            = this.so["OnlinePay_Alipay_PayFormalitiesFeesScale"].ToDouble(0.0) / 100.0;
             double formalitiesFees = Math.Round((double)(num2 * num3), 2);
             num2               += formalitiesFees;
             this.gateway        = "https://www.alipay.com/cooperate/gateway.do?";
             this.service        = "create_direct_pay_by_user";
             this.sign_type      = "MD5";
             this.payment_type   = "1";
             this._input_charset = "utf-8";
             this.return_url     = Utility.GetUrl() + "/Home/Room/OnlinePay/Alipay01/Receive.aspx";
             this.notify_url     = Utility.GetUrl() + "/Home/Room/OnlinePay/Alipay01/AlipayNotify.aspx";
             this.partner        = this.so["OnlinePay_Alipay_UserNumber"].ToString("");
             this.show_url       = "http://www.alipay.com";
             this.seller_email   = this.so["OnlinePay_Alipay_UserName"].ToString("");
             this.key            = this.so["OnlinePay_Alipay_MD5Key"].ToString("");
             this.paymethod      = "bankPay";
             this.buyer_email    = base._User.Email;
             this.subject        = Encrypt.EncryptString(PF.GetCallCert(), base._User.ID.ToString());
             this.body           = "TicketMoney";
             double num6 = Convert.ToDouble(num2.ToString());
             this.total_fee = num6.ToString();
             long   newPayNumber      = -1L;
             string returnDescription = "";
             if (Procedures.P_GetNewPayNumber(base._Site.ID, base._User.ID, "Alipay", num6 - formalitiesFees, formalitiesFees, ref newPayNumber, ref returnDescription) < 0)
             {
                 PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
             }
             else if ((newPayNumber < 0L) || (returnDescription != ""))
             {
                 PF.GoError(1, returnDescription, base.GetType().BaseType.FullName);
             }
             else
             {
                 this.out_trade_no = newPayNumber.ToString();
                 if (request.ToLower() == "alipay")
                 {
                     this.AlipayPay();
                 }
                 else
                 {
                     this.BankClick(request);
                 }
             }
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (base._User != null)
     {
         this.Balance  = base._User.Balance.ToString();
         this.UserName = base._User.Name.ToString();
     }
     if (WebConfig.GetAppSettingsInt("OnlinePayType", 2) == 1)
     {
         base.Response.Redirect("../Alipay01/Default.aspx", true);
     }
     else
     {
         bool flag  = this.so["OnlinePay_Alipay_Status_ON"].ToBoolean(false);
         bool flag2 = this.so["OnlinePay_99Bill_Status_ON"].ToBoolean(false);
         bool flag3 = this.so["OnlinePay_Tenpay_Status_ON"].ToBoolean(false);
         bool flag4 = this.so["OnlinePay_007Ka_Status_ON"].ToBoolean(false);
         bool flag5 = this.so["OnlinePay_YeePay_Status_ON"].ToBoolean(false);
         if (!flag)
         {
             this.td_Alipay.Visible  = false;
             this.td_Alipay1.Visible = false;
         }
         else if (this.DefaultSendPage == "")
         {
             this.DefaultSendPage = "Send_Alipay.aspx";
         }
         if (!flag2)
         {
             this.td_99Bill.Visible  = false;
             this.td_99Bill1.Visible = false;
         }
         else if (this.DefaultSendPage == "")
         {
             this.DefaultSendPage = "Send_99Bill.aspx";
         }
         if (!flag3)
         {
             this.td_CFT.Visible = false;
         }
         else if (this.DefaultSendPage == "")
         {
             this.DefaultSendPage = "Send_CFT.aspx";
         }
         if (!flag5)
         {
             this.td_Yeepay.Visible  = false;
             this.td_Yeepay1.Visible = false;
         }
         else if (this.DefaultSendPage == "")
         {
             this.DefaultSendPage = "Send_YeePay.aspx";
         }
         if (!flag4)
         {
             this.td_SZX.Visible  = false;
             this.td_SZX1.Visible = false;
         }
         else if (this.DefaultSendPage == "")
         {
             this.DefaultSendPage = "../007ka/Default.aspx";
         }
     }
 }