public System.Web.Mvc.ActionResult Login(string returnUrl) { ((dynamic)base.ViewBag).RegisterToggle = ConfigSystem.GetValueByCache("Shop_RegisterToggle"); WebSiteSet set = new WebSiteSet(ApplicationKeyType.Shop); ((dynamic)base.ViewBag).WebName = set.WebName; if (ConfigSystem.GetBoolValueByCache("System_Close_Login")) { return base.RedirectToAction("TurnOff", "Error"); } if (!string.IsNullOrWhiteSpace(returnUrl)) { ((dynamic)base.ViewBag).returnUrl = returnUrl; } //if ((base.HttpContext.User.Identity.IsAuthenticated && (base.get_CurrentUser() != null)) && (base.get_CurrentUser().UserType != "AA")) //{ // if (!string.IsNullOrWhiteSpace(returnUrl)) // { // return this.Redirect(returnUrl); // } // return base.RedirectToAction("Index", "UserCenter"); //} FormsAuthentication.SignOut(); base.Session.Remove(Maticsoft.Common.Globals.SESSIONKEY_USER); base.Session.Clear(); base.Session.Abandon(); IPageSetting pageSetting = PageSetting.GetPageSetting("Home", ApplicationKeyType.Shop); ((dynamic)base.ViewBag).Title = "登录" + pageSetting.Title; ((dynamic)base.ViewBag).Keywords = pageSetting.Keywords; ((dynamic)base.ViewBag).Description = pageSetting.Description; return base.View("Login"); }
public PartialViewResult Header(string viewName = "_Header") { WebSiteSet set = new WebSiteSet(ApplicationKeyType.Shop); ((dynamic) base.ViewBag).Logo = set.LogoPath; ((dynamic) base.ViewBag).WebName = set.WebName; ((dynamic) base.ViewBag).Domain = set.WebSite_Domain; return base.PartialView(viewName); }
private void SendEmail(string email) { Maticsoft.Model.MailConfig model = new Maticsoft.BLL.MailConfig().GetModel(); WebSiteSet set = new WebSiteSet(ApplicationKeyType.Shop); string webName = set.WebName; string str2 = string.Format("您对商品【{0}】的咨询有了新的回复,请及时查看!", webName); EmailQueue queue = new EmailQueue { EmailTo = model.Mailaddress, EmailSubject = string.Format("{0}回复通知", webName), EmailFrom = model.Mailaddress, EmailBody = str2, EmailPriority = 0, IsBodyHtml = false, NextTryTime = DateTime.Now }; EmailManage.PushQueue(queue); }
public ActionResult MyInvite() { new Content(); ((dynamic) base.ViewBag).Url = "Account/Register/" + Hex16.Encode(base.CurrentUser.UserID.ToString()); WebSiteSet set = new WebSiteSet(ApplicationKeyType.Shop); ((dynamic) base.ViewBag).WebName = set.WebName; IPageSetting pageSetting = PageSetting.GetPageSetting("Home", ApplicationKeyType.Shop); ((dynamic) base.ViewBag).Title = "我的邀请" + pageSetting.Title; ((dynamic) base.ViewBag).Keywords = pageSetting.Keywords; ((dynamic) base.ViewBag).Description = pageSetting.Description; return base.View(); }
public ActionResult Index(string viewName = "Index") { WebSiteSet set = new WebSiteSet(ApplicationKeyType.Shop); ((dynamic) base.ViewBag).WebName = set.WebName; UsersExpModel usersModel = this.userEXBll.GetUsersModel(base.CurrentUser.UserID); if (usersModel == null) { return base.RedirectToAction("Login", "Account"); } ((dynamic) base.ViewBag).privatecount = new Maticsoft.BLL.Members.SiteMessage().GetReceiveMsgNotReadCount(base.CurrentUser.UserID, -1); ((dynamic) base.ViewBag).Unpaid = new Maticsoft.BLL.Shop.Order.Orders().GetPaymentStatusCounts(base.CurrentUser.UserID, 0); IPageSetting pageSetting = PageSetting.GetPageSetting("Home", ApplicationKeyType.Shop); ((dynamic) base.ViewBag).Title = "个人中心" + pageSetting.Title; ((dynamic) base.ViewBag).Keywords = pageSetting.Keywords; ((dynamic) base.ViewBag).Description = pageSetting.Description; return base.View(viewName, usersModel); }
public ActionResult Search(string ViewName = "_Search") { WebSiteSet set = new WebSiteSet(ApplicationKeyType.SNS); ((dynamic) base.ViewBag).Logo = set.LogoPath; return base.View(ViewName); }
public ActionResult Header() { WebSiteSet set = new WebSiteSet(ApplicationKeyType.SNS); ((dynamic) base.ViewBag).Logo = set.LogoPath; ((dynamic) base.ViewBag).WebName = set.WebName; ((dynamic) base.ViewBag).Domain = set.WebSite_Domain; if (base.currentUser == null) { return base.View("_Header"); } int num = 0; List<MsgTip> model = new List<MsgTip>(); Maticsoft.BLL.Members.SiteMessage message = new Maticsoft.BLL.Members.SiteMessage(); Maticsoft.BLL.SNS.ReferUsers users = new Maticsoft.BLL.SNS.ReferUsers(); num = message.GetSystemMsgNotReadCount(base.currentUser.UserID, -1, base.currentUser.UserType); if (num > 0) { MsgTip item = new MsgTip { Count = num, _MsgType = 0 }; model.Add(item); } int receiveMsgNotReadCount = 0; receiveMsgNotReadCount = message.GetReceiveMsgNotReadCount(base.currentUser.UserID, -1); if (receiveMsgNotReadCount > 0) { MsgTip tip2 = new MsgTip { Count = receiveMsgNotReadCount, _MsgType = 1 }; model.Add(tip2); } int referNotReadCountByType = 0; referNotReadCountByType = users.GetReferNotReadCountByType(base.currentUser.UserID, 0); if (referNotReadCountByType > 0) { MsgTip tip3 = new MsgTip { Count = referNotReadCountByType, _MsgType = 2 }; model.Add(tip3); } ((dynamic) base.ViewBag).Current = base.currentUser; ((dynamic) base.ViewBag).Pointer = Globals.SafeInt(base.Request.QueryString["pointer"], 0); return base.View("_UserHeader", model); }
protected void btnSave_Click(object sender, EventArgs e) { int classID = Globals.SafeInt(this.dropClass.SelectedValue, 0); Maticsoft.Model.CMS.ContentClass modelByCache = this.bllContentClass.GetModelByCache(classID); if (string.IsNullOrWhiteSpace(this.txtTitle.Text.Trim())) { MessageBox.ShowFailTip(this, CMS.TitleErrorAddContent); } else if ((modelByCache != null) && !modelByCache.AllowAddContent) { MessageBox.ShowFailTip(this, CMS.ContentErrorAddContent); } else if (!PageValidate.IsNumber(this.lblContentID.Text)) { MessageBox.ShowFailTip(this, CMS.ContentErrorContentID); } else if (string.IsNullOrWhiteSpace(this.txtSeoUrl.Text)) { MessageBox.ShowFailTip(this, "请填写SeoURL地址!"); } else if (this.ContentID > 0) { Maticsoft.Model.CMS.Content model = this.bll.GetModel(this.ContentID); if (model == null) { MessageBox.ShowServerBusyTip(this, CMS.ContentErrorNoContent, "List.aspx"); } model.Title = Globals.HtmlEncode(this.txtTitle.Text); model.Attachment = this.hfs_Attachment.Value; model.IsRecomend = this.chkIsRecomend.Checked; model.IsHot = this.chkIsHot.Checked; model.IsColor = this.chkIsColor.Checked; model.IsTop = this.chkIsTop.Checked; model.Meta_Title = this.txtMeta_Title.Text; model.Meta_Keywords = this.txtMeta_Keywords.Text; model.Meta_Description = this.txtMeta_Description.Text; if (!string.IsNullOrWhiteSpace(this.txtSubTitle.Text)) { model.SubTitle = Globals.HtmlEncode(this.txtSubTitle.Text); } else { model.SubTitle = Globals.HtmlEncode(this.txtTitle.Text); } model.Summary = Globals.HtmlEncode(this.txtSummary.Text); model.LinkUrl = Globals.HtmlEncode(this.txtLinkUrl.Text); model.Remary = Globals.HtmlEncode(this.txtRemary.Text); if (this.txtBeFrom.Text.Length > 0) { model.BeFrom = this.txtBeFrom.Text; } else { WebSiteSet set = new WebSiteSet(ApplicationKeyType.CMS); model.BeFrom = set.WebName; } model.LastEditUserID = new int?(base.CurrentUser.UserID); model.LastEditDate = new DateTime?(DateTime.Now); model.State = int.Parse(this.radlState.SelectedValue); model.ClassID = classID; model.Keywords = Globals.HtmlEncode(this.txtKeywords.Text); model.Sequence = int.Parse(this.txtOrders.Text); model.Description = this.txtContent.Text; model.SeoUrl = this.txtSeoUrl.Text; string oldValue = string.Format("/Upload/Temp/{0}/", DateTime.Now.ToString("yyyyMMdd")); string newValue = string.Format("/Upload/CMS/Article/{0}/", DateTime.Now.ToString("yyyyMM")); string str3 = string.Format("/Upload/CMS/Files/{0}/", DateTime.Now.ToString("yyyyMM")); ArrayList fileNameList = new ArrayList(); if (!string.IsNullOrWhiteSpace(this.HiddenField_ISModifyImage.Value)) { string str4 = string.Format(this.HiddenField_ICOPath.Value, ""); fileNameList.Add(str4.Replace(oldValue, "")); model.ImageUrl = str4.Replace(oldValue, newValue); } else { model.ImageUrl = this.HiddenField_ICOPath.Value; } string fileName = string.Empty; if (!string.IsNullOrWhiteSpace(this.HiddenField_IsModifyAttachment.Value)) { string str6 = string.Format(this.hfs_Attachment.Value, ""); fileName = str6.Replace(oldValue, ""); model.Attachment = str6.Replace(oldValue, str3); } else { model.Attachment = this.hfs_Attachment.Value; } if (this.bll.Update(model)) { if (!string.IsNullOrWhiteSpace(this.HiddenField_IsDeleteAttachment.Value)) { FileManage.DeleteFile(base.Server.MapPath(this.HiddenField_OldAttachPath.Value)); } if (!string.IsNullOrWhiteSpace(this.HiddenField_ISModifyImage.Value)) { FileManage.MoveFile(base.Server.MapPath(oldValue), base.Server.MapPath(newValue), fileNameList); } if (!string.IsNullOrWhiteSpace(this.HiddenField_IsModifyAttachment.Value)) { FileManage.MoveFile(base.Server.MapPath(oldValue), base.Server.MapPath(str3), fileName); } if (this.chkStatic.Checked) { string valueByCache = ConfigSystem.GetValueByCache("MainArea"); string str8 = ""; string str9 = PageSetting.GetCMSUrl(this.ContentID, "CMS", ApplicationKeyType.CMS); if (valueByCache == "CMS") { str8 = "/Article/Details/" + this.ContentID; } else { str8 = "/CMS/Article/Details/" + this.ContentID; } if (!string.IsNullOrWhiteSpace(str8) && !string.IsNullOrWhiteSpace(str9)) { GenerateHtml.HttpToStatic(str8, str9); } } if (this.chkIndex.Checked) { string str10 = ConfigSystem.GetValueByCache("MainArea"); string str11 = ""; string str12 = "/index.html"; if (str10 == "CMS") { str11 = "/Home/Index?type=1"; } else { str11 = "/CMS/Home/Index?type=1"; } if (!string.IsNullOrWhiteSpace(str11) && !string.IsNullOrWhiteSpace(str12)) { GenerateHtml.HttpToStatic(str11, str12); } } DataCache.DeleteCache("ContentModel-" + model.ContentID); DataCache.DeleteCache("ContentModelEx-" + model.ContentID); MessageBox.ShowSuccessTip(this, Site.TooltipSaveOK, "List.aspx?type=0"); } else { MessageBox.ShowFailTip(this, Site.TooltipSaveError); } } else { MessageBox.ShowServerBusyTip(this, CMS.ContentErrorNoContent, "List.aspx"); } }
public PartialViewResult SearchCart(string ViewName = "_SearchCart") { int userId = (base.currentUser == null) ? -1 : base.currentUser.UserID; ShoppingCartInfo shoppingCart = new ShoppingCartHelper(userId).GetShoppingCart(); ((dynamic) base.ViewBag).CartCount = shoppingCart.Quantity; WebSiteSet set = new WebSiteSet(ApplicationKeyType.Shop); ((dynamic) base.ViewBag).Logo = set.LogoPath; return base.PartialView(ViewName); }