protected void rptlstResult_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }

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

            DataRowView curData = (DataRowView)e.Item.DataItem;

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

            if (lang == 1)
            {
                lnkTenAnh.Text  = curData["WTitle_Unicode"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai + curData["Web_Name"];
                ltrLuottai.Text = Resources.Resource.wLuotTai + curData["Download"];
                lnkTai.Text     = Resources.Resource.wTai;
            }
            else
            {
                lnkTenAnh.Text  = curData["WTitle"].ToString();
                ltrTheloai.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(curData["Web_Name"].ToString());
                ltrLuottai.Text = Resources.Resource.wLuotTai_KD + curData["Download"];
                lnkTai.Text     = Resources.Resource.wTai_KD;
            }
            lnkAvatar.NavigateUrl = lnkTenAnh.NavigateUrl = UrlProcess.GetWallpaperDetailUrlNew(lang.ToString(), "detail", width, curData["W_WItemID"].ToString());
            lnkTai.NavigateUrl    = UrlProcess.GetWallpaperDownloadUrlNew(lang.ToString(), width, curData["W_WItemID"].ToString(), curData["W_CategoryID"].ToString());
            if (curData["WThumnail"].ToString().LastIndexOf(".gif") > 0)
            {
                WapXzone_VNM.CreateGIFAvatar.Ws_Process ws = new WapXzone_VNM.CreateGIFAvatar.Ws_Process();
                imgAvatar.ImageUrl = preurl + ws.GetAvatarGif(curData["WThumnail"].ToString().Replace("~", "").Replace("thumb_", ""), 82, 66);
            }
            else
            {
                WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                ws.GenerateAvatarThumnail(curData["WThumnail"].ToString(), 82, 66);
                imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["WThumnail"].ToString(), 82, 66).Replace("~", "");
            }
        }
Esempio n. 2
0
        protected void rptlastest_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData = (DataRowView)e.Item.DataItem;

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

            if (lang == 1)
            {
                lnkTenAnh.Text  = "<span class=\"bold\">" + curData["WTitle_Unicode"].ToString() + "</span>";
                ltrTheloai.Text = Resources.Resource.wTheLoai + curData["Web_Name"].ToString();
                ltrLuottai.Text = Resources.Resource.wLuotTai + curData["Download"].ToString();
                lnkTai.Text     = "<span class=\"orange bold\">" + Resources.Resource.wTai + "</span>";
                lnkTang.Text    = "<span class=\"orange bold\">" + Resources.Resource.wTang + "</span>";
            }
            else
            {
                lnkTenAnh.Text  = "<span class=\"bold\">" + curData["WTitle"].ToString() + "</span>";
                ltrTheloai.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(curData["Web_Name"].ToString());
                ltrLuottai.Text = Resources.Resource.wLuotTai_KD + curData["Download"].ToString();
                lnkTai.Text     = "<span class=\"orange bold\">" + Resources.Resource.wTai_KD + "</span>";
                lnkTang.Text    = "<span class=\"orange bold\">" + Resources.Resource.wTang_KD + "</span>";
            }
            lnkAvatar.NavigateUrl = lnkTenAnh.NavigateUrl = UrlProcess.GetWallpaperDetailUrl(lang.ToString(), "detail", width, curData["W_WItemID"].ToString()) + "&catid=" + curData["W_CategoryID"].ToString();
            //lnkTai.NavigateUrl = "../Download.aspx?id=" + curData["W_WItemID"].ToString() + "&catid=" + curData["W_CategoryID"].ToString() + "&lang=" + lang + "&w=" + width;
            lnkTai.NavigateUrl  = UrlProcess.GetWallpaperDownloadUrl(lang.ToString(), width, curData["W_WItemID"].ToString(), curData["W_CategoryID"].ToString());
            lnkTang.NavigateUrl = UrlProcess.GetWallpaperDetailUrl(lang.ToString(), "detail", width, curData["W_WItemID"].ToString()) + "&g=1&catid=" + curData["W_CategoryID"].ToString();
            if (curData["WThumnail"].ToString().LastIndexOf(".gif") > 0)
            {
                WapXzone_VNM.CreateGIFAvatar.Ws_Process ws = new WapXzone_VNM.CreateGIFAvatar.Ws_Process();
                imgAvatar.ImageUrl = preurl + ws.GetAvatarGif(curData["WThumnail"].ToString().Replace("~", "").Replace("thumb_", ""), 60, 60);
            }
            else
            {
                WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                ws.GenerateAvatarThumnail(curData["WThumnail"].ToString(), 60, 60);
                imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["WThumnail"].ToString(), 60, 60).Replace("~", "");
            }
        }
Esempio n. 3
0
        protected void rptlstCategory_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            DataRowView curData    = (DataRowView)e.Item.DataItem;
            Literal     ltrAlbum   = (Literal)e.Item.FindControl("ltrAlbum");
            Literal     ltrAvatar  = (Literal)e.Item.FindControl("ltrAvatar");
            Literal     ltrMota    = (Literal)e.Item.FindControl("ltrMota");
            Literal     ltrLuottai = (Literal)e.Item.FindControl("ltrLuottai");
            Literal     ltrSobai   = (Literal)e.Item.FindControl("ltrSobai");

            if (lang == "1")
            {
                ltrAlbum.Text = "<a href=\"" + UrlProcess.GetMusicByAlbumUrl(lang, width, curData["W_MAlbumID"].ToString()) + "\"><span class=\"bold\">" + curData["AlbumNameUnicode"].ToString() + "</span></a>";
                if (!string.IsNullOrEmpty(curData["DescriptionUnicode"].ToString()))
                {
                    ltrMota.Text = curData["DescriptionUnicode"].ToString() + "<br />";
                }
                ltrLuottai.Text = Resources.Resource.wLuotTai + curData["Download"].ToString();
                ltrSobai.Text   = Resources.Resource.wSoBai + curData["ItemCount"].ToString();
            }
            else
            {
                ltrAlbum.Text = "<a href=\"" + UrlProcess.GetMusicByAlbumUrl(lang, width, curData["W_MAlbumID"].ToString()) + "\"><span class=\"bold\">" + curData["AlbumName"].ToString() + "</span></a>";
                if (!string.IsNullOrEmpty(curData["Description"].ToString()))
                {
                    ltrMota.Text = curData["Description"].ToString() + "<br />";
                }
                ltrLuottai.Text = Resources.Resource.wLuotTai_KD + curData["Download"].ToString();
                ltrSobai.Text   = Resources.Resource.wSoBai_KD + curData["ItemCount"].ToString();
            }

            if (curData["Avatar"].ToString().LastIndexOf(".gif") > 0)
            {
                WapXzone_VNM.CreateGIFAvatar.Ws_Process ws = new WapXzone_VNM.CreateGIFAvatar.Ws_Process();
                ltrAvatar.Text = "<a href=\"" + UrlProcess.GetMusicByAlbumUrl(lang, width, curData["W_MAlbumID"].ToString()) + "\"><img class=\"thumb-b\" src=\"" + preurl + ws.GetAvatarGif(curData["Avatar"].ToString().Replace("~", "").Replace("thumb_", ""), 60, 60) + "\" alt=\"thumb\"></a>";
            }
            else
            {
                WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                ws.GenerateAvatarThumnail(curData["Avatar"].ToString(), 60, 60);
                ltrAvatar.Text = "<a href=\"" + UrlProcess.GetMusicByAlbumUrl(lang, width, curData["W_MAlbumID"].ToString()) + "\"><img class=\"thumb-b\" src=\"" + preurl + MultimediaUtility.GetAvatarThumnail(curData["Avatar"].ToString(), 60, 60).Replace("~", "") + "\" alt=\"thumb\"></a>";
            }
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            preurl  = ConfigurationSettings.AppSettings.Get("urldata");
            width   = Request.QueryString["w"];
            lang    = ConvertUtility.ToInt32(Request.QueryString["lang"]).ToString();
            albumID = ConvertUtility.ToInt32(Request.QueryString["id"]);

            if (!string.IsNullOrEmpty(Request.QueryString["cpage"]))
            {
                curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]);
            }

            if (!IsPostBack)
            {
                //start category list
                int       totalrecord = 0;
                DataTable dtCat       = MusicController.GetItemByAlbumWithPagingHasCache(albumID, Session["telco"].ToString(), curpage, pagesize, out totalrecord);
                rptlstCategory.DataSource     = dtCat;
                rptlstCategory.ItemDataBound += new RepeaterItemEventHandler(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"] + "&id=" + Request.QueryString["id"];
                Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"] + "&cpage=";

                DataTable albumInfo = MusicController.GetAlbumByIDHasCache(albumID);
                if (albumInfo.Rows.Count > 0)
                {
                    if (albumInfo.Rows[0]["Avatar"].ToString().LastIndexOf(".gif") > 0)
                    {
                        WapXzone_VNM.CreateGIFAvatar.Ws_Process ws = new WapXzone_VNM.CreateGIFAvatar.Ws_Process();
                        albumAvatar.ImageUrl = preurl + ws.GetAvatarGif(albumInfo.Rows[0]["Avatar"].ToString().Replace("~", "").Replace("thumb_", ""), 51, 51);
                    }
                    else
                    {
                        WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                        ws.GenerateAvatarThumnail(albumInfo.Rows[0]["Avatar"].ToString(), 51, 51);
                        albumAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(albumInfo.Rows[0]["Avatar"].ToString(), 51, 51).Replace("~", "");
                    }
                    if (lang == "1")
                    {
                        ltrAlbumName.Text = "<span class=\"bold\" style=\"color:#B200B2;\">" + albumInfo.Rows[0]["AlbumNameUnicode"].ToString() + "</span>";
                        if (!string.IsNullOrEmpty(albumInfo.Rows[0]["DescriptionUnicode"].ToString()))
                        {
                            ltrMota.Text = albumInfo.Rows[0]["DescriptionUnicode"].ToString() + "<br />";
                        }
                        ltrSobai.Text   = Resources.Resource.wSoBai + totalrecord.ToString();
                        ltrLuottai.Text = Resources.Resource.wLuotTai + albumInfo.Rows[0]["Download"].ToString();
                    }
                    else
                    {
                        ltrAlbumName.Text = "<span class=\"bold\" style=\"color:#B200B2;\">" + albumInfo.Rows[0]["AlbumName"].ToString() + "</span>";
                        if (!string.IsNullOrEmpty(albumInfo.Rows[0]["Description"].ToString()))
                        {
                            ltrMota.Text = albumInfo.Rows[0]["Description"].ToString() + "<br />";
                        }
                        ltrSobai.Text   = Resources.Resource.wSoBai_KD + totalrecord.ToString();
                        ltrLuottai.Text = Resources.Resource.wLuotTai_KD + albumInfo.Rows[0]["Download"].ToString();
                    }
                }
            }
        }
Esempio n. 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"]);
            id     = ConvertUtility.ToInt32(Request.QueryString["id"]);

            if (!IsPostBack)
            {
                //Detail
                DataTable dtDetail = HinhNenController.GetWallpaperDetailByIDHasCache(Session["telco"].ToString(), id);
                catid = ConvertUtility.ToInt32(dtDetail.Rows[0]["W_CategoryID"]);
                lnkCateChannel.NavigateUrl = UrlProcess.GetWallpaperCategoryUrlNew(lang.ToString(), width, catid.ToString());
                lnkHomeChannel.NavigateUrl = UrlProcess.GetWallpaperHomeUrlNew(lang.ToString(), width);
                //end detail
                if (dtDetail.Rows.Count > 0)
                {
                    if (catid == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid")))
                    {
                        price = ConfigurationSettings.AppSettings.Get("thuphapprice");
                    }
                    else
                    {
                        price = ConfigurationSettings.AppSettings.Get("wallprice");
                    }
                    if (lang == 1)
                    {
                        lnkCateChannel.Text = dtDetail.Rows[0]["Title_Unicode"].ToString().ToUpper();
                        lnkHomeChannel.Text = "HÌNH NỀN";
                        ltrTenAnh.Text      = dtDetail.Rows[0]["WTitle_Unicode"].ToString();
                        ltrGiaTai.Text      = Resources.Resource.wGiaTai + price + Resources.Resource.wDonViTien;
                        lnkTai.Text         = Resources.Resource.wTaiVe;
                        ltrCungTheLoai.Text = Resources.Resource.hnHinhCungTheLoai;
                    }
                    else
                    {
                        lnkCateChannel.Text = dtDetail.Rows[0]["Title"].ToString().ToUpper();
                        ltrTenAnh.Text      = dtDetail.Rows[0]["WTitle"].ToString();
                        ltrGiaTai.Text      = Resources.Resource.wGiaTai_KD + price + Resources.Resource.wDonViTien_KD;
                        lnkTai.Text         = Resources.Resource.wTaiVe_KD;
                        ltrCungTheLoai.Text = Resources.Resource.hnHinhCungTheLoai_KD;
                    }
                    lnkTai.NavigateUrl = UrlProcess.GetWallpaperDownloadUrlNew(lang.ToString(), width, dtDetail.Rows[0]["W_WItemID"].ToString(), catid.ToString());

                    if (dtDetail.Rows[0]["WThumnail"].ToString().LastIndexOf(".gif") > 0)
                    {
                        WapXzone_VNM.CreateGIFAvatar.Ws_Process ws = new WapXzone_VNM.CreateGIFAvatar.Ws_Process();
                        imgDetail.ImageUrl = preurl + ws.GetAvatarGif(dtDetail.Rows[0]["WThumnail"].ToString().Replace("~", "").Replace("thumb_", ""), 159, 127);
                    }
                    else
                    {
                        WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver();
                        ws.GenerateAvatarThumnail(dtDetail.Rows[0]["WThumnail"].ToString(), 159, 127);
                        imgDetail.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(dtDetail.Rows[0]["WThumnail"].ToString(), 159, 127).Replace("~", "");
                    }

                    //Other wallpaper
                    if (!string.IsNullOrEmpty(Request.QueryString["tpage"]))
                    {
                        tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]);
                    }
                    int       totaltopdownload = 0;
                    DataTable dtltopdownload   = HinhNenController.GetAllWallpaperByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catid, 0, pagesize, tpage, out totaltopdownload);
                    rptCungTheLoai.DataSource     = dtltopdownload;
                    rptCungTheLoai.ItemDataBound += rptTopdownload_ItemDataBound;
                    rptCungTheLoai.DataBind();
                    Paging1.totalrecord  = totaltopdownload;
                    Paging1.pagesize     = pagesize;
                    Paging1.numberpage   = pagenumber;
                    Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"];
                    Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"] + "&tpage=";
                    //end lastest wallpaper
                }
            }
        }