Example #1
0
    private void ViewSupport()
    {
        ConfigBSO configBSO = new ConfigBSO();
        Config    config    = configBSO.GetAllConfig(Language.language);

        ltlSupport.Text = config.Support;
    }
Example #2
0
    private void Viewpopup()
    {
        ConfigBSO configBSO = new ConfigBSO();
        Config    config    = configBSO.GetAllConfig(Language.language);

        ltlPopup.Text = config.Popup;
    }
Example #3
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>";
            }
        }
    }
Example #4
0
    private void ViewWelcome(string lang)
    {
        ConfigBSO configBSO = new ConfigBSO();
        Config    config    = configBSO.GetAllConfig(lang);

        LiteralContact.Text = config.Contact;
    }
Example #5
0
    private void ViewIntro()
    {
        ConfigBSO configBSO = new ConfigBSO();
        Config    config    = configBSO.GetAllConfig(Language.language);

        ltlIntro.Text = config.Counter;
    }
Example #6
0
    private void ViewCopy(string lang)
    {
        ConfigBSO configBSO = new ConfigBSO();
        Config    config    = configBSO.GetAllConfig(lang);

        ltlFooter.Text = config.Infocompany;
    }
Example #7
0
    protected void btn_add_Click(object sender, EventArgs e)
    {
        try
        {
            ConfigBSO configBSO = new ConfigBSO();
            Config    config    = configBSO.GetAllConfig(Language.language);

            MailBSO mailBSO = new MailBSO();
            mailBSO.EmailFrom = config.Email_from;

            PhoneBookBSO emailBSO = new PhoneBookBSO();
            DataTable    table    = emailBSO.GetListPhoneBook();


            string subject = txtTitle.Text;
            string body    = txtRadFull.Content;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                mailBSO.SendMail(table.Rows[i]["Email"].ToString(), subject, body);
            }

            clientview.Text = "<div style='color:#ff0000;font:bold 12px Arial;padding:5px 0;'>Gửi mail đến danh sách người dùng thành công !</div>";
        }
        catch (Exception ex)
        {
            clientview.Text = ex.Message.ToString();
        }
    }
Example #8
0
    protected void UpdateConfig()
    {
        Config    config    = ReceiveHtml();
        ConfigBSO configBSO = new ConfigBSO();

        configBSO.UpdateConfig(config);
        initControl();
    }
Example #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!IsPostBack)
        //{
        //    string strUrl = Request.Url.AbsoluteUri;
        //    if (!strUrl.Contains("http://http://tuyensinhtructuyen.edu.vn"))
        //    {
        //        Response.Redirect("http://http://tuyensinhtructuyen.edu.vn");
        //    }
        //}

        //if (isMobileBrowser())
        //{
        //    if (!m.ToString().Equals("true"))
        //    {
        //        string url = Request.RawUrl.ToString();

        //        Response.Redirect("http://m.http://tuyensinhtructuyen.edu.vn" + url);
        //    }
        //}

        HttpCookie cookie_lang = Request.Cookies["LangInfo_CMS"];

        if (cookie_lang == null)
        {
            cookie_lang         = new HttpCookie("LangInfo_CMS");
            cookie_lang["Lang"] = "vi-VN";
            cookie_lang.Expires = DateTime.Now.AddDays(1);
            Response.Cookies.Add(cookie_lang);
        }
        Language.language = cookie_lang["Lang"].ToString();

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

        Page.Title = config.Titleweb;
        //}
        //string strPage = Request.QueryString["go"];
        string strPage = Request.QueryString["go"];

        Utils.AddWidgetPage(ResolveUrl("~"), strPage, this.Page.Request, this.Page, PlaceHolder);
        //Utils.GetNavigation(Request.QueryString["go"], Request.QueryString["g"], Request.QueryString["cid"], Request.QueryString["id"], ResolveUrl("~"));
    }
Example #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie_lang = Request.Cookies["LangInfo_CMS"];

        if (cookie_lang == null || cookie_lang["Lang"] == null || cookie_lang["Lang"] == string.Empty)
        {
            cookie_lang         = new HttpCookie("LangInfo_CMS");
            cookie_lang["Lang"] = "vi-VN";
            cookie_lang.Expires = DateTime.Now.AddDays(1);
            Response.Cookies.Add(cookie_lang);
        }
        Language.language = cookie_lang["Lang"].ToString();
        Session["Lang"]   = cookie_lang["Lang"].ToString();

        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);
        }
        Page.Title = config.Titleweb;

        if (!string.IsNullOrEmpty(Request["id"]))
        {
            SYS_WidgetPageLayoutBSO _widgetPageLayoutBSO = new SYS_WidgetPageLayoutBSO();
            SYS_WidgetPageLayout    _widgetPageLayout    = _widgetPageLayoutBSO.GetSYS_WidgetPageLayoutById(Convert.ToInt32(Request["id"].ToString()));

            if (_widgetPageLayout != null)
            {
                SYS_WidgetBSO _widgetBSO = new SYS_WidgetBSO();
                SYS_Widget    _widget    = _widgetBSO.GetSYS_WidgetById(_widgetPageLayout.WidgetId);
                if (_widget != null)
                {
                    if (_widget.WidgetControl != "")
                    {
                        Control objControl1 = (Control)this.Page.LoadControl(ResolveUrl("~") + "Client/Modules/" + _widget.WidgetDir + "/" + _widget.WidgetControl + ".ascx");
                        objControl1.ID = _widgetPageLayout.Id.ToString();
                        PlaceHolder1.Controls.Add(objControl1);

                        //  PlaceHolder1.Controls.Add(LoadControl(ResolveUrl("~") + _widget.WidgetDir + "/" + _widget.WidgetControl));

                        ControlAddParameter(objControl1, _widgetPageLayout.Title, _widgetPageLayout.Icon, _widgetPageLayout.Value, Convert.ToInt32(_widgetPageLayout.Record), _widgetPageLayout.Info, _widgetPageLayout.Value2, Convert.ToInt32(_widgetPageLayout.Record2), _widgetPageLayout.HTML);
                    }
                }
            }
        }
    }
Example #11
0
    protected void btn_GetPass_Click(object sender, EventArgs e)
    {
        string email = txtEmail.Text.Trim();

        AdminBSO adminBSO = new AdminBSO();
        Admin    admin    = adminBSO.GetAdminByEmail(email);


        if (admin != null)
        {
            SecurityBSO securityBSO = new SecurityBSO();
            string      oldpass     = admin.AdminPass;
            string      newpass     = securityBSO.DecPwd(oldpass);

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

            MailBSO mailBSO = new MailBSO();
            mailBSO.EmailFrom = config.Email_from;

            string subject = "Mật khẩu tài khoản quản trị - " + config.WebName;
            string body    = "Chào bạn :  " + admin.AdminFullName + "<br>";
            body += "Hệ thống quản trị - " + config.WebName + " thông báo mật khẩu hệ thống của bạn: <br>";
            body += "Tài khoản Email đăng nhập của bạn :  " + admin.AdminEmail + "<br>";
            body += "Mật khẩu đăng nhập hệ thống của bạn :  " + newpass;

            if (mailBSO.SendMail(email, subject, body) == true)
            {
                Tool.Message(this.Page, "Thông tin tài khoản đã được gửi tới Email của bạn!");
                return;
            }
            else
            {
                Tool.Message(this.Page, "Hệ thống Mail lỗi! Không thể gửi được thông tin tài khoản, vui lòng thử lại sau.");
                return;
            }
        }
        else
        {
            Tool.Message(this.Page, "Xin lỗi! Chúng tôi không tìm thấy tài khoản của bạn trong hệ thống");
            return;
        }
    }
Example #12
0
    protected void initControl()
    {
        ConfigBSO configBSO = new ConfigBSO();
        Config    config    = configBSO.GetAllConfig(Language.language);

        txttitleweb.Text     = config.Titleweb;
        txtgoogle.Text       = config.Google;
        txtIntro_desc.Text   = config.Intro_desc;
        txtIntroduction.Text = config.Introduction;
        txtInfocompany.Text  = config.Infocompany;
        new_icon_w.Text      = config.New_icon_w;
        new_icon_h.Text      = config.New_icon_h;
        new_thumb_w.Text     = config.New_thumb_w;
        new_thumb_h.Text     = config.New_thumb_h;
        new_large_w.Text     = config.New_large_w;
        new_large_h.Text     = config.New_large_h;

        product_icon_w.Text  = config.Product_icon_w;
        product_icon_h.Text  = config.Product_icon_h;
        product_thumb_w.Text = config.Product_thumb_w;
        product_thumb_h.Text = config.Product_thumb_h;
        product_large_w.Text = config.Product_large_w;
        product_large_h.Text = config.Product_large_h;

        txtNoproduct.Text = config.ProductNo;
        txtNoPage.Text    = config.ProductNoPage;
        txtCurrency.Text  = config.Currency;

        rdblistClose.Checked = config.Status;
        txtCloseComment.Text = config.Closecomment;

        txtRadSupport.Text = config.Support;
        txtRadContact.Text = config.Contact;

        txtEmailFrom.Text = config.Email_from;
        txtEmailTo.Text   = config.Email_to;

        RadCounter.Text = config.Counter;
        RadInfo1.Text   = config.Info1;
        RadInfo2.Text   = config.Info2;

        txtWebName.Text       = config.WebName;
        txtWebServerIP.Text   = config.WebServerIP;
        txtWebDomain.Text     = config.WebDomain;
        txtWebMailServer.Text = config.WebMailServer;

        rdbPopup.Checked = config.IsPopup;
        radPopup.Text    = config.Popup;
        radPopup2.Text   = config.Popup2;
    }
Example #13
0
    protected void btn_add_faqs(object sender, EventArgs e)
    {
        Faqs obj = ReceiveHtml();

        if (txtCapcha.Text.ToLower() == Session["Random"].ToString().ToLower())
        {
            FaqsBSO     objBSO      = new FaqsBSO();
            FaqsCateBSO faqscateBSO = new FaqsCateBSO();
            FaqsCate    _faqCate    = faqscateBSO.GetFaqsCateById(obj.FaqsCateID);

            int i = objBSO.CreateFaqsGet(obj);

            string strBody = "<b>Thông tin khách hàng : </b><br/>";
            strBody += "<b>Họ tên khách hàng : </b> " + obj.FullName + "<br/>";
            strBody += "<b>Email : </b> " + obj.Email + "<br/>";
            strBody += "<b>Điện thoại : </b> " + obj.Phone + "<br/>";
            strBody += "<b>Đơn vị công tác : </b> " + obj.Department + "<br/>";
            strBody += "<b>Địa chỉ : </b> " + obj.Address + "<br/><br/>";
            strBody += "<b>Thông tin yêu cầu hỗ trợ : </b> <br/>";
            strBody += "<b>Tiêu đề : </b> " + obj.Title + "<br/><br/>";
            strBody += "<b>Nội dung yêu cầu : </b> " + obj.Contents + "<br/><br/>";
            strBody += "<a href='" + Variables.sWebRoot + "d3/faqs/" + GetString(obj.Title) + "-" + obj.FaqsID + ".aspx'><b>Xem chi tiết</b></a>";
            strBody += "<br/>";

            ConfigBSO configBSO = new ConfigBSO();
            Config    config    = configBSO.GetAllConfig(Language.language);

            MailBSO mailBSO = new MailBSO();
            mailBSO.EmailFrom = config.Email_from;

            string strObj = "Thông tin yêu cầu hỗ trợ trên website " + config.WebName + " ngày: " + DateTime.Now.ToString("dd:MM:yyyy");
            mailBSO.SendMail(config.Email_to, strObj, strBody);

            //string strObj1 = "Website Thoitrangdongphuc.com.vn tran trong cam on ";
            //mailBSO.SendMail(obj.Email, strObj1, contentMail());

            //string strObj3 = "Website Thoitrangdongphuc.com.vn gioi thieu ";
            //mailBSO.SendMail(obj.Email, strObj3, contentSendMail());

            Tool.Message(this.Page, "Cám ơn bạn đã gửi yêu cầu hỗ trợ đến chúng tôi, tất cả các thông tin bạn yêu cầu chúng tôi sẽ trả lời ngay khi chúng tôi nhận được. Trân trọng!");
        }
        else
        {
            Tool.Message(this.Page, "Sai mã xác nhận. Trân trọng!");
        }
    }
    private void ViewWelcome(string lang)
    {
        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);
        }
        ltlFooter.Text = config.Introduction;
    }
Example #15
0
    private void ViewCopy(string lang)
    {
        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);
        }

        ltlLink.Text = config.Info2;
    }
Example #16
0
    protected void contact_Click(object sender, EventArgs e)
    {
        try
        {
            Contact contact = ReceiveHtml();
            if (txtCapcha.Text.ToLower() == Session["Random"].ToString().ToLower())
            {
                ContactBSO contactBSO = new ContactBSO();
                contactBSO.CreateContact(contact);

                ConfigBSO configBSO = new ConfigBSO();
                Config    config    = configBSO.GetAllConfig(Language.language);

                string strBody = "Thông tin liên hệ tới Website " + config.WebName + " (" + config.WebDomain + "): <br>";
                strBody += "<b>Họ tên  : </b> " + NameContact.Text + "<br>";
                strBody += "<b>Cơ quan công tác : </b> " + Company.Text + "<br>";
                strBody += "<b>Địa chỉ : </b> " + Address.Text + "<br>";
                strBody += "<b>Thành phố : </b> " + City.Text + "<br>";
                strBody += "<b>Điện thoại : </b> " + Telephone.Text + "<br>";
                strBody += "<b>Fax : </b> " + Fax.Text + "<br>";

                strBody += "<b>Email : </b> " + Email.Text + "<br>";
                strBody += "<b>Nội dung Yêu cầu : </b> " + Require.Text + "<br>";

                MailBSO mailBSO = new MailBSO();


                //       mailBSO.EmailFrom = Email.Value;
                mailBSO.EmailFrom = config.Email_from;
                string strObj = "Thông tin liên hệ tới quản trị viên website " + config.WebName + " (" + config.WebDomain + ") - Ngày " + DateTime.Now.ToString("dd:MM:yyyy");
                mailBSO.SendMail(config.Email_to, strObj, strBody);

                form_register.Visible      = false;
                form_register_send.Visible = true;

                ltlSucceed1.Text = Resources.resource.Contact_succeed1;
                //ltlSucceed2.Text = Resources.resource.Contact_succeed2; ;
            }
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message.ToString());
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie_lang = Request.Cookies["LangInfo_CMS"];

        if (cookie_lang == null || cookie_lang["Lang"] == null || cookie_lang["Lang"] == string.Empty)
        {
            cookie_lang         = new HttpCookie("LangInfo_CMS");
            cookie_lang["Lang"] = "vi-VN";
            cookie_lang.Expires = DateTime.Now.AddDays(1);
            Response.Cookies.Add(cookie_lang);
        }
        Language.language = cookie_lang["Lang"].ToString();
        Session["Lang"]   = cookie_lang["Lang"].ToString();

        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);
        }
        Page.Title = config.Titleweb;

        if (!string.IsNullOrEmpty(Request["type"]))
        {
            SYS_WidgetTypeBSO _widgetTypeBSO = new SYS_WidgetTypeBSO();
            SYS_WidgetType    _widgetType    = _widgetTypeBSO.GetSYS_WidgetTypeById(Convert.ToInt32(Request["type"].ToString()));

            if (_widgetType != null)
            {
                if (_widgetType.WidgetControl != "")
                {
                    PlaceHolder1.Controls.Add(LoadControl(ResolveUrl("~") + _widgetType.WidgetDir + "/" + _widgetType.WidgetControl));
                }
            }
        }
    }
Example #18
0
    private void ViewTextMarquee()
    {
        ConfigBSO configBSO = new ConfigBSO();
        Config    config    = configBSO.GetAllConfig(Language.language);

        ltlTextMarquee.Text = config.Intro_desc;
        //DataTable table = new DataTable();
        //table.Columns.Add("data");
        //DataRow datarow = table.NewRow();
        //DataRow datarow1 = table.NewRow();
        //datarow["data"] = config.Intro_desc;
        //datarow1["data"] = config.Intro_desc;

        //table.Rows.Add(datarow);
        //table.Rows.Add(datarow1);

        //Rotator1.DataSource = table;
        //Rotator1.DataBind();
    }
Example #19
0
    protected void Send_Click(object sender, EventArgs e)
    {
        NewsComment newsComment = ReceiveHtml();

        if (txtCapcha.Text.ToLower() == Session["Random"].ToString().ToLower())
        {
            NewsCommentBSO newsCommentBSO = new NewsCommentBSO();
            newsCommentBSO.CreateNewsComment(newsComment);

            ConfigBSO configBSO = new ConfigBSO();
            Config    config    = configBSO.GetAllConfig(Language.language);

            string strBody = Resources.resource.T_Comment_email_title + config.WebName + " (" + config.WebDomain + ") : <br>";
            strBody += "<b>" + Resources.resource.T_Comment_Title + ": </b> " + newsComment.Title + "<br>";
            strBody += "<b>" + Resources.resource.T_Comment_Name + " : </b> " + newsComment.FullName + "<br>";

            strBody += "<b>" + Resources.resource.T_Comment_Email + " : </b> " + newsComment.Email + "<br>";
            strBody += "<b>" + Resources.resource.T_Comment_ID + " : </b> " + newsComment.NewsID + "<br>";
            strBody += "<b>" + Resources.resource.T_Comment_Content + " : </b> <br>" + newsComment.Content + "<br>";

            NewsGroupBSO newsBSO = new NewsGroupBSO();
            NewsGroup    news    = newsBSO.GetNewsGroupById(newsComment.NewsID);

            strBody += "<b>Title : </b>  <a href='" + config.WebDomain + "/d4/news/" + GetString(news.Title) + "-" + hddGroupCate.Value + "-" + newsComment.NewsID + ".aspx'>" + news.Title + "</a><br>";

            MailBSO mailBSO = new MailBSO();
            mailBSO.EmailFrom = newsComment.Email;



            mailBSO.EmailFrom = config.Email_from;

            string strObj = Resources.resource.T_Comment_email_title + config.WebName + " (" + config.WebDomain + ") - Date: " + DateTime.Now.ToString("dd:MM:yyyy");
            mailBSO.SendMail(config.Email_to, strObj, strBody);



            int Id = Convert.ToInt32(txtNewsGroupID.Value);
            Response.Redirect("~/d5/news/" + GetString(news.Title) + "-" + hddGroupCate.Value + "-" + Id + "-2.aspx");
        }
    }
Example #20
0
    protected void btn_Send_Click(object sender, EventArgs e)
    {
        int Id = 0;

        if (!String.IsNullOrEmpty(Request["Id"]))
        {
            int.TryParse(Request["Id"], out Id);
        }

        NewsGroupBSO newsBSO   = new NewsGroupBSO();
        NewsGroup    news      = newsBSO.GetNewsGroupById(Id);
        ConfigBSO    configBSO = new ConfigBSO();
        Config       config    = configBSO.GetAllConfig(Language.language);

        string email = txtEmail.Text.Trim();

        string strBody = "Bản tin từ Website " + config.WebName + " (" + config.WebDomain + ") : <br>";

        strBody += "<b>" + news.Title + "</b> <br>";
        strBody += "<img src='" + config.WebDomain + "/Upload/NewsGroup/NewsGroupThumb/" + news.ImageThumb + "' align='left' border='0' hspace='5'>";
        strBody += "<b>" + news.ShortDescribe + "</b> <br>";
        strBody += news.FullDescribe + "<br>";
        strBody += news.Author + "<br>";

        strBody += "<b>Liên kết đến bản tin : </b>  <a href='" + config.WebDomain + "/News/" + news.GroupCate + "/" + news.NewsGroupID + "/" + GetString(news.Title) + ".aspx'>" + news.Title + "</a><br>";



        MailBSO mailBSO = new MailBSO();



        mailBSO.EmailFrom = config.Email_from;

        string strObj = "Bản tin từ Website " + config.WebName + " (" + config.WebDomain + ") - Ngày:  " + DateTime.Now.ToString("dd:MM:yyyy");

        mailBSO.SendMail(email, strObj, strBody);


        Response.Redirect("~/MailNews/" + Id + "/" + email + "/Default.aspx");
    }
Example #21
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();
    }
Example #22
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>";
        //}
    }
Example #23
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;
    }
Example #24
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>";
        //}
    }
Example #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie_lang = Request.Cookies["LangInfo_CMS"];

        if (cookie_lang == null || cookie_lang["Lang"] == null || cookie_lang["Lang"] == string.Empty)
        {
            cookie_lang         = new HttpCookie("LangInfo_CMS");
            cookie_lang["Lang"] = "vi-VN";
            cookie_lang.Expires = DateTime.Now.AddDays(1);
            Response.Cookies.Add(cookie_lang);
        }
        Language.language = cookie_lang["Lang"].ToString();
        Session["Lang"]   = cookie_lang["Lang"].ToString();

        ETO.Config config = new ETO.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 = (ETO.Config)AspNetCache.GetCache("Config_" + Language.language);
        }
        Page.Title = config.Titleweb;

        ModulesBSO _moduleBSO = new ModulesBSO();
        Modules    _module    = new Modules();

        //string _userName = "";
        //HttpCookie cookie = Request.Cookies["UserInfor_EVNTIT"];
        //if (cookie != null && cookie["UserName"] != null && cookie["UserName"].Trim() != string.Empty)
        //{
        //    _userName = cookie["UserName"];
        //}
        //_userName = //(string)AspNetCache.GetCache(GetIpAddress());

        //Session["Admin_Username"] = _userName;

        //if (Session["Admin_Username"] == null)
        //{
        //    if (!string.IsNullOrEmpty(Request["dll"]))
        //    {
        //        if (Request["dll"].Equals("login"))
        //            Response.Redirect("~/Admin/Login.aspx");
        //         //   PlaceHolder1.Controls.Add(LoadControl("Client/Admin/Login.ascx"));
        //        else
        //            Response.Redirect("~/Default.aspx");
        //    }
        //    else
        //        Response.Redirect("~/Default.aspx");
        //}
        if (!this.m_UserValidation.IsSigned())
        {
            if (!string.IsNullOrEmpty(Request["dll"]) && Request["dll"].Equals("login"))
            {
                Response.Redirect("~/Admin/Login.aspx");
            }
            else
            {
                Response.Redirect("~/Default.aspx");
            }
        }
        else
        {
            Session["Admin_Username"] = m_UserValidation.UserName;

            if (!string.IsNullOrEmpty(Request["dll"]))
            {
                if (CheckExit(Request["dll"].ToString()))
                {
                    bool levelAdmin = CheckLevelAdmin(Request["dll"].ToString(), Session["Admin_UserName"].ToString());
                    if (levelAdmin == true)
                    {
                        _module = _moduleBSO.GetModulesBySlug(Request["dll"].ToString());

                        PlaceHolder1.Controls.Add(LoadControl("Client/Admin/" + _module.ModulesDir + "/" + _module.ModulesUrl + ".ascx"));
                    }
                    else
                    if (Request["dll"].Equals("login"))
                    {
                        // PlaceHolder1.Controls.Add(LoadControl("Client/Admin/Login.ascx"));
                        Response.Redirect("~/Admin/Login.aspx");
                    }
                    else
                    {
                        Response.Redirect("~/Default.aspx");
                    }
                }
                else
                {
                    if (Request["dll"].Equals("login"))
                    {
                        // PlaceHolder1.Controls.Add(LoadControl("Client/Admin/Login.ascx"));
                        Response.Redirect("~/Admin/Login.aspx");
                    }
                    else
                    {
                        Response.Redirect("~/Admin/home/Default.aspx");
                    }
                }
            }
            else
            {
                Response.Redirect("~/Default.aspx");
            }
        }
    }