Beispiel #1
0
    private void ViewVideo()
    {
        Config config = new Config();

        if (AspNetCache.CheckCache("Config_" + Language.language) == false)
        {
            ConfigBSO configBSO = new ConfigBSO();

            config = configBSO.GetAllConfig(Language.language);
            AspNetCache.SetCacheWithTime("Config_" + Language.language, config, 150);
        }
        else
        {
            config = (Config)AspNetCache.GetCache("Config_" + Language.language);
        }

        VideosBSO videosBSO = new VideosBSO();
        Videos    video     = videosBSO.GetVideosHotTop1("1", Language.language);

        if (video != null)
        {
            if (video.VideosType == true)
            {
                ltlVideo.Text = @"<iframe title='Video Player' width='100%' height='220' src='" + video.VideosUrl + "' frameborder='0' allowfullscreen=''></iframe>";
            }
            else
            {
                ltlVideo.Text = @"<object type='application/x-shockwave-flash' data='http://flv-player.net/medias/player_flv_multi.swf' width='246' height='190'><param name='movie' value='http://flv-player.net/medias/player_flv_multi.swf' /> <param name='allowFullScreen' value='true' /><param name='FlashVars' value='flv=" + config.WebDomain + video.FileName + "&title=" + video.Title + "&startimage=" + video.ImageThumb + "&width=246&height=190&autoplay=0&autoload=0&margin=0&showstop=1&showvolume=1&showtime=2&showopen=2&showfullscreen=1&buffer=10&buffermessage=" + video.Description + "&shortcut=1&showtitleandstartimage=0' /></object>";
            }
        }
    }
Beispiel #2
0
    protected void lboGallary_SelectedIndexChanged(object sender, EventArgs e)
    {
        VideosBSO _albumBSO = new VideosBSO();
        DataTable table     = _albumBSO.GetVideosByCate(Convert.ToInt32(lboGallary.SelectedValue), Language.language);

        lboVideo.DataSource     = table;
        lboVideo.DataTextField  = "Title";
        lboVideo.DataValueField = "VideosID";
        lboVideo.DataBind();
    }
Beispiel #3
0
    protected void BindVideo(int _videoCate)
    {
        VideosBSO _albumBSO = new VideosBSO();
        DataTable table     = _albumBSO.GetVideosByCate(_videoCate, Language.language);

        lboVideo.DataSource     = table;
        lboVideo.DataTextField  = "Title";
        lboVideo.DataValueField = "VideosID";
        lboVideo.DataBind();
    }
Beispiel #4
0
    private void ViewVideo()
    {
        // string strCate = GetCateParentIDArrayByID(cID);
        ConfigBSO configBSO = new ConfigBSO();
        Config    config    = configBSO.GetAllConfig(Language.language);
        DataTable table     = new DataTable();

        if (AspNetCache.CheckCache("tbl_PanelVideoHot_") == false)
        {
            VideosBSO videosBSO = new VideosBSO();
            table = videosBSO.GetVideosHot(Convert.ToInt32(hddRecord.Value), "1", Language.language);

            AspNetCache.SetCacheWithTime("tbl_PanelVideoHot_", table, 150);
        }
        else
        {
            table = (DataTable)AspNetCache.GetCache("tbl_PanelVideoHot_");
        }

        rptVideo.DataSource = table;
        rptVideo.DataBind();
    }
Beispiel #5
0
    private void ViewVideo()
    {
        Config config = new Config();

        if (AspNetCache.CheckCache("Config_" + Language.language) == false)
        {
            ConfigBSO configBSO = new ConfigBSO();

            config = configBSO.GetAllConfig(Language.language);
            AspNetCache.SetCacheWithTime("Config_" + Language.language, config, 150);
        }
        else
        {
            config = (Config)AspNetCache.GetCache("Config_" + Language.language);
        }
        DataTable table = new DataTable();

        if (AspNetCache.CheckCache("tbl_MainHomeVideoHot" + "_" + Language.language.Replace("-", "_")) == false)
        {
            VideosBSO videosBSO = new VideosBSO();
            table = videosBSO.GetVideosHot(5, "1", Language.language);

            AspNetCache.SetCacheWithTime("tbl_MainHomeVideoHot" + "_" + Language.language.Replace("-", "_"), table, 150);
        }
        else
        {
            table = (DataTable)AspNetCache.GetCache("tbl_MainHomeVideoHot" + "_" + Language.language.Replace("-", "_"));
        }

        string str1 = "";
        string str2 = "";

        if (table.Rows.Count > 0)
        {
            //str2 += "<ul>";
            for (int i = 0; i < table.Rows.Count; i++)
            {
                DataRow row = table.Rows[i];
                if (i == 0)
                {
                    //str1 += "<div class='boxVideo_wrapper' style='position: relative; width: 470px; height: 280px;'>";
                    //if ( Convert.ToBoolean(row["VideosType"]))
                    //    str1 += @"<iframe title='Video Player' width='470' height='280' src='" + row["VideosUrl"] + "' frameborder='0' allowfullscreen=''></iframe>";
                    //else
                    //    str1 += @"<object type='application/x-shockwave-flash' data='http://flv-player.net/medias/player_flv_multi.swf' width='470' height='280'><param name='movie' value='http://flv-player.net/medias/player_flv_multi.swf' /> <param name='allowFullScreen' value='true' /><param name='FlashVars' value='flv=" + config.WebDomain + "/Upload/Videos/Files/" + row["FileName"] + "&title=" + row["Title"] + "&startimage=" + Utils.getURLThumbImage(ResolveUrl("~/") + "Upload/Videos/VideosImg/ImgLarge/" + row["ImageLarge"],480) + "&width=470&height=280&autoplay=0&autoload=0&margin=0&showstop=1&showvolume=1&showtime=2&showopen=2&showfullscreen=1&buffer=10&buffermessage=" + row["Description"] + "&shortcut=1&showtitleandstartimage=0' /></object>";
                    //str1 += "</div>";

                    if (Convert.ToBoolean(row["VideosType"]))
                    {
                        PathFileAudio = row["VideosUrl"].ToString();
                    }
                    else
                    {
                        PathFileAudio = config.WebDomain + row["FileName"];
                    }

                    PathFileImg = row["ImageLarge"].ToString();


                    str1 += "<div class='video_home_info'>";
                    str1 += "<a href='" + ResolveUrl("~/") + "thu-vien-videos/" + GetString(row["Title"]) + "-" + row["VideosCateID"] + "-" + row["VideosID"] + ".aspx' title='" + row["Title"] + "' class='video_home_tt'>";
                    str1 += row["Title"];
                    str1 += "</a>";
                    //str1 += "<p class='video_home_sapo'>";
                    //str1 += Tool.SubString(Tool.StripTagsCharArray(row["Description"].ToString()),350);
                    //str1 += "</p>";
                    str1 += "</div>";
                }
                else
                {
                    str2 += "<div class='col-sm-6 view_hot_video'>";
                    str2 += "<div class='view view-tenth embed-image ratio-16-9'>";
                    str2 += "<a href='" + ResolveUrl("~/") + "thu-vien-videos/" + GetString(row["Title"]) + "-" + row["VideosCateID"] + "-" + row["VideosID"] + ".aspx' title='" + row["Title"] + "'>";
                    str2 += "<img class='img-responsive' alt='" + row["Title"] + "' src='" + Utils.getURLThumbImage(row["ImageLarge"].ToString(), 300) + "'>";

                    str2 += "<div class='mask'>";
                    str2 += "<h2>" + row["Title"] + "</h2>";
                    //str2 += "<p>At vero eos et accusamus et iusto odio dignissimos dolores et quas molestias excepturi sint occaecati cupiditate non provident.</p>";
                    str2 += "<a href='" + ResolveUrl("~/") + "thu-vien-videos/" + GetString(row["Title"]) + "-" + row["VideosCateID"] + "-" + row["VideosID"] + ".aspx' title='" + row["Title"] + "' class='info'>Xem</a>";
                    str2 += "</div>";
                    str2 += "</a>";
                    str2 += "</div>";
                    str2 += "</div>";
                    //str2 += "<div class='col-sm-6'>";
                    //str2 += "<div class='view view-tenth'>";
                    //str2 += "<img class='img-responsive' src='assets/img/main/img10.jpg' alt=''>";
                    //str2 += "<div class='mask'>";
                    //str2 += "<h2>Portfolio Item</h2>";
                    //str2 += "<p>At vero eos et accusamus et iusto odio dignissimos dolores et quas molestias excepturi sint occaecati cupiditate non provident.</p>";
                    //str2 += "<a href='portfolio_old_item.html' class='info'>Read More</a>";
                    //str2 += "</div> ";
                    //str2 += "</div>";
                    //str2 += "</div>";


                    //str2 += "<li>";
                    //str2 += "<a class='lnk_img' href='" + ResolveUrl("~/") + "thu-vien-videos/" + GetString(row["Title"]) + "-" + row["VideosCateID"] + "-" + row["VideosID"] + ".aspx' title='" + row["Title"] + "'>";
                    //str2 += "<img alt='" + row["Title"] + "' src='" + Utils.getURLThumbImage(row["ImageThumb"].ToString(), 100) + "'>";
                    //str2 += "</a>";
                    //str2 += "<a class='video_home_tt clred' href='" + ResolveUrl("~/") + "thu-vien-videos/" + GetString(row["Title"]) + "-" + row["VideosCateID"] + "-" + row["VideosID"] + ".aspx' title='" + row["Title"] + "'>";
                    //str2 += row["Title"];
                    //str2 += "</a>";
                    //str2 += "<div class='clr'> </div>";
                    //str2 += "</li>";
                }
            }
            //str2 += "</ul>";
            //   str2 += "<a class='xemthem2' href='"+ ResolveUrl("~/") + "thu-vien-video.aspx' title='Xem thêm'>Xem thêm</a>";
        }
        ltlVideoHot1.Text = str1;
        //ltlHotOther.Text = str2;

        //if (video != null)
        //{
        //    if (video.VideosType == true)
        //        ltlVideo.Text = @"<iframe title='Video Player' width='253' height='180' src='" + video.VideosUrl + "' frameborder='0' allowfullscreen=''></iframe>";
        //    else
        //        ltlVideo.Text = @"<object type='application/x-shockwave-flash' data='http://flv-player.net/medias/player_flv_multi.swf' width='253' height='180'><param name='movie' value='http://flv-player.net/medias/player_flv_multi.swf' /> <param name='allowFullScreen' value='true' /><param name='FlashVars' value='flv=" + config.WebDomain + "/Upload/Videos/Files/" + video.FileName + "&title=" + video.Title + "&startimage=" + ResolveUrl("~/") + "Upload/Videos/VideosImg/ImgThumb/" + video.ImageThumb + "&width=253&height=180&autoplay=0&autoload=0&margin=0&showstop=1&showvolume=1&showtime=2&showopen=2&showfullscreen=1&buffer=10&buffermessage=" + video.Description + "&shortcut=1&showtitleandstartimage=0' /></object>";
        //}
    }
Beispiel #6
0
    private void ViewVideo(int cID)
    {
        // string strCate = GetCateParentIDArrayByID(cID);
        ConfigBSO configBSO = new ConfigBSO();
        Config    config    = configBSO.GetAllConfig(Language.language);
        DataTable table     = new DataTable();

        if (AspNetCache.CheckCache("tbl_PanelVideobyCate_Page_" + cID) == false)
        {
            VideosBSO videosBSO = new VideosBSO();
            table = videosBSO.GetVideosHot(Convert.ToInt32(hddRecord.Value), "1", cID, Language.language);

            AspNetCache.SetCacheWithTime("tbl_PanelVideobyCate_Page_" + cID, table, 150);
        }
        else
        {
            table = (DataTable)AspNetCache.GetCache("tbl_PanelVideobyCate_Page_" + cID);
        }

        rptVideo.DataSource = table;
        rptVideo.DataBind();
        //string str1 = "";
        //string str2 = "";

        //if (table.Rows.Count > 0)
        //{
        //    str2 += "<ul>";
        //    for (int i = 0; i < table.Rows.Count; i++)
        //    {
        //        DataRow row = table.Rows[i];
        //        if (i == 0)
        //        {
        //            str1 += "<div class='boxVideo_wrapper' style='position: relative; width: 420px; height: 250px;'>";
        //            if (Convert.ToBoolean(row["VideosType"]))
        //                str1 += @"<iframe title='Video Player' width='420' height='250' src='" + row["VideosUrl"] + "' frameborder='0' allowfullscreen=''></iframe>";
        //            else
        //                str1 += @"<object type='application/x-shockwave-flash' data='http://flv-player.net/medias/player_flv_multi.swf' width='420' height='250'><param name='movie' value='http://flv-player.net/medias/player_flv_multi.swf' /> <param name='allowFullScreen' value='true' /><param name='FlashVars' value='flv=" + config.WebDomain + "/Upload/Videos/Files/" + row["FileName"] + "&title=" + row["Title"] + "&startimage=" + ResolveUrl("~/") + "Upload/Videos/VideosImg/ImgLarge/" + row["ImageLarge"] + "&width=420&height=250&autoplay=0&autoload=0&margin=0&showstop=1&showvolume=1&showtime=2&showopen=2&showfullscreen=1&buffer=10&buffermessage=" + row["Description"] + "&shortcut=1&showtitleandstartimage=0' /></object>";
        //            str1 += "</div>";

        //            str1 += "<div class='video_home_info'>";
        //            str1 += "<a href='" + ResolveUrl("~/") + "thu-vien-videos/" + GetString(row["Title"]) + "-" + row["VideosCateID"] + "-" + row["VideosID"] + ".aspx' title='" + row["Title"] + "' class='video_home_tt'>";
        //            str1 += row["Title"];
        //            str1 += "</a>";
        //            str1 += "<p class='video_home_sapo'>";
        //            str1 += row["Description"];
        //            str1 += "</p>";
        //            str1 += "</div>";
        //        }
        //        else
        //        {
        //            str2 += "<li>";
        //            str2 += "<a class='lnk_img' href='" + ResolveUrl("~/") + "thu-vien-videos/" + GetString(row["Title"]) + "-" + row["VideosCateID"] + "-" + row["VideosID"] + ".aspx' title='" + row["Title"] + "'>";
        //            str2 += "<img alt='" + row["Title"] + "' src='" + ResolveUrl("~/") + "Upload/Videos/VideosImg/ImgThumb/" + row["ImageThumb"] + "'>";
        //            str2 += "</a>";
        //            str2 += "<a class='video_home_tt clred' href='" + ResolveUrl("~/") + "thu-vien-videos/" + GetString(row["Title"]) + "-" + row["VideosCateID"] + "-" + row["VideosID"] + ".aspx' title='" + row["Title"] + "'>";
        //            str2 += row["Title"];
        //            str2 += "</a>";
        //            str2 += "<div class='clr'> </div>";
        //            str2 += "</li>";

        //        }
        //    }
        //    str2 += "</ul>";
        //    // str2 += "<a class='xemthem2' href='"+ ResolveUrl("~/") + "thu-vien-video/"+cID+".aspx' title='Xem thêm'>Xem thêm</a>";
        //}
        //ltlVideoHot1.Text = str1;
        //ltlHotOther.Text = str2;
    }
Beispiel #7
0
    private void ViewVideo()
    {
        Config config = new Config();

        if (AspNetCache.CheckCache("Config_" + Language.language) == false)
        {
            ConfigBSO configBSO = new ConfigBSO();

            config = configBSO.GetAllConfig(Language.language);
            AspNetCache.SetCacheWithTime("Config_" + Language.language, config, 150);
        }
        else
        {
            config = (Config)AspNetCache.GetCache("Config_" + Language.language);
        }
        DataTable table = new DataTable();

        if (AspNetCache.CheckCache("tbl_MainHomeVideoHot") == false)
        {
            VideosBSO videosBSO = new VideosBSO();
            table = videosBSO.GetVideosHot(1, "1", Language.language);

            AspNetCache.SetCacheWithTime("tbl_MainHomeVideoHot", table, 150);
        }
        else
        {
            table = (DataTable)AspNetCache.GetCache("tbl_MainHomeVideoHot");
        }

        string str1 = "";

        if (table.Rows.Count > 0)
        {
            //str2 += "<ul>";
            DataRow row = table.Rows[0];
            //str1 += "<div class='videos'>";
            //str1 += "<div class='videos_ul'>";
            //str1 += "<div class='item-video-frame-simple'>";
            //str1 += "<div class='boxVideo_wrapper' style='position: relative; width: 100%; height: 230px; padding: 4px 0 0 5px;'>";
            //if (Convert.ToBoolean(row["VideosType"]))
            //    str1 += @"<iframe title='Video Player' width='100%' height='220' src='" + row["VideosUrl"] + "' frameborder='0' allowfullscreen=''></iframe>";
            //else
            //    str1 += @"<object type='application/x-shockwave-flash' data='http://flv-player.net/medias/player_flv_multi.swf' width='285' height='205'><param name='movie' value='http://flv-player.net/medias/player_flv_multi.swf' /> <param name='allowFullScreen' value='true' /><param name='FlashVars' value='flv=" + config.WebDomain + row["FileName"] + "&title=" + row["Title"] + "&startimage=" + row["ImageLarge"] + "&width=285&height=205&autoplay=0&autoload=0&margin=0&showstop=1&showvolume=1&showtime=2&showopen=2&showfullscreen=1&buffer=10&buffermessage=" + row["Description"] + "&shortcut=1&showtitleandstartimage=0' /></object>";
            //str1 += "</div>";
            //str1 += "</div>";
            //str1 += "</div>";
            //str1 += "</div>";

            if (Convert.ToBoolean(row["VideosType"]))
            {
                PathFileAudio = row["VideosUrl"].ToString();
            }
            else
            {
                PathFileAudio = config.WebDomain + row["FileName"];
            }

            PathFileImg = row["ImageLarge"].ToString();


            str1 += "<div class='video_home_info' style='width:100%;'>";
            str1 += "<a href='" + ResolveUrl("~/") + "thu-vien-videos/" + GetString(row["Title"]) + "-" + row["VideosCateID"] + "-" + row["VideosID"] + ".aspx' title='" + row["Title"] + "' class='video_home_tt'>";
            str1 += row["Title"];
            str1 += "</a>";
            //str1 += "<p class='video_home_sapo'>";
            //str1 += row["Description"];
            //str1 += "</p>";
            str1 += "</div>";

            //}
            ////str2 += "</ul>";
            //   str2 += "<a class='xemthem2' href='"+ ResolveUrl("~/") + "thu-vien-video.aspx' title='Xem thêm'>Xem thêm</a>";
        }
        ltlVideoHot1.Text = str1;
        //ltlHotOther.Text = str2;

        //if (video != null)
        //{
        //    if (video.VideosType == true)
        //        ltlVideo.Text = @"<iframe title='Video Player' width='253' height='180' src='" + video.VideosUrl + "' frameborder='0' allowfullscreen=''></iframe>";
        //    else
        //        ltlVideo.Text = @"<object type='application/x-shockwave-flash' data='http://flv-player.net/medias/player_flv_multi.swf' width='253' height='180'><param name='movie' value='http://flv-player.net/medias/player_flv_multi.swf' /> <param name='allowFullScreen' value='true' /><param name='FlashVars' value='flv=" + config.WebDomain + "/Upload/Videos/Files/" + video.FileName + "&title=" + video.Title + "&startimage=" + ResolveUrl("~/") + "Upload/Videos/VideosImg/ImgThumb/" + video.ImageThumb + "&width=253&height=180&autoplay=0&autoload=0&margin=0&showstop=1&showvolume=1&showtime=2&showopen=2&showfullscreen=1&buffer=10&buffermessage=" + video.Description + "&shortcut=1&showtitleandstartimage=0' /></object>";
        //}
    }
Beispiel #8
0
    protected void initControl(int ID)
    {
        if (ID > 0)
        {
            txtID.Value = Convert.ToString(ID);
            //btn_add.Visible = false;
            btn_edit.Visible = true;

            //btn_add1.Visible = false;
            //btn_add2.Visible = false;
            btn_edit1.Visible = true;

            try
            {
                SYS_WidgetPageLayoutBSO _widgetPageLayoutBSO = new SYS_WidgetPageLayoutBSO();
                SYS_WidgetPageLayout    _widgetPageLayout    = _widgetPageLayoutBSO.GetSYS_WidgetPageLayoutById(ID);

                Bind_ddlPageLayout();
                ddlPageLayout.SelectedValue = Convert.ToString(_widgetPageLayout.PageLayoutId);

                //Bind_ddlWidgetType();
                Bind_ddlWidget(0);
                ddlWidget.SelectedValue = Convert.ToString(_widgetPageLayout.WidgetId);

                GetRegion();
                ddlRegion.SelectedValue = _widgetPageLayout.RegionId;

                txtWidgetTitle.Text = _widgetPageLayout.Title;
                hddIcon.Value       = _widgetPageLayout.Icon;
                //if (_widgetPageLayout.Icon != "")
                //    ltl_icon.Text = "<img src='" + ResolveUrl("~/") + "Upload/Widgets/Icons/" + _widgetPageLayout.Icon + "' width='48px'>";
                chkStatus.Checked = _widgetPageLayout.Status;

                hddRadInfo.Value = _widgetPageLayout.Info;
                hddRadHTML.Value = _widgetPageLayout.HTML;

                Bind_Gallary();
                if (_widgetPageLayout.Value != "0" && _widgetPageLayout.Value != "")
                {
                    VideosBSO _videoBSO = new VideosBSO();
                    Videos    _video    = _videoBSO.GetVideosById(Convert.ToInt32(_widgetPageLayout.Value));
                    if (_video != null)
                    {
                        BindVideo(_video.VideosCateID);
                        lboVideo.SelectedValue   = Convert.ToString(_widgetPageLayout.Value);
                        lboGallary.SelectedValue = Convert.ToString(_video.VideosCateID);
                    }
                }
                txtRecord.Text = _widgetPageLayout.Record.ToString();//sửa

                hddRecord2.Value = _widgetPageLayout.Record2.ToString();
                //lboGallary.SelectedValue = _widgetPageLayout.Value;  //sửa

                hddValue2.Value = _widgetPageLayout.Value2;
                hddOrders.Value = _widgetPageLayout.Orders.ToString();
            }
            catch (Exception ex)
            {
                error.Text = ex.Message.ToString();
            }
        }
        else
        {
            Page.ClientScript.RegisterOnSubmitStatement(typeof(Page), "closePage", "window.onunload = CloseWindow();");
        }
    }