Exemplo n.º 1
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;
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                    }
                }


                if (Session["msisdn"] != null)
                {
                    AppEnv.RegisterService(AppEnv.GetSetting("S2ShortCode"), "0", Session["msisdn"].ToString(), "DK", "DK CP");//Andy Service S2_94x
                }

                Response.Redirect("http://wap.vietnamobile.com.vn/Video/Default.aspx?display=home&w=320&lang=1");
            }
        }
Exemplo n.º 2
0
        protected void rptlstCategory_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData = (DataRowView)e.Item.DataItem;
            HyperLink   lnkTai  = (HyperLink)e.Item.FindControl("lnkTai");

            if (lnkTai != null)
            {
                if (MobileUtils.CheckValidModel(curData["ModelSupport"].ToString(), _info))
                {
                    lnkTai.Text        = "<img alt=\"\" src=\"/imagesnew/icon/down.png\" /> " + AppEnv.CheckLang("Tải");
                    lnkTai.NavigateUrl = UrlProcess.GetGameDownloadUrlNew(lang.ToString(), width, curData["W_GameItemID"].ToString(), hotro);
                }
                else
                {
                    lnkTai.NavigateUrl = "";
                    lnkTai.Text        = AppEnv.CheckLang("Dòng máy không hỗ trợ");
                }
            }

            if (e.Item.ItemIndex < pagesize - 1)
            {
                Literal lit = (Literal)e.Item.FindControl("litBlank");
                if (lit != null)
                {
                    lit.Text = "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"f5f5f5\"><tr><td align=\"left\" valign=\"top\"><img src=\"/imagesnew/blank.gif\" width=\"5\" height=\"9\" /></td></tr></table>";
                }
            }
        }
Exemplo n.º 3
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  = ConvertUtility.ToInt32(Request.QueryString["hotro"]);

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

            int is3g = 0;

            msisdn = MobileUtils.GetMSISDN(out is3g);

            if (!IsPostBack)
            {
                int count = GameController.GetFreeGame(msisdn);

                if (count > 0)
                {
                    lblAlert.Text = "Bạn được miễn phí " + GameController.GetFreeGame(msisdn) + " game trong chuyên mục này";
                }
                else
                {
                    lblAlert.Text = "";
                }
                DataTable dt = GameController.GetAllGameJavaVnmHasCache();

                rptlstCategory.DataSource     = dt;
                rptlstCategory.ItemDataBound += rptlstCategory_ItemDataBound;
                rptlstCategory.DataBind();
            }
        }
Exemplo n.º 4
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;
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                    }
                }

                string url = UrlProcess.GetXosoHomeUrl("1", "320");
                if (Session["msisdn"] != null)
                {
                    AppEnv.RegisterService(AppEnv.GetSetting("S2ShortCode"), "0", Session["msisdn"].ToString(), "DK", "DK SC MB");
                    //string value = AppEnv.Dk1RegisterService(AppEnv.GetSetting("S2ShortCode"), "0", Session["msisdn"].ToString(), "DK1", "DK1 SC MB");//Andy Service
                }

                Response.Redirect(url);
            }
        }
Exemplo n.º 5
0
        public static SettingsVal ReadSettings(HttpRequest request)
        {
            var settings = new SettingsVal();

            if (MobileUtils.IsMobileOrTablet())
            {
                settings.Theme    = DemoSettings.MobileDefaultTheme;
                settings.PopupMod = DemoSettings.MobileDefaultPopup;
            }

            if (request.Cookies[DemoSettings.CookieName] != null)
            {
                var vals = request.Cookies[DemoSettings.CookieName].Value.Split('|');
                if (vals.Length == 2)
                {
                    settings.Theme    = vals[0];
                    settings.PopupMod = vals[1];
                }
            }

            if (string.IsNullOrWhiteSpace(settings.Theme))
            {
                settings.Theme = DemoSettings.DefaultTheme;
            }

            if (string.IsNullOrWhiteSpace(settings.PopupMod))
            {
                settings.PopupMod = DemoSettings.DefaultPopup;
            }

            return(settings);
        }
Exemplo n.º 6
0
        // 아이피 변경
        private void ChangeIP(Dictionary <string, string> dictionary)
        {
            logManager.AppendLog("아이피 를 변경중입니다.");
            switch (dictionary[Configuration.IP_AGENT_TYPE])
            {
            case "Proxy":
            {
                // 프록시는 구현 예정
            } break;

            case "Tethering":
            {
                MobileUtils.EnAbleAirPlainMode();
                MobileUtils.DisAbleAirPlainMode();
            } break;
            }
            logManager.AppendLog("아이피 변경이 완료되었습니다.");

            // 아이피 변경 후 대기 시간
            Stay("아이피 변경 후", dictionary[Configuration.IP_CAHNGE_STAY]);

            string externalIP = CommonUtils.GetExternalIPAddress();

            logManager.AppendLog(string.Format("변경된 아이피 ==> {0}", externalIP));

            form.setExternalAddress(CommonUtils.GetExternalIPAddress());
        }
        public MobileBasePage(AndroidDriver <AndroidElement> driver, string cenario)
        {
            _driver             = driver;
            calcMobileVariables = new CalcMobileVariables(_driver);
            mobileUtils         = new MobileUtils(_driver);

            string nomeDaEvidencia = "Evidencias Calculadora Android_" + cenario + "_" + mobileUtils.GerarDataHoraFormatada();

            geradorPDF = new GeradorPDF(_driver, nomeDaEvidencia, cenario);
        }
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DesSecurity des = new DesSecurity();
            //Kiểm tra Vietnamobile
            int    is3g   = 0;
            string msisdn = MobileUtils.GetMSISDN(out is3g);
            //string msisdn = MobileUtils.GetMSISDN();

            //if (String.IsNullOrEmpty(msisdn) && Session["msisdn"] == null)
            //    msisdn = MobileUtils.GetVietnamobileMsisdn();
            int partnerId = ConvertUtility.ToInt32(Request.QueryString["partnerid"]);

            log.Info("partnerId: " + partnerId);


            if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
            {
                log.Info("msisdn: " + msisdn);
                if (partnerId == 0)
                {
                    Response.Redirect("http://payment.xzone.vn/sc.aspx?link=" + des.Des3Encrypt("4|" + msisdn + "||", ConfigurationSettings.AppSettings.Get("msisdnkey")));
                }
                else
                {
                    try
                    {
                        DataTable dtPartner      = DBController.Partner_GetInfo(partnerId);
                        string    vTransactionID = DBController.Transaction_Online_Insert(msisdn, 4, partnerId, "", "");

                        string url = "http://" + dtPartner.Rows[0]["Domain"].ToString() +
                                     dtPartner.Rows[0]["URL"].ToString() + "?p=" +
                                     des.Des3Encrypt(msisdn + "|4|" + vTransactionID,
                                                     dtPartner.Rows[0]["KeyCode"].ToString());

                        log.Info("Url Response : " + url);


                        Response.Redirect("http://" + dtPartner.Rows[0]["Domain"].ToString() + dtPartner.Rows[0]["URL"].ToString() + "?p=" + des.Des3Encrypt(msisdn + "|4|" + vTransactionID, dtPartner.Rows[0]["KeyCode"].ToString()), false);
                    }
                    catch (Exception ex)
                    {
                        log.Info("Ex Response : " + ex.Message + "|" + ex.StackTrace);
                    }
                }
            }
            else
            {
                DataTable dtPartner = DBController.Partner_GetInfoHasCache(partnerId);
                Response.Redirect("http://" + dtPartner.Rows[0]["Domain"].ToString() + dtPartner.Rows[0]["URL"].ToString() + "?p=" + des.Des3Encrypt("||", dtPartner.Rows[0]["KeyCode"].ToString()), false);


                //Response.Redirect("http://payment.xzone.vn/sc.aspx?link=" + des.Des3Encrypt("0|||", ConfigurationSettings.AppSettings.Get("msisdnkey")));
            }
        }
Exemplo n.º 9
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;
                }
            }
        }
Exemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            width = Request.QueryString["w"];
            lang  = Request.QueryString["lang"];

            int is3g = 0;
            //string msisdn = MobileUtils.GetMSISDN(out is3g);

            string vnmnumber = MobileUtils.GetMSISDN(out is3g);

            if (string.IsNullOrEmpty(vnmnumber) || !MobileUtils.CheckOperator(vnmnumber, "vietnammobile"))
            {
                if (lang == "1")
                {
                    lblThongbao.Text = "Nếu bạn là thuê bao mạng Vietnamobile hãy chọn kết nối GPRS bằng <font color=\"red\">APN \"VM WAP\"</font><br>(Không nên chọn kết nối bằng APN \"Internet\" vì sẽ khó khăn trong việc sử dụng dịch vụ).";
                }
                else
                {
                    lblThongbao.Text = "Neu ban la thue bao mang Vietnamobile hay cho ket noi GPRS bang <font color=\"red\">APN \"VM WAP\"</font><br>(Khong nen chon ket noi bang APN \"Internet\" vi se kho khan trong viec su dung dich vu).";
                }
            }
            else
            {
                if (lang == "1")
                {
                    lblThongbao.Text = "Dịch vụ này chỉ áp dụng cho khách hàng là thuê bao của Vietnamobile. Nếu bạn là khách hàng của Vietnamobile, hãy đăng ký bằng cách soạn nhắn DK HD gửi đến 123. Hotline: 123 hoặc 789.";
                }
                else
                {
                    lblThongbao.Text = "Dich vu nay chi ap dung cho khach hang la thue bao cua Vietnamobile. Neu ban la khach hang cua Vietnamobile, hay dang ky bang cach soan tin nhan: DK HD gui den 123. Hotline: 123 hoac 789.";
                }
            }

            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            logger.Info("-----------------------------------");
            logger.Info("Dich vu: Hot 100");
            logger.Info("MSISDN: " + vnmnumber + " - IP Address: " + HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]);
            logger.Info("-----------------------------------");

            //if (!string.IsNullOrEmpty(vnmnumber) && MobileUtils.CheckOperator(vnmnumber, "vietnammobile"))
            //{
            //    if (lang == "1")
            //        lblThongbao.Text = "Bạn đã hết thời hạn truy cập!<br>Soạn tin <font color=\"red\">DK NC</font> gửi <font color=\"red\">123</font> để tiếp tục sử dụng dịch vụ";
            //    else
            //        lblThongbao.Text = "Ban da het thoi han truy cap!<br>Soan tin <font color=\"red\">DK NC</font> gui <font color=\"red\">123</font> de tiep tuc su dung dich vu";
            //}
            //else
            //{
            //    if (lang == "1")
            //        lblThongbao.Text = "Nếu bạn là thuê bao mạng Vietnamobile hãy chọn kết nối GPRS bằng <font color=\"red\">APN \"VM WAP\"</font><br>(Không nên chọn kết nối bằng APN \"Internet\" vì sẽ khó khăn trong việc sử dụng dịch vụ).";
            //    else
            //        lblThongbao.Text = "Neu ban la thue bao mang Vietnamobile hay cho ket noi GPRS bang <font color=\"red\">APN \"VM WAP\"</font><br>(Khong nen chon ket noi bang APN \"Internet\" vi se kho khan trong viec su dung dich vu).";
            //}
        }
Exemplo n.º 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;
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                    }
                }

                string url = UrlProcess.GetXosoHomeUrl("1", "320");
                if (Session["msisdn"] != null)
                {
                    //DK1 GAME gui 949
                    DataTable dt = AppEnv.GetExistUser(Session["msisdn"].ToString(), "TK MB");
                    if (dt != null && dt.Rows.Count > 0)//DA DK ROI
                    {
                        Response.Redirect(url);
                    }
                    else//CHUA DK
                    {
                        var entity = new VnmS2RegisterUserInfo();
                        entity.CommandCode       = "DK1";
                        entity.Operator          = "VNM";
                        entity.RegisteredChannel = "WAP";
                        entity.RegisteredTime    = DateTime.Now;
                        entity.RequestId         = "0";
                        entity.ServiceId         = "949";
                        entity.Status            = 1;
                        entity.SubCode           = "TK MB";
                        entity.UserId            = Session["msisdn"].ToString();

                        string value = AppEnv.Dk1RegisterService(AppEnv.GetSetting("S2ShortCode"), "0", Session["msisdn"].ToString(), "DK1", "DK1 TK MB"); //Andy Service
                        if (value == "1")                                                                                                                  //DK THANH CONG
                        {
                            AppEnv.InsertVnmRegisterUser(entity);
                        }
                    }
                }

                Response.Redirect(url);
            }
        }
Exemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                logger.Debug("------------- wapPayment4APP Vietnamobile ------------------");
                DesSecurity des = new DesSecurity();
                try
                {
                    string cipher     = ConvertUtility.ToString(Request.QueryString["link"]);
                    string price      = string.Empty;
                    string msisdn     = string.Empty;
                    string itemid     = string.Empty;
                    string itemtype   = string.Empty;
                    string itemdetail = string.Empty;
                    string partnerid  = string.Empty;
                    MobileUtils.GetDetailAppUrl(des.Des3Decrypt(cipher, ConfigurationSettings.AppSettings.Get("msisdnkey")), ref partnerid, ref price, ref itemid, ref itemtype, ref itemdetail);

                    //Kiểm tra Vinaphone
                    string alertMessage = string.Empty;

                    int is3g = 0;
                    //string msisdn = MobileUtils.GetMSISDN(out is3g);
                    msisdn = MobileUtils.GetMSISDN(out is3g);

                    logger.Debug("msisdn=" + msisdn);
                    //Nhận diện được MSISDN >> form xác thực yêu cầu thanh toán
                    if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
                    {
                        Session["_price"]      = price;
                        Session["_msisdn"]     = msisdn;
                        Session["_itemid"]     = itemid;
                        Session["_itemtype"]   = itemtype;
                        Session["_itemdetail"] = itemdetail;
                        Session["_partnerid"]  = partnerid;
                        ltrMSISDN.Text         = "Xin chào " + msisdn + "<br /><b>Nạp VKIM</b>";
                        ltrTB.Text             = "Phí nạp VKIM là " + price + " đồng. Vui lòng xác nhận để thực hiện giao dịch.";
                        pnlXacnhan.Visible     = true;
                    }
                    else
                    {
                        Response.Redirect("http://payment.xzone.vn/atc.aspx?link=END", false);
                        HttpContext.Current.ApplicationInstance.CompleteRequest();
                    }
                }
                catch (Exception ex)
                {
                    logger.Debug("Exception=" + ex.ToString());
                    Response.Redirect("http://payment.xzone.vn/atc.aspx?link=END", false);
                    HttpContext.Current.ApplicationInstance.CompleteRequest();
                }
            }
        }
Exemplo n.º 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Redirect("vote.aspx");

            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>";
                    }
                }

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

                //if(dtMt != null && dtMt.Rows.Count > 0)
                //{
                //    rptMaiTho.DataSource = dtMt;
                //    rptMaiTho.DataBind();
                //}

                //if (dtLm != null && dtLm.Rows.Count > 0)
                //{
                //    rptLinhMiu.DataSource = dtLm;
                //    rptLinhMiu.DataBind();
                //}
            }
        }
Exemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int    is3g   = 0;
            string msisdn = MobileUtils.GetMSISDN(out is3g);

            if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
            {
                Session["msisdn"] = msisdn;
                logger.Debug(string.Format("sdt_Chelsea:{0}", msisdn));
            }
            if (Session["msisdn"] != null)
            {
                string sdt = Session["msisdn"].ToString();
                //mtContent = "Chuc mung Quy Khach da dang ky thanh cong dich vu Du doan Chelsea cua VNM.Quy Khach duoc mien phi su dung dich vu." +
                //            "De huy dich vu Quy khach vui long soan HUY gui 1003";

                #region S2 94x

                string s294xdk = "DK";

                if (s294xdk != "")
                {
                    string value1 = RegisterService("1003", "0",
                                                    sdt, "DK", s294xdk);

                    logger.Debug(string.Format("service_Chelsea:{0}", value1));
                    string[] values1 = value1.Split('|');

                    //if (values1[0].Trim() == "1")
                    //{

                    //    AppEnv.SendMt(sdt, "1003", "DK", mtContent);

                    //}
                }
                #endregion
                tab5.Visible = true;
                tab6.Visible = false;
            }
            if (Session["msisdn"] == null)
            {
                tab5.Visible = false;
                tab6.Visible = true;
            }
        }
Exemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            preurl   = ConfigurationSettings.AppSettings.Get("urldata");
            width    = Request.QueryString["w"];
            key      = Request.QueryString["key"];
            parentid = ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("relax_zoneiddefaut"));
            price    = ConfigurationSettings.AppSettings.Get("relaxprice");
            cipher   = Request.QueryString["link"];
            MobileUtils.GetDetailUrl(EAS.DecryptData(cipher, ConfigurationSettings.AppSettings.Get("vmskey")), ref msisdn, ref cpid, ref vmstransactionid);
            if (!IsPostBack)
            {
                lang = ConvertUtility.ToInt32(Request.QueryString["lang"]);
                if (lang == 1)
                {
                    lblTitle.Text = "Kết quả tìm kiếm";
                }
            }
            if (!string.IsNullOrEmpty(Request.QueryString["cpage"]))
            {
                curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]);
            }
            //start category list
            int       totalrecord = 0;
            DataTable dtCat       = TintucController.GetAllNewsByKey(key, pagesize, curpage, out totalrecord, parentid);

            rptResult.DataSource     = dtCat;
            rptResult.ItemDataBound += new RepeaterItemEventHandler(rptResult_ItemDataBound);
            rptResult.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"] + "&key=" + Request.QueryString["key"] + "&id=" + Request.QueryString["id"];
            Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&key=" + Request.QueryString["key"] + "&id=" + Request.QueryString["id"] + "&cpage=";
            //end category list
            if (lang == 1)
            {
                ltrCount.Text = "Tìm thấy " + totalrecord + " bài";
            }
            else
            {
                ltrCount.Text = "Tim thay " + totalrecord + " bai";
            }
        }
Exemplo n.º 16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang = ConvertUtility.ToInt32(Request.QueryString["lang"]);
            if (!string.IsNullOrEmpty(Request.QueryString["cpage"]))
            {
                curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]);
            }

            int is3g = 0;
            //string msisdn = MobileUtils.GetMSISDN(out is3g);

            string vnmnumber = MobileUtils.GetMSISDN(out is3g);

            IPList iplist = new IPList();

            iplist.Add("202.172.4.192", 26);
            iplist.Add("203.170.26.0", 24);
            iplist.Add("203.170.27.0", 24);
            iplist.Add("203.128.247.24", 30);
            iplist.Add("203.162.40.20", 30);
            if (iplist.CheckNumber(HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]))
            {
                showDL = true;
            }

            //if (!string.IsNullOrEmpty(vnmnumber) && MobileUtils.CheckOperator(vnmnumber, "vietnammobile") && (iplist.CheckNumber(HttpContext.Current.Request.UserHostAddress)))
            //    if (VietnamobileWap.Library.Component.Wap.WapController.W4A_Subscriber_IsActive(vnmnumber, 3)) showDL = true;

            //start category list
            int totalrecord = 0;
            //DataTable dtCat = RTController.GetAllRingToneByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(),110, (int)Constant.RingTone.Hot100, pagesize, curpage, out totalrecord);
            DataTable dtCat = RTController.VNM_GetAllRingToneByCategoryAndDisplayTypeHasCache(110, (int)Constant.RingTone.Hot100, pagesize, curpage, out totalrecord);

            rptlstCategory.DataSource     = dtCat;
            rptlstCategory.ItemDataBound += new RepeaterItemEventHandler(rptlstCategory_ItemDataBound);
            rptlstCategory.DataBind();
            Pagging1.totalrecord  = totalrecord;
            Pagging1.pagesize     = pagesize;
            Pagging1.numberpage   = pagenumber;
            Pagging1.defaultparam = "?lang=" + Request.QueryString["lang"];
            Pagging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&cpage=";
            //end category list
        }
Exemplo n.º 17
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;
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                    }
                }

                if (Session["msisdn"] != null)
                {
                    var entity = new ViSport_S2_Registered_UsersInfo();
                    entity.User_ID              = Session["msisdn"].ToString();
                    entity.Request_ID           = "0";
                    entity.Service_ID           = "979";
                    entity.Command_Code         = "BD";
                    entity.Service_Type         = 1;
                    entity.Charging_Count       = 0;
                    entity.FailedChargingTimes  = 0;
                    entity.RegisteredTime       = DateTime.Now;
                    entity.ExpiredTime          = DateTime.Now.AddDays(1);
                    entity.Registration_Channel = "WAP";
                    entity.Status   = 1;
                    entity.Operator = "vnmobile";
                    entity.Point    = 100;

                    InsertSportGameHeroRegisterUser(entity);
                }

                Response.Redirect("http://visport.vn");
            }
        }
Exemplo n.º 18
0
        //Search App Agent
        public static DataTable GetAllApp_ItemByKeyAndAgent(string telCo, string strKeySearch, User_AgentInfo _info, int pagesize, int pageIndex, out int totalRecord)
        {
            DataCaching data  = new DataCaching();
            string      key   = "W4A_Wap_App.GetAllApp_ItemByKeyAndAgent";
            string      param = "telCo=" + telCo + "&KeySearch=" + strKeySearch + "&info=" + _info.model_name;

            DataTable dtRetval = (DataTable)data.GetHashCache(key, param);

            if (dtRetval == null || dtRetval.Rows.Count == 0)
            {
                DataTable dtCat = GetAllApp_ItemByKey(telCo, strKeySearch, 9999, 1, out totalRecord);
                //Xoá những game không hỗ trợ
                for (int i = 0; i < totalRecord; i++)
                {
                    if (!MobileUtils.CheckValidModel(dtCat.Rows[i]["ModelSupport"].ToString(), _info))
                    {
                        dtCat.Rows[i].Delete();
                    }
                }
                dtCat.AcceptChanges();
                //Ghi vào cache
                data.SetHashCache(key, param, GetExpire(), dtCat);
                dtRetval = dtCat;
            }
            totalRecord = dtRetval.Rows.Count;

            //
            int vFrom = ((pageIndex - 1) * pagesize);
            int vTo   = pageIndex * pagesize;

            if (vTo > totalRecord)
            {
                vTo = totalRecord;
            }
            DataTable dtReturn = dtRetval.Clone();

            for (int i = vFrom; i < vTo; i++)
            {
                dtReturn.ImportRow(dtRetval.Rows[i]);
            }
            return(dtReturn);
        }
Exemplo n.º 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            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;
            }

            if (Session["msisdn"] != null)
            {
                WapXzone_VNM.Library.VNMCharging.VNMChargingGW charging = new WapXzone_VNM.Library.VNMCharging.VNMChargingGW();

                string messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "", "", "3000", "D", "RELAX", "DK MN 943");

                if (messageReturn == "1")
                {
                    MOProcessor obj = new MOProcessor();

                    obj.ProcessMO("DK", "943", Session["msisdn"].ToString(), "DK MN", DateTime.Now.ToString("yyyyMMddHHmmss"));
                }
                else
                {
                    pnlSMS.Visible = true;

                    ltrSMS.Text = "Bạn vui lòng soạn tin theo cú pháp <b>DK MN</b> gửi <b>943</b>";
                }
            }
            else
            {
                pnlSMS.Visible = true;
                ltrSMS.Text    = "Bạn vui lòng soạn tin theo cú pháp <b>DK MN</b> gửi <b>943</b>";
            }
        }
Exemplo n.º 20
0
        public static SettingsVal ReadSettings(HttpRequest request)
        {
            var settings = new SettingsVal();

            if (MobileUtils.IsMobile())
            {
                settings.Theme = MobileDefaultTheme;
            }

            if (request.Cookies[CookieName] != null)
            {
                settings.Theme = request.Cookies[CookieName].Value;
            }

            if (string.IsNullOrWhiteSpace(settings.Theme))
            {
                settings.Theme = DefaultTheme;
            }

            return(settings);
        }
Exemplo n.º 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int    is3g   = 0;
            string msisdn = MobileUtils.GetMSISDN(out is3g);
            //msisdn = "84123456789";

            string p = Request.QueryString["p"];

            if (p == "1")
            {
                Response.Redirect("");
            }

            var jsonObj = new
            {
                SDT = msisdn
            };
            var    jScriptSerializer = new JavaScriptSerializer();
            string jsonClient        = jScriptSerializer.Serialize(jsonObj);

            Response.Write(jsonClient);
        }
Exemplo n.º 22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DesSecurity des = new DesSecurity();
            //Kiểm tra Vietnamobile
            int    is3g   = 0;
            string msisdn = MobileUtils.GetMSISDN(out is3g);
            //string msisdn = MobileUtils.GetMSISDN();

            //if (String.IsNullOrEmpty(msisdn) && Session["msisdn"] == null)
            //    msisdn = MobileUtils.GetVietnamobileMsisdn();

            string t = Request.QueryString["t"];

            if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
            {
                Response.Redirect(AppEnv.GetSetting("vsporturl") + des.Des3Encrypt("4|" + msisdn + "||", AppEnv.GetSetting("msisdnkey")) + "&t=" + t);
            }
            else
            {
                Response.Redirect(AppEnv.GetSetting("vsporturl") + des.Des3Encrypt("0|||", AppEnv.GetSetting("msisdnkey")) + "&t=" + t);
            }
        }
Exemplo n.º 23
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;
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                    }
                }

                string k = Request.QueryString["k"];

                string key = DateTime.Now.ToString("yyyyMMdd");
                string en  = SecurityMethod.MD5Encrypt(key);

                if (en == k)
                {
                    Session["ChargedOk"] = "OK";
                    DataTable dt   = TintucController.GetRandomForSmile();
                    string    link = "/Thugian/Download.aspx?id=" + dt.Rows[0]["Distribution_ID"] + "&lang=1&w=320";
                    Response.Redirect(link);
                }
                else
                {
                    Response.Redirect(AppEnv.GetSetting("WapDefault"));
                }
            }
        }
Exemplo n.º 24
0
        protected override void OnInit(EventArgs e)
        {
            if (HttpContext.Current.Request.UserAgent.ToLower().Contains("midp") && !MobileUtils.IsBlackBerry(HttpContext.Current.Request.UserAgent.ToLower()))
            {
                //Response.CacheControl = "private";
                Response.Charset = "UTF-8";
                //Response.Expires = 0;
                string acceptHeader = Request.ServerVariables["HTTP_ACCEPT"];

                if (acceptHeader.IndexOf("application/vnd.wap.xhtml+xml") != -1)
                {
                    Response.ContentType = "application/vnd.wap.xhtml+xml";
                }
                else if (acceptHeader.IndexOf("application/xhtml+xml") != -1)
                {
                    Response.ContentType = "application/xhtml+xml";
                }
                else
                {
                    Response.ContentType = "text/html";
                }
            }
        }
Exemplo n.º 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string domain = Request.QueryString["p"];
            int    is3g   = 0;

            string msisdn = MobileUtils.GetMSISDN1();

            string url;

            logger.Debug(" ");
            logger.Debug("Domain =" + domain);

            logger.Debug("msisdn =" + msisdn);
            logger.Debug(" ");

            if (!string.IsNullOrEmpty(msisdn) && msisdn != "unknown")
            {
                url = "http://" + domain + "/?msisdn=" + msisdn;
                logger.Debug("URL RESPONSE : " + url);
                Response.Redirect(url);
            }
            else
            {
                url = "http://" + domain + "/?msisdn=unknown";
                Response.Redirect(url);
            }
            //string t = Request.QueryString["t"];

            //if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
            //{
            //    Response.Redirect(AppEnv.GetSetting("vsporturl") + des.Des3Encrypt("4|" + msisdn + "||", AppEnv.GetSetting("msisdnkey")) + "&t=" + t);
            //}
            //else
            //{
            //    Response.Redirect(AppEnv.GetSetting("vsporturl") + des.Des3Encrypt("0|||", AppEnv.GetSetting("msisdnkey")) + "&t=" + t);
            //}
        }
Exemplo n.º 26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string domain = Request.QueryString["p"];


            #region VNM ISING

            //int is3g = 0;
            string msisdn = MobileUtils.GetMSISDN1();

            string url;
            logger.Debug(" ");
            logger.Debug("Domain =" + domain);

            logger.Debug("msisdn =" + msisdn);
            logger.Debug(" ");

            if (!string.IsNullOrEmpty(msisdn) && msisdn != "unknown")
            {
                url = domain + "&msisdn=" + msisdn;
                logger.Debug("URL RESPONSE : " + url);
                Response.Redirect(url);
            }
            else
            {
                //url = "http://wap.vietnamobile.com.vn";
                //Response.Redirect(url);

                url = domain + "&msisdn=" + "khach";
                logger.Debug("URL RESPONSE : " + url);
                Response.Redirect(url);
            }



            #endregion
        }
Exemplo n.º 27
0
        public static DataTable GetAllGameByCateTypeAndAgentNoCache(string telCo, int catID, int displayType, User_AgentInfo _info, int pagesize, int pageindex, out int totalrecord)
        {
            var dtRetval = new DataTable();

            if (dtRetval.Rows.Count == 0)
            {
                DataTable dtCat = GetAllGameByCategoryAndDisplayType(telCo, catID, displayType, 9999, 1, out totalrecord);
                //Xoá những game không hỗ trợ
                for (int i = 0; i < totalrecord; i++)
                {
                    if (!MobileUtils.CheckValidModel(dtCat.Rows[i]["ModelSupport"].ToString(), _info))
                    {
                        dtCat.Rows[i].Delete();
                    }
                }
                dtCat.AcceptChanges();
                dtRetval = dtCat;
            }
            totalrecord = dtRetval.Rows.Count;

            //
            int vFrom = ((pageindex - 1) * pagesize);
            int vTo   = pageindex * pagesize;

            if (vTo > totalrecord)
            {
                vTo = totalrecord;
            }
            DataTable dtReturn = dtRetval.Clone();

            for (int i = vFrom; i < vTo; i++)
            {
                dtReturn.ImportRow(dtRetval.Rows[i]);
            }
            return(dtReturn);
        }
        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;
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                    }
                }

                string returnUrl   = Request.QueryString["returnUrl"];
                string redirectUrl = "http://chieuthucbactrieu.com/";
                if (!string.IsNullOrEmpty(returnUrl))
                {
                    redirectUrl = returnUrl;
                }

                if (Session["msisdn"] != null)
                {
                    //DK Chieuthucbactrieu
                    AppEnv.RegisterService(AppEnv.GetSetting("S2ShortCode"), "0", Session["msisdn"].ToString(), "CTBT", "CTBT");//Andy Service S2_94x
                }

                Response.Redirect(redirectUrl);
            }
        }
Exemplo n.º 29
0
        protected void rptDetail_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData = (DataRowView)e.Item.DataItem;

            HyperLink lnkTai = (HyperLink)e.Item.FindControl("lnkTai");

            if (lnkTai != null)
            {
                if (MobileUtils.CheckValidModel(curData["ModelSupport"].ToString(), _info))
                {
                    lnkTai.Text        = "<img alt=\"\" src=\"/imagesnew/icon/down.png\" /> " + AppEnv.CheckLang("Tải");
                    lnkTai.NavigateUrl = UrlProcess.GetGameDownloadUrlNew(lang.ToString(), width, curData["W_GameItemID"].ToString(), hotro);
                }
                else
                {
                    lnkTai.NavigateUrl = "";
                    lnkTai.Text        = AppEnv.CheckLang("Dòng máy không hỗ trợ");
                }
            }
        }
Exemplo n.º 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang = Request.QueryString["lang"];
            if (string.IsNullOrEmpty(lang))
            {
                Response.Redirect("/Game/GameHot.aspx?w=320&lang=1");
            }

            Session["LastPage"] = Request.RawUrl;
            if (!IsPostBack)
            {
                width = ConvertUtility.ToInt32(Request.QueryString["w"]);
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";
                //
                var advertisement = new Advertisement {
                    Channel = "Home", Position = "HomeCenter", Param = 0, Lang = lang, Width = width.ToString()
                };
                litAds.Text = advertisement.GetAds();

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


                #region TU DONG DK SUB GAME

                if (Session["msisdn"] == null)
                {
                    int    is3g;
                    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;
                    }
                }

                //string url = UrlProcess.GetGameHomeUrl("1", "320", "0");
                if (Session["msisdn"] != null)
                {
                    string value = AppEnv.RegisterService(AppEnv.GetSetting("S2ShortCode"), "0",
                                                          Session["msisdn"].ToString(), "DK", "DK GAME");  //ANDY Service S2_94x
                    string[] res = value.Split('|');
                    if (res.Length > 0)
                    {
                        if (res[0] == "1")  //DK THANH CONG
                        {
                            pnlThongBao.Visible = true;
                        }
                    }
                }

                #endregion
            }
            if (string.IsNullOrEmpty(Request.QueryString["display"]))
            {
                display = "home";
            }
            else
            {
                display = Request.QueryString["display"];
            }

            Literal title   = new Literal();
            Literal ltrEnd  = new Literal();
            Literal ltrEnd1 = new Literal();
            try
            {
                string wapHomeURL = "http://wap.vietnamobile.com.vn";


                DataTable dtMusic = GameController.GetAllGame_ByPackageID(ConvertUtility.ToInt32(AppEnv.GetSetting("packageIdGame")));
                title.Text = "<style type=\"text/css\">body {font-family:Verdana, Arial, Helvetica; font-size:12px;} .mainmenu {display:block;width: 100%;background-color: #de60cb;color:#fff;text-align:center;line-height:25px;} .mainmenu a{color:#fff;} a:link, a:visited {text-decoration:none;}</style>";
                if (lang == "1")
                {
                    title.Text += "<div style=\"background-color:#EA6A00;color:#FFFFFF;display:block;line-height:25px;width:100%;margin-top:5px;padding-left:5px;font-weight:bold;\">" + "Chào mừng bạn đến với dịch vụ game <b style=\"color:blue\">(Miễn Phí)</b> của Vietnamobile" + "</div>";
                }
                else
                {
                    title.Text += "<div style=\"background-color:#EA6A00;color:#FFFFFF;display:block;line-height:25px;width:100%;margin-top:5px;padding-left:5px;font-weight:bold;\">" + "Chao mung ban den voi dich vu game <b style=\"color:blue\">(Miễn Phí)</b> cua Vietnamobile" + "</div>";
                }
                plList.Controls.Add(title);
                foreach (DataRow row in dtMusic.Rows)
                {
                    HyperLink lnkfile = new HyperLink();
                    if (lang == "1")
                    {
                        lnkfile.Text = row["Name"].ToString();
                    }
                    else
                    {
                        lnkfile.Text = UnicodeUtility.UnicodeToKoDau(row["Name"].ToString());
                    }
                    lnkfile.NavigateUrl = AppEnv.GetSetting("JavaGameDownload") + "?id=" + row["GameID"] + "&type=3" + "&code=" + SecurityMethod.MD5Encrypt(row["GameID"].ToString());
                    lnkfile.Attributes.Add("style", "color:#006CBF;padding-left:15px;padding-top:5px;padding-bottom:5px;display:block");
                    lnkfile.Attributes.Add("class", "bold");
                    plList.Controls.Add(lnkfile);
                }
                //Khuyen mai
                ltrEnd1.Text = "</div><div style=\"border-bottom: 1px solid #790083;height: 7px; margin: 5px 0 10px 0; width: 100%;\"></div>";

                ltrEnd.Text = "</div><div style=\"height: 7px; margin: 5px 0 0px 0; width: 100%;\"></div>";

                ltrEnd.Text += "<div style=\"background-color: #EA6A00;  color: #FFFFFF;  display: block;  line-height: 25px; text-align: center; width: 100%;\">";
                ltrEnd.Text += "<a style=\"color:#fff\" href=\"" + wapHomeURL + "\">Trang chủ</a> | <a style=\"color:#fff\" href=\"" + wapHomeURL + "/Game/Default.aspx?lang=1&display=home&hotro=0\">Game</a> | <a style=\"color:#fff\" href=\"" + wapHomeURL + "/Music/Default.aspx?lang=1&display=home\">Nhạc</a> | <a style=\"color:#fff\" href=\"" + wapHomeURL + "/Thethao/Default.aspx?lang=1&display=home\">Bóng đá</a></div>";
                plList.Controls.Add(ltrEnd);
            }
            catch (Exception ex)
            {
                Response.Write(ex.ToString());
            }
        }