示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     preurl = ConfigurationSettings.AppSettings.Get("urldata");
     width  = Request.QueryString["w"];
     lang   = ConvertUtility.ToInt32(Request.QueryString["lang"]);
     id     = ConvertUtility.ToInt32(Request.QueryString["id"]);
     if (!IsPostBack)
     {
         if (ConvertUtility.ToInt32(Request.QueryString["g"]) == 1)
         {
             txtSoDienThoaiTang.Focus();
         }
         //Detail
         DataTable dtDetail = RTController.GetRingToneDetailByIDHasCache(Session["telco"].ToString(), id);
         //end detail
         lnkCateChannel.NavigateUrl = UrlProcess.GetRingToneCategoryUrl(lang.ToString(), width, dtDetail.Rows[0]["W_RTCategoryID"].ToString());
         lnkHomeChannel.NavigateUrl = UrlProcess.GetRingToneHomeUrl(lang.ToString(), width);
         if (dtDetail.Rows.Count > 0)
         {
             price = ConfigurationSettings.AppSettings.Get("ringtoneprice");;
             if (lang == 1)
             {
                 lnkHomeChannel.Text = "NHẠC";
                 lnkCateChannel.Text = dtDetail.Rows[0]["Title_Unicode"].ToString().ToUpper();
                 ltrTenAnh.Text      = dtDetail.Rows[0]["SongNameUnicode"].ToString();
                 ltrCasy.Text        = Resources.Resource.wCaSy + dtDetail.Rows[0]["ArtistNameUnicode"].ToString();
                 if (dtDetail.Rows[0]["AlbumNameUnicode"].ToString() != "unknown")
                 {
                     ltrNhom.Text = "Album: " + dtDetail.Rows[0]["AlbumNameUnicode"].ToString();
                 }
                 //ltrLuottai.Text = Resources.Resource.wLuotTai + dtDetail.Rows[0]["Download"].ToString().ToUpper();
                 ltrGiaTai.Text = Resources.Resource.wGiaTai + price + Resources.Resource.wDonViTien;
                 //ltrGiaTang.Text = Resources.Resource.wGiaTang + price + Resources.Resource.wDonViTien;
                 lnkTai.Text         = "<span class=\"bold\">" + Resources.Resource.wTaiVe + "</span>";
                 ltrGuiTang.Text     = Resources.Resource.wGuiTang;
                 ltrCungTheLoai.Text = Resources.Resource.rNhacCungTheLoai;
             }
             else
             {
                 lnkCateChannel.Text = dtDetail.Rows[0]["Title"].ToString().ToUpper();
                 ltrTenAnh.Text      = dtDetail.Rows[0]["SongName"].ToString();
                 ltrCasy.Text        = Resources.Resource.wCaSy_KD + dtDetail.Rows[0]["ArtistName"].ToString();
                 if (dtDetail.Rows[0]["AlbumName"].ToString() != "unknown")
                 {
                     ltrNhom.Text = "Album: " + dtDetail.Rows[0]["AlbumName"].ToString();
                 }
                 //ltrLuottai.Text = Resources.Resource.wLuotTai_KD + dtDetail.Rows[0]["Download"].ToString().ToUpper();
                 ltrGiaTai.Text = Resources.Resource.wGiaTai_KD + price + Resources.Resource.wDonViTien_KD;
                 //ltrGiaTang.Text = Resources.Resource.wGiaTang_KD + price + Resources.Resource.wDonViTien_KD;
                 lnkTai.Text         = "<span class=\"bold\">" + Resources.Resource.wTaiVe_KD + "</span>";
                 ltrGuiTang.Text     = Resources.Resource.wGuiTang_KD;
                 ltrCungTheLoai.Text = Resources.Resource.rNhacCungTheLoai_KD;
             }
             lnkTai.NavigateUrl = "../Download.aspx?id=" + dtDetail.Rows[0]["W_RTItemID"].ToString() + "&lang=" + lang + "&w=" + width;
             //Other
             if (!string.IsNullOrEmpty(Request.QueryString["tpage"]))
             {
                 tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]);
             }
             int       totaltopdownload = 0;
             DataTable dtltopdownload   = RTController.GetAllRingToneByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), ConvertUtility.ToInt32(dtDetail.Rows[0]["W_RTCategoryID"]), 0, pagesize, tpage, out totaltopdownload);
             rptCungTheLoai.DataSource     = dtltopdownload;
             rptCungTheLoai.ItemDataBound += new RepeaterItemEventHandler(rptTopdownload_ItemDataBound);
             rptCungTheLoai.DataBind();
             Paging1.totalrecord  = totaltopdownload;
             Paging1.pagesize     = pagesize;
             Paging1.numberpage   = pagenumber;
             Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"];
             Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"] + "&tpage=";
         }
     }
 }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //price = ConfigurationSettings.AppSettings.Get("gameprice");
            preurl = AppEnv.GetSetting("urldata");
            width  = Request.QueryString["w"];
            lang   = ConvertUtility.ToInt32(Request.QueryString["lang"]);

            hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]);
            //hotro = 1;

            catID = ConvertUtility.ToInt32(Request.QueryString["catid"]);

            if (AppEnv.GetSetting("freecate").IndexOf("," + catID + ",") > -1)
            {
                freecate = true;
            }
            _info = Get_User_Agent_Info();

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

                if (_arrService != null)
                {
                    if (_arrService.Length > 0)
                    {
                        string dkGame = string.Format(AppEnv.GetSetting("S2DK_Game"));
                        foreach (var item in _arrService)
                        {
                            if (item == dkGame)
                            {
                                pnlDkGame.Visible = false;
                            }
                        }
                    }
                }


                if (catID == 22)
                {
                    Price = "0";
                }
                else
                {
                    Price = AppEnv.GetSetting("gameprice");
                }

                DataTable catInfo = GameController.GetCategoryByCatIDHasCache(catID);
                if (lang == 1)
                {
                    lnkCateChannel.Text = catInfo.Rows[0]["Title_Unicode"].ToString().ToUpper();
                }
                else
                {
                    lnkCateChannel.Text = catInfo.Rows[0]["Title"].ToString().ToUpper();
                }
                lnkCateChannel.NavigateUrl = UrlProcess.GetGameCategoryUrlNew(lang.ToString(), width, catID.ToString(), hotro.ToString());
            }
            if (!string.IsNullOrEmpty(Request.QueryString["cpage"]))
            {
                curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]);
            }
            //start category list
            int totalrecord = 0;
            //if (hotro == 1)
            //{
            //    rptlstCategory.DataSource = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), catID, (int)Constant.Game.Category, _info, pagesize, curpage, out totalrecord);
            //}
            //else
            //{
            //    rptlstCategory.DataSource = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, (int)Constant.Game.Category, pagesize, curpage, out totalrecord);
            //}

            var dt = new DataTable();

            dt = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), catID, (int)Constant.Game.Category, _info, pagesize, curpage, out totalrecord);
            if (dt.Rows.Count == 0)
            {
                dt = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, (int)Constant.Game.Category, pagesize, curpage, out totalrecord);
            }

            rptlstCategory.DataSource     = dt;
            rptlstCategory.ItemDataBound += rptlstCategory_ItemDataBound;
            rptlstCategory.DataBind();
            Paging1.totalrecord  = totalrecord;
            Paging1.pagesize     = pagesize;
            Paging1.numberpage   = pagenumber;
            Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"];
            Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage=";
            //end category list
        }
示例#3
0
        protected void HienThiNoiDung(Boolean thuchien)
        {
            pnlNoiDung.Visible = true;
            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = HinhNenController.GetWallpaperDetailByID(Session["telco"].ToString(), 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(Session["telco"].ToString(), "1", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));
                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"]);
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 15);
                }
                else
                {
                    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(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 1);
                }
                HinhNenController.SetDownloadCounter(Session["telco"].ToString(), 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"]);
                    Transaction.Failure(Session["telco"].ToString(), 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"]);
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 1, messageReturn);
                }
                //--Thông báo lỗi thanh toán
            }
            //log charging
            ILog logger = log4net.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
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            lang    = Request.QueryString["lang"];
            width   = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price   = ConfigurationSettings.AppSettings.Get("goldprice");
            telCo   = Session["telco"].ToString();
            linkStr = "<a href=\"" + UrlProcess.TheThaoHome() + "\" >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\" />";

                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 = ds87detail.Tables[1].Rows[0]["ContentValue"].ToString();
                    btnCo.Visible    = false;
                    btnKhong.Visible = false;
                    //}
                    //else
                    //{
                    //    ltrTitle.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                    //    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;
                            }
                        }
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            price   = ConfigurationSettings.AppSettings.Get("videoprice");
            lang    = Request.QueryString["lang"];
            width   = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id      = ConvertUtility.ToInt32(Request.QueryString["id"]);
            telCo   = Session["telco"].ToString();
            linkStr = "<a href=\"../" + UrlProcess.GetVideoHomeUrlNew(lang, width.ToString()).Replace("~/", "") + "\" >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\" />";

                DataTable dtDetail = VideoController.GetVideoDetailByID(Session["telco"].ToString(), 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":
                        WapXzone_VNM.Library.VNMCharging.VNMChargingGW charging = new WapXzone_VNM.Library.VNMCharging.VNMChargingGW();

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

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

                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "VIDEOGIFT", "VIDEO_GIFT", 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);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false);
                        }
                        break;
                    }
                }
            }
        }
        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      = Session["telco"].ToString();
            linkStr    = "<a href=\"../" + UrlProcess.GetHoangdaoHomeUrlNew(lang, width.ToString()) + "\" >TỬ VI<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetHoangdaoHomeUrlNew(lang, width.ToString()) + "\" >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\" />";

                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);
                    }
                    else
                    {// Thanh toán không thành công >> thông báo lỗi
                        HienThiNoiDung(false);
                    }
                    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;
                        }
                    }
                }
            }
        }
示例#7
0
        protected void rptlastest_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData = (DataRowView)e.Item.DataItem;

            System.Web.UI.WebControls.Image imgAvatar = (System.Web.UI.WebControls.Image)e.Item.FindControl("imgAvatar");
            HyperLink lnkAvatar  = (HyperLink)e.Item.FindControl("lnkAvatar");
            HyperLink lnkTenAnh  = (HyperLink)e.Item.FindControl("lnkTenAnh");
            Literal   ltrTheloai = (Literal)e.Item.FindControl("ltrTheloai");
            Literal   ltrLuottai = (Literal)e.Item.FindControl("ltrLuottai");
            HyperLink lnkTai     = (HyperLink)e.Item.FindControl("lnkTai");
            HyperLink lnkTang    = (HyperLink)e.Item.FindControl("lnkTang");
            string    sGioiThieu;

            if (lang == 1)
            {
                lnkTenAnh.Text  = "<span class=\"bold\">" + curData["GameNameUnicode"].ToString() + "</span>";
                ltrTheloai.Text = Resources.Resource.wTheLoai + curData["Web_Name"].ToString();
                sGioiThieu      = curData["DescriptionUnicode"].ToString();
                if (sGioiThieu.Length > 120)
                {
                    sGioiThieu = sGioiThieu.Substring(0, sGioiThieu.LastIndexOf(" ", 110)) + "...";
                }
                ltrLuottai.Text = Resources.Resource.wGioiThieu + sGioiThieu;
                lnkTai.Text     = "<span class=\"orange bold\">" + Resources.Resource.wTai + "</span>";
                lnkTang.Text    = "<span class=\"orange bold\">" + Resources.Resource.wTang + "</span>";
            }
            else
            {
                lnkTenAnh.Text  = "<span class=\"bold\">" + curData["GameName"].ToString() + "</span>";
                ltrTheloai.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(curData["Web_Name"].ToString());
                sGioiThieu      = curData["Description"].ToString();
                if (sGioiThieu.Length > 120)
                {
                    sGioiThieu = sGioiThieu.Substring(0, sGioiThieu.LastIndexOf(" ", 110)) + "...";
                }
                ltrLuottai.Text = Resources.Resource.wGioiThieu_KD + sGioiThieu;
                lnkTai.Text     = "<span class=\"orange bold\">" + Resources.Resource.wTai_KD + "</span>";
                lnkTang.Text    = "<span class=\"orange bold\">" + Resources.Resource.wTang_KD + "</span>";
            }

            lnkTang.NavigateUrl = UrlProcess.GetGameDetailUrl(lang.ToString(), "detail", width, curData["W_GameItemID"].ToString(), "0") + "&g=1";
            if (MobileUtils.CheckValidModel(curData["ModelSupport"].ToString(), _info))
            {
                //lnkTai.NavigateUrl = "../Download.aspx?id=" + curData["W_GameItemID"].ToString() + "&lang=" + lang + "&w=" + width;
                lnkTai.NavigateUrl = UrlProcess.GetGameDownloadUrl(lang.ToString(), width, curData["W_GameItemID"].ToString(), "0");
            }
            else
            {
                lnkTai.NavigateUrl = "";
                if (lang == 1)
                {
                    lnkTai.Text = Resources.Resource.wKhongHoTro;
                }
                else
                {
                    lnkTai.Text = Resources.Resource.wKhongHoTro_KD;
                }
            }
            lnkAvatar.NavigateUrl = lnkTenAnh.NavigateUrl = UrlProcess.GetGameDetailUrl(lang.ToString(), "detail", width, curData["W_GameItemID"].ToString(), "0");
            WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
            ws.GenerateAvatarThumnail(curData["Avatar"].ToString(), 60, 70);
            imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["Avatar"].ToString(), 60, 70).Replace("~", "");
            //imgAvatar.ImageUrl = preurl + curData["Avatar"].ToString().Replace("~", "");
            if (curData["W_GameItemID"].ToString() == "1402" || curData["W_GameItemID"].ToString() == "1401")
            {
                ltrTheloai.Visible = false;
            }
        }
示例#8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //
            User_AgentInfo info = Get_User_Agent_Info();

            width = info.resolution_width;
            if (ConvertUtility.ToInt32(width) == 0 || ConvertUtility.ToInt32(width) >= 480)
            {
                width = ConvertUtility.ToString((int)Constant.DefaultScreen.Standard);
            }
            //query param
            int    is3g   = 0;
            string msisdn = MobileUtils.GetMSISDN(out is3g);

            //#region Hai them vao ngay 16/02/2012
            //if (String.IsNullOrEmpty(msisdn) && Session["msisdn"] == null)
            //    msisdn = this.GetVietnamobileMsisdn();
            //#endregion
            Session["is3g"] = is3g;

            #region MSISDN

            if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
            {
                Session["telco"]  = Constant.T_Vietnamobile;
                Session["msisdn"] = msisdn;

                WapController.WapUserLog(msisdn, 0, string.Empty, 1);
            }
            else
            {
                Session["msisdn"] = null;
                Session["telco"]  = Constant.T_Undefined;
            }

            #endregion



            //#region Sport Game Hero

            //if(AppEnv.isMobileBrowser())
            //{
            //    DataTable dtUrl = WapController.VnmGetUrl();

            //    if (dtUrl != null && dtUrl.Rows[0]["IsLog"].ToString() == "1")
            //    {
            //        if (Session["msisdn"] != null)
            //        {
            //            DataTable dt = WapController.VnmCheckBlackList(Session["msisdn"].ToString());
            //            if (dt.Rows.Count == 0)
            //            {
            //                string resUrl = dtUrl.Rows[0]["ResUrl"].ToString();
            //                Response.Redirect(resUrl);
            //            }
            //        }
            //    }
            //}

            //#endregion

            string urlRes = AppEnv.GetSetting("WapDefault") + UrlProcess.GetWapHomeUrl("1", width).Replace("~", "");
            if (AppEnv.isMobileBrowser())
            {
                string model = AppEnv.GetUserAgent();
                if (model == "high")
                {
                    urlRes = AppEnv.GetSetting("WapDefault") + "/trang-chu.aspx";
                    //urlRes = AppEnv.GetSetting("WapDefault") + "/login.aspx";
                }
                else
                {
                    urlRes = AppEnv.GetSetting("WapDefault") + "/Wap/Default.aspx?lang=1&w=320";
                }
            }
            else
            {
                urlRes = AppEnv.GetSetting("WapDefault") + "/Wap/Default.aspx?lang=1&w=320";
            }
            logger.Debug(urlRes);
            //urlRes = AppEnv.GetSetting("WapDefault") + "/login.aspx";
            //urlRes = AppEnv.GetSetting("WapDefault") + "/trang-chu.aspx";
            Response.Redirect(urlRes);
            //Response.Redirect("NotFound.aspx");

            //if (ConvertUtility.ToInt32(AppEnv.GetSetting("NewUrl")) == 1)
            //{
            //    Response.Redirect(AppEnv.GetSetting("WapDefault") + UrlProcess.GetWapHomeUrlNew("1", width).Replace("~", ""));
            //}
            //else
            //{
            //    Response.Redirect(AppEnv.GetSetting("WapDefault") + UrlProcess.GetWapHomeUrl("1", width).Replace("~", ""));
            //    //Response.Redirect("showpopup.aspx");
            //}
        }
示例#9
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      = Session["telco"].ToString();
            linkStr    = "<a href=\"../" + UrlProcess.GetAppHomeUrlNew(lang, width.ToString(), hotro).Replace("~/", "") + "\" >PHẦN MỀM<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetAppHomeUrlNew(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\" />";

                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);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false);
                        }
                        break;
                    }
                }
            }
        }
示例#10
0
 protected void btnTang_Click(object sender, ImageClickEventArgs e)
 {
     Response.Redirect(UrlProcess.GetGameSendGiftUrl(lang.ToString(), width, Request.QueryString["id"], txtSoDienThoaiTang.Text.Trim(), hotro));
 }
示例#11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     preurl = ConfigurationSettings.AppSettings.Get("urldata");
     width  = Request.QueryString["w"];
     lang   = ConvertUtility.ToInt32(Request.QueryString["lang"]);
     hotro  = Request.QueryString["hotro"];
     id     = ConvertUtility.ToInt32(Request.QueryString["id"]);
     if (!IsPostBack)
     {
         _info = Get_User_Agent_Info();
         if (ConvertUtility.ToInt32(Request.QueryString["g"]) == 1)
         {
             txtSoDienThoaiTang.Focus();
         }
         //Detail
         DataTable dtDetail = GameController.GetGameDetailByIDHasCache(Session["telco"].ToString(), id);
         //end detail
         if (dtDetail.Rows.Count > 0)
         {
             lnkCateChannel.NavigateUrl = UrlProcess.GetGameCategoryUrl(lang.ToString(), width, dtDetail.Rows[0]["W_GameCategoryID"].ToString(), hotro);
             lnkHomeChannel.NavigateUrl = UrlProcess.GetGameHomeUrl(lang.ToString(), width, hotro);
             price = ConfigurationSettings.AppSettings.Get("gameprice");
             if (id == 1402 || id == 1401)
             {
                 ltrNhom.Visible = false;
                 price           = "5000";
             }
             if (ConfigurationSettings.AppSettings.Get("freecate").IndexOf("," + dtDetail.Rows[0]["W_GameCategoryID"].ToString() + ",") > -1)
             {
                 freecate = true;
             }
             if (freecate == true)
             {
                 ltrGiaTai.Visible = false;
             }
             if (lang == 1)
             {
                 lnkCateChannel.Text = dtDetail.Rows[0]["Title_Unicode"].ToString().ToUpper();
                 ltrTenAnh.Text      = dtDetail.Rows[0]["GameNameUnicode"].ToString();
                 ltrNhom.Text        = Resources.Resource.wTheLoai + dtDetail.Rows[0]["Web_Name"].ToString();
                 ltrLuottai.Text     = Resources.Resource.wLuotTai + dtDetail.Rows[0]["Download"].ToString().ToUpper();
                 //ltrGiaTai.Text = Resources.Resource.wGiaTai + price + Resources.Resource.wDonViTien;
                 //ltrGiaTang.Text = Resources.Resource.wGiaTang + price + Resources.Resource.wDonViTien;
                 ltrGioiThieu.Text   = Resources.Resource.wGioiThieu + dtDetail.Rows[0]["DescriptionUnicode"].ToString();
                 lnkTai.Text         = "<span class=\"bold\">" + Resources.Resource.wTaiVe + "</span>";
                 ltrGuiTang.Text     = Resources.Resource.wGuiTang;
                 ltrCungTheLoai.Text = Resources.Resource.gGameCungTheLoai;
             }
             else
             {
                 lnkCateChannel.Text = dtDetail.Rows[0]["Title"].ToString().ToUpper();
                 ltrTenAnh.Text      = dtDetail.Rows[0]["GameName"].ToString();
                 ltrNhom.Text        = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(dtDetail.Rows[0]["Web_Name"].ToString());
                 ltrLuottai.Text     = Resources.Resource.wLuotTai_KD + dtDetail.Rows[0]["Download"].ToString().ToUpper();
                 //ltrGiaTai.Text = Resources.Resource.wGiaTai_KD + price + Resources.Resource.wDonViTien_KD;
                 //ltrGiaTang.Text = Resources.Resource.wGiaTang_KD + price + Resources.Resource.wDonViTien_KD;
                 ltrGioiThieu.Text   = Resources.Resource.wGioiThieu_KD + dtDetail.Rows[0]["Description"].ToString();
                 lnkTai.Text         = "<span class=\"bold\">" + Resources.Resource.wTaiVe_KD + "</span>";
                 ltrGuiTang.Text     = Resources.Resource.wGuiTang_KD;
                 ltrCungTheLoai.Text = Resources.Resource.gGameCungTheLoai_KD;
             }
             if (MobileUtils.CheckValidModel(dtDetail.Rows[0]["ModelSupport"].ToString(), _info))
             {
                 lnkTai.NavigateUrl = UrlProcess.GetGameDownloadUrl(lang.ToString(), width, dtDetail.Rows[0]["W_GameItemID"].ToString(), hotro.ToString());
                 //lnkTai.NavigateUrl = "../Download.aspx?id=" + dtDetail.Rows[0]["W_GameItemID"].ToString() + "&lang=" + lang + "&w=" + width;
             }
             else
             {
                 lnkTai.Visible = false;
             }
             WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
             ws.GenerateAvatarThumnail(dtDetail.Rows[0]["Avatar"].ToString(), 120, 141);
             imgDetail.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(dtDetail.Rows[0]["Avatar"].ToString(), 120, 141).Replace("~", "");
             //imgDetail.ImageUrl = preurl + dtDetail.Rows[0]["Avatar"].ToString().Replace("~", "");
             //Other wallpaper
             if (!string.IsNullOrEmpty(Request.QueryString["tpage"]))
             {
                 tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]);
             }
             int       totaltopdownload = 0;
             DataTable dtltopdownload   = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), ConvertUtility.ToInt32(dtDetail.Rows[0]["W_GameCategoryID"]), 0, pagesize, tpage, out totaltopdownload);
             rptCungTheLoai.DataSource     = dtltopdownload;
             rptCungTheLoai.ItemDataBound += new RepeaterItemEventHandler(rptCungTheLoai_ItemDataBound);
             rptCungTheLoai.DataBind();
             Paging1.totalrecord  = totaltopdownload;
             Paging1.pagesize     = pagesize;
             Paging1.numberpage   = pagenumber;
             Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"] + "&hotro=" + Request.QueryString["hotro"];
             Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"] + "&hotro=" + Request.QueryString["hotro"] + "&tpage=";
             //end lastest wallpaper
         }
     }
 }
        protected void rptlstResult_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }

            if (e.Item.ItemIndex < pagesize - 1)
            {
                Literal lit = (Literal)e.Item.FindControl("litBlank");
                lit.Text = "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"f5f5f5\"><tr><td align=\"left\" valign=\"top\"><img alt=\"\" src=\"/imagesnew/blank.gif\" width=\"5\" height=\"9\" /></td></tr></table>";
            }

            DataRowView curData    = (DataRowView)e.Item.DataItem;
            Image       imgAvatar  = (Image)e.Item.FindControl("imgAvatar");
            HyperLink   lnkAvatar  = (HyperLink)e.Item.FindControl("lnkAvatar");
            HyperLink   lnkTenAnh  = (HyperLink)e.Item.FindControl("lnkTenAnh");
            Literal     ltrTheloai = (Literal)e.Item.FindControl("ltrTheloai");
            Literal     ltrLuottai = (Literal)e.Item.FindControl("ltrLuottai");
            HyperLink   lnkTai     = (HyperLink)e.Item.FindControl("lnkTai");
            string      sGioiThieu;

            if (lang == 1)
            {
                lnkTenAnh.Text  = curData["AppNameUnicode"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai + curData["Web_Name"];
                sGioiThieu      = curData["DescriptionUnicode"].ToString();
                if (sGioiThieu.Length > 120)
                {
                    sGioiThieu = sGioiThieu.Substring(0, sGioiThieu.LastIndexOf(" ", 110)) + "...";
                }
                ltrLuottai.Text = Resources.Resource.wGioiThieu + sGioiThieu;
                lnkTai.Text     = Resources.Resource.wTai;
            }
            else
            {
                lnkTenAnh.Text  = curData["AppName"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(curData["Web_Name"].ToString());
                sGioiThieu      = curData["Description"].ToString();
                if (sGioiThieu.Length > 120)
                {
                    sGioiThieu = sGioiThieu.Substring(0, sGioiThieu.LastIndexOf(" ", 110)) + "...";
                }
                ltrLuottai.Text = Resources.Resource.wGioiThieu_KD + sGioiThieu;
                lnkTai.Text     = Resources.Resource.wTai_KD;
            }

            if (MobileUtils.CheckValidModel(curData["ModelSupport"].ToString(), _info))
            {
                lnkTai.NavigateUrl = UrlProcess.GetAppDownloadUrlNew(lang.ToString(), width, curData["W_AppItemID"].ToString(), hotro.ToString());
            }
            else
            {
                lnkTai.NavigateUrl = "";
                if (lang == 1)
                {
                    lnkTai.Text = Resources.Resource.wKhongHoTro;
                }
                else
                {
                    lnkTai.Text = Resources.Resource.wKhongHoTro_KD;
                }
            }
            lnkAvatar.NavigateUrl = lnkTenAnh.NavigateUrl = UrlProcess.GetAppDetailUrlNew(lang.ToString(), "detail", width, curData["W_AppItemID"].ToString(), hotro.ToString());
            WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
            ws.GenerateAvatarThumnail(curData["Avatar"].ToString(), 36, 48);
            imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["Avatar"].ToString(), 36, 48).Replace("~", "");
        }
示例#13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang       = Request.QueryString["lang"];
            width      = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price      = ConfigurationSettings.AppSettings.Get("kqchoprice");
            telCo      = Session["telco"].ToString();
            linkStr    = "<a href=\"../" + UrlProcess.GetSportHomeUrlNew(lang, "home", width.ToString()).Replace("~/", "") + "\" >BÓNG ĐÁ<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetSportHomeUrlNew(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\" />";

                gameid = Request.QueryString["id"];//ThethaoController.GetSport_GameDetailBySportID(ConvertUtility.ToInt32(Request.QueryString["id"])).Rows[0]["PK_Game_ID"].ToString();
                DataTable sportinfo = ThethaoController.GetSport_GameDetailByID(gameid);
                // 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);
                    }
                    else
                    {// Thanh toán không thành công >> thông báo lỗi
                        HienThiNoiDung(false);
                    }
                    Session["transactionid_old"] = null;
                }
                else
                {
                    //gameid = ThethaoController.GetSport_GameDetailBySportID(ConvertUtility.ToInt32(Request.QueryString["id"])).Rows[0]["PK_Game_ID"].ToString();
                    if (telCo == Constant.T_Mobifone)
                    {
                        string content = Session["cpid"].ToString() + "&" + Constant.thethao + "8" + 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;
                            ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("kqchocode") + " " + sportinfo.Rows[0]["Code"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("kqchocommandcode") + "</b> để nhận kết quả chờ trận đấu" + Resources.Resource.wChon3G;
                        }
                        else
                        {
                            ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                            ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("kqchocode") + " " + sportinfo.Rows[0]["Code"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("kqchocommandcode") + "</b> de nhan ket qua cho tran dau" + 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.wXacNhanDangKyDichVu + "kết quả chờ trận đấu " + sportinfo.Rows[0]["Team_Name1"].ToString() + " - " + sportinfo.Rows[0]["Team_Name2"].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.wXacNhanDangKyDichVu_KD + "ket qua cho tran dau " + sportinfo.Rows[0]["Team_Name1"].ToString() + " - " + sportinfo.Rows[0]["Team_Name2"].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", "KQCHO", Request.QueryString["id"].ToString());

                            //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "FOOTBALLRESULT", "FOOTBALL_RESULT");
                            //Dungnt sua ngay 10/11 tu FOOTBALLRESULT thanh LOTOSOICAU
                            //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "LOTOSOICAU", "SOICAU");

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

                            if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                            {    // Thanh toán thành công >> trả nội dung
                                HienThiNoiDung(true);
                            }
                            else
                            {    // Thanh toán không thành công >> thông báo lỗi
                                HienThiNoiDung(false);
                            }
                            break;
                        }
                    }
                }
            }
        }
示例#14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            width    = Request.QueryString["w"];
            preurl   = ConfigurationSettings.AppSettings.Get("urldata");
            tvprice  = ConfigurationSettings.AppSettings.Get("tipprice");
            tkprice  = ConfigurationSettings.AppSettings.Get("ykcgprice");
            kqcprice = ConfigurationSettings.AppSettings.Get("kqchoprice");
            if (!IsPostBack)
            {
                lang = ConvertUtility.ToInt32(Request.QueryString["lang"]);
                if (lang == 1)
                {
                    ltrTitle.Text      = "TIÊU ĐIỂM THỂ THAO";
                    lnkCacTinKhac.Text = "Các tin khác »";
                    //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia + "Tư vấn " + ConfigurationSettings.AppSettings.Get("tipprice") + Resources.Resource.wDonViTien + ", Thống kê " + ConfigurationSettings.AppSettings.Get("ykcgprice") + Resources.Resource.wDonViTien + ", KQ chờ " + ConfigurationSettings.AppSettings.Get("kqchoprice") + Resources.Resource.wDonViTien + ")";
                }
                else
                {
                    //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia_KD + "Tu van " + ConfigurationSettings.AppSettings.Get("tipprice") + Resources.Resource.wDonViTien_KD + ", Thong ke " + ConfigurationSettings.AppSettings.Get("ykcgprice") + Resources.Resource.wDonViTien_KD + ", KQ cho " + ConfigurationSettings.AppSettings.Get("kqchoprice") + Resources.Resource.wDonViTien_KD + ")";
                }
                DataTable tbThueBao = WapController.W4A_Subscriber_GetInfo(ConvertUtility.ToString(Session["msisdn"]), 2);
                if (tbThueBao.Rows.Count > 0)
                {
                    if (lang == 1)
                    {
                        ltrDangKy.Text = "Thuê bao ngày";
                        lnkDangKy.Text = "Hạn sử dụng tới " + ConvertUtility.ToDateTime(tbThueBao.Rows[0]["ExpiredDate"]).ToString("dd/MM/yyyy HH:mm");
                    }
                    else
                    {
                        ltrDangKy.Text = "Thue bao ngay";
                        lnkDangKy.Text = "Han su dung toi " + ConvertUtility.ToDateTime(tbThueBao.Rows[0]["ExpiredDate"]).ToString("dd/MM/yyyy HH:mm");
                    }
                    lnkDangKy.NavigateUrl = string.Empty;
                }
                else
                {
                    if (lang == 1)
                    {
                        ltrDangKy.Text = "Đăng ký sử dụng trọn gói dịch vụ bóng đá. Giá: " + ConfigurationSettings.AppSettings.Get("bongdathangprice") + Resources.Resource.wDonViTien + "/ngày.";
                        lnkDangKy.Text = "<span class=\"blue bold\">» Đăng ký «</span>";
                    }
                    else
                    {
                        ltrDangKy.Text = "Dang ky su dung tron goi dich vu bong da. Gia: " + ConfigurationSettings.AppSettings.Get("bongdathangprice") + Resources.Resource.wDonViTien_KD + "/ngay.";
                        lnkDangKy.Text = "<span class=\"blue bold\">» Dang ky «</span>";
                    }
                    lnkDangKy.NavigateUrl = "../DangKy.aspx?lang=" + lang.ToString() + "&w" + width;
                }

                lnkCacTinKhac.NavigateUrl   = UrlProcess.GetLastestNewsTheThaoSo(lang.ToString(), width);
                lnkTranCauVang.NavigateUrl  = "../TuVanDacBiet.aspx?id=4&lang=" + lang.ToString() + "&w" + width;
                lnkTuVanDacBiet.NavigateUrl = UrlProcess.GetSportHomeUrl(lang.ToString(), "tvdb", width);
                if (!string.IsNullOrEmpty(Request.QueryString["cpage"]))
                {
                    curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]);
                }


                //DataTable dtlatest = TintucController.GetTopNewsHasCache(ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thethao_zoneiddefaut")), 3);
                DataTable dtlatest = ThethaoController.GetHomeNewsHasCache();
                if (dtlatest != null && dtlatest.Rows.Count > 0)
                {
                    rptNewLastest.DataSource     = dtlatest;
                    rptNewLastest.ItemDataBound += rptNewLastest_ItemDataBound;
                    rptNewLastest.DataBind();
                }

                int       totalrecord = 0;
                DataTable dtlstTip    = ThethaoController.GetAllGameByTip(pagesize, curpage, out totalrecord);
                rptTrancaudinh.DataSource     = dtlstTip;
                rptTrancaudinh.ItemDataBound += new RepeaterItemEventHandler(rptTrancaudinh_ItemDataBound);
                rptTrancaudinh.DataBind();
                Pagging1.totalrecord  = totalrecord;
                Pagging1.pagesize     = pagesize;
                Pagging1.numberpage   = pagenumber;
                Pagging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"];
                Pagging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&cpage=";
            }
        }
示例#15
0
        protected void HienThiNoiDung(Boolean thuchien)
        {
            pnlNoiDung.Visible = true;

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

            chitietGiaodich = "Nhạc: " + dtDetail.Rows[0]["SongNameUnicode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            SoDT            = MobileUtils.ToSTDMobileNumber(SoDT);
            if (thuchien)
            {
                DataTable dtKhuyenMai = MusicController.GetItemDetailRandom(Session["telco"].ToString(), id);
                string    khuyenmaiID = ConvertUtility.ToString(dtKhuyenMai.Rows[0]["W_MItemID"]);
                lnkKhuyenMai.NavigateUrl = UrlProcess.GetGameDownloadItem(Session["telco"].ToString(), "2", 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.wTangThanhCong + " 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.wTangThanhCong_KD + " ban nhac " + dtDetail.Rows[0]["SongName"].ToString();
                    lnkKhuyenMai.Text = "Nhac tang: " + dtKhuyenMai.Rows[0]["SongName"].ToString();
                };
                string url    = UrlProcess.GetGameDownloadItem(Session["telco"].ToString(), "2", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));
                MTInfo mtInfo = new MTInfo();
                Random random = new Random();
                //Thông báo cho người được tặng
                mtInfo.User_ID       = SoDT;
                mtInfo.Service_ID    = ConfigurationSettings.AppSettings.Get("ringtonecommandcode");
                mtInfo.Command_Code  = ConfigurationSettings.AppSettings.Get("ringtonecode");
                mtInfo.Message_Type  = (int)Constant.MessageType.FREE;
                mtInfo.Request_ID    = random.Next(100000000, 999999999).ToString();
                mtInfo.Total_Message = 1;
                mtInfo.Message_Index = 0;
                mtInfo.IsMore        = 0;
                mtInfo.Content_Type  = 0;
                mtInfo.Message_Type  = (int)Constant.MessageType.FREE;
                mtInfo.Message       = "Ban nhan duoc qua tang nhac chuong " + dtDetail.Rows[0]["Code"].ToString() + " tu so dien thoai " + "0" + Session["msisdn"].ToString().Remove(0, 2);
                MTController.SmsMtInsert(mtInfo);

                //MT thong bao cho nguoi gui tang biet
                mtInfo.Content_Type = 0;
                mtInfo.User_ID      = Session["msisdn"].ToString();
                mtInfo.Message      = "Ban da gui tang thanh cong nhac chuong " + dtDetail.Rows[0]["Code"].ToString() + " toi so dt " + SoDT;
                mtInfo.Message_Type = (int)Constant.MessageType.FREE;
                mtInfo.Request_ID   = random.Next(100000000, 999999999).ToString();
                MTController.SmsMtInsert(mtInfo);

                //Build waplink send to customer and insert to MT table
                mtInfo.User_ID      = SoDT;
                mtInfo.Message      = "Tai nhac chuong duoc tang theo dia chi: " + url;
                mtInfo.Content_Type = 8;
                mtInfo.Message_Type = (int)Constant.MessageType.FREE;
                mtInfo.Request_ID   = random.Next(100000000, 999999999).ToString();
                MTController.SmsMtInsert(mtInfo);
                if (free != true)
                {
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, url, id.ToString(), chitietGiaodich, 2);
                    MusicController.SetDownloadCounter(Session["telco"].ToString(), 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;
                }
                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)
            {
                ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                logger.Debug("--------------------------------------------------");
                logger.Debug("MSISDN: " + Session["msisdn"].ToString());
                logger.Debug("So gui tang: " + SoDT);
                logger.Debug("Dich vu: Am nhac - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["SongName"].ToString() + " - 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
        }
示例#16
0
        protected void HienThiNoiDung(Boolean thuchien)
        {
            pnlNoiDung.Visible = true;

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

            SoDT = MobileUtils.ToSTDMobileNumber(SoDT);
            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.wTangThanhCong + " hình nền " + dtDetail.Rows[0]["WTitle_Unicode"].ToString() + " (" + dtDetail.Rows[0]["WCode"].ToString() + ") tới số điện thoại 0" + SoDT.Remove(0, 2);
                }
                else
                {
                    ltrTieuDe.Text = linkStr_KD;
                    lblTen.Text    = dtDetail.Rows[0]["WTitle"].ToString();
                    //lnkDownload.Text = Resources.Resource.wBamDeTai_KD;
                    ltrNoiDung.Text = Resources.Resource.wTangThanhCong_KD + " hinh nen " + dtDetail.Rows[0]["WTitle"].ToString() + " (" + dtDetail.Rows[0]["WCode"].ToString() + ") toi so dien thoai 0" + SoDT.Remove(0, 2);
                };

                string url    = UrlProcess.GetDownloadItem(Session["telco"].ToString(), "1", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));
                MTInfo mtInfo = new MTInfo();
                Random random = new Random();
                //Thông báo cho người được tặng
                mtInfo.User_ID       = SoDT;
                mtInfo.Service_ID    = ConfigurationSettings.AppSettings.Get("wallcommandcode");
                mtInfo.Command_Code  = ConfigurationSettings.AppSettings.Get("wallcode");
                mtInfo.Message_Type  = (int)Constant.MessageType.FREE;
                mtInfo.Request_ID    = random.Next(100000000, 999999999).ToString();
                mtInfo.Total_Message = 1;
                mtInfo.Message_Index = 0;
                mtInfo.IsMore        = 0;
                mtInfo.Content_Type  = 0;
                mtInfo.Message_Type  = (int)Constant.MessageType.FREE;
                mtInfo.Message       = "Ban nhan duoc qua tang hinh nen " + dtDetail.Rows[0]["WCode"].ToString() + " tu so dien thoai " + "0" + Session["msisdn"].ToString().Remove(0, 2);
                MTController.SMS_MTInsert(mtInfo);

                //MT thong bao cho nguoi gui tang biet
                mtInfo.Content_Type = 0;
                mtInfo.User_ID      = Session["msisdn"].ToString();
                mtInfo.Message      = "Ban da gui tang thanh cong hinh nen " + dtDetail.Rows[0]["WCode"].ToString() + " toi so dt " + SoDT;
                mtInfo.Message_Type = (int)Constant.MessageType.FREE;
                mtInfo.Request_ID   = random.Next(100000000, 999999999).ToString();
                MTController.SMS_MTInsert(mtInfo);

                //Build waplink send to customer and insert to MT table
                mtInfo.User_ID      = SoDT;
                mtInfo.Message      = "Tai hinh nen duoc tang theo dia chi: " + url;
                mtInfo.Content_Type = 8;
                mtInfo.Message_Type = (int)Constant.MessageType.FREE;
                mtInfo.Request_ID   = random.Next(100000000, 999999999).ToString();
                MTController.SMS_MTInsert(mtInfo);

                //Lưu Transaction
                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"]);
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, url, id.ToString(), chitietGiaodich, 15);
                }
                else
                {
                    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(Session["telco"].ToString(), Session["msisdn"].ToString(), price, url, id.ToString(), chitietGiaodich, 1);
                }
                HinhNenController.SetDownloadCounter(Session["telco"].ToString(), 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"]);
                    Transaction.Failure(Session["telco"].ToString(), 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"]);
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 1, messageReturn);
                }
                //--Thông báo lỗi thanh toán
            }
            //log charging
            ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());

            logger.Debug("--------------------------------------------------");
            logger.Debug("MSISDN: " + Session["msisdn"].ToString());
            logger.Debug("So gui tang: " + SoDT);
            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
        }
示例#17
0
        protected void rptlst_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }



            string    curData = (string)e.Item.DataItem;
            HyperLink lnkCity = (HyperLink)e.Item.FindControl("lnkCity");
            DataTable info    = XosoController.GetInfobyCompanyID(ConvertUtility.ToInt32(curData));

            Count = info.Rows.Count;
            Literal litBlank = (Literal)e.Item.FindControl("litBlank");

            if (e.Item.ItemIndex < Count - 1)
            {
                litBlank.Text = "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\"><tr><td align=\"left\" valign=\"top\"><img alt=\"\" src=\"/imagesnew/blank.gif\" width=\"5\" height=\"9\" /></td></tr></table>";
            }

            HyperLink lnkxkq      = (HyperLink)e.Item.FindControl("lnkxkq");
            HyperLink lnkkqc      = (HyperLink)e.Item.FindControl("lnkkqc");
            HyperLink lnksc       = (HyperLink)e.Item.FindControl("lnksc");
            HyperLink lnks2DangKy = (HyperLink)e.Item.FindControl("lnkS2DangKy");
            Panel     pnlXoSoList = (Panel)e.Item.FindControl("pnlXsList");



            if (_arrService != null)
            {
                if (_arrService.Length > 0)
                {
                    string dkXoSo = string.Format(AppEnv.GetSetting("S2DK_XS"), info.Rows[0]["Company_Comment"]);
                    foreach (var item in _arrService)
                    {
                        if (item == dkXoSo)
                        {
                            pnlXoSoList.Visible = false;
                        }
                    }
                }
            }

            if (lang == 1)
            {
                lnkCity.Text     = info.Rows[0]["company_name"].ToString();
                lnkkqc.Text      = Resources.Resource.xsKQCho.Replace("<span class=\"orange bold\">", "").Replace("<span>", "");
                lnksc.Text       = Resources.Resource.xsSoiCau.Replace("<span class=\"orange bold\">", "").Replace("<span>", "");
                lnks2DangKy.Text = "Nhận KQXS hàng ngày (500đ/ngày)";
            }
            else
            {
                lnkCity.Text     = UnicodeUtility.UnicodeToKoDau(info.Rows[0]["company_name"].ToString());
                lnkkqc.Text      = Resources.Resource.xsKQCho_KD.Replace("<span class=\"orange bold\">", "").Replace("<span>", "");
                lnksc.Text       = Resources.Resource.xsSoiCau_KD.Replace("<span class=\"orange bold\">", "").Replace("<span>", "");
                lnks2DangKy.Text = "Nhan KQXS hang ngay (500d/ngay)";
            }
            lnkxkq.NavigateUrl = lnkCity.NavigateUrl = "../KQXSNew.aspx?id=" + info.Rows[0]["company_id"].ToString() + "&day=" + day + "&lang=" + lang + "&w=" + width;
            string content1 = cpid + "&" + Constant.xoso + curData + "@" + day + "&" + kqxsprice + "&" + vmstransactionid;

            lnkkqc.NavigateUrl = "../KQChoNew.aspx?id=" + info.Rows[0]["company_id"].ToString() + "&lang=" + lang + "&w=" + width;
            lnksc.NavigateUrl  = "../SoiCauNew.aspx?id=" + info.Rows[0]["company_id"].ToString() + "&lang=" + lang + "&w=" + width;

            lnks2DangKy.NavigateUrl = UrlProcess.GetS2RegisterXoSoUrl(lang.ToString(), width,
                                                                      info.Rows[0]["company_id"].ToString());

            if (day == 0)
            {
                if (lang == 1)
                {
                    lnkxkq.Text = Resources.Resource.xsKQKyTruoc + " (" + ConvertUtility.ToDateTime(XosoController.GetKQXSLastestDetailbyCompanyID(ConvertUtility.ToInt32(ConvertUtility.ToInt32(info.Rows[0]["company_id"]))).Rows[0]["lot_time"]).ToString("dd/MM") + ")";
                }
                else
                {
                    lnkxkq.Text = Resources.Resource.xsKQKyTruoc_KD + " (" + ConvertUtility.ToDateTime(XosoController.GetKQXSLastestDetailbyCompanyID(ConvertUtility.ToInt32(ConvertUtility.ToInt32(info.Rows[0]["company_id"]))).Rows[0]["lot_time"]).ToString("dd/MM") + ")";
                }
            }
            else
            {
                lnkxkq.Text = "KQ " + "(" + ConvertUtility.ToDateTime(DateTime.Now.AddDays(-day)).ToString("dd/MM") + ")";
            }
        }
示例#18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            SoDT  = Request.QueryString["sdt"];
            telCo = Session["telco"].ToString();
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            catID = ConvertUtility.ToInt32(Request.QueryString["catid"]);
            DataTable dtDetail = HinhNenController.GetWallpaperDetailByID(telCo, id);

            if (catID == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid")))
            {
                price = ConfigurationSettings.AppSettings.Get("thuphapprice");
            }
            else
            {
                price = ConfigurationSettings.AppSettings.Get("wallprice");
            }
            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\" />";

                //Nếu số điện thoại không hợp lệ thì hướng dẫn
                if (!MobileUtils.IsMobileNumber(SoDT))
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = Resources.Resource.wSoDienThoaiKhongHopLe;
                    }
                    else
                    {
                        ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = Resources.Resource.wSoDienThoaiKhongHopLe_KD;
                    }
                    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("wallcode") + " " + dtDetail.Rows[0]["WCode"].ToString() + " " + SoDT + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("wallcommandcode") + "</b> để gửi tặng hình nền <b>" + dtDetail.Rows[0]["WTitle_Unicode"].ToString() + "</b>" + 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() + " " + SoDT + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("wallcommandcode") + "</b> de gui tang hinh nen <b>" + dtDetail.Rows[0]["WTitle"].ToString() + "</b>" + Resources.Resource.wChon3G_KD;
                    }
                }
                else
                {
                    //pnlThongBao.Visible = true;
                    //if (lang == "1")
                    //{
                    //    ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu + "hình nền " + dtDetail.Rows[0]["WTitle_Unicode"].ToString();
                    //    btnCo.Text = Resources.Resource.btnCo;
                    //    btnKhong.Text = Resources.Resource.btnKhong;
                    //}
                    //else
                    //{
                    //    ltrTitle.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu_KD.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu_KD + "hinh nen " + dtDetail.Rows[0]["WTitle"].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", "WP", Request.QueryString["id"].ToString());

                        messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "PICGIFT", "PIC_GIFT");

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

                        if (messageReturn == "1")
                        {    // Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false);
                        }
                        break;
                    }
                }
            }
        }
示例#19
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.CheckSessionTelco();
            linkStr = "<a href=\"" + UrlProcess.HoangDaoHome() + "\" >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 = 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
            }
        }
        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.CheckSessionTelco();

            linkStr = "<a href=\"" + UrlProcess.TheThaoHome() + "\" >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
            }
        }
示例#21
0
        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(Session["telco"].ToString(), "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;
                }
                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 = log4net.LogManager.GetLogger(Session["telco"].ToString());
                    logger.Debug("--------------------------------------------------");
                    logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                    logger.Debug("Dich vu: Am nhac - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["SongName"].ToString() + " - 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
        }
示例#22
0
        protected void rptlist_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData    = (DataRowView)e.Item.DataItem;
            Label       ltrGame    = (Label)e.Item.FindControl("ltrGame");
            Literal     ltrTime    = (Literal)e.Item.FindControl("ltrTime");
            HyperLink   lnkTuVan   = (HyperLink)e.Item.FindControl("lnkTuVan");
            HyperLink   lnkThongke = (HyperLink)e.Item.FindControl("lnkThongke");
            HyperLink   lnkKQCho   = (HyperLink)e.Item.FindControl("lnkKQCho");

            if (lang == 1)
            {
                if (ConvertUtility.ToInt32(curData["Status"]) == 1)
                {
                    ltrGame.Text = curData["Team_Name1"].ToString() + " ? - ? " + curData["Team_Name2"].ToString();
                    if (ThethaoController.GetDetail_YKCG_ByGameID(curData["PK_Game_ID"].ToString()).Rows.Count > 0)
                    {
                        //charing
                        //string content1 = cpid + "&" + Constant.thethao + "6" + curData["Sport_Id"].ToString() + "&" + tkprice + "&" + vmstransactionid;
                        //lnkThongke.NavigateUrl = ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content1, ConfigurationSettings.AppSettings.Get("vmskey")));
                        lnkThongke.NavigateUrl = "../ThongKe.aspx?id=" + curData["Sport_Id"].ToString() + "&lang=" + lang + "&w=" + width;
                    }
                    else
                    {
                        lnkThongke.Enabled = false;
                    }
                    //charing
                    DataTable tip = ThethaoController.GetDetail_Tip_ByGameID(curData["PK_Game_ID"].ToString());
                    if (tip.Rows.Count > 0)
                    {
                        //string content2 = cpid + "&" + Constant.thethao + "7" + curData["Sport_Id"].ToString() + "&" + tvprice + "&" + vmstransactionid;
                        //lnkTuVan.NavigateUrl = ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content2, ConfigurationSettings.AppSettings.Get("vmskey")));
                        lnkTuVan.NavigateUrl = "../TuVan.aspx?id=" + curData["Sport_Id"].ToString() + "&lang=" + lang + "&w=" + width;
                    }
                    else
                    {
                        lnkTuVan.Enabled = false;
                    }

                    //string content3 = cpid + "&" + Constant.thethao + "8" + curData["Sport_Id"].ToString() + "&" + kqcprice + "&" + vmstransactionid;
                    //lnkKQCho.NavigateUrl = ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content3, ConfigurationSettings.AppSettings.Get("vmskey")));

                    lnkKQCho.NavigateUrl = "../KQCho.aspx?id=" + curData["Sport_Id"].ToString() + "&lang=" + lang + "&w=" + width;
                }
                else
                {
                    ltrGame.Text       = curData["Team_Name1"].ToString() + " " + curData["Team1Score"].ToString() + " - " + curData["Team2Score"].ToString() + " " + curData["Team_Name2"].ToString();
                    lnkThongke.Enabled = false;
                    lnkTuVan.Enabled   = false;
                    lnkKQCho.Enabled   = false;
                }
                lnkTuVan.Text   = "Tư vấn";
                lnkThongke.Text = "Thống kê";
                lnkKQCho.Text   = "KQ chờ";
            }
            else
            {
                if (ConvertUtility.ToInt32(curData["Status"]) == 1)
                {
                    ltrGame.Text = UnicodeUtility.UnicodeToKoDau(curData["Team_Name1"].ToString()) + " ? - ? " + UnicodeUtility.UnicodeToKoDau(curData["Team_Name2"].ToString());

                    //charing
                    //string content1 = cpid + "&" + Constant.thethao + "6" + curData["Sport_Id"].ToString() + "&" + tkprice + "&" + vmstransactionid;
                    //lnkThongke.NavigateUrl = ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content1, ConfigurationSettings.AppSettings.Get("vmskey")));

                    //charing
                    DataTable tip = ThethaoController.GetDetail_Tip_ByGameID(curData["PK_Game_ID"].ToString());
                    if (tip.Rows.Count > 0)
                    {
                        //string content2 = cpid + "&" + Constant.thethao + "7" + curData["Sport_Id"].ToString() + "&" + tvprice + "&" + vmstransactionid;
                        //lnkTuVan.NavigateUrl = ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content2, ConfigurationSettings.AppSettings.Get("vmskey")));
                    }

                    //string content3 = cpid + "&" + Constant.thethao + "8" + curData["Sport_Id"].ToString() + "&" + kqcprice + "&" + vmstransactionid;
                    //lnkKQCho.NavigateUrl = ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content3, ConfigurationSettings.AppSettings.Get("vmskey")));
                    lnkThongke.NavigateUrl = UrlProcess.GetCompetitionThongKeUrl(lang.ToString(), width, curData["PK_Game_ID"].ToString());
                    lnkTuVan.NavigateUrl   = UrlProcess.GetCompetitionTuVanUrl(lang.ToString(), width, curData["PK_Game_ID"].ToString());
                    lnkKQCho.NavigateUrl   = UrlProcess.GetCompetitionKQChoUrl(lang.ToString(), width, curData["PK_Game_ID"].ToString());
                }
                else
                {
                    ltrGame.Text       = UnicodeUtility.UnicodeToKoDau(curData["Team_Name1"].ToString()) + " " + curData["Team1Score"].ToString() + " - " + curData["Team2Score"].ToString() + " " + UnicodeUtility.UnicodeToKoDau(curData["Team_Name2"].ToString());
                    lnkThongke.Enabled = false;
                    lnkTuVan.Enabled   = false;
                    lnkKQCho.Enabled   = false;
                }
            }
            ltrTime.Text = ConvertUtility.ToDateTime(curData["StartTime"]).ToString("dd/MM/yyyy HH:mm");
        }
示例#23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]).ToString();
            width = ConvertUtility.ToInt32(Request.QueryString["w"]).ToString();

            //lnkWap3g.NavigateUrl = UrlProcess.GetWapHomeUrlNew(lang, width);
            lnkWap3g.NavigateUrl = AppEnv.GetSetting("WapDefault");


            #region GET MSISDN

            if (Session["msisdn"] == null)
            {
                int    is3g    = 0;
                string msisdn1 = MobileUtils.GetMSISDN(out is3g);
                if (!string.IsNullOrEmpty(msisdn1) && MobileUtils.CheckOperator(msisdn1, "vietnammobile"))
                {
                    Session["telco"]  = Constant.T_Vietnamobile;
                    Session["msisdn"] = msisdn1;
                }
                else
                {
                    Session["msisdn"] = null;
                    Session["telco"]  = Constant.T_Undefined;
                }
            }

            #endregion


            //if (!IsPostBack)
            //{
            DataTable dtlatest = TintucController.GetTopNewsHasCache(ConvertUtility.ToInt32(System.Configuration.ConfigurationSettings.AppSettings.Get("vnm_zoneid")), 3);
            count = dtlatest.Rows.Count;
            rptHotnews.DataSource     = dtlatest;
            rptHotnews.ItemDataBound += new RepeaterItemEventHandler(rptHotnews_ItemDataBound);
            rptHotnews.DataBind();

            string msisdn = ConvertUtility.ToString(Session["msisdn"]);

            if (lang == "1")
            {
                if (string.IsNullOrEmpty(msisdn))
                {
                    ltrXinChao.Text = "Xin chào <span class=\"pink bold\">khách</span>";
                }
                else
                {
                    ltrXinChao.Text = "Xin chào thuê bao <span class=\"pink bold\">" + msisdn + "</span>";
                }
            }
            else
            {
                if (string.IsNullOrEmpty(msisdn))
                {
                    ltrXinChao.Text = "Xin chao <span class=\"pink bold\">khach</span>";
                }
                else
                {
                    ltrXinChao.Text = "Xin chao thue bao <span class=\"pink bold\">" + msisdn + "</span>";
                }
                lnkTrangChu.Text = "Trang chu";
                //lnkGame.Text = lnkGame.Text;
                lnkNhac.Text = "Nhac";
                //lnkKetQua.Text = "Hen ho";
            }

            lnkTrangChu.NavigateUrl = AppEnv.GetSetting("WapDefault");
            lnkGame.NavigateUrl     = "http://vmgame.vn/wap/home/s2register";
            lnkNhac.NavigateUrl     = UrlProcess.GetMusicHomeUrl(lang, width);
            //lnkKetQua.NavigateUrl = UrlProcess.GetSportHomeUrl(lang, "home", width);
            //lnkKetQua.NavigateUrl = "http://visport.vn/";

            string[] Kenh = Request.Url.AbsolutePath.Split(new Char[] { '/' });
            switch (Kenh[1].ToLower())
            {
            case "music":
                ddlDataType.SelectedIndex = 0;
                break;

            case "hinhnen":
                ddlDataType.SelectedIndex = 1;
                break;

            case "game":
                ddlDataType.SelectedIndex = 2;
                break;

            case "phanmem":
                ddlDataType.SelectedIndex = 3;
                break;

            case "video":
                ddlDataType.SelectedIndex = 4;
                break;
            }


            DataTable dtAdv = WapController.WapVnmGetAdvByPosId(ConvertUtility.ToInt32(AppEnv.GetSetting("WapVnm_Top")));
            if (dtAdv != null && dtAdv.Rows.Count > 0)
            {
                string url = AppEnv.GetSetting("urldata") + dtAdv.Rows[0]["Advertise_Path"];

                string str = "<a class=\"noelbanner\" href=\"" + dtAdv.Rows[0]["Advertise_RedirectUrl"] + "\">";


                if (AppEnv.isMobileBrowser())
                {
                    str += "<img width=\"" + "99%" + "\" height=\"" + dtAdv.Rows[0]["Advertise_Height"] + "\" src=\"" + url + "\" border=\"0\" /></a>";
                }
                else
                {
                    str += "<img width=\"" + dtAdv.Rows[0]["Advertise_Width"] + "\" height=\"" + dtAdv.Rows[0]["Advertise_Height"] + "\" src=\"" + url + "\" border=\"0\" /></a>";
                }

                litAdvTop.Text = str;
            }

            //}
        }
示例#24
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
            }
        }
示例#25
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.XoSoHome() + "\" >XỔ SỐ</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\" />";

                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 = 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;
                        }
                    }
                }
                //
                DataSet ds = XosoController.GetDetail_LotAndOtherLot(ConvertUtility.ToInt32(Detail.Rows[0]["lot_id"]), id, 6);
                rptOther.DataSource     = ds.Tables[1];
                rptOther.ItemDataBound += rptOther_ItemDataBound;;
                rptOther.DataBind();

                #endregion

                lblOther.Text = "XEM TIẾP";
            }
        }
示例#26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            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   = Session["telco"].ToString();
            linkStr = "<a href=\"../" + UrlProcess.GetGameHomeUrlNew(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\" />";

                DataTable dtDetail = GameController.GetGameDetailByID(Session["telco"].ToString(), id);
                if (ConfigurationSettings.AppSettings.Get("freecate").IndexOf("," + dtDetail.Rows[0]["W_GameCategoryID"].ToString() + ",") > -1 || (",1712,1713,").IndexOf("," + id.ToString() + ",") > -1)
                {
                    freecate = true;
                    HienThiNoiDung(true);
                    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":
                        WapXzone_VNM.Library.VNMCharging.VNMChargingGW charging = new WapXzone_VNM.Library.VNMCharging.VNMChargingGW();

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

                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN", price, "D", "JG", Request.QueryString["id"] + "|Game: " + dtDetail.Rows[0]["GameNameUnicode"]);

                        if (messageReturn == "1")
                        {    // Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false);
                        }
                        break;
                    }
                }
            }
        }
示例#27
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            if (totalrecord > 0 && pagesize > 0 && numberpage > 0)
            {
                totalpage = (int)Math.Ceiling((double)totalrecord / pagesize);
                int c    = (int)Math.Ceiling((double)curpage / numberpage);
                int from = (c - 1) * numberpage + 1;
                int to   = c * numberpage;
                if (to > totalpage)
                {
                    to = totalpage;
                }
                ArrayList x = new ArrayList();
                for (int i = from; i <= to; i++)
                {
                    x.Add(i);
                }
                rptPage.DataSource     = x;
                rptPage.ItemDataBound += rptPage_ItemDataBound;
                rptPage.DataBind();

                string   url    = Request.RawUrl;
                string[] arrUrl = url.Split('/');

                string name = arrUrl[2];

                int ct = (int)curpage / 5;
                if (1 < curpage)
                {
                    if (name == "ket-qua-thi-dau")
                    {
                        //lnkFirst.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), 1.ToString(), arrUrl[5].Replace(".aspx", ""));
                        lnkFirst.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), 1.ToString());

                        //lnkPrev.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), (curpage - 1).ToString(), arrUrl[5].Replace(".aspx", ""));
                        lnkPrev.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage - 1).ToString());
                    }
                    else
                    {
                        //lnkFirst.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), 1.ToString(), arrUrl[5].Replace(".aspx", ""));
                        lnkFirst.NavigateUrl = UrlProcess.TheThaoLichThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), 1.ToString());

                        //lnkPrev.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), (curpage - 1).ToString(), arrUrl[5].Replace(".aspx", ""));
                        lnkPrev.NavigateUrl = UrlProcess.TheThaoLichThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage - 1).ToString());
                    }
                }
                if (curpage < totalpage)
                {
                    if (name == "ket-qua-thi-dau")
                    {
                        //lnkLast.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), totalpage.ToString(), arrUrl[5].Replace(".aspx", ""));
                        lnkLast.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), totalpage.ToString());

                        //lnkNext.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), (curpage + 1).ToString(), arrUrl[5].Replace(".aspx", ""));
                        lnkNext.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage + 1).ToString());
                    }
                    else
                    {
                        //lnkFirst.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), 1.ToString(), arrUrl[5].Replace(".aspx", ""));
                        lnkFirst.NavigateUrl = UrlProcess.TheThaoLichThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), 1.ToString());

                        //lnkPrev.NavigateUrl = UrlProcess.TheThaoKetQuaThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), (curpage - 1).ToString(), arrUrl[5].Replace(".aspx", ""));
                        lnkPrev.NavigateUrl = UrlProcess.TheThaoLichThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage - 1).ToString());
                    }
                }
            }
            else
            {
                ltrNoData.Visible = true;
                lnkFirst.Visible  = lnkPrev.Visible = lnkLast.Visible = lnkNext.Visible = false;
                if (Request.QueryString["lang"] == "1")
                {
                    ltrNoData.Text = "Dữ liệu của mục này hiện đang được cập nhật.";
                }
            }
        }
示例#28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //preurl = ConfigurationSettings.AppSettings.Get("urldata");
            //price = ConfigurationSettings.AppSettings.Get("hoangdaoprice");
            type = ConvertUtility.ToInt32(Request.QueryString["catid"]);

            if (!Page.IsPostBack)
            {
                string title = HoangdaoController.CungHoangdao[type, 1].ToUpper() + " (" + HoangdaoController.CungHoangdao[type, 2] + ")";
                lblCatetoryName.Text = title;

                DateTime  vTime = DateTime.Now;
                DataTable dtDetail;

                //Link ngay
                string ngayThang;
                if (vTime.Day < 10)
                {
                    ngayThang = "0" + vTime.Day;
                }
                else
                {
                    ngayThang = vTime.Day.ToString();
                }
                if (vTime.Month < 10)
                {
                    ngayThang += "0" + vTime.Month;
                }
                else
                {
                    ngayThang += vTime.Month.ToString();
                }
                dtDetail = HoangdaoController.GetByTypeAndDateHasCache(type, ngayThang);
                if (dtDetail.Rows.Count > 0)
                {
                    if (dtDetail.Rows[0]["WapContent"].ToString() != "")
                    {
                        //linkNgay = UrlProcess.HoangDaoChiTiet(ConvertUtility.ToInt32(dtDetail.Rows[0]["ID"].ToString()), "ngay","1");
                        linkNgay = UrlProcess.HoangDaoDownload(ConvertUtility.ToInt32(dtDetail.Rows[0]["ID"].ToString()), "1");
                    }
                }

                //Link tuan
                int week = (int)((vTime.Day + 6) / 7);
                if (week == 5)
                {
                    week = 4;
                }
                dtDetail = HoangdaoController.GetByTypeAndMonthAndWeekHasCache(type, vTime.Month.ToString(), week.ToString());
                if (dtDetail.Rows.Count > 0)
                {
                    if (dtDetail.Rows[0]["WapContent"].ToString() != "")
                    {
                        //linkTuan = UrlProcess.HoangDaoChiTiet(ConvertUtility.ToInt32(dtDetail.Rows[0]["ID"].ToString()), "tuan","2");
                        linkTuan = UrlProcess.HoangDaoDownload(ConvertUtility.ToInt32(dtDetail.Rows[0]["ID"].ToString()), "2");
                    }
                }

                //Link thang
                dtDetail = HoangdaoController.GetByTypeAndMonthHasCache(type, vTime.Month.ToString());
                if (dtDetail.Rows.Count > 0)
                {
                    if (dtDetail.Rows[0]["WapContent"].ToString() != "")
                    {
                        //linkThang = UrlProcess.HoangDaoChiTiet(ConvertUtility.ToInt32(dtDetail.Rows[0]["ID"].ToString()), "thang","3");
                        linkThang = UrlProcess.HoangDaoDownload(ConvertUtility.ToInt32(dtDetail.Rows[0]["ID"].ToString()), "3");
                    }
                }
            }
        }
示例#29
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      = Session["telco"].ToString();
            linkStr    = "<a href=\"../" + UrlProcess.GetWallpaperHomeUrlNew(lang, width.ToString()).Replace("~/", "") + "\" >HÌNH NỀN<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetWallpaperHomeUrlNew(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\" />";

                DataTable dtDetail = HinhNenController.GetWallpaperDetailByID(Session["telco"].ToString(), 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":
                        WapXzone_VNM.Library.VNMCharging.VNMChargingGW charging = new WapXzone_VNM.Library.VNMCharging.VNMChargingGW();

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

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

                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "PICDOWN", "PIC_DOWN", price, "D", "WP", Request.QueryString["id"] + "Thu phap: " + dtDetail.Rows[0]["WTitle_Unicode"]);

                        if (messageReturn == "1")
                        {    // Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false);
                        }
                        break;
                    }
                }
            }
        }
示例#30
0
        protected void HienThiNoiDung(Boolean thuchien)
        {
            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();
                };

                string viewLink;

                if (!string.IsNullOrEmpty(dtDetail.Rows[0]["SmartPhonePath"].ToString()))
                {
                    viewLink = dtDetail.Rows[0]["SmartPhonePath"].ToString();
                }
                else
                {
                    viewLink = dtDetail.Rows[0]["VMobilePath"].ToString();
                }

                if (HttpContext.Current.Request.UserAgent != null)
                {
                    if (HttpContext.Current.Request.UserAgent.ToLower().Contains("safari"))
                    {
                        lnkDownload.NavigateUrl = ConfigurationSettings.AppSettings.Get("vnmviewIphone") + viewLink.Replace("~/", "/");
                    }
                    else
                    {
                        lnkDownload.NavigateUrl = UrlProcess.GetGameDownloadItem(Session["telco"].ToString(), "5", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));
                    }
                }
                else
                {
                    lnkDownload.NavigateUrl = UrlProcess.GetGameDownloadItem(Session["telco"].ToString(), "5", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));
                }

                bool log = true;
                if (ConvertUtility.ToString(Session["transactionid_detail"]) == chitietGiaodich)
                {
                    log = false;
                }
                Session["transactionid_detail"] = chitietGiaodich;
                if (log)
                {
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 5);
                }
            }
            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;
                }
                Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 5, messageReturn);
                //--Thông báo lỗi thanh toán
            }


            //log charging
            ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());

            logger.Info("Dich vu: Video - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["VTitle"].ToString() + " - id: " + id);
            logger.Info("Video Url:" + lnkDownload.NavigateUrl);
            string clientIP = HttpContext.Current.Request.UserHostAddress;

            if (Session["telco"].ToString() == Constant.T_Viettel)
            {
                clientIP = ConvertUtility.ToString(HttpContext.Current.Request.Headers.Get("VX-Forwarded-For"));
            }
            logger.Info("IP:" + clientIP);
            logger.Info("Current Url:" + Request.RawUrl);
            logger.Info("Header: " + Request.Headers.ToString());
            logger.Info("Current TransactionID: " + ConvertUtility.ToString(Session["transactionid"]));
            //end log
        }