public ActionResult SendMessage(FormCollection f) { bizUserFriend bf = new bizUserFriend(); List<UserFriendDetail> list = bf.ListByUser(UserID); bizUsers b = new bizUsers(); Users model = b.Get(f["UserName"].Trim()); if (model == null) { TempData["Msg"] = "���û�������"; TempData["UserName"] = f["UserName"].Trim(); return RedirectToAction("SendMessage"); } if (model.UserID == 1000) { TempData["Msg"] = "���ܸ�ϵͳ������Ϣ"; TempData["UserName"] = f["UserName"].Trim(); return RedirectToAction("SendMessage"); } bizUserMsg bum = new bizUserMsg(); bizPopUp bp = new bizPopUp(); PopUp modelP = new PopUp(); modelP.Title = "ϵͳ��ʾ"; modelP.Types = 2; modelP.Content = "�û���" + UserName + "�����㷢��һ�������"; modelP.UserID = model.UserID; modelP.AddUser = 1000; modelP.URL = "/user/selfMessage/0-1.html"; modelP.Target = "_blank"; modelP.StartTime = DateTime.Now; modelP.EndTime = DateTime.Now.AddDays(1); modelP.Status = 0; bum.Add(UserID, model.UserID, CommonCache.FilterTextReplace(f["Content"])); bp.Add(modelP); TempData["Msg"] = "���ŷ��ͳɹ�"; return RedirectToAction("SendMessage"); }
public ActionResult Content(int id,int page) { int userID = UserID; bizBBSMain b = new bizBBSMain(); bizBBSDE bde = new bizBBSDE(); bizUserXCard uc = new bizUserXCard(); BBSMainRelationQuery model = b.GetBBSMainDetail(id); if(model==null) return Redirect("/bbs/NoPage.html"); if (UserCommon.CheckBBSAdminRight(AdminType) == false && model.DeleteType != 0) return Redirect("/bbs/NoPage.html"); List<BBSTypes> listBBSType = (new bizBBSTypes()).ListByMainID(1); b.AddHit(id); int count; List<BBSDERelationQuery> list = bde.List(id, page-1, 50, out count); ViewData["List"] = list; ViewData["PageList"] = bbs.GetBBSContentPageList(id, count, page); ViewData["Page"] = page; ViewData["deID"] = 0; ViewData["ID"] = id; ViewData["AdminType"] = AdminType; ViewData["ShowAllQM"] = ShowAllQM; ViewData["ShowSelfQM"] = ShowSelfQM; ViewData["TypesName"] = SZXX.UI.Public.CommonHelper.GetBBSTypeName(listBBSType, model.TypeDeID); if (userID != 0) { ViewData["Niming"] = uc.GetCardNum(userID, "niming"); ViewData["BigNiming"] = uc.GetCardNum(userID, "bigniming"); } bizPopUp bp = new bizPopUp(); DataSet pmodel = bp.GetNew(userID); if (pmodel != null) { //if (pmodel.Tables[0].Rows[0][2].ToString() == "1") //��ʾΪϵͳ��Ϣ //{ // if (SZXX.UI.Public.PublicHelper.GetCookie("PopInfoID") != pmodel.Tables[0].Rows[0][0].ToString()) // { // ViewData["PopUp"] = pmodel; // SZXX.UI.Public.PublicHelper.WriteCookie("PopInfoID", pmodel.Tables[0].Rows[0][0].ToString()); // } // else // ViewData["PopUp"] = null; //} //else if (ShowPopup) ViewData["PopUp"] = pmodel; else ViewData["PopUp"] = null; } return View(model); }