private void getInfo() { try { var G_info = DB.GetTable <ESHOP_CONFIG>().OrderBy(c => c.CONFIG_ID).Take(1); if (G_info.ToList().Count > 0) { txtSeoTitle.Value = G_info.ToList()[0].CONFIG_TITLE; txtSeoDesc.Value = G_info.ToList()[0].CONFIG_DESCRIPTION; txtSeoKeyword.Value = G_info.ToList()[0].CONFIG_KEYWORD; txtSeoTitleEn.Value = G_info.ToList()[0].CONFIG_TITLE_EN; txtSeoDescEn.Value = G_info.ToList()[0].CONFIG_DESCRIPTION_EN; txtSeoKeywordEn.Value = G_info.ToList()[0].CONFIG_KEYWORD_EN; ColorPicker1.Color = G_info.ToList()[0].CONFIG_FIELD2; //image if (!string.IsNullOrEmpty(G_info.ToList()[0].CONFIG_FAVICON)) { trUpload.Visible = false; trFile.Visible = true; hplFile.NavigateUrl = PathFiles.GetPathConfigs() + G_info.ToList()[0].CONFIG_FAVICON; hplFile.Text = G_info.ToList()[0].CONFIG_FAVICON; ltrImage.Text = "<img src='" + PathFiles.GetPathConfigs() + G_info.ToList()[0].CONFIG_FAVICON + "' border='0'>"; } else { trUpload.Visible = true; trFile.Visible = false; } //imageBG if (!string.IsNullOrEmpty(G_info.ToList()[0].CONFIG_FIELD1)) { trUploadBG.Visible = false; trFileBG.Visible = true; hplFileBG.NavigateUrl = PathFiles.GetPathConfigs() + G_info.ToList()[0].CONFIG_FIELD1; hplFileBG.Text = G_info.ToList()[0].CONFIG_FIELD1; ltrImageBG.Text = "<img src='" + PathFiles.GetPathConfigs() + G_info.ToList()[0].CONFIG_FIELD1 + "' border='0' width='400px'>"; } else { trUploadBG.Visible = true; trFileBG.Visible = false; } } else { trUpload.Visible = true; trFile.Visible = false; trUploadBG.Visible = true; trFileBG.Visible = false; } } catch (Exception ex) { clsVproErrorHandler.HandlerError(ex); } }
protected void Page_Load(object sender, EventArgs e) { _id1 = Utils.CIntDef(Request["id1"]); _id2 = Utils.CIntDef(Request["id2"]); var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "So sánh"; if (!IsPostBack) { getInfo(_id1, Hyname1, Hyperimg1, Lbdesc1, Lbprice1, Lbbaohanh1, Lbxuatxu1, lbthuonghieu1); getInfo(_id2, Hyname2, Hyperimg2, Lbdesc2, Lbprice2, Lbbaohanh2, Lbxuatxu2, lbthuonghieu2); } }
protected void Page_Load(object sender, EventArgs e) { _sCat_Seo_Url = Utils.CStrDef(Request.QueryString["curl"]); _sNewsSeoUrl = Utils.CStrDef(Request.QueryString["purl"]); ShowNewsInfo(); load_logo(); Show_File_HTML(); var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "In"; }
protected void Page_Load(object sender, EventArgs e) { Guid _guid = (Guid)Session["news_guid"]; if (!IsPostBack) { Load_Cart(_guid); Lbtotal.Text = fm.FormatMoney(cart.Total_Amount(_guid)); } var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "Giỏ hàng"; }
protected void Page_Load(object sender, EventArgs e) { _iUserID = Utils.CIntDef(Session["USER_ID"]); if (_iUserID != 0) { Response.Redirect("/thanh-toan-buoc-2.html"); } var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "Thanh toán"; Guid _guid = (Guid)Session["news_guid"]; if (!pay.Check_Cart(_guid)) { Response.Redirect("/", false); } }
protected void Page_Load(object sender, EventArgs e) { _idorder = Utils.CIntDef(Request["orderid"]); var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "Hoàn tất đơn đặt hàng"; if (!IsPostBack) { loadOrder(); } }
public void Bind_meta_tags_index() { HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } header.Title = _configs.ToList()[0].CONFIG_TITLE; headerDes.Content = _configs.ToList()[0].CONFIG_DESCRIPTION; header.Controls.Add(headerDes); headerKey.Content = _configs.ToList()[0].CONFIG_KEYWORD; header.Controls.Add(headerKey); } else { header.Title = "Enews Standard V1.0"; headerDes.Content = "Enews Standard V1.0"; header.Controls.Add(headerDes); headerKey.Content = "Enews Standard V1.0"; header.Controls.Add(headerKey); } }
protected void Page_Load(object sender, EventArgs e) { Session["USER_ID"] = Utils.CStrDef(HttpContext.Current.Request.Cookies["PITM_NGUOIDUNG_INFO"]["PITM_USER_ID"]); Session["USER_UN"] = Utils.CStrDef(HttpContext.Current.Request.Cookies["PITM_NGUOIDUNG_INFO"]["PITM_USER_UN"]); Session["USER_NAME"] = Utils.CStrDef(HttpContext.Current.Request.Cookies["PITM_NGUOIDUNG_INFO"]["PITM_USER_NAME"]); Session["GROUP_ID"] = Utils.CStrDef(HttpContext.Current.Request.Cookies["PITM_NGUOIDUNG_INFO"]["PITM_GROUP_ID"]); Session["GROUP_TYPE"] = Utils.CStrDef(HttpContext.Current.Request.Cookies["PITM_NGUOIDUNG_INFO"]["PITM_GROUP_TYPE"]); if (Utils.CIntDef(Session["GROUP_TYPE"]) == 0) { Response.Redirect("login.aspx"); } var _configs = db.GetTable <ESHOP_CONFIG>().OrderBy(c => c.CONFIG_ID).Take(1); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } UserControl ucmenuMain = Page.LoadControl("../UIs/Menu.ascx") as UserControl; UserControl ucmenuDefault = Page.LoadControl("../UIs/MenuDefault.ascx") as UserControl; if (Request.RawUrl.Contains("default.aspx")) { Plmenu.Controls.Add(ucmenuDefault); } else { Plmenu.Controls.Add(ucmenuMain); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadTitle(); } var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "Book Tour"; }
protected void Page_Load(object sender, EventArgs e) { _iUserID = Utils.CIntDef(Session["USER_ID"]); if (_iUserID == 0) { Response.Redirect("/"); } var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "Thông tin cá nhân"; if (!IsPostBack) { Load_city(); Load_distric(-1); Loaduser_info(); } }
protected void Page_Load(object sender, EventArgs e) { HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } header.Title = "Giới thiệu"; headerDes.Content = _configs.ToList()[0].CONFIG_DESCRIPTION; header.Controls.Add(headerDes); headerKey.Content = _configs.ToList()[0].CONFIG_KEYWORD; header.Controls.Add(headerKey); } else { header.Title = "Enews Standard V1.0"; headerDes.Content = "Enews Standard V1.0"; header.Controls.Add(headerDes); headerKey.Content = "Enews Standard V1.0"; header.Controls.Add(headerKey); } }
public static string setbackgroup() { var _configs = new Config().Config_meta(); if (_configs != null && _configs.ToList().Count > 0 && !string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FIELD1)) { return("background: url(" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FIELD1 + ") center center;"); } return("background: url(/Resources/images/bg-default.jpg) center center;"); }
private void CreateDirectory() { m_pathFile = PathFiles.GetPathConfigs(); if (!Directory.Exists(Server.MapPath(m_pathFile))) { Directory.CreateDirectory(Server.MapPath(m_pathFile)); } Session["FileManager"] = m_pathFile; }
private void Bind_icon() { var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } }
protected void Page_Load(object sender, EventArgs e) { var _configs = db.GetTable <ESHOP_CONFIG>().OrderBy(c => c.CONFIG_ID).Take(1); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } }
protected void Page_Load(object sender, EventArgs e) { HttpCookie cookie = setckdv.GetCookie(); string devicechar = Request.UserAgent.ToLower(); if (Request.Cookies["deviceck"] != null) { if (cookie.HasKeys) { device = 1; } else if (Request.Browser.IsMobileDevice) { device = 1; } } else if (Request.Browser.IsMobileDevice || devicechar.Contains("mobile") || devicechar.Contains("ipad")) { device = 1; } if (device == 1) { Response.Redirect("/m-dang-ky.html"); } var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "Đăng ký thành viên"; if (!IsPostBack) { Load_city(); Load_distric(-1); loadYear(); loadMonth(); loadDay(); } }
protected void Page_Load(object sender, EventArgs e) { HttpCookie cookie = setckdv.GetCookie(); string devicechar = Request.UserAgent.ToLower(); if (Request.Cookies["deviceck"] != null) { if (cookie.HasKeys) { device = 1; } else if (Request.Browser.IsMobileDevice) { device = 1; } } else if (Request.Browser.IsMobileDevice || devicechar.Contains("mobile") || devicechar.Contains("ipad") && Session["devicefirts"] == null) { device = 1; } if (device == 1) { Response.Redirect("/m-lien-he.html"); } if (!IsPostBack) { Show_File_HTML("contact-vi.htm", 0); Show_File_HTML("contact-e.htm", 1); } var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "Liên hệ"; }
protected void Page_Load(object sender, EventArgs e) { Session["home"] = 0; //if (Request.Browser.IsMobileDevice) // Response.Redirect("http://m.shopbacsi.com/"); HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } header.Title = _configs.ToList()[0].CONFIG_TITLE; headerDes.Content = _configs.ToList()[0].CONFIG_DESCRIPTION; header.Controls.Add(headerDes); headerKey.Content = _configs.ToList()[0].CONFIG_KEYWORD; header.Controls.Add(headerKey); } else { header.Title = "Enews Standard V1.0"; headerDes.Content = "Enews Standard V1.0"; header.Controls.Add(headerDes); headerKey.Content = "Enews Standard V1.0"; header.Controls.Add(headerKey); } UserControl main = null; if (device == 0) { main = Page.LoadControl("/Uis/main.ascx") as UserControl; } else { main = Page.LoadControl("/MOBILE/Uis/main.ascx") as UserControl; } Plmain.Controls.Add(main); }
private string Chuoiheader_footer(int type) { string pathFile; string strHTMLContent = string.Empty; pathFile = type == 1 ? Server.MapPath(PathFiles.GetPathConfigs() + "/header_baogia.htm") : Server.MapPath(PathFiles.GetPathConfigs() + "/footer_baogia.htm"); if ((File.Exists(pathFile))) { StreamReader objNewsReader; //objNewsReader = New StreamReader(pathFile, System.Text.Encoding.Default) objNewsReader = new StreamReader(pathFile); strHTMLContent = objNewsReader.ReadToEnd(); objNewsReader.Close(); } return(strHTMLContent); }
protected void Page_Load(object sender, EventArgs e) { var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "Thanh toán"; Guid _guid = (Guid)Session["news_guid"]; if (!pay.Check_Cart(_guid)) { Response.Redirect("/", false); } if (!IsPostBack) { Load_Cart(_guid); decimal totalmn = carts.Total_Amount(_guid); lbtotalmoney.Text = fm.FormatMoney(totalmn); if (Session["price"] != null) { _ship = Utils.CIntDef(Session["price"]); totalmn += _ship != -1 ? _ship : 0; Lbtotal.Text = fm.FormatMoney(totalmn); Lbship.Text = _ship > 0 ? fm.FormatMoney(_ship) : (_ship == 0 ? "Miễn phí" : "Liên hệ"); } else { Lbtotal.Text = fm.FormatMoney(totalmn); } loadInfo(); } }
private string getFooter() { string pathFile; string strHTMLContent = string.Empty; pathFile = Server.MapPath(PathFiles.GetPathConfigs() + "/footersendmail.htm"); if ((File.Exists(pathFile))) { StreamReader objNewsReader; //objNewsReader = New StreamReader(pathFile, System.Text.Encoding.Default) objNewsReader = new StreamReader(pathFile); strHTMLContent = objNewsReader.ReadToEnd(); objNewsReader.Close(); } return(strHTMLContent); }
protected void Page_Load(object sender, EventArgs e) { var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "Thông báo lỗi"; lbl_thongbao.Text = "Bạn vui lòng nhấn vào đây để quay lại <a href='/'><b>" + Utils.CStrDef(System.Configuration.ConfigurationManager.AppSettings["EmailDisplayName"]) + "</b></a>"; }
protected void Page_Load(object sender, EventArgs e) { code = Utils.CStrDef(Request["code"]); confimEmail(); var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } HtmlHead header = base.Header; HtmlMeta headerDes = new HtmlMeta(); HtmlMeta headerKey = new HtmlMeta(); headerDes.Name = "Description"; headerKey.Name = "Keywords"; header.Title = "Thank you"; }
protected void btnDeleteBG_Click(object sender, ImageClickEventArgs e) { string strLink = ""; try { var n_info = DB.GetTable <ESHOP_CONFIG>().OrderBy(c => c.CONFIG_ID).Take(1); if (n_info.ToList().Count > 0) { if (!string.IsNullOrEmpty(n_info.ToList()[0].CONFIG_FIELD1)) { string imagePath = Server.MapPath(PathFiles.GetPathConfigs() + n_info.ToList()[0].CONFIG_FIELD1); n_info.ToList()[0].CONFIG_FIELD1 = ""; DB.SubmitChanges(); if (File.Exists(imagePath)) { File.Delete(imagePath); } strLink = "config_meta.aspx"; } } } catch (Exception ex) { clsVproErrorHandler.HandlerError(ex); } finally { if (!string.IsNullOrEmpty(strLink)) { Response.Redirect(strLink); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Session.Remove("USER_ID"); //Session.Remove("USER_UN"); //Session.Remove("USER_NAME"); //Session.Remove("GROUP_ID"); //Session.Remove("GROUP_TYPE"); txtUN.Attributes.Add("onKeyPress", Common.getSubmitScript(lbtLogin.ClientID)); txtPW.Attributes.Add("onKeyPress", Common.getSubmitScript(lbtLogin.ClientID)); var _configs = DB.GetTable <ESHOP_CONFIG>().OrderBy(c => c.CONFIG_ID).Take(1); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } } }
protected void Page_Load(object sender, EventArgs e) { Session["USER_ID"] = Utils.CStrDef(HttpContext.Current.Request.Cookies["PITM_NGUOIDUNG_INFO"]["PITM_USER_ID"]); Session["USER_UN"] = Utils.CStrDef(HttpContext.Current.Request.Cookies["PITM_NGUOIDUNG_INFO"]["PITM_USER_UN"]); Session["USER_NAME"] = Utils.CStrDef(HttpContext.Current.Request.Cookies["PITM_NGUOIDUNG_INFO"]["PITM_USER_NAME"]); Session["GROUP_ID"] = Utils.CStrDef(HttpContext.Current.Request.Cookies["PITM_NGUOIDUNG_INFO"]["PITM_GROUP_ID"]); Session["GROUP_TYPE"] = Utils.CStrDef(HttpContext.Current.Request.Cookies["PITM_NGUOIDUNG_INFO"]["PITM_GROUP_TYPE"]); //Session["NN"] = Utils.CStrDef(HttpContext.Current.Request.Cookies["PITM_NGUOIDUNG_INFO"]["NN"]); UserControl ucLeftAdmin = Page.LoadControl("../ucControls/ucLeftmenu.ascx") as UserControl; UserControl ucLeftEditor = Page.LoadControl("../ucControls/ucLeftmenu_editor.ascx") as UserControl; if (Utils.CIntDef(Session["GROUP_TYPE"]) == 1) { phdLeft.Controls.Add(ucLeftAdmin); } else if (Utils.CIntDef(Session["GROUP_TYPE"]) == 2) { phdLeft.Controls.Add(ucLeftEditor); } else { phdLeft.Controls.Add(ucLeftAdmin); } //Response.Redirect("login.aspx"); var _configs = db.GetTable <ESHOP_CONFIG>().OrderBy(c => c.CONFIG_ID).Take(1); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } }
protected void Page_Load(object sender, EventArgs e) { try { var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } UserControl list_pro = Page.LoadControl("../Usercontrols/ListProject.ascx") as UserControl; UserControl prodetails = Page.LoadControl("../Usercontrols/ProjectDetail.ascx") as UserControl; UserControl list_news = Page.LoadControl("../Usercontrols/ListNews.ascx") as UserControl; UserControl details_news = Page.LoadControl("../Usercontrols/NewsDetail.ascx") as UserControl; //UserControl search = Page.LoadControl("../Usercontrols/Search.ascx") as UserControl; int _type = Utils.CIntDef(Request["type"]); string _catSeoUrl = Utils.CStrDef(Request.QueryString["curl"]); string _newsSeoUrl = Utils.CStrDef(Request.QueryString["purl"]); switch (_type) { case 3: getsession.LoadCatInfo(_catSeoUrl); Bind_meta_tags_cat(); if (Utils.CIntDef(Session["Cat_type"]) == 1) { phdMain.Controls.Add(list_pro); } else { if (Utils.CIntDef(Session["Cat_showitem"]) == 1) { phdMain.Controls.Add(details_news); } else { phdMain.Controls.Add(list_news); } } break; //case 5: // phdMain.Controls.Add(search); // HtmlHead header = base.Header; // header.Title = "Tìm kiếm"; // break; case 6: getsession.LoadNewsInfo(_newsSeoUrl); Bind_meta_tags_news(); if (getsession.Getcat_type(_newsSeoUrl) == 1) { phdMain.Controls.Add(prodetails); } else { phdMain.Controls.Add(details_news); } break; default: Response.Redirect("/trang-chu.html"); break; } } catch (Exception ex) { clsVproErrorHandler.HandlerError(ex); } }
private void SaveInfo(string strLink = "") { try { //get image string Banner_File; if (trUpload.Visible == true) { if (fileImage1.PostedFile != null) { Banner_File = Path.GetFileName(fileImage1.PostedFile.FileName); } else { Banner_File = ""; } } else { Banner_File = hplFile.Text; } if (m_banner_id == 0) { //insert ESHOP_BANNER g_insert = new ESHOP_BANNER(); g_insert.BANNER_DESC = txtTitle.Value; g_insert.BANNER_LANGUAGE = Utils.CIntDef(rblLanguage.SelectedValue); g_insert.BANNER_TYPE = Utils.CIntDef(rblBannerType.SelectedValue); g_insert.BANNER_ORDER = Utils.CIntDef(txtOrder.Value); g_insert.BANNER_FILE = Banner_File; g_insert.BANNER_FIELD1 = Utils.CStrDef(rblLogoBanner.SelectedValue); DB.ESHOP_BANNERs.InsertOnSubmit(g_insert); DB.SubmitChanges(); //get new id var _new = DB.GetTable <ESHOP_BANNER>().OrderByDescending(g => g.BANNER_ID).Take(1); m_banner_id = _new.Single().BANNER_ID; strLink = string.IsNullOrEmpty(strLink) ? "config_banner.aspx?banner_id=" + m_banner_id : strLink; } else { //update var g_update = DB.GetTable <ESHOP_BANNER>().Where(g => g.BANNER_ID == m_banner_id); if (g_update.ToList().Count > 0) { g_update.Single().BANNER_DESC = txtTitle.Value; g_update.Single().BANNER_LANGUAGE = Utils.CIntDef(rblLanguage.SelectedValue); g_update.Single().BANNER_TYPE = Utils.CIntDef(rblBannerType.SelectedValue); g_update.Single().BANNER_ORDER = Utils.CIntDef(txtOrder.Value); g_update.Single().BANNER_FILE = Banner_File; g_update.Single().BANNER_FIELD1 = Utils.CStrDef(rblLogoBanner.SelectedValue); DB.SubmitChanges(); strLink = string.IsNullOrEmpty(strLink) ? "config_banner.aspx?banner_id=" + m_banner_id : strLink; } } //update images if (trUpload.Visible) { if (!string.IsNullOrEmpty(fileImage1.PostedFile.FileName)) { string pathfile = Server.MapPath(PathFiles.GetPathConfigs() + m_banner_id); string fullpathfile = pathfile + "/" + Banner_File; if (!Directory.Exists(pathfile)) { Directory.CreateDirectory(pathfile); } fileImage1.PostedFile.SaveAs(fullpathfile); } } } catch (Exception ex) { clsVproErrorHandler.HandlerError(ex); } finally { if (!string.IsNullOrEmpty(strLink)) { Response.Redirect(strLink); } } }
protected void Page_Load(object sender, EventArgs e) { try { var _configs = cf.Config_meta(); if (_configs.ToList().Count > 0) { if (!string.IsNullOrEmpty(_configs.ToList()[0].CONFIG_FAVICON)) { ltrFavicon.Text = "<link rel='shortcut icon' href='" + PathFiles.GetPathConfigs() + _configs.ToList()[0].CONFIG_FAVICON + "' />"; } } UserControl ListNews = Page.LoadControl("../Usercontrols/ListNews.ascx") as UserControl; UserControl NewsDetail = Page.LoadControl("../Usercontrols/NewsDetail.ascx") as UserControl; UserControl ListBlog = Page.LoadControl("../Usercontrols/ListBlog.ascx") as UserControl; UserControl BlogDetail = Page.LoadControl("../Usercontrols/BlogDetail.ascx") as UserControl; UserControl SocialActivities = Page.LoadControl("../Usercontrols/SocialActivities.ascx") as UserControl; UserControl SocialActivitiesDetail = Page.LoadControl("../Usercontrols/SocialActivitiesDetail.ascx") as UserControl; UserControl Bestdeals = Page.LoadControl("../Usercontrols/Bestdeals.ascx") as UserControl; UserControl ListBestdeals = Page.LoadControl("../Usercontrols/ListBestdeals.ascx") as UserControl; UserControl BesdealsDetail = Page.LoadControl("../Usercontrols/BesdealsDetail.ascx") as UserControl; UserControl Destinations = Page.LoadControl("../Usercontrols/Destinations.ascx") as UserControl; UserControl ListDestinations = Page.LoadControl("../Usercontrols/ListDestinations.ascx") as UserControl; UserControl DestinationDetail = Page.LoadControl("../Usercontrols/DestinationDetail.ascx") as UserControl; UserControl SearchResult = Page.LoadControl("../Usercontrols/SearchResult.ascx") as UserControl; int _type = Utils.CIntDef(Request["type"]); string _catSeoUrl = Utils.CStrDef(Request.QueryString["curl"]); string _newsSeoUrl = Utils.CStrDef(Request.QueryString["purl"]); switch (_type) { case 3: getsession.LoadCatInfo(_catSeoUrl); Bind_meta_tags_cat(); if (Utils.CIntDef(Session["Cat_type"]) == 1 || Utils.CIntDef(Session["Cat_type"]) == 5) { if (Utils.CIntDef(Session["Cat_showitem"]) == 1) { phdMain.Controls.Add(ListBestdeals); } else { phdMain.Controls.Add(Bestdeals); } } else if (Utils.CIntDef(Session["Cat_type"]) == 2) { if (Utils.CIntDef(Session["Cat_showitem"]) == 1) { phdMain.Controls.Add(ListDestinations); } else { phdMain.Controls.Add(Destinations); } } else if (Utils.CIntDef(Session["Cat_type"]) == 3) { if (Utils.CIntDef(Session["Cat_showitem"]) == 1) { phdMain.Controls.Add(SocialActivitiesDetail); } else { phdMain.Controls.Add(SocialActivities); } } else if (Utils.CIntDef(Session["Cat_type"]) == 4) { if (Utils.CIntDef(Session["Cat_showitem"]) == 1) { phdMain.Controls.Add(BlogDetail); } else { phdMain.Controls.Add(ListBlog); } } else { if (Utils.CIntDef(Session["Cat_showitem"]) == 1) { phdMain.Controls.Add(NewsDetail); } else { phdMain.Controls.Add(ListNews); } } break; case 5: phdMain.Controls.Add(SearchResult); HtmlHead header = base.Header; header.Title = "Tìm kiếm"; break; case 6: getsession.LoadNewsInfo(_newsSeoUrl); Bind_meta_tags_news(); if (getsession.Getcat_type(_newsSeoUrl) == 1) { phdMain.Controls.Add(BesdealsDetail); } else if (getsession.Getcat_type(_newsSeoUrl) == 2) { phdMain.Controls.Add(DestinationDetail); } else if (getsession.Getcat_type(_newsSeoUrl) == 3) { phdMain.Controls.Add(SocialActivitiesDetail); } else if (getsession.Getcat_type(_newsSeoUrl) == 4) { phdMain.Controls.Add(BlogDetail); } else { phdMain.Controls.Add(NewsDetail); } break; default: Response.Redirect("/trang-chu.html"); break; } } catch (Exception ex) { clsVproErrorHandler.HandlerError(ex); } }