Example #1
0
        protected void btnCo_Click(object sender, EventArgs e)
        {
            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", "dangkythethao");

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

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

                if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                {    // Thanh toán thành công >> trả nội dung
                    WapController.W4A_Subscriber_Insert(Session["msisdn"].ToString(), 2, 1, "wap4a");
                    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)
        {
            if (!Page.IsPostBack)
            {
                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 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=\"" + "150" + "\" src=\"" + url + "\" border=\"0\" /></a>";
                    }

                    litAdvTop.Text = str;
                }
            }
        }
        protected void rptLienket_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData  = (DataRowView)e.Item.DataItem;
            Literal     ltrNhom  = (Literal)e.Item.FindControl("ltrNhom");
            Repeater    rptDonvi = (Repeater)e.Item.FindControl("rptDonvi");

            //
            if (lang == "1")
            {
                ltrNhom.Text = curData["WAP_CategoryTitleUnicode"].ToString().ToUpper();
            }
            else
            {
                ltrNhom.Text = curData["WAP_CategoryTitle"].ToString().ToUpper();
            }
            //
            DataTable cpConfig = WapController.CPConfig_GetByWap_IDHasCache((int)curData["WAP_ID"]);

            count = cpConfig.Rows.Count - 1;
            rptDonvi.DataSource     = cpConfig;
            rptDonvi.ItemDataBound += new RepeaterItemEventHandler(rptDonvi_ItemDataBound);
            rptDonvi.DataBind();
        }
        protected void btnCo_Click(object sender, EventArgs e)
        {
            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", "RELAX", "dangkydoctruyen");
                //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "RELAXSTORYMONTHLY", "READ_MONTHLY");

                messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "RELAXSTORYMONTHLY", "READ_MONTHLY", price, "D", "RELAX", "dangkydoctruyen");

                if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                {
                    WapController.W4A_Subscriber_Insert(Session["msisdn"].ToString(), 1, 30, "wap4a");
                    // 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;
            }
        }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]);
                width = Request.QueryString["w"];

                DataTable cpConfig = WapController.Setting_Category_GetAllByParentIDHasCache(32, 74); //39, 90);//
                if (cpConfig != null && cpConfig.Rows.Count > 0)
                {
                    for (int i = 0; i < cpConfig.Rows.Count; i++)
                    {
                        if ((int)cpConfig.Rows[i]["WAP_ID"] == 33)
                        {
                            cpConfig.Rows[i]["WAP_ID"] = 40;
                            cpConfig.AcceptChanges();
                            break;
                        }
                    }
                }
                rptLienket.DataSource     = cpConfig;
                rptLienket.ItemDataBound += rptLienket_ItemDataBound;
                rptLienket.DataBind();
                //end of lienket
            }
        }
        protected void rptLienket_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData  = (DataRowView)e.Item.DataItem;
            Literal     ltrNhom  = (Literal)e.Item.FindControl("ltrNhom");
            Literal     ltrDonvi = (Literal)e.Item.FindControl("ltrDonvi");
            //
            DataTable cpConfig = WapController.CPConfig_GetByWap_IDHasCache((int)curData["WAP_ID"]);
            int       i        = 0;

            if (lang == "1")
            {
                ltrNhom.Text = curData["WAP_CategoryTitleUnicode"].ToString() + ": ";
                foreach (DataRow rCP in cpConfig.Rows)
                {
                    //ltrDonvi.Text += "<a href=\"" + rCP["CP_Url"] + "&lang=" + lang + "&w=" + width + "\" >" + rCP["CP_CategoryUnicode"] + "</a>, ";

                    if (rCP["CP_Url"].ToString().Contains("Default.aspx"))
                    {
                        ltrDonvi.Text += "<a href=\"" + rCP["CP_Url"] + "&lang=" + lang + "&w=" + width + "\" >" + rCP["CP_CategoryUnicode"] + "</a>, ";
                    }
                    else
                    {
                        ltrDonvi.Text += "<a href=\"" + rCP["CP_Url"] + "\" >" + rCP["CP_CategoryUnicode"] + "</a>, ";
                    }

                    i += 1;
                    if (i == 2)
                    {
                        ltrDonvi.Text += "...";
                        break;
                    }
                }
            }
            else
            {
                ltrNhom.Text = curData["WAP_CategoryTitle"].ToString();
                foreach (DataRow rCP in cpConfig.Rows)
                {
                    if (rCP["CP_Url"].ToString().Contains("Default.aspx"))
                    {
                        ltrDonvi.Text += " - <a href=\"" + rCP["CP_Url"] + "&lang=" + lang + "&w=" + width + "\" >" + rCP["CP_Category"] + "</a>, ";
                    }
                    else
                    {
                        ltrDonvi.Text += " - <a href=\"" + rCP["CP_Url"] + "\" >" + rCP["CP_Category"] + "</a>, ";
                    }

                    i += 1;
                    if (i == 2)
                    {
                        ltrDonvi.Text += "...";
                        break;
                    }
                }
            }
        }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]).ToString();
            width = Request.QueryString["w"];
            DataTable cpConfig = WapController.Setting_Category_GetAllByParentIDHasCache(0, 74);

            if (lang == "1")
            {
                lnkTrangChu.Text = Resources.Resource.wTrangChu;
            }
            else
            {
                lnkTrangChu.Text = Resources.Resource.wTrangChu_KD;
            }
            lnkTrangChu.NavigateUrl = UrlProcess.GetWapHomeUrlNew(lang, width);

            DataTable dt = WapController.CPConfig_GetByWap_IDHasCache((int)cpConfig.Rows[0]["WAP_ID"]);

            if (dt.Rows.Count > 0)
            {
                rptTruyCapNhanh.DataSource     = dt;
                rptTruyCapNhanh.ItemDataBound += rptTruyCapNhanh_ItemDataBound;
                rptTruyCapNhanh.DataBind();
            }
        }
        protected void rptLienket_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData  = (DataRowView)e.Item.DataItem;
            Literal     ltrNhom  = (Literal)e.Item.FindControl("ltrNhom");
            Literal     ltrDonvi = (Literal)e.Item.FindControl("ltrDonvi");
            //
            DataTable cpConfig = WapController.CPConfig_GetByWap_IDHasCache((int)curData["WAP_ID"]);

            if (lang == "1")
            {
                ltrNhom.Text = curData["WAP_CategoryTitleUnicode"].ToString().ToUpper();
                foreach (DataRow rCP in cpConfig.Rows)
                {
                    if (rCP["CP_Url"].ToString().Contains("Default.aspx"))
                    {
                        ltrDonvi.Text += " - <a href=\"" + rCP["CP_Url"] + "&lang=" + lang + "&w=" + width + "\" >" + rCP["CP_CategoryUnicode"] + "</a>";
                    }
                    else
                    {
                        ltrDonvi.Text += " - <a href=\"" + rCP["CP_Url"] + "\" >" + rCP["CP_CategoryUnicode"] + "</a>";
                    }
                }
            }
            else
            {
                ltrNhom.Text = curData["WAP_CategoryTitle"].ToString().ToUpper();
                foreach (DataRow rCP in cpConfig.Rows)
                {
                    ltrDonvi.Text += " - <a href=\"" + rCP["CP_Url"] + "&lang=" + lang + "&w=" + width + "\" >" + rCP["CP_Category"] + "</a>";
                }
            }
            if (curData["WAP_CategoryDes"].ToString() != "")
            {
                string lnkExt;
                if (curData["WAP_CategoryDes"].ToString().IndexOf("?") > 0)
                {
                    lnkExt = "&lang=" + lang + "&w=" + width;
                }
                else
                {
                    if (curData["WAP_CategoryDes"].ToString().Contains("Default.aspx"))
                    {
                        lnkExt = "?lang=" + lang + "&w=" + width;
                    }
                    else
                    {
                        lnkExt = string.Empty;
                    }
                }

                ltrNhom.Text = "<a href=\"" + curData["WAP_CategoryDes"] + lnkExt + "\"><span class=\"link-non-orange-bold\">" + ltrNhom.Text + "</span><a/>";
            }
        }
Example #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable cpConfig = WapController.CPConfig_GetByWap_IDHasCache(38);

                rptDichVu.DataSource = cpConfig;
                rptDichVu.DataBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                width = Request.QueryString["w"];
                lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]);
                if (lang == 1)
                {
                    lblTitle.Text = "THƯ GIÃN";
                    //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia + "Truyện cười " + ConfigurationSettings.AppSettings.Get("relaxprice") + Resources.Resource.wDonViTien + ", Sex và cuộc sống " + ConfigurationSettings.AppSettings.Get("relaxsexprice") + Resources.Resource.wDonViTien + ", Gửi lời yêu thương, Cẩm năng tư vấn " + ConfigurationSettings.AppSettings.Get("relaxtuvanprice") + Resources.Resource.wDonViTien + ")";
                }
                else
                {
                    lblTitle.Text = "THU GIAN";
                    //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia + "Truyen cuoi " + ConfigurationSettings.AppSettings.Get("relaxprice") + Resources.Resource.wDonViTien + ", Sex va cuoc song " + ConfigurationSettings.AppSettings.Get("relaxsexprice") + Resources.Resource.wDonViTien + ", Gui loi yeu thuong, Cam nang tu van " + ConfigurationSettings.AppSettings.Get("relaxtuvanprice") + Resources.Resource.wDonViTien + ")";
                }
                //   //Sửa bỏi Bình Trần - 25/11/2016
                DataTable tbThueBao = WapController.W4A_Subscriber_GetInfo(ConvertUtility.ToString(Session["msisdn"]), 1);
                if (tbThueBao.Rows.Count > 0)
                {
                    // lnkDangKy.NavigateUrl = string.Empty;
                    if (lang == 1)
                    {
                        ltrDangKy.Text = "Thuê bao đọc truyện";
                        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 doc truyen";
                        lnkDangKy.Text = "Han su dung toi " + ConvertUtility.ToDateTime(tbThueBao.Rows[0]["ExpiredDate"]).ToString("dd/MM/yyyy HH:mm");
                    }
                }
                else
                {
                    // lnkDangKy.NavigateUrl = "../DangKy.aspx?lang=" + lang.ToString() + "&w=" + width;
                    if (lang == 1)
                    {
                        ltrDangKy.Text = "Đăng ký gói 30 ngày đọc truyện “tẹt ga”. Giá: " + ConfigurationSettings.AppSettings.Get("relaxtruyenprice") + Resources.Resource.wDonViTien + "/tháng";
                        // ltrDK.Text = "» Đăng ký «";
                    }
                    else
                    {
                        ltrDangKy.Text = "Dang ky goi 30 ngay doc truyen “tet ga”. Gia: " + ConfigurationSettings.AppSettings.Get("relaxtruyenprice") + Resources.Resource.wDonViTien_KD + "/thang";
                        //  ltrDK.Text = "» Dang ky «";
                    }
                }
            }


            //lastest News
            //DataTable dtlatest = TintucController.GetTopNewsHasCache(ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("relax_zoneiddefaut")), 6);
            //rptlastest.DataSource = dtlatest;
            //rptlastest.ItemDataBound += new RepeaterItemEventHandler(rptlastest_ItemDataBound);
            //rptlastest.DataBind();
        }
Example #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Session["msisdn"] == null)
                {
                    int    is3g   = 0;
                    string msisdn = MobileUtils.GetMSISDN(out is3g);
                    if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
                    {
                        Session["telco"]  = Constant.T_Vietnamobile;
                        Session["msisdn"] = msisdn;
                        ltrXinChao.Text   = msisdn;
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                        ltrXinChao.Text   = "Khách";
                    }
                }
                else
                {
                    ltrXinChao.Text = Session["msisdn"].ToString();
                }


                DataTable dtlatest = TintucController.GetTopNewsHasCache(ConvertUtility.ToInt32(System.Configuration.ConfigurationSettings.AppSettings.Get("vnm_zoneid")), 3);
                count = dtlatest.Rows.Count;
                rptHotNews.DataSource     = dtlatest;
                rptHotNews.ItemDataBound += rptHotnews_ItemDataBound;
                rptHotNews.DataBind();

                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;
                }
            }
        }
Example #12
0
        protected void btnReg_Click(object sender, EventArgs e)
        {
            pnlNoiDung.Visible = true;
            int id = ConvertUtility.ToInt32(Request.QueryString["id"]);

            if (id > 0)
            {
                DataTable tblServices = WapController.S2_94xGetServiceInfo(id);
                if (tblServices == null || tblServices.Rows.Count < 1)
                {
                    return;
                }
                if (tblServices.Rows[0]["status"].ToString() != "3")
                {
                    return;
                }


                string dangkyThanhCong = string.Empty;
                string doubleDangKy    = string.Empty;
                string tenDichVu       = string.Empty;

                string regisSystax = tblServices.Rows[0]["Register_Syntax"].ToString().Split('|')[0];

                if (Session["msisdn"] != null && Session["msisdn"].ToString() != "")
                {
                    ltrTieuDe.Text  = "Đăng ký " + tblServices.Rows[0]["Product_Name"].ToString();
                    tenDichVu       = tblServices.Rows[0]["Product_Name"].ToString();
                    dangkyThanhCong = tblServices.Rows[0]["Right_Syntax_MT"].ToString();
                    doubleDangKy    = tblServices.Rows[0]["Double_Register_MT"].ToString();
                    string result = AppEnv.RegisterService(AppEnv.GetSetting("S2ShortCode"), "0", Session["msisdn"].ToString(), "DK", regisSystax);//Andy Service S2_94x

                    string[] arrResult = result.Split('|');

                    if (arrResult[0] == "1")//DK THANH CONG
                    {
                        ltrNoiDung.Text = dangkyThanhCong;
                    }
                    else if (arrResult[0] == "0")//DOUBE DK
                    {
                        ltrNoiDung.Text = doubleDangKy;
                    }
                    else if (arrResult[0] == "-1")//DK THAT BAI - SAI CU PHAP
                    {
                        ltrNoiDung.Text = "Đăng ký không thành công. Vui lòng thử lại <br /> Hoặc soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                    }
                }
                else
                {
                    ltrNoiDung.Text = "Hệ thống không xác định được số điện thoại của bạn <br /> Vui lòng truy cập bằng 3G/GPRS <br /> Hoặc soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                }
            }
        }
Example #13
0
 protected void rptDetail_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "download")
     {
         string msisdn = Session["msisdn"].ToString();
         if (!string.IsNullOrEmpty(msisdn))
         {
             string uniqueID = WapController.UnixTimeStampUTC().ToString();
             WapController.WapRegisterConfirm_Insert(uniqueID, msisdn, 4, 0, "Game", "Game");
         }
         Response.Redirect("http://wap.vietnamobile.com.vn");
     }
 }
Example #14
0
 protected void btnTim_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txtSdt.Text))
     {
         string userId = txtSdt.Text.Trim();
         //userId = userId.Replace(userId.Substring(0,1), "84");
         DataTable dtUser = WapController.BigPromotionGetCode(userId);
         if (dtUser != null && dtUser.Rows.Count > 0)
         {
             rptCode.DataSource = dtUser;
             rptCode.DataBind();
         }
     }
 }
Example #15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         width = Request.QueryString["w"];
         lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]);
         if (lang == 1)
         {
             lblTitle.Text = "THƯ GIÃN";
             ltrGia.Text   = "(" + Resources.Resource.wThongBaoGia + "Truyện cười " + ConfigurationSettings.AppSettings.Get("relaxprice") + Resources.Resource.wDonViTien + ", Sex và cuộc sống " + ConfigurationSettings.AppSettings.Get("relaxsexprice") + Resources.Resource.wDonViTien + ", Gửi lời yêu thương, Cẩm năng tư vấn " + ConfigurationSettings.AppSettings.Get("relaxtuvanprice") + Resources.Resource.wDonViTien + ")";
         }
         else
         {
             lblTitle.Text = "THU GIAN";
             ltrGia.Text   = "(" + Resources.Resource.wThongBaoGia + "Truyen cuoi " + ConfigurationSettings.AppSettings.Get("relaxprice") + Resources.Resource.wDonViTien + ", Sex va cuoc song " + ConfigurationSettings.AppSettings.Get("relaxsexprice") + Resources.Resource.wDonViTien + ", Gui loi yeu thuong, Cam nang tu van " + ConfigurationSettings.AppSettings.Get("relaxtuvanprice") + Resources.Resource.wDonViTien + ")";
         }
         //
         DataTable tbThueBao = WapController.W4A_Subscriber_GetInfo(ConvertUtility.ToString(Session["msisdn"]), 1);
         if (tbThueBao.Rows.Count > 0)
         {
             lnkDangKy.NavigateUrl = string.Empty;
             if (lang == 1)
             {
                 ltrDangKy.Text = "Thuê bao đọc truyện";
                 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 doc truyen";
                 lnkDangKy.Text = "Han su dung toi " + ConvertUtility.ToDateTime(tbThueBao.Rows[0]["ExpiredDate"]).ToString("dd/MM/yyyy HH:mm");
             }
         }
         else
         {
             lnkDangKy.NavigateUrl = "../DangKyNew.aspx?lang=" + lang + "&w=" + width;
             if (lang == 1)
             {
                 ltrDangKy.Text = "Đăng ký gói 30 ngày đọc truyện “tẹt ga”. Giá: " + ConfigurationSettings.AppSettings.Get("relaxtruyenprice") + Resources.Resource.wDonViTien + "/tháng";
                 lnkDangKy.Text = "Đăng ký";
             }
             else
             {
                 ltrDangKy.Text = "Dang ky goi 30 ngay doc truyen “tet ga”. Gia: " + ConfigurationSettings.AppSettings.Get("relaxtruyenprice") + Resources.Resource.wDonViTien_KD + "/thang";
                 lnkDangKy.Text = "Dang ky";
             }
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lang  = Request.QueryString["lang"];
                width = Request.QueryString["w"];
                if (width == "0")
                {
                    width = Constant.DefaultScreen.Standard.ToString();
                }

                DataTable cpConfig = WapController.Setting_Category_GetAllByParentIDHasCache(2, 90);
                rptLienket.DataSource     = cpConfig;
                rptLienket.ItemDataBound += new RepeaterItemEventHandler(rptLienket_ItemDataBound);
                rptLienket.DataBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lang  = Request.QueryString["lang"];
                width = Request.QueryString["w"];

                DataTable cpConfig = WapController.Setting_Category_GetAllByParentIDHasCache(2, 90);//25, 74);
                rptLienket.DataSource     = cpConfig;
                rptLienket.ItemDataBound += new RepeaterItemEventHandler(rptLienket_ItemDataBound);
                rptLienket.DataBind();
                //end of lienket
            }
            if (lang == "1")
            {
                lnkLienket.Text = "LIÊN KẾT";
            }
            lnkLienket.NavigateUrl = UrlProcess.GetVNMLienket(lang, width, "lk");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lang  = Request.QueryString["lang"];
                width = Request.QueryString["w"];

                DataTable cpConfig = WapController.Setting_Category_GetAllByParentIDHasCache(32, 74);//39, 90);//
                //if (cpConfig != null && cpConfig.Rows.Count > 0)
                //{
                //    for (int i = 0; i < cpConfig.Rows.Count; i++)
                //    {
                //        if ((int)cpConfig.Rows[i]["WAP_ID"] == 33)
                //        {
                //            cpConfig.Rows[i]["WAP_ID"] = 40;
                //            cpConfig.AcceptChanges();
                //            break;
                //        }
                //    }
                //}
                rptLienket.DataSource     = cpConfig;
                rptLienket.ItemDataBound += rptLienket_ItemDataBound;
                rptLienket.DataBind();
                //end of lienket

                int       totalrecord1;
                DataTable dtTinTongHop = WapXzone_VNM.Library.Component.Tintuc.TintucController.GetAllNewsByCategory(ConvertUtility.ToInt32(System.Configuration.ConfigurationSettings.AppSettings.Get("tintonghop")), 1, 1, out totalrecord1);
                if (dtTinTongHop.Rows.Count > 0)
                {
                    if (lang == "1")
                    {
                        ltrNhom.Text  = "<a href=\"" + "../" + UrlProcess.GetNewsCategoryUrl(lang.ToString(), width, System.Configuration.ConfigurationSettings.AppSettings.Get("tintonghop")).Replace("~/", "") + "\" >HOTNEWS</a>";
                        ltrDonvi.Text = " - <a href=\"" + "../" + UrlProcess.GetNewsDetailUrl(lang.ToString(), "detail", width, dtTinTongHop.Rows[0]["Distribution_ID"].ToString()).Replace("~/", "") + "\" >" + dtTinTongHop.Rows[0]["Content_Headline"].ToString() + "</a>";;
                    }
                    else
                    {
                        ltrNhom.Text  = "<a href=\"" + "../" + UrlProcess.GetNewsCategoryUrl(lang.ToString(), width, System.Configuration.ConfigurationSettings.AppSettings.Get("tintonghop")).Replace("~/", "") + "\" >HOTNEWS</a>";
                        ltrDonvi.Text = " - <a href=\"" + "../" + UrlProcess.GetNewsDetailUrl(lang.ToString(), "detail", width, dtTinTongHop.Rows[0]["Distribution_ID"].ToString()).Replace("~/", "") + "\" >" + dtTinTongHop.Rows[0]["Content_HeadlineKD"].ToString() + "</a>";;
                    }
                }
            }
            lnkLienket.NavigateUrl = "";//UrlProcess.GetVNMHomeUrl(lang, width, "links");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lang  = Request.QueryString["lang"];
                width = Request.QueryString["w"];
                if (width == "0")
                {
                    width = Constant.DefaultScreen.Standard.ToString();
                }

                DataTable cpConfig = WapController.CPConfig_GetByWap_IDHasCache(38);
                rptDichvu.DataSource     = cpConfig;
                rptDichvu.ItemDataBound += new RepeaterItemEventHandler(rptDichvu_ItemDataBound);
                rptDichvu.DataBind();
            }
            if (lang == "1")
            {
                ltrDichVu.Text = "DỊCH VỤ VIETNAMOBILE";
            }
        }
Example #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                lang  = Request.QueryString["lang"];
                width = Request.QueryString["w"];

                var advertisement1 = new Advertisement {
                    Channel = "Home", Position = "UnderLinks", Param = 0, Lang = lang, Width = width.ToString()
                };
                litAds1.Text = advertisement1.GetAds();

                DataTable cpConfig = WapController.Setting_Category_GetAllByParentIDHasCache(2, 90);//25, 74);
                if (cpConfig != null && cpConfig.Rows.Count > 0)
                {
                    rptLienKet.DataSource     = cpConfig;
                    rptLienKet.ItemDataBound += rptLienket_ItemDataBound;
                    rptLienKet.DataBind();
                }
            }
        }
Example #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]).ToString();
            width = Request.QueryString["w"];
            DataTable cpConfig = WapController.Setting_Category_GetAllByParentIDHasCache(0, 74);

            if (lang == "1")
            {
                ltrNhom.Text     = cpConfig.Rows[0]["WAP_CategoryTitleUnicode"].ToString();
                lnkTrangChu.Text = "<span class=\"pink bold\">" + Resources.Resource.wTrangChu + "</span>";
            }
            else
            {
                ltrNhom.Text     = cpConfig.Rows[0]["WAP_CategoryTitle"].ToString();
                lnkTrangChu.Text = "<span class=\"pink bold\">" + Resources.Resource.wTrangChu_KD + "</span>";
            }
            lnkTrangChu.NavigateUrl = UrlProcess.GetWapHomeUrl(lang, width);
            //
            rptLienket.DataSource     = WapController.CPConfig_GetByWap_IDHasCache((int)cpConfig.Rows[0]["WAP_ID"]);
            rptLienket.ItemDataBound += new RepeaterItemEventHandler(rptLienket_ItemDataBound);
            rptLienket.DataBind();
        }
Example #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]).ToString();
            width = Request.QueryString["w"];
            DataTable cpConfig = WapController.Setting_Category_GetAllByParentIDHasCache(0, 74);

            if (cpConfig != null && cpConfig.Rows.Count > 3)
            {
                if (lang == "1")
                {
                    ltrNhom.Text = cpConfig.Rows[3]["WAP_CategoryTitleUnicode"].ToString();
                }
                else
                {
                    ltrNhom.Text = cpConfig.Rows[3]["WAP_CategoryTitle"].ToString();
                }
                //
                rptLienket.DataSource     = WapController.CPConfig_GetByWap_IDHasCache((int)cpConfig.Rows[3]["WAP_ID"]);
                rptLienket.ItemDataBound += new RepeaterItemEventHandler(rptLienket_ItemDataBound);
                rptLienket.DataBind();
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         if (Session["MaiTho"] != null)
         {
             pnlThongBao.Visible = true;
             litThongBao.Text    = "Quý khách được hưởng khuyến mãi MIỄN PHÍ 100 ĐIỂM cho chương trình 'Anh tài bóng đá' khi truy cập vào wap Vietnamobile.<br /><br />Để xem thông tin dịch vụ vui lòng truy cập: <a href='http://visport.vn'>http://visport.vn</a> <br /><br />Để hủy dịch vụ vui lòng soạn HUY BD gửi 979. Chân thành cảm ơn";
             Session["MaiTho"]   = null;
         }
         else if (Session["VmGame"] != null)
         {
             pnlThongBao.Visible = true;
             litThongBao.Text    = "Dịch vụ Game tặng bạn tải game MIỄN PHÍ.<br /> Hàng tuần bạn sẽ nhận được game vào thứ 3,6.<br />Link tải game miễn phí: http://vmgame.vn/wap/home/s2register <br />Để hủy dịch vụ, soạn tin: HUY gửi 2288";
             Session["VmGame"]   = null;
         }
         else if (Session["VClip"] != null)
         {
             pnlThongBao.Visible = true;
             litThongBao.Text    = "Dịch vụ DV VMclip của Vietnamobile tặng bạn MIỄN PHÍ 3 ngày sử dụng dịch vụ.<br /> Truy cập ngay: http://kho-clip.com/ để sử dụng dịch vụ<br /> Để hủy dịch vụ, soạn CLIP OFF gửi 949. HT 19001255";
             Session["VClip"]    = null;
         }
         else
         {
             if (Session["S2_94x"] != null)
             {
                 string    message = Session["S2_94x"].ToString();
                 DataTable dt      = WapController.VnmS294XConfigGetInfo(message);
                 if (dt != null && dt.Rows.Count > 0)
                 {
                     pnlThongBao.Visible = true;
                     litThongBao.Text    = dt.Rows[0]["Definition_Description"].ToString();
                     Session["S2_94x"]   = null;
                 }
             }
         }
     }
 }
Example #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = ConfigurationSettings.AppSettings.Get("goldprice");

            telCo = AppEnv.CheckFreeContentTelco();

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

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

                #region Free Content

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

                #endregion

                #region OLD

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

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

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

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

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

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

                #endregion
            }
        }
Example #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string Telco   = "Other";
            int    IsWifi  = 1;
            string user_id = "khach";

            if (!Page.IsPostBack)
            {
                if (AppEnv.GetSetting("TestFlag") == "1")
                {
                    Session["telco"] = Constant.T_Vietnamobile;
                    //Session["msisdn"] = "0987765522";
                }
                //Session["msisdn"] = "841866728649";
                if (Session["msisdn"] == null)
                {
                    int    is3g   = 0;
                    string msisdn = MobileUtils.GetMSISDN(out is3g);
                    if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
                    {
                        Session["telco"]  = Constant.T_Vietnamobile;
                        Session["msisdn"] = msisdn;
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                    }
                }

                pnlNoiDung.Visible = true;

                int id = ConvertUtility.ToInt32(Request.QueryString["id"]);
                if (id > 0)
                {
                    DataTable tblServices = WapController.S2_94xGetServiceInfo(id);
                    if (tblServices == null || tblServices.Rows.Count < 1)
                    {
                        return;
                    }
                    //if (tblServices.Rows[0]["status"].ToString() != "3")
                    //{
                    //    return;
                    //}


                    string dangkyThanhCong = string.Empty;
                    string doubleDangKy    = string.Empty;
                    string tenDichVu       = string.Empty;

                    string regisSystax = tblServices.Rows[0]["Register_Syntax"].ToString().Split('|')[0];

                    if (Session["msisdn"] != null && Session["msisdn"].ToString() != "")
                    {
                        Telco   = "VNM";
                        IsWifi  = 0;
                        user_id = Session["msisdn"].ToString();

                        ltrTieuDe.Text  = "Đăng ký " + tblServices.Rows[0]["Product_Name"].ToString();
                        tenDichVu       = tblServices.Rows[0]["Product_Name"].ToString();
                        lblTen1.Text    = tenDichVu;
                        dangkyThanhCong = tblServices.Rows[0]["Right_Syntax_MT"].ToString();
                        doubleDangKy    = tblServices.Rows[0]["Double_Register_MT"].ToString();
                        if (AppEnv.GetSetting("DK1chamVNMtest").ToString() == "1")
                        {
                            pnlConfirm.Visible = false;
                            string result = AppEnv.RegisterService(AppEnv.GetSetting("S2ShortCode"), "0", Session["msisdn"].ToString(), "DK", regisSystax);//Andy Service S2_94x

                            string[] arrResult = result.Split('|');

                            if (arrResult[0] == "1")//DK THANH CONG
                            {
                                ltrNoiDung.Text = dangkyThanhCong;
                            }
                            else if (arrResult[0] == "0")//DOUBE DK
                            {
                                ltrNoiDung.Text = doubleDangKy;
                            }
                            else if (arrResult[0] == "-1")//DK THAT BAI - SAI CU PHAP
                            {
                                ltrNoiDung.Text = "Đăng ký không thành công. Vui lòng thử lại <br /> Hoặc soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                            }
                        }
                        else
                        {
                            pnlConfirm.Visible = true;
                        }
                    }
                    else
                    {
                        Response.Redirect("http://wap.vietnamobile.com.vn/tin-tuc.aspx");
                        //ltrNoiDung.Text = "Hệ thống không xác định được số điện thoại của bạn <br /> Vui lòng truy cập bằng 3G/GPRS <br /> Hoặc soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                        //ltrNoiDung.Text = "<font size=3> Để đăng ký dịch vụ " + tblServices.Rows[0]["Service_Name"].ToString() + " của Vietnamobile, Quý Khách vui lòng soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b></font>";
                        //if (id == 800 || id == 812||id==813)
                        //{
                        //    Response.Redirect("/Video/Default.aspx?lang=1&display=home&w=320");
                        //}
                        //else
                        //{
                        //    ltrNoiDung.Text = "<font size=3> Để đăng ký dịch vụ " + tblServices.Rows[0]["Service_Name"].ToString() + " của Vietnamobile, Quý Khách vui lòng soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b></font>";
                        //}
                    }
                    #region Device_Log
                    try
                    {
                        if (Application["wurflFileProcessor"] == null)
                        {
                            string s_path = HttpContext.Current.Request.MapPath("..\\WURFL_Data\\wurfl.xml");
                            Application["wurflFileProcessor"] = new wurflApi.deviceFileProcessor(s_path);
                        }
                        wurflApi.deviceFileProcessor o_deviceFileProcessor = (Application["wurflFileProcessor"] as wurflApi.deviceFileProcessor);
                        // prepare capability getter
                        wurflApi.capabilitiesGetter o_capabilityGetter = new wurflApi.capabilitiesGetter(ref o_deviceFileProcessor);
                        o_capabilityGetter.prepareNavigatorModelCapabilities(Request);
                        User_AgentInfo _info = new User_AgentInfo();
                        _info.device_os         = o_capabilityGetter.getCapability("device_os");
                        _info.mobile_browser    = o_capabilityGetter.getCapability("mobile_browser");
                        _info.resolution_width  = o_capabilityGetter.getCapability("resolution_width");
                        _info.resolution_height = o_capabilityGetter.getCapability("resolution_height");
                        _info.model_name        = o_capabilityGetter.getCapability("model_name");
                        _info.brand_name        = o_capabilityGetter.getCapability("brand_name");
                        //WapController.VmgAds94x_Log_Insert(HttpContext.Current.Request.UserAgent, _info.model_name, _info.brand_name, _info.device_os, _info.mobile_browser, _info.resolution_width, _info.resolution_height, Telco, IsWifi, 1, Request.Url.AbsoluteUri, id.ToString(), HttpContext.Current.Request.UserHostAddress, "0", "MSISDN", Session["msisdn"].ToString(), "Request", 1, id);
                        WapController.VmgAds94x_Log_Insert(HttpContext.Current.Request.UserAgent, _info.model_name, _info.brand_name, _info.device_os, _info.mobile_browser, _info.resolution_width, _info.resolution_height, Telco, IsWifi, 1, Request.Url.AbsoluteUri, id.ToString(), HttpContext.Current.Request.UserHostAddress, "0", "MSISDN", user_id, "Request", 1, id);
                    }
                    catch (Exception ex)
                    {
                    }
                    #endregion
                }
                else

                {
                    Response.Redirect("http://wap.vietnamobile.com.vn/Wap/Default.aspx?lang=1&w=320");
                }
            }
        }
Example #26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = AppEnv.GetSetting("relaxprice");
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            DataTable dtDetail = TintucController.GetNewsDetailHasCache(id);

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

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

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

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

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

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

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

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

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

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

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

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

                #region Free Content

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

                #endregion

                #region OLD

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

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

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

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

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

                #endregion
            }
        }
Example #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (AppEnv.GetSetting("TestFlag") == "1")
                {
                    Session["telco"]  = Constant.T_Vietnamobile;
                    Session["msisdn"] = "0987765522";
                }

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

                pnlNoiDung.Visible = true;

                int id = ConvertUtility.ToInt32(Request.QueryString["id"]);
                //int id = 20;
                if (id > 0)
                {
                    DataTable tblServices = WapController.S2_1119GetServiceInfo(id);
                    if (tblServices == null || tblServices.Rows.Count < 1)
                    {
                        return;
                    }
                    if (tblServices.Rows[0]["status"].ToString() != "1")
                    {
                        return;
                    }


                    string dangkyThanhCong = string.Empty;
                    string doubleDangKy    = string.Empty;
                    string tenDichVu       = string.Empty;

                    string regisSystax = tblServices.Rows[0]["SubscriptionKeyword"].ToString().Split('|')[0];

                    if (Session["msisdn"] != null && Session["msisdn"].ToString() != "")
                    {
                        ltrTieuDe.Text  = "Đăng ký " + tblServices.Rows[0]["ProductName"].ToString();
                        tenDichVu       = tblServices.Rows[0]["ProductName"].ToString();
                        dangkyThanhCong = tblServices.Rows[0]["SubscriptionMessage"].ToString();
                        doubleDangKy    = tblServices.Rows[0]["DuplicationSubsMessage"].ToString();

                        string result = AppEnv.RegisterService1119(AppEnv.GetSetting("S2ShortCode1119"), "0", Session["msisdn"].ToString(), "DK", regisSystax);//Andy Service S2_94x

                        string[] arrResult = result.Split('|');

                        if (arrResult[0] == "1")//DK THANH CONG
                        {
                            ltrNoiDung.Text = dangkyThanhCong;
                        }
                        else if (arrResult[0] == "0")//DOUBE DK
                        {
                            ltrNoiDung.Text = doubleDangKy;
                        }
                        else if (arrResult[0] == "-1")//DK THAT BAI - SAI CU PHAP
                        {
                            ltrNoiDung.Text = "Đăng ký không thành công. Vui lòng thử lại <br /> Hoặc soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                        }
                    }
                    else
                    {
                        ltrNoiDung.Text = "Hệ thống không xác định được số điện thoại của bạn <br /> Vui lòng truy cập bằng 3G/GPRS <br /> Hoặc soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            lang       = Request.QueryString["lang"];
            width      = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price      = ConfigurationSettings.AppSettings.Get("tipprice");
            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 ykcg = ThethaoController.GetDetail_Tip_ByGameID(gameid);

                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 = Request.QueryString["id"];//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 + "7" + 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("tipcode") + " " + ykcg.Rows[0]["Code"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("tipcommandcode") + "</b> để nhận tư vấn về trận đấu" + Resources.Resource.wChon3G;
                        }
                        else
                        {
                            ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                            ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("tipcode") + " " + ykcg.Rows[0]["Code"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("tipcommandcode") + "</b> de nhan tu van ve 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.wXacNhanDichVu + "dịch vụ tư vấn trận " + ykcg.Rows[0]["Team_Name1"].ToString() + " - " + ykcg.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.wXacNhanDichVu_KD + "dich vu tu van tran " + ykcg.Rows[0]["Team_Name1"].ToString() + " - " + ykcg.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", "TIP", Request.QueryString["id"].ToString());

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

                            messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN", price, "D", "TIP", 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;
                        }
                    }
                }
            }
        }
Example #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //if (AppEnv.GetSetting("TestFlag") == "1")
                //{
                //    Session["telco"] = Constant.T_Vietnamobile;
                //    Session["msisdn"] = "84929004805";
                //    Msisdn = Session["msisdn"].ToString();
                //}

                if (Session["msisdn"] == null)
                {
                    int    is3g   = 0;
                    string msisdn = MobileUtils.GetMSISDN(out is3g);
                    if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
                    {
                        Session["telco"]  = Constant.T_Vietnamobile;
                        Session["msisdn"] = msisdn;
                        ltrXinChao.Text   = "Xin chào <b>" + msisdn + "</b>";
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                        ltrXinChao.Text   = "Xin chào <b>khách</b>";
                    }
                }

                DataSet dsMt = WapController.GetTopUserVote(1);
                DataSet dsLm = WapController.GetTopUserVote(2);

                //DataTable dtMt = WapController.GetTopUserVote(1);
                //DataTable dtLm = WapController.GetTopUserVote(2);

                if (dsMt != null && dsMt.Tables[0].Rows.Count > 0)
                {
                    rptMaiTho.DataSource = dsMt.Tables[0];
                    rptMaiTho.DataBind();

                    lblMtLike.Text   = dsMt.Tables[1].Rows[0]["Like"].ToString();
                    lblMtUnLike.Text = dsMt.Tables[2].Rows[0]["UnLike"].ToString();
                }

                if (dsLm != null && dsLm.Tables[0].Rows.Count > 0)
                {
                    rptLinhMiu.DataSource = dsLm.Tables[0];
                    rptLinhMiu.DataBind();

                    lblLmLike.Text   = dsLm.Tables[1].Rows[0]["Like"].ToString();
                    lblLmUnLike.Text = dsLm.Tables[2].Rows[0]["UnLike"].ToString();
                }

                #region FACEBOOK Comment

                string url = AppEnv.GetSetting("WapDefault") + Request.RawUrl;

                ltCommentFB.Text = "<div class=\"fb-comments\" data-mobile=\"false\" data-href='" + url + "' data-width=\"320\" data-num-posts=\"5\"></div>";

                string Facebook_raw_data = get_web_content("http://api.facebook.com/restserver.php?method=links.getStats&urls=" + url);

                XmlDocument dom = new XmlDocument();
                dom.LoadXml(Facebook_raw_data);

                #endregion
            }
        }
Example #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Session["msisdn"] == null)
                {
                    int    is3g   = 0;
                    string msisdn = MobileUtils.GetMSISDN(out is3g);
                    if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
                    {
                        Session["telco"]  = Constant.T_Vietnamobile;
                        Session["msisdn"] = msisdn;
                        ltrXinChao.Text   = "Xin chào <b>" + msisdn + "</b>";
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                        ltrXinChao.Text   = "Xin chào <b>khách</b>";
                    }
                }
                else
                {
                    ltrXinChao.Text = "Xin chào <b>" + Session["msisdn"] + "</b>";
                }

                #region Xử lý ĐẶT GẠCH

                string message   = string.Empty;
                string serviceId = "8379";
                madichvu = Request.QueryString["t"];
                madichvu = madichvu.ToUpper();

                string regisChannel = "WAP";
                if (madichvu == "GACH1")
                {
                    regisChannel = "VMG1";
                }
                else if (madichvu == "GACH2")
                {
                    regisChannel = "VMG2";
                }
                else if (madichvu == "GACH3")
                {
                    regisChannel = "VMG3";
                }

                madichvu = madichvu.Replace("1", "").Replace("2", "").Replace("3", "");

                if (!string.IsNullOrEmpty(madichvu))
                {
                    madichvu = madichvu.ToUpper().Trim();

                    if (Session["msisdn"] != null)
                    {
                        price = "5000";
                        string messageReturn;

                        var charging = new Library.VNMCharging.VNMChargingGW();
                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "VIDEOGIFT", "VIDEO_GIFT", price, "D", "VID", "Vote " + madichvu);

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

                        if (messageReturn == "1")//Charged Thanh Cong
                        {
                            #region DK USER

                            var entity = new VoteRegisteredInfo();
                            entity.User_ID              = Session["msisdn"].ToString();
                            entity.Request_ID           = "0";
                            entity.Service_ID           = serviceId;
                            entity.Command_Code         = madichvu;
                            entity.Service_Type         = 1;
                            entity.Charging_Count       = 0;
                            entity.FailedChargingTime   = 0;
                            entity.RegisteredTime       = DateTime.Now;
                            entity.ExpiredTime          = DateTime.Now.AddDays(1);
                            entity.Registration_Channel = regisChannel;
                            entity.Status     = 1;
                            entity.Operator   = "vnmobile";
                            entity.Vote_Count = 1;

                            entity.Vote_PersonId    = 1;
                            entity.IsDislike        = 0;
                            entity.Dislike_Count    = 1;
                            entity.Dislike_PersonId = 0;
                            DataTable dt = WapController.SecretRegisterInsert(entity);

                            if (dt.Rows[0]["RETURN_ID"].ToString() == "0")//DK DICH VU LAN DAU
                            {
                                litThongBao.Text = "Chúc mừng bạn đã đăng ký thành công Gameshow 'BÍ MẬT ĐỘNG TRỜI CỦA MAI THỎ'.<br /> Hãy đặt gạch càng nhiều để có cơ hội hẹn hò và biết bí mật đằng sau của Mai Thỏ là gì.<br /> Chi tiết truy cập http://wap.vietnamobile.com.vn. HT: 19001255";
                            }
                            else if (dt.Rows[0]["RETURN_ID"].ToString() == "1")
                            {
                                DataTable dtVoteInfo = WapController.SecretGetCountByPersonId(Session["msisdn"].ToString(), 1);
                                litThongBao.Text = "Bạn đã ĐẶT GẠCH thành công cho : " + dtVoteInfo.Rows[0]["Name"] + ".<br /> Số lượt GẠCH của bạn : " + dtVoteInfo.Rows[0]["Count"] + "<br /> Bạn đang thuộc top : " + dtVoteInfo.Rows[0]["Top"] + " những người ĐẶT GẠCH nhiều nhất <br /> ĐẶT GẠCH càng nhiều bạn càng có cơ hội hẹn hò và biết bí mật đằng sau của Mai Thỏ là gì.<br /> Chi tiết truy cập: http://wap.vietnamobile.com.vn. HT: 19001255";
                            }

                            #endregion
                        }
                        else
                        {
                            litThongBao.Text = lang == "1" ? "Đăng ký không thành công. Vui lòng thử loại hoặc tài khoản không đủ tiền" : "Dang ky khong thanh cong. Vui long thu lai hoac tai khoan khong du tien";
                        }

                        #region Log Doanh Thu

                        var eLog = new VoteChargedUserLogInfo();

                        eLog.User_ID              = Session["msisdn"].ToString();
                        eLog.Request_ID           = "0";
                        eLog.Service_ID           = serviceId;
                        eLog.Command_Code         = madichvu;
                        eLog.Service_Type         = 1;
                        eLog.Charging_Count       = 0;
                        eLog.FailedChargingTime   = 0;
                        eLog.RegisteredTime       = DateTime.Now;
                        eLog.ExpiredTime          = DateTime.Now.AddDays(1);
                        eLog.Registration_Channel = regisChannel;
                        eLog.Status   = 1;
                        eLog.Operator = "vnmobile";

                        if (messageReturn == "1")
                        {
                            eLog.Reason = "Succ";
                        }
                        else
                        {
                            eLog.Reason = messageReturn;
                        }

                        eLog.Price         = ConvertUtility.ToInt32(price);
                        eLog.Vote_PersonId = 1;

                        WapController.SecretChargedUserLogInsert(eLog);

                        #endregion
                    }
                    else
                    {
                        if (madichvu == "GACH")
                        {
                            message          = "Hệ thống không xác định được số điện thoại của bạn.<br /> Vui lòng truy cập bằng 3G/GPRS<br /> Hoặc soạn tin: " + madichvu + " gửi " + serviceId;
                            litThongBao.Text = message;
                        }
                        else
                        {
                            message =
                                "Hệ thống không xác định được số điện thoại của bạn.<br /> Vui lòng truy cập bằng 3G/GPRS";
                            litThongBao.Text = message;
                        }
                    }
                }


                #endregion

                DataSet dsMt = WapController.SecretGetTopUserVote(1);

                if (dsMt != null && dsMt.Tables[0].Rows.Count > 0)
                {
                    rptMaiTho.DataSource = dsMt.Tables[0];
                    rptMaiTho.DataBind();
                    lblMtUnLike.Text = dsMt.Tables[1].Rows[0]["Like"].ToString();

                    rptLinhMiu.DataSource = dsMt.Tables[0];
                    rptLinhMiu.DataBind();
                    lblLmUnLike.Text = dsMt.Tables[1].Rows[0]["Like"].ToString();
                }

                #region FACEBOOK Comment

                string url = AppEnv.GetSetting("WapDefault") + Request.RawUrl;

                ltCommentFB.Text = "<div class=\"fb-comments\" data-mobile=\"false\" data-href='" + url + "' data-width=\"320\" data-num-posts=\"5\"></div>";

                string Facebook_raw_data = get_web_content("http://api.facebook.com/restserver.php?method=links.getStats&urls=" + url);

                XmlDocument dom = new XmlDocument();
                dom.LoadXml(Facebook_raw_data);

                #endregion
            }
        }