Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]).ToString();
            width = ConvertUtility.ToInt32(Request.QueryString["w"]).ToString();
            if (!IsPostBack)
            {
                display         = ConvertUtility.ToString(Request.QueryString["display"]).ToLower();
                txtKeyword.Text = Server.HtmlDecode(Request.QueryString["key"]);
                string msisdn = ConvertUtility.ToString(Session["msisdn"]);
                if (lang == "1")
                {
                    if (string.IsNullOrEmpty(msisdn))
                    {
                        ltrXinChao.Text = "Xin chào <span class=\"pink bold\">khách</span>";
                    }
                    else
                    {
                        ltrXinChao.Text = "Xin chào thuê bao <span class=\"pink bold\">" + msisdn + "</span>";
                    }
                }
                else
                {
                    if (string.IsNullOrEmpty(msisdn))
                    {
                        ltrXinChao.Text = "Xin chao <span class=\"pink bold\">khach</span>";
                    }
                    else
                    {
                        ltrXinChao.Text = "Xin chao thue bao <span class=\"pink bold\">" + msisdn + "</span>";
                    }
                    lnkTrangChu.Text = "Trang chu";
                    lnkAmNhac.Text   = "Am nhac";
                }

                lnkTrangChu.NavigateUrl = UrlProcess.GetWapHomeUrl(lang, width);
                lnkAmNhac.NavigateUrl   = UrlProcess.GetMusicHomeUrl(lang, width);
                switch (display)
                {
                case "news":
                    ltrLienKet.Text = " » <span>Tin Showbiz</span>";
                    break;

                case "ndt":
                    ltrLienKet.Text = " » <a href=\"" + UrlProcess.GetMusicNewsListUrl(lang, width) + "\" >Tin Showbiz</a>";
                    break;

                case "album":
                    ltrLienKet.Text = " » <span>Album</span>";
                    break;

                case "byalb":
                    ltrLienKet.Text = " » <a href=\"" + UrlProcess.GeMusicAlbumUrl(lang, width) + "\" >Album</a>";
                    break;

                case "artist":
                    ltrLienKet.Text = " » <span>" + (lang == "1" ? "Theo ca sỹ" : "Theo ca sy") + "</span>";
                    break;

                case "byart":
                    ltrLienKet.Text = " » <a href=\"" + UrlProcess.GeMusicArtistUrl(lang, width) + "\" >" + (lang == "1" ? "Theo ca sỹ" : "Theo ca sy") + "</a>";
                    break;

                case "style":
                    ltrLienKet.Text = " » <span>" + (lang == "1" ? "Theo thể loại" : "Theo the loai") + "</span>";
                    break;

                case "bysty":
                    ltrLienKet.Text = " » <a href=\"" + UrlProcess.GeMusicStyleUrl(lang, width) + "\" >" + (lang == "1" ? "Theo thể loại" : "Theo the loai") + "</a>";    // » <span>" + (lang == "1" ? "Chi tiết" : "Chi tiet") + "</span>";
                    break;

                case "mdt":
                    ltrLienKet.Text = " » <span>" + (lang == "1" ? "Chi tiết" : "Chi tiet") + "</span>";
                    break;

                case "newest":
                    ltrLienKet.Text = " » <span>" + (lang == "1" ? "Theo thứ tự" : "Theo thu tu") + "</span>";
                    break;
                }

                string type = ConvertUtility.ToInt32(Request.QueryString["type"]).ToString();
                switch (type)
                {
                case "0":
                    ddlDataType.SelectedIndex = 0;
                    break;

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

                case "2":
                    ddlDataType.SelectedIndex = 2;
                    break;
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            lang   = ConvertUtility.ToInt32(Request.QueryString["lang"]).ToString();
            width  = Request.QueryString["w"];
            preurl = ConfigurationSettings.AppSettings.Get("urldata");
            if (!IsPostBack)
            {
                int       totalrecord = 0;
                DataTable dtCat       = WapXzone_VNM.Library.Component.Video.VideoController.GetAllVideoByCategoryAndDisplayType(Session["telco"].ToString(), 31, 0, (int)Constant.Video.Category, 10, 1, out totalrecord);
                Random    rnd         = new Random();
                while (dtCat.Rows.Count > 3)
                {
                    dtCat.Rows.RemoveAt(rnd.Next(0, dtCat.Rows.Count));
                    dtCat.AcceptChanges();
                }

                rptVideo.DataSource     = dtCat;
                rptVideo.ItemDataBound += new RepeaterItemEventHandler(rptVideo_ItemDataBound);
                rptVideo.DataBind();
                lnkVideoTiep.NavigateUrl = UrlProcess.GetVideoCategoryUrl(lang, width, "31");

                rptMoiNhat.DataSource     = MusicController.GetItemTopHasCache(Session["telco"].ToString(), 5);
                rptMoiNhat.ItemDataBound += new RepeaterItemEventHandler(rptHotThang_ItemDataBound);
                rptMoiNhat.DataBind();
                lnkMoiNhatTiep.NavigateUrl = UrlProcess.GetMusicByOrderUrl(lang, width);

                rptHotThang.DataSource     = MusicController.GetItemTopByAlbumHasCache(3, Session["telco"].ToString(), 5);
                rptHotThang.ItemDataBound += new RepeaterItemEventHandler(rptHotThang_ItemDataBound);
                rptHotThang.DataBind();
                lnkHotThangTiep.NavigateUrl = UrlProcess.GetMusicByAlbumUrl(lang, width, "3");

                DataTable dtAlbum = MusicController.GetAlbumHotHasCache(Session["telco"].ToString());
                endOfIndex = dtAlbum.Rows.Count - 1;
                rptAlbumChonloc.DataSource     = dtAlbum;
                rptAlbumChonloc.ItemDataBound += new RepeaterItemEventHandler(rptAlbumChonloc_ItemDataBound);
                rptAlbumChonloc.DataBind();
                lnkAlbum.NavigateUrl = UrlProcess.GeMusicAlbumUrl(lang, width);

                rptTopCaSy.DataSource     = MusicController.GetArtistTopHasCache(5);
                rptTopCaSy.ItemDataBound += new RepeaterItemEventHandler(rptTopCaSy_ItemDataBound);
                rptTopCaSy.DataBind();
                lnkCaSy.NavigateUrl = UrlProcess.GeMusicArtistUrl(lang, width);

                rptTheLoai.DataSource     = MusicController.GetStyleTopHasCache(5);
                rptTheLoai.ItemDataBound += new RepeaterItemEventHandler(rptTheLoai_ItemDataBound);
                rptTheLoai.DataBind();
                lnkTheLoai.NavigateUrl = UrlProcess.GeMusicStyleUrl(lang, width);

                if (lang == "1")
                {
                }
                else
                {
                    ltrHotThang.Text     = "HOT THANG";
                    ltrAlbumChonloc.Text = "ALBUM CHON LOC";
                    ltrTopCaSy.Text      = "BAI HAT THEO CA SY";
                    ltrTheLoai.Text      = "BAI HAT THEO THE LOAI";
                    lnkHotThangTiep.Text = lnkAlbum.Text = lnkCaSy.Text = lnkTheLoai.Text = "» Xem tiep";
                }
            }
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang    = ConvertUtility.ToInt32(Request.QueryString["lang"]).ToString();
            width   = ConvertUtility.ToInt32(Request.QueryString["w"]).ToString();
            display = ConvertUtility.ToString(Request.QueryString["display"]).ToLower();
            string strTrangchu = string.Empty;

            if (Request.QueryString["lang"] == "1")
            {
                lnkNgonNgu.NavigateUrl = Request.RawUrl.Replace("lang=1", "lang=0");
                strTrangchu            = "Trang chủ ";
            }
            else
            {
                lnkNgonNgu.NavigateUrl = Request.RawUrl.Replace("lang=0", "lang=1");
                lnkDauTrang.Text       = "Dau trang";
                lnkNgonNgu.Text        = "Có dấu";
                ltrHoTro.Text          = "Ho tro: 19001255";
                ltrBanquyen.Text       = "Bản quyền Vietnamobile";
                strTrangchu            = "Trang chu ";
            }
            lnkDauTrang.NavigateUrl = Request.RawUrl + "#";
            //
            lnkTrangChu.NavigateUrl = UrlProcess.GetWapHomeUrl(lang, width);
            lnkAmNhac.NavigateUrl   = UrlProcess.GetMusicHomeUrl(lang, width);
            switch (display)
            {
            case "news":
                ltrLienKet.Text = " » <span>Tin Showbiz</span>";
                break;

            case "ndt":
                ltrLienKet.Text = " » <a href=\"" + UrlProcess.GetMusicNewsListUrl(lang, width) + "\" >Tin Showbiz</a> » <span>" + (lang == "1" ? "Chi tiết" : "Chi tiet") + "</span>";
                break;

            case "album":
                ltrLienKet.Text = " » <span>Album</span>";
                break;

            case "byalb":
                ltrLienKet.Text = " » <a href=\"" + UrlProcess.GeMusicAlbumUrl(lang, width) + "\" >Album</a> » <span>" + (lang == "1" ? "Chi tiết" : "Chi tiet") + "</span>";
                break;

            case "artist":
                ltrLienKet.Text = " » <span>" + (lang == "1" ? "Theo ca sỹ" : "Theo ca sy") + "</span>";
                break;

            case "byart":
                ltrLienKet.Text = " » <a href=\"" + UrlProcess.GeMusicArtistUrl(lang, width) + "\" >" + (lang == "1" ? "Theo ca sỹ" : "Theo ca sy") + "</a> » <span>" + (lang == "1" ? "Chi tiết" : "Chi tiet") + "</span>";
                break;

            case "style":
                ltrLienKet.Text = " » <span>" + (lang == "1" ? "Theo thể loại" : "Theo the loai") + "</span>";
                break;

            case "bysty":
                ltrLienKet.Text = " » <a href=\"" + UrlProcess.GeMusicStyleUrl(lang, width) + "\" >" + (lang == "1" ? "Theo thể loại" : "Theo the loai") + "</a> » <span>" + (lang == "1" ? "Chi tiết" : "Chi tiet") + "</span>";
                break;

            case "mdt":
                ltrLienKet.Text = " » <span>" + (lang == "1" ? "Chi tiết" : "Chi tiet") + "</span>";
                break;
            }
        }