public ActionResult NewsAdd() { int parentID = Request.QueryString["parentID"] == null ? 0 : int.Parse(Request.QueryString["parentID"].ToString()); int typeID = Request.QueryString["typeID"] == null ? 0 : int.Parse(Request.QueryString["typeID"].ToString()); int bbsMainID = Request.QueryString["bbsMainID"] == null ? 0 : int.Parse(Request.QueryString["bbsMainID"].ToString()); string title = ""; string content = ""; string username = ""; if (bbsMainID != 0) { bizBBSMain bm = new bizBBSMain(); BBSMainRelationQuery model = bm.GetBBSMainDetail(bbsMainID); title = model.Title; username = model.UserName; string ubbContent = ""; string htmlContent = ""; ubbContent = MyText.ReplayUbbCode(model.Content); //if (model.FilePath != null && model.FilePath.Trim() != "" && model.FileType == 1) //{ // ubbContent += "\r\n[img]" + model.FilePath + "[/img]"; //} //else if (model.FilePath != null && model.FilePath.Trim() != "" && model.FileType == 2) //{ // ubbContent += "\r\n[flash]" + model.FilePath + "[/flash]"; //} //if (model.UpImages != null && model.UpImages.Trim() != "") //{ // ubbContent += "\r\n[img]" + model.UpImages + "[/img]"; //} if(model.ContentType==1) htmlContent = MyText.ReplayCode(MyText.UbbCode(ubbContent), false); else htmlContent = MyText.ReplayCode(ubbContent, false); content = htmlContent; } bizNewsType bt = new bizNewsType(); ViewData["Title"] = title; ViewData["TitleShort"] = title; ViewData["Content"] = content; ViewData["BBSMainID"] = bbsMainID; ViewData["TypeList"] = bt.ListByParent(parentID); ViewData["parentID"] = parentID; ViewData["typeID"] = typeID; ViewData["UserName"] = username; ViewData["Bar"] = MenuBar.Start() .AddMenu("��̳��Ѷ", "/AdminNews/NewsType/1101") .AddMenu("��Ϣ����","") .GetMenuHtml(); return View(); }
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); }