public ActionResult bbsImages() { bizBBSMain b = new bizBBSMain(); List<BBSMain> list = b.List(); foreach (var item in list) { BBSMain model = b.Get(item.BBSMainID); model.Attach(); if (model.UpImages != null) model.UpImages = model.UpImages.Replace("/userfiles/", "http://img1.woxx8.com/userfiles/"); model.Detach(); b.Update(model); } return View("UserQMSet"); }
public ActionResult Move(int id) { bizBBSMain b = new bizBBSMain(); BBSMain model = b.Get(id); if (model == null) TempData["Msg"] = "û�и���"; if (!UserCommon.CheckBBSAdminRight(AdminType)) TempData["Msg"] = "��û�иù��ܵ�Ȩ��"; bizBBSTypes btypes = new bizBBSTypes(); List<BBSTypes> listType = btypes.ListByMainID(model.TypeMainID); ViewData["typeMain"] = model.TypeMainID; ViewData["typeDe"] = model.TypeDeID; ViewData["ListType"] = listType; return View(model); }
public ActionResult UserJiYujian(int id) { bizBBSMain bm = new bizBBSMain(); bizUserSkill bus = new bizUserSkill(); BBSMain model = bm.Get(id); UserSkill modelSkill = bus.Get(2); ViewData["ModelSkill"] = modelSkill; return View(model); }
public ActionResult UserJiXianxing(int id) { int bbsDeID = int.Parse(Request.QueryString["deID"].ToString()); bizBBSMain bm = new bizBBSMain(); bizBBSDE bd = new bizBBSDE(); bizUserSkill bus = new bizUserSkill(); //BBSMain model = bm.Get(id); UserSkill modelSkill = bus.Get(6); List<Card> listCard = BBSCache.Instance().ListCard(); bizUserXCard buc = new bizUserXCard(); List<UserXCard> list = buc.ListByUser(UserID); ViewData["ModelSkill"] = modelSkill; ViewData["CardList"] = listCard; ViewData["UserCard"] = list; ViewData["ID"] = id; ViewData["deID"] = bbsDeID; if (bbsDeID == 0) { BBSMain modelMain = bm.Get(id); ViewData["IsNiming"] = modelMain.IsNiming; } else { BBSDE modelDe = bd.Get(id, bbsDeID); ViewData["IsNiming"] = modelDe.IsNiming; } return View(); }
public ActionResult UserJiRanse(int id) { bizBBSMain bm = new bizBBSMain(); bizUserSkill bus = new bizUserSkill(); BBSMain model = bm.Get(id); UserSkill modelSkill = bus.Get(5); List<Card> listCard = BBSCache.Instance().ListCard(); bizUserXCard buc = new bizUserXCard(); List<UserXCard> list = buc.ListByUser(UserID); ViewData["ModelSkill"] = modelSkill; ViewData["CardList"] = listCard; ViewData["UserCard"] = list; return View(model); }
public ActionResult UserJiQiqiu(int id) { bizBBSMain bm = new bizBBSMain(); bizUserSkill bus = new bizUserSkill(); BBSMain model = bm.Get(id); List<Card> listCard = BBSCache.Instance().ListCard(); bizUserXCard buc = new bizUserXCard(); UserSkill modelSkill = bus.Get(1); ViewData["ModelSkill"] = modelSkill; ViewData["CardList"] = listCard; ViewData["qiqiuNum"] = buc.GetCardNum(UserID, Enumerations.CardType.qiqiu.ToString()); ViewData["bigqiqiuNum"] = buc.GetCardNum(UserID, Enumerations.CardType.bigqiqiu.ToString()); return View(model); }
public ActionResult UseCard(int id) { bizBBSMain bm = new bizBBSMain(); bizCard c = new bizCard(); bizUserXCard uc = new bizUserXCard(); BBSMain model = bm.Get(id); List<Card> listCard = BBSCache.Instance().ListCard(); bizUserXCard buc = new bizUserXCard(); List<UserXCard> list = buc.ListByUser(UserID); ViewData["CardList"] = listCard; ViewData["UserCard"] = list; ViewData["bbsMainID"] = id; return View(model); }
public ActionResult ReplayDe(int id, int deID) { int userID = UserID; bizBBSMain b = new bizBBSMain(); bizUserXCard uc = new bizUserXCard(); BBSMain model=b.Get(id); if(model==null) Response.Redirect("/bbs/1/0/Main.html"); if (model.ChenmoType == 2) { TempData["Msg"] = "����������Ա��Ĭ"; return Redirect("/bbs/"+id+".html"); } if (model.ChenmoType == 1 && model.AddUser != userID) { TempData["Msg"] = "������¥����Ĭ"; return Redirect("/bbs/" + id + ".html"); } ViewData["Title"] = "<a target='_blank' href='/bbs/"+ model.BBSMainID +".html'>"+model.Title+"</a>"; ViewData["Niming"] = uc.GetCardNum(userID, "niming"); ViewData["BigNiming"] = uc.GetCardNum(userID, "bigniming"); ViewData["deID"] = deID; ViewData["ID"] = id; ViewData["ShowSelfQM"] = ShowSelfQM; return View("Replay"); }
public ActionResult EditReplay(FormCollection f) { int userID = UserID; int bbsMainID = int.Parse(f["bbsMainID"]); int bbsDeID = int.Parse(f["bbsDeID"]); bizBBSDE bde = new bizBBSDE(); bizBBSMain bmain = new bizBBSMain(); BBSMain modelMain = bmain.Get(bbsMainID); BBSDE model = bde.Get(bbsMainID, bbsDeID); if (modelMain == null) Response.Redirect("/bbs/1/0/Main.html"); if (model == null) Response.Redirect("/bbs/1/0/Main.html"); ViewData["Title"] = "<a target='_blank' href='/bbs/" + modelMain.BBSMainID + ".html'>" + modelMain.Title + "</a>"; string result = bde.Update(bbsMainID, bbsDeID, userID, CommonCache.FilterTextReplace(f["txtContent"]), "", "", f["isShowTag"] == null || f["isShowTag"].ToString() == "false" ? byte.Parse("0") : byte.Parse("1") ); if (result != "") { TempData["Msg"] = result; return Redirect("/bbs/EditReplay/" + bbsMainID + "-" + bbsDeID + ".html"); } else return Redirect("/bbs/" + bbsMainID + ".html"); }
public ActionResult EditReplay(int bbsMainID, int bbsDeID) { int userID = UserID; bizUsers bu = new bizUsers(); Users modelUser = bu.Get(userID); if (bbs.GetLevels(modelUser.OnlineTime) < 2) { TempData["Msg"] = "2�����ϲſ��Ի�����������2��ֻ��Ҫ5����Ŷ��"; return Redirect("/bbs/1/0/Main.html"); } bizBBSDE bde = new bizBBSDE(); bizBBSMain bmain = new bizBBSMain(); BBSMain modelMain = bmain.Get(bbsMainID); BBSDE model = bde.Get(bbsMainID,bbsDeID); if (modelMain == null) return Redirect("/bbs/1/0/Main.html"); if (model == null) return Redirect("/bbs/1/0/Main.html"); ViewData["Alert"] = ""; if (((DateTime)model.AddTime).AddDays(5) < DateTime.Now) { ViewData["Alert"] = "�����Ѿ�Զ���Ľ���ȡ��500�ɱң���ɱ����ȡ��1000�ɱ�����ѡ�"; } ViewData["Title"] = "<a target='_blank' href='/bbs/" + modelMain.BBSMainID + ".html'>" + modelMain.Title + "</a>"; ViewData["bbsMainID"] = bbsMainID; ViewData["bbsDeID"] = bbsDeID; return View(model); }
public ActionResult Zhuan(int id) { int deID = Request.QueryString["deID"] == null ? 0 : int.Parse(Request.QueryString["deID"].ToString()); bizBBSMain b = new bizBBSMain(); BBSMain model = b.Get(id); string ubbContent=""; string htmlContent=""; if (model == null) return Redirect("/bbs/1/0/Main.html"); if (UserCommon.CheckBBSAdminRight(AdminType) == false && model.DeleteType != 0) return Redirect("/bbs/NoPage.html"); if (deID == 0) { bizInfoContent ic = new bizInfoContent(); InfoContent modelInfo = ic.Get(model.ContentID); ubbContent = MyText.ReplayUbbCode(modelInfo.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]"; } htmlContent = MyText.ReplayCode(MyText.UbbCode(ubbContent),false); } else { bizBBSDE bde = new bizBBSDE(); BBSDE modelDe = bde.Get(id, deID); ubbContent = modelDe.Content; if (modelDe.UpImages != null && modelDe.UpImages.Trim() != "") { ubbContent += "\r\n[img]" + modelDe.UpImages + "[/img]"; } if (modelDe.Images != null && modelDe.Images.Trim() != "") { ubbContent += "\r\n[img]" + modelDe.Images + "[/img]"; } htmlContent = MyText.UbbCode(ubbContent); } ViewData["UbbContent"] = ubbContent; ViewData["HtmlContent"] = htmlContent; ViewData["typeMain"] = model.TypeMainID; ViewData["typeDe"] = model.TypeDeID; return View(model); }
public ActionResult UseCardToUser() { int bbsMainID; int bbsDeID; bbsMainID = int.Parse(Request.QueryString["mainid"].ToString()); bbsDeID = int.Parse(Request.QueryString["deid"].ToString()); bizBBSMain bm = new bizBBSMain(); bizBBSDE bd = new bizBBSDE(); ViewData["IsNiming"] = "1"; if (bbsDeID == 0) { BBSMain modelMain = bm.Get(bbsMainID); ViewData["IsNiming"] = modelMain.IsNiming; } else { BBSDE modelDe = bd.Get(bbsMainID, bbsDeID); ViewData["IsNiming"] = modelDe.IsNiming; } return View(); }
public ActionResult SetScore(int id,FormCollection f) { int userID = UserID; bizBBSMain b = new bizBBSMain(); BBSMain model = b.Get(id); int cha; if (model == null) return Redirect("/Home/AlertPage.html"); if (!UserCommon.CheckBBSAdminRight(AdminType)) return Redirect("/Home/AlertPage.html"); bizUserScoreLog bu = new bizUserScoreLog(); UserScoreLog modelUS = bu.Get(id, userID); List<UserScoreLog> listUS = bu.List(id); if (modelUS == null) { if (int.Parse(f["score"])!=0) bu.Add(id, userID, UserName, int.Parse(f["score"]), f["remark"].Trim()); } else { b.UserScoreCancel(id, userID); } TempData["Msg"]="�������óɹ�"; return RedirectToAction("SetScore",new {id=id}); }
//public ActionResult Move(int id) //{ // bizBBSMain b = new bizBBSMain(); // BBSMain model = b.Get(id); // if (model == null) // return Redirect("/Home/AlertPage.html"); // if (!UserCommon.CheckBBSAdminRight(AdminType)) // return Redirect("/Home/AlertPage.html"); // bizBBSTypes btypes = new bizBBSTypes(); // List<BBSTypes> listType = btypes.ListByMainID(model.TypeMainID); // ViewData["typeMain"] = model.TypeMainID; // ViewData["typeDe"] = model.TypeDeID; // ViewData["ListType"] = listType; // return View(model); //} //[AcceptVerbs(HttpVerbs.Post)] //public ActionResult Move(int id, FormCollection f) //{ // bizBBSMain b = new bizBBSMain(); // BBSMain model = b.Get(id); // if (model == null) // return Redirect("/Home/AlertPage.html"); // if (!UserCommon.CheckBBSAdminRight(AdminType)) // return Redirect("/Home/AlertPage.html"); // model.Attach(); // model.TypeDeID = int.Parse(f["typeDeID"]); // model.Detach(); // b.Update(model); // TempData["Msg"] = "ת�Ƴɹ�"; // return RedirectToAction("Move", new { id = id }); //} public ActionResult SetScore(int id) { bizBBSMain b = new bizBBSMain(); bizUserScoreLog bu = new bizUserScoreLog(); BBSMain model = b.Get(id); if (model == null) return Redirect("/Home/AlertPage.html"); if (!UserCommon.CheckBBSAdminRight(AdminType)) return Redirect("/Home/AlertPage.html"); UserScoreLog modelUS = bu.Get(id, UserID); List<UserScoreLog> listUS = bu.List(id); if (listUS.Sum(x => x.Score) >= 20) { TempData["Msg"] = "�����������Ļ����Ѿ�����20���������á�"; } ViewData["modelUS"] = modelUS; return View(model); }
public ActionResult MainUpdate(int id) { int userID = UserID; int kouJinbi=0; bizBBSMain b = new bizBBSMain(); bizUsers bu = new bizUsers(); Users modelUser = bu.Get(userID); BBSMain model=b.Get(id); if (model == null) Response.Redirect("/bbs/1/0/Main.html"); if (model.AddUser != userID) Response.Redirect("/bbs/" + model.TypeMainID + "/" + model.TypeDeID + "/Main.html"); ViewData["Alert"] = "��ʾ��"; if (model.AddTime.AddDays(5) < DateTime.Now) { ViewData["Alert"] = "�ĸ�������ȡ��500�ɱ�����ѡ�"; } if (model.AddTime.AddMinutes(10) < DateTime.Now) { kouJinbi+=1000; } if (model.Score > 0) { kouJinbi += model.Score * 2000; if (modelUser.FactionID == 0) ViewData["Alert"] += "ɾ����������ȡ��" + kouJinbi + "�ɱ�����ѡ�"; else ViewData["Alert"] += "�����ڲ��䣬����������ɾ����"; } else { if(kouJinbi>0) ViewData["Alert"] += "ɾ����������ȡ��" + kouJinbi + "�ɱ�����ѡ�"; } bizUserXCard uc = new bizUserXCard(); bizBBSTypes btypes = new bizBBSTypes(); bizInfoContent ic = new bizInfoContent(); InfoContent iModel = ic.Get(model.ContentID); List<BBSTypes> listType; if ((AdminType & 4) == 4) listType = BBSCache.Instance().ListBBSTypeForAdmin(model.TypeMainID); else listType = BBSCache.Instance().ListBBSType(model.TypeMainID); if (iModel.ContentType == 1) ViewData["txtContent"] = MyText.UbbCode(iModel.Content); else ViewData["txtContent"] = iModel.Content; ViewData["typeMain"] = model.TypeMainID; ViewData["typeDe"] = model.TypeDeID; ViewData["ListType"] = listType; return View(model); }
public ActionResult Move(int id, FormCollection f) { bizBBSMain b = new bizBBSMain(); BBSMain model = b.Get(id); if (model == null) { TempData["Msg"] = "û�и���"; return RedirectToAction("Move", new { id = id }); } if (!UserCommon.CheckBBSAdminRight(AdminType)) { TempData["Msg"] = "��û�иù��ܵ�Ȩ��"; return RedirectToAction("Move", new { id = id }); } model.Attach(); model.TypeDeID = int.Parse(f["typeDeID"]); model.Detach(); b.Update(model); TempData["Msg"] = "ת�Ƴɹ�"; return RedirectToAction("Move", new { id = id }); }
public ActionResult SetTop(int id) { bizBBSMain bm = new bizBBSMain(); BBSMain model = bm.Get(id); ViewData["ID"] = id; return View(model); }
public ActionResult Detail(int id, int page) { int count; int userID = UserID; bizBBSMain bm = new bizBBSMain(); bizBBSDE bde = new bizBBSDE(); bizNewsType bnt = new bizNewsType(); bizNews bn = new bizNews(); bizNewsContent bnn = new bizNewsContent(); News model = bn.Get(id); NewsContent modelContent = bnn.Get(id, page); NewsType modelType = bnt.Get(model.NewsTypeID); BBSMain modelMain = bm.Get(model.BBSMainID); List<BBSDERelationQuery> list = bde.ListByNew(model.BBSMainID,modelMain.AddUser, 0, 20, out count); int pagecount = bnn.ListByNewsID(id).Count; modelMain.Attach(); modelMain.HitNum = modelMain.HitNum + 1; modelMain.Detach(); bm.Update(modelMain); ViewData["Bar"] = MenuBar.Start() .AddMenu("������Ѷ", "/") .AddMenu(modelType.TypeName, "/news/list/" + modelType.NewsTypeID + "_1.html") .AddMenu("����","") .GetMenuHtml(); if (userID == 0) ViewData["Users"] = null; else ViewData["Users"] = (new bizUsers()).Get(userID); ViewData["HotList"] = BBSCache.Instance().ListNewByHot(); ViewData["Count"] = count; ViewData["List"] = list; ViewData["Content"] = modelContent; ViewData["HitCount"] = modelMain.HitNum; ViewData["PageList"] = Page.GetPageList("/news/detail/" + model.NewsID + "_$page$.html", pagecount, 1, page); return View(model); }
public ActionResult RemoveFromBall(int id) { string backUrl = Request.QueryString["BackUrl"].ToString(); if (UserCommon.CheckBBSAdminRight(AdminType)) { bizBBSMain bmain = new bizBBSMain(); BBSMain model = bmain.Get(id); bizBBSMainOfBall b = new bizBBSMainOfBall(); model.Attach(); model.BallType = 0; model.Detach(); bmain.Update(model); b.Delete(id); } return Redirect(backUrl); }