示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            preurl = ConfigurationSettings.AppSettings.Get("urldata");
            width  = Request.QueryString["w"];
            lang   = ConvertUtility.ToInt32(Request.QueryString["lang"]);
            _info  = Get_User_Agent_Info();

            if (Session["msisdn"] != null)
            {
                string value = AppEnv.GetRegisterService(Session["msisdn"].ToString(), AppEnv.GetSetting("S2DK_Game"));
                if (value == "1")
                {
                    // pnlS2DkGame2.Visible = false;
                }
            }

            int totalrecord = 0;

            if (lang == 0)
            {
                //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia_KD + ConfigurationSettings.AppSettings.Get("gameprice") + Resources.Resource.wDonViTien_KD + "/game)";
            }
            else
            {
                //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia + ConfigurationSettings.AppSettings.Get("gameprice") + Resources.Resource.wDonViTien + "/game)";
            }
            lnkXemThem.NavigateUrl = UrlProcess.GetGameHomeUrl(lang.ToString(), width, "0");
            //Tải nhiều nhất

            //DataTable dtHottest = GameController.GetAllGameByCategoryAndDisplayType(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, pagesize, 1, out totalrecord);
            var dtHottest = new DataTable();

            dtHottest = GameController.GetAllGameByCateTypeAndAgentNoCache(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, _info, 30, 1, out totalrecord);
            if (dtHottest.Rows.Count == 0)
            {
                dtHottest = GameController.GetAllGameByCategoryAndDisplayType(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, 30, 1, out totalrecord);
            }

            Random rnd = new Random();

            while (dtHottest.Rows.Count > 3)
            {
                dtHottest.Rows.RemoveAt(rnd.Next(0, dtHottest.Rows.Count));
                dtHottest.AcceptChanges();
            }
            rptHottest.DataSource     = dtHottest;
            rptHottest.ItemDataBound += new RepeaterItemEventHandler(rptlastest_ItemDataBound);
            rptHottest.DataBind();
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //price = ConfigurationSettings.AppSettings.Get("gameprice");
            preurl = ConfigurationSettings.AppSettings.Get("urldata");
            width  = Request.QueryString["w"];
            lang   = ConvertUtility.ToInt32(Request.QueryString["lang"]);
            hotro  = ConvertUtility.ToInt32(Request.QueryString["hotro"]);

            //hotro = 1;

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

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

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

            if (ConfigurationSettings.AppSettings.Get("freecate").IndexOf("," + catID.ToString() + ",") > -1)
            {
                freecate = true;
            }
            _info = Get_User_Agent_Info();

            if (!IsPostBack)
            {
                DataTable catInfo = GameController.GetCategoryByCatIDHasCache(catID);
                if (lang == 1)
                {
                    lnkCateChannel.Text = catInfo.Rows[0]["Title_Unicode"].ToString().ToUpper();
                }
                else
                {
                    lnkCateChannel.Text = catInfo.Rows[0]["Title"].ToString().ToUpper();
                }
                lnkCateChannel.NavigateUrl = UrlProcess.GetGameCategoryUrl(lang.ToString(), width, catID.ToString(), hotro.ToString());
                lnkHomeChannel.NavigateUrl = UrlProcess.GetGameHomeUrl(lang.ToString(), width, hotro.ToString());
            }
            if (!string.IsNullOrEmpty(Request.QueryString["cpage"]))
            {
                curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]);
            }
            //start category list
            int totalrecord = 0;

            if (hotro == 1)
            {
                lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=1", "hotro=0").Replace("cpage=" + curpage.ToString(), "cpage=1");
                //rptlstCategory.DataSource = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), catID, (int)Constant.Game.Category, _info, pagesize, curpage, out totalrecord);
            }
            else
            {
                lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=0", "hotro=1").Replace("cpage=" + curpage.ToString(), "cpage=1");;
                //rptlstCategory.DataSource = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, (int)Constant.Game.Category, pagesize, curpage, out totalrecord);
            }

            var dt = new DataTable();

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

            rptlstCategory.DataSource     = dt;
            rptlstCategory.ItemDataBound += rptlstCategory_ItemDataBound;
            rptlstCategory.DataBind();
            Paging1.totalrecord  = totalrecord;
            Paging1.pagesize     = pagesize;
            Paging1.numberpage   = pagenumber;
            Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"];
            Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage=";
            //end category list
            if (lang == 1)
            {
                if (hotro == 0)
                {
                    lnkValidModel.Text = "Chỉ hiển thị những game hỗ trợ";
                }
                else
                {
                    lnkValidModel.Text = "Hiển thị tất cả các game";
                }
            }
            else
            if (hotro == 0)
            {
                lnkValidModel.Text = "Chi hien thi nhung game ho tro";
            }
            else
            {
                lnkValidModel.Text = "Hien thi tat ca cac game";
            }
            lnkValidModel.Text = "<span class=\"orange\">" + lnkValidModel.Text + "</span>";
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            GameAcountController gc = new GameAcountController();
            string ms = "";

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

                telCo = AppEnv.CheckSessionTelcoUndefine();

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

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

                    //#region Free Content

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

                    //#endregion

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

                            if (messageReturn == "1")
                            {    // Thanh toán thành công >> trả nội dung
                                HienThiNoiDung(true, true, price);
                            }
                            else
                            {    // Thanh toán không thành công >> thông báo lỗi
                                HienThiNoiDung(false, true, "0");
                            }
                            break;
                        }
                    }
                }
            }
        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            price = ConfigurationSettings.AppSettings.Get("gameprice");
            lang  = Request.QueryString["lang"];
            hotro = Request.QueryString["hotro"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            if (id == 1402 || id == 1401)
            {
                price = "15000";
            }
            SoDT    = Request.QueryString["sdt"];
            telCo   = Session["telco"].ToString();
            linkStr = "<a href=\"../" + UrlProcess.GetGameHomeUrl(lang, width.ToString(), hotro).Replace("~/", "") + "\" >GAME<a>";

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

                //Nếu số điện thoại không hợp lệ thì hướng dẫn
                if (!MobileUtils.IsMobileNumber(SoDT))
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = Resources.Resource.wSoDienThoaiKhongHopLe;
                    }
                    else
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = Resources.Resource.wSoDienThoaiKhongHopLe_KD;
                    }
                    return;
                }
                DataTable dtDetail = GameController.GetGameDetailByID(Session["telco"].ToString(), id);
                if (ConfigurationSettings.AppSettings.Get("freecate").IndexOf("," + dtDetail.Rows[0]["W_GameCategoryID"].ToString() + ",") > -1 || (",1712,1713,").IndexOf("," + id.ToString() + ",") > -1)
                {
                    freecate = true;
                    HienThiNoiDung(true);
                    return;
                }
                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("gamecode") + " " + dtDetail.Rows[0]["Game_Code"].ToString() + " " + SoDT + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("gamecommandcode") + "</b> để gửi tặng game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b>" + Resources.Resource.wChon3G;
                        if (id == 1402 || id == 1401)
                        {
                            ltrSMS.Text = "Soạn tin <b>HOT " + SoDT + "</b> gửi <b>333</b> để gửi tặng game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b>" + Resources.Resource.wChon3G;
                        }
                    }
                    else
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("gamecode") + " " + dtDetail.Rows[0]["Game_Code"].ToString() + " " + SoDT + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("gamecommandcode") + "</b> de gui tang game <b>" + dtDetail.Rows[0]["GameName"].ToString() + "</b>" + Resources.Resource.wChon3G_KD;
                        if (id == 1402 || id == 1401)
                        {
                            ltrSMS.Text = "Soan tin <b>HOT " + SoDT + "</b> gui <b>333</b> de gui tang game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b>" + Resources.Resource.wChon3G_KD;
                        }
                    }
                }
                else
                {
                    //pnlThongBao.Visible = true;
                    //if (lang == "1")
                    //{
                    //    ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu + "game " + dtDetail.Rows[0]["GameNameUnicode"].ToString();
                    //    btnCo.Text = Resources.Resource.btnCo;
                    //    btnKhong.Text = Resources.Resource.btnKhong;
                    //}
                    //else
                    //{
                    //    ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao_KD;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu_KD.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu_KD + "game " + dtDetail.Rows[0]["GameName"].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", "JG", Request.QueryString["id"].ToString());
                        //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "GAMEGIFT", "GAME_GIFT");

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

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