示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = AppEnv.GetSetting("relaxprice");
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            DataTable dtDetail = TintucController.GetNewsDetailHasCache(id);

            if (dtDetail != null && dtDetail.Rows.Count > 0)
            {
                litName.Text = dtDetail.Rows[0]["Content_Headline"].ToString();
                catID        = ConvertUtility.ToInt32(dtDetail.Rows[0]["Distribution_ZoneID"]);
                DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID);

                catName = catInfo.Rows[0]["Zone_Name"].ToString();

                parentCatID = ConvertUtility.ToInt32(catInfo.Rows[0]["Zone_ParentID"]);
                //chitietGiaodich = "Thu gian: " + catInfo.Rows[0]["Zone_Name"] + " -- id: " + id + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                chitietGiaodich = "Thu gian: " + catInfo.Rows[0]["Zone_Name"] + " -- id: " + id;

                int       totalrecord = 0;
                DataTable dtCat       = new DataTable();
                dtCat = TintucController.GetAllNewsByCategoryHasCache(catID, 8, 1, out totalrecord);
                if (dtCat != null && dtCat.Rows.Count > 0)
                {
                    IList <DataRow> contentTop    = dtCat.Select().Skip(0).Take(3).ToList();
                    IList <DataRow> contentBottom = dtCat.Select().Skip(3).Take(7).ToList();

                    rptTop.DataSource = contentTop.CopyToDataTable();
                    rptTop.DataBind();

                    rptBottom.DataSource = contentBottom.CopyToDataTable();
                    rptBottom.DataBind();
                }
            }

            switch (parentCatID.ToString())
            {
            case "258":           //Cẩm nang tư vấn
                if (catID == 264) //Sex và cuộc sống
                {
                    price     = AppEnv.GetSetting("relaxsexprice");
                    ProductId = "RELAXADVISESEX";
                    Keyword   = "ADVISE_SEX";
                }
                else
                {
                    price     = AppEnv.GetSetting("relaxtuvanprice");
                    ProductId = "RELAXADVISEBOOK";
                    Keyword   = "ADVISE_BOOK";
                }
                break;
            }

            if (!Page.IsPostBack)
            {
                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region Old Content

                if (AppEnv.GetSetting("TestFlag") == "1")
                {
                    HienThiNoiDung(true, false);
                }
                else if (parentCatID.ToString() == "255" && WapController.W4A_Subscriber_IsActive(Session["msisdn"].ToString(), 1))
                {
                    HienThiNoiDung(true, false);
                }
                else
                {
                    if (Session["msisdn"] != null)
                    {
                        var charging = new Library.VNMCharging.VNMChargingGW();
                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]);

                        if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))//Not Enough Money
                        {
                            messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"], out logPrice);
                            price         = logPrice;
                        }

                        if (messageReturn == AppEnv.GetSetting("SystemOverload")) //System Over Load
                        {
                            messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]);
                        }

                        if (messageReturn == "1")
                        {// Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true, true);
                        }
                        else
                        {// Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false, true);
                        }
                    }
                    else
                    {
                        pnlContentError.Visible = true;
                        litContentError.Text    = "Bạn vui lòng lựa chọn kết nối EDGE hay 3G để sử dụng dịch vụ này. Lưu ý, hãy ngắt kết nối wifi bạn nhé";
                    }
                }

                #endregion
            }
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = ConfigurationSettings.AppSettings.Get("kqxsprice");
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr = "<a href=\"../" + UrlProcess.XoSoHome() + "\" >XỔ SỐ</a>";
            //linkStr_KD = "<a href=\"../" + UrlProcess.GetXosoHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >XO SO<a>";

            if (!IsPostBack)
            {
                //if (width == 0)
                //    width = (int)Constant.DefaultScreen.Standard;
                //ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                DataSet ds = XosoController.GetDetail_LotAndOtherLotByIdAndTop(id, 6);

                // Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                if (Session["transactionid_old"] != null)
                {
                    messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                    if (ConvertUtility.ToString(Session["debit_status"]) == "0")
                    {// Thanh toán thành công >> trả nội dung
                        HienThiNoiDung(true, true);
                    }
                    else
                    {// Thanh toán không thành công >> thông báo lỗi
                        HienThiNoiDung(false, true);
                    }
                    Session["transactionid_old"] = null;
                }
                else
                {
                    if (telCo == Constant.T_Mobifone)
                    {
                        string content = Session["cpid"].ToString() + "&" + Constant.xoso + id.ToString() + "&" + price + "&" + Session["transactionid"].ToString();
                        Response.Redirect(ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content, ConfigurationSettings.AppSettings.Get("vmskey"))));
                    }
                    //
                    if (telCo == "Undefined")
                    {
                        pnlSMS.Visible = true;
                        //if (lang == "1")
                        //{
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("kqxscode") + " " + ds.Tables[0].Rows[0]["company_comment"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("kqxscommandcode") + "</b> để nhận kết quả xổ số mới nhất" + Resources.Resource.wChon3G;
                        //}
                        //else
                        //{
                        //    ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                        //    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("kqxscode") + " " + ds.Tables[0].Rows[0]["company_comment"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("kqxscommandcode") + "</b> de nhan ket qua xo so moi nhat" + Resources.Resource.wChon3G_KD;
                        //}
                    }
                    else
                    {
                        pnlThongBao.Visible = false;
                        switch (Session["telco"].ToString())
                        {
                        case "Vietnamobile":
                            var charging = new Library.VNMCharging.VNMChargingGW();

                            messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "LOTOLASTRESULT", "LAST_RESULT", price, "D", "KQXS", Request.QueryString["id"]);

                            if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                            {    // Thanh toán thành công >> trả nội dung
                                HienThiNoiDung(true, true);
                            }
                            else
                            {    // Thanh toán không thành công >> thông báo lỗi
                                HienThiNoiDung(false, true);
                            }
                            break;
                        }
                    }
                }

                #endregion
            }
        }
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog)
        {
            pnlNoiDung.Visible = true;

            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = VideoController.GetVideoDetailByID(Session["telco"].ToString(), id);

            //chitietGiaodich = "Video view: " + dtDetail.Rows[0]["VTitle_Unicode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            chitietGiaodich = "Video view: " + dtDetail.Rows[0]["VTitle_Unicode"] + " -- id:" + id.ToString();

            if (thuchien)
            {
                //if (lang == "1")
                //{
                ltrTieuDe.Text   = linkStr;
                lblTen.Text      = dtDetail.Rows[0]["VTitle_Unicode"].ToString();
                lnkDownload.Text = Resources.Resource.wBamDeXem + "video";
                ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong + " video " + dtDetail.Rows[0]["VTitle_Unicode"].ToString();
                //}
                //else
                //{
                //    ltrTieuDe.Text = linkStr;
                //    lblTen.Text = dtDetail.Rows[0]["VTitle"].ToString();
                //    lnkDownload.Text = Resources.Resource.wBamDeXem_KD + "video";
                //    ltrNoiDung.Text = Resources.Resource.wMuaThanhCong_KD + " video " + dtDetail.Rows[0]["VTitle"].ToString();
                //};
                if (HttpContext.Current.Request.UserAgent != null)
                {
                    if (HttpContext.Current.Request.UserAgent.ToLower().Contains("safari"))
                    {
                        lnkDownload.NavigateUrl = ConfigurationSettings.AppSettings.Get("vnmviewIphone") + dtDetail.Rows[0]["SmartPhonePath"].ToString().Replace("~/", "/");
                    }
                    else
                    {
                        lnkDownload.NavigateUrl = ConfigurationSettings.AppSettings.Get("vnmview") + dtDetail.Rows[0]["SmartPhonePath"].ToString().Replace("~/Upload/Video", "");
                    }
                }
                else
                {
                    lnkDownload.NavigateUrl = ConfigurationSettings.AppSettings.Get("vnmview") + dtDetail.Rows[0]["VMobilePath"].ToString().Replace("~/Upload/Video", "");
                }
                // Response.Write(lnkDownload.NavigateUrl);
                //lnkDownload.NavigateUrl = ConfigurationSettings.AppSettings.Get("vnmview") + dtDetail.Rows[0]["VMobilePath"].ToString().Replace("~/Upload/Video", "");

                if (isLog)
                {
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 5);
                }

                VideoController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id);
            }
            else
            {
                //Thông báo lỗi thanh toán
                //if (lang == "1")
                //{
                ltrTieuDe.Text  = linkStr + " » " + Resources.Resource.wThongBao;
                ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                //}
                //else
                //{
                //    ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao_KD;
                //    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                //}

                if (isLog)
                {
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 5, messageReturn);
                }


                //--Thông báo lỗi thanh toán
            }

            if (isLog)
            {
                //log charging
                ILog logger = LogManager.GetLogger(Session["telco"].ToString());
                logger.Debug("--------------------------------------------------");
                logger.Debug("MSISDN:" + Session["msisdn"]);
                logger.Debug("Dich vu: Video - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["VTitle"].ToString() + " - id: " + id);
                logger.Debug("Video Url:" + lnkDownload.NavigateUrl);
                logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                logger.Debug("Error:" + messageReturn);
                logger.Debug("Current Url:" + Request.RawUrl);
                //end log
            }
        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = AppEnv.GetSetting("relaxprice");
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            DataTable dtDetail = TintucController.GetNewsDetailHasCache(id);

            if (dtDetail != null && dtDetail.Rows.Count > 0)
            {
                litName.Text = dtDetail.Rows[0]["Content_Headline"].ToString();
                catID        = ConvertUtility.ToInt32(dtDetail.Rows[0]["Distribution_ZoneID"]);
                DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID);
                if (catInfo != null && catInfo.Rows.Count > 0)
                {
                    catName = catInfo.Rows[0]["Zone_Name"].ToString();

                    parentCatID     = ConvertUtility.ToInt32(catInfo.Rows[0]["Zone_ParentID"]);
                    chitietGiaodich = "Thu gian: " + catInfo.Rows[0]["Zone_Name"] + " -- id: " + id;
                }

                int       totalrecord = 0;
                DataTable dtCat       = new DataTable();
                dtCat = TintucController.GetAllNewsByCategoryHasCache(catID, 8, 1, out totalrecord);
                if (dtCat != null && dtCat.Rows.Count > 0)
                {
                    IList <DataRow> contentTop = dtCat.Select().Skip(0).Take(5).ToList();
                    //IList<DataRow> contentBottom = dtCat.Select().Skip(3).Take(7).ToList();

                    rptTop.DataSource = contentTop.CopyToDataTable();
                    rptTop.DataBind();

                    //rptBottom.DataSource = contentBottom.CopyToDataTable();
                    //rptBottom.DataBind();
                }
            }

            switch (parentCatID.ToString())
            {
            case "258":           //Cẩm nang tư vấn
                if (catID == 264) //Sex và cuộc sống
                {
                    price     = ConfigurationSettings.AppSettings.Get("relaxsexprice");
                    ProductId = "RELAXADVISESEX";
                    Keyword   = "ADVISE_SEX";
                }
                else
                {
                    price     = ConfigurationSettings.AppSettings.Get("relaxtuvanprice");
                    ProductId = "RELAXADVISEBOOK";
                    Keyword   = "ADVISE_BOOK";
                }
                break;

            case "121":    //Gửi lời yêu thương
                price     = ConfigurationSettings.AppSettings.Get("relaxtuvanprice");
                ProductId = "RELAXLOVER";
                Keyword   = "LOVER";
                break;

            case "268":    //Địa điểm ăn chơi
                price     = ConfigurationSettings.AppSettings.Get("relaxanchoiprice");
                ProductId = "RELAXPLACE";
                Keyword   = "PLACE";
                break;

            case "255":    //Đọc truyện
                price = ConfigurationSettings.AppSettings.Get("relaxprice");
                //dungnt sua de charge dc
                ProductId = "LOTOLASTRESULT"; //"RELAXSTORYREAD";
                Keyword   = "LAST_RESULT";    //"READ";
                break;

            default:
                price     = ConfigurationSettings.AppSettings.Get("relaxprice");
                ProductId = "HOROSCOPE";
                Keyword   = "HOROSCOPE";
                break;
            }

            if (!Page.IsPostBack)
            {
                #region FREE CONTENT

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                if (AppEnv.GetSetting("TestFlag") == "1")
                {
                    HienThiNoiDung(true, false);
                }
                else if (parentCatID.ToString() == "255" && Session["msisdn"] != null && WapController.W4A_Subscriber_IsActive(Session["msisdn"].ToString(), 1))
                {
                    HienThiNoiDung(true, false);
                }
                else
                {
                    if (Session["msisdn"] != null)
                    {
                        var charging = new Library.VNMCharging.VNMChargingGW();
                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]);

                        if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))//Not Enough Money
                        {
                            messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"], out logPrice);
                            price         = logPrice;
                        }

                        if (messageReturn == AppEnv.GetSetting("SystemOverload")) //System Over Load
                        {
                            messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]);
                        }

                        if (messageReturn == "1")
                        {// Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true, true);
                        }
                        else
                        {// Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false, true);
                        }
                    }
                    else
                    {
                        pnlContentError.Visible = true;
                        litContentError.Text    = "Bạn vui lòng lựa chọn kết nối EDGE hay 3G để sử dụng dịch vụ này. Lưu ý, hãy ngắt kết nối wifi bạn nhé";
                    }
                }

                #endregion

                //catid = ConvertUtility.ToInt32(Request.QueryString["catid"]);
                DataTable dtOnline = TintucController.GetAllCategoryExeptCatIDHasCache(255, catID);
                DataTable dtAudio  = TintucController.GetCategoryTruyenAudioCache();

                rptCateOnline.DataSource = dtOnline;
                rptCateOnline.DataBind();

                rptCateAudio.DataSource = dtAudio;
                rptCateAudio.DataBind();
            }
        }
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog)
        {
            pnlNoiDung.Visible = true;

            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = PhanmemController.GetAPPDetailByID(AppEnv.CheckFreeContentTelco(), id);

            //chitietGiaodich = "Phần mềm: " + dtDetail.Rows[0]["AppNameUnicode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            chitietGiaodich = "Phần mềm: " + dtDetail.Rows[0]["AppNameUnicode"].ToString() + " -- id:" + id.ToString();
            if (thuchien)
            {
                if (lang == "1")
                {
                    ltrTieuDe.Text   = linkStr;
                    lblTen.Text      = dtDetail.Rows[0]["AppNameUnicode"].ToString();
                    lnkDownload.Text = Resources.Resource.wBamDeTai;
                    ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong + " phần mềm " + dtDetail.Rows[0]["AppNameUnicode"].ToString();
                }
                else
                {
                    ltrTieuDe.Text   = linkStr_KD;
                    lblTen.Text      = dtDetail.Rows[0]["AppName"].ToString();
                    lnkDownload.Text = Resources.Resource.wBamDeTai_KD;
                    ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong_KD + " phan mem " + dtDetail.Rows[0]["AppName"].ToString();
                }
                string url;
                try
                {
                    VMGGame.MOReceiver urlservice = new VMGGame.MOReceiver();
                    url = urlservice.VMG_ReturnUrlForApplication(ConvertUtility.ToString(dtDetail.Rows[0]["AppID"]), 0, AppEnv.CheckFreeContentMsisdn(), ConvertUtility.ToInt32(dtDetail.Rows[0]["Partner_ID"]), "XZONE", "WAP", AppEnv.CheckFreeContentTelco(), "WAP.XZONE.VN", "", "");
                    int indexofhttp = url.IndexOf("http://");
                    if (indexofhttp == -1)
                    {
                        url = "http://" + url;
                    }
                    else
                    {
                        url = url.Substring(indexofhttp);
                    }
                }
                catch { url = ""; }
                lnkDownload.NavigateUrl = url;
                //lnkDownload.NavigateUrl = UrlProcess.GetGameDownloadItem(Session["telco"].ToString(), "4", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));
                if (isLog)
                {
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 4);
                }
                PhanmemController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id);
            }
            else
            {
                //Thông báo lỗi thanh toán
                if (lang == "1")
                {
                    ltrTieuDe.Text  = linkStr + " » " + Resources.Resource.wThongBao;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                }
                else
                {
                    ltrTieuDe.Text  = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                }

                if (isLog)
                {
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 4, messageReturn);
                }

                //--Thông báo lỗi thanh toán
            }

            if (isLog)
            {
                //log charging
                ILog logger = log4net.LogManager.GetLogger(AppEnv.CheckFreeContentTelco());
                logger.Debug("--------------------------------------------------");
                logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                logger.Debug("Dich vu: Phan mem - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["AppName"].ToString() + " - id: " + id);
                logger.Debug("Phan mem Url:" + lnkDownload.NavigateUrl);
                logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                logger.Debug("Error:" + messageReturn);
                logger.Debug("Current Url:" + Request.RawUrl);
                //end log
            }
        }
示例#6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = ConfigurationSettings.AppSettings.Get("kqxsprice");
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            day   = ConvertUtility.ToInt32(Request.QueryString["day"]);

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr    = "<a href=\"../" + UrlProcess.GetXosoHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >XỔ SỐ<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetXosoHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >XO SO<a>";

            if (!IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                DataTable Detail = XosoController.GetKQXSDetailbyCompanyID(id, DateTime.Now.AddDays(-day));

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                // Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                if (Session["transactionid_old"] != null)
                {
                    messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                    if (ConvertUtility.ToString(Session["debit_status"]) == "0")
                    {// Thanh toán thành công >> trả nội dung
                        HienThiNoiDung(true, true);
                    }
                    else
                    {// Thanh toán không thành công >> thông báo lỗi
                        HienThiNoiDung(false, true);
                    }
                    Session["transactionid_old"] = null;
                }
                else
                {
                    if (telCo == Constant.T_Mobifone)
                    {
                        string content = Session["cpid"].ToString() + "&" + Constant.xoso + id.ToString() + "@" + day + "&" + price + "&" + Session["transactionid"].ToString();
                        Response.Redirect(ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content, ConfigurationSettings.AppSettings.Get("vmskey"))));
                    }
                    //
                    if (telCo == "Undefined")
                    {
                        pnlSMS.Visible = true;
                        if (lang == "1")
                        {
                            ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                            ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("kqxscode") + " " + Detail.Rows[0]["company_comment"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("kqxscommandcode") + "</b> để nhận kết quả xổ số mới nhất" + Resources.Resource.wChon3G;
                        }
                        else
                        {
                            ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                            ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("kqxscode") + " " + Detail.Rows[0]["company_comment"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("kqxscommandcode") + "</b> de nhan ket qua xo so moi nhat" + Resources.Resource.wChon3G_KD;
                        }
                    }
                    else
                    {
                        //pnlThongBao.Visible = true;
                        //if (lang == "1")
                        //{
                        //    ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao;
                        //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu.Replace("xxx", price);
                        //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu + "kết quả " + Detail.Rows[0]["company_name"].ToString();
                        //    btnCo.Text = Resources.Resource.btnCo;
                        //    btnKhong.Text = Resources.Resource.btnKhong;
                        //}
                        //else
                        //{
                        //    ltrTitle.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                        //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD.Replace("xxx", price);
                        //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu + "ket qua " + UnicodeUtility.UnicodeToKoDau(Detail.Rows[0]["company_name"].ToString());
                        //    btnCo.Text = Resources.Resource.btnCo_KD;
                        //    btnKhong.Text = Resources.Resource.btnKhong_KD;
                        //}
                        pnlThongBao.Visible = false;
                        switch (Session["telco"].ToString())
                        {
                        case "Vietnamobile":
                            WapXzone_VNM.Library.VNMCharging.VNMChargingGW charging = new WapXzone_VNM.Library.VNMCharging.VNMChargingGW();

                            //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), price, "D", "KQXS", Request.QueryString["id"].ToString());

                            //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "LOTOLASTRESULT", "LAST_RESULT");

                            messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "LOTOLASTRESULT", "LAST_RESULT", price, "D", "KQXS", Request.QueryString["id"]);

                            if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                            {    // Thanh toán thành công >> trả nội dung
                                HienThiNoiDung(true, true);
                            }
                            else
                            {    // Thanh toán không thành công >> thông báo lỗi
                                HienThiNoiDung(false, true);
                            }
                            break;
                        }
                    }
                }

                #endregion

                DataSet ds = XosoController.GetDetail_LotAndOtherLot(ConvertUtility.ToInt32(Detail.Rows[0]["lot_id"]), id, 6);
                rptOther.DataSource     = ds.Tables[1];
                rptOther.ItemDataBound += new RepeaterItemEventHandler(rptOther_ItemDataBound);;
                rptOther.DataBind();

                if (lang == "1")
                {
                    lblOther.Text = "XEM TIẾP";
                }
            }
        }
示例#7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            price = ConfigurationSettings.AppSettings.Get("TaiMacDinh");
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr = "<a href=\"" + UrlProcess.VideoHome() + "\" >VIDEO</a>";

            if (!IsPostBack)
            {
                //if (width == 0)
                //    width = (int)Constant.DefaultScreen.Standard;
                //ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                //HienThiNoiDung(true,false);return;

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                DataTable dtDetail = VideoController.GetVideoDetailByID(AppEnv.CheckSessionTelco(), id);
                //
                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    //if (lang == "1")
                    //{
                    ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                    ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("videocode") + " " + dtDetail.Rows[0]["VID"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("videocommandcode") + "</b> để tải video <b>" + dtDetail.Rows[0]["VTitle_Unicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                    //}
                    //else
                    //{
                    //    ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan_KD;
                    //    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("videocode") + " " + dtDetail.Rows[0]["VID"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("videocommandcode") + "</b> de tai video <b>" + dtDetail.Rows[0]["VTitle"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                    //}
                }
                else
                {
                    pnlThongBao.Visible = false;
                    switch (Session["telco"].ToString())
                    {
                    case "Vietnamobile":
                        var charging = new Library.VNMCharging.VNMChargingGW();

                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "VIDEOGIFT", "VIDEO_GIFT", price, "D", "VID", Request.QueryString["id"]);

                        if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))    //Not Enough Money
                        {
                            messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), "VIDEOGIFT", "VIDEO_GIFT", price, "D", "VID", Request.QueryString["id"], out logPrice);
                            price         = logPrice;
                        }

                        if (messageReturn == AppEnv.GetSetting("SystemOverload"))     //System Over Load
                        {
                            messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), "VIDEOGIFT", "VIDEO_GIFT", price, "D", "VID", Request.QueryString["id"]);
                        }

                        ILog logger = LogManager.GetLogger(Session["telco"].ToString());
                        logger.Debug("---" + messageReturn + "---");
                        if (messageReturn == "1")
                        {    // Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true, true);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false, true);
                        }
                        break;
                    }
                }

                #endregion
            }
        }
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog)
        {
            pnlNoiDung.Visible = true;
            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = MusicController.GetItemDetailHasCache(AppEnv.CheckFreeContentTelco(), id);

            //chitietGiaodich = "Nhạc: " + dtDetail.Rows[0]["SongNameUnicode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            chitietGiaodich = "Nhạc: " + dtDetail.Rows[0]["SongNameUnicode"].ToString() + " -- id:" + id.ToString();
            if (thuchien)
            {
                DataTable dtKhuyenMai = MusicController.GetItemDetailRandom(AppEnv.CheckFreeContentTelco(), id);
                string    khuyenmaiID = ConvertUtility.ToString(dtKhuyenMai.Rows[0]["W_MItemID"]);
                lnkKhuyenMai.NavigateUrl = UrlProcess.GetGameDownloadItem(AppEnv.CheckFreeContentTelco(), "22", khuyenmaiID, SecurityMethod.MD5Encrypt(khuyenmaiID));
                //if (lang == "1")
                //{
                ltrTieuDe.Text    = "ÂM NHẠC";
                lblTen.Text       = dtDetail.Rows[0]["SongNameUnicode"].ToString();
                lnkDownload.Text  = Resources.Resource.wBamDeTai;
                ltrNoiDung.Text   = Resources.Resource.wMuaThanhCong + " bản nhạc " + dtDetail.Rows[0]["SongNameUnicode"].ToString();
                lnkKhuyenMai.Text = "Nhạc tặng: " + dtKhuyenMai.Rows[0]["SongNameUnicode"].ToString();
                //}
                //else
                //{
                //    ltrTieuDe.Text = "AM NHAC";
                //    lblTen.Text = dtDetail.Rows[0]["SongName"].ToString();
                //    lnkDownload.Text = Resources.Resource.wBamDeTai_KD;
                //    ltrNoiDung.Text = Resources.Resource.wMuaThanhCong_KD + " ban nhac " + dtDetail.Rows[0]["SongName"].ToString();
                //    lnkKhuyenMai.Text = "Nhac tang: " + dtKhuyenMai.Rows[0]["SongName"].ToString();
                //}
                lnkDownload.NavigateUrl = UrlProcess.GetGameDownloadItem(AppEnv.CheckFreeContentTelco(), "22", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));

                if (free != true)
                {
                    if (isLog)
                    {
                        Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 2);
                    }
                }

                MusicController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id);
            }
            else
            {
                //Thông báo lỗi thanh toán
                //if (lang == "1")
                //{
                ltrTieuDe.Text  = Resources.Resource.wThongBao;
                ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                //}
                //else
                //{
                //    ltrTieuDe.Text = Resources.Resource.wThongBao_KD;
                //    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                //}
                if (isLog)
                {
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 2, messageReturn);
                }

                //--Thông báo lỗi thanh toán
            }
            //log charging
            if (free != true)
            {
                if (isLog)
                {
                    ILog logger = LogManager.GetLogger(Session["telco"].ToString());
                    logger.Debug("--------------------------------------------------");
                    logger.Debug("MSISDN:" + Session["msisdn"]);
                    logger.Debug("Dich vu: Am nhac - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["SongName"] + " - id: " + id);
                    logger.Debug("Am nhac Url:" + lnkDownload.NavigateUrl);
                    logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                    logger.Debug("Error:" + messageReturn);
                    logger.Debug("Current Url:" + Request.RawUrl);
                }
            }
            //end log
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            price = ConfigurationSettings.AppSettings.Get("ringtoneprice");
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            if (!IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                DataTable dtDetail = MusicController.GetItemDetailHasCache(Session["telco"].ToString(), id);
                if (dtDetail != null && dtDetail.Rows.Count > 0)
                {
                    chitietGiaodich = "Nhac: " + dtDetail.Rows[0]["SongName"] + " -- id:" + id;
                }
                //Miễn phí
                if (id == 2843)
                {
                    free = true;
                    HienThiNoiDung(true, false);
                    return;
                }
                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = Resources.Resource.wHuongDan;
                        ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("ringtonecode") + " " + dtDetail.Rows[0]["Code"] + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("ringtonecommandcode") + "</b> để tải bản nhạc <b>" + dtDetail.Rows[0]["SongNameUnicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                    }
                    else
                    {
                        ltrHuongdan.Text = Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("ringtonecode") + " " + dtDetail.Rows[0]["Code"] + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("ringtonecommandcode") + "</b> de tai ban nhac <b>" + dtDetail.Rows[0]["SongName"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                    }
                }
                else
                {
                    pnlThongBao.Visible = false;
                    try
                    {
                        switch (Session["telco"].ToString())
                        {
                        case "Vietnamobile":
                            var charging = new Library.VNMCharging.VNMChargingGW();

                            messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "MUSICDOWNLOAD", "MUSIC_DOWN", price, "D", "TT", chitietGiaodich);

                            if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))    //Not Enough Money
                            {
                                messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), "MUSICDOWNLOAD", "MUSIC_DOWN", price, "D", "TT", chitietGiaodich, out logPrice);
                                price         = logPrice;
                            }

                            if (messageReturn == AppEnv.GetSetting("SystemOverload"))     //System Over Load
                            {
                                messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), "MUSICDOWNLOAD", "MUSIC_DOWN", price, "D", "TT", chitietGiaodich);
                            }

                            if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                            {
                                // Thanh toán thành công >> trả nội dung
                                HienThiNoiDung(true, true);
                            }
                            else
                            {    // Thanh toán không thành công >> thông báo lỗi
                                HienThiNoiDung(false, true);
                            }
                            break;
                        }
                    }
                    catch (Exception ex)
                    {
                        ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                        logger.Debug("----------Lỗi charging----------------------");
                        logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                        logger.Debug(ex.ToString());
                        logger.Debug("----------Lỗi charging----------------------");
                    }
                }

                #endregion
            }
        }
示例#10
0
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog)
        {
            pnlNoiDung.Visible = true;

            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = VideoController.GetVideoDetailByID(Session["telco"].ToString(), id);

            chitietGiaodich = "Video: " + dtDetail.Rows[0]["VTitle_Unicode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            if (thuchien)
            {
                //if (lang == "1")
                //{
                ltrTieuDe.Text   = linkStr;
                lblTen.Text      = dtDetail.Rows[0]["VTitle_Unicode"].ToString();
                lnkDownload.Text = Resources.Resource.wBamDeTai;
                //ltrNoiDung.Text = Resources.Resource.wMuaThanhCong + " video " + dtDetail.Rows[0]["VTitle_Unicode"].ToString();
                //}
                //else
                //{
                //    ltrTieuDe.Text = linkStr;
                //    lblTen.Text = dtDetail.Rows[0]["VTitle"].ToString();
                //    lnkDownload.Text = Resources.Resource.wBamDeTai_KD;
                //    ltrNoiDung.Text = Resources.Resource.wMuaThanhCong_KD + " video " + dtDetail.Rows[0]["VTitle"].ToString();
                //}

                lnkDownload.NavigateUrl = UrlProcess.GetDownloadItem(AppEnv.CheckSessionTelco(), "5", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));

                if (isLog)
                {
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 5);
                }
                VideoController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id);
            }
            else
            {
                //Thông báo lỗi thanh toán
                //if (lang == "1")
                //{
                ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao;
                //ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                //}
                //else
                //{
                //    ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao_KD;
                //    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                //}

                if (isLog)
                {
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 5, messageReturn);
                    //--Thông báo lỗi thanh toán
                }
            }

            if (isLog)
            {
                //log charging
                ILog logger = LogManager.GetLogger(Session["telco"].ToString());
                logger.Debug("--------------------------------------------------");
                logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                logger.Debug("Dich vu: Video - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["VTitle"].ToString() + " - id: " + id);
                logger.Debug("Video Url:" + lnkDownload.NavigateUrl);
                logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                logger.Debug("Error:" + messageReturn);
                logger.Debug("Current Url:" + Request.RawUrl);
                //end log
            }
        }
示例#11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            level = Request.QueryString["l"];
            if (level == "3")
            {
                price      = ConfigurationSettings.AppSettings.Get("hoangdaothangprice");
                ProductId  = "RELAXADVISESEX";
                ProductKey = "ADVISE_SEX";
            }
            else
            {
                price      = ConfigurationSettings.AppSettings.Get("hoangdaoprice");
                ProductId  = "RELAXADVISEBOOK";
                ProductKey = "ADVISE_BOOK";
            }

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr    = "<a href=\"../" + UrlProcess.GetWallpaperHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >TỬ VI<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetWallpaperHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >TU VI<a>";
            //string chitietGiaodich = "Hoang dao: level:" + level + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);

            if (!IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                if (Session["transactionid_old"] != null)
                {// Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                    messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                    if (ConvertUtility.ToString(Session["debit_status"]) == "0")
                    {// Thanh toán thành công >> trả nội dung
                        HienThiNoiDung(true, true);
                    }
                    else
                    {// Thanh toán không thành công >> thông báo lỗi
                        HienThiNoiDung(false, true);
                    }
                    Session["transactionid_old"] = null;
                }
                else
                {
                    if (telCo == Constant.T_Mobifone)
                    {
                        string content = Session["cpid"].ToString() + "&" + Constant.hoangdao + level + id.ToString() + "&" + price + "&" + Session["transactionid"].ToString();
                        Response.Redirect(ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content, ConfigurationSettings.AppSettings.Get("vmskey"))));
                    }
                    //
                    if (telCo == "Undefined")
                    {
                        pnlSMS.Visible = true;
                        if (lang == "1")
                        {
                            ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                            switch (level)
                            {
                            case "1":
                                ltrSMS.Text = "Soạn tin <b>HRD &lt;dd*mm&gt;</b> gửi <b>8279</b> để xem hoàng đạo theo ngày. Ví dụ bạn sinh ngày 07 tháng 11, soạn: HRD 07*11 gửi 8279" + Resources.Resource.wChon3G;
                                break;

                            case "2":
                                ltrSMS.Text = "Soạn tin <b>HRW &lt;dd*mm&gt;</b> gửi <b>8279</b> để xem hoàng đạo theo tuần. Ví dụ bạn sinh ngày 07 tháng 11, soạn HRW 07*11 gửi 8279" + Resources.Resource.wChon3G;
                                break;

                            case "3":
                                ltrSMS.Text = "Soạn tin <b>HRM &lt;dd*mm&gt;</b> gửi <b>8579</b> để xem hoàng đạo theo tháng. Ví dụ bạn sinh ngày 07 tháng 11, soạn: HRM 07*11 gửi 8579" + Resources.Resource.wChon3G;
                                break;
                            }
                        }
                        else
                        {
                            ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                            switch (level)
                            {
                            case "1":
                                ltrSMS.Text = "Soan tin <b>HRD &lt;dd*mm&gt;</b> gui <b>8279</b> de xem hoang dao theo ngay. Vi du ban sinh ngay 07 thang 11, soan: HRD 07*11 gui 8279" + Resources.Resource.wChon3G_KD;
                                break;

                            case "2":
                                ltrSMS.Text = "Soan tin <b>HRW &lt;dd*mm&gt;</b> gui <b>8279</b> de xem hoang dao theo tuan. Vi du ban sinh ngay 07 thang 11, soan: HRW 07*11 gui 8279" + Resources.Resource.wChon3G_KD;
                                break;

                            case "3":
                                ltrSMS.Text = "Soan tin <b>HRM &lt;dd*mm&gt;</b> gui <b>8579</b> de xem hoang dao theo thang. Vi du ban sinh ngay 07 thang 11, soan: HRM 07*11 gui 8579" + Resources.Resource.wChon3G_KD;
                                break;
                            }
                        }
                    }
                    else
                    {
                        //pnlThongBao.Visible = true;
                        //if (lang == "1")
                        //{
                        //    ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao;
                        //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu.Replace("xxx", price);
                        //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu + "tử vi hoàng đạo";
                        //    btnCo.Text = Resources.Resource.btnCo;
                        //    btnKhong.Text = Resources.Resource.btnKhong;
                        //}
                        //else
                        //{
                        //    ltrTitle.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                        //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD.Replace("xxx", price);
                        //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD + "tu vi hoang dao";
                        //    btnCo.Text = Resources.Resource.btnCo_KD;
                        //    btnKhong.Text = Resources.Resource.btnKhong_KD;
                        //}

                        pnlThongBao.Visible = false;
                        switch (Session["telco"].ToString())
                        {
                        case "Vietnamobile":
                            var charging = new Library.VNMCharging.VNMChargingGW();

                            messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), ProductId, ProductKey, price, "D", "Tu vi", Request.QueryString["id"]);

                            if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))    //Not Enough Money
                            {
                                messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), ProductId, ProductKey, price, "D", "Tu vi", Request.QueryString["id"], out logPrice);
                                price         = logPrice;
                            }

                            if (messageReturn == AppEnv.GetSetting("SystemOverload"))     //System Over Load
                            {
                                messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), ProductId, ProductKey, price, "D", "Tu vi", Request.QueryString["id"]);
                            }

                            if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                            {    // Thanh toán thành công >> trả nội dung
                                HienThiNoiDung(true, true);
                            }
                            else
                            {    // Thanh toán không thành công >> thông báo lỗi
                                HienThiNoiDung(false, true);
                            }
                            break;
                        }
                    }
                }

                #endregion
            }
        }
示例#12
0
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog)
        {
            pnlNoiDung.Visible = true;

            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            level = Request.QueryString["l"];

            if (thuchien)
            {
                int       type;
                DateTime  vTime    = DateTime.Now;
                DataTable dtDetail = null;
                switch (level)
                {
                case "1":
                    dtDetail = HoangdaoController.GetHodaDateByIDHasCache(id);
                    type     = ConvertUtility.ToInt32(dtDetail.Rows[0]["Type"]);
                    if (lang == "1")
                    {
                        ltrTieuDe.Text = linkStr + " » " + "HOÀNG ĐẠO THEO NGÀY";
                        lblTen.Text    = HoangdaoController.CungHoangdao[type, 1] + " (" + HoangdaoController.CungHoangdao[type, 2] + ")";
                        if (dtDetail.Rows.Count > 0)
                        {
                            ltrNoiDung.Text = dtDetail.Rows[0]["WapContent"].ToString();
                        }
                    }
                    else
                    {
                        ltrTieuDe.Text = linkStr_KD + " » " + "HOANG DAO THEO NGAY";
                        lblTen.Text    = HoangdaoController.CungHoangdao[type, 0] + " (" + HoangdaoController.CungHoangdao[type, 2] + ")";
                        if (dtDetail.Rows.Count > 0)
                        {
                            ltrNoiDung.Text = UnicodeUtility.UnicodeToKoDau(dtDetail.Rows[0]["WapContent"].ToString());
                        }
                    };
                    break;

                case "2":
                    dtDetail = HoangdaoController.GetHodaWeekByIDHasCache(id);
                    type     = ConvertUtility.ToInt32(dtDetail.Rows[0]["Type"]);
                    if (lang == "1")
                    {
                        ltrTieuDe.Text = linkStr + " » " + "HOÀNG ĐẠO THEO TUẦN";
                        lblTen.Text    = HoangdaoController.CungHoangdao[type, 1] + " (" + HoangdaoController.CungHoangdao[type, 2] + ")";
                        if (dtDetail.Rows.Count > 0)
                        {
                            ltrNoiDung.Text = dtDetail.Rows[0]["WapContent"].ToString();
                        }
                    }
                    else
                    {
                        ltrTieuDe.Text = linkStr_KD + " » " + "HOANG DAO THEO TUAN";
                        lblTen.Text    = HoangdaoController.CungHoangdao[type, 0] + " (" + HoangdaoController.CungHoangdao[type, 2] + ")";
                        if (dtDetail.Rows.Count > 0)
                        {
                            ltrNoiDung.Text = UnicodeUtility.UnicodeToKoDau(dtDetail.Rows[0]["WapContent"].ToString());
                        }
                    };
                    break;

                case "3":
                    dtDetail = HoangdaoController.GetHodaMonthByIDHasCache(id);
                    type     = ConvertUtility.ToInt32(dtDetail.Rows[0]["Type"]);
                    if (lang == "1")
                    {
                        ltrTieuDe.Text = linkStr + " » " + "HOÀNG ĐẠO THEO THÁNG";
                        lblTen.Text    = HoangdaoController.CungHoangdao[type, 1] + " (" + HoangdaoController.CungHoangdao[type, 2] + ")";
                        if (dtDetail.Rows.Count > 0)
                        {
                            ltrNoiDung.Text = dtDetail.Rows[0]["WapContent"].ToString();
                        }
                    }
                    else
                    {
                        ltrTieuDe.Text = linkStr_KD + " » " + "HOANG DAO THEO THANG";
                        lblTen.Text    = HoangdaoController.CungHoangdao[type, 0] + " (" + HoangdaoController.CungHoangdao[type, 2] + ")";
                        if (dtDetail.Rows.Count > 0)
                        {
                            ltrNoiDung.Text = UnicodeUtility.UnicodeToKoDau(dtDetail.Rows[0]["WapContent"].ToString());
                        }
                    };
                    break;
                }

                if (isLog)
                {
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), level + id.ToString(), "Hoang dao: level:" + level + " -- id:" + id.ToString(), 17);
                }
            }
            else
            {
                //Thông báo lỗi thanh toán
                if (lang == "1")
                {
                    ltrTieuDe.Text  = linkStr + " » " + Resources.Resource.wThongBao;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                }
                else
                {
                    ltrTieuDe.Text  = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                }
                Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), level + id.ToString(), "Hoang dao: level:" + level + " -- id:" + id.ToString(), 17, messageReturn);
                //--Thông báo lỗi thanh toán
            }

            if (isLog)
            {
                //log charging
                ILog logger = log4net.LogManager.GetLogger(AppEnv.CheckFreeContentTelco());
                logger.Debug("--------------------------------------------------");
                logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                logger.Debug("Dich vu: Hoang dao - parameter: " + price + " - level: " + level + " - id: " + id.ToString());
                logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                logger.Debug("Error:" + messageReturn);
                logger.Debug("Current Url:" + Request.RawUrl);
                //end log
            }
        }
示例#13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            price = ConfigurationSettings.AppSettings.Get("videopriceView");
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr = "<a href=\"" + UrlProcess.VideoHome() + "\" >VIDEO</a>";

            //HienThiNoiDung(true,false);return;

            if (!IsPostBack)
            {
                //if (width == 0)
                //    width = (int)Constant.DefaultScreen.Standard;
                //ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                if (Session["transactionid_old"] != null)
                {// Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                    messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                    if (ConvertUtility.ToString(Session["debit_status"]) == "0")
                    {// Thanh toán thành công >> trả nội dung
                        HienThiNoiDung(true, true);
                    }
                    else
                    {// Thanh toán không thành công >> thông báo lỗi
                        HienThiNoiDung(false, true);
                    }
                    Session["transactionid_old"] = null;
                }
                else
                {
                    DataTable dtDetail = VideoController.GetVideoDetailByID(Session["telco"].ToString(), id);
                    if (telCo == Constant.T_Mobifone)
                    {
                        string content = Session["cpid"].ToString() + "&" + Constant.clipchung + "0" + id.ToString() + "&" + price + "&" + Session["transactionid"].ToString();
                        Response.Redirect(ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content, ConfigurationSettings.AppSettings.Get("vmskey"))));
                    }
                    //
                    if (telCo == "Undefined")
                    {
                        pnlSMS.Visible = true;
                        //if (lang == "1")
                        //{
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("videocode") + " " + dtDetail.Rows[0]["VID"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("videocommandcode") + "</b> để tải video <b>" + dtDetail.Rows[0]["VTitle_Unicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                        //}
                        //else
                        //{
                        //    ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan_KD;
                        //    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("videocode") + " " + dtDetail.Rows[0]["VID"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("videocommandcode") + "</b> de tai video <b>" + dtDetail.Rows[0]["VTitle"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                        //}
                    }
                    else
                    {
                        pnlThongBao.Visible = false;
                        try
                        {
                            switch (Session["telco"].ToString())
                            {
                            case "Vietnamobile":
                                var charging = new Library.VNMCharging.VNMChargingGW();

                                messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "VIDEOVIEW", "VIDEO_VIEW", price, "D", "VID", Request.QueryString["id"]);

                                if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))    //Not Enough Money
                                {
                                    messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), "VIDEOVIEW", "VIDEO_VIEW", price, "D", "VID", Request.QueryString["id"], out logPrice);
                                    price         = logPrice;
                                }

                                if (messageReturn == AppEnv.GetSetting("SystemOverload"))     //System Over Load
                                {
                                    messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), "VIDEOVIEW", "VIDEO_VIEW", price, "D", "VID", Request.QueryString["id"]);
                                }

                                ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                                logger.Debug("---" + messageReturn + "---");
                                if (messageReturn == "1")
                                {    // Thanh toán thành công >> trả nội dung
                                    HienThiNoiDung(true, true);
                                }
                                else
                                {    // Thanh toán không thành công >> thông báo lỗi
                                    HienThiNoiDung(false, true);
                                }
                                break;
                            }
                        }
                        catch (Exception ex)
                        {
                            ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                            logger.Debug("----------Lỗi charging----------------------");
                            logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                            logger.Debug(ex.ToString());
                            logger.Debug("----------Lỗi charging----------------------");
                        }
                    }
                }

                #endregion
            }
        }
示例#14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = ConfigurationSettings.AppSettings.Get("goldprice");

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr    = "<a href=\"../" + UrlProcess.GetSportHomeUrl(lang, "home", width.ToString()).Replace("~/", "") + "\" >BÓNG ĐÁ<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetSportHomeUrl(lang, "home", width.ToString()).Replace("~/", "") + "\" >BONG DA<a>";

            if (!IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                DataTable dtGiai = ThethaoController.GetCompetitionGetByWID(ConvertUtility.ToInt32(Request.QueryString["catid"]));
                if (WapController.W4A_Subscriber_IsActive(ConvertUtility.ToString(Session["msisdn"]), 2))
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                gameid = ThethaoController.GetCompetitionGetByWID(ConvertUtility.ToInt32(Request.QueryString["catid"])).Rows[0]["CompetitionID"].ToString();
                // Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                if (Session["transactionid_old"] != null)
                {
                    messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                    if (ConvertUtility.ToString(Session["debit_status"]) == "0")
                    {// Thanh toán thành công >> trả nội dung
                        HienThiNoiDung(true, true);
                    }
                    else
                    {// Thanh toán không thành công >> thông báo lỗi
                        HienThiNoiDung(false, true);
                    }
                    Session["transactionid_old"] = null;
                }
                else
                {
                    if (telCo == Constant.T_Mobifone)
                    {
                        //Chưa xử lý
                        string content = Session["cpid"].ToString() + "&" + Constant.thethao + "5" + Request.QueryString["catid"] + "&" + price + "&" + Session["transactionid"].ToString();
                        Response.Redirect(ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content, ConfigurationSettings.AppSettings.Get("vmskey"))));
                    }
                    //
                    if (telCo == "Undefined")
                    {
                        pnlSMS.Visible = true;
                        if (lang == "1")
                        {
                            ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                            ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("tkdbcode") + " " + dtGiai.Rows[0]["Code"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("tkdbcommandcode") + "</b> để nhận thống kê đặc biệt của giải" + Resources.Resource.wChon3G;
                        }
                        else
                        {
                            ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                            ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("tkdbcode") + " " + dtGiai.Rows[0]["Code"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("tkdbcommandcode") + "</b> de nhan thong ke dac biet cua giai" + Resources.Resource.wChon3G_KD;
                        }
                    }
                    else
                    {
                        pnlThongBao.Visible = false;
                        switch (Session["telco"].ToString())
                        {
                        case "Vietnamobile":
                            var charging = new Library.VNMCharging.VNMChargingGW();

                            messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN", price, "D", "GAME87", Request.QueryString["id"]);

                            if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))    //Not Enough Money
                            {
                                messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN", price, "D", "GAME87", Request.QueryString["id"], out logPrice);
                                price         = logPrice;
                            }

                            if (messageReturn == AppEnv.GetSetting("SystemOverload"))     //System Over Load
                            {
                                messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN", price, "D", "GAME87", Request.QueryString["id"]);
                            }

                            if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                            {    // Thanh toán thành công >> trả nội dung
                                HienThiNoiDung(true, true);
                            }
                            else
                            {    // Thanh toán không thành công >> thông báo lỗi
                                HienThiNoiDung(false, true);
                            }
                            break;
                        }
                    }
                }

                #endregion
            }
        }
示例#15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = ConfigurationSettings.AppSettings.Get("goldprice");

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr    = "<a href=\"../" + UrlProcess.GetSportHomeUrl(lang, "home", width.ToString()).Replace("~/", "") + "\" >BÓNG ĐÁ<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetSportHomeUrl(lang, "home", width.ToString()).Replace("~/", "") + "\" >BONG DA<a>";

            if (!IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                gameid = ThethaoController.GetAll_Sport87DetailByGame87ID(ConvertUtility.ToInt32(Request.QueryString["id"])).Rows[0]["PK_Game87_ID"].ToString();
                DataSet ds87detail = ThethaoController.GetAll_Sport87_DetailBy_PK_Game87ID(gameid);
                if (!ConvertUtility.ToBoolean(ds87detail.Tables[0].Rows[0]["IsFull"]))
                {
                    pnlThongBao.Visible = true;
                    if (lang == "1")
                    {
                        ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao;
                        //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu.Replace("xxx", price);
                        ltrThongBao.Text = ds87detail.Tables[1].Rows[0]["ContentValue"].ToString();
                        btnCo.Visible    = false;
                        btnKhong.Visible = false;
                    }
                    else
                    {
                        ltrTitle.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                        //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD.Replace("xxx", price);
                        ltrThongBao.Text = UnicodeUtility.UnicodeToKoDau(ds87detail.Tables[1].Rows[0]["ContentValue"].ToString());
                        btnCo.Visible    = false;
                        btnKhong.Visible = false;
                    }
                }
                else
                {
                    if (WapController.W4A_Subscriber_IsActive(ConvertUtility.ToString(Session["msisdn"]), 2))
                    {
                        HienThiNoiDung(true, false);
                        return;
                    }

                    // Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                    if (Session["transactionid_old"] != null)
                    {
                        messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                        if (ConvertUtility.ToString(Session["debit_status"]) == "0")
                        {// Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true, true);
                        }
                        else
                        {// Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false, true);
                        }
                        Session["transactionid_old"] = null;
                    }
                    else
                    {
                        //gameid = ThethaoController.GetAll_Sport87DetailByGame87ID(ConvertUtility.ToInt32(Request.QueryString["id"])).Rows[0]["PK_Game87_ID"].ToString();
                        if (telCo == Constant.T_Mobifone)
                        {
                            string content = Session["cpid"].ToString() + "&" + Constant.thethao + "9" + Request.QueryString["id"] + "&" + price + "&" + Session["transactionid"].ToString();
                            Response.Redirect(ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content, ConfigurationSettings.AppSettings.Get("vmskey"))));
                        }
                        //
                        if (telCo == "Undefined")
                        {
                            pnlSMS.Visible = true;
                            if (lang == "1")
                            {
                                ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                                //Xiên
                                if (Request.QueryString["id"] == "2")
                                {
                                    ltrSMS.Text = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("xiencode") + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("xiencommandcode") + "</b> để nhận chuỗi kèo xiên sáng nhất" + Resources.Resource.wChon3G;
                                }
                                //Trận cầu vàng
                                if (Request.QueryString["id"] == "4")
                                {
                                    ltrSMS.Text = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("goldcode") + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("goldcommandcode") + "</b> để nhận thông tin về trận cầu ngon ăn nhất" + Resources.Resource.wChon3G;
                                }
                                //Tài Xỉu sáng nhất
                                if (Request.QueryString["id"] == "5")
                                {
                                    ltrSMS.Text = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("tvtxcode") + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("tvtxcommandcode") + "</b> để nhận thông tin Tài Xỉu sáng nhất" + Resources.Resource.wChon3G;
                                }
                                //Trên dưới sáng nhất
                                if (Request.QueryString["id"] == "6")
                                {
                                    ltrSMS.Text = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("tvtdcode") + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("tvtdcommandcode") + "</b> để nhận thông tin Trên Dưới sáng nhất" + Resources.Resource.wChon3G;
                                }
                                //Sáng nhất giải
                                if (",1,3,7,8,9,10,11,12,".LastIndexOf("," + Request.QueryString["id"] + ",") >= 0)
                                {
                                    ltrSMS.Text = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("sangcode") + " &lt;ma tran&gt;</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("sangcommandcode") + "</b> để nhận thông tin Kèo sáng nhất giải" + Resources.Resource.wChon3G;
                                }
                            }
                            else
                            {
                                ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                                if (Request.QueryString["id"] == "2")
                                {
                                    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("xiencode") + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("xiencommandcode") + "</b> de nhan chuoi keo xien sang nhat" + Resources.Resource.wChon3G;
                                }
                                if (Request.QueryString["id"] == "4")
                                {
                                    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("goldcode") + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("goldcommandcode") + "</b> de nhan thong tin ve tran cau ngon an nhat" + Resources.Resource.wChon3G_KD;
                                }
                                if (Request.QueryString["id"] == "5")
                                {
                                    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("tvtxcode") + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("tvtxcommandcode") + "</b> de nhan thong tin Tai Xiu sang nhat" + Resources.Resource.wChon3G_KD;
                                }
                                if (Request.QueryString["id"] == "6")
                                {
                                    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("tvtdcode") + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("tvtdcommandcode") + "</b> de nhan thong tin Tren Duoi sang nhat" + Resources.Resource.wChon3G_KD;
                                }
                                if (",1,3,7,8,9,10,11,12,".LastIndexOf("," + Request.QueryString["id"] + ",") >= 0)
                                {
                                    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("sangcode") + " &lt;ma tran&gt;</b> gui <b>" + ConfigurationSettings.AppSettings.Get("sangcommandcode") + "</b> de nhan thong tin Keo sang nhat giai" + Resources.Resource.wChon3G_KD;
                                }
                            }
                        }
                        else
                        {
                            pnlThongBao.Visible = false;
                            switch (Session["telco"].ToString())
                            {
                            case "Vietnamobile":
                                var charging = new Library.VNMCharging.VNMChargingGW();


                                messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN", price, "D", "GAME87", Request.QueryString["id"]);

                                if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))    //Not Enough Money
                                {
                                    messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN", price, "D", "GAME87", Request.QueryString["id"], out logPrice);
                                    price         = logPrice;
                                }

                                if (messageReturn == AppEnv.GetSetting("SystemOverload"))     //System Over Load
                                {
                                    messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN", price, "D", "GAME87", Request.QueryString["id"]);
                                }

                                if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                                {    // Thanh toán thành công >> trả nội dung
                                    HienThiNoiDung(true, true);
                                }
                                else
                                {    // Thanh toán không thành công >> thông báo lỗi
                                    HienThiNoiDung(false, true);
                                }
                                break;
                            }
                        }
                    }
                }

                #endregion
            }
        }
示例#16
0
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog, string gamePrice)
        {
            pnlNoiDung.Visible = true;
            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = GameController.GetGameDetailByID(AppEnv.CheckFreeContentTelco(), id);

            //chitietGiaodich = "Game: " + dtDetail.Rows[0]["GameNameUnicode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            chitietGiaodich = "Game: " + dtDetail.Rows[0]["GameNameUnicode"].ToString() + " -- id:" + id.ToString();

            if (thuchien)
            {
                ltrTieuDe.Text = linkStr;
                //if (lang == "1")
                //{
                lblTen.Text      = dtDetail.Rows[0]["GameNameUnicode"].ToString();
                lnkDownload.Text = Resources.Resource.wBamDeTai;
                ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong + " game " + dtDetail.Rows[0]["GameNameUnicode"].ToString() + " (" + dtDetail.Rows[0]["Game_Code"].ToString() + ")";
                //}
                //else
                //{
                //    lblTen.Text = dtDetail.Rows[0]["GameName"].ToString();
                //    lnkDownload.Text = Resources.Resource.wBamDeTai_KD;
                //    ltrNoiDung.Text = Resources.Resource.wMuaThanhCong_KD + " game " + dtDetail.Rows[0]["GameName"].ToString() + " (" + dtDetail.Rows[0]["Game_Code"].ToString() + ")";
                //};
                string url;
                try
                {
                    //VMGGame.MOReceiver urlservice = new VMGGame.MOReceiver();

                    //url = urlservice.VMG_ReturnUrlForGame(ConvertUtility.ToString(dtDetail.Rows[0]["GID"]),
                    //                                        0,
                    //                                        ConvertUtility.ToString(AppEnv.CheckFreeContentMsisdn()),
                    //                                        ConvertUtility.ToInt32(dtDetail.Rows[0]["Partner_ID"]),
                    //                                        "VNM",
                    //                                        "WAP",
                    //                                        AppEnv.CheckFreeContentTelco(),
                    //                                        Constant.T_VietnamobileWap,
                    //                                        "",
                    //                                        "");

                    var gameUrl = new GameHandler();
                    url = gameUrl.VMG_ReturnUrlForGame(ConvertUtility.ToString(dtDetail.Rows[0]["GID"]),
                                                       0,
                                                       ConvertUtility.ToString(AppEnv.CheckFreeContentMsisdn()),
                                                       ConvertUtility.ToInt32(dtDetail.Rows[0]["Partner_ID"]),
                                                       "VNM",
                                                       "WAP",
                                                       AppEnv.CheckFreeContentTelco(),
                                                       Constant.T_VietnamobileWap,
                                                       "",
                                                       "",
                                                       112,
                                                       ConvertUtility.ToInt32(price)
                                                       );

                    if (url.StartsWith("-1")) // if Non-Success : FIX TRA VE 1 LINK GAME VMG
                    {
                        url = gameUrl.VMG_ReturnUrlForGame("8629",
                                                           0,
                                                           AppEnv.CheckFreeContentMsisdn(),
                                                           ConvertUtility.ToInt32(dtDetail.Rows[0]["Partner_ID"]),
                                                           "VNM",
                                                           "WAP",
                                                           AppEnv.CheckFreeContentTelco(),
                                                           Constant.T_VietnamobileWap,
                                                           "", "", 112, ConvertUtility.ToInt32(price));
                    }

                    int indexofhttp = url.IndexOf("http://");
                    if (indexofhttp == -1)
                    {
                        url = "http://" + url;
                    }
                    else
                    {
                        url = url.Substring(indexofhttp);
                    }
                }
                catch (Exception ex) { url = ""; }

                lnkDownload.NavigateUrl = url;
                if (freecate == false)
                {
                    if (isLog)
                    {
                        Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, url, id.ToString(), chitietGiaodich, 3);
                        GameController.SetGamePrice(Session["msisdn"].ToString(), url, Constant.T_VietnamobileWap, ConvertUtility.ToInt32(price));
                    }
                    //GameController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id);
                }
                GameController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id);
            }
            else
            {
                //Thông báo lỗi thanh toán
                //if (lang == "1")
                //{
                ltrTieuDe.Text  = linkStr + " » " + Resources.Resource.wThongBao;
                ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                //}
                //else
                //{
                //    ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao_KD;
                //    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                //}
                if (isLog)
                {
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 3, messageReturn);
                }
                //--Thông báo lỗi thanh toán
            }
            if (freecate == false)
            {
                if (isLog)
                {
                    //log charging
                    ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                    logger.Debug("--------------------------------------------------");
                    logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                    logger.Debug("Dich vu: Game - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["GameName"].ToString() + " - id: " + id);
                    logger.Debug("Game Url:" + lnkDownload.NavigateUrl);
                    logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                    logger.Debug("Error:" + messageReturn);
                    logger.Debug("Current Url:" + Request.RawUrl);
                    //end log
                }
            }
        }
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog)
        {
            pnlNoiDung.Visible = true;
            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = HinhNenController.GetWallpaperDetailByID(AppEnv.CheckSessionTelco(), id);

            if (thuchien)
            {
                if (lang == "1")
                {
                    //ltrTieuDe.Text = linkStr;
                    lblTen.Text      = dtDetail.Rows[0]["WTitle_Unicode"].ToString();
                    lnkDownload.Text = Resources.Resource.wBamDeTai;
                    ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong + " hình nền " + dtDetail.Rows[0]["WTitle_Unicode"].ToString() + " (" + dtDetail.Rows[0]["WCode"].ToString() + ")";
                }
                else
                {
                    //ltrTieuDe.Text = linkStr_KD;
                    lblTen.Text      = dtDetail.Rows[0]["WTitle"].ToString();
                    lnkDownload.Text = Resources.Resource.wBamDeTai_KD;
                    ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong_KD + " hình nền " + dtDetail.Rows[0]["WTitle"].ToString() + " (" + dtDetail.Rows[0]["WCode"].ToString() + ")";
                }
                lnkDownload.NavigateUrl = UrlProcess.GetDownloadItem(AppEnv.CheckSessionTelco(), "1", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));
                if (ConvertUtility.ToInt32(dtDetail.Rows[0]["W_CategoryID"]) == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid")))
                {
                    if (isLog)
                    {
                        chitietGiaodich = "Thu phap: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                        Transaction.Success(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 15);
                    }
                }
                else
                {
                    if (isLog)
                    {
                        chitietGiaodich = "Hinh nen: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                        Transaction.Success(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 1);
                    }
                }
                //if(isLog)
                //{
                HinhNenController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id);
                //}
            }
            else
            {
                //Thông báo lỗi thanh toán
                if (lang == "1")
                {
                    //ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                }
                else
                {
                    //ltrTieuDe.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                }
                if (ConvertUtility.ToInt32(dtDetail.Rows[0]["W_CategoryID"]) == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid")))
                {
                    chitietGiaodich = "Thu phap: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                    if (isLog)
                    {
                        Transaction.Failure(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 15, messageReturn);
                    }
                }
                else
                {
                    chitietGiaodich = "Hinh nen: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                    if (isLog)
                    {
                        Transaction.Failure(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 1, messageReturn);
                    }
                }
                //--Thông báo lỗi thanh toán
            }

            if (isLog)
            {
                //log charging
                ILog logger = LogManager.GetLogger(Session["telco"].ToString());
                logger.Debug("--------------------------------------------------");
                logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                logger.Debug("Dich vu: Hinh nen - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["WTitle"].ToString() + " - id: " + id);
                logger.Debug("Wallpaper Url:" + lnkDownload.NavigateUrl);
                logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                logger.Debug("Error:" + messageReturn);
                logger.Debug("Current Url:" + Request.RawUrl);
                //end log
            }
        }
示例#18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = AppEnv.GetSetting("ringtoneprice");

            id = ConvertUtility.ToString(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            DataTable dtDetail = TintucController.GetAudioBookDetailCache(id);
            DataSet   ds       = TintucController.GetTruyenAudioHomeCache();

            if (ds != null)
            {
                DataTable       dtMoi         = ds.Tables[0];
                IList <DataRow> contentTop    = dtMoi.Select().Skip(0).Take(1).ToList();
                IList <DataRow> contentBottom = dtMoi.Select().Skip(1).Take(5).ToList();

                rptTop.DataSource = contentTop.CopyToDataTable();
                rptTop.DataBind();

                rptBottom.DataSource = contentBottom.CopyToDataTable();
                rptBottom.DataBind();
            }

            if (dtDetail != null && dtDetail.Rows.Count > 0)
            {
                litName.Text = dtDetail.Rows[0]["SongName"].ToString();
                catID        = dtDetail.Rows[0]["StyleId"].ToString();
                catName      = dtDetail.Rows[0]["StyleName"].ToString();
            }


            if (!Page.IsPostBack)
            {
                #region FREE CONTENT

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                if (AppEnv.GetSetting("TestFlag") == "1")
                {
                    HienThiNoiDung(true, false);
                }
                else
                {
                    if (Session["msisdn"] != null)
                    {
                        var charging = new Library.VNMCharging.VNMChargingGW();
                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]);

                        if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))//Not Enough Money
                        {
                            messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"], out logPrice);
                            price         = logPrice;
                        }

                        if (messageReturn == AppEnv.GetSetting("SystemOverload")) //System Over Load
                        {
                            messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]);
                        }

                        if (messageReturn == "1")
                        {// Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true, true);
                        }
                        else
                        {// Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false, true);
                        }
                    }
                    else
                    {
                        pnlContentError.Visible = true;
                        litContentError.Text    = "Bạn vui lòng lựa chọn kết nối EDGE hay 3G để sử dụng dịch vụ này. Lưu ý, hãy ngắt kết nối wifi bạn nhé";
                    }
                }

                #endregion

                DataTable dtOnline = TintucController.GetAllCategoryExeptCatIDHasCache(255, 0);
                DataTable dtAudio  = TintucController.GetCategoryTruyenAudioCache();

                rptCateOnline.DataSource = dtOnline;
                rptCateOnline.DataBind();

                rptCateAudio.DataSource = dtAudio;
                rptCateAudio.DataBind();
            }
        }
示例#19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            GameAcountController gc = new GameAcountController();
            string ms = "";

            if (Session["msisdn"] != null)
            {
                ms = Session["msisdn"].ToString();
            }
            if (gc.Login(ms, 4))
            {
                HienThiNoiDung(true, true, "0");
            }
            else
            {
                price = ConfigurationSettings.AppSettings.Get("gameprice");
                lang  = Request.QueryString["lang"];
                hotro = Request.QueryString["hotro"];
                width = ConvertUtility.ToInt32(Request.QueryString["w"]);
                id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
                if (id == 1402 || id == 1401)
                {
                    price = "15000";
                }

                telCo = AppEnv.CheckSessionTelcoUndefine();

                linkStr = "<a href=\"../" + UrlProcess.GetGameHomeUrl(lang, width.ToString(), hotro).Replace("~/", "") + "\" >GAME<a>";

                if (!IsPostBack)
                {
                    if (width == 0)
                    {
                        width = (int)Constant.DefaultScreen.Standard;
                    }
                    ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                    //#region Free Content

                    //if (AppEnv.GetSetting("FreeContent") == "1")
                    //{
                    //    HienThiNoiDung(true,false);
                    //    return;
                    //}

                    //#endregion

                    DataTable dtDetail = GameController.GetGameDetailByID(AppEnv.CheckFreeContentTelco(), id);
                    if (ConfigurationSettings.AppSettings.Get("freecate").IndexOf("," + dtDetail.Rows[0]["W_GameCategoryID"].ToString() + ",") > -1 || (",1712,1713,").IndexOf("," + id.ToString() + ",") > -1)
                    {
                        freecate = true;
                        HienThiNoiDung(true, false, "0");
                        return;
                    }
                    if (telCo == "Undefined")
                    {
                        pnlSMS.Visible = true;
                        if (lang == "1")
                        {
                            ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                            ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("gamecode") + " " + dtDetail.Rows[0]["Game_Code"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("gamecommandcode") + "</b> để tải game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                            if (id == 1402 || id == 1401)
                            {
                                ltrSMS.Text = "Soạn tin <b>HOT</b> gửi <b>333</b> để tải game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                            }
                        }
                        else
                        {
                            ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan_KD;
                            ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("gamecode") + " " + dtDetail.Rows[0]["Game_Code"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("gamecommandcode") + "</b> de tai game <b>" + dtDetail.Rows[0]["GameName"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                            if (id == 1402 || id == 1401)
                            {
                                ltrSMS.Text = "Soan tin <b>HOT</b> gui <b>333</b> de tai game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                            }
                        }
                    }
                    else
                    {
                        pnlThongBao.Visible = false;
                        switch (Session["telco"].ToString())
                        {
                        case "Vietnamobile":
                            var charging = new WapXzone_VNM.Library.VNMCharging.VNMChargingGW();
                            //messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN", price, "D", "JG", Request.QueryString["id"]);

                            if (messageReturn == "1")
                            {    // Thanh toán thành công >> trả nội dung
                                HienThiNoiDung(true, true, price);
                            }
                            else
                            {    // Thanh toán không thành công >> thông báo lỗi
                                HienThiNoiDung(false, true, "0");
                            }
                            break;
                        }
                    }
                }
            }
        }
示例#20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            price = ConfigurationSettings.AppSettings.Get("appprice");
            lang  = Request.QueryString["lang"];
            hotro = Request.QueryString["hotro"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr    = "<a href=\"../" + UrlProcess.GetAppHomeUrl(lang, width.ToString(), hotro).Replace("~/", "") + "\" >PHẦN MỀM<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetAppHomeUrl(lang, width.ToString(), hotro).Replace("~/", "") + "\" >PHAN MEM<a>";

            if (!IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                DataTable dtDetail = PhanmemController.GetAPPDetailByID(Session["telco"].ToString(), id);
                if (dtDetail.Rows[0]["Web_Name"].ToString() == "Vmg_zone")
                {
                    price = "15000";
                }
                if (telCo == Constant.T_Mobifone)
                {
                    string content = Session["cpid"].ToString() + "&" + Constant.ungdungchung + id.ToString() + "&" + price + "&" + Session["transactionid"].ToString();
                    Response.Redirect(ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content, ConfigurationSettings.AppSettings.Get("vmskey"))));
                }
                //
                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("appcode") + " " + dtDetail.Rows[0]["AppID"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("appcommandcode") + "</b> để tải phần mềm <b>" + dtDetail.Rows[0]["AppNameUnicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                    }
                    else
                    {
                        ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("appcode") + " " + dtDetail.Rows[0]["AppID"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("appcommandcode") + "</b> de tai phan mem <b>" + dtDetail.Rows[0]["AppName"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                    }
                }
                else
                {
                    //pnlThongBao.Visible = true;
                    //if (lang == "1")
                    //{
                    //    ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu + "phần mềm " + dtDetail.Rows[0]["AppNameUnicode"].ToString();
                    //    btnCo.Text = Resources.Resource.btnCo;
                    //    btnKhong.Text = Resources.Resource.btnKhong;
                    //}
                    //else
                    //{
                    //    ltrTitle.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD + "phan mem " + dtDetail.Rows[0]["AppName"].ToString();
                    //    btnCo.Text = Resources.Resource.btnCo_KD;
                    //    btnKhong.Text = Resources.Resource.btnKhong_KD;
                    //}
                    pnlThongBao.Visible = false;
                    switch (Session["telco"].ToString())
                    {
                    case "Vietnamobile":
                        WapXzone_VNM.Library.VNMCharging.VNMChargingGW charging = new WapXzone_VNM.Library.VNMCharging.VNMChargingGW();

                        //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), price, "D", "APP", Request.QueryString["id"].ToString());

                        //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "APPDOWN", "APP_DOWN");

                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "APPDOWN", "APP_DOWN", price, "D", "APP", Request.QueryString["id"]);

                        if (messageReturn == "1")
                        {    // Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true, true);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false, true);
                        }
                        break;
                    }
                }

                #endregion
            }
        }
示例#21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = ConfigurationSettings.AppSettings.Get("xssoicauprice");
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr    = "<a href=\"../" + UrlProcess.GetXosoHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >XỔ SỐ<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetXosoHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >XO SO<a>";

            if (Session["serviceList"] != null)
            {
                _arrService = Session["serviceList"] as string[];
            }

            if (!IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                DataTable soicau = XosoController.GetSoicauInfoBycompanyID(id);

                if (_arrService != null)
                {
                    if (_arrService.Length > 0)
                    {
                        string dkXoSo = string.Format(AppEnv.GetSetting("S2DK_SC"), soicau.Rows[0]["MainCode"]);
                        foreach (var item in _arrService)
                        {
                            if (item == dkXoSo)
                            {
                                pnlS2DangKy.Visible = false;
                            }
                        }
                    }
                }

                // Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                if (Session["transactionid_old"] != null)
                {
                    messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                    if (ConvertUtility.ToString(Session["debit_status"]) == "0")
                    {// Thanh toán thành công >> trả nội dung
                        HienThiNoiDung(true, true);
                    }
                    else
                    {// Thanh toán không thành công >> thông báo lỗi
                        HienThiNoiDung(false, true);
                    }
                    Session["transactionid_old"] = null;
                }
                else
                {
                    if (telCo == Constant.T_Mobifone)
                    {
                        string content = Session["cpid"].ToString() + "&" + Constant.xoso + "x10" + id.ToString() + "&" + price + "&" + Session["transactionid"].ToString();
                        Response.Redirect(ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content, ConfigurationSettings.AppSettings.Get("vmskey"))));
                    }
                    //
                    if (telCo == "Undefined")
                    {
                        pnlSMS.Visible = true;
                        if (lang == "1")
                        {
                            ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                            ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("xssoicode") + " " + soicau.Rows[0]["MainCode"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("xssoicaucommandcode") + "</b> để nhận dự đoán kết quả xổ số" + Resources.Resource.wChon3G;
                        }
                        else
                        {
                            ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                            ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("xssoicode") + " " + soicau.Rows[0]["MainCode"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("xssoicaucommandcode") + "</b> de nhan du doan ket qua xo so" + Resources.Resource.wChon3G_KD;
                        }
                    }
                    else
                    {
                        //pnlThongBao.Visible = true;
                        //if (lang == "1")
                        //{
                        //    ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao;
                        //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu.Replace("xxx", price);
                        //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu + "dịch vụ soi cầu " + soicau.Rows[0]["ProvinceName"].ToString();
                        //    btnCo.Text = Resources.Resource.btnCo;
                        //    btnKhong.Text = Resources.Resource.btnKhong;
                        //}
                        //else
                        //{
                        //    ltrTitle.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                        //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD.Replace("xxx", price);
                        //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD + "dich vu soi cau " + soicau.Rows[0]["ProvinceName"].ToString();
                        //    btnCo.Text = Resources.Resource.btnCo_KD;
                        //    btnKhong.Text = Resources.Resource.btnKhong_KD;
                        //}
                        pnlThongBao.Visible = false;
                        switch (Session["telco"].ToString())
                        {
                        case "Vietnamobile":
                            var charging = new Library.VNMCharging.VNMChargingGW();

                            //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), price, "D", "SOICAU", Request.QueryString["id"].ToString());

                            //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "LOTOSOICAU", "SOICAU");

                            messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "LOTOSOICAU", "SOICAU", price, "D", "SOICAU", Request.QueryString["id"]);

                            if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                            {    // Thanh toán thành công >> trả nội dung
                                HienThiNoiDung(true, true);
                            }
                            else
                            {    // Thanh toán không thành công >> thông báo lỗi
                                HienThiNoiDung(false, true);
                            }
                            break;
                        }
                    }
                }

                #endregion
            }
        }
示例#22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = AppEnv.GetSetting("relaxprice");
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            DataTable dtDetail = TintucController.GetNewsDetailHasCache(id);

            catID = ConvertUtility.ToInt32(dtDetail.Rows[0]["Distribution_ZoneID"]);
            DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID);

            parentCatID = ConvertUtility.ToInt32(catInfo.Rows[0]["Zone_ParentID"]);

            //chitietGiaodich = string.Format("Thu gian: {0} -- id: {1} -- newtransactionid: {2} -- old tranid: {3}", catInfo.Rows[0]["Zone_Name"].ToString(), id, ConvertUtility.ToString(Session["transactionid"]), ConvertUtility.ToString(Session["transactionid_old"]));
            chitietGiaodich = string.Format("Thu gian: {0} -- id: {1}", catInfo.Rows[0]["Zone_Name"], id);

            linkStr = "<a href=\"" + UrlProcess.ThuGianHome() + "\" >THƯ GIÃN</a>";

            switch (parentCatID.ToString())
            {
            case "258":           //Cẩm nang tư vấn
                if (catID == 264) //Sex và cuộc sống
                {
                    price     = ConfigurationSettings.AppSettings.Get("relaxsexprice");
                    ProductId = "RELAXADVISESEX";
                    Keyword   = "ADVISE_SEX";
                }
                else
                {
                    price     = ConfigurationSettings.AppSettings.Get("relaxtuvanprice");
                    ProductId = "RELAXADVISEBOOK";
                    Keyword   = "ADVISE_BOOK";
                }
                break;

            case "121":    //Gửi lời yêu thương
                price     = ConfigurationSettings.AppSettings.Get("relaxtuvanprice");
                ProductId = "RELAXLOVER";
                Keyword   = "LOVER";
                break;

            case "268":    //Địa điểm ăn chơi
                price     = ConfigurationSettings.AppSettings.Get("relaxanchoiprice");
                ProductId = "RELAXPLACE";
                Keyword   = "PLACE";
                break;

            case "255":    //Đọc truyện
                price = ConfigurationSettings.AppSettings.Get("relaxprice");
                //dungnt sua de charge dc
                ProductId = "LOTOLASTRESULT"; //"RELAXSTORYREAD";
                Keyword   = "LAST_RESULT";    //"READ";
                break;

            case "400":    //GOC CUOC SONG
                price = "3000";
                //dungnt sua de charge dc
                ProductId = "LOTOLASTRESULT"; //"RELAXSTORYREAD";
                Keyword   = "LAST_RESULT";    //"READ";
                break;

            case "401":    //KHAM PHA
                price = "1000";
                //dungnt sua de charge dc
                ProductId = "LOTOLASTRESULT"; //"RELAXSTORYREAD";
                Keyword   = "LAST_RESULT";    //"READ";
                break;

            default:
                price     = ConfigurationSettings.AppSettings.Get("relaxprice");
                ProductId = "HOROSCOPE";
                Keyword   = "HOROSCOPE";
                break;
            }

            if (!IsPostBack)
            {
                //if (width == 0)
                //    width = (int)Constant.DefaultScreen.Standard;
                //ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    //if (lang == "1")
                    //{
                    ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                    ltrSMS.Text      = "Bạn vui lòng" + Resources.Resource.wChon3G.Remove(0, 10);
                    //}
                    //else
                    //{
                    //    ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                    //    ltrSMS.Text = "Ban vui long" + Resources.Resource.wChon3G_KD.Remove(0, 10);
                    //}
                }
                else
                {
                    if (parentCatID.ToString() == "255" && WapController.W4A_Subscriber_IsActive(Session["msisdn"].ToString(), 1))
                    {
                        HienThiNoiDung(true, false);
                    }
                    else
                    {
                        if (Session["ChargedOk"] != null)
                        {
                            if (!string.IsNullOrEmpty(Session["ChargedOk"].ToString()))
                            {
                                HienThiNoiDung(true, false);
                                Session["ChargedOk"] = string.Empty;
                            }
                        }
                        else
                        {
                            pnlThongBao.Visible = false;
                            switch (Session["telco"].ToString())
                            {
                            case "Vietnamobile":

                                var charging = new Library.VNMCharging.VNMChargingGW();
                                messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]);

                                if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))    //Not Enough Money
                                {
                                    messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"], out logPrice);
                                    price         = logPrice;
                                }

                                if (messageReturn == AppEnv.GetSetting("SystemOverload"))     //System Over Load
                                {
                                    messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), ProductId, Keyword, price, "D", "RELAX", Request.QueryString["id"]);
                                }

                                if (messageReturn == "1")
                                {    // Thanh toán thành công >> trả nội dung
                                    HienThiNoiDung(true, true);
                                }
                                else
                                {    // Thanh toán không thành công >> thông báo lỗi
                                    HienThiNoiDung(false, true);
                                }
                                break;
                            }
                        }
                    }
                }

                #endregion
            }
        }
示例#23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            catID = ConvertUtility.ToInt32(Request.QueryString["catid"]);
            if (catID == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid")))
            {
                price = ConfigurationSettings.AppSettings.Get("thuphapprice");
            }
            else
            {
                price = ConfigurationSettings.AppSettings.Get("wallprice");
            }
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr    = "<a href=\"../" + UrlProcess.GetWallpaperHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >HÌNH NỀN<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetWallpaperHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >HINH NEN<a>";

            if (!IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD Content

                DataTable dtDetail = HinhNenController.GetWallpaperDetailByID(AppEnv.CheckFreeContentTelco(), id);
                if (dtDetail != null)
                {
                    chitietGiaodich = "Hinh nen: " + dtDetail.Rows[0]["WTitle"] + " -- id:" + id;
                }

                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("wallcode") + " " + dtDetail.Rows[0]["WCode"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("wallcommandcode") + "</b> để tải hình nền <b>" + dtDetail.Rows[0]["WTitle_Unicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                    }
                    else
                    {
                        ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("wallcode") + " " + dtDetail.Rows[0]["WCode"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("wallcommandcode") + "</b> de tai hinh nen <b>" + dtDetail.Rows[0]["WTitle"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                    }
                }
                else
                {
                    pnlThongBao.Visible = false;
                    switch (Session["telco"].ToString())
                    {
                    case "Vietnamobile":
                        var charging = new Library.VNMCharging.VNMChargingGW();

                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "PICDOWN", "PIC_DOWN", price, "D", "WP", chitietGiaodich);

                        if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))    //Not Enough Money
                        {
                            messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), "PICDOWN", "PIC_DOWN", price, "D", "WP", chitietGiaodich, out logPrice);
                            price         = logPrice;
                        }

                        if (messageReturn == AppEnv.GetSetting("SystemOverload"))     //System Over Load
                        {
                            messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), "PICDOWN", "PIC_DOWN", price, "D", "WP", chitietGiaodich);
                        }

                        if (messageReturn == "1")
                        {    // Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true, true);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false, true);
                        }
                        break;
                    }
                }

                #endregion
            }
        }